@visulima/vis 2.0.0 → 2.0.1

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 (215) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -1
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +2 -2
  5. package/dist/config/index.d.ts +1817 -1811
  6. package/dist/generate/index.d.ts +39 -39
  7. package/dist/packem_chunks/CONFIG_FILES.js +5 -5
  8. package/dist/packem_chunks/bloom-status.js +1 -1
  9. package/dist/packem_chunks/bloom-sync.js +1 -1
  10. package/dist/packem_chunks/cache-attestation.js +1 -1
  11. package/dist/packem_chunks/catalog.js +63 -61
  12. package/dist/packem_chunks/cli-exec.js +1 -1
  13. package/dist/packem_chunks/cli-main.js +133 -130
  14. package/dist/packem_chunks/detect.js +3 -3
  15. package/dist/packem_chunks/detect2.js +4 -4
  16. package/dist/packem_chunks/dispatch.js +3 -3
  17. package/dist/packem_chunks/extra-files.js +3 -3
  18. package/dist/packem_chunks/fix.js +8 -8
  19. package/dist/packem_chunks/handler.js +1 -1
  20. package/dist/packem_chunks/handler10.js +5 -5
  21. package/dist/packem_chunks/handler11.js +1 -1
  22. package/dist/packem_chunks/handler12.js +6 -6
  23. package/dist/packem_chunks/handler13.js +1 -1
  24. package/dist/packem_chunks/handler14.js +1 -1
  25. package/dist/packem_chunks/handler15.js +1 -1
  26. package/dist/packem_chunks/handler16.js +1 -1
  27. package/dist/packem_chunks/handler17.js +1 -1
  28. package/dist/packem_chunks/handler18.js +1 -1
  29. package/dist/packem_chunks/handler19.js +1 -1
  30. package/dist/packem_chunks/handler2.js +1 -1
  31. package/dist/packem_chunks/handler20.js +2 -2
  32. package/dist/packem_chunks/handler21.js +2 -2
  33. package/dist/packem_chunks/handler22.js +10 -10
  34. package/dist/packem_chunks/handler23.js +1 -1
  35. package/dist/packem_chunks/handler24.js +1 -1
  36. package/dist/packem_chunks/handler25.js +1 -1
  37. package/dist/packem_chunks/handler26.js +5 -5
  38. package/dist/packem_chunks/handler27.js +1 -1
  39. package/dist/packem_chunks/handler28.js +3 -3
  40. package/dist/packem_chunks/handler29.js +1 -1
  41. package/dist/packem_chunks/handler3.js +2 -3
  42. package/dist/packem_chunks/handler30.js +1 -1
  43. package/dist/packem_chunks/handler31.js +2 -2
  44. package/dist/packem_chunks/handler35.js +3 -3
  45. package/dist/packem_chunks/handler4.js +3 -3
  46. package/dist/packem_chunks/handler40.js +10 -10
  47. package/dist/packem_chunks/handler42.js +3 -3
  48. package/dist/packem_chunks/handler43.js +3 -3
  49. package/dist/packem_chunks/handler5.js +5 -5
  50. package/dist/packem_chunks/handler50.js +2 -2
  51. package/dist/packem_chunks/handler51.js +13 -13
  52. package/dist/packem_chunks/handler52.js +3 -3
  53. package/dist/packem_chunks/handler53.js +1 -1
  54. package/dist/packem_chunks/handler54.js +2 -2
  55. package/dist/packem_chunks/handler55.js +1 -1
  56. package/dist/packem_chunks/handler57.js +5 -5
  57. package/dist/packem_chunks/handler58.js +4 -4
  58. package/dist/packem_chunks/handler59.js +8 -8
  59. package/dist/packem_chunks/handler6.js +6 -6
  60. package/dist/packem_chunks/handler60.js +2 -2
  61. package/dist/packem_chunks/handler61.js +13 -13
  62. package/dist/packem_chunks/handler62.js +3 -3
  63. package/dist/packem_chunks/handler63.js +3 -3
  64. package/dist/packem_chunks/handler64.js +4 -4
  65. package/dist/packem_chunks/handler65.js +6 -6
  66. package/dist/packem_chunks/handler66.js +2 -2
  67. package/dist/packem_chunks/handler67.js +16 -16
  68. package/dist/packem_chunks/handler68.js +7 -7
  69. package/dist/packem_chunks/handler69.js +25 -25
  70. package/dist/packem_chunks/handler7.js +1 -1
  71. package/dist/packem_chunks/handler70.js +6 -6
  72. package/dist/packem_chunks/handler71.js +14 -14
  73. package/dist/packem_chunks/handler72.js +42 -42
  74. package/dist/packem_chunks/handler73.js +9 -9
  75. package/dist/packem_chunks/handler74.js +21 -21
  76. package/dist/packem_chunks/handler75.js +3 -3
  77. package/dist/packem_chunks/handler76.js +8 -8
  78. package/dist/packem_chunks/handler77.js +63 -64
  79. package/dist/packem_chunks/handler78.js +22 -22
  80. package/dist/packem_chunks/handler8.js +1 -1
  81. package/dist/packem_chunks/handler9.js +1 -1
  82. package/dist/packem_chunks/heal-accept.js +5 -5
  83. package/dist/packem_chunks/heal.js +8 -8
  84. package/dist/packem_chunks/help-command.js +26 -26
  85. package/dist/packem_chunks/index2.js +5 -5
  86. package/dist/packem_chunks/index3.js +2 -2
  87. package/dist/packem_chunks/index4.js +11 -11
  88. package/dist/packem_chunks/keys-refresh.js +1 -1
  89. package/dist/packem_chunks/lean.js +1 -1
  90. package/dist/packem_chunks/list.js +2 -2
  91. package/dist/packem_chunks/loader.js +4 -4
  92. package/dist/packem_chunks/orchestrator.js +14 -14
  93. package/dist/packem_chunks/pre-mode.js +2 -2
  94. package/dist/packem_chunks/prompts.js +3 -3
  95. package/dist/packem_chunks/prune.js +1 -1
  96. package/dist/packem_chunks/publish-guards.js +1 -1
  97. package/dist/packem_chunks/registry.js +17 -17
  98. package/dist/packem_chunks/resolveFormatter.js +5 -5
  99. package/dist/packem_chunks/shell-runner.js +1 -1
  100. package/dist/packem_chunks/snapshot.js +2 -2
  101. package/dist/packem_chunks/stage-publisher.js +1 -1
  102. package/dist/packem_chunks/staged-registry.js +2 -2
  103. package/dist/packem_chunks/state.js +3 -3
  104. package/dist/packem_chunks/status.js +1 -1
  105. package/dist/packem_chunks/sync.js +1 -1
  106. package/dist/packem_chunks/sync2.js +1 -1
  107. package/dist/packem_chunks/tar.js +3 -3
  108. package/dist/packem_chunks/tripwire.js +2 -2
  109. package/dist/packem_chunks/ts-loader.js +8 -8
  110. package/dist/packem_chunks/verify-lockfile.js +2 -2
  111. package/dist/packem_chunks/workspace.js +2 -2
  112. package/dist/packem_shared/advisories-BGeuHJQg.js +1 -0
  113. package/dist/packem_shared/affected-selection-B85ND6JV.js +1 -0
  114. package/dist/packem_shared/affected-shas-BWRRAB47.js +1 -0
  115. package/dist/packem_shared/ai-analysis-oNMAj1wd.js +68 -0
  116. package/dist/packem_shared/{ai-fix-CLfWbyqY.js → ai-fix-BgBU0TOz.js} +9 -9
  117. package/dist/packem_shared/{augment-BVuj3ee7.js → augment-HVeX6LpU.js} +4 -4
  118. package/dist/packem_shared/bin-DKod8Iqo.js +1 -0
  119. package/dist/packem_shared/build-scripts-CM8M1xcG.js +1 -0
  120. package/dist/packem_shared/{command-runtime-DTbo12cP.js → command-runtime-BVi4lL8k.js} +1 -1
  121. package/dist/packem_shared/cyclonedx-y7VLI-1d.js +4 -0
  122. package/dist/packem_shared/{dependency-scan-DZcSlSFp.js → dependency-scan-BAzKpXdW.js} +1 -1
  123. package/dist/packem_shared/{docker-69ybb6g7.js → docker-D1LStSlH.js} +36 -36
  124. package/dist/packem_shared/{en-C26W78--.js → en-BxrK-n-J.js} +10 -10
  125. package/dist/packem_shared/failure-log-ChuFC-8f.js +2 -0
  126. package/dist/packem_shared/giget-CAxjpwew.js +2 -0
  127. package/dist/packem_shared/glob-BUjyjdE8-BSrdzgma.js +1 -0
  128. package/dist/packem_shared/{index-Bhzio2RB.js → index-BJw7gKD1.js} +1 -1
  129. package/dist/packem_shared/index-BWl4DbMp.js +1 -0
  130. package/dist/packem_shared/index-DND6ptxQ.js +35 -0
  131. package/dist/packem_shared/{interface.d-B7VK2rcH.d.ts → interface.d-CRqRz4jt.d.ts} +39 -39
  132. package/dist/packem_shared/{interface.d-Cezzifoh.d.ts → interface.d-CrHOtJc1.d.ts} +37 -37
  133. package/dist/packem_shared/lifecycle-Db0qh6vR.js +2 -0
  134. package/dist/packem_shared/lockfile-CDQ0n4P5.js +1 -0
  135. package/dist/packem_shared/main-D_cam4hv.js +1 -0
  136. package/dist/packem_shared/manifests-Da_no4ZH.js +1 -0
  137. package/dist/packem_shared/{min-release-age-hK604veF.js → min-release-age-V6L6dpiP.js} +2 -2
  138. package/dist/packem_shared/missing-package-json-Jw8IEHct.js +1 -0
  139. package/dist/packem_shared/{native-config-sync-DDKjAy0i.js → native-config-sync-C0pUePad.js} +6 -6
  140. package/dist/packem_shared/osv-bloom-DNFpvSSO.js +2 -0
  141. package/dist/packem_shared/package-version-DjHDww_5.js +4 -0
  142. package/dist/packem_shared/packument-N3EWbZpL.js +1 -0
  143. package/dist/packem_shared/pm-runner-Bssje5qH.js +1 -0
  144. package/dist/packem_shared/project-name-filter-u2Q7YpQH.js +7 -0
  145. package/dist/packem_shared/prompt-BSAy8SMH.js +1 -0
  146. package/dist/packem_shared/{provenance-CRBV9cko.js → provenance-9OT8sTqn.js} +1 -1
  147. package/dist/packem_shared/{readJsonSync-DuMMeB3s-B9cGBVbJ.js → readJsonSync-BnWiH5-R-BpnwAB0Z.js} +1 -1
  148. package/dist/packem_shared/registry-keys-CYHd7qU2.js +1 -0
  149. package/dist/packem_shared/{resolve-explicit-BX6aMYl-.js → resolve-explicit-DC3XssJa.js} +1 -1
  150. package/dist/packem_shared/{resolve-runtime-COyiEML3.js → resolve-runtime-f5l4ODsH.js} +1 -1
  151. package/dist/packem_shared/run-file-zB4ACnUy.js +1 -0
  152. package/dist/packem_shared/{runtime-check-fzDkedMW.js → runtime-check-CWvAfu5u.js} +1 -1
  153. package/dist/packem_shared/s1ngularity-DsmC71xt.js +1 -0
  154. package/dist/packem_shared/{scan-progress-DQ9qIGzr.js → scan-progress-Ch8s3Uwl.js} +2 -2
  155. package/dist/packem_shared/selectors-CtxnIT4X.js +3 -0
  156. package/dist/packem_shared/signatures-Dwx5fD4g.js +2 -0
  157. package/dist/packem_shared/subtree-DSm0QEoE.js +2 -0
  158. package/dist/packem_shared/target-merge-b7bE1AEx.js +11 -0
  159. package/dist/packem_shared/target-options-BO4Uxt0k.js +1 -0
  160. package/dist/packem_shared/toolchain-BY8lJaSN.js +5 -0
  161. package/dist/packem_shared/typosquats-BUGgotNu.js +1 -0
  162. package/dist/packem_shared/{use-measured-height-DfNxp6nf.js → use-measured-height-BLZt9dW2.js} +1 -1
  163. package/dist/packem_shared/verify-B0ztxKMa.js +1 -0
  164. package/dist/packem_shared/vis-update-app-D1gLJB1O.js +1 -0
  165. package/dist/packem_shared/vis-user-error-DjFv8uxy.js +28 -0
  166. package/dist/packem_shared/watch-CGrUW_JD.js +1 -0
  167. package/dist/packem_shared/watch-loop-DIwSMjlA.js +11 -0
  168. package/dist/release/core/package-managers/index.d.ts +2 -2
  169. package/dist/release/core/version-actions/index.d.ts +10 -10
  170. package/dist/release/index.d.ts +60 -60
  171. package/dist/release/plugin-sdk.d.ts +80 -80
  172. package/dist/release/presets.d.ts +148 -148
  173. package/dist/release/types.d.ts +840 -840
  174. package/dist/runtime/preload.js +1 -1
  175. package/index.d.ts +204 -204
  176. package/index.js +52 -52
  177. package/package.json +12 -12
  178. package/schemas/project.schema.json +4 -1
  179. package/schemas/vis-config.schema.json +9 -3
  180. package/dist/packem_shared/advisories-B76fBVL-.js +0 -1
  181. package/dist/packem_shared/affected-shas-BOeR4vEc.js +0 -1
  182. package/dist/packem_shared/ai-analysis-D7HOdUwd.js +0 -68
  183. package/dist/packem_shared/bin-CkfFJCAM.js +0 -1
  184. package/dist/packem_shared/build-scripts-CfAqHBlq.js +0 -1
  185. package/dist/packem_shared/cyclonedx--L7NbMBH.js +0 -4
  186. package/dist/packem_shared/failure-log-BZQqxffZ.js +0 -2
  187. package/dist/packem_shared/giget-DVTFJlbR.js +0 -2
  188. package/dist/packem_shared/glob-DMbPwGSj-D2Hk3lFG.js +0 -1
  189. package/dist/packem_shared/index-2LCHaVNX.js +0 -35
  190. package/dist/packem_shared/index-B0EsgdzO.js +0 -1
  191. package/dist/packem_shared/index-Bq6YEpiq.js +0 -28
  192. package/dist/packem_shared/lifecycle-BcCMt9wn.js +0 -2
  193. package/dist/packem_shared/lockfile-Cwt0Nwr0.js +0 -1
  194. package/dist/packem_shared/main-B3juSU5z.js +0 -1
  195. package/dist/packem_shared/manifests-BshBdSb-.js +0 -1
  196. package/dist/packem_shared/missing-package-json-Cu0iWMT2.js +0 -1
  197. package/dist/packem_shared/osv-bloom-DMhXP184.js +0 -2
  198. package/dist/packem_shared/package-version-TsxLc6w2.js +0 -4
  199. package/dist/packem_shared/packument-CtVAoNo7.js +0 -1
  200. package/dist/packem_shared/pm-runner-CfyxALPK.js +0 -1
  201. package/dist/packem_shared/prompt-DjXHVgYU.js +0 -1
  202. package/dist/packem_shared/registry-keys-Ci2keQNi.js +0 -1
  203. package/dist/packem_shared/run-file-CTJfIZ0I.js +0 -1
  204. package/dist/packem_shared/s1ngularity-Cq1cCSpU.js +0 -1
  205. package/dist/packem_shared/selectors-B9dOMIMq.js +0 -3
  206. package/dist/packem_shared/signatures-DvD1E8Xa.js +0 -2
  207. package/dist/packem_shared/subtree-C7bZuiSQ.js +0 -2
  208. package/dist/packem_shared/target-merge-Dg25Izl5.js +0 -11
  209. package/dist/packem_shared/target-options-aPqByoww.js +0 -1
  210. package/dist/packem_shared/toolchain-CiaW3bx4.js +0 -5
  211. package/dist/packem_shared/typosquats-CRnvlYPw.js +0 -1
  212. package/dist/packem_shared/verify-23b6IfSg.js +0 -1
  213. package/dist/packem_shared/vis-update-app-De8JjZm0.js +0 -1
  214. package/dist/packem_shared/watch-B3P2dwoG.js +0 -1
  215. package/dist/packem_shared/watch-loop-B3_O8hF-.js +0 -11
@@ -0,0 +1,28 @@
1
+ import{createRequire as Ut}from"node:module";import{t as fe,g as jt,p as G,b as Rt,i as Ae,a as Bt,h as Wt,c as zt,u as Se}from"./package-version-DjHDww_5.js";let Vt;const Dt=t=>(Vt??=Ut(import.meta.url))(t),ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Tt=t=>{if(typeof ne<"u"&&ne.versions&&ne.versions.node){const[e,n]=ne.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ne.getBuiltinModule(t)}return Dt(t)},{createRequire:Ce}=Tt("node:module"),Ft=16,ge=32,qt=64,j=128,he="positionals";let Gt;const Ht=t=>(Gt??=Ce(import.meta.url))(t),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jt=t=>{if(typeof ie<"u"&&ie.versions&&ie.versions.node){const[e,n]=ie.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ie.getBuiltinModule(t)}return Ht(t)},{createRequire:at}=Jt("node:module"),Kt=globalThis.process??Object.create(null),Me={versions:{}},Ee=new Proxy(Kt,{get(t,e){if(e in t)return t[e];if(e in Me)return Me[e]}}),Yt=t=>t.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
+ `),Xt=(t,e,n,i)=>{const s={column:0,line:-1,...t.start},o={...s,...t.end},c=s.line,a=s.column,u=o.line,r=o.column;let l=Math.max(c-(n+1),0),d=Math.min(e.length,u+i);c===-1&&(l=0),u===-1&&(d=e.length);const p=u-c,f={};if(p)for(let h=0;h<=p;h++){const g=h+c;if(!a)f[g]=!0;else if(h===0){const $=e[g-1]?.length;f[g]=[a,($??0)-a+1]}else if(h===p)f[g]=[0,r];else{const $=e[g-h]?.length;f[g]=[0,$]}}else a===r?f[c]=a?[a,0]:!0:f[c]=[a,(r??0)-(a??0)];return{end:d,markerLines:f,start:l}},Qt=Ee.platform==="win32"&&!Ee.env?.WT_SESSION?">":"❯",Zt=(t,e,n)=>{const i={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...n,color:{gutter:h=>h,marker:h=>h,message:h=>h,...n?.color}},s=typeof e.start.column=="number";let o=(t.includes("\r")?Yt(t):t).split(`
3
+ `);typeof i.tabWidth=="number"&&t.includes(" ")&&(o=o.map(h=>h.replaceAll(" "," ".repeat(i.tabWidth))));const{end:c,markerLines:a,start:u}=Xt(e,o,i.linesAbove,i.linesBelow),r=String(c).length,{gutter:l,marker:d,message:p}=i.color;let f=o.slice(u,c).map((h,g)=>{const $=u+1+g,w=a[$],y=String($).padStart(r),x=!a[$+1],N=` ${y}${i.showGutter?" |":""}`;if(w){let k="";if(Array.isArray(w)){const I=h.replaceAll(/[^\t]/g," ").slice(0,Math.max(w[0]-1,0)),O=w[1]||1;k=[`
4
+ `,i.prefix+l(N.replaceAll(/\d/g," "))," ",I,d("^").repeat(O)].join(""),x&&i.message&&(k+=` ${p(i.message)}`)}return[i.prefix+d(Qt),l(N),h.length>0?` ${h}`:"",k].join("")}return`${i.prefix} ${l(N)}${h.length>0?` ${h}`:""}`}).join(`
5
+ `);return i.message&&!s&&(f=`${i.prefix+" ".repeat(r+1)+i.message}
6
+ ${f}`),f},en=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&en.set("AggregateError",AggregateError);let tn;const nn=t=>(tn??=at(import.meta.url))(t),oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,on=t=>{if(typeof oe<"u"&&oe.versions&&oe.versions.node){const[e,n]=oe.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return oe.getBuiltinModule(t)}return nn(t)};on("node:util");const sn=()=>Ee.env?.DEBUG==="true",J=(t,...e)=>{if(sn()){const n=e.map(i=>typeof i=="function"?i():i);console.debug(`error:parse-stacktrace: ${t}`,...n)}},K="<unknown>",rn=/^(?:node:internal\/|node:|internal\/)/,an=t=>t!==void 0&&rn.test(t),ln=/^.*?\s*at\s(?:(.+?\)(?:\s\[.+\])?|\(?.*?)\s?\((?:address\sat\s)?)?(?:async\s)?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cn=/\((\S+)\),\s(<[^>]+>)?:(\d+)?:(\d+)?\)?/,un=/(.*?):(\d+):(\d+)(?:\s<-\s.+:\d+:\d+)?/,pn=/eval\sat\s(<anonymous>)\s\((.*)\)?:(\d+)?:(\d+)\),\s*<anonymous>?:(\d+)?:(\d+)/,hn=/^\s*in\s(?:([^\\/]+(?:\s\[as\s\S+\])?)\s\(?)?\(at?\s?(.*?):(\d+)(?::(\d+))?\)?\s*$/,dn=/in\s(.*)\s\(at\s(.+)\)\sat/,fn=/^(?:.*@)?(.*):(\d+):(\d+)$/,mn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,gn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,wn=/(\S[^\s[]*\[.*\]|.*?)@(.*):(\d+):(\d+)/,Pe=/\(error: ([^)]*)\)/,yn=/at\s/,vn=/^(\S+):(\d+):(\d+)$|^(\S+):(\d+)$/,$n=/Error: |AggregateError:/,lt=/^Anonymous function$/,xn=/^\s*in\s.*/,bn=/^.*?\s*at\s.*/,Nn=/^.*?\s*@.*|\[native code\]/,ct=(t,e)=>{const n=t.includes("safari-extension"),i=t.includes("safari-web-extension");return n||i?[t.includes("@")?t.split("@")[0]:K,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},ut=(t,e)=>{const n=un.exec(e);n&&(t.file=n[1],t.line=+n[2],t.column=+n[3])},An=t=>{const e=dn.exec(t);if(e){J(`parse nested node error stack line: "${t}"`,()=>`found: ${JSON.stringify(e)}`);const i=e[2].split(":");return{column:i[2]?+i[2]:void 0,file:i[0],line:i[1]?+i[1]:void 0,methodName:e[1]??K,raw:t,type:void 0}}const n=hn.exec(t);if(n){J(`parse node error stack line: "${t}"`,()=>`found: ${JSON.stringify(n)}`);const i={column:n[4]?+n[4]:void 0,file:n[2]?n[2].replace(yn,""):void 0,line:n[3]?+n[3]:void 0,methodName:n[1]??K,raw:t,type:t.startsWith("internal")?"internal":void 0};return ut(i,`${n[2]}:${n[3]}:${n[4]}`),i}},En=t=>{const e=ln.exec(t);if(e){J(`parse chrome error stack line: "${t}"`,()=>`found: ${JSON.stringify(e)}`);const n=e[2]?.startsWith("native"),i=e[2]?.startsWith("eval")||e[1]?.startsWith("eval");let s,o;if(i){const r=cn.exec(t);if(r){const l=vn.exec(r[1]);l?(e[2]=l[4]??l[1],e[3]=l[5]??l[2],e[4]=l[3]):r[2]&&(e[2]=r[1]),r[2]&&(s={column:r[4]?+r[4]:void 0,file:r[2],line:r[3]?+r[3]:void 0,methodName:"eval",raw:t,type:"eval"})}else{const l=pn.exec(t);l&&(o={column:l[4]?+l[4]:void 0,file:l[2],line:l[3]?+l[3]:void 0},s={column:l[6]?+l[6]:void 0,file:l[1],line:l[5]?+l[5]:void 0,methodName:"eval",raw:l[0],type:"eval"})}}const[c,a]=ct(e[1]?e[1].replace(lt,"<anonymous>"):K,e[2]),u={column:e[4]?+e[4]:void 0,evalOrigin:s,file:a,line:e[3]?+e[3]:void 0,methodName:c,raw:t,type:i?"eval":n?"native":an(a)?"internal":void 0};return o?(u.column=o.column,u.file=o.file,u.line=o.line):ut(u,`${a}:${e[3]}:${e[4]}`),u}},kn=(t,e)=>{const n=mn.exec(t);if(n){J(`parse gecko error stack line: "${t}"`,()=>`found: ${JSON.stringify(n)}`);const i=n[3]?.includes(" > eval"),s=i&&n[3]&&gn.exec(n[3]);let o;i&&s&&(n[3]=s[1],o={column:n[5]?+n[5]:void 0,file:n[3],line:n[4]?+n[4]:void 0,methodName:"eval",raw:t,type:"eval"},n[4]=s[2]);const[c,a]=ct(n[1]?n[1].replace(lt,"<anonymous>"):K,n[3]);let u;(e?.type==="safari"||!i&&e?.type==="firefox")&&e.column?u=e.column:!i&&n[5]&&(u=+n[5]);let r;return(e?.type==="safari"||!i&&e?.type==="firefox")&&e.line?r=e.line:n[4]&&(r=+n[4]),{column:u,evalOrigin:o,file:a,line:r,methodName:c,raw:t,type:i?"eval":a.includes("[native code]")?"native":void 0}}},Cn=(t,e)=>{const n=wn.exec(t);if(!(n&&n[2].includes(" > eval"))&&n)return J(`parse firefox error stack line: "${t}"`,()=>`found: ${JSON.stringify(n)}`),{column:n[4]?+n[4]:e?.column??void 0,file:n[2],line:n[3]?+n[3]:e?.line??void 0,methodName:n[1]||K,raw:t,type:void 0}},On=t=>{const e=fn.exec(t);if(e)return J(`parse react android native error stack line: "${t}"`,()=>`found: ${JSON.stringify(e)}`),{column:e[3]?+e[3]:void 0,file:e[1],line:e[2]?+e[2]:void 0,methodName:K,raw:t,type:void 0}},pt=(t,{filter:e,frameLimit:n=50}={})=>{const i=t;let s=(typeof i.stacktrace=="string"?i.stacktrace:t.stack??"").split(`
7
+ `).map(o=>(Pe.test(o)?o.replace(Pe,"$1"):o).trim()).filter(o=>!$n.test(o)&&o!=="eval code");return e&&(s=s.filter(o=>e(o))),s=s.slice(0,n),s.reduce((o,c,a)=>{if(!c||c.length>1024)return o;let u;if(xn.test(c))u=An(c);else if(bn.test(c))u=En(c);else if(Nn.test(c)){let r;if(a===0){const l=t,d=l.columnNumber,p=l.lineNumber,f=l.line,h=l.column;d||p?r={column:d,line:p,type:"firefox"}:(f||h)&&(r={column:h,line:f,type:"safari"})}u=Cn(c,r)??kn(c,r)}else u=On(c);return u?o.push(u):J(`parse error stack line: "${c}"`,"not parser found"),o},[])};let _n;const In=t=>(_n??=at(import.meta.url))(t),Z=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Oe=t=>{if(typeof Z<"u"&&Z.versions&&Z.versions.node){const[e,n]=Z.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return Z.getBuiltinModule(t)}return In(t)},{existsSync:Ln,readFileSync:Sn}=Oe("node:fs"),{relative:Mn,resolve:Ue,sep:Pn}=Oe("node:path"),{cwd:Un}=Z,{fileURLToPath:Vn}=Oe("node:url"),Y=(t,e,n)=>n===0?t:e===" "?t+" ".repeat(n):t+" ".repeat(e*n),ht=t=>t.replaceAll("\\","/"),Dn=(t,e)=>{const n=t.replace("async file:","file:");return ht(Mn(e,n.startsWith("file:")?Vn(n):n))},Tn=(t,e,n)=>{if(e)return n.title(t.message);const i=t.message?`: ${t.message}`:"";return n.title(t.name+i)},dt=(t,{color:e,hideErrorTitle:n,indentation:i,prefix:s},o)=>`${Y(s,i,o)}${Tn(t,n,e)}
8
+ `,ft=(t,{color:e,indentation:n,prefix:i},s)=>{if(t.hint===void 0)return;const o=Y(i,n,s);let c="";if(Array.isArray(t.hint))for(const a of t.hint)c+=`${o+a}
9
+ `;else c+=o+t.hint;return e.hint(c)},mt=(t,e)=>{if(!e||t.file===void 0||t.line===void 0)return{trace:t};try{const n=e({column:t.column,file:t.file,line:t.line});return n?{source:n.source,trace:{...t,column:n.column??t.column,file:n.file??t.file,line:n.line??t.line}}:{trace:t}}catch{return{trace:t}}},_e=(t,e,n=0)=>{const{color:i,cwd:s,displayShortPath:o,indentation:c,prefix:a}=e,{trace:u}=mt(t,e.sourceMap),r=o?Dn(u.file,s):ht(u.file),{fileLine:l,method:d}=i;return`${Y(a,c,n)}at ${u.methodName?`${d(u.methodName)} `:""}${l(r)}:${l(u.line?.toString()??"")}`},jn=(t,e)=>{if(e.allowAllFilePaths)return!0;const n=Ue(e.cwd),i=Ue(n,t);return i===n||i.startsWith(n+Pn)},gt=(t,e,n)=>{const{color:i,indentation:s,linesAbove:o,linesBelow:c,prefix:a,showGutter:u,showLineNumbers:r,tabWidth:l}=e,{source:d,trace:p}=mt(t,e.sourceMap);if(p.file===void 0)return;let f;if(d===void 0){const h=p.file.replace("file://","");if(!jn(h,e)||!Ln(h))return;f=Sn(h,"utf8")}else f=d;return Zt(f,{start:{column:p.column,line:p.line}},{color:i,linesAbove:o,linesBelow:c,prefix:Y(a,s,n),showGutter:u,showLineNumbers:r,tabWidth:l})},wt=(t,e,n)=>{if(t.errors.length===0)return;let i=`${Y(e.prefix,e.indentation,n)}Errors:
10
+
11
+ `,s=!0;for(const o of t.errors)s?s=!1:i+=`
12
+
13
+ `,i+=vt(o,{...e,framesMaxLimit:1,hideErrorCodeView:e.hideErrorErrorsCodeView},n+1);return`
14
+ ${i}`},yt=(t,e,n,i=new Set)=>{i.add(t);let s=`${Y(e.prefix,e.indentation,n)}Caused by:
15
+
16
+ `;const o=t.cause;s+=dt(o,e,n);const c=pt(o).shift(),a=ft(o,e,n);if(a&&(s+=`${a}
17
+ `),c&&(s+=_e(c,e,n),!e.hideErrorCauseCodeView)){const u=gt(c,e,n);u!==void 0&&(s+=`
18
+ ${u}`)}if(o instanceof AggregateError){const u=wt(o,e,n);u!==void 0&&(s+=`
19
+ ${u}`)}return o.cause&&(s+=i.has(o)?`
20
+ ${Y(e.prefix,e.indentation,n+1)}Caused by: [Circular]`:`
21
+ ${yt(o,e,n+1,i)}`),`
22
+ ${s}`},Rn=(t,e)=>(t.length>0?`
23
+ `:"")+t.map(n=>_e(n,e)).join(`
24
+ `),vt=(t,e,n)=>{const i={allowAllFilePaths:!1,cwd:Un(),displayShortPath:!1,filterStacktrace:void 0,framesMaxLimit:Number.POSITIVE_INFINITY,hideErrorCauseCodeView:!1,hideErrorCodeView:!1,hideErrorErrorsCodeView:!1,hideErrorTitle:!1,hideMessage:!1,indentation:4,linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,showLineNumbers:!0,tabWidth:4,...e,color:{fileLine:c=>c,gutter:c=>c,hint:c=>c,marker:c=>c,message:c=>c,method:c=>c,title:c=>c,...e.color}},s=pt(t,{filter:e.filterStacktrace,frameLimit:i.framesMaxLimit}),o=s.shift();return[e.hideMessage?void 0:dt(t,i,n),ft(t,i,n),o?_e(o,i,n):void 0,o&&!i.hideErrorCodeView?gt(o,i,n):void 0,t instanceof AggregateError?wt(t,i,n):void 0,t.cause===void 0?void 0:yt(t,i,n),s.length>0?Rn(s,i):void 0].filter(Boolean).join(`
25
+ `)},Bn=(t,e={})=>{if(e.framesMaxLimit!==void 0&&e.framesMaxLimit<=0)throw new RangeError("The 'framesMaxLimit' option must be a positive number");return vt(t,e,0)};class te extends Error{loc;title;hint;type="VisulimaError";constructor({cause:e,hint:n,location:i,message:s,name:o,stack:c,title:a}){super(s,{cause:e}),this.title=a,this.name=o,this.stack=c??this.stack,this.loc=i,this.hint=n}setLocation(e){this.loc=e}setName(e){this.name=e}setMessage(e){this.message=e}setHint(e){this.hint=e}}class E extends te{code;context;constructor(e,n,i){super({message:e,name:"CerebroError"}),this.code=n,this.context=i}}const R=new Uint32Array(65536),Wn=(t,e)=>{const n=t.length,i=e.length,s=1<<n-1;let o=-1,c=0,a=n,u=n;for(;u--;)R[t.charCodeAt(u)]|=1<<u;for(u=0;u<i;u++){let r=R[e.charCodeAt(u)];const l=r|c;r|=(r&o)+o^o,c|=~(r|o),o&=r,c&s&&a++,o&s&&a--,c=c<<1|1,o=o<<1|~(l|c),c&=l}for(u=n;u--;)R[t.charCodeAt(u)]=0;return a},zn=(t,e)=>{const n=e.length,i=t.length,s=[],o=[],c=Math.ceil(n/32),a=Math.ceil(i/32);for(let h=0;h<c;h++)o[h]=-1,s[h]=0;let u=0;for(;u<a-1;u++){let h=0,g=-1;const $=u*32,w=Math.min(32,i)+$;for(let y=$;y<w;y++)R[t.charCodeAt(y)]|=1<<y;for(let y=0;y<n;y++){const x=R[e.charCodeAt(y)],N=o[y/32|0]>>>y&1,k=s[y/32|0]>>>y&1,I=x|h,O=((x|k)&g)+g^g|x|k;let m=h|~(O|g),v=g&O;m>>>31^N&&(o[y/32|0]^=1<<y),v>>>31^k&&(s[y/32|0]^=1<<y),m=m<<1|N,v=v<<1|k,g=v|~(I|m),h=m&I}for(let y=$;y<w;y++)R[t.charCodeAt(y)]=0}let r=0,l=-1;const d=u*32,p=Math.min(32,i-d)+d;for(let h=d;h<p;h++)R[t.charCodeAt(h)]|=1<<h;let f=i;for(let h=0;h<n;h++){const g=R[e.charCodeAt(h)],$=o[h/32|0]>>>h&1,w=s[h/32|0]>>>h&1,y=g|r,x=((g|w)&l)+l^l|g|w;let N=r|~(x|l),k=l&x;f+=N>>>i-1&1,f-=k>>>i-1&1,N>>>31^$&&(o[h/32|0]^=1<<h),k>>>31^w&&(s[h/32|0]^=1<<h),N=N<<1|$,k=k<<1|w,l=k|~(y|N),r=N&y}for(let h=d;h<p;h++)R[t.charCodeAt(h)]=0;return f},Fn=(t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return e.length===0?t.length:t.length<=32?Wn(t,e):zn(t,e)};let qn;const Gn=t=>(qn??=Ce(import.meta.url))(t),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Hn=t=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,n]=se.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return se.getBuiltinModule(t)}return Gn(t)},{createRequire:Jn}=Hn("node:module"),$t=String.raw,Ve=$t`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Kn=()=>new RegExp($t`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${Ve}(?:\u200D${Ve})*`,"gu");Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]]));const hs=/^[ \t]*(?:\r\n|\r|\n)/,ds=/(?:\r\n|\r|\n)[ \t]*$/,fs=/^(?:[\r\n]|$)/,ms=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,gs=/^[ \t]*[\r\n][ \t\r\n]*$/,ws=/\r\n|\n|\r/g,ys=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,vs=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,z=Kn(),Yn=/[-_./\s]+/g,de=/(\u001B\[[0-9;]*[a-z])/i,De=new RegExp("\\p{Script=Arabic}","u"),Xn=new RegExp("\\p{Script=Bengali}","u"),X=new RegExp("\\p{Script=Cyrillic}","u"),Qn=new RegExp("\\p{Script=Devanagari}","u"),Zn=new RegExp("\\p{Script=Ethiopic}","u"),we=new RegExp("\\p{Script=Greek}","u"),Te=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),ei=new RegExp("\\p{Script=Gujarati}","u"),ti=new RegExp("\\p{Script=Gurmukhi}","u"),je=new RegExp("\\p{Script=Hangul}","u"),Re=new RegExp("\\p{Script=Hebrew}","u"),ni=new RegExp("\\p{Script=Hiragana}","u"),Be=new RegExp("\\p{Script=Han}","u"),ii=new RegExp("\\p{Script=Kannada}","u"),oi=new RegExp("\\p{Script=Katakana}","u"),si=new RegExp("\\p{Script=Khmer}","u"),ri=new RegExp("\\p{Script=Lao}","u"),P=new RegExp("\\p{Script=Latin}","u"),ai=new RegExp("\\p{Script=Malayalam}","u"),li=new RegExp("\\p{Script=Myanmar}","u"),ci=new RegExp("\\p{Script=Oriya}","u"),ui=new RegExp("\\p{Script=Sinhala}","u"),pi=new RegExp("\\p{Script=Tamil}","u"),hi=new RegExp("\\p{Script=Telugu}","u"),di=new RegExp("\\p{Script=Thai}","u"),fi=new RegExp("\\p{Script=Tibetan}","u"),We=/[\u02BB\u02BC\u0027]/u,mi=t=>t.replace(z,"");class gi{capacity;cache;constructor(e){this.capacity=e,this.cache=new Map}get(e){if(!this.cache.has(e))return;const n=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,n),n}has(e){return this.cache.has(e)}set(e,n){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){const i=this.cache.keys().next().value;i!==void 0&&this.cache.delete(i)}this.cache.set(e,n)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}size(){return this.cache.size}}let wi;const yi=t=>(wi??=Jn(import.meta.url))(t),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vi=t=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,n]=re.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return re.getBuiltinModule(t)}return yi(t)},{stripVTControlCharacters:$i}=vi("node:util"),ye=new gi(1e3),xi=/[.*+?^${}()|[\]\\]/g,bi=t=>{const e=t.join("");if(ye.has(e)){const s=ye.get(e);return s.lastIndex=0,s}const n=t.map(s=>s.replaceAll(xi,String.raw`\$&`)).join("|"),i=new RegExp(n,"g");return ye.set(e,i),i},Ni=t=>{const e=[];let n=0,i;for(z.lastIndex=0;(i=z.exec(t))!==null;)i.index>n&&e.push(t.slice(n,i.index)),e.push(i[0]),n=z.lastIndex;return n<t.length&&e.push(t.slice(n)),e.filter(Boolean)},Ai=/[ČŠŽĐ]/i,xt=new Uint8Array(128),bt=new Uint8Array(128),Nt=new Uint8Array(128);for(let t=0;t<128;t++)xt[t]=t>=65&&t<=90?1:0,bt[t]=t>=97&&t<=122?1:0,Nt[t]=t>=48&&t<=57?1:0;const ve=t=>xt[t],ze=t=>bt[t],$e=t=>Nt[t],B=(t,e,n,i,s)=>{if(t.length===0)return[];let o=!1;const c=Object.values(e);for(const f of c)if(f(t[0])){o=!0;break}if(!o&&!n)return[t];const a=[...t],u=[];let r=a[0],l="other";const d=Object.entries(e);for(const f of d){const[h,g]=f;if(g(a[0])){l=h;break}}let p=n&&i?a[0]===a[0].toLocaleUpperCase(i):!1;for(let f=1;f<a.length;f++){const h=a[f];let g="other";for(const y of d){const[x,N]=y;if(N(h)){g=x;break}}const $=n&&i?h===h.toLocaleUpperCase(i):!1;let w=!1;s?w=s(l,g,p,$,h,f,a):(l!==g&&l!=="other"&&g!=="other"&&(w=!0),n&&g!=="other"&&!p&&$&&(w=!0)),w?(u.push(r),r=h):r+=h,l=g,n&&(p=$)}return r&&r.length>0&&u.push(r),u.length>0?u:[t]},Ei=(t,e,n,i)=>{if(n.size===0)return e;for(const s of n)if(t.startsWith(s,e))return i.push(s),e+s.length;return e},At=(t,e=new Set)=>{if(t.length===0)return[];if(t.toUpperCase()===t)return[t];let n=0;const i=[],s=t.length;for(let o=1;o<s;o++){const c=Ei(t,n,e,i);if(c!==n){n=c,o=n-1;continue}const a=t.codePointAt(o-1),u=t.codePointAt(o),r=a&&a<128&&ve(a),l=u&&u<128&&ve(u),d=a&&a<128&&ze(a),p=a&&a<128&&$e(a),f=u&&u<128&&$e(u);if(d&&l){i.push(t.slice(n,o)),n=o;continue}if(p&&!f||!p&&f){i.push(t.slice(n,o)),n=o;continue}if(f&&!p){let h=!1,g=!1;if(o+1<s){const $=t.codePointAt(o+1);h=$&&$<128&&ve($),g=$&&$<128&&$e($)}if(!g&&h){i.push(t.slice(n,o),t.slice(o,o+1)),n=o+1;continue}}if(o+1<s){const h=t.codePointAt(o+1),g=h&&h<128&&ze(h);if(r&&l&&g){const $=t.slice(n,o+1);e.has($)||(i.push(t.slice(n,o)),n=o)}}}return n<s&&i.push(t.slice(n)),i.filter(o=>o!=="")},Et=(t,e,n)=>{if(t.length===0)return[];const i=t===t.toLocaleUpperCase(e);if(e.startsWith("de")){if(!i&&t.replaceAll("ß","SS")===t.toLocaleUpperCase(e))return[t];const r=[...t],l=r.length,d=[];let p=r[0],f=r[0]===r[0].toLocaleUpperCase(e),h=f,g=f?0:-1;for(let $=1;$<l;$++){const w=r[$],y=w===w.toLocaleUpperCase(e);if(y===f)p+=w;else if(y)p&&p.length>0&&(d.push(p),p=w),h=!0,g=$;else{if(h&&$-g>1){const x=r[$-1],N=p.slice(0,-1);N&&N.length>0&&d.push(N),p=x+w}else p+=w;h=!1,g=-1}f=y}return p&&p.length>0&&d.push(p),d}if(e.startsWith("uk")||e.startsWith("ru")||e.startsWith("bg")||e.startsWith("sr")||e.startsWith("mk")||e.startsWith("be")){if(!X.test(t)&&!P.test(t))return[t];const r=[...t],l=r.length,d=[];let p=r[0];const f=r[0];let h;X.test(f)?h=1:P.test(f)?h=2:h=0;let g=f===f.toLocaleUpperCase(e);for(let w=1;w<l;w++){const y=r[w];let x;X.test(y)?x=1:P.test(y)?x=2:x=0;const N=y===y.toLocaleUpperCase(e);h!==x&&(h===1||h===2)&&(x===1||x===2)||x===h&&!g&&N?(d.push(p),p=y):p+=y,h=x,g=N}p&&p.length>0&&d.push(p);const $=[];for(let w=0;w<d.length;w++)w<d.length-1&&d[w].length===1&&P.test(d[w])&&X.test(d[w+1][0])?($.push(d[w]+d[w+1]),w+=1):$.push(d[w]);return $}if(e.startsWith("el")){if(!we.test(t)&&!P.test(t))return[t];const r=[];Te.lastIndex=0;let l;for(;(l=Te.exec(t))!==null;)r.push(l[0]);r.length===0&&r.push(t);const d=[];if(r.length===1){const p=r[0];if(!p||!we.test(p[0])||p.length===1)return[p??t]}for(const p of r){if(!p)continue;if(!we.test(p[0])||p.length===1){d.push(p);continue}const f=p.length;let h=p[0],g=p[0]===p[0].toLocaleUpperCase(e);for(let $=1;$<f;$++){const w=p[$],y=w===w.toLocaleUpperCase(e);!g&&y?(d.push(h),h=w):h+=w,g=y}h&&d.push(h)}return d}if(e.startsWith("ja")||e.startsWith("ko")){const r=e.startsWith("ja"),l=r?{hiragana:p=>ni.test(p),kanji:p=>Be.test(p),katakana:p=>oi.test(p),latin:p=>P.test(p)}:{hangul:p=>je.test(p),latin:p=>P.test(p)},d=new Set(["が","で","と","に","の","は","へ","も","や","を"]);if(r){const p=B(t,l,!1,e,(h,g)=>h==="hiragana"&&g==="katakana"||h==="katakana"&&g==="hiragana"||h==="hiragana"&&g==="latin"||h==="katakana"&&g==="latin"||h==="kanji"&&g==="latin"||h==="latin"&&(g==="hiragana"||g==="katakana"||g==="kanji")),f=[];for(const h of p){const g=h;g.length===1&&d.has(g)&&f.length>0?f[f.length-1]=f.at(-1)+g:f.push(g)}return f.length>0?f:[t]}return B(t,l,!1,e,(p,f)=>p==="hangul"&&f==="latin"||p==="latin"&&f==="hangul")}if(e.startsWith("sl")){const r=[...t],l=r.length,d=[];let p=r[0],f=r[0]===r[0].toLocaleUpperCase(e);for(let h=1;h<l;h++){const g=r[h],$=g===g.toLocaleUpperCase(e),w=Ai.test(g),y=h<l-1&&r[h+1]===r[h+1].toLocaleUpperCase(e);!f&&$||w&&y?(d.push(p),p=g,w&&y&&(d.push(p),p="")):p+=g,f=$}return p&&p.length>0&&d.push(p),d}if(e.startsWith("zh"))return B(t,{han:r=>Be.test(r),latin:r=>P.test(r)},!1,e);if(["ar","fa","he","ur"].includes(e.split("-")[0])){const r=l=>Re.test(l)||De.test(l);return B(t,{latin:l=>P.test(l),rtl:l=>r(l)},!1,e)}if(["am","bn","gu","hi","km","kn","lo","ml","mr","ne","or","pa","si","ta","te","th"].includes(e.split("-")[0])){const r=l=>Qn.test(l)||Xn.test(l)||ei.test(l)||ti.test(l)||ii.test(l)||pi.test(l)||hi.test(l)||ai.test(l)||ui.test(l)||di.test(l)||ri.test(l)||fi.test(l)||li.test(l)||Zn.test(l)||si.test(l)||ci.test(l);return B(t,{indic:l=>r(l),latin:l=>P.test(l)},!1,e)}if(["be","bg","ru","sr","uk"].includes(e))return B(t,{cyrillic:r=>X.test(r),latin:r=>P.test(r)},!0,e);if(["ar","fa","he"].includes(e))return B(t,{latin:r=>P.test(r),rtl:r=>Re.test(r)||De.test(r)},!1,e);if(e.startsWith("ko"))return B(t,{hangul:r=>je.test(r),latin:r=>P.test(r)},!1,e);if(e.startsWith("uz")){if(!X.test(t)&&!P.test(t))return[t];const r=[...t],l=r.length,d=[];let p=r[0],f=r[0]===r[0].toLocaleUpperCase(e);for(let h=1;h<l;h++){const g=r[h],$=g===g.toLocaleUpperCase(e);if(We.test(g)||We.test(r[h-1])){p+=g;continue}!f&&$?(d.push(p),p=g):p+=g,f=$}return p&&p.length>0&&d.push(p),d}const s=[...t],o=s.length,c=[];let a=s[0],u=s[0]===s[0].toLocaleUpperCase(e);for(const r of n)if(t.startsWith(r)){c.push(r),a=s[r.length],u=a===a.toLocaleUpperCase(e);break}for(let r=1;r<o;r++){const l=s[r],d=l===l.toLocaleUpperCase(e);let p=0;for(const f of n)if(t.startsWith(f,r)){c.push(a,f),p=f.length,a="";const h=f.at(-1);h&&(u=h===h.toLocaleUpperCase(e));break}if(p>0){r+=p-1;continue}!u&&d?(c.push(a),a=l):a+=l,u=d}return a&&c.push(a),c},ki=(t,e,n)=>{const i=[],s=de.test(t)?t.split(de).filter(Boolean):[t];for(const o of s){const c=o;if(de.test(c))i.push(c);else{z.lastIndex=0;const a=z.test(c)?Ni(c).filter(Boolean):[c];for(const u of a)if(z.lastIndex=0,z.test(u))i.push(u);else if(e){const r=e.toLowerCase().split("-")[0];i.push(...Et(u,r,n))}else i.push(...At(u,n))}}return i},Ci=(t,e={})=>{if(!t||typeof t!="string")return[];const{handleAnsi:n=!1,handleEmoji:i=!1,knownAcronyms:s=[],locale:o,normalize:c=!1,separators:a,stripAnsi:u=!1,stripEmoji:r=!1}=e,l=new Set([...s].toSorted((w,y)=>y.length-w.length));let d=t;u&&(d=$i(d)),r&&(d=mi(d));let p;Array.isArray(a)?p=bi(a):a instanceof RegExp?p=a:p=Yn;const f=[];let h=d;const g=p.flags.includes("g")?p:new RegExp(p.source,`${p.flags}g`);for(;h.length>0;){const w=g.exec(h);if(!w){h===".."?f.push(".."):h==="."?f.push("."):h.length>0&&f.push(h);break}const y=w.index,x=w[0],N=x.length,k=h.slice(0,y),I=h.slice(y+N);if(x.startsWith("../"))f.push(".."),h=h.slice(y+3);else if(x.startsWith("./"))f.push("."),h=h.slice(y+2);else if(y===0&&x==="..")f.push(".."),h=h.slice(2);else if(y===0&&x===".")f.push("."),h=h.slice(1);else{k.length>0&&f.push(k);let O=0;for(;(O=x.indexOf("../",O))!==-1;)f.push(".."),O+=3;for(O=0;(O=x.indexOf("./",O))!==-1;)(O===0||x[O-1]!==".")&&f.push("."),O+=2;let m=I;for(;m.startsWith("../");)f.push(".."),m=m.slice(3);for(;m.startsWith("./");)f.push("."),m=m.slice(2);if(m===".."){f.push("..");break}else if(m==="."){f.push(".");break}else h=m}g.lastIndex=0}if(f.length===0){const w=d.split(p).filter(Boolean);f.push(...w)}let $=[];for(const w of f)n||i?$.push(...ki(w,o,l)):o?$.push(...Et(w,o,l)):$.push(...At(w,l));return c&&($=$.map(w=>l.has(w)?w:o&&w===w.toLocaleUpperCase(o)?w[0]+w.slice(1).toLocaleLowerCase(o):w.toUpperCase()===w&&!l.has(w)?w.slice(0,1)+w.slice(1).toLowerCase():w)),$};let Oi;const _i=t=>(Oi??=Ce(import.meta.url))(t),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ii=t=>{if(typeof ae<"u"&&ae.versions&&ae.versions.node){const[e,n]=ae.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ae.getBuiltinModule(t)}return _i(t)},{writeFile:Li,stat:Si,rm:Mi,readFile:Fe,readdir:Pi,mkdir:Ui,access:Vi}=Ii("node:fs/promises"),ce=[{alias:"v",description:"Turn on verbose output",group:"global",name:"verbose",type:Boolean},{description:"Turn on debugging output",group:"global",name:"debug",type:Boolean},{alias:"h",description:"Print out helpful usage information",group:"global",name:"help",type:Boolean},{alias:"q",description:"Silence output",group:"global",name:"quiet",type:Boolean},{alias:"V",description:"Print version info",group:"global",name:"version",type:Boolean},{description:"Turn off colored output",group:"global",name:"no-color",type:Boolean},{description:"Force colored output",group:"global",name:"color",type:Boolean}];let F=class extends E{commandName;constructor(t,e=[]){const n=`Command "${t}" not found${e.length>0?`. Did you mean: ${e.join(", ")}?`:""}`;super(n,"COMMAND_NOT_FOUND",{commandName:t,suggestions:e}),this.name="CommandNotFoundError",this.commandName=t,e.length>0&&(this.hint=`Try one of these commands: ${e.join(", ")}`)}},kt=class extends E{option1;option2;constructor(t,e){super(`Options "${t}" and "${e}" cannot be used together`,"CONFLICTING_OPTIONS",{option1:t,option2:e}),this.name="ConflictingOptionsError",this.option1=t,this.option2=e,this.hint=`Remove either --${t} or --${e}`}},Di=class extends E{unknownOptions;constructor(t,e){const n=t.join(", "),i=`Found unknown ${t.length===1?"option":"options"}: ${n}`;super(i,"UNKNOWN_OPTION",{suggestions:e,unknownOptions:t}),this.name="UnknownOptionError",this.unknownOptions=t,e&&e.length>0&&(this.hint=`Did you mean: ${e.join(", ")}?`)}},Ti=class extends E{pluginName;constructor(t,e,n){super(`Plugin "${t}" error: ${e}`,"PLUGIN_ERROR",{originalError:n,pluginName:t}),this.name="PluginError",this.pluginName=t,n&&(this.cause=n)}},ji=class{logger;plugins=new Map;initialized=!1;cachedDependencyOrder=void 0;constructor(t){this.logger=t}hasPlugins(){return this.plugins.size>0}register(t){if(this.initialized)throw new Error(`Cannot register plugin "${t.name}" after initialization`);if(this.plugins.has(t.name))throw new Error(`Plugin "${t.name}" is already registered`);fe().CEREBRO_OUTPUT_LEVEL===String(j)&&this.logger.debug(`registering plugin: ${t.name}`),this.plugins.set(t.name,t),this.cachedDependencyOrder=void 0}async init(t){if(this.initialized)throw new Error("PluginManager already initialized");if(this.plugins.size===0){this.logger.debug("no plugins registered, skipping initialization"),this.initialized=!0;return}this.validateDependencies();const e=this.getDependencyOrder();this.logger.debug(`initializing ${String(e.length)} plugin(s)...`);for(const n of e)if(typeof n.init=="function"){this.logger.debug(`initializing plugin: ${n.name}`);try{await n.init(t)}catch(i){const s=new Ti(n.name,`Failed to initialize: ${i instanceof Error?i.message:String(i)}`,i instanceof Error?i:void 0);throw this.logger.error(s.message),s}}this.initialized=!0}async executeLifecycle(t,e,n){if(!this.initialized)throw new Error("PluginManager not initialized");if(this.plugins.size===0)return;const i=this.getDependencyOrder();for(const s of i){const o=s[t];if(typeof o=="function"){this.logger.debug(`executing ${t} hook for plugin: ${s.name}`);try{await(t==="afterCommand"?o(e,n):o(e))}catch(c){throw this.logger.error(`Error in ${t} hook for plugin "${s.name}":`,c),c}}}}async executeErrorHandlers(t,e){if(!this.initialized||this.plugins.size===0)return;const n=this.getDependencyOrder();for(const i of n)if(typeof i.onError=="function"){this.logger.debug(`executing error handler for plugin: ${i.name}`);try{await i.onError(t,e)}catch(s){this.logger.error(`Error in error handler for plugin "${i.name}":`,s)}}}getDependencyOrder(){if(this.cachedDependencyOrder!==void 0)return this.cachedDependencyOrder;const t=[],e=new Set,n=new Set,i=s=>{if(e.has(s))return;if(n.has(s))throw new Error(`Circular dependency detected involving plugin "${s}"`);const o=this.plugins.get(s);if(!o)throw new Error(`Plugin "${s}" not found`);if(n.add(s),o.dependencies)for(const c of o.dependencies)i(c);n.delete(s),e.add(s),t.push(o)};for(const s of this.plugins.keys())i(s);return this.cachedDependencyOrder=t,t}validateDependencies(){for(const t of this.plugins.values())if(t.dependencies){for(const e of t.dependencies)if(!this.plugins.has(e))throw new Error(`Plugin "${t.name}" depends on "${e}" which is not registered`)}}};const le=t=>t.type?.name==="Boolean",Ri=t=>{let e=t.type?t.type.name.toLowerCase():"string";const n=t.multiple??t.lazyMultiple?"[]":"";return e&&(e=e==="boolean"?"":`{underline ${e}${n}}`),e},qe=t=>(le(t)||(t.typeLabel=t.typeLabel??Ri(t),t.defaultOption&&(t.typeLabel=`${t.typeLabel} (D)`),t.required&&(t.typeLabel=`${t.typeLabel} (R)`)),t),Bi=new RegExp(/^-([^\d-])$/),Wi=new RegExp(/^--(\S+)/),zi=new RegExp(/^-([^\d-]{2,})$/),Fi=t=>Bi.test(t)||Wi.test(t)||zi.test(t),qi=(t,e)=>{const n=e[0]&&Fi(e[0])||e.length===0?null:e.shift()??null;if(!t.includes(n)){const i=new Error(`Command not recognised: ${String(n)}`);throw i.command=n,i.name="INVALID_COMMAND",i}return{argv:e,command:n}};class Ie extends te{optionName;value;constructor(e,n,i){super({hint:`Pass a valid ${i} value for '${e}'.`,message:`Invalid ${i} value '${n}' for option '${e}'`,name:"INVALID_VALUE",title:"Invalid Value"}),this.optionName=e,this.value=n,Object.setPrototypeOf(this,Ie.prototype)}}let Gi=class Ct extends te{optionName;constructor(e){super({cause:void 0,hint:`Remove the duplicate option '${e}' from your command line arguments.`,location:void 0,message:`Option '${e}' is already set`,name:"ALREADY_SET",stack:void 0,title:"Option Already Set"}),this.optionName=e,Object.setPrototypeOf(this,Ct.prototype)}},Ge=class Ot extends te{optionName;constructor(e){super({cause:void 0,hint:`Check your option definitions or remove the unknown option '${e}' from your command line arguments.`,location:void 0,message:`Unknown option: --${e}`,name:"UNKNOWN_OPTION",stack:void 0,title:"Unknown Option"}),this.optionName=`--${e}`,Object.setPrototypeOf(this,Ot.prototype)}},Hi=class _t extends te{value;constructor(e){super({hint:"Use a defined option or add a defaultOption to capture this value.",message:`Unknown value: ${e}`,name:"UNKNOWN_VALUE",title:"Unknown Value"}),this.value=e,Object.setPrototypeOf(this,_t.prototype)}};class S extends te{constructor(e,n){super({cause:void 0,hint:n,location:void 0,message:e,name:"INVALID_DEFINITIONS",stack:void 0,title:"Invalid Option Definition"}),Object.setPrototypeOf(this,S.prototype)}}const He=(t,e,n)=>{const i=Number(t);if(e&&Number.isNaN(i)&&String(t).trim().toLowerCase()!=="nan")throw new Ie(n??"",String(t),"Number");return i},Je=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",Ke=t=>t===Number||typeof t=="function"&&t.name==="Number",Ye=t=>t===String||typeof t=="function"&&t.name==="String",Ji=(t,e,n={})=>{const{optionName:i,strictTypes:s}=n;return Array.isArray(t)?Je(e)?t.map(Boolean):Ke(e)?t.map(o=>He(o,s,i)):Ye(e)?t.map(String):t.map(o=>e(String(o))):t===null?null:Je(e)?!!t:Ke(e)?He(t,s,i):Ye(e)?typeof t=="string"?t:String(t):e(typeof t=="string"?t:String(t))},_=(t,e,n,...i)=>{t&&console.debug(`[command-line-args:${n}] ${e}`,...i)},Ki=/-([a-z])/g,Yi=/^\d+$/,ue=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",Xi=t=>t.codePointAt(0)===95,Xe=(t,e)=>Array.isArray(t)?[...t,...e]:[t,...e],Qe=t=>t==="__proto__"||t==="constructor"||t==="prototype",Ze=(t,e,n,i=!1)=>{t[e]===void 0?t[e]=i?[n]:n:i&&Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]},et=(t,e,n,i,s)=>{let o=e.get(t)??n.get(t);if(!o&&i){const c=t.toLowerCase();o=i.get(c)??s?.get(c)}return o},Qi=(t,e,n,i)=>{const s=n.debug??!1;_(s,"resolveArgs called with options:","resolver",{partial:n.partial,stopAtFirstUnknown:n.stopAtFirstUnknown}),_(s,"Starting argument resolution","resolver"),_(s,"Tokens:","resolver",t),_(s,"Definitions:","resolver",e),_(s,"Processing tokens...","resolver");const o=new Map,c=new Map,a=n.caseInsensitive?new Map:void 0,u=n.caseInsensitive?new Map:void 0,r=n.camelCase?new Map:void 0,l=n.camelCase?new Map:void 0;for(const m of e)if(o.set(m.name,m),m.alias&&c.set(m.alias,m),n.caseInsensitive&&a&&(a.set(m.name.toLowerCase(),m),m.alias&&u&&u.set(m.alias.toLowerCase(),m)),n.camelCase&&r&&l){const v=m.name.replaceAll(Ki,(b,L)=>L.toUpperCase());r.set(m.name,v),l.set(v,m.name)}const d=Object.create(null),p=Object.create(null),f=[],h=[],g=new Set;let $=!1;const w=e.find(m=>m.defaultOption),y=e.some(m=>m.group),x=e.find(m=>m.type===Number);for(let m=0;m<t.length;m++){const v=t[m];if(v.kind==="option-terminator"){d._unknown=i.slice(v.index),$=!0;break}if(v.kind==="option"&&v.name){let b=et(v.name,o,c,a,u);!b&&v.value===void 0&&x&&Yi.test(v.name)&&(b=x,v.value=v.name,v.name=x.name);let L=!1;if(!b&&n.negation&&v.value===void 0&&v.name.startsWith("no-")){const C=v.name.slice(3),U=et(C,o,c,a,u);U?.type&&ue(U.type)&&(b=U,L=!0)}const A=b?b.name:v.name,M=b?.multiple,V=b?.lazyMultiple;if(Object.hasOwn(p,A)&&p[A]!==void 0&&!M&&!V&&!n.partial)throw new Gi(A);if(!b&&n.partial){const C=v.rawName??`--${v.name}${v.value!==void 0&&v.inlineValue?`=${v.value}`:""}`;f.push({index:v.index,value:C});continue}if(!b&&n.stopAtFirstUnknown){d._unknown=i.slice(v.index);break}if(!b&&!n.partial)throw new Ge(v.name);if(v.value===void 0){const C=t[m+1],U=C?.kind==="option"&&!("name"in C)&&C.value!==void 0,D=C&&b&&!(b.type&&ue(b.type))&&(C.kind==="positional"||U),Pt=b&&b.defaultOption&&!b.multiple&&!b.lazyMultiple;if(D&&(!b?.defaultOption||Pt))if(M){let T=m+1;const me=[];for(;T<t.length&&(t[T].kind==="positional"||t[T].kind==="option"&&!("name"in t[T])&&t[T].value!==void 0);)me.push(t[T].value),g.add(t[T].index),T++;p[A]=p[A]===void 0?me:Xe(p[A],me),m=T-1}else V?(Ze(p,A,C.value,!0),g.add(C.index),m++):(p[A]=C.value,g.add(C.index),m++);else b?.type&&ue(b.type)?Ze(p,A,!L,M):p[A]=M?[]:null}else{let{value:C}=v;if(b?.type&&ue(b.type))switch(C){case"":{if(n.partial){p._unknown??=[];const D=`${v.rawName??`--${v.name}`}${v.value?`=${v.value}`:""}`;p._unknown.push(D),h.push({index:v.index,value:D}),C=!0}else throw new Ge(v.name);break}case"false":{C=!1;break}case"true":{C=!0;break}default:C=!0}const U=[C];if(M){let D=m+1;for(;D<t.length&&t[D].kind==="positional";)U.push(t[D].value),g.add(t[D].index),D++;m=D-1}p[A]===void 0?p[A]=M||V?U:C:M||V?p[A]=Xe(p[A],U):p[A]=C}}else if(v.kind==="positional"&&n.stopAtFirstUnknown&&!g.has(v.index)&&!w){_(s,`Found unconsumed positional token at index ${String(v.index)}, stopping processing`,"resolver"),d._unknown=i.slice(v.index);break}}for(const[m,v]of Object.entries(p)){const b=o.get(m);b&&(b.multiple||b.lazyMultiple)&&!Array.isArray(v)&&(p[m]=[v])}const N=m=>m.kind==="option"&&!o.has(m.name??"")&&!c.has(m.name??"")&&(!n.caseInsensitive||!a?.has(m.name?.toLowerCase()??"")&&!u?.has(m.name?.toLowerCase()??""));let k=-1,I=Number.POSITIVE_INFINITY;if(n.stopAtFirstUnknown&&!$&&(k=t.findIndex(m=>N(m)),k!==-1&&(I=t[k].index)),w){const m=[],v=[];for(const b of t)b.kind==="positional"&&!g.has(b.index)&&b.index<I&&(m.push(b.value),v.push(b));if(m.length>0){const b=p[w.name],L=w.multiple??w.lazyMultiple;b===void 0?L?(v.forEach(A=>g.add(A.index)),p[w.name]=m):(g.add(v[0].index),p[w.name]=m[0]):L&&(v.forEach(A=>g.add(A.index)),p[w.name]=Array.isArray(b)?[...m,...b]:[...m,b])}}if(!n.partial){for(const m of t)if(m.kind==="positional"&&!g.has(m.index))throw new Hi(i[m.index])}if(n.partial&&!n.stopAtFirstUnknown){const m=[...f];if(p._unknown)for(const v of h)m.push({index:v.index,value:v.value});for(const v of t)v.kind==="positional"&&!g.has(v.index)&&m.push({index:v.index,value:i[v.index]});m.length>0&&(m.sort((v,b)=>v.index-b.index),d._unknown=m.map(v=>v.value))}if(n.stopAtFirstUnknown&&!$){const m=t.findIndex(b=>b.kind==="positional"&&!g.has(b.index));let v=-1;if(k!==-1&&m!==-1?v=Math.min(k,m):k!==-1?v=k:m!==-1&&(v=m),v>=0){const b=t[v].index;d._unknown=i.slice(b)}}else f.length>0&&!n.partial&&(d._unknown=f.map(m=>m.value));for(const[m,v]of Object.entries(p)){const b=n.camelCase?r?.get(m)??m:m,L=o.get(m);L?.type?d[b]=Ji(v,L.type,{optionName:L.name,strictTypes:n.strictTypes}):d[b]=v===void 0?null:v}for(const m of e){const v=n.camelCase?r?.get(m.name)??m.name:m.name;!(v in d)&&m.defaultValue!==void 0&&(m.multiple??m.lazyMultiple?d[v]=Array.isArray(m.defaultValue)?[...m.defaultValue]:[m.defaultValue]:d[v]=m.defaultValue)}if(y){const m={},v={},b={};for(const A of e)if(A.group){const M=Array.isArray(A.group)?A.group:[A.group];for(const V of M)Qe(V)||(m[V]??={})}for(const A of Object.keys(d))if(!Xi(A)){v[A]=d[A];let M=A;n.camelCase&&(M=l?.get(A)??A);const V=o.get(M);if(V?.group){const C=Array.isArray(V.group)?V.group:[V.group];for(const U of C)Qe(U)||m[U]&&(m[U][A]=d[A])}else b[A]=d[A]}const L={_all:v};for(const[A,M]of Object.entries(m))L[A]=M;Object.keys(b).length>0&&(L._none=b),d._unknown&&(L._unknown=d._unknown),Object.keys(d).forEach(A=>delete d[A]),Object.assign(d,L)}const O=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));return _(s,"Final parsed result:","resolver",O),O},ee="-".codePointAt(0),H="=",Zi=H.codePointAt(0),eo="--",to="-",no="--",It=t=>t.length>2&&t.startsWith(no),io=t=>It(t)&&!t.includes(H,3),oo=t=>It(t)&&t.includes(H,3),so=t=>{if(t.length!==2||t.codePointAt(0)!==ee||t.codePointAt(1)===ee)return!1;const e=t.codePointAt(1);return e!==void 0&&(e<48||e>57)},ro=t=>!(t.length<=2||t.codePointAt(0)!==ee||t.codePointAt(1)===ee),ao=t=>{const e=[];let n=0,i=[],s=0,o=-1,c=0;for(;s<i.length||n<t.length;){let a;if(s<i.length?(a=i[s],s++):(a=t[n],n++),c>0?c--:o++,a===eo){e.push({index:o,kind:"option-terminator"});const u=[...i.slice(s),...t.slice(n)],r=u.map((l,d)=>({index:o+d+1,kind:"positional",value:l}));e.push(...r),o+=u.length;break}if(so(a)){const u=a.charAt(1);e.push({index:o,kind:"option",name:u,rawName:a});continue}if(ro(a)&&!a.includes(H)){const u=[];let r="",l=!1;for(let d=1;d<a.length;d++){const p=a.charAt(d);l?r+=p:p.codePointAt(0)===Zi?l=!0:u.push(`${to}${p}`)}if(l)if(u.length>0){const d=u.pop();u.push(`${d}=${r}`)}else u.push(r);i=s<i.length?[...u,...i.slice(s)]:u,s=0,c=u.length;continue}if(io(a)){const u=a.slice(2);e.push({index:o,kind:"option",name:u,rawName:a});continue}if(oo(a)){const u=a.indexOf(H),r=a.slice(2,u),l=a.slice(u+1);e.push({index:o,inlineValue:!0,kind:"option",name:r,rawName:a,value:l});continue}if(a.length>2&&a.codePointAt(0)===ee&&a.codePointAt(1)!==ee&&a.includes(H)){const u=a.indexOf(H),r=a.charAt(1),l=a.slice(u+1);e.push({index:o,inlineValue:!0,kind:"option",name:r,rawName:a,value:l});continue}e.push({index:o,kind:"positional",value:a})}return e},lo=/\d/,co=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",uo=t=>typeof t=="function",po=(t,e,n)=>{const i=n?.debug??!1;_(i,"Validating definitions:","validation",t,"caseInsensitive:",e);const s=new Set,o=new Set,c=new Set,a=new Set;let u=0;for(const r of t){if(_(i,"Checking definition:","validation",r),!r.name)throw _(i,"Validation failed: name is required","validation"),new S("Invalid option definition: name is required");if(typeof r.name!="string")throw new S("Invalid option definition: name must be a string");if(r.name.trim()==="")throw new S("Invalid option definition: name cannot be empty");const l=e?r.name.toLowerCase():"";if(s.has(r.name)||e&&c.has(l))throw new S(`Invalid option definition: duplicate name '${r.name}'`);if(o.has(r.name)||e&&a.has(l))throw new S(`Invalid option definition: name '${r.name}' conflicts with an existing alias`);if(s.add(r.name),e&&c.add(l),r.alias!==void 0){if(typeof r.alias!="string")throw new S("Invalid option definition: alias must be a string");if(r.alias.length!==1)throw new S("Invalid option definition: alias must be a single character");if(lo.test(r.alias))throw new S("Invalid option definition: alias cannot be numeric");if(r.alias==="-")throw new S('Invalid option definition: alias cannot be "-"');const d=e?r.alias.toLowerCase():"";if(o.has(r.alias)||e&&a.has(d))throw new S(`Invalid option definition: duplicate alias '${r.alias}'`);if(s.has(r.alias)||e&&c.has(d))throw new S(`Invalid option definition: alias '${r.alias}' conflicts with an existing option name`);o.add(r.alias),e&&a.add(d)}if(r.defaultOption&&(u++,r.type!==void 0&&co(r.type)))throw new S("Invalid option definition: defaultOption cannot be Boolean type");if(r.type!==void 0&&!(r.type===Boolean||r.type===Number||r.type===String||typeof r.type=="function"&&uo(r.type)))throw new S("Invalid option definition: invalid type")}if(u>1)throw _(i,"Validation failed: multiple defaultOptions not allowed","validation"),new S("Invalid option definition: multiple defaultOptions not allowed");_(i,"Validation completed successfully","validation")};function ho(t,e={}){const n=e.debug??!1;_(n,"Starting command-line-args parsing","index"),_(n,"Options:","index",e);const i={...e};i.stopAtFirstUnknown&&(i.partial=!0);const s=Array.isArray(t)?t:[t];_(n,"Normalized definitions:","index",s),po(s,i.caseInsensitive,n?i:void 0);let{argv:o}=i;if(!o&&(o=process.argv.slice(2),process.execArgv.length>0)){const r=new Set(process.execArgv);o=o.filter(l=>!r.has(l))}_(n,"Using argv:","index",o);let c=o;i.caseInsensitive&&(c=o.map(r=>{if(r.startsWith("--")){const l=r.indexOf("="),d=(l===-1?r.slice(2):r.slice(2,l)).toLowerCase();return l===-1?`--${d}`:`--${d}${r.slice(l)}`}if(r.startsWith("-")&&!r.startsWith("--")&&r.length>1){const l=r.slice(1).split("=",2),d=l[0],p=l[1];if(!d)return r;const f=d.toLowerCase();return p===void 0?`-${f}`:`-${f}=${p}`}return r}));const a=ao(c.map(String));_(n,"Tokenized arguments:","index",a);const u=Qi(a,s,i,o);return _(n,"Command-line-args parsing completed","index"),u}class fo{result;argv;options;argument;command;commandName;env;logger;console;fs;process;runtime;rawUnknown;constructor(e,n){this.commandName=e,this.command=n}}let xe=class extends E{commandName;constructor(t,e,n){super(`Failed to load command "${t}": ${e}`,"COMMAND_LOADER_ERROR",{commandName:t,reason:e}),this.name="CommandLoaderError",this.commandName=t,this.hint="Ensure the loader resolves to a module with a default export that is the command handler function.",n!==void 0&&(this.cause=n)}};const mo=/^-{1,2}(\w+)(=(.+))?$/,Lt=(t,e,n,i)=>{const s=mo.exec(t);if(s===null)return{};const o=s[1];if(!o)return{};const c=n&&i?n.get(o)??i.get(o):e.find(a=>a.name===o||a.alias===o);return c!==void 0?{argName:c.name,argValue:s[3],option:c}:{}},tt=(t,e)=>{if(e.type===void 0)return t;if(e.type.name==="Boolean"){if(t==="true"||t==="1")return e.type(!0);if(t==="false"||t==="0")return e.type(!1)}return e.type(t)},go=new Set(["0","1","false","true"]),wo=(t,e,n,i)=>{if(e.length===0||t.length===0)return{};const s=(o,c)=>{const{argName:a,argValue:u,option:r}=Lt(c,e,n,i),{lastOption:l}=o;return r&&le(r)&&u&&a?o.partial[a]=tt(u,r):o.lastName&&l&&le(l)&&go.has(c)&&(o.partial[o.lastName]=tt(c,l)),{lastName:a,lastOption:r,partial:o.partial}};return t.reduce(s,{partial:{}}).partial},yo=new Set(["0","1","false","true"]),vo=(t,e,n,i)=>{if(e.length===0||t.length===0)return t;const s=(o,c)=>{const{argValue:a,option:u}=Lt(c,e,n,i),{lastOption:r}=o;if(r&&le(r)&&yo.has(c)){const{args:l}=o;return{args:l.slice(0,-1)}}return u&&le(u)&&a?{args:o.args}:{args:[...o.args,c],lastOption:u}};return t.reduce(s,{args:[]}).args},$o=t=>{const e=new Map;for(const n of t){const i=e.get(n.name);i?e.set(n.name,{...i,...n}):e.set(n.name,n)}return[...e.values()]},xo=t=>{if(t===void 0)return;const e=t.toLowerCase().trim();return e==="true"||e==="1"||e==="yes"||e==="on"},bo=(t,e)=>{if(!t.type)return e;if(e!==void 0){if(t.type===Boolean||typeof t.type=="function"&&t.type.name==="Boolean")return xo(e);if(t.type===Number||typeof t.type=="function"&&t.type.name==="Number"){const n=Number.parseFloat(e);return Number.isNaN(n)?void 0:n}return t.type===String||typeof t.type=="function"&&t.type.name==="String"?e:t.type(e)}},No=/_./g,Ao=/^[A-Z]/,Eo=t=>t.toLowerCase().replaceAll(No,e=>e[1]?.toUpperCase()??e).replace(Ao,e=>e.toLowerCase()),ko=t=>{if(!t||t.length===0)return{};const e={},n=fe();for(const i of t){const s=n[i.name],o=bo(i,s),c=o===void 0?i.defaultValue:o,a=Eo(i.name);e[a]=c}return e},Co=t=>{const e=new Map,n=new Map;for(const i of t)if(e.set(i.name,i),i.alias){const s=Array.isArray(i.alias)?i.alias:[i.alias];for(const o of s)n.set(o,i)}return{optionMapByAlias:n,optionMapByName:e}},St=async t=>{if(typeof t.__resolvedExecute__=="function")return t.__resolvedExecute__;if(typeof t.loader!="function")throw new xe(t.name,"no execute or loader defined");let e;try{e=await t.loader()}catch(i){throw new xe(t.name,i instanceof Error?i.message:String(i),i)}const n=e.default;if(typeof n!="function")throw new xe(t.name,"loader did not return a module with a default-exported handler function");return t.__resolvedExecute__=n,n},Oo=(t,e,n,i)=>{const s=new fo(t.name,t),{_all:o,_unknown:c,positionals:a}=e,u=Object.keys(n).length>0?{...o,...n}:o;he in u&&delete u[he],s.argument=a?.[he]??[],s.rawUnknown=[...c??[]];const r=Object.keys(i).length>0;return s.options=r?{...u,...i}:u,s.env=ko(t.env),s},_o=(t,e,n)=>{const i=t.options??[],s=i.length>0;let o=$o(s?[...i,...n]:n);if(o.length>0){for(const r of o)if(r.multiple&&r.lazyMultiple)throw new Error(`Argument "${r.name}" cannot have both multiple and lazyMultiple options, please choose one.`)}t.argument&&(o=[{defaultOption:!0,description:t.argument.description,group:"positionals",multiple:!0,name:he,type:t.argument.type,typeLabel:t.argument.typeLabel},...o]);let c,a;if(s){const{optionMapByAlias:r,optionMapByName:l}=Co(i);c=vo(e,i,l,r),a=wo(e,i,l,r)}else c=e,a={};const u=ho(o,{argv:c,camelCase:!0,partial:!0,stopAtFirstUnknown:!0});return{arguments_:o,booleanValues:a,parsedArgs:u}},Q=async(t,e,n)=>typeof t.execute=="function"?t.execute(e):(await St(t))(e);let Io=class extends E{commandName;missingOptions;constructor(t,e){super(`Command "${t}" is missing required options: ${e.join(", ")}`,"COMMAND_VALIDATION_ERROR",{commandName:t,missingOptions:e}),this.name="CommandValidationError",this.commandName=t,this.missingOptions=e,this.hint=`Provide the following required options: ${e.join(", ")}`}},Lo=class extends E{choices;option;value;constructor(t,e,n){super(`Invalid value "${e}" for option "${t}". Allowed values: ${n.join(", ")}`,"INVALID_CHOICE",{choices:n,option:t,value:e}),this.name="InvalidChoiceError",this.option=t,this.value=e,this.choices=n,this.hint=`Use one of: ${n.map(i=>`--${t} ${i}`).join(", ")}`}};const nt=(t,e,n=!1)=>{const i=[];for(const s of t)if(!(!n&&!s.required)&&e[s.name]===void 0){if(s.type?.name==="Boolean"){e[s.name]=!1;continue}i.push(s)}return i},So=(t,e)=>e.includes(t)?!0:Math.abs(t.length-e.length)>t.length/2?!1:Fn(t,e)<=t.length/3,W=(t,e)=>{const n=t.toLowerCase();return e.filter(i=>So(i.toLowerCase(),n))},Mo=(t,e)=>{const n=[];if(t._unknown&&t._unknown.forEach(i=>{const s=i.startsWith("--");let o=`Found unknown ${s?"option":"argument"} "${i}"`;if(s){const c=W(i.replace("--",""),(e.options??[]).map(a=>a.name));if(c.length>0){const[a,...u]=c.map(r=>`--${r}`);o+=u.length>0?`, did you mean ${a??""} or ${u.join(", ")}?`:`, did you mean ${a??""}?`}}n.push(o)}),n.length>0)throw new Error(n.join(`
26
+ `))},Po=(t,e,n)=>{const i=n.__requiredOptions__,s=i?nt(i,e,!0):nt(t,e,!1);if(s.length>0)throw new Io(n.name,s.map(o=>o.name));e._unknown&&e._unknown.length>0&&!n.argument&&Mo(e,n)},Uo=(t,e,n)=>{const i=n.__conflictingOptions__??t.filter(s=>s.conflicts!==void 0);if(i.length>0){const s=i.find(o=>Array.isArray(o.conflicts)?o.conflicts.some(c=>e[c]!==void 0)&&e[o.name]!==void 0:e[o.conflicts]!==void 0&&e[o.name]!==void 0);if(s)throw new kt(s.name,typeof s.conflicts=="string"?s.conflicts:s.conflicts?.[0]??"unknown")}},Vo=(t,e)=>{const n=e.options;if(n)for(const i of n){if(!i.choices||i.choices.length===0)continue;const s=t[i.name];if(s==null)continue;const o=Array.isArray(s)?s:[s];for(const c of o){const a=String(c);if(!i.choices.includes(a))throw new Lo(i.name,a,i.choices)}}},Do=t=>{if(!Array.isArray(t.options))return;const e=new Map,n=new Map;for(const s of t.options){if(s.name){const o=e.get(s.name)??[];o.push(s),e.set(s.name,o)}if(typeof s.alias=="string"&&s.alias.length>0){const o=n.get(s.alias)??[];o.push(s),n.set(s.alias,o)}else if(Array.isArray(s.alias)){for(const o of s.alias)if(o.length>0){const c=n.get(o)??[];c.push(s),n.set(o,c)}}}const i=[];for(const[s,o]of e)o.length>1&&i.push(`Duplicate option name "${s}" in command "${t.name}": ${JSON.stringify(o)}`);for(const[s,o]of n)o.length>1&&i.push(`Duplicate option alias "-${s}" used by options ${o.map(c=>`"${c.name}"`).join(", ")} in command "${t.name}"`);if(i.length>0)throw new Error(i.join(`
27
+ `))},To=(t,e)=>{if(e.length===0)return{argv:[],commandPath:void 0};const n=[];let i;for(let s=1;s<=e.length;s+=1){const o=e[s-1];if(o===void 0||o.startsWith("-"))break;n.push(o);const c=n.join(" ");t.has(c)&&(i={commandPath:[...n],depth:s})}return i?{argv:e.slice(i.depth),commandPath:i.commandPath}:{argv:e,commandPath:void 0}},q=t=>t.join(" "),it=(t,e)=>e&&e.length>0?[...e,t]:[t],jo=(t,e)=>typeof t!="string"||t===""?"":t[0].toLowerCase()+t.slice(1),Ro=(t,e)=>typeof t!="string"||t===""?"":t[0].toUpperCase()+t.slice(1),Bo=(t,e)=>{const{length:n}=t;if(n===0)return"";if(n===1)return t[0];const i=[];let s="",o="";for(let c=0;c<n;c++){const a=t[c];if(de.test(a)){s?(i.push(s+o+a),s="",o=""):(i.length>0&&i.push(e),s=a);continue}s?(o&&(o+=e),o+=a):(i.length>0&&i.push(e),i.push(a))}return i.join("")},Mt=(t,e)=>{if(typeof t!="string"||!t)return"";let n=!0;return Bo(Ci(t,{handleAnsi:e?.handleAnsi,handleEmoji:e?.handleEmoji,knownAcronyms:e?.knownAcronyms,locale:e?.locale,normalize:e?.normalize,separators:void 0,stripAnsi:e?.stripAnsi,stripEmoji:e?.stripEmoji}).map(i=>{const s=i,o=s.toLowerCase();return n?(n=!1,jo(o)):Ro(o)}),"")},Wo=/^no-/,zo=t=>{t.options?.forEach(e=>{e.__camelCaseName__=Mt(e.name)})},Fo=t=>{if(!Array.isArray(t.options)||t.options.length===0)return;const e=new Set;for(const i of t.options)e.add(i.name);const n=[];for(const i of t.options)if(i.name.startsWith("no-")){const s=i.name.replace(Wo,"");if(!e.has(s)){if(i.type!==Boolean)throw new Error(`Cannot add negated option "${i.name}" to command "${t.name}" because it is not a boolean.`);const o={...i,defaultValue:i.defaultValue===void 0?!0:!i.defaultValue,name:s};n.push(o),e.add(s)}}n.length>0&&t.options.push(...n)},qo=(t,e)=>{if(!e.options||e.options.length===0)return;const{options:n}=t,i=new Map;for(const o of e.options)if(o.name.startsWith("no-")){const c=Mt(o.name);i.set(c,o)}const s=Object.keys(n).filter(o=>i.has(o));if(s.length!==0)for(const o of s){const c=o.charAt(2);if(!c)continue;const a=c.toLowerCase()+o.slice(3),u=i.get(o);u&&(u.__negated__=!0),n[a]=!n[o],Reflect.deleteProperty(n,o)}},Go=(t,e)=>{if(!e.options||e.options.length===0)return;const n=new Map;for(const s of e.options)s.__camelCaseName__&&s.__negated__===void 0&&s.implies!==void 0&&n.set(s.__camelCaseName__,s);if(n.size===0)return;const{options:i}=t;for(const s of Object.keys(i)){const o=n.get(s);if(o?.implies){const{implies:c}=o;for(const[a,u]of Object.entries(c))i[a]===void 0&&(i[a]=u)}}},Ho=()=>!!process.versions.electron,Jo=()=>Ho()&&!process.defaultApp,Ko=()=>Jo()?0:1,Yo=t=>t.slice(Ko()+1),Xo=" ",Qo=(t,e)=>t===e?!0:t.length!==e.length?!1:t.every((n,i)=>n===e[i]),Zo=t=>{if(typeof t=="string")return t.split(Xo);const e=Ae();return Qo(t,e)?Yo(t):t},es=t=>{const e=o=>{t.error(`Uncaught exception: ${o.message||o}`),o.stack&&t.error(o.stack),G(1)},n=(o,c)=>{if(o instanceof Error)t.error(`Promise rejection: ${o.message||o}`),o.stack&&t.error(o.stack);else{let a;if(typeof o=="string")a=o;else try{a=JSON.stringify(o)}catch{a=String(o)}t.error(`Promise rejection: ${a}`)}G(1)},i=Se("uncaughtException",e),s=Se("unhandledRejection",n);return()=>{i(),s()}},ot=100,ts=/^[a-z][\w-]*$/i,ke=(t,e)=>{if(typeof t!="string"||t.trim().length===0)throw new E(`${e} must be a non-empty string`,"INVALID_INPUT",{fieldName:e,value:t});return t.trim()},st=(t,e)=>{if(!Array.isArray(t)||!t.every(n=>typeof n=="string"))throw new E(`${e} must be an array of strings`,"INVALID_INPUT",{fieldName:e,value:t});return t},be=(t,e)=>{if(typeof t!="object"||t===null)throw new E(`${e} must be an object`,"INVALID_INPUT",{fieldName:e,value:t});return t},pe=t=>{const e=ke(t,"Command name");if(e.length>ot)throw new E(`Command name is too long (maximum ${String(ot)} characters)`,"INVALID_COMMAND_NAME",{commandName:e,length:e.length});if(e.includes("..")||e.includes("/")||e.includes("\\")||e.includes(";")||e.includes("|")||e.includes("&"))throw new E(`Command name "${e}" contains invalid characters`,"INVALID_COMMAND_NAME",{commandName:e});if(!ts.test(e))throw new E(`Command name "${e}" must start with a letter and contain only letters, numbers, hyphens, and underscores`,"INVALID_COMMAND_NAME",{commandName:e});return e},ns=new Set([`
28
+ `,"\r"," ","\0",'"',"$","&","'","(",")",";","<",">","[","\\","]","`","{","|","}"]),is=(t,e={})=>{if(typeof t!="string")throw new TypeError("Argument must be a string");const n=typeof e=="boolean"?{checkDangerousChars:e}:e,i=n.maxArgumentLength??1e6;if(Number.isFinite(i)&&i>0&&t.length>i)throw new Error(`Argument is too long (maximum ${String(i)} characters)`);if(n.checkDangerousChars){for(const s of t)if(ns.has(s))throw new Error(`Argument contains dangerous character: ${s}`)}return n.trim?t.trim():t},rt=(t,e={})=>{if(!Array.isArray(t))throw new TypeError("Arguments must be an array");const n=typeof e=="boolean"?{checkDangerousChars:e}:e,i=n.maxArguments??1e5;if(Number.isFinite(i)&&i>0&&t.length>i)throw new Error(`Too many arguments (maximum ${String(i)})`);return t.map(s=>is(s,n))},os=/^-([^\d-])$/,ss=/^--(\S+)/,rs=/^-([^\d-]{2,})$/,Ne=t=>os.test(t)||ss.test(t)||rs.test(t),as={access:(t,e)=>Vi(t,e),mkdir:(t,e)=>Ui(t,e),readdir:t=>Pi(t),readFile:(async(t,e)=>e===void 0?Fe(t):Fe(t,e)),rm:(t,e)=>Mi(t,e),stat:t=>Si(t),writeFile:(t,e,n)=>Li(t,e,n)},ls=(t,e,n)=>{const i=e.indexOf("--"),s=i===-1?new Set:new Set(e.slice(i+1)),o=n.filter(u=>u.startsWith("--")&&u!=="--"&&!s.has(u));if(o.length===0)return;const c=(t.options??[]).map(u=>u.name),a=o.flatMap(u=>W(u.slice(2),c).map(r=>`--${r}`));throw new Di(o,a)};class Le{#t;#e;#u;#p;#f;#m;#A;#E;#k;#$;#C;#x;#O;#_=ge;#h;#n;#i;#o;#s;#r;#g=!1;#I;#L=!1;#w;#y;#v;#l=[];#V(){return this.#w===void 0&&(this.#w=[...this.#i.keys()]),this.#w}#S(){return this.#y===void 0&&(this.#y=[...this.#n.keys()]),this.#y}#a(){return this.#v===void 0&&(this.#v=[...this.#V(),...this.#S()]),this.#v}#M(){return this.#l.length===0?ce:[...ce,...this.#l]}#P(){this.#w=void 0,this.#y=void 0,this.#v=void 0}#b(){if(this.#u===void 0){const e=Zo(this.#e.argv);this.#u=rt(e,{maxArguments:this.#x}),this.#D()}return this.#u}#N(){return this.#$??fe()}#d(e){this.#_=e,this.#N().CEREBRO_OUTPUT_LEVEL=String(e)}#c(){const e=this.#N().CEREBRO_OUTPUT_LEVEL,n=e===void 0?Number.NaN:Number(e);return Number.isNaN(n)?this.#_:n}#D(){if(!this.#u)return;let e=!1;for(const n of this.#u){if(n==="--quiet"||n==="-q"){this.#d(Ft),e=!0;break}if(n==="--verbose"||n==="-v"){this.#d(qt),e=!0;break}if(n==="--debug"){this.#d(j),e=!0;break}}e||this.#d(Object.hasOwn(this.#N(),"DEBUG")?j:ge)}#T(){this.#L||(this.#I=es(this.#t),this.#L=!0)}#j(){return{arch:Rt(),argv:this.#b(),cwd:this.#p,env:this.#$??fe(),exit:this.#k??(e=>G(e??0)),platform:jt(),stdin:this.#C}}#U(e,n,i,s){this.#c()===j&&this.#t.debug(`command '${s}' found, parsing command args: ${n.join(", ")}`);const{arguments_:o,booleanValues:c,parsedArgs:a}=_o(e,n,this.#M()),u=Object.keys(c).length>0;let r=a;u&&(r={...a,_all:{...a._all,...c}}),Po(o,r,e);const l=Oo(e,a,c,i);l.runtime=this,l.argv=this.#b(),l.fs=this.#E??as,l.process=this.#j(),l.console=this.#t;const d=e.options&&e.options.length>0;if(d&&e.options){const p=e.options.filter(f=>f.name.startsWith("no-"));for(const f of p){const h=f.name.slice(3),g=`--${f.name}`,$=`--${h}`,w=n.includes(g),y=n.includes($);if(w&&y)throw new kt(h,f.name)}}return d&&(qo(l,e),Go(l,e)),Uo(o,l.options,e),Vo(l.options,e),this.#O&&ls(e,n,l.rawUnknown),this.#c()===j&&(this.#t.debug("command options parsed from options:"),this.#t.debug(JSON.stringify(l.options,null,2)),this.#t.debug("command argument parsed from argument:"),this.#t.debug(JSON.stringify(l.argument,null,2))),{arguments_:o,booleanValues:c,commandArgs:r,parsedArgs:a,toolbox:l}}constructor(e,n={}){if(typeof e!="string"||e.trim().length===0)throw new E("CLI name must be a non-empty string","INVALID_INPUT",{cliName:e});this.#f=e.trim();const i=n.argv??Ae(),s=n.cwd??Bt();if(this.#e={...n,argv:i,cwd:s},this.#e.argv&&!Array.isArray(this.#e.argv))throw new E("CLI argv option must be an array of strings","INVALID_INPUT",{argv:this.#e.argv});if(this.#e.cwd&&typeof this.#e.cwd!="string")throw new E("CLI cwd option must be a string","INVALID_INPUT",{cwd:this.#e.cwd});if(this.#e.packageName&&typeof this.#e.packageName!="string")throw new E("CLI packageName option must be a string","INVALID_INPUT",{packageName:this.#e.packageName});if(this.#e.packageVersion&&typeof this.#e.packageVersion!="string")throw new E("CLI packageVersion option must be a string","INVALID_INPUT",{packageVersion:this.#e.packageVersion});if(typeof this.#e.logger=="object"){const r=["debug","error","info","log","warn"],l=[],d=this.#e.logger;for(const p of r)typeof d[p]!="function"&&l.push(p);if(l.length>0)throw new E(`Logger object is missing required methods: ${l.join(", ")}`,"INVALID_INPUT",{logger:this.#e.logger,missingMethods:l});this.#t=this.#e.logger}else this.#t={...console,debug:(...r)=>{this.#c()===j&&console.debug(...r)}};this.#m=this.#e.packageVersion,this.#A=this.#e.packageName,this.#p=this.#e.cwd,this.#s="help",this.#r={};const o=n.fs;if(o!==void 0&&(typeof o!="object"||o===null))throw new E("CLI fs option must be an object implementing the CerebroFs interface","INVALID_INPUT",{fs:n.fs});const c=n.exit;if(c!==void 0&&typeof c!="function")throw new E("CLI exit option must be a function","INVALID_INPUT",{exit:n.exit});const a=n.env;if(a!==void 0&&(typeof a!="object"||a===null))throw new E("CLI env option must be a record of string keys","INVALID_INPUT",{env:n.env});const u=n.stdin;if(u!==void 0&&typeof u!="string")throw new E("CLI stdin option must be a string","INVALID_INPUT",{stdin:n.stdin});this.#E=n.fs,this.#k=n.exit,this.#$=n.env,this.#C=n.stdin??"",this.#x=n.maxArguments,this.#O=n.strictOptions??!1,this.#d(ge),this.#n=new Map,this.#i=new Map,this.#o=new Map}setCommandSection(e){return this.#r=e,this}getCommandSection(){return this.#r.header||(this.#r.header=`${this.#f}${this.#m?` v${this.#m}`:""}`),this.#r}setDefaultCommand(e){return this.#s=e,this}get defaultCommand(){return this.#s}addCommand(e){be(e,"Command"),pe(e.name);const n=typeof e.execute=="function",i=typeof e.loader=="function";if(n&&i)throw new E(`Command "${e.name}" cannot define both "execute" and "loader" — choose one`,"INVALID_COMMAND",{commandName:e.name});if(!n&&!i)throw new E(`Command "${e.name}" must define either "execute" or "loader"`,"INVALID_COMMAND",{commandName:e.name});e.alias&&(typeof e.alias=="string"?pe(e.alias):st(e.alias,"Command alias").forEach(r=>pe(r))),e.argument&&be(e.argument,"Command argument"),e.options&&be(e.options,"Command options"),e.commandPath&&(st(e.commandPath,"Command commandPath"),e.commandPath.forEach(r=>{pe(r)}));const s=it(e.name,e.commandPath),o=q(s);if(this.#i.has(o))throw new E(`Command with path "${o}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name,commandPath:e.commandPath});const c=Array.isArray(e.commandPath)&&e.commandPath.length>0,a=this.#n.get(e.name),u=a!==void 0&&(a.commandPath===void 0||a.commandPath.length===0);if(!c&&u)throw new E(`Command with name "${e.name}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name});if(e.options)for(const r of e.options)qe(r);if(Do(e),Fo(e),zo(e),e.options&&(e.__conflictingOptions__=e.options.filter(r=>r.conflicts!==void 0),e.__requiredOptions__=e.options.filter(r=>r.required===!0)),c&&a!==void 0)this.#n.set(o,e);else{if(!c&&a!==void 0&&!u){const r=it(a.name,a.commandPath);this.#n.set(q(r),a)}this.#n.set(e.name,e)}if(this.#i.set(o,s),this.#o.set(o,e),this.#P(),e.alias!==void 0){const r=typeof e.alias=="string"?[e.alias]:e.alias;for(const l of r){if(this.#c()===j&&this.#t.debug("adding alias",l),this.#n.has(l))throw new E(`Command alias "${l}" conflicts with existing command`,"DUPLICATE_COMMAND",{alias:l,commandName:e.name});this.#n.set(l,e)}}return this}addGlobalOption(e){const n=e,i=new Set(ce.map(o=>o.name)),s=new Set(ce.map(o=>o.alias).filter(Boolean));if(i.has(n.name))throw new E(`Cannot add global option "--${n.name}": it conflicts with a built-in global option`,"DUPLICATE_OPTION",{optionName:n.name});if(n.alias&&s.has(n.alias))throw new E(`Cannot add global option with alias "-${n.alias}": it conflicts with a built-in global option alias`,"DUPLICATE_OPTION",{alias:n.alias,optionName:n.name});if(new Set(this.#l.map(o=>o.name)).has(n.name))throw new E(`Global option "--${n.name}" has already been added`,"DUPLICATE_OPTION",{optionName:n.name});return n.group="global",qe(n),this.#l.push(n),this}getGlobalOptions(){return this.#M()}addPlugin(e){return this.getPluginManager().register(e),this}getPluginManager(){return this.#h?this.#h:(this.#h=new ji(this.#t),this.#h.register({description:"Attaches the logger to the toolbox",execute:e=>{e.logger=this.#t,e.console=e.logger},name:"logger"}),this.#h)}getCliName(){return this.#f}getPackageVersion(){return this.#m}getPackageName(){return this.#A}getCommands(){return this.#n}getCwd(){return this.#p}dispose(){this.#I?.()}async run(e={}){const{autoDispose:n=!0,shouldExitProcess:i=!0,...s}=e;if(!this.#n.has("help")){const{default:y}=await import("../packem_chunks/help-command.js");this.addCommand(new y(this.#n))}const o=this.#S(),c=this.#i;this.#T();const a=this.#b();let u,r=[...a];this.#c()===j&&(this.#t.debug(`process.execPath: ${Wt()}`),this.#t.debug(`process.execArgv: ${zt().join(" ")}`),this.#t.debug(`process.argv: ${Ae().join(" ")}`));const l=To(c,[...a]);if(l.commandPath)u=l.commandPath,r=l.argv;else{if(a.length>1&&a[0]&&a[1]&&!Ne(a[0])&&!Ne(a[1])){const x=[];let N=0;for(;N<a.length;){const I=a[N];if(!I||Ne(I))break;x.push(I),N+=1}const k=q(x);if(x[0]&&!o.includes(x[0])){const I=this.#a(),O=W(k,I);throw new F(k,O)}}let y;try{y=qi([null,...o],[...a])}catch(x){if(x instanceof Error&&x.name==="INVALID_COMMAND"&&"command"in x){const N=x.command,k=this.#a(),I=W(N,k);throw new F(N,I)}throw x}y.command&&(u=[y.command],r=y.argv)}if(!u)if(this.#s)u=[this.#s];else{const y=this.#a();throw new F("",y)}const d=q(u),p=this.#i.get(d);let f;if(p){if(f=this.#o.get(d),!f||q(p)!==d){const y=this.#a(),x=W(d,y);throw new F(d,x)}}else{const y=u.at(-1);if(f=y?this.#n.get(y):void 0,!f){const x=this.#a(),N=W(d,x);throw new F(d,N)}}if(typeof f.execute!="function"&&typeof f.loader!="function")return this.#t.error(`Command "${f.name}" has no function to execute.`),i?G(1):void 0;const h=r;let g,$;try{({commandArgs:g,toolbox:$}=this.#U(f,h,s,d))}catch(y){if(this.#t.error(y),i)return G(1);throw y}const w=this.getPluginManager();try{!this.#g&&w.hasPlugins()&&(await w.init({cli:this,cwd:this.#p,logger:this.#t}),this.#g=!0),await w.executeLifecycle("execute",$),await w.executeLifecycle("beforeCommand",$);let y;const x=g.global;if(x?.help){const N=this.#n.get("help");if(!N)throw new E("Help command not found","COMMAND_NOT_FOUND");y=await Q(N,$)}else if(x?.version??x?.V){const N=this.#n.get("version");if(!N)throw new E("Version command not found","COMMAND_NOT_FOUND");y=await Q(N,$)}else y=await Q(f,$);return await w.executeLifecycle("afterCommand",$,y),i?G(0):void 0}catch(y){throw await w.executeErrorHandlers(y,$),y}finally{n&&this.dispose()}}async runCommand(e,n={}){const{argv:i=[],...s}=n;ke(e,"Command name");const o=e.split(" ").filter(Boolean),c=q(o),a=this.#i.get(c)?this.#o.get(c):this.#n.get(e);if(!a){const p=this.#a(),f=W(c||e,p);throw new F(e,f)}if(typeof a.execute!="function"&&typeof a.loader!="function")throw new E(`Command "${a.name}" has no function to execute`,"INVALID_COMMAND",{commandName:a.name});const u=[...rt(i,{maxArguments:this.#x})];this.#c()===j&&this.#t.debug(`running command '${e}' programmatically with args: ${u.join(", ")}`);const{commandArgs:r,toolbox:l}=this.#U(a,u,s,c||e),d=this.getPluginManager();try{!this.#g&&d.hasPlugins()&&(await d.init({cli:this,cwd:this.#p,logger:this.#t}),this.#g=!0),await d.executeLifecycle("execute",l),await d.executeLifecycle("beforeCommand",l);let p;const f=r.global;if(f?.help){const h=this.#n.get("help");if(!h)throw new E("Help command not found","COMMAND_NOT_FOUND");p=await Q(h,l)}else if(f?.version??f?.V){const h=this.#n.get("version");if(!h)throw new E("Version command not found","COMMAND_NOT_FOUND");p=await Q(h,l)}else p=await Q(a,l);return await d.executeLifecycle("afterCommand",l,p),p}catch(p){throw await d.executeErrorHandlers(p,l),p}}clone(e){const n={...this.#e,...e},i=new Le(this.#f,n);for(const[s,o]of this.#n)i.#n.set(s,o);for(const[s,o]of this.#i)i.#i.set(s,[...o]);for(const[s,o]of this.#o)i.#o.set(s,o);for(const s of this.#l)i.#l.push(s);return i.#s=this.#s,i.#r={...this.#r},i.#P(),i}async getAction(e){ke(e,"Command name");const n=e.split(" ").filter(Boolean),i=q(n),s=this.#i.get(i)?this.#o.get(i):this.#n.get(e);if(!s){const o=this.#a(),c=W(i||e,o);throw new F(e,c)}if(typeof s.execute=="function")return s.execute;if(typeof s.loader=="function")return St(s);throw new E(`Command "${s.name}" has no execute or loader defined`,"INVALID_COMMAND",{commandName:s.name})}}const $s=(t,e)=>new Le(t,e),xs=(t={})=>({description:"Enhanced error handling and reporting with beautiful code frames",name:"error-handler",onError:(e,n)=>{const{logger:i,runtime:s}=n,{concise:o,detailed:c=!1,exitOnError:a=!0,formatter:u,logErrors:r=!0,renderOptions:l={}}=t;if(r)if(u)i.error(u(e));else if(!c&&o?.(e))i.error(e.message);else if(c){const d=s.getCwd(),p=Bn(e,{cwd:d,hideErrorCodeView:!1,hideErrorTitle:!1,hideMessage:!1,linesAbove:2,linesBelow:3,...l});i.error(p)}else i.error(e);a&&G(1)},version:"1.0.0"}),bs=async t=>{try{await t.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}},Ns={argument:{description:"Package to execute (optionally with @version)",name:"package",type:String},description:"Execute a remote package without permanent installation",examples:[["vis dlx create-vite my-app","Scaffold a new project"],["vis dlx typescript@5.5.4 tsc --version","Run specific version"],["vis dlx -p cowsay -p lolcatjs -c 'echo hi | cowsay | lolcatjs'","Multiple packages with shell"],["vis install && vis dlx --offline typescript tsc --version","Hardened: pre-install + offline (no registry fetch on dlx)"],["vis dlx --info create-vite","Always show the first-run panel (size, score, permissions, changelog)"],["vis dlx --yes create-vite my-app","Skip the first-run panel and confirmation"]],group:"Run & Execute",loader:()=>import("../packem_chunks/handler66.js"),name:"dlx",options:[{alias:"p",description:"Additional packages to install (repeatable)",multiple:!0,name:"package",type:String},{alias:"c",defaultValue:!1,description:"Execute within shell environment",name:"shell-mode",type:Boolean},{alias:"s",defaultValue:!1,description:"Suppress output except command results",name:"silent",type:Boolean},{defaultValue:!1,description:"Resolve from local store only — fail rather than fetch from the registry. Pair with `vis install` for hardened npx-style workflows.",name:"offline",type:Boolean},{alias:"y",defaultValue:!1,description:"Skip the first-run info panel and confirmation prompt (also via VIS_DLX_YES — note this auto-approves every package)",name:"yes",type:Boolean},{defaultValue:!1,description:"Always show the first-run info panel (size, security score, permissions, changelog), even for an approved package",name:"info",type:Boolean},{defaultValue:!1,description:"Disable the first-run info panel entirely (also via VIS_DLX_NO_INFO)",name:"no-info",type:Boolean}]};class cs extends Error{isVisUserError=!0;constructor(e,n){super(e,n),this.name="VisUserError"}}const As=t=>t instanceof cs||t instanceof Error&&t.isVisUserError===!0;export{z as L,$s as V,cs as a,ys as b,gs as c,fs as d,Ns as e,ms as f,E as g,As as i,vs as l,ds as n,ws as o,xs as p,bs as r,hs as s};
@@ -0,0 +1 @@
1
+ import{createRequire as b}from"node:module";import{B as v,H as j,y as W}from"./index-DND6ptxQ.js";import{p as h}from"../packem_chunks/cli-main.js";let $;const y=o=>($??=b(import.meta.url))(o),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p=o=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[c,r]=m.versions.node.split(".").map(Number);if(c>22||c===22&&r>=3||c===20&&r>=16)return m.getBuiltinModule(o)}return y(o)},{watch:T}=p("node:fs"),{execFileSync:S}=p("node:child_process"),{createRequire:k}=p("node:module"),g=k(import.meta.url);let w;const q=()=>{if(w!==void 0)return w;try{g.resolve("fb-watchman")}catch{return w=!1,!1}try{S("watchman",["--version"],{stdio:"ignore",timeout:2e3})}catch{return w=!1,!1}return w=!0,!0},R=(o,c)=>{if(!q())return;let r;try{r=g("fb-watchman")}catch(s){h.warn(`[vis watch] fb-watchman failed to load, using native watcher: ${s.message}`);return}const a=new r.Client;a.on("error",s=>{h.warn(`[vis watch] watchman error: ${s.message}`)}),a.on("subscription",s=>{const t=s;if(!t.is_fresh_instance)for(const e of t.files??[])c(e)});for(const[s,t]of o.entries()){const e=v(t),i=`vis-watch-${s}-${process.pid}`;a.command(["watch-project",e],(l,f)=>{if(l){h.warn(`[vis watch] watchman could not watch ${t}: ${l.message}`);return}const u={expression:["allof",["type","f"]],fields:["name"]};f.relative_path&&(u.relative_root=f.relative_path),a.command(["subscribe",f.watch,i,u],n=>{n&&h.warn(`[vis watch] watchman subscribe failed for ${t}: ${n.message}`)})})}return{close:()=>{try{a.end()}catch{}}}},x=[/node_modules(?:\/|$)/,/\.git(?:\/|$)/,/\.vis(?:\/|$)/],P=(o,c)=>{const r=new Set,a=new Set;for(const[,e]of o){const i=e.task.hashDetails?.nodes;if(i)for(const l of Object.keys(i))r.add(l),a.add(j(v(c,l)))}const s=[...a].sort(),t=[];for(const e of s)t.some(i=>e===i||e.startsWith(`${i}/`))||t.push(e);return{directories:t,files:r}},D=(o,c,r)=>{const a=new Set;for(const s of o){const t=v(c,s);for(const e of r)if(t===e||t.startsWith(`${e}/`)){const i=W(e,t);i.length>0&&a.add(i)}}return s=>{const t=s.replaceAll("\\","/");return a.has(t)}},A=o=>{const c=o.replaceAll("\\","/");return x.some(r=>r.test(c))},H=o=>{const{debounceMs:c=150,filter:r,onChange:a,paths:s}=o;let t=new Set,e;const i=()=>{e=void 0;const n=[...t];t=new Set,n.length!==0&&Promise.resolve(a(n)).catch(d=>{h.error("[vis watch] onChange handler failed:",d)})},l=n=>{A(n)||r&&!r(n)||(t.add(n),e&&clearTimeout(e),e=setTimeout(i,c))},f=R(s,l);if(f)return{close:()=>{e&&clearTimeout(e),f.close()}};const u=[];for(const n of s)try{const d=T(n,{recursive:!0},(B,_)=>{_&&l(_)});u.push(d)}catch(d){h.warn(`[vis watch] unable to watch ${n}: ${d.message}`)}return{close:()=>{e&&clearTimeout(e);for(const n of u)try{n.close()}catch{}}}};export{D as a,P as c,H as s};
@@ -0,0 +1,11 @@
1
+ import{createRequire as K}from"node:module";import{m as g,l as C,z as U,A as S,B as Q,d as X,H as Y}from"./index-DND6ptxQ.js";import{i as w}from"../packem_chunks/catalog.js";import{a as te}from"./readJsonSync-BnWiH5-R-BpnwAB0Z.js";import{s as ue}from"./watch-CGrUW_JD.js";let H;const G=e=>(H??=K(import.meta.url))(e),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=e=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[t,s]=x.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return x.getBuiltinModule(e)}return G(e)},{createHash:m}=v("node:crypto"),{fileURLToPath:Z,pathToFileURL:ee}=v("node:url"),{spawnSync:se,spawn:ne}=v("node:child_process"),{openSync:re,writeSync:oe,closeSync:ie,statSync:ae,readFileSync:N,mkdirSync:ce,writeFileSync:le}=v("node:fs"),{availableParallelism:b}=v("node:os"),W=(e,t)=>{for(const s of["dependencies","devDependencies","optionalDependencies","peerDependencies"]){const n=e[s];if(n&&typeof n[t]=="string")return n[t]}},k=(e,t)=>{for(const s of t){const n=g(e,s);if(C(n))return n}},de=e=>{const t=g(e,"package.json");if(!C(t))return{};try{return te(t)}catch{return{}}},st=(e,t)=>{const s=de(e),n=new Map;for(const o of t){const r=o.detect(e,s);r&&n.set(o.id,r)}return n},fe={error:"error",info:"info",information:"info",warning:"warning"},nt={argsCheck:(e,t)=>j(e,t,!1),argsFix:(e,t)=>j(e,t,!0),bin:()=>["pnpm","exec","biome"],cacheKey:(e,t)=>{const s=["biome",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:(e,t)=>{const s=W(t,w.biome.packageNames[0]),n=k(e,w.biome.configFiles);if(!(!s&&!n))return{adapter:"biome",configFile:n,declared:!!s,declaredVersion:s,root:e}},extensions:["astro","cjs","css","cts","js","json","jsonc","jsx","mjs","mts","svelte","ts","tsx","vue"],id:"biome",kind:"both",parse:(e,t)=>{if(!e.stdout.trim())return[];let s;try{s=JSON.parse(e.stdout)}catch{return[{adapter:"biome",file:t.root,fixable:!1,message:`biome output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of s.diagnostics??[]){const r=o.location?.start,i=o.location?.end,a=pe(t.root,o.location?.path),c=o.category??"",l=c==="format"||c.startsWith("format/");n.push({adapter:"biome",column:r?.column&&r.column>0?r.column:void 0,endColumn:i?.column&&i.column>0?i.column:void 0,endLine:i?.line&&i.line>0?i.line:void 0,file:a,fixable:!0,line:r?.line&&r.line>0?r.line:void 0,message:l?"Code style issues would be auto-fixed":o.message??"",ruleId:c||void 0,severity:fe[o.severity??""]??"warning"})}return n}},j=(e,t,s)=>{const n=["check","--reporter=json"];return s&&n.push("--write"),typeof t.maxWarnings=="number"&&n.push(`--max-diagnostics=${String(t.maxWarnings)}`),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},pe=(e,t)=>{const s=typeof t=="string"?t:t?.file;return s?s.startsWith("/")||/^[a-z]:[\\/]/i.test(s)?s:g(e,s):e},B=e=>t=>{const s=k(t,w.deno.configFiles);if(s)return{adapter:e,configFile:s,declared:!1,root:t}},D=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),rt={argsCheck:(e,t)=>F(e,t,!1),argsFix:(e,t)=>F(e,t,!0),bin:()=>["deno","lint"],cacheKey:(e,t)=>{const s=["deno-lint",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:B("deno-lint"),extensions:["js","jsx","mjs","mts","ts","tsx"],id:"deno-lint",kind:"lint",parse:(e,t)=>{if(!e.stdout.trim())return[];let s;try{s=JSON.parse(e.stdout)}catch{return[{adapter:"deno-lint",file:t.root,fixable:!1,message:`deno lint output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of s.diagnostics??[]){const r=o.range?.start,i=o.range?.end;n.push({adapter:"deno-lint",column:r?.col===void 0?void 0:r.col+1,endColumn:i?.col===void 0?void 0:i.col+1,endLine:i?.line===void 0?void 0:i.line+1,file:ge(o.filename??t.root,t.root),fixable:!1,line:r?.line===void 0?void 0:r.line+1,message:o.message??"",ruleId:o.code,severity:"warning"})}return n}},ot={argsCheck:(e,t)=>I(e,t,!1),argsFix:(e,t)=>I(e,t,!0),bin:()=>["deno","fmt"],cacheKey:(e,t)=>{const s=["deno-fmt",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:B("deno-fmt"),extensions:["astro","cjs","css","cts","html","ipynb","js","json","jsonc","jsx","less","md","mjs","mts","sass","scss","sql","svelte","ts","tsx","vue","yaml","yml"],id:"deno-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const s=[],n=new Set;for(const o of e.stdout.split(/\r?\n/)){const r=/^from (.+):$/.exec(o);if(!r)continue;const i=r[1];n.has(i)||(n.add(i),s.push({adapter:"deno-fmt",file:D(i)?i:`${t.root}/${i}`,fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return s}},F=(e,t,s)=>{const n=["--json"];return s&&n.push("--fix"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},I=(e,t,s)=>{const n=[];return s||n.push("--check"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},ge=(e,t)=>e.startsWith("file://")?Z(e):D(e)?e:`${t}/${e}`,J="pyproject.toml",he=/^\[tool\.ruff(?:\.[\w-]+)*\]\s*$/m,me=/^Would reformat:?\s+(.+)$/,ye=e=>{const t=g(e,J);if(!C(t))return!1;try{const s=U(t);return he.test(s)}catch{return!1}},z=e=>(t,s)=>{const n=w.ruff.packageNames.map(a=>W(s,a)).find(a=>a!==void 0),o=k(t,w.ruff.configFiles),r=o?void 0:ye(t)?g(t,J):void 0,i=o??r;if(!(!n&&!i))return{adapter:e,configFile:i,declared:!!n,declaredVersion:n,root:t}},xe=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),E=(e,t)=>e?xe(e)?e:g(t,e):t,$e=e=>me.exec(e)?.[1]?.trim(),it={argsCheck:(e,t)=>R(e,t,!1),argsFix:(e,t)=>R(e,t,!0),bin:()=>["ruff","check"],cacheKey:(e,t)=>{const s=["ruff-check",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:z("ruff-check"),extensions:["py","pyi"],id:"ruff-check",kind:"lint",parse:(e,t)=>{if(!e.stdout.trim())return[];let s;try{s=JSON.parse(e.stdout)}catch{return[{adapter:"ruff-check",file:t.root,fixable:!1,message:`ruff check output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of s){const r=o.location,i=o.end_location;n.push({adapter:"ruff-check",column:r?.column,endColumn:i?.column,endLine:i?.row,file:E(o.filename,t.root),fixable:!!o.fix,line:r?.row,message:o.message??"",ruleId:o.code,severity:"warning"})}return n}},at={argsCheck:(e,t)=>L(e,t,!1),argsFix:(e,t)=>L(e,t,!0),bin:()=>["ruff","format"],cacheKey:(e,t)=>{const s=["ruff-fmt",e.declaredVersion??"unknown",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return m("sha256").update(s.join("|")).digest("hex").slice(0,16)},detect:z("ruff-fmt"),extensions:["py","pyi"],id:"ruff-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const s=[],n=new Set;for(const o of e.stdout.split(/\r?\n/)){const r=$e(o);!r||n.has(r)||(n.add(r),s.push({adapter:"ruff-fmt",file:E(r,t.root),fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return s}},R=(e,t,s)=>{const n=["--output-format=json"];return s&&n.push("--fix"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},L=(e,t,s)=>{const n=[];return s||n.push("--check"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},ct=(e,t)=>{const s=$(e,["diff","--name-only","--diff-filter=ACMR","-z",`${t}...HEAD`]);if(s===void 0)return;const n=$(e,["diff","--name-only","--diff-filter=ACMR","-z"]),o=$(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]),r=$(e,["ls-files","--others","--exclude-standard","-z"]),i=new Set;for(const a of[s,n??"",o??"",r??""])for(const c of a.split("\0"))c.length!==0&&i.add(S(c)?c:g(e,c));return[...i].sort()},lt=e=>{const t=$(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]);if(t===void 0)return;const s=new Set;for(const n of t.split("\0"))n.length!==0&&s.add(S(n)?n:g(e,n));return[...s].sort()},$=(e,t)=>{const s=se("git",[...t],{cwd:e,encoding:"utf8",timeout:1e4});if(s.status===0)return s.stdout},ut=(e,t)=>{const s=new Set(t.map(r=>r.toLowerCase())),n=[],o=new Set;for(const r of e){const i=r.lastIndexOf(".");if(i===-1||i===r.length-1)continue;const a=r.slice(i+1).toLowerCase();s.has(a)&&(o.has(r)||(o.add(r),n.push(r)))}return n},we=new Set(["-","stdout"]),M=e=>({close:()=>{},write:t=>{e.write(t)}}),ve=e=>{X(Y(e));const t=re(e,"w");let s=[];return{close:()=>{s.length>0&&(oe(t,s.join("")),s=[]),ie(t)},write:n=>{s.push(n)}}},dt=e=>{const{cwd:t,target:s}=e;if(s===void 0||we.has(s))return M(process.stdout);if(s==="stderr")return M(process.stderr);const n=S(s)?s:Q(t,s);return ve(n)},q=["oxlint","oxfmt","biome","eslint","dprint","prettier","stylelint","ruff-check","ruff-fmt","markdownlint","shellcheck","deno-lint","deno-fmt"],ft=(e,t)=>{const s=new Map(e.map(i=>[i.id,i])),n=[],o=new Set,r=t&&t.length>0?t:q;for(const i of r){const a=s.get(i);a&&!o.has(i)&&(n.push(a),o.add(i))}if(t&&t.length>0)for(const i of q){const a=s.get(i);a&&!o.has(i)&&(n.push(a),o.add(i))}for(const i of e)o.has(i.id)||(n.push(i),o.add(i.id));return n},pt=(e,t,s)=>{const n=[];for(const o of t){const r=e.get(o.id);r&&Se(o.kind,s)&&n.push({adapter:o,presence:r})}return n},Se=(e,t)=>e===t||e==="both",gt=(e,t,s={})=>{const n=new Map;for(const o of e){const r=Ae(o),i=Ce(r,t,s);if(!i)continue;const a=n.get(i);a?a.push(o):n.set(i,[o])}return n},Ae=e=>{const t=e.lastIndexOf(".");return t===-1||t===e.length-1?"":e.slice(t+1).toLowerCase()},Ce=(e,t,s)=>{const n=s[e];if(n&&t.some(o=>o.adapter.id===n))return n;for(const{adapter:o}of t)if(o.extensions.includes(e))return o.id},ke=e=>e==="error"?"error":e==="warning"?"warning":"notice",P=e=>e.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
2
+ `,"%0A"),_=e=>P(e).replaceAll(",","%2C").replaceAll(":","%3A").replaceAll("=","%3D"),be=(e,t)=>t&&e.startsWith(`${t}/`)?e.slice(t.length+1):e,je=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),Fe=(e,t)=>{const s=ke(e.severity),n=be(e.file,t),o=e.ruleId?`${e.adapter}(${e.ruleId})`:e.adapter,r=[`file=${_(n)}`];return e.line!==void 0&&r.push(`line=${String(e.line)}`),e.endLine!==void 0&&r.push(`endLine=${String(e.endLine)}`),e.column!==void 0&&r.push(`col=${String(e.column)}`),e.endColumn!==void 0&&r.push(`endColumn=${String(e.endColumn)}`),r.push(`title=${_(o)}`),`::${s} ${r.join(",")}::${P(e.message)}
3
+ `},ht=e=>e.runs.flatMap(t=>[...t.findings]).sort(je).map(t=>Fe(t,e.workspaceRoot)).join(""),y=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;"),Ie=e=>`<![CDATA[${e.replaceAll("]]>","]]]]><![CDATA[>")}]]>`,Re=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),Le=e=>e==="error"?"error":e==="warning"?"warning":"info",Me=(e,t)=>{let{file:s}=e;return t&&e.file.startsWith(`${t}/`)&&(s=e.file.slice(t.length+1)),e.line===void 0?s:e.column===void 0?`${s}:${String(e.line)}`:`${s}:${String(e.line)}:${String(e.column)}`},qe=(e,t,s)=>{const n=Me(e,s),o=Le(e.severity),r=e.ruleId?`[${e.ruleId}] ${e.message}`:e.message;return[` <testcase classname="${y(t)}" name="${y(n)}">`,` <failure type="${y(o)}" message="${y(r)}">${Ie(e.message)}</failure>`," </testcase>",""].join(`
4
+ `)},_e=(e,t,s)=>{const n=[...e.findings].sort(Re),o=n.filter(l=>l.severity==="error").length,r=n.filter(l=>l.severity==="warning").length,i=n.length,a=(e.durationMs/1e3).toFixed(3),c=n.map(l=>qe(l,e.adapter,s)).join("");return` <testsuite ${[`name="${y(e.adapter)}"`,`tests="${String(i)}"`,`failures="${String(o)}"`,'errors="0"',`skipped="${String(r)}"`,`time="${a}"`,`timestamp="${t}"`].join(" ")}>
5
+ ${c} </testsuite>
6
+ `},mt=e=>{const t=(e.now??new Date).toISOString(),s=e.suiteName??"vis-lint-fmt",n=e.runs.map(c=>_e(c,t,e.workspaceRoot)).join(""),o=e.runs.reduce((c,l)=>c+l.findings.length,0),r=e.runs.reduce((c,l)=>c+l.findings.filter(p=>p.severity==="error").length,0),i=e.runs.reduce((c,l)=>c+l.findings.filter(p=>p.severity==="warning").length,0),a=(e.runs.reduce((c,l)=>c+l.durationMs,0)/1e3).toFixed(3);return`<?xml version="1.0" encoding="UTF-8"?>
7
+ <testsuites ${[`name="${y(s)}"`,`tests="${String(o)}"`,`failures="${String(r)}"`,'errors="0"',`skipped="${String(i)}"`,`time="${a}"`].join(" ")}>
8
+ ${n}</testsuites>
9
+ `},Te="2.1.0",Oe="https://json.schemastore.org/sarif-2.1.0.json",Ne=e=>e==="error"?"error":e==="warning"?"warning":"note",We=(e,t)=>t&&e.startsWith(`${t}/`)?{uri:e.slice(t.length+1),uriBaseId:"SRCROOT"}:{uri:e},Be=e=>{const{href:t}=ee(e);return t.endsWith("/")?t:`${t}/`},De=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),Je=e=>{const t=new Map;for(const s of e)s.ruleId&&(t.has(s.ruleId)||t.set(s.ruleId,{id:s.ruleId,name:s.ruleId}));return[...t.values()]},ze=(e,t)=>{const{uri:s,uriBaseId:n}=We(e.file,t),o={artifactLocation:n?{uri:s,uriBaseId:n}:{uri:s}};if(e.line!==void 0){const i={startLine:e.line};e.column!==void 0&&(i.startColumn=e.column),e.endLine!==void 0&&(i.endLine=e.endLine),e.endColumn!==void 0&&(i.endColumn=e.endColumn),o.region=i}const r={level:Ne(e.severity),locations:[{physicalLocation:o}],message:{text:e.message}};return e.ruleId&&(r.ruleId=e.ruleId),r},Ee=(e,t)=>{const s=[...e.findings].sort(De),n=Je(s),o={name:e.adapter,rules:n};e.presence?.declaredVersion&&(o.version=e.presence.declaredVersion);const r={results:s.map(i=>ze(i,t)),tool:{driver:o}};return t&&(r.originalUriBaseIds={SRCROOT:{uri:Be(t)}}),r},yt=e=>{const t={$schema:Oe,runs:e.runs.map(s=>Ee(s,e.workspaceRoot)),version:Te};return`${JSON.stringify(t,void 0,2)}
10
+ `},T={error:3,info:1,warning:2},xt=e=>{const t=[],s=[];let n,o=!1;for(const r of e){s.push({adapter:r.adapter,durationMs:r.durationMs,exitCode:r.exitCode,findingCount:r.findings.length}),r.exitCode!==0&&r.exitCode!==null&&r.findings.length===0&&(o=!0);for(const i of r.findings)t.push(i),(!n||T[i.severity]>T[n])&&(n=i.severity)}return{findings:t,hadProcessFailure:o,maxSeverity:n,runs:s}},$t=e=>{const t=new Map;for(const s of e){const n=t.get(s.file);n?n.push(s):t.set(s.file,[s])}return t},wt=e=>e.hadProcessFailure||e.maxSeverity==="error"?1:0,Pe=(e,t)=>{if(t==="fix"||process.env.VIS_NO_CACHE==="1"||e.length===0)return!1;for(const s of e)if(s==="."||s==="./"||s==="..")return!1;return!0},Ve=e=>{try{const t=N(e);return m("sha256").update(t).digest("hex")}catch{return}},Ke=(e,t,s,n,o)=>{const r=e.cacheKey(t,n),i=[];for(const c of[...s].sort()){const l=S(c)?c:g(t.root,c);try{ae(l)}catch{return}const p=Ve(l);if(!p)return;i.push({hash:p,path:l})}const a=m("sha256");a.update(e.id),a.update("\0"),a.update(r),a.update("\0"),a.update(o);for(const c of i)a.update("\0"),a.update(c.path),a.update("\0"),a.update(c.hash);return{fileHashes:i,key:a.digest("hex")}},V=(e,t)=>g(e,"lint-fmt",t),He=(e,t,s)=>{const n=g(V(e,t.id),`${s}.json`);try{const o=N(n,"utf8"),r=JSON.parse(o);return r.schema!==1?void 0:r}catch{return}},Ge=(e,t,s,n,o)=>{const r=V(e,t.id),i={fileHashes:o,result:n,savedAt:Date.now(),schema:1};try{ce(r,{recursive:!0}),le(g(r,`${s}.json`),JSON.stringify(i))}catch{}},O=async(e,t,s,n,o)=>{const r=e.bin(t),i=[...r.slice(1),...o==="fix"?e.argsFix(s,n):e.argsCheck(s,n)];return new Promise(a=>{const c=Date.now(),l=ne(r[0],i,{cwd:t.root}),p=[],u=[];let h=!1;const f=setTimeout(()=>{h=!0,l.kill("SIGKILL")},6e4);l.stdout.on("data",d=>p.push(d)),l.stderr.on("data",d=>u.push(d)),l.on("error",d=>{clearTimeout(f),a({durationMs:Date.now()-c,exitCode:null,stderr:d.message,stdout:""})}),l.on("close",d=>{clearTimeout(f),a({durationMs:Date.now()-c,exitCode:h?null:d,stderr:Buffer.concat(u).toString("utf8"),stdout:Buffer.concat(p).toString("utf8")})})})},vt=async(e,t,s,n=b())=>{if(e.length===0)return[];const{cacheRoot:o,concurrency:r}=typeof n=="number"?{concurrency:n}:{cacheRoot:n.cacheRoot,concurrency:n.concurrency??b()},i=async u=>{const h=u.options??t;if(o&&Pe(u.files,s)){const f=Ke(u.adapter,u.presence,u.files,h,s);if(f){const d=He(o,u.adapter,f.key);if(d)return d.result;const A=await O(u.adapter,u.presence,u.files,h,s);return A.exitCode!==null&&Ge(o,u.adapter,f.key,A,f.fileHashes),A}}return O(u.adapter,u.presence,u.files,h,s)};if(process.env.VIS_LINT_FMT_SERIAL==="1"){const u=[];for(const h of e)u.push(await i(h));return u}const a=Math.max(1,Math.min(r,e.length)),c=Array.from({length:e.length});let l=0;const p=async()=>{for(;;){const u=l;if(l+=1,u>=e.length)return;c[u]=await i(e[u])}};return await Promise.all(Array.from({length:a},()=>p())),c},Ue=e=>{const t=new Set;for(const s of e)t.add(s.toLowerCase());return t},Qe=(e,t)=>{const s=e.lastIndexOf(".");return s===-1||s===e.length-1?!1:t.has(e.slice(s+1).toLowerCase())},St=async e=>{const{extensions:t,initialFiles:s,label:n,log:o,runCycle:r,workspaceRoot:i}=e,a=o??(f=>{process.stdout.write(`${f}
11
+ `)}),c=Ue(t);await r(s),a(`▸ ${n}: watching workspace — press Ctrl-C to exit`);let l=new Set,p=!1;const u=async()=>{for(;l.size>0;){const f=[...l];l=new Set;try{await r(f)}catch(d){a(`✗ ${n}: watch cycle failed — ${d.message}`)}}},h=ue({debounceMs:200,filter:f=>Qe(f,c),onChange:async f=>{for(const d of f)l.add(S(d)?d:g(i,d));if(!p){p=!0;try{await u()}finally{p=!1}}},paths:[i]});await new Promise(f=>{const d=()=>{h.close(),process.off("SIGINT",d),process.off("SIGTERM",d),f()};process.once("SIGINT",d),process.once("SIGTERM",d)})};export{st as a,pt as b,ct as c,W as d,St as e,k as f,gt as g,vt as h,xt as i,dt as j,yt as k,mt as l,ht as m,nt as n,at as o,ot as p,$t as q,ft as r,lt as s,wt as t,ut as u,it as v,rt as w};
@@ -1,5 +1,5 @@
1
- import { C as CommandRunner, P as PackageManagerAdapter } from "../../../packem_shared/interface.d-B7VK2rcH.js";
2
- export type { I as InstallLockfileOnlyOptions, a as PackOptions, b as PackResult, c as PublishNativeOptions, d as PublishOptions, e as PublishResult, W as WorkspaceListEntry } from "../../../packem_shared/interface.d-B7VK2rcH.js";
1
+ import { C as CommandRunner, P as PackageManagerAdapter } from "../../../packem_shared/interface.d-CRqRz4jt.js";
2
+ export type { I as InstallLockfileOnlyOptions, a as PackOptions, b as PackResult, c as PublishNativeOptions, d as PublishOptions, e as PublishResult, W as WorkspaceListEntry } from "../../../packem_shared/interface.d-CRqRz4jt.js";
3
3
  type PackageManagerId = "npm" | "pnpm" | "yarn" | "bun";
4
4
  declare const detectPackageManager: (cwd: string, _runner: CommandRunner) => Promise<PackageManagerId>;
5
5
  declare const createAdapter: (id: PackageManagerId, runner: CommandRunner) => PackageManagerAdapter;
@@ -1,14 +1,14 @@
1
- import { V as VersionActions } from "../../../packem_shared/interface.d-Cezzifoh.js";
2
- export { A as AfterAllProjectsVersioned, type a as AfterAllVersionedContext, type b as AfterAllVersionedResult, type P as PublishContext } from "../../../packem_shared/interface.d-Cezzifoh.js";
1
+ import { V as VersionActions } from "../../../packem_shared/interface.d-CrHOtJc1.js";
2
+ export { A as AfterAllProjectsVersioned, type a as AfterAllVersionedContext, type b as AfterAllVersionedResult, type P as PublishContext } from "../../../packem_shared/interface.d-CrHOtJc1.js";
3
3
  import "../../types.js";
4
- import "../../../packem_shared/interface.d-B7VK2rcH.js";
4
+ import "../../../packem_shared/interface.d-CRqRz4jt.js";
5
5
  /**
6
- * Construct the {@link VersionActions} implementation for a resolved id.
7
- *
8
- * Unknown ids fall back to npm — the historical default and the only safe
9
- * choice for a JS workspace package without explicit configuration.
10
- * @param id versionActions id (e.g. `npm`, `cargo`, `jsr`, `container`).
11
- * @returns a fresh {@link VersionActions} instance.
12
- */
6
+ * Construct the {@link VersionActions} implementation for a resolved id.
7
+ *
8
+ * Unknown ids fall back to npm — the historical default and the only safe
9
+ * choice for a JS workspace package without explicit configuration.
10
+ * @param id versionActions id (e.g. `npm`, `cargo`, `jsr`, `container`).
11
+ * @returns a fresh {@link VersionActions} instance.
12
+ */
13
13
  declare const createVersionActions: (id: string) => VersionActions;
14
14
  export { VersionActions, createVersionActions };
@@ -16,12 +16,12 @@ interface ReleaseOptionsBase {
16
16
  /** Skip writes / network calls. */
17
17
  dryRun?: boolean;
18
18
  /**
19
- * Greenfield bootstrap. Forces `currentVersionResolver: "disk"` and
20
- * skips remote tag-collision checks so the very first release on a
21
- * fresh repo (no prior git tag, no published version) can proceed
22
- * without errors. Maps to `nx release --first-release` and
23
- * release-please's `bootstrap-sha`.
24
- */
19
+ * Greenfield bootstrap. Forces `currentVersionResolver: "disk"` and
20
+ * skips remote tag-collision checks so the very first release on a
21
+ * fresh repo (no prior git tag, no published version) can proceed
22
+ * without errors. Maps to `nx release --first-release` and
23
+ * release-please's `bootstrap-sha`.
24
+ */
25
25
  firstRelease?: boolean;
26
26
  /** Limit to packages matching these globs. */
27
27
  projects?: string[];
@@ -105,37 +105,37 @@ interface SnapshotResult {
105
105
  }
106
106
  declare const releaseVersion: (options?: VersionOptions) => Promise<VersionResult>;
107
107
  /**
108
- * Standalone changelog rendering — produces the per-package CHANGELOG.md
109
- * entries WITHOUT writing them to disk. Useful for previewing the
110
- * changelog output, or for downstream tooling (e.g. release-notes for
111
- * GH Releases) that needs the rendered content separately from the
112
- * version-apply pass.
113
- *
114
- * The default `releaseVersion` path also writes changelog entries
115
- * automatically (formatter is invoked inside `applyReleasePlan`); this
116
- * function is for read-only access to the same rendered output.
117
- */
108
+ * Standalone changelog rendering — produces the per-package CHANGELOG.md
109
+ * entries WITHOUT writing them to disk. Useful for previewing the
110
+ * changelog output, or for downstream tooling (e.g. release-notes for
111
+ * GH Releases) that needs the rendered content separately from the
112
+ * version-apply pass.
113
+ *
114
+ * The default `releaseVersion` path also writes changelog entries
115
+ * automatically (formatter is invoked inside `applyReleasePlan`); this
116
+ * function is for read-only access to the same rendered output.
117
+ */
118
118
  declare const releaseChangelog: (options?: ChangelogOptions) => Promise<ChangelogResult>;
119
119
  declare const releasePublish: (options?: PublishOptions) => Promise<PublishResult>;
120
120
  /**
121
- * A computed-but-not-yet-applied release. Holds the resolved {@link ReleasePlan}
122
- * so callers can inspect what *would* happen, then either {@link ReleaseDraft.apply}
123
- * it (write versions + changelogs, consume change files) or {@link ReleaseDraft.discard}
124
- * it.
125
- *
126
- * Implements `Symbol.asyncDispose`, so the idiomatic form is:
127
- *
128
- * ```ts
129
- * await using draft = await releaseDraft({ cwd });
130
- * console.log(draft.plan.releases);
131
- * // draft.apply() runs automatically when the block exits — unless you
132
- * // called draft.discard() first.
133
- * ```
134
- *
135
- * Disposal fires on *any* scope exit, including thrown errors. If you need
136
- * apply-only-on-success semantics, call {@link ReleaseDraft.apply} explicitly
137
- * and `discard()` on the error path instead of relying on disposal.
138
- */
121
+ * A computed-but-not-yet-applied release. Holds the resolved {@link ReleasePlan}
122
+ * so callers can inspect what *would* happen, then either {@link ReleaseDraft.apply}
123
+ * it (write versions + changelogs, consume change files) or {@link ReleaseDraft.discard}
124
+ * it.
125
+ *
126
+ * Implements `Symbol.asyncDispose`, so the idiomatic form is:
127
+ *
128
+ * ```ts
129
+ * await using draft = await releaseDraft({ cwd });
130
+ * console.log(draft.plan.releases);
131
+ * // draft.apply() runs automatically when the block exits — unless you
132
+ * // called draft.discard() first.
133
+ * ```
134
+ *
135
+ * Disposal fires on *any* scope exit, including thrown errors. If you need
136
+ * apply-only-on-success semantics, call {@link ReleaseDraft.apply} explicitly
137
+ * and `discard()` on the error path instead of relying on disposal.
138
+ */
139
139
  interface ReleaseDraft {
140
140
  /** Auto-apply on `await using` scope exit unless already applied or discarded. */
141
141
  [Symbol.asyncDispose]: () => Promise<void>;
@@ -163,43 +163,43 @@ declare class ReleaseClient {
163
163
  releaseSnapshot(options: Omit<SnapshotOptions, "config">): Promise<SnapshotResult>;
164
164
  }
165
165
  /**
166
- * Identity function for type-narrowing a `VisReleaseConfig` defined in
167
- * a separate file (e.g. `release.config.ts`). Use vis's top-level
168
- * `defineConfig` from `@visulima/vis/config` when defining the whole
169
- * `vis.config.ts` instead.
170
- */
166
+ * Identity function for type-narrowing a `VisReleaseConfig` defined in
167
+ * a separate file (e.g. `release.config.ts`). Use vis's top-level
168
+ * `defineConfig` from `@visulima/vis/config` when defining the whole
169
+ * `vis.config.ts` instead.
170
+ */
171
171
  declare const defineReleaseConfig: (config: VisReleaseConfig) => VisReleaseConfig;
172
172
  /**
173
- * Built-in defaults. Used by the loader when a key is not set by the user
174
- * and must be in the resolved config.
175
- */
173
+ * Built-in defaults. Used by the loader when a key is not set by the user
174
+ * and must be in the resolved config.
175
+ */
176
176
  declare const DEFAULT_CONFIG: Required<Pick<VisReleaseConfig, "baseBranch" | "changesDir" | "access" | "changelog" | "changedFilePatterns" | "updateInternalDependencies" | "fixed" | "linked" | "ignore" | "include" | "privatePackages" | "aggregateRelease" | "defaultManaged" | "allowCustomCommands" | "preVersionCommand" | "postVersionCommand" | "prePublishCommand" | "postPublishCommand">>;
177
177
  declare const DEFAULT_DEPENDENCY_BUMP_RULES: Required<DependencyBumpRules>;
178
178
  /**
179
- * Default fields stripped from `package.json` on publish (RFC §20.4).
180
- * Match `@anolilab/semantic-release-clean-package-json` behaviour.
181
- */
179
+ * Default fields stripped from `package.json` on publish (RFC §20.4).
180
+ * Match `@anolilab/semantic-release-clean-package-json` behaviour.
181
+ */
182
182
  declare const DEFAULT_CLEAN_STRIP: ReadonlyArray<string>;
183
183
  /**
184
- * Default fields preserved on publish — informational, used only by `--dry-run` rendering.
185
- * The actual publish step strips by deny-list (`DEFAULT_CLEAN_STRIP`), not by allow-list.
186
- */
184
+ * Default fields preserved on publish — informational, used only by `--dry-run` rendering.
185
+ * The actual publish step strips by deny-list (`DEFAULT_CLEAN_STRIP`), not by allow-list.
186
+ */
187
187
  declare const DEFAULT_CLEAN_KEEP: ReadonlyArray<string>;
188
188
  /**
189
- * Resolve user-supplied `cleanPackageJson` to a concrete strip list.
190
- * `false` → empty (don't strip anything).
191
- * `true` / undefined → defaults.
192
- * Object form → defaults + extra strip, minus anything in `keep`.
193
- */
189
+ * Resolve user-supplied `cleanPackageJson` to a concrete strip list.
190
+ * `false` → empty (don't strip anything).
191
+ * `true` / undefined → defaults.
192
+ * Object form → defaults + extra strip, minus anything in `keep`.
193
+ */
194
194
  declare const resolveCleanStripList: (cfg: boolean | CleanPackageJsonConfig | undefined) => string[];
195
195
  /**
196
- * Typed errors for the release subsystem (RFC §19.4).
197
- *
198
- * Modeled on nx's `CreateNxReleaseConfigError`. Every failure path throws
199
- * a `VisReleaseError` with a stable `code` from `VisReleaseErrorCode`.
200
- * Codes are part of the public API surface — additions are minor, removals
201
- * are major (RFC §21.1).
202
- */
196
+ * Typed errors for the release subsystem (RFC §19.4).
197
+ *
198
+ * Modeled on nx's `CreateNxReleaseConfigError`. Every failure path throws
199
+ * a `VisReleaseError` with a stable `code` from `VisReleaseErrorCode`.
200
+ * Codes are part of the public API surface — additions are minor, removals
201
+ * are major (RFC §21.1).
202
+ */
203
203
  type VisReleaseErrorCode = "AUTH_MISSING" | "DUPLICATE_PACKAGE_NAME" | "CYCLIC_DEPENDENCY" | "TAG_COLLISION" | "BUMP_FILE_INVALID" | "CONFIG_INVALID" | "GIT_OPERATION_FAILED" | "PM_VERSION_TOO_LOW" | "NATIVE_ADDON_VERSION_MISMATCH" | "PUBLISH_FAILED" | "STAGE_PENDING" | "TAG_PUSH_FAILED" | "STATE_FILE_CORRUPT";
204
204
  interface VisReleaseErrorOptions {
205
205
  /** Original error for stack-trace continuity. */