@visulima/vis 6.4.4 → 6.5.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 (150) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/LICENSE.md +0 -51
  3. package/README.md +27 -25
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +1 -1
  6. package/dist/packem_chunks/bloom-sync.js +1 -1
  7. package/dist/packem_chunks/cargo-plan.js +1 -1
  8. package/dist/packem_chunks/catalog-detector.js +1 -1
  9. package/dist/packem_chunks/catalog.js +11 -1
  10. package/dist/packem_chunks/cli-exec.js +1 -1
  11. package/dist/packem_chunks/cli-main.js +130 -131
  12. package/dist/packem_chunks/context.js +4 -4
  13. package/dist/packem_chunks/fix.js +1 -1
  14. package/dist/packem_chunks/handler10.js +1 -1
  15. package/dist/packem_chunks/handler12.js +1 -1
  16. package/dist/packem_chunks/handler13.js +1 -1
  17. package/dist/packem_chunks/handler14.js +1 -1
  18. package/dist/packem_chunks/handler15.js +1 -1
  19. package/dist/packem_chunks/handler19.js +1 -1
  20. package/dist/packem_chunks/handler2.js +1 -1
  21. package/dist/packem_chunks/handler20.js +1 -1
  22. package/dist/packem_chunks/handler21.js +1 -1
  23. package/dist/packem_chunks/handler23.js +1 -1
  24. package/dist/packem_chunks/handler24.js +1 -1
  25. package/dist/packem_chunks/handler25.js +1 -1
  26. package/dist/packem_chunks/handler26.js +1 -1
  27. package/dist/packem_chunks/handler28.js +1 -1
  28. package/dist/packem_chunks/handler3.js +1 -1
  29. package/dist/packem_chunks/handler32.js +1 -1
  30. package/dist/packem_chunks/handler39.js +5 -5
  31. package/dist/packem_chunks/handler4.js +1 -1
  32. package/dist/packem_chunks/handler46.js +1 -1
  33. package/dist/packem_chunks/handler49.js +1 -1
  34. package/dist/packem_chunks/handler5.js +1 -1
  35. package/dist/packem_chunks/handler50.js +1 -1
  36. package/dist/packem_chunks/handler51.js +1 -1
  37. package/dist/packem_chunks/handler52.js +1 -1
  38. package/dist/packem_chunks/handler54.js +1 -1
  39. package/dist/packem_chunks/handler55.js +1 -1
  40. package/dist/packem_chunks/handler56.js +5 -5
  41. package/dist/packem_chunks/handler58.js +1 -1
  42. package/dist/packem_chunks/handler59.js +1 -1
  43. package/dist/packem_chunks/handler6.js +1 -1
  44. package/dist/packem_chunks/handler60.js +1 -1
  45. package/dist/packem_chunks/handler61.js +1 -1
  46. package/dist/packem_chunks/handler62.js +1 -1
  47. package/dist/packem_chunks/handler63.js +1 -1
  48. package/dist/packem_chunks/handler64.js +1 -1
  49. package/dist/packem_chunks/handler65.js +1 -1
  50. package/dist/packem_chunks/handler66.js +1 -1
  51. package/dist/packem_chunks/handler67.js +1 -1
  52. package/dist/packem_chunks/handler68.js +12 -28
  53. package/dist/packem_chunks/handler69.js +37 -12
  54. package/dist/packem_chunks/handler7.js +1 -1
  55. package/dist/packem_chunks/handler70.js +1 -1
  56. package/dist/packem_chunks/handler71.js +1 -1
  57. package/dist/packem_chunks/handler72.js +311 -10
  58. package/dist/packem_chunks/handler73.js +10 -133
  59. package/dist/packem_chunks/handler74.js +133 -23
  60. package/dist/packem_chunks/handler75.js +23 -323
  61. package/dist/packem_chunks/handler76.js +1 -1
  62. package/dist/packem_chunks/handler77.js +1 -1
  63. package/dist/packem_chunks/handler78.js +1 -1
  64. package/dist/packem_chunks/handler79.js +1 -1
  65. package/dist/packem_chunks/handler8.js +1 -1
  66. package/dist/packem_chunks/heal.js +1 -1
  67. package/dist/packem_chunks/help-command.js +1 -1
  68. package/dist/packem_chunks/index3.js +28 -35
  69. package/dist/packem_chunks/index5.js +140 -801
  70. package/dist/packem_chunks/index6.js +801 -140
  71. package/dist/packem_chunks/index7.js +1 -1
  72. package/dist/packem_chunks/keys-refresh.js +1 -1
  73. package/dist/packem_chunks/list.js +1 -1
  74. package/dist/packem_chunks/native-addon.js +12 -0
  75. package/dist/packem_chunks/prune.js +1 -1
  76. package/dist/packem_chunks/python-plan.js +1 -1
  77. package/dist/packem_chunks/python-projects.js +1 -1
  78. package/dist/packem_chunks/python.js +1 -1
  79. package/dist/packem_chunks/snapshot.js +2 -2
  80. package/dist/packem_chunks/status.js +1 -1
  81. package/dist/packem_chunks/sync.js +1 -1
  82. package/dist/packem_chunks/sync2.js +1 -1
  83. package/dist/packem_chunks/tripwire.js +1 -1
  84. package/dist/packem_chunks/verify-lockfile.js +1 -1
  85. package/dist/packem_chunks/version-resolver.js +1 -1
  86. package/dist/packem_chunks/workspace.js +1 -1
  87. package/dist/packem_shared/{ReleaseClient-DaoIXjdn.js → ReleaseClient-CQaGkUHL.js} +1 -1
  88. package/dist/packem_shared/{advisories-CePsyvwG.js → advisories-DzWrfMwP.js} +1 -1
  89. package/dist/packem_shared/{affected-selection-CeiYNePc.js → affected-selection-mQmHyn-j.js} +1 -1
  90. package/dist/packem_shared/{ai-analysis-BA0POlbg.js → ai-analysis-CIN__RZj.js} +1 -1
  91. package/dist/packem_shared/{ai-cache-DPBsl-hV.js → ai-cache-BgoifbUT.js} +1 -1
  92. package/dist/packem_shared/{ai-fix-B77m7n2b.js → ai-fix-BG2olCnp.js} +1 -1
  93. package/dist/packem_shared/apply-BrRx__KL.js +8 -0
  94. package/dist/packem_shared/apply-release-plan-Cf6TJxK2.js +15 -0
  95. package/dist/packem_shared/{bin-D3ykhfdS.js → bin-DcZlUzKR.js} +1 -1
  96. package/dist/packem_shared/{build-scripts-DroekY_B.js → build-scripts-BtdNDGRO.js} +1 -1
  97. package/dist/packem_shared/createVersionActions-GD1Y4pNe.js +1 -0
  98. package/dist/packem_shared/{dependency-scan-DRFM_81X.js → dependency-scan-BmnwM6FX.js} +1 -1
  99. package/dist/packem_shared/{detect-BcgSLkMm.js → detect-DwXq9NzG.js} +1 -1
  100. package/dist/packem_shared/{docker-BvjXmtDx.js → docker-CN9h1ZAl.js} +1 -1
  101. package/dist/packem_shared/{ecosystem-gate-cnVeegV2.js → ecosystem-gate-DX0ZULH7.js} +1 -1
  102. package/dist/packem_shared/{env-Aebh_7xU.js → env-BUf_aJzW.js} +1 -1
  103. package/dist/packem_shared/{env-consistency-CsRtFVjG.js → env-consistency-B69mYzeD.js} +1 -1
  104. package/dist/packem_shared/{failure-log-Busa1iE8.js → failure-log-DiIZhhLI.js} +1 -1
  105. package/dist/packem_shared/glob-Cyk1H9ZL-CoX0RPCo.js +1 -0
  106. package/dist/packem_shared/{index-CiJWXOfI.js → index-CBn2VY5B.js} +1 -1
  107. package/dist/packem_shared/{index-BGIPGEa6.js → index-DhxUCW8T.js} +1 -1
  108. package/dist/packem_shared/junit-audit-CuJShWCH.js +13 -0
  109. package/dist/packem_shared/{lifecycle-C9PINrzB.js → lifecycle-GbShWxRp.js} +1 -1
  110. package/dist/packem_shared/{manifests-CGl2k8eD.js → manifests-dmM8N980.js} +1 -1
  111. package/dist/packem_shared/{min-release-age-Bm6IFgxW.js → min-release-age-PO0aM3R7.js} +1 -1
  112. package/dist/packem_shared/{missing-package-json-CNN9E7An.js → missing-package-json-BhiqxoDg.js} +1 -1
  113. package/dist/packem_shared/{multi-eco-lockfiles-DrgeQKa3.js → multi-eco-lockfiles-BK7QtgHY.js} +1 -1
  114. package/dist/packem_shared/{native-config-sync-CKePir7A.js → native-config-sync-B0GvRp9j.js} +1 -1
  115. package/dist/packem_shared/{osv-CtKBUlaU.js → osv-J53omdC9.js} +1 -1
  116. package/dist/packem_shared/{package-version-ChA7gKlB.js → package-version-C6xroAcI.js} +1 -1
  117. package/dist/packem_shared/{packument-DV0k4rzI.js → packument-DZRLzoJA.js} +1 -1
  118. package/dist/packem_shared/{project-name-filter-BnHcuGOv.js → project-name-filter-DHT0wEZm.js} +1 -1
  119. package/dist/packem_shared/{provenance-hAvGHOgZ.js → provenance-Cv6Fj_BX.js} +1 -1
  120. package/dist/packem_shared/{publish-missing-Df39xUBX.js → publish-missing-CfwPeX1q.js} +1 -1
  121. package/dist/packem_shared/{registry-D8odQGcR.js → registry-B5KGXKED.js} +1 -1
  122. package/dist/packem_shared/{registry-keys-BLiJKMuS.js → registry-keys-BXUXfg-B.js} +1 -1
  123. package/dist/packem_shared/{renderToString-DR0zDUjh-lzGitq_6.js → renderToString-DR0zDUjh-BY4_eILr.js} +1 -1
  124. package/dist/packem_shared/{resolve-explicit-CODAmTx4.js → resolve-explicit-Sfza3_kc.js} +1 -1
  125. package/dist/packem_shared/{run-summary-utils-CINjiLBE.js → run-summary-utils-CQjbLnkh.js} +1 -1
  126. package/dist/packem_shared/{runtime-check-BMDR1_bb.js → runtime-check-BTZdc1k2.js} +1 -1
  127. package/dist/packem_shared/{s1ngularity-RvRfoneb.js → s1ngularity-BrjAz--X.js} +1 -1
  128. package/dist/packem_shared/{scaffold-files-BdvNqI-N.js → scaffold-files-B77HPWjE.js} +1 -1
  129. package/dist/packem_shared/{scan-progress-aGfhWB5U.js → scan-progress-D5c-HQ_W.js} +1 -1
  130. package/dist/packem_shared/{selectors-CB84rN3y.js → selectors-l6BxIFLB.js} +1 -1
  131. package/dist/packem_shared/{signatures-yyWil8DY.js → signatures-C4MN75Bv.js} +1 -1
  132. package/dist/packem_shared/{spinner-DeG1597-.js → spinner-BryD7iJl.js} +1 -1
  133. package/dist/packem_shared/{table-B80pPNSi.js → table-BzBEMntH.js} +1 -1
  134. package/dist/packem_shared/{tabs-BAZbyp4k.js → tabs-DL_c_u-P.js} +1 -1
  135. package/dist/packem_shared/{toolchain-BPOxrpDU.js → toolchain-CbsBoqgN.js} +1 -1
  136. package/dist/packem_shared/{typosquats-Ch-a1qTB.js → typosquats-DRl1AA90.js} +1 -1
  137. package/dist/packem_shared/{use-measured-height-DVKGDAAE.js → use-measured-height-DobMKRXG.js} +1 -1
  138. package/dist/packem_shared/{vis-update-app-u5igJf_k.js → vis-update-app-CyCv-5iU.js} +1 -1
  139. package/dist/packem_shared/{vis-user-error-cD2VO4b_.js → vis-user-error-DjdeJsEK.js} +1 -1
  140. package/dist/packem_shared/{watch-loop-dAIFTLTH.js → watch-loop-D2QKvSts.js} +1 -1
  141. package/dist/release/index.js +1 -1
  142. package/index.js +26 -26
  143. package/package.json +10 -10
  144. package/dist/packem_chunks/cargo-lock.js +0 -5
  145. package/dist/packem_chunks/catalog2.js +0 -11
  146. package/dist/packem_shared/apply-DA-Dv8Pq.js +0 -8
  147. package/dist/packem_shared/apply-release-plan-BZ_E8GXQ.js +0 -15
  148. package/dist/packem_shared/clean-package-json-rutwkKl-.js +0 -1
  149. package/dist/packem_shared/createVersionActions-DXo4z8VN.js +0 -1
  150. package/dist/packem_shared/glob-Cyk1H9ZL-z7dfCruF.js +0 -1
@@ -1,4 +1,4 @@
1
- import{createRequire as Dt}from"node:module";import{t as fe,b as Bt,u as F,d as Wt,c as Oe,n as zt,i as Ft,a as Gt,P as Me}from"./package-version-ChA7gKlB.js";let Tt;const Vt=t=>(Tt??=Dt(import.meta.url))(t),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jt=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 Vt(t)},{createRequire:Rt}=jt("node:module"),qt=16,we=32,Ht=64,R=128,he="positionals";let oe=class extends Error{loc;title;hint;type="VisulimaError";constructor({cause:e,hint:n,location:o,message:i,name:s,stack:l,title:r}){super(i,{cause:e}),this.title=r,this.name=s,this.stack=l??this.stack,this.loc=o,this.hint=n}setLocation(e){this.loc=e}setName(e){this.name=e}setMessage(e){this.message=e}setHint(e){this.hint=e}},C=class extends oe{code;context;constructor(e,n,o){super({message:e,name:"CerebroError"}),this.code=n,this.context=o}},Jt=class extends C{argument;choices;value;constructor(e,n,o){super(`Invalid value "${n}" for argument "${e}". Allowed values: ${o.join(", ")}`,"INVALID_CHOICE",{argument:e,choices:o,value:n}),this.name="InvalidArgumentChoiceError",this.argument=e,this.value=n,this.choices=o,this.hint=`Pass one of: ${o.join(", ")}`}},Kt=class extends C{commandName;missingArguments;constructor(e,n){super(`Command "${e}" is missing required arguments: ${n.join(", ")}`,"MISSING_ARGUMENT",{commandName:e,missingArguments:n}),this.name="MissingArgumentError",this.commandName=e,this.missingArguments=n,this.hint=`Provide the following positional arguments: ${n.join(", ")}`}},Zt=class extends C{commandName;surplusArguments;constructor(e,n,o){super(`Command "${e}" accepts ${String(o)} positional argument${o===1?"":"s"}, but got ${String(n.length)} extra: ${n.join(", ")}`,"SURPLUS_ARGUMENT",{commandName:e,surplusArguments:[...n]}),this.name="SurplusArgumentError",this.commandName=e,this.surplusArguments=n,this.hint=`Remove the extra argument${n.length===1?"":"s"}, or declare a trailing "multiple: true" argument to collect them.`}};const at=String.raw,Pe=at`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Yt=()=>new RegExp(at`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${Pe}(?:\u200D${Pe})*`,"gu"),$i=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\)|\][^\u0007\u001B]{0,1000}(?:\u0007|\u001B\\))/g,Ni=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,G=Yt(),Qt=/[-_./\s]+/g,pe=/(\u001B\[[0-9;]*[a-z])/i,Ue=new RegExp("\\p{Script=Arabic}","u"),Xt=new RegExp("\\p{Script=Bengali}","u"),ee=new RegExp("\\p{Script=Cyrillic}","u"),en=new RegExp("\\p{Script=Devanagari}","u"),tn=new RegExp("\\p{Script=Ethiopic}","u"),ve=new RegExp("\\p{Script=Greek}","u"),De=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),nn=new RegExp("\\p{Script=Gujarati}","u"),on=new RegExp("\\p{Script=Gurmukhi}","u"),Te=new RegExp("\\p{Script=Hangul}","u"),Ve=new RegExp("\\p{Script=Hebrew}","u"),sn=new RegExp("\\p{Script=Hiragana}","u"),je=new RegExp("\\p{Script=Han}","u"),rn=new RegExp("\\p{Script=Kannada}","u"),an=new RegExp("\\p{Script=Katakana}","u"),cn=new RegExp("\\p{Script=Khmer}","u"),ln=new RegExp("\\p{Script=Lao}","u"),L=new RegExp("\\p{Script=Latin}","u"),un=new RegExp("\\p{Script=Malayalam}","u"),hn=new RegExp("\\p{Script=Myanmar}","u"),pn=new RegExp("\\p{Script=Oriya}","u"),dn=new RegExp("\\p{Script=Sinhala}","u"),fn=new RegExp("\\p{Script=Tamil}","u"),mn=new RegExp("\\p{Script=Telugu}","u"),gn=new RegExp("\\p{Script=Thai}","u"),wn=new RegExp("\\p{Script=Tibetan}","u"),Re=/[\u02BB\u02BC\u0027]/u,vn=t=>t.replace(G,""),V={COMMAND_NOT_FOUND:"COMMAND_NOT_FOUND",COMMAND_VALIDATION_ERROR:"COMMAND_VALIDATION_ERROR",CONFLICTING_OPTIONS:"CONFLICTING_OPTIONS",INVALID_ARGUMENT:"INVALID_ARGUMENT",INVALID_CHOICE:"INVALID_CHOICE",INVALID_INPUT:"INVALID_INPUT",MISSING_ARGUMENT:"MISSING_ARGUMENT",SURPLUS_ARGUMENT:"SURPLUS_ARGUMENT",UNKNOWN_OPTION:"UNKNOWN_OPTION"},yn=new Set([V.COMMAND_NOT_FOUND,V.COMMAND_VALIDATION_ERROR,V.CONFLICTING_OPTIONS,V.INVALID_ARGUMENT,V.INVALID_CHOICE,V.INVALID_INPUT,V.MISSING_ARGUMENT,V.SURPLUS_ARGUMENT,V.UNKNOWN_OPTION]),$n=t=>{const e=t?.code;return typeof e=="string"&&yn.has(e)},_e=t=>{if(!$n(t))return;const{hint:e,message:n}=t,o=(Array.isArray(e)?e:[e]).filter(i=>typeof i=="string"&&i.length>0);return o.length>0?[n,...o].join(`
1
+ import{createRequire as Dt}from"node:module";import{t as fe,b as Bt,u as F,d as Wt,c as Oe,n as zt,i as Ft,a as Gt,P as Me}from"./package-version-C6xroAcI.js";let Tt;const Vt=t=>(Tt??=Dt(import.meta.url))(t),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jt=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 Vt(t)},{createRequire:Rt}=jt("node:module"),qt=16,we=32,Ht=64,R=128,he="positionals";let oe=class extends Error{loc;title;hint;type="VisulimaError";constructor({cause:e,hint:n,location:o,message:i,name:s,stack:l,title:r}){super(i,{cause:e}),this.title=r,this.name=s,this.stack=l??this.stack,this.loc=o,this.hint=n}setLocation(e){this.loc=e}setName(e){this.name=e}setMessage(e){this.message=e}setHint(e){this.hint=e}},C=class extends oe{code;context;constructor(e,n,o){super({message:e,name:"CerebroError"}),this.code=n,this.context=o}},Jt=class extends C{argument;choices;value;constructor(e,n,o){super(`Invalid value "${n}" for argument "${e}". Allowed values: ${o.join(", ")}`,"INVALID_CHOICE",{argument:e,choices:o,value:n}),this.name="InvalidArgumentChoiceError",this.argument=e,this.value=n,this.choices=o,this.hint=`Pass one of: ${o.join(", ")}`}},Kt=class extends C{commandName;missingArguments;constructor(e,n){super(`Command "${e}" is missing required arguments: ${n.join(", ")}`,"MISSING_ARGUMENT",{commandName:e,missingArguments:n}),this.name="MissingArgumentError",this.commandName=e,this.missingArguments=n,this.hint=`Provide the following positional arguments: ${n.join(", ")}`}},Zt=class extends C{commandName;surplusArguments;constructor(e,n,o){super(`Command "${e}" accepts ${String(o)} positional argument${o===1?"":"s"}, but got ${String(n.length)} extra: ${n.join(", ")}`,"SURPLUS_ARGUMENT",{commandName:e,surplusArguments:[...n]}),this.name="SurplusArgumentError",this.commandName=e,this.surplusArguments=n,this.hint=`Remove the extra argument${n.length===1?"":"s"}, or declare a trailing "multiple: true" argument to collect them.`}};const at=String.raw,Pe=at`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Yt=()=>new RegExp(at`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${Pe}(?:\u200D${Pe})*`,"gu"),$i=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\)|\][^\u0007\u001B]{0,1000}(?:\u0007|\u001B\\))/g,Ni=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,G=Yt(),Qt=/[-_./\s]+/g,pe=/(\u001B\[[0-9;]*[a-z])/i,Ue=new RegExp("\\p{Script=Arabic}","u"),Xt=new RegExp("\\p{Script=Bengali}","u"),ee=new RegExp("\\p{Script=Cyrillic}","u"),en=new RegExp("\\p{Script=Devanagari}","u"),tn=new RegExp("\\p{Script=Ethiopic}","u"),ve=new RegExp("\\p{Script=Greek}","u"),De=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),nn=new RegExp("\\p{Script=Gujarati}","u"),on=new RegExp("\\p{Script=Gurmukhi}","u"),Te=new RegExp("\\p{Script=Hangul}","u"),Ve=new RegExp("\\p{Script=Hebrew}","u"),sn=new RegExp("\\p{Script=Hiragana}","u"),je=new RegExp("\\p{Script=Han}","u"),rn=new RegExp("\\p{Script=Kannada}","u"),an=new RegExp("\\p{Script=Katakana}","u"),cn=new RegExp("\\p{Script=Khmer}","u"),ln=new RegExp("\\p{Script=Lao}","u"),L=new RegExp("\\p{Script=Latin}","u"),un=new RegExp("\\p{Script=Malayalam}","u"),hn=new RegExp("\\p{Script=Myanmar}","u"),pn=new RegExp("\\p{Script=Oriya}","u"),dn=new RegExp("\\p{Script=Sinhala}","u"),fn=new RegExp("\\p{Script=Tamil}","u"),mn=new RegExp("\\p{Script=Telugu}","u"),gn=new RegExp("\\p{Script=Thai}","u"),wn=new RegExp("\\p{Script=Tibetan}","u"),Re=/[\u02BB\u02BC\u0027]/u,vn=t=>t.replace(G,""),V={COMMAND_NOT_FOUND:"COMMAND_NOT_FOUND",COMMAND_VALIDATION_ERROR:"COMMAND_VALIDATION_ERROR",CONFLICTING_OPTIONS:"CONFLICTING_OPTIONS",INVALID_ARGUMENT:"INVALID_ARGUMENT",INVALID_CHOICE:"INVALID_CHOICE",INVALID_INPUT:"INVALID_INPUT",MISSING_ARGUMENT:"MISSING_ARGUMENT",SURPLUS_ARGUMENT:"SURPLUS_ARGUMENT",UNKNOWN_OPTION:"UNKNOWN_OPTION"},yn=new Set([V.COMMAND_NOT_FOUND,V.COMMAND_VALIDATION_ERROR,V.CONFLICTING_OPTIONS,V.INVALID_ARGUMENT,V.INVALID_CHOICE,V.INVALID_INPUT,V.MISSING_ARGUMENT,V.SURPLUS_ARGUMENT,V.UNKNOWN_OPTION]),$n=t=>{const e=t?.code;return typeof e=="string"&&yn.has(e)},_e=t=>{if(!$n(t))return;const{hint:e,message:n}=t,o=(Array.isArray(e)?e:[e]).filter(i=>typeof i=="string"&&i.length>0);return o.length>0?[n,...o].join(`
2
2
  `):n},B=new Uint32Array(65536),Nn=(t,e)=>{const n=t.length,o=e.length,i=1<<n-1;let s=-1,l=0,r=n,u=n;for(;u--;)B[t.charCodeAt(u)]|=1<<u;for(u=0;u<o;u++){let a=B[e.charCodeAt(u)];const c=a|l;a|=(a&s)+s^s,l|=~(a|s),s&=a,l&i&&r++,s&i&&r--,l=l<<1|1,s=s<<1|~(c|l),l&=c}for(u=n;u--;)B[t.charCodeAt(u)]=0;return r},An=(t,e)=>{const n=e.length,o=t.length,i=[],s=[],l=Math.ceil(n/32),r=Math.ceil(o/32);for(let p=0;p<l;p++)s[p]=-1,i[p]=0;let u=0;for(;u<r-1;u++){let p=0,w=-1;const $=u*32,m=Math.min(32,o)+$;for(let y=$;y<m;y++)B[t.charCodeAt(y)]|=1<<y;for(let y=0;y<n;y++){const A=B[e.charCodeAt(y)],O=s[y/32|0]>>>y&1,b=i[y/32|0]>>>y&1,D=A|p,k=((A|b)&w)+w^w|A|b;let g=p|~(k|w),v=w&k;g>>>31^O&&(s[y/32|0]^=1<<y),v>>>31^b&&(i[y/32|0]^=1<<y),g=g<<1|O,v=v<<1|b,w=v|~(D|g),p=g&D}for(let y=$;y<m;y++)B[t.charCodeAt(y)]=0}let a=0,c=-1;const d=u*32,h=Math.min(32,o-d)+d;for(let p=d;p<h;p++)B[t.charCodeAt(p)]|=1<<p;let f=o;for(let p=0;p<n;p++){const w=B[e.charCodeAt(p)],$=s[p/32|0]>>>p&1,m=i[p/32|0]>>>p&1,y=w|a,A=((w|m)&c)+c^c|w|m;let O=a|~(A|c),b=c&A;f+=O>>>o-1&1,f-=b>>>o-1&1,O>>>31^$&&(s[p/32|0]^=1<<p),b>>>31^m&&(i[p/32|0]^=1<<p),O=O<<1|$,b=b<<1|m,c=b|~(y|O),a=O&y}for(let p=d;p<h;p++)B[t.charCodeAt(p)]=0;return f},xn=(t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return e.length===0?t.length:t.length<=32?Nn(t,e):An(t,e)};let Cn;const bn=t=>(Cn??=Rt(import.meta.url))(t),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,On=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 bn(t)},{writeFile:_n,stat:In,rm:kn,readFile:Be,readdir:En,mkdir:Sn,access:Ln}=On("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 H=class extends C{commandName;constructor(e,n=[]){const o=`Command "${e}" not found${n.length>0?`. Did you mean: ${n.join(", ")}?`:""}`;super(o,"COMMAND_NOT_FOUND",{commandName:e,suggestions:n}),this.name="CommandNotFoundError",this.commandName=e,n.length>0&&(this.hint=`Try one of these commands: ${n.join(", ")}`)}};class ct extends C{option1;option2;constructor(e,n){super(`Options "${e}" and "${n}" cannot be used together`,"CONFLICTING_OPTIONS",{option1:e,option2:n}),this.name="ConflictingOptionsError",this.option1=e,this.option2=n,this.hint=`Remove either --${e} or --${n}`}}class Mn extends C{unknownOptions;constructor(e,n){const o=e.join(", "),i=`Found unknown ${e.length===1?"option":"options"}: ${o}`;super(i,"UNKNOWN_OPTION",{suggestions:n,unknownOptions:e}),this.name="UnknownOptionError",this.unknownOptions=e,n&&n.length>0&&(this.hint=`Did you mean: ${n.join(", ")}?`)}}class Pn extends C{pluginName;constructor(e,n,o){super(`Plugin "${e}" error: ${n}`,"PLUGIN_ERROR",{originalError:o,pluginName:e}),this.name="PluginError",this.pluginName=e,o&&(this.cause=o)}}class Un{logger;plugins=new Map;initialized=!1;cachedDependencyOrder=void 0;constructor(e){this.logger=e}hasPlugins(){return this.plugins.size>0}register(e){if(this.initialized)throw new Error(`Cannot register plugin "${e.name}" after initialization`);if(this.plugins.has(e.name))throw new Error(`Plugin "${e.name}" is already registered`);fe().CEREBRO_OUTPUT_LEVEL===String(R)&&this.logger.debug(`registering plugin: ${e.name}`),this.plugins.set(e.name,e),this.cachedDependencyOrder=void 0}async init(e){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 n=this.getDependencyOrder();this.logger.debug(`initializing ${String(n.length)} plugin(s)...`);for(const o of n)if(typeof o.init=="function"){this.logger.debug(`initializing plugin: ${o.name}`);try{await o.init(e)}catch(i){const s=new Pn(o.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(e,n,o){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 l=s[e];if(typeof l=="function"){this.logger.debug(`executing ${e} hook for plugin: ${s.name}`);try{await(e==="afterCommand"?l(n,o):l(n))}catch(r){throw this.logger.error(`Error in ${e} hook for plugin "${s.name}":`,r),r}}}}async executeErrorHandlers(e,n){if(!this.initialized||this.plugins.size===0)return;const o=this.getDependencyOrder();for(const i of o)if(typeof i.onError=="function"){this.logger.debug(`executing error handler for plugin: ${i.name}`);try{await i.onError(e,n)}catch(s){this.logger.error(`Error in error handler for plugin "${i.name}":`,s)}}}getDependencyOrder(){if(this.cachedDependencyOrder!==void 0)return this.cachedDependencyOrder;const e=[],n=new Set,o=new Set,i=s=>{if(n.has(s))return;if(o.has(s))throw new Error(`Circular dependency detected involving plugin "${s}"`);const l=this.plugins.get(s);if(!l)throw new Error(`Plugin "${s}" not found`);if(o.add(s),l.dependencies)for(const r of l.dependencies)i(r);o.delete(s),n.add(s),e.push(l)};for(const s of this.plugins.keys())i(s);return this.cachedDependencyOrder=e,e}validateDependencies(){for(const e of this.plugins.values())if(e.dependencies){for(const n of e.dependencies)if(!this.plugins.has(n))throw new Error(`Plugin "${e.name}" depends on "${n}" which is not registered`)}}}const re=t=>t.type?.name==="Boolean",Dn=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},We=t=>(re(t)||(t.typeLabel=t.typeLabel??Dn(t),t.defaultOption&&(t.typeLabel=`${t.typeLabel} (D)`),t.required&&(t.typeLabel=`${t.typeLabel} (R)`)),t),Tn=new RegExp(/^-([^\d-])$/),Vn=new RegExp(/^--(\S+)/),jn=new RegExp(/^-([^\d-]{2,})$/),Rn=t=>Tn.test(t)||Vn.test(t)||jn.test(t),Bn=(t,e)=>{const n=e[0]&&Rn(e[0])||e.length===0?null:e.shift()??null;if(!t.includes(n)){const o=new Error(`Command not recognised: ${String(n)}`);throw o.command=n,o.name="INVALID_COMMAND",o}return{argv:e,command:n}};let Wn=class lt extends oe{optionName;value;constructor(e,n,o){super({hint:`Pass a valid ${o} value for '${e}'.`,message:`Invalid ${o} value '${n}' for option '${e}'`,name:"INVALID_VALUE",title:"Invalid Value"}),this.optionName=e,this.value=n,Object.setPrototypeOf(this,lt.prototype)}},zn=class ut extends oe{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,ut.prototype)}},ze=class ht extends oe{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,ht.prototype)}},Fn=class pt extends oe{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,pt.prototype)}},M=class dt extends oe{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,dt.prototype)}};const Z=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",Ie=t=>t===Number||typeof t=="function"&&t.name==="Number",Fe=t=>t===String||typeof t=="function"&&t.name==="String",Ge=(t,e,n)=>{const o=Number(t);if(e&&Number.isNaN(o)&&String(t).trim().toLowerCase()!=="nan")throw new Wn(n??"",String(t),"Number");return o},Gn=(t,e,n={})=>{const{optionName:o,strictTypes:i}=n;return Array.isArray(t)?Z(e)?t.map(Boolean):Ie(e)?t.map(s=>Ge(s,i,o)):Fe(e)?t.map(String):t.map(s=>e(String(s))):t===null?null:Z(e)?!!t:Ie(e)?Ge(t,i,o):Fe(e)?typeof t=="string"?t:String(t):e(typeof t=="string"?t:String(t))},I=(t,e,n,...o)=>{t&&console.debug(`[command-line-args:${n}] ${e}`,...o)},qn=/-([a-z])/g,Hn=/^\d+$/,Jn=t=>t.codePointAt(0)===95,qe=(t,e)=>Array.isArray(t)?[...t,...e]:[t,...e],He=t=>t==="__proto__"||t==="constructor"||t==="prototype",ye=(t,e,n,o=!1)=>{t[e]===void 0?t[e]=o?[n]:n:o&&Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]},Je=(t,e,n,o,i)=>{let s=e.get(t)??n.get(t);if(!s&&o){const l=t.toLowerCase();s=o.get(l)??i?.get(l)}return s},Kn=(t,e,n,o)=>{const i=n.debug??!1;I(i,"resolveArgs called with options:","resolver",{partial:n.partial,stopAtFirstUnknown:n.stopAtFirstUnknown}),I(i,"Starting argument resolution","resolver"),I(i,"Tokens:","resolver",t),I(i,"Definitions:","resolver",e),I(i,"Processing tokens...","resolver");const s=new Map,l=new Map,r=n.caseInsensitive?new Map:void 0,u=n.caseInsensitive?new Map:void 0,a=n.camelCase?new Map:void 0,c=n.camelCase?new Map:void 0;for(const g of e)if(s.set(g.name,g),g.alias&&l.set(g.alias,g),n.caseInsensitive&&r&&(r.set(g.name.toLowerCase(),g),g.alias&&u&&u.set(g.alias.toLowerCase(),g)),n.camelCase&&a&&c){const v=g.name.replaceAll(qn,(N,E)=>E.toUpperCase());a.set(g.name,v),c.set(v,g.name)}const d=Object.create(null),h=Object.create(null),f=[],p=[],w=new Set;let $=!1;const m=e.find(g=>g.defaultOption),y=e.some(g=>g.group),A=e.find(g=>Ie(g.type));for(let g=0;g<t.length;g++){const v=t[g];if(v.kind==="option-terminator"){d._unknown=o.slice(v.index),$=!0;break}if(v.kind==="option"&&v.name){let N=Je(v.name,s,l,r,u);!N&&v.value===void 0&&A&&Hn.test(v.name)&&(N=A,v.value=v.name,v.name=A.name);let E=!1;if(!N&&n.negation&&v.value===void 0&&v.name.startsWith("no-")){const _=v.name.slice(3),U=Je(_,s,l,r,u);U?.type&&Z(U.type)&&(N=U,E=!0)}const x=N?N.name:v.name,S=N?.multiple,P=N?.lazyMultiple;if(Object.hasOwn(h,x)&&h[x]!==void 0&&!S&&!P&&!n.partial)throw new zn(x);if(!N&&n.partial){const _=v.rawName??`--${v.name}${v.value!==void 0&&v.inlineValue?`=${v.value}`:""}`;f.push({index:v.index,value:_});continue}if(!N&&n.stopAtFirstUnknown){d._unknown=o.slice(v.index);break}if(!N&&!n.partial)throw new ze(v.name);if(v.value===void 0){const _=t[g+1],U=_?.kind==="option"&&!("name"in _)&&_.value!==void 0,T=_&&N&&!(N.type&&Z(N.type))&&(_.kind==="positional"||U),Ut=N&&N.defaultOption&&!N.multiple&&!N.lazyMultiple;if(T&&(!N?.defaultOption||Ut))if(S){let j=g+1;const ge=[];for(;j<t.length&&(t[j].kind==="positional"||t[j].kind==="option"&&!("name"in t[j])&&t[j].value!==void 0);)ge.push(t[j].value),w.add(t[j].index),j++;h[x]=h[x]===void 0?ge:qe(h[x],ge),g=j-1}else P?(ye(h,x,_.value,!0),w.add(_.index),g++):(h[x]=_.value,w.add(_.index),g++);else N?.type&&Z(N.type)?ye(h,x,!E,S):(S||P)&&h[x]!==void 0?ye(h,x,null,!0):h[x]=S?[]:null}else{let{value:_}=v;if(N?.type&&Z(N.type))switch(_){case"":{if(n.partial){const T=`${v.rawName??`--${v.name}`}${v.value?`=${v.value}`:""}`;p.push({index:v.index,value:T}),_=!0}else throw new ze(v.name);break}case"false":{_=!1;break}case"true":{_=!0;break}default:_=!0}const U=[_];if(S){let T=g+1;for(;T<t.length&&t[T].kind==="positional";)U.push(t[T].value),w.add(t[T].index),T++;g=T-1}h[x]===void 0?h[x]=S||P?U:_:S||P?h[x]=qe(h[x],U):h[x]=_}}else if(v.kind==="positional"&&n.stopAtFirstUnknown&&!w.has(v.index)&&!m){I(i,`Found unconsumed positional token at index ${String(v.index)}, stopping processing`,"resolver"),d._unknown=o.slice(v.index);break}}for(const[g,v]of Object.entries(h)){const N=s.get(g);N&&(N.multiple||N.lazyMultiple)&&!Array.isArray(v)&&(h[g]=[v])}const O=g=>g.kind==="option"&&!s.has(g.name??"")&&!l.has(g.name??"")&&(!n.caseInsensitive||!r?.has(g.name?.toLowerCase()??"")&&!u?.has(g.name?.toLowerCase()??""));let b=-1,D=Number.POSITIVE_INFINITY;if(n.stopAtFirstUnknown&&!$&&(b=t.findIndex(g=>O(g)),b!==-1&&(D=t[b].index)),m){const g=[],v=[];for(const N of t)N.kind==="positional"&&!w.has(N.index)&&N.index<D&&(g.push(N.value),v.push(N));if(g.length>0){const N=h[m.name],E=m.multiple??m.lazyMultiple;N===void 0?E?(v.forEach(x=>w.add(x.index)),h[m.name]=g):(w.add(v[0].index),h[m.name]=g[0]):E&&(v.forEach(x=>w.add(x.index)),h[m.name]=Array.isArray(N)?[...g,...N]:[...g,N])}}if(!n.partial){for(const g of t)if(g.kind==="positional"&&!w.has(g.index))throw new Fn(o[g.index])}if(n.partial&&!n.stopAtFirstUnknown){const g=[...f];for(const v of p)g.push({index:v.index,value:v.value});for(const v of t)v.kind==="positional"&&!w.has(v.index)&&g.push({index:v.index,value:o[v.index]});g.length>0&&(g.sort((v,N)=>v.index-N.index),d._unknown=g.map(v=>v.value))}if(n.stopAtFirstUnknown&&!$){const g=t.findIndex(N=>N.kind==="positional"&&!w.has(N.index));let v=-1;if(b!==-1&&g!==-1?v=Math.min(b,g):b!==-1?v=b:g!==-1&&(v=g),v>=0){const N=t[v].index;d._unknown=o.slice(N)}}for(const[g,v]of Object.entries(h)){const N=n.camelCase?a?.get(g)??g:g,E=s.get(g);E?.type?d[N]=Gn(v,E.type,{optionName:E.name,strictTypes:n.strictTypes}):d[N]=v===void 0?null:v}for(const g of e){const v=n.camelCase?a?.get(g.name)??g.name:g.name;!(v in d)&&g.defaultValue!==void 0&&(g.multiple??g.lazyMultiple?d[v]=Array.isArray(g.defaultValue)?[...g.defaultValue]:[g.defaultValue]:d[v]=g.defaultValue)}if(y){const g={},v={},N={};for(const x of e)if(x.group){const S=Array.isArray(x.group)?x.group:[x.group];for(const P of S)He(P)||(g[P]??={})}for(const x of Object.keys(d))if(!Jn(x)){v[x]=d[x];let S=x;n.camelCase&&(S=c?.get(x)??x);const P=s.get(S);if(P?.group){const _=Array.isArray(P.group)?P.group:[P.group];for(const U of _)He(U)||g[U]&&(g[U][x]=d[x])}else N[x]=d[x]}const E={_all:v};for(const[x,S]of Object.entries(g))E[x]=S;Object.keys(N).length>0&&(E._none=N),d._unknown&&(E._unknown=d._unknown),Object.keys(d).forEach(x=>delete d[x]),Object.assign(d,E)}const k=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));return I(i,"Final parsed result:","resolver",k),k},ft="-",ne=ft.codePointAt(0),Y="=",Zn=Y.codePointAt(0),Yn="--",Qn=ft,Xn="--",mt=t=>t.length>2&&t.startsWith(Xn),eo=t=>mt(t)&&!t.includes(Y,3),to=t=>mt(t)&&t.includes(Y,3),no=t=>{if(t.length!==2||t.codePointAt(0)!==ne||t.codePointAt(1)===ne)return!1;const e=t.codePointAt(1);return e!==void 0&&(e<48||e>57)},oo=t=>{if(t.length<=2||t.codePointAt(0)!==ne||t.codePointAt(1)===ne)return!1;const e=t.codePointAt(1);return!(e!==void 0&&e>=48&&e<=57)},so=t=>{const e=[];let n=0,o=[],i=0,s=-1,l=0;for(;i<o.length||n<t.length;){let r;if(i<o.length?(r=o[i],i++):(r=t[n],n++),l>0?l--:s++,r===Yn){e.push({index:s,kind:"option-terminator"});const u=[...o.slice(i),...t.slice(n)],a=u.map((c,d)=>({index:s+d+1,kind:"positional",value:c}));e.push(...a),s+=u.length;break}if(no(r)){const u=r.charAt(1);e.push({index:s,kind:"option",name:u,rawName:r});continue}if(oo(r)&&!r.includes(Y)){const u=[];let a="",c=!1;for(let d=1;d<r.length;d++){const h=r.charAt(d);c?a+=h:h.codePointAt(0)===Zn?c=!0:u.push(`${Qn}${h}`)}if(c)if(u.length>0){const d=u.pop();u.push(`${d}=${a}`)}else u.push(a);o=i<o.length?[...u,...o.slice(i)]:u,i=0,l=u.length;continue}if(eo(r)){const u=r.slice(2);e.push({index:s,kind:"option",name:u,rawName:r});continue}if(to(r)){const u=r.indexOf(Y),a=r.slice(2,u),c=r.slice(u+1);e.push({index:s,inlineValue:!0,kind:"option",name:a,rawName:r,value:c});continue}if(r.length>2&&r.codePointAt(0)===ne&&r.codePointAt(1)!==ne&&r.includes(Y)){const u=r.indexOf(Y),a=r.charAt(1),c=r.slice(u+1);e.push({index:s,inlineValue:!0,kind:"option",name:a,rawName:r,value:c});continue}e.push({index:s,kind:"positional",value:r})}return e},io=/\d/,ro=t=>typeof t=="function",ao=(t,e,n)=>{const o=n?.debug??!1;I(o,"Validating definitions:","validation",t,"caseInsensitive:",e);const i=new Set,s=new Set,l=new Set,r=new Set;let u=0;for(const a of t){if(I(o,"Checking definition:","validation",a),!a.name)throw I(o,"Validation failed: name is required","validation"),new M("Invalid option definition: name is required");if(typeof a.name!="string")throw new M("Invalid option definition: name must be a string");if(a.name.trim()==="")throw new M("Invalid option definition: name cannot be empty");const c=e?a.name.toLowerCase():"";if(i.has(a.name)||e&&l.has(c))throw new M(`Invalid option definition: duplicate name '${a.name}'`);if(s.has(a.name)||e&&r.has(c))throw new M(`Invalid option definition: name '${a.name}' conflicts with an existing alias`);if(i.add(a.name),e&&l.add(c),a.alias!==void 0){if(typeof a.alias!="string")throw new M("Invalid option definition: alias must be a string");if(a.alias.length!==1)throw new M("Invalid option definition: alias must be a single character");if(io.test(a.alias))throw new M("Invalid option definition: alias cannot be numeric");if(a.alias==="-")throw new M('Invalid option definition: alias cannot be "-"');const d=e?a.alias.toLowerCase():"";if(s.has(a.alias)||e&&r.has(d))throw new M(`Invalid option definition: duplicate alias '${a.alias}'`);if(i.has(a.alias)||e&&l.has(d))throw new M(`Invalid option definition: alias '${a.alias}' conflicts with an existing option name`);s.add(a.alias),e&&r.add(d)}if(a.defaultOption&&(u++,a.type!==void 0&&Z(a.type)))throw new M("Invalid option definition: defaultOption cannot be Boolean type");if(a.type!==void 0&&!(a.type===Boolean||a.type===Number||a.type===String||typeof a.type=="function"&&ro(a.type)))throw new M("Invalid option definition: invalid type")}if(u>1)throw I(o,"Validation failed: multiple defaultOptions not allowed","validation"),new M("Invalid option definition: multiple defaultOptions not allowed");I(o,"Validation completed successfully","validation")};function co(t,e={}){const n=e.debug??!1;I(n,"Starting command-line-args parsing","index"),I(n,"Options:","index",e);const o={...e};o.stopAtFirstUnknown&&(o.partial=!0);const i=Array.isArray(t)?t:[t];I(n,"Normalized definitions:","index",i),ao(i,o.caseInsensitive,n?o:void 0);let{argv:s}=o;s??=process.argv.slice(2),I(n,"Using argv:","index",s);let l=s;o.caseInsensitive&&(l=s.map(a=>{if(a.startsWith("--")){const c=a.indexOf("="),d=(c===-1?a.slice(2):a.slice(2,c)).toLowerCase();return c===-1?`--${d}`:`--${d}${a.slice(c)}`}if(a.startsWith("-")&&!a.startsWith("--")&&a.length>1){const c=a.indexOf("="),d=c===-1?a.slice(1):a.slice(1,c);if(!d)return a;const h=d.toLowerCase();return c===-1?`-${h}`:`-${h}${a.slice(c)}`}return a}));const r=so(l.map(String));I(n,"Tokenized arguments:","index",r);const u=Kn(r,i,o,s);return I(n,"Command-line-args parsing completed","index"),u}class lo{result;argv;options;argument;args;command;commandName;env;logger;console;fs;process;runtime;rawUnknown;rawArgv;constructor(e,n){this.commandName=e,this.command=n}}let $e=class extends C{commandName;constructor(e,n,o){super(`Failed to load command "${e}": ${n}`,"COMMAND_LOADER_ERROR",{commandName:e,reason:n}),this.name="CommandLoaderError",this.commandName=e,this.hint="Ensure the loader resolves to a module with a default export that is the command handler function.",o!==void 0&&(this.cause=o)}};const uo=/^-{1,2}(\w+)(=(.+))?$/,gt=(t,e,n,o)=>{const i=uo.exec(t);if(i===null)return{};const s=i[1];if(!s)return{};const l=n&&o?n.get(s)??o.get(s):e.find(r=>r.name===s||r.alias===s);return l!==void 0?{argName:l.name,argValue:i[3],option:l}:{}},Ke=(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)},ho=new Set(["0","1","false","true"]),po=(t,e,n,o)=>{if(e.length===0||t.length===0)return{};const i=(s,l)=>{const{argName:r,argValue:u,option:a}=gt(l,e,n,o),{lastOption:c}=s;return a&&re(a)&&u&&r?s.partial[r]=Ke(u,a):s.lastName&&c&&re(c)&&ho.has(l)&&(s.partial[s.lastName]=Ke(l,c)),{lastName:r,lastOption:a,partial:s.partial}};return t.reduce(i,{partial:{}}).partial},fo=new Set(["0","1","false","true"]),mo=(t,e,n,o)=>{if(e.length===0||t.length===0)return t;const i=(s,l)=>{const{argValue:r,option:u}=gt(l,e,n,o),{lastOption:a}=s;if(a&&re(a)&&fo.has(l)){const{args:c}=s;return{args:c.slice(0,-1)}}return u&&re(u)&&r?{args:s.args}:{args:[...s.args,l],lastOption:u}};return t.reduce(i,{args:[]}).args},go=t=>{const e=new Map;for(const n of t){const o=e.get(n.name);o?e.set(n.name,{...o,...n}):e.set(n.name,n)}return[...e.values()]},wo=t=>{if(t===void 0)return;const e=t.toLowerCase().trim();return e==="true"||e==="1"||e==="yes"||e==="on"},vo=(t,e)=>{if(!t.type)return e;if(e!==void 0){if(t.type===Boolean||typeof t.type=="function"&&t.type.name==="Boolean")return wo(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)}},yo=/_./g,$o=/^[A-Z]/,No=t=>t.toLowerCase().replaceAll(yo,e=>e[1]?.toUpperCase()??e).replace($o,e=>e.toLowerCase()),Ao=(t,e=fe())=>{if(!t||t.length===0)return{};const n={};for(const o of t){const i=e[o.name],s=vo(o,i),l=s===void 0?o.defaultValue:s,r=No(o.name);n[r]=l}return n},xo=/-([a-z])/g,wt=t=>t.replaceAll(xo,(e,n)=>n.toUpperCase()),Ze=(t,e)=>t.type===void 0?e:t.type(e),Co=(t,e)=>{const{choices:n}=t;if(!n||n.length===0)return[];const o=[];for(const i of e)n.includes(i)||o.push({choices:n,name:t.name,value:i});return o},bo=(t,e)=>e&&t.defaultValue!==void 0&&!Array.isArray(t.defaultValue)?[t.defaultValue]:t.defaultValue,Oo=(t,e)=>{const n={},o=[],i=[],s=t.length-1;let l=0;for(const[r,u]of t.entries()){const a=wt(u.name),c=r===s&&u.multiple===!0,d=c?e.slice(r):e.slice(r,r+1);if(d.length===0){u.required===!0&&o.push(u.name),n[a]=bo(u,c);continue}i.push(...Co(u,d)),l=r+d.length,n[a]=c?d.map(h=>Ze(u,h)):Ze(u,d[0])}return{invalid:i,missing:o,resolved:n,surplus:e.slice(l)}},_o=t=>{const e=new Map,n=new Map;for(const o of t)if(e.set(o.name,o),o.alias){const i=Array.isArray(o.alias)?o.alias:[o.alias];for(const s of i)n.set(s,o)}return{optionMapByAlias:n,optionMapByName:e}},vt=async t=>{if(typeof t.__resolvedExecute__=="function")return t.__resolvedExecute__;if(typeof t.loader!="function")throw new $e(t.name,"no execute or loader defined");let e;try{e=await t.loader()}catch(o){throw new $e(t.name,o instanceof Error?o.message:String(o),o)}const n=e.default;if(typeof n!="function")throw new $e(t.name,"loader did not return a module with a default-exported handler function");return t.__resolvedExecute__=n,n},Io=(t,e,n,o,i,s=[])=>{const l=new lo(t.name,t),{_all:r,_unknown:u,positionals:a}=e,c=Object.keys(n).length>0?{...r,...n}:r;he in c&&delete c[he],l.argument=a?.[he]??[],l.args={},l.rawUnknown=[...u??[]],l.rawArgv=[...s];const d=Object.keys(o).length>0;return l.options=d?{...c,...o}:c,l.env=Ao(t.env,i),l},ko=(t,e,n)=>{const o=t.options??[],i=o.length>0;let s=go(i?[...o,...n]:n);if(s.length>0){for(const c of s)if(c.multiple&&c.lazyMultiple)throw new Error(`Argument "${c.name}" cannot have both multiple and lazyMultiple options, please choose one.`)}const l=t.arguments!==void 0&&t.arguments.length>0;(t.argument||l)&&(s=[{defaultOption:!0,description:t.argument?.description,group:"positionals",multiple:!0,name:he,type:t.argument?.type??String,typeLabel:t.argument?.typeLabel},...s]);let r,u;if(i){const{optionMapByAlias:c,optionMapByName:d}=_o(o);r=mo(e,o,d,c),u=po(e,o,d,c)}else r=e,u={};const a=co(s,{argv:r,camelCase:!0,partial:!0,stopAtFirstUnknown:!0});return{arguments_:s,booleanValues:u,parsedArgs:a}},Ne=async(t,e,n)=>typeof t.execute=="function"?t.execute(e):(await vt(t))(e),Eo=(t,e)=>{if(!t.arguments||t.arguments.length===0)return;const n=e.rawUnknown.indexOf("--"),o=n===-1?[]:e.rawUnknown.slice(n+1),i=o.length===0?e.argument:e.argument.slice(0,Math.max(0,e.argument.length-o.length)),s=Oo(t.arguments,i);if(e.args=s.resolved,s.missing.length>0)throw new Kt(t.name,s.missing);const[l]=s.invalid;if(l)throw new Jt(l.name,l.value,l.choices);if(s.surplus.length>0)throw new Zt(t.name,s.surplus,t.arguments.length)};let So=class{capacity;cache;constructor(t){this.capacity=t,this.cache=new Map}get(t){if(!this.cache.has(t))return;const e=this.cache.get(t);return this.cache.delete(t),this.cache.set(t,e),e}has(t){return this.cache.has(t)}set(t,e){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.capacity){const n=this.cache.keys().next().value;n!==void 0&&this.cache.delete(n)}this.cache.set(t,e)}delete(t){this.cache.delete(t)}clear(){this.cache.clear()}size(){return this.cache.size}};const Lo=(t,e)=>typeof t!="string"||t===""?"":t[0].toLowerCase()+t.slice(1),Mo=new RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))","g"),Po=t=>{if(typeof t!="string")throw new TypeError(`The "value" argument must be of type string. Received ${typeof t}`);return t.replaceAll(Mo,"")},Ae=new So(1e3),Uo=/[.*+?^${}()|[\]\\]/g,Do=t=>{const e=t.join("");if(Ae.has(e)){const i=Ae.get(e);return i.lastIndex=0,i}const n=t.map(i=>i.replaceAll(Uo,String.raw`\$&`)).join("|"),o=new RegExp(n,"g");return Ae.set(e,o),o},To=t=>{const e=[];let n=0,o;for(G.lastIndex=0;(o=G.exec(t))!==null;)o.index>n&&e.push(t.slice(n,o.index)),e.push(o[0]),n=G.lastIndex;return n<t.length&&e.push(t.slice(n)),e.filter(Boolean)},Vo=/[ČŠŽĐ]/i,yt=new Uint8Array(128),$t=new Uint8Array(128),Nt=new Uint8Array(128);for(let t=0;t<128;t++)yt[t]=t>=65&&t<=90?1:0,$t[t]=t>=97&&t<=122?1:0,Nt[t]=t>=48&&t<=57?1:0;const xe=t=>yt[t],Ye=t=>$t[t],Ce=t=>Nt[t],W=(t,e,n,o,i)=>{if(t.length===0)return[];let s=!1;const l=Object.values(e);for(const f of l)if(f(t[0])){s=!0;break}if(!s&&!n)return[t];const r=[...t],u=[];let a=r[0],c="other";const d=Object.entries(e);for(const f of d){const[p,w]=f;if(w(r[0])){c=p;break}}let h=n&&o?r[0]===r[0].toLocaleUpperCase(o):!1;for(let f=1;f<r.length;f++){const p=r[f];let w="other";for(const y of d){const[A,O]=y;if(O(p)){w=A;break}}const $=n&&o?p===p.toLocaleUpperCase(o):!1;let m=!1;i?m=i(c,w,h,$,p,f,r):(c!==w&&c!=="other"&&w!=="other"&&(m=!0),n&&w!=="other"&&!h&&$&&(m=!0)),m?(u.push(a),a=p):a+=p,c=w,n&&(h=$)}return a&&a.length>0&&u.push(a),u.length>0?u:[t]},jo=(t,e,n,o)=>{if(n.size===0)return e;for(const i of n)if(t.startsWith(i,e))return o.push(i),e+i.length;return e},At=(t,e=new Set)=>{if(t.length===0)return[];if(t.toUpperCase()===t)return[t];let n=0;const o=[],i=t.length;for(let s=1;s<i;s++){const l=jo(t,n,e,o);if(l!==n){n=l,s=n-1;continue}const r=t.codePointAt(s-1),u=t.codePointAt(s),a=r&&r<128&&xe(r),c=u&&u<128&&xe(u),d=r&&r<128&&Ye(r),h=r&&r<128&&Ce(r),f=u&&u<128&&Ce(u);if(d&&c){o.push(t.slice(n,s)),n=s;continue}if(h&&!f||!h&&f){o.push(t.slice(n,s)),n=s;continue}if(f&&!h){let p=!1,w=!1;if(s+1<i){const $=t.codePointAt(s+1);p=$&&$<128&&xe($),w=$&&$<128&&Ce($)}if(!w&&p){o.push(t.slice(n,s),t.slice(s,s+1)),n=s+1;continue}}if(s+1<i){const p=t.codePointAt(s+1),w=p&&p<128&&Ye(p);if(a&&c&&w){const $=t.slice(n,s+1);e.has($)||(o.push(t.slice(n,s)),n=s)}}}return n<i&&o.push(t.slice(n)),o.filter(s=>s!=="")},xt=(t,e,n)=>{if(t.length===0)return[];const o=t===t.toLocaleUpperCase(e);if(e.startsWith("de")){if(!o&&t.replaceAll("ß","SS")===t.toLocaleUpperCase(e))return[t];const a=[...t],c=a.length,d=[];let h=a[0],f=a[0]===a[0].toLocaleUpperCase(e),p=f,w=f?0:-1;for(let $=1;$<c;$++){const m=a[$],y=m===m.toLocaleUpperCase(e);if(y===f)h+=m;else if(y)h&&h.length>0&&(d.push(h),h=m),p=!0,w=$;else{if(p&&$-w>1){const A=a[$-1],O=h.slice(0,-1);O&&O.length>0&&d.push(O),h=A+m}else h+=m;p=!1,w=-1}f=y}return h&&h.length>0&&d.push(h),d}if(e.startsWith("uk")||e.startsWith("ru")||e.startsWith("bg")||e.startsWith("sr")||e.startsWith("mk")||e.startsWith("be")){if(!ee.test(t)&&!L.test(t))return[t];const a=[...t],c=a.length,d=[];let h=a[0];const f=a[0];let p;ee.test(f)?p=1:L.test(f)?p=2:p=0;let w=f===f.toLocaleUpperCase(e);for(let m=1;m<c;m++){const y=a[m];let A;ee.test(y)?A=1:L.test(y)?A=2:A=0;const O=y===y.toLocaleUpperCase(e);p!==A&&(p===1||p===2)&&(A===1||A===2)||A===p&&!w&&O?(d.push(h),h=y):h+=y,p=A,w=O}h&&h.length>0&&d.push(h);const $=[];for(let m=0;m<d.length;m++)m<d.length-1&&d[m].length===1&&L.test(d[m])&&ee.test(d[m+1][0])?($.push(d[m]+d[m+1]),m+=1):$.push(d[m]);return $}if(e.startsWith("el")){if(!ve.test(t)&&!L.test(t))return[t];const a=[];De.lastIndex=0;let c;for(;(c=De.exec(t))!==null;)a.push(c[0]);a.length===0&&a.push(t);const d=[];if(a.length===1){const h=a[0];if(!h||!ve.test(h[0])||h.length===1)return[h??t]}for(const h of a){if(!h)continue;if(!ve.test(h[0])||h.length===1){d.push(h);continue}const f=h.length;let p=h[0],w=h[0]===h[0].toLocaleUpperCase(e);for(let $=1;$<f;$++){const m=h[$],y=m===m.toLocaleUpperCase(e);!w&&y?(d.push(p),p=m):p+=m,w=y}p&&d.push(p)}return d}if(e.startsWith("ja")||e.startsWith("ko")){const a=e.startsWith("ja"),c=a?{hiragana:h=>sn.test(h),kanji:h=>je.test(h),katakana:h=>an.test(h),latin:h=>L.test(h)}:{hangul:h=>Te.test(h),latin:h=>L.test(h)},d=new Set(["が","で","と","に","の","は","へ","も","や","を"]);if(a){const h=W(t,c,!1,e,(p,w)=>p==="hiragana"&&w==="katakana"||p==="katakana"&&w==="hiragana"||p==="hiragana"&&w==="latin"||p==="katakana"&&w==="latin"||p==="kanji"&&w==="latin"||p==="latin"&&(w==="hiragana"||w==="katakana"||w==="kanji")),f=[];for(const p of h){const w=p;w.length===1&&d.has(w)&&f.length>0?f[f.length-1]=f.at(-1)+w:f.push(w)}return f.length>0?f:[t]}return W(t,c,!1,e,(h,f)=>h==="hangul"&&f==="latin"||h==="latin"&&f==="hangul")}if(e.startsWith("sl")){const a=[...t],c=a.length,d=[];let h=a[0],f=a[0]===a[0].toLocaleUpperCase(e);for(let p=1;p<c;p++){const w=a[p],$=w===w.toLocaleUpperCase(e),m=Vo.test(w),y=p<c-1&&a[p+1]===a[p+1].toLocaleUpperCase(e);!f&&$||m&&y?(d.push(h),h=w,m&&y&&(d.push(h),h="")):h+=w,f=$}return h&&h.length>0&&d.push(h),d}if(e.startsWith("zh"))return W(t,{han:a=>je.test(a),latin:a=>L.test(a)},!1,e);if(["ar","fa","he","ur"].includes(e.split("-")[0])){const a=c=>Ve.test(c)||Ue.test(c);return W(t,{latin:c=>L.test(c),rtl:c=>a(c)},!1,e)}if(["am","bn","gu","hi","km","kn","lo","ml","mr","ne","or","pa","si","ta","te","th"].includes(e.split("-")[0])){const a=c=>en.test(c)||Xt.test(c)||nn.test(c)||on.test(c)||rn.test(c)||fn.test(c)||mn.test(c)||un.test(c)||dn.test(c)||gn.test(c)||ln.test(c)||wn.test(c)||hn.test(c)||tn.test(c)||cn.test(c)||pn.test(c);return W(t,{indic:c=>a(c),latin:c=>L.test(c)},!1,e)}if(["be","bg","ru","sr","uk"].includes(e))return W(t,{cyrillic:a=>ee.test(a),latin:a=>L.test(a)},!0,e);if(["ar","fa","he"].includes(e))return W(t,{latin:a=>L.test(a),rtl:a=>Ve.test(a)||Ue.test(a)},!1,e);if(e.startsWith("ko"))return W(t,{hangul:a=>Te.test(a),latin:a=>L.test(a)},!1,e);if(e.startsWith("uz")){if(!ee.test(t)&&!L.test(t))return[t];const a=[...t],c=a.length,d=[];let h=a[0],f=a[0]===a[0].toLocaleUpperCase(e);for(let p=1;p<c;p++){const w=a[p],$=w===w.toLocaleUpperCase(e);if(Re.test(w)||Re.test(a[p-1])){h+=w;continue}!f&&$?(d.push(h),h=w):h+=w,f=$}return h&&h.length>0&&d.push(h),d}const i=[...t],s=i.length,l=[];let r=i[0],u=i[0]===i[0].toLocaleUpperCase(e);for(const a of n)if(t.startsWith(a)){l.push(a),r=i[a.length],u=r===r.toLocaleUpperCase(e);break}for(let a=1;a<s;a++){const c=i[a],d=c===c.toLocaleUpperCase(e);let h=0;for(const f of n)if(t.startsWith(f,a)){l.push(r,f),h=f.length,r="";const p=f.at(-1);p&&(u=p===p.toLocaleUpperCase(e));break}if(h>0){a+=h-1;continue}!u&&d?(l.push(r),r=c):r+=c,u=d}return r&&l.push(r),l},Ro=(t,e,n)=>{const o=[],i=pe.test(t)?t.split(pe).filter(Boolean):[t];for(const s of i){const l=s;if(pe.test(l))o.push(l);else{G.lastIndex=0;const r=G.test(l)?To(l).filter(Boolean):[l];for(const u of r)if(G.lastIndex=0,G.test(u))o.push(u);else if(e){const a=e.toLowerCase().split("-")[0];o.push(...xt(u,a,n))}else o.push(...At(u,n))}}return o},Bo=(t,e={})=>{if(!t||typeof t!="string")return[];const{handleAnsi:n=!1,handleEmoji:o=!1,knownAcronyms:i=[],locale:s,normalize:l=!1,separators:r,stripAnsi:u=!1,stripEmoji:a=!1}=e,c=new Set([...i].toSorted((m,y)=>y.length-m.length));let d=t;u&&(d=Po(d)),a&&(d=vn(d));let h;Array.isArray(r)?h=Do(r):r instanceof RegExp?h=r:h=Qt;const f=[];let p=d;const w=h.flags.includes("g")?h:new RegExp(h.source,`${h.flags}g`);for(;p.length>0;){const m=w.exec(p);if(!m){p===".."?f.push(".."):p==="."?f.push("."):p.length>0&&f.push(p);break}const y=m.index,A=m[0],O=A.length,b=p.slice(0,y),D=p.slice(y+O);if(A.startsWith("../"))f.push(".."),p=p.slice(y+3);else if(A.startsWith("./"))f.push("."),p=p.slice(y+2);else if(y===0&&A==="..")f.push(".."),p=p.slice(2);else if(y===0&&A===".")f.push("."),p=p.slice(1);else{b.length>0&&f.push(b);let k=0;for(;(k=A.indexOf("../",k))!==-1;)f.push(".."),k+=3;for(k=0;(k=A.indexOf("./",k))!==-1;)(k===0||A[k-1]!==".")&&f.push("."),k+=2;let g=D;for(;g.startsWith("../");)f.push(".."),g=g.slice(3);for(;g.startsWith("./");)f.push("."),g=g.slice(2);if(g===".."){f.push("..");break}else if(g==="."){f.push(".");break}else p=g}w.lastIndex=0}if(f.length===0){const m=d.split(h).filter(Boolean);f.push(...m)}let $=[];for(const m of f)n||o?$.push(...Ro(m,s,c)):s?$.push(...xt(m,s,c)):$.push(...At(m,c));return l&&($=$.map(m=>c.has(m)?m:s&&m===m.toLocaleUpperCase(s)?m[0]+m.slice(1).toLocaleLowerCase(s):m.toUpperCase()===m&&!c.has(m)?m.slice(0,1)+m.slice(1).toLowerCase():m)),$},Wo=(t,e)=>typeof t!="string"||t===""?"":t[0].toUpperCase()+t.slice(1),zo=(t,e)=>{const{length:n}=t;if(n===0)return"";if(n===1)return t[0];const o=[];let i="",s="";for(let l=0;l<n;l++){const r=t[l];if(pe.test(r)){i?(o.push(i+s+r),i="",s=""):(o.length>0&&o.push(e),i=r);continue}i?(s&&(s+=e),s+=r):(o.length>0&&o.push(e),o.push(r))}return o.join("")},te=(t,e)=>{if(typeof t!="string"||!t)return"";let n=!0;return zo(Bo(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(o=>{const i=o,s=i.toLowerCase();return n?(n=!1,Lo(s)):Wo(s)}),"")};class Fo extends C{commandName;missingOptions;constructor(e,n){super(`Command "${e}" is missing required options: ${n.join(", ")}`,"COMMAND_VALIDATION_ERROR",{commandName:e,missingOptions:n}),this.name="CommandValidationError",this.commandName=e,this.missingOptions=n,this.hint=`Provide the following required options: ${n.join(", ")}`}}class Go extends C{choices;option;value;constructor(e,n,o){super(`Invalid value "${n}" for option "${e}". Allowed values: ${o.join(", ")}`,"INVALID_CHOICE",{choices:o,option:e,value:n}),this.name="InvalidChoiceError",this.option=e,this.value=n,this.choices=o,this.hint=`Use one of: ${o.map(i=>`--${e} ${i}`).join(", ")}`}}const Qe=(t,e,n=!1)=>{const o=[],i=e._all??e;for(const s of t){if(!n&&!s.required)continue;const l=s.__camelCaseName__??s.name;if(i[l]===void 0){if(s.type?.name==="Boolean"){e[l]=!1;continue}o.push(s)}}return o},qo=(t,e)=>e.includes(t)?!0:Math.abs(t.length-e.length)>t.length/2?!1:xn(t,e)<=t.length/3,z=(t,e)=>{const n=t.toLowerCase();return e.filter(o=>qo(o.toLowerCase(),n))},Ho=(t,e)=>{const n=[];if(t._unknown&&t._unknown.forEach(o=>{const i=o.startsWith("--");let s=`Found unknown ${i?"option":"argument"} "${o}"`;if(i){const l=z(o.replace("--",""),(e.options??[]).map(r=>r.name));if(l.length>0){const[r,...u]=l.map(a=>`--${a}`);s+=u.length>0?`, did you mean ${r??""} or ${u.join(", ")}?`:`, did you mean ${r??""}?`}}n.push(s)}),n.length>0)throw new C(n.join(`
3
3
  `),V.UNKNOWN_OPTION,{unknownOptions:[...t._unknown??[]]})},K=(t,e)=>new C(`Command "${t}" ${e}`,"INVALID_COMMAND",{commandName:t}),Jo=(t,e)=>{const n=new Set;for(const[o,i]of t.entries()){if(typeof i!="object"||i===null)throw K(e,`has a positional argument at index ${String(o)} that is not an object`);const{name:s}=i;if(typeof s!="string"||s.length===0)throw K(e,`has a positional argument at index ${String(o)} without a name`);const l=wt(s);if(n.has(l))throw K(e,`declares duplicate positional argument "${s}"`);n.add(l);const r=o===0?void 0:t[o-1];if(i.required===!0&&r!==void 0&&r.required!==!0)throw K(e,`declares required positional "${s}" after an optional one, which can never be satisfied`);if(i.multiple===!0&&o!==t.length-1)throw K(e,`declares a variadic positional "${s}" that is not the last one`)}},Ko=(t,e,n)=>{const o=n.__requiredOptions__,i=o?Qe(o,e,!0):Qe(t,e,!1);if(i.length>0)throw new Fo(n.name,i.map(s=>s.name));e._unknown&&e._unknown.length>0&&!n.argument&&!n.arguments?.length&&Ho(e,n)},Zo=(t,e,n)=>{const o=n.__conflictingOptions__??t.filter(i=>i.conflicts!==void 0);if(o.length>0){const i=o.find(s=>{const l=s.__camelCaseName__??te(s.name);return Array.isArray(s.conflicts)?s.conflicts.some(r=>e[te(r)]!==void 0)&&e[l]!==void 0:e[te(s.conflicts)]!==void 0&&e[l]!==void 0});if(i)throw new ct(i.name,typeof i.conflicts=="string"?i.conflicts:i.conflicts?.[0]??"unknown")}},Yo=(t,e)=>{const n=e.options;if(n)for(const o of n){if(!o.choices||o.choices.length===0)continue;const i=o.__camelCaseName__??te(o.name),s=t[i];if(s==null)continue;const l=Array.isArray(s)?s:[s];for(const r of l){const u=String(r);if(!o.choices.includes(u))throw new Go(o.name,u,o.choices)}}},Qo=t=>{if(!Array.isArray(t.options))return;const e=new Map,n=new Map;for(const i of t.options){if(i.name){const s=e.get(i.name)??[];s.push(i),e.set(i.name,s)}if(typeof i.alias=="string"&&i.alias.length>0){const s=n.get(i.alias)??[];s.push(i),n.set(i.alias,s)}else if(Array.isArray(i.alias)){for(const s of i.alias)if(s.length>0){const l=n.get(s)??[];l.push(i),n.set(s,l)}}}const o=[];for(const[i,s]of e)s.length>1&&o.push(`Duplicate option name "${i}" in command "${t.name}": ${JSON.stringify(s)}`);for(const[i,s]of n)s.length>1&&o.push(`Duplicate option alias "-${i}" used by options ${s.map(l=>`"${l.name}"`).join(", ")} in command "${t.name}"`);if(o.length>0)throw new Error(o.join(`
4
4
  `))},Xo=t=>{const{arguments:e}=t;if(e!==void 0){if(!Array.isArray(e))throw K(t.name,'must declare "arguments" as an array — slot order is significant, so a record cannot express it');if(t.argument!==void 0)throw K(t.name,'cannot define both "argument" and "arguments" — choose one');Jo(e,t.name)}},es=(t,e)=>{if(e.length===0)return{argv:[],commandPath:void 0};const n=[];let o;for(let i=1;i<=e.length;i+=1){const s=e[i-1];if(s===void 0||s.startsWith("-"))break;n.push(s);const l=n.join(" ");t.has(l)&&(o={commandPath:[...n],depth:i})}return o?{argv:e.slice(o.depth),commandPath:o.commandPath}:{argv:e,commandPath:void 0}},J=t=>t.join(" "),Xe=(t,e)=>e&&e.length>0?[...e,t]:[t],et=t=>t===void 0||Array.isArray(t)?t:Object.entries(t).map(([e,n])=>({...n,name:e})),ts=t=>{const e=et(t.options),n=et(t.env);return e===t.options&&n===t.env?t:Object.assign(Object.create(Object.getPrototypeOf(t)),t,{env:n,options:e})},ns=/^no-/,os=t=>{t.options?.forEach(e=>{e.__camelCaseName__=te(e.name)})},ss=t=>{if(!Array.isArray(t.options)||t.options.length===0)return;const e=new Set;for(const o of t.options)e.add(o.name);const n=[];for(const o of t.options)if(o.name.startsWith("no-")){const i=o.name.replace(ns,"");if(!e.has(i)){if(o.type!==Boolean)throw new Error(`Cannot add negated option "${o.name}" to command "${t.name}" because it is not a boolean.`);const s={...o,alias:void 0,defaultValue:o.defaultValue===void 0?!0:!o.defaultValue,description:`Inverse of --${o.name}.`,name:i};n.push(s),e.add(i)}}n.length>0&&t.options.push(...n)},is=(t,e)=>{if(!e.options||e.options.length===0)return;const{options:n}=t,o=new Map;for(const s of e.options)if(s.name.startsWith("no-")){const l=te(s.name);o.set(l,s)}const i=Object.keys(n).filter(s=>o.has(s));if(i.length!==0)for(const s of i){const l=s.charAt(2);if(!l)continue;const r=l.toLowerCase()+s.slice(3),u=o.get(s);u&&(u.__negated__=!0),n[r]=!n[s],Reflect.deleteProperty(n,s)}},rs=(t,e)=>{if(!e.options||e.options.length===0)return;const n=new Map;for(const i of e.options)i.__camelCaseName__&&i.__negated__===void 0&&i.implies!==void 0&&n.set(i.__camelCaseName__,i);if(n.size===0)return;const{options:o}=t;for(const i of Object.keys(o)){const s=n.get(i);if(s?.implies){const{implies:l}=s;for(const[r,u]of Object.entries(l))o[r]===void 0&&(o[r]=u)}}},as=()=>!!process.versions.electron,cs=()=>as()&&!process.defaultApp,ls=()=>cs()?0:1,us=t=>t.slice(ls()+1),hs=" ",ps=(t,e)=>t===e?!0:t.length!==e.length?!1:t.every((n,o)=>n===e[o]),ds=t=>{if(typeof t=="string")return t.split(hs);const e=Oe();return ps(t,e)?us(t):t},fs=t=>{const e=s=>{t.error(`Uncaught exception: ${s.message||s}`),s.stack&&t.error(s.stack),F(1)},n=(s,l)=>{if(s instanceof Error)t.error(`Promise rejection: ${s.message||s}`),s.stack&&t.error(s.stack);else{let r;if(typeof s=="string")r=s;else try{r=JSON.stringify(s)}catch{r=String(s)}t.error(`Promise rejection: ${r}`)}F(1)},o=Me("uncaughtException",e),i=Me("unhandledRejection",n);return()=>{o(),i()}},tt=100,ms=/^[a-z][\w-]*$/i,ke=(t,e)=>{if(typeof t!="string"||t.trim().length===0)throw new C(`${e} must be a non-empty string`,"INVALID_INPUT",{fieldName:e,value:t});return t.trim()},nt=(t,e)=>{if(!Array.isArray(t)||!t.every(n=>typeof n=="string"))throw new C(`${e} must be an array of strings`,"INVALID_INPUT",{fieldName:e,value:t});return t},le=(t,e)=>{if(typeof t!="object"||t===null)throw new C(`${e} must be an object`,"INVALID_INPUT",{fieldName:e,value:t});return t},ue=t=>{const e=ke(t,"Command name");if(e.length>tt)throw new C(`Command name is too long (maximum ${String(tt)} characters)`,"INVALID_COMMAND_NAME",{commandName:e,length:e.length});if(e.includes("..")||e.includes("/")||e.includes("\\")||e.includes(";")||e.includes("|")||e.includes("&"))throw new C(`Command name "${e}" contains invalid characters`,"INVALID_COMMAND_NAME",{commandName:e});if(!ms.test(e))throw new C(`Command name "${e}" must start with a letter and contain only letters, numbers, hyphens, and underscores`,"INVALID_COMMAND_NAME",{commandName:e});return e},gs=1e6,ws=1e5,vs=new Set([`
@@ -1,4 +1,4 @@
1
- import{createRequire as q}from"node:module";import{e as m,z as U,v as S,U as J,m as z}from"./index-0dnGN3GP.js";import{v as A}from"./registry-D8odQGcR.js";import{d as M,f as E}from"./detect-BcgSLkMm.js";import{y as K}from"./isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{h as ne}from"./env-Aebh_7xU.js";import{s as se}from"./watch-C-9-PD2m.js";let B;const V=e=>(B??=q(import.meta.url))(e),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,x=e=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[t,n]=y.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return y.getBuiltinModule(e)}return V(e)},{createHash:v}=x("node:crypto"),{spawnSync:G,spawn:H}=x("node:child_process"),{openSync:Y,writeSync:Q,closeSync:X,statSync:Z,readFileSync:O,mkdirSync:ee,writeFileSync:te}=x("node:fs"),{pathToFileURL:re}=x("node:url"),{availableParallelism:F}=x("node:os"),oe={error:"error",info:"info",information:"info",warning:"warning"},Ye={argsCheck:(e,t)=>k(e,t,!1),argsFix:(e,t)=>k(e,t,!0),bin:()=>["pnpm","exec","biome"],cacheKey:(e,t)=>{const n=["biome",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:(e,t)=>{const n=M(t,A.biome.packageNames[0]),r=E(e,A.biome.configFiles);if(!(!n&&!r))return{adapter:"biome",configFile:r,declared:!!n,declaredVersion:n,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 n;try{n=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 r=[];for(const o of n.diagnostics??[]){const s=o.location?.start,i=o.location?.end,c=ie(t.root,o.location?.path),u=o.category??"",a=u==="format"||u.startsWith("format/");r.push({adapter:"biome",column:s?.column&&s.column>0?s.column:void 0,endColumn:i?.column&&i.column>0?i.column:void 0,endLine:i?.line&&i.line>0?i.line:void 0,file:c,fixable:!0,line:s?.line&&s.line>0?s.line:void 0,message:a?"Code style issues would be auto-fixed":o.message??"",ruleId:u||void 0,severity:oe[o.severity??""]??"warning"})}return r}},k=(e,t,n)=>{const r=["check","--reporter=json"];return n&&r.push("--write"),typeof t.maxWarnings=="number"&&r.push(`--max-diagnostics=${String(t.maxWarnings)}`),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},ie=(e,t)=>{const n=typeof t=="string"?t:t?.file;return n?n.startsWith("/")||/^[a-z]:[\\/]/i.test(n)?n:m(e,n):e},j="pyproject.toml",ce=/^\[tool\.ruff(?:\.[\w-]+)*\]\s*$/m,ae=/^Would reformat:?\s+(.+)$/,le=e=>{const t=m(e,j);if(!K(t))return!1;try{const n=U(t);return ce.test(n)}catch{return!1}},N=e=>(t,n)=>{const r=A.ruff.packageNames.map(c=>M(n,c)).find(c=>c!==void 0),o=E(t,A.ruff.configFiles),s=o?void 0:le(t)?m(t,j):void 0,i=o??s;if(!(!r&&!i))return{adapter:e,configFile:i,declared:!!r,declaredVersion:r,root:t}},ue=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),P=(e,t)=>e?ue(e)?e:m(t,e):t,fe=e=>ae.exec(e)?.[1]?.trim(),Qe={argsCheck:(e,t)=>I(e,t,!1),argsFix:(e,t)=>I(e,t,!0),bin:()=>["ruff","check"],cacheKey:(e,t)=>{const n=["ruff-check",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:N("ruff-check"),extensions:["py","pyi"],id:"ruff-check",kind:"lint",parse:(e,t)=>{if(!e.stdout.trim())return[];let n;try{n=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 r=[];for(const o of n){const s=o.location,i=o.end_location;r.push({adapter:"ruff-check",column:s?.column,endColumn:i?.column,endLine:i?.row,file:P(o.filename,t.root),fixable:!!o.fix,line:s?.row,message:o.message??"",ruleId:o.code,severity:"warning"})}return r}},Xe={argsCheck:(e,t)=>R(e,t,!1),argsFix:(e,t)=>R(e,t,!0),bin:()=>["ruff","format"],cacheKey:(e,t)=>{const n=["ruff-fmt",e.declaredVersion??"unknown",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:N("ruff-fmt"),extensions:["py","pyi"],id:"ruff-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const n=[],r=new Set;for(const o of e.stdout.split(/\r?\n/)){const s=fe(o);!s||r.has(s)||(r.add(s),n.push({adapter:"ruff-fmt",file:P(s,t.root),fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return n}},I=(e,t,n)=>{const r=["--output-format=json"];return n&&r.push("--fix"),t.quiet&&r.push("--quiet"),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},R=(e,t,n)=>{const r=[];return n||r.push("--check"),t.quiet&&r.push("--quiet"),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},Ze=(e,t)=>{const n=w(e,["diff","--name-only","--diff-filter=ACMR","-z",`${t}...HEAD`]);if(n===void 0)return;const r=w(e,["diff","--name-only","--diff-filter=ACMR","-z"]),o=w(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]),s=w(e,["ls-files","--others","--exclude-standard","-z"]),i=new Set;for(const c of[n,r??"",o??"",s??""])for(const u of c.split("\0"))u.length!==0&&i.add(S(u)?u:m(e,u));return[...i].sort()},et=e=>{const t=w(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]);if(t===void 0)return;const n=new Set;for(const r of t.split("\0"))r.length!==0&&n.add(S(r)?r:m(e,r));return[...n].sort()},w=(e,t)=>{const n=G("git",[...t],{cwd:e,encoding:"utf8",timeout:1e4});if(n.status===0)return n.stdout},tt=(e,t)=>{const n=new Set(t.map(s=>s.toLowerCase())),r=[],o=new Set;for(const s of e){const i=s.lastIndexOf(".");if(i===-1||i===s.length-1)continue;const c=s.slice(i+1).toLowerCase();n.has(c)&&(o.has(s)||(o.add(s),r.push(s)))}return r},de=new Set(["-","stdout"]),T=e=>({close:()=>{},write:t=>{e.write(t)}}),pe=e=>{ne(z(e));const t=Y(e,"w");let n=[];return{close:()=>{n.length>0&&(Q(t,n.join("")),n=[]),X(t)},write:r=>{n.push(r)}}},nt=e=>{const{cwd:t,target:n}=e;if(n===void 0||de.has(n))return T(process.stdout);if(n==="stderr")return T(process.stderr);const r=S(n)?n:J(t,n);return pe(r)},C=["oxlint","oxfmt","biome","eslint","dprint","prettier","stylelint","ruff-check","ruff-fmt","markdownlint","shellcheck","typecheck"],rt=(e,t)=>{const n=new Map(e.map(i=>[i.id,i])),r=[],o=new Set,s=t&&t.length>0?t:C;for(const i of s){const c=n.get(i);c&&!o.has(i)&&(r.push(c),o.add(i))}if(t&&t.length>0)for(const i of C){const c=n.get(i);c&&!o.has(i)&&(r.push(c),o.add(i))}for(const i of e)o.has(i.id)||(r.push(i),o.add(i.id));return r},st=(e,t,n)=>{const r=[];for(const o of t){const s=e.get(o.id);s&&me(o.kind,n)&&r.push({adapter:o,presence:s})}return r},me=(e,t)=>e===t||e==="both",ot=(e,t,n={})=>{const r=new Map;for(const o of e){const s=he(o),i=ge(s,t,n);if(!i)continue;const c=r.get(i);c?c.push(o):r.set(i,[o])}return r},he=e=>{const t=e.lastIndexOf(".");return t===-1||t===e.length-1?"":e.slice(t+1).toLowerCase()},ge=(e,t,n)=>{const r=n[e];if(r&&t.some(o=>o.adapter.id===r))return r;for(const{adapter:o}of t)if(o.extensions.includes(e))return o.id},it=(e,t,n)=>{const r=new Set(C),o=new Set([...n?.order??[],...Object.keys(n?.adapters??{})]);for(const s of o)r.has(s)||e.warn(`vis.config ${t}: unknown adapter "${s}" is ignored.`)},ye=e=>e==="error"?"error":e==="warning"?"warning":"notice",D=e=>e.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
1
+ import{createRequire as q}from"node:module";import{e as m,z as U,v as S,U as J,m as z}from"./index-0dnGN3GP.js";import{v as A}from"./registry-B5KGXKED.js";import{d as M,f as E}from"./detect-DwXq9NzG.js";import{y as K}from"./isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{h as ne}from"./env-BUf_aJzW.js";import{s as se}from"./watch-C-9-PD2m.js";let B;const V=e=>(B??=q(import.meta.url))(e),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,x=e=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[t,n]=y.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return y.getBuiltinModule(e)}return V(e)},{createHash:v}=x("node:crypto"),{spawnSync:G,spawn:H}=x("node:child_process"),{openSync:Y,writeSync:Q,closeSync:X,statSync:Z,readFileSync:O,mkdirSync:ee,writeFileSync:te}=x("node:fs"),{pathToFileURL:re}=x("node:url"),{availableParallelism:F}=x("node:os"),oe={error:"error",info:"info",information:"info",warning:"warning"},Ye={argsCheck:(e,t)=>k(e,t,!1),argsFix:(e,t)=>k(e,t,!0),bin:()=>["pnpm","exec","biome"],cacheKey:(e,t)=>{const n=["biome",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:(e,t)=>{const n=M(t,A.biome.packageNames[0]),r=E(e,A.biome.configFiles);if(!(!n&&!r))return{adapter:"biome",configFile:r,declared:!!n,declaredVersion:n,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 n;try{n=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 r=[];for(const o of n.diagnostics??[]){const s=o.location?.start,i=o.location?.end,c=ie(t.root,o.location?.path),u=o.category??"",a=u==="format"||u.startsWith("format/");r.push({adapter:"biome",column:s?.column&&s.column>0?s.column:void 0,endColumn:i?.column&&i.column>0?i.column:void 0,endLine:i?.line&&i.line>0?i.line:void 0,file:c,fixable:!0,line:s?.line&&s.line>0?s.line:void 0,message:a?"Code style issues would be auto-fixed":o.message??"",ruleId:u||void 0,severity:oe[o.severity??""]??"warning"})}return r}},k=(e,t,n)=>{const r=["check","--reporter=json"];return n&&r.push("--write"),typeof t.maxWarnings=="number"&&r.push(`--max-diagnostics=${String(t.maxWarnings)}`),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},ie=(e,t)=>{const n=typeof t=="string"?t:t?.file;return n?n.startsWith("/")||/^[a-z]:[\\/]/i.test(n)?n:m(e,n):e},j="pyproject.toml",ce=/^\[tool\.ruff(?:\.[\w-]+)*\]\s*$/m,ae=/^Would reformat:?\s+(.+)$/,le=e=>{const t=m(e,j);if(!K(t))return!1;try{const n=U(t);return ce.test(n)}catch{return!1}},N=e=>(t,n)=>{const r=A.ruff.packageNames.map(c=>M(n,c)).find(c=>c!==void 0),o=E(t,A.ruff.configFiles),s=o?void 0:le(t)?m(t,j):void 0,i=o??s;if(!(!r&&!i))return{adapter:e,configFile:i,declared:!!r,declaredVersion:r,root:t}},ue=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),P=(e,t)=>e?ue(e)?e:m(t,e):t,fe=e=>ae.exec(e)?.[1]?.trim(),Qe={argsCheck:(e,t)=>I(e,t,!1),argsFix:(e,t)=>I(e,t,!0),bin:()=>["ruff","check"],cacheKey:(e,t)=>{const n=["ruff-check",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:N("ruff-check"),extensions:["py","pyi"],id:"ruff-check",kind:"lint",parse:(e,t)=>{if(!e.stdout.trim())return[];let n;try{n=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 r=[];for(const o of n){const s=o.location,i=o.end_location;r.push({adapter:"ruff-check",column:s?.column,endColumn:i?.column,endLine:i?.row,file:P(o.filename,t.root),fixable:!!o.fix,line:s?.row,message:o.message??"",ruleId:o.code,severity:"warning"})}return r}},Xe={argsCheck:(e,t)=>R(e,t,!1),argsFix:(e,t)=>R(e,t,!0),bin:()=>["ruff","format"],cacheKey:(e,t)=>{const n=["ruff-fmt",e.declaredVersion??"unknown",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:N("ruff-fmt"),extensions:["py","pyi"],id:"ruff-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const n=[],r=new Set;for(const o of e.stdout.split(/\r?\n/)){const s=fe(o);!s||r.has(s)||(r.add(s),n.push({adapter:"ruff-fmt",file:P(s,t.root),fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return n}},I=(e,t,n)=>{const r=["--output-format=json"];return n&&r.push("--fix"),t.quiet&&r.push("--quiet"),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},R=(e,t,n)=>{const r=[];return n||r.push("--check"),t.quiet&&r.push("--quiet"),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},Ze=(e,t)=>{const n=w(e,["diff","--name-only","--diff-filter=ACMR","-z",`${t}...HEAD`]);if(n===void 0)return;const r=w(e,["diff","--name-only","--diff-filter=ACMR","-z"]),o=w(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]),s=w(e,["ls-files","--others","--exclude-standard","-z"]),i=new Set;for(const c of[n,r??"",o??"",s??""])for(const u of c.split("\0"))u.length!==0&&i.add(S(u)?u:m(e,u));return[...i].sort()},et=e=>{const t=w(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]);if(t===void 0)return;const n=new Set;for(const r of t.split("\0"))r.length!==0&&n.add(S(r)?r:m(e,r));return[...n].sort()},w=(e,t)=>{const n=G("git",[...t],{cwd:e,encoding:"utf8",timeout:1e4});if(n.status===0)return n.stdout},tt=(e,t)=>{const n=new Set(t.map(s=>s.toLowerCase())),r=[],o=new Set;for(const s of e){const i=s.lastIndexOf(".");if(i===-1||i===s.length-1)continue;const c=s.slice(i+1).toLowerCase();n.has(c)&&(o.has(s)||(o.add(s),r.push(s)))}return r},de=new Set(["-","stdout"]),T=e=>({close:()=>{},write:t=>{e.write(t)}}),pe=e=>{ne(z(e));const t=Y(e,"w");let n=[];return{close:()=>{n.length>0&&(Q(t,n.join("")),n=[]),X(t)},write:r=>{n.push(r)}}},nt=e=>{const{cwd:t,target:n}=e;if(n===void 0||de.has(n))return T(process.stdout);if(n==="stderr")return T(process.stderr);const r=S(n)?n:J(t,n);return pe(r)},C=["oxlint","oxfmt","biome","eslint","dprint","prettier","stylelint","ruff-check","ruff-fmt","markdownlint","shellcheck","typecheck"],rt=(e,t)=>{const n=new Map(e.map(i=>[i.id,i])),r=[],o=new Set,s=t&&t.length>0?t:C;for(const i of s){const c=n.get(i);c&&!o.has(i)&&(r.push(c),o.add(i))}if(t&&t.length>0)for(const i of C){const c=n.get(i);c&&!o.has(i)&&(r.push(c),o.add(i))}for(const i of e)o.has(i.id)||(r.push(i),o.add(i.id));return r},st=(e,t,n)=>{const r=[];for(const o of t){const s=e.get(o.id);s&&me(o.kind,n)&&r.push({adapter:o,presence:s})}return r},me=(e,t)=>e===t||e==="both",ot=(e,t,n={})=>{const r=new Map;for(const o of e){const s=he(o),i=ge(s,t,n);if(!i)continue;const c=r.get(i);c?c.push(o):r.set(i,[o])}return r},he=e=>{const t=e.lastIndexOf(".");return t===-1||t===e.length-1?"":e.slice(t+1).toLowerCase()},ge=(e,t,n)=>{const r=n[e];if(r&&t.some(o=>o.adapter.id===r))return r;for(const{adapter:o}of t)if(o.extensions.includes(e))return o.id},it=(e,t,n)=>{const r=new Set(C),o=new Set([...n?.order??[],...Object.keys(n?.adapters??{})]);for(const s of o)r.has(s)||e.warn(`vis.config ${t}: unknown adapter "${s}" is ignored.`)},ye=e=>e==="error"?"error":e==="warning"?"warning":"notice",D=e=>e.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
2
2
  `,"%0A"),_=e=>D(e).replaceAll(",","%2C").replaceAll(":","%3A").replaceAll("=","%3D"),we=(e,t)=>t&&e.startsWith(`${t}/`)?e.slice(t.length+1):e,xe=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),ve=(e,t)=>{const n=ye(e.severity),r=we(e.file,t),o=e.ruleId?`${e.adapter}(${e.ruleId})`:e.adapter,s=[`file=${_(r)}`];return e.line!==void 0&&s.push(`line=${String(e.line)}`),e.endLine!==void 0&&s.push(`endLine=${String(e.endLine)}`),e.column!==void 0&&s.push(`col=${String(e.column)}`),e.endColumn!==void 0&&s.push(`endColumn=${String(e.endColumn)}`),s.push(`title=${_(o)}`),`::${n} ${s.join(",")}::${D(e.message)}
3
3
  `},ct=e=>e.runs.flatMap(n=>[...n.findings]).sort(xe).map(n=>ve(n,e.workspaceRoot)).join(""),g=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;"),Se=e=>`<![CDATA[${e.replaceAll("]]>","]]]]><![CDATA[>")}]]>`,Ae=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),$e=e=>e==="error"?"error":e==="warning"?"warning":"info",Ce=(e,t)=>{let{file:n}=e;return t&&e.file.startsWith(`${t}/`)&&(n=e.file.slice(t.length+1)),e.line===void 0?n:e.column===void 0?`${n}:${String(e.line)}`:`${n}:${String(e.line)}:${String(e.column)}`},Fe=(e,t,n)=>{const r=Ce(e,n),o=$e(e.severity),s=e.ruleId?`[${e.ruleId}] ${e.message}`:e.message;return[` <testcase classname="${g(t)}" name="${g(r)}">`,` <failure type="${g(o)}" message="${g(s)}">${Se(e.message)}</failure>`," </testcase>",""].join(`
4
4
  `)},ke=(e,t,n)=>{const r=[...e.findings].sort(Ae),o=r.filter(f=>f.severity==="error").length,s=r.filter(f=>f.severity==="warning").length,i=r.length,c=(e.durationMs/1e3).toFixed(3),u=r.map(f=>Fe(f,e.adapter,n)).join("");return` <testsuite ${[`name="${g(e.adapter)}"`,`tests="${String(i)}"`,`failures="${String(o)}"`,'errors="0"',`skipped="${String(s)}"`,`time="${c}"`,`timestamp="${t}"`].join(" ")}>
@@ -1 +1 @@
1
- import{ReleaseClient as s,release as a,releaseChangelog as l,releaseDraft as o,releasePublish as E,releaseSnapshot as i,releaseVersion as n}from"../packem_shared/ReleaseClient-DaoIXjdn.js";import{DEFAULT_CLEAN_KEEP as L,DEFAULT_CLEAN_STRIP as f,DEFAULT_CONFIG as p,DEFAULT_DEPENDENCY_BUMP_RULES as _,defineReleaseConfig as m,resolveCleanStripList as C}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";import{defineReleasePlugin as D}from"../packem_chunks/defineReleasePlugin.js";import{VisReleaseError as U,visReleaseError as x}from"../packem_shared/VisReleaseError-DZtgcKf8.js";import{BUMP_LEVELS as F,bumpRank as N,maxBump as S}from"./types.js";export{F as BUMP_LEVELS,L as DEFAULT_CLEAN_KEEP,f as DEFAULT_CLEAN_STRIP,p as DEFAULT_CONFIG,_ as DEFAULT_DEPENDENCY_BUMP_RULES,s as ReleaseClient,U as VisReleaseError,N as bumpRank,m as defineReleaseConfig,D as defineReleasePlugin,S as maxBump,a as release,l as releaseChangelog,o as releaseDraft,E as releasePublish,i as releaseSnapshot,n as releaseVersion,C as resolveCleanStripList,x as visReleaseError};
1
+ import{ReleaseClient as s,release as a,releaseChangelog as l,releaseDraft as o,releasePublish as E,releaseSnapshot as i,releaseVersion as n}from"../packem_shared/ReleaseClient-CQaGkUHL.js";import{DEFAULT_CLEAN_KEEP as L,DEFAULT_CLEAN_STRIP as f,DEFAULT_CONFIG as p,DEFAULT_DEPENDENCY_BUMP_RULES as _,defineReleaseConfig as m,resolveCleanStripList as C}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";import{defineReleasePlugin as D}from"../packem_chunks/defineReleasePlugin.js";import{VisReleaseError as U,visReleaseError as x}from"../packem_shared/VisReleaseError-DZtgcKf8.js";import{BUMP_LEVELS as F,bumpRank as N,maxBump as S}from"./types.js";export{F as BUMP_LEVELS,L as DEFAULT_CLEAN_KEEP,f as DEFAULT_CLEAN_STRIP,p as DEFAULT_CONFIG,_ as DEFAULT_DEPENDENCY_BUMP_RULES,s as ReleaseClient,U as VisReleaseError,N as bumpRank,m as defineReleaseConfig,D as defineReleasePlugin,S as maxBump,a as release,l as releaseChangelog,o as releaseDraft,E as releasePublish,i as releaseSnapshot,n as releaseVersion,C as resolveCleanStripList,x as visReleaseError};
package/index.js CHANGED
@@ -82,7 +82,7 @@ function requireNative() {
82
82
  const binding = require('@visulima/vis-binding-android-arm64')
83
83
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
84
84
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
85
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
86
  }
87
87
  return binding
88
88
  } catch (e) {
@@ -98,7 +98,7 @@ function requireNative() {
98
98
  const binding = require('@visulima/vis-binding-android-arm-eabi')
99
99
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
100
100
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
101
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -119,7 +119,7 @@ function requireNative() {
119
119
  const binding = require('@visulima/vis-binding-win32-x64-gnu')
120
120
  const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
121
121
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
122
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
123
  }
124
124
  return binding
125
125
  } catch (e) {
@@ -135,7 +135,7 @@ function requireNative() {
135
135
  const binding = require('@visulima/vis-binding-win32-x64-msvc')
136
136
  const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
137
137
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
138
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
139
  }
140
140
  return binding
141
141
  } catch (e) {
@@ -152,7 +152,7 @@ function requireNative() {
152
152
  const binding = require('@visulima/vis-binding-win32-ia32-msvc')
153
153
  const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
154
154
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
155
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
156
  }
157
157
  return binding
158
158
  } catch (e) {
@@ -168,7 +168,7 @@ function requireNative() {
168
168
  const binding = require('@visulima/vis-binding-win32-arm64-msvc')
169
169
  const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
170
170
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
171
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
172
  }
173
173
  return binding
174
174
  } catch (e) {
@@ -187,7 +187,7 @@ function requireNative() {
187
187
  const binding = require('@visulima/vis-binding-darwin-universal')
188
188
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
189
189
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
190
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
191
  }
192
192
  return binding
193
193
  } catch (e) {
@@ -203,7 +203,7 @@ function requireNative() {
203
203
  const binding = require('@visulima/vis-binding-darwin-x64')
204
204
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
205
205
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
206
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
207
  }
208
208
  return binding
209
209
  } catch (e) {
@@ -219,7 +219,7 @@ function requireNative() {
219
219
  const binding = require('@visulima/vis-binding-darwin-arm64')
220
220
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
221
221
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
222
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
223
  }
224
224
  return binding
225
225
  } catch (e) {
@@ -239,7 +239,7 @@ function requireNative() {
239
239
  const binding = require('@visulima/vis-binding-freebsd-x64')
240
240
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
241
241
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
242
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
243
  }
244
244
  return binding
245
245
  } catch (e) {
@@ -255,7 +255,7 @@ function requireNative() {
255
255
  const binding = require('@visulima/vis-binding-freebsd-arm64')
256
256
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
257
257
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
258
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
259
  }
260
260
  return binding
261
261
  } catch (e) {
@@ -276,7 +276,7 @@ function requireNative() {
276
276
  const binding = require('@visulima/vis-binding-linux-x64-musl')
277
277
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
278
278
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
279
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
280
  }
281
281
  return binding
282
282
  } catch (e) {
@@ -292,7 +292,7 @@ function requireNative() {
292
292
  const binding = require('@visulima/vis-binding-linux-x64-gnu')
293
293
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
294
294
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
296
  }
297
297
  return binding
298
298
  } catch (e) {
@@ -310,7 +310,7 @@ function requireNative() {
310
310
  const binding = require('@visulima/vis-binding-linux-arm64-musl')
311
311
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
312
312
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
313
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
314
  }
315
315
  return binding
316
316
  } catch (e) {
@@ -326,7 +326,7 @@ function requireNative() {
326
326
  const binding = require('@visulima/vis-binding-linux-arm64-gnu')
327
327
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
328
328
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
329
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
330
  }
331
331
  return binding
332
332
  } catch (e) {
@@ -344,7 +344,7 @@ function requireNative() {
344
344
  const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
345
345
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
346
346
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
347
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
348
  }
349
349
  return binding
350
350
  } catch (e) {
@@ -360,7 +360,7 @@ function requireNative() {
360
360
  const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
361
361
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
362
362
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
364
  }
365
365
  return binding
366
366
  } catch (e) {
@@ -378,7 +378,7 @@ function requireNative() {
378
378
  const binding = require('@visulima/vis-binding-linux-loong64-musl')
379
379
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
380
380
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
381
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
382
  }
383
383
  return binding
384
384
  } catch (e) {
@@ -394,7 +394,7 @@ function requireNative() {
394
394
  const binding = require('@visulima/vis-binding-linux-loong64-gnu')
395
395
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
396
396
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
397
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
398
  }
399
399
  return binding
400
400
  } catch (e) {
@@ -412,7 +412,7 @@ function requireNative() {
412
412
  const binding = require('@visulima/vis-binding-linux-riscv64-musl')
413
413
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
414
414
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
415
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
416
  }
417
417
  return binding
418
418
  } catch (e) {
@@ -428,7 +428,7 @@ function requireNative() {
428
428
  const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
429
429
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
430
430
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
431
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
432
  }
433
433
  return binding
434
434
  } catch (e) {
@@ -445,7 +445,7 @@ function requireNative() {
445
445
  const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
446
446
  const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
447
447
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
448
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
449
  }
450
450
  return binding
451
451
  } catch (e) {
@@ -461,7 +461,7 @@ function requireNative() {
461
461
  const binding = require('@visulima/vis-binding-linux-s390x-gnu')
462
462
  const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
463
463
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
464
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
465
  }
466
466
  return binding
467
467
  } catch (e) {
@@ -481,7 +481,7 @@ function requireNative() {
481
481
  const binding = require('@visulima/vis-binding-openharmony-arm64')
482
482
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
483
483
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
484
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
485
  }
486
486
  return binding
487
487
  } catch (e) {
@@ -497,7 +497,7 @@ function requireNative() {
497
497
  const binding = require('@visulima/vis-binding-openharmony-x64')
498
498
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
499
499
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
500
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
501
  }
502
502
  return binding
503
503
  } catch (e) {
@@ -513,7 +513,7 @@ function requireNative() {
513
513
  const binding = require('@visulima/vis-binding-openharmony-arm')
514
514
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
515
515
  if (bindingPackageVersion !== '4.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
- throw new Error(`Native binding package version mismatch, expected 6.4.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
516
+ throw new Error(`Native binding package version mismatch, expected 6.5.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
517
  }
518
518
  return binding
519
519
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/vis",
3
- "version": "6.4.4",
3
+ "version": "6.5.1",
4
4
  "description": "A monorepo dev toolkit — task runner, remote caching, security scanning, git hooks, and AI agent integrations — powered by @visulima/task-runner",
5
5
  "keywords": [
6
6
  "build",
@@ -118,7 +118,7 @@
118
118
  "@floating-ui/core": "1.8.0",
119
119
  "@floating-ui/dom": "1.8.0",
120
120
  "@visulima/error": "6.1.0",
121
- "@visulima/secret-scanner": "2.0.3",
121
+ "@visulima/secret-scanner": "2.1.0",
122
122
  "@visulima/source-map": "3.0.1",
123
123
  "@visulima/tabular": "4.1.0",
124
124
  "@visulima/task-runner": "3.0.3",
@@ -152,14 +152,14 @@
152
152
  }
153
153
  },
154
154
  "optionalDependencies": {
155
- "@visulima/vis-binding-darwin-arm64": "6.4.4",
156
- "@visulima/vis-binding-darwin-x64": "6.4.4",
157
- "@visulima/vis-binding-linux-arm64-gnu": "6.4.4",
158
- "@visulima/vis-binding-linux-arm64-musl": "6.4.4",
159
- "@visulima/vis-binding-linux-x64-gnu": "6.4.4",
160
- "@visulima/vis-binding-linux-x64-musl": "6.4.4",
161
- "@visulima/vis-binding-win32-arm64-msvc": "6.4.4",
162
- "@visulima/vis-binding-win32-x64-msvc": "6.4.4"
155
+ "@visulima/vis-binding-darwin-arm64": "6.5.1",
156
+ "@visulima/vis-binding-darwin-x64": "6.5.1",
157
+ "@visulima/vis-binding-linux-arm64-gnu": "6.5.1",
158
+ "@visulima/vis-binding-linux-arm64-musl": "6.5.1",
159
+ "@visulima/vis-binding-linux-x64-gnu": "6.5.1",
160
+ "@visulima/vis-binding-linux-x64-musl": "6.5.1",
161
+ "@visulima/vis-binding-win32-arm64-msvc": "6.5.1",
162
+ "@visulima/vis-binding-win32-x64-msvc": "6.5.1"
163
163
  },
164
164
  "engines": {
165
165
  "node": "^22.14.0 || >=24.10.0"
@@ -1,5 +0,0 @@
1
- import{createRequire as G}from"node:module";import{s as p}from"../packem_shared/index--eV4qIz5.js";import{VisReleaseError as h}from"../packem_shared/VisReleaseError-DZtgcKf8.js";let W;const B=t=>(W??=G(import.meta.url))(t),$=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,I=t=>{if(typeof $<"u"&&$.versions&&$.versions.node){const[e,r]=$.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return $.getBuiltinModule(t)}return B(t)},{realpathSync:J}=I("node:fs"),{readFile:y}=I("node:fs/promises"),{isAbsolute:w,join:_,dirname:S,resolve:K,relative:q}=I("node:path"),O=["alpha","beta","rc"],A=t=>{const e=[...p.prerelease(t)??[]];return e.length>1&&typeof e.at(-1)=="number"&&e.pop(),e.length>0?e.join("."):void 0},ce=(t,e)=>{if(e===void 0)return!0;const r=A(t);if(r===void 0||r===e)return!0;const n=O.indexOf(e),s=O.indexOf(r);return n!==-1&&s!==-1&&s<n},le=t=>{const{current:e,prerelease:r}=t;let{bump:n}=t;if(!p.valid(e))throw new h({code:"CONFIG_INVALID",message:`Invalid current version: ${JSON.stringify(e)}`});const s=p.parse(e),o=A(e),i=s.prerelease.length>0;if(s.major===0&&t.bumpMinorPreMajor&&(n==="major"&&(n="minor"),n==="minor"&&t.bumpPatchForMinorPreMajor&&(n="patch")),n==="none")return o===r?e:!i&&r?`${s.major}.${s.minor}.${s.patch}-${r}.0`:i&&!r?`${s.major}.${s.minor}.${s.patch}`:i&&r?`${s.major}.${s.minor}.${s.patch}-${r}.0`:e;if(i&&r&&o===r){const a=U(s);if(j[n]<=j[a]){const f=H(e,r);if(!f)throw new h({code:"CONFIG_INVALID",message:`semver.inc returned null for prerelease bump on ${e}`});return f}const c=`${s.major}.${s.minor}.${s.patch}`,u=p.inc(c,n);if(!u)throw new h({code:"CONFIG_INVALID",message:`semver.inc returned null for ${n} bump on ${c}`});return`${u}-${r}.0`}const l=p.inc(e,n);if(!l)throw new h({code:"CONFIG_INVALID",message:`semver.inc returned null for ${n} bump on ${e}`});return r?`${l}-${r}.0`:l},H=(t,e)=>{const r=p.parse(t),n=r.prerelease.at(-1);return typeof n!="number"?p.inc(t,"prerelease",e):`${r.major}.${r.minor}.${r.patch}-${e}.${n+1}`},j={major:3,minor:2,patch:1},U=t=>t.minor===0&&t.patch===0?"major":t.patch===0?"minor":"patch",ue=(t,e)=>{const r=Y(e);return r?p.satisfies(t,r,{includePrerelease:!0}):!0},Y=t=>{if(!t||t.startsWith("catalog:")||t==="*"||t==="workspace:*"||t==="workspace:^"||t==="workspace:~")return null;if(t.startsWith("workspace:")){const e=t.slice(10);return e==="*"||e==="^"||e==="~"?null:e}if(t.startsWith("npm:")){const e=t.lastIndexOf("@");return e>4?t.slice(e+1):null}return t},E={"Cargo.toml":"cargo","tauri.conf.json":"tauri"},N=Object.keys(E),z=t=>t.replaceAll("\\","/").split("/").pop()??t,v=t=>E[z(t)],Q=new Set(["package","workspace.package"]),X=/^\s*\[\[?\s*([^\]]+?)\s*\]\]?\s*(?:#.*)?$/,Z=/^(\s*version\s*=\s*)(["'])[^"']*\2/,F=(t,e,r=Q)=>{const n=t.split(`
2
- `);let s="",o=!1;for(let i=0;i<n.length;i++){const l=n[i],a=X.exec(l);if(a){s=a[1].replaceAll(/\s+/g,"");continue}if(!r.has(s))continue;const c=Z.exec(l);c&&(o=!0,n[i]=`${c[1]}${c[2]}${e}${c[2]}${l.slice(c[0].length)}`)}return o?{content:n.join(`
3
- `),found:o}:{found:o}},R=(t,e)=>{const r=[];let n,s=0;for(;s<t.length;){const o=t[s];if(o==="{"||o==="["){r.push({isObject:o==="{",key:n}),n=void 0,s++;continue}if(o==="}"||o==="]"){r.pop(),n=void 0,s++;continue}if(o===","){n=void 0,s++;continue}if(o!=='"'){s++;continue}const i=s;for(s++;s<t.length&&t[s]!=='"';)s+=t[s]==="\\"?2:1;s++;const l=t.slice(i,s);let a=s;for(;a<t.length&&/\s/.test(t[a]);)a++;if(t[a]===":"){n=JSON.parse(l),s=a+1;continue}const c=r[r.length-1];if(n!==void 0&&c?.isObject){const u=[...r.slice(1).map(f=>f.key??""),n];if(u.length===e.length&&u.every((f,d)=>f===e[d]))return{end:s,start:i,value:JSON.parse(l)}}}},V=t=>{if(typeof t!="object"||t===null)return;const e=t;if(typeof e.version=="string")return["version"];if(typeof e.package?.version=="string")return["package","version"]},C=(t,e)=>{let r;try{r=JSON.parse(t)}catch{return{delegated:!1,found:!1}}const n=V(r);if(!n)return{delegated:!1,found:!1};const s=R(t,n);return s?s.value.startsWith(".")||s.value.startsWith("/")?{delegated:!0,found:!0}:{content:`${t.slice(0,s.start)}${JSON.stringify(e)}${t.slice(s.end)}`,delegated:!1,found:!0}:{delegated:!1,found:!1}},P=async(t,e)=>{const r=v(t);if(r==="cargo"){const{parse:n}=await import("./index4.js"),s=n(e),o=s.package?.version,i=typeof o=="string"?o:s.workspace?.package?.version;return typeof i=="string"?{version:i}:void 0}if(r==="tauri"){let n;try{n=JSON.parse(e)}catch{return}const s=V(n);if(!s)return;const o=R(e,s);return o?o.value.startsWith(".")||o.value.startsWith("/")?{delegated:!0}:{version:o.value}:void 0}},L=(t,e)=>{for(const r of e)if(!v(r))throw new h({code:"CONFIG_INVALID",hint:`Supported basenames: ${N.join(", ")}. Use extraFiles for other manifests.`,message:`versionFiles entry "${r}" for ${t} is not a supported version manifest.`})},ee=async(t,e,r,n,s=new Map)=>{L(n,e);const o=[];for(const i of e){const l=v(i),a=w(i)?i:_(t,i);let c=s.get(a);if(c===void 0)try{c=await y(a,"utf8")}catch(f){const d=f.code==="ENOENT"?"does not exist":`could not be read (${f.message})`;throw new h({code:"CONFIG_INVALID",file:a,message:`versionFiles: ${n} → ${a} ${d}.`})}const u=l==="cargo"?F(c,r):C(c,r);if(!u.found)throw new h({code:"CONFIG_INVALID",file:a,message:`versionFiles: ${n} → no version field found in ${a}.`});u.content!==void 0&&u.content!==c&&o.push({content:u.content,path:a})}return{writes:o}},te=async t=>{const{entry:e,packageDir:r,packageName:n,packageVersion:s}=t,o=`version-files/${n}/${e}`,i=w(e)?e:_(r,e);if(!v(e))return{message:`${n}: versionFiles entry "${e}" is not a supported manifest. Supported basenames: ${N.join(", ")}.`,name:o,severity:"warn",status:"fail"};let l;try{l=await y(i,"utf8")}catch{return{message:`${n}: versionFiles entry "${e}" doesn't exist (expected ${i}).`,name:o,severity:"warn",status:"fail"}}let a;try{a=await P(e,l)}catch(c){return{message:`${n}: could not parse ${i}: ${c.message}`,name:o,severity:"warn",status:"fail"}}return a?.delegated?{message:`${e} of ${n} delegates its version to another file.`,name:o,severity:"info",status:"pass"}:a?.version===void 0?{message:`${n}: no version field found in ${i}.`,name:o,severity:"warn",status:"fail"}:a.version===s?{message:`${e} of ${n} matches package.json (${s}).`,name:o,severity:"info",status:"pass"}:{message:`${n}: ${e} declares ${a.version} but package.json declares ${s}. Set the two to the same version by hand; the next release only rewrites them when it bumps the package.`,name:o,severity:"warn",status:"fail"}},fe=Object.defineProperty({__proto__:null,SUPPORTED_VERSION_FILES:N,applyVersionFilesForRelease:ee,assertSupportedVersionFiles:L,checkVersionFile:te,readManifestVersion:P,resolveVersionFileKind:v,rewriteCargoVersion:F,rewriteTauriVersion:C},Symbol.toStringTag,{value:"Module"}),ne="[[package]]",x=(t,e,r)=>{const n=t.split(`
4
- `);let s=!1,o=-1;const i=[];for(const[l,a]of n.entries())a.trim()===ne&&(o!==-1&&i.push({end:l,start:o}),o=l);o!==-1&&i.push({end:n.length,start:o});for(const{end:l,start:a}of i){let c,u=-1,f=!1;for(let d=a+1;d<l;d++){const m=n[d],g=/^name\s*=\s*"([^"]+)"\s*$/.exec(m),k=/^version\s*=\s*"[^"]*"\s*$/.exec(m);g&&c===void 0?[,c]=g:k&&u===-1?u=d:/^source\s*=/.test(m)&&(f=!0)}c!==e||f||u===-1||(n[u]=`version = "${r}"${n[u].endsWith("\r")?"\r":""}`,s=!0)}return s?{content:n.join(`
5
- `),found:s}:{found:s}},b=t=>{const e=K(t);try{return J.native(e)}catch{return e}},D=async(t,e)=>M(t,e,"Cargo.lock"),M=async(t,e,r)=>{const n=b(e);let s=b(t);for(;;){const o=_(s,r);try{return await y(o,"utf8"),o}catch{}if(s===n)return;const i=S(s),l=q(n,i);if(i===s||l.startsWith("..")||w(l))return;s=i}},T=async(t,e)=>{const{parse:r}=await import("./index4.js");try{const n=r(t);return typeof n.package?.name=="string"?n.package.name:void 0}catch(n){throw new h({cause:n,code:"CONFIG_INVALID",file:e,message:`Failed to parse ${e}: ${n.message}`})}},se=(t,e)=>{const r=new Set;for(const n of e.versionFiles??[])v(n)==="cargo"&&r.add(w(n)?n:_(t,n));if(e.versionActions==="cargo"){const n=e.cargoTomlPath??"Cargo.toml";r.add(w(n)?n:_(t,n))}return[...r]},re=async t=>{const{entries:e,pending:r,workspaceRoot:n}=t,s=[],o=[];for(const{manifestPath:i,newVersion:l}of e){let a=r.get(i);if(a===void 0)try{a=await y(i,"utf8")}catch{continue}const c=await T(a,i);if(c===void 0)continue;const u=await D(S(i),n);if(u===void 0)continue;let f=r.get(u);f===void 0&&(f=await y(u,"utf8"));const d=x(f,c,l);if(!d.found){s.push(`cargo-lock: ${c} has no workspace-member entry in ${u}; run \`cargo generate-lockfile\` or build once to add it.`);continue}if(d.content!==void 0&&d.content!==f){r.set(u,d.content);const m=o.findIndex(k=>k.path===u),g={content:d.content,path:u};m===-1?o.push(g):o[m]=g}}return{warnings:s,writes:o}},de=Object.defineProperty({__proto__:null,canonicalPath:b,cargoManifestPaths:se,findCargoLock:D,findLockfile:M,readCrateName:T,rewriteCargoLockVersion:x,syncCargoLocks:re},Symbol.toStringTag,{value:"Module"});export{b as a,se as b,Y as c,le as d,ue as e,M as f,de as g,ce as i,F as r,re as s,fe as v};
@@ -1,11 +0,0 @@
1
- import{createRequire as je}from"node:module";import{z as N,e as g,$ as _e,m as V}from"../packem_shared/index-0dnGN3GP.js";import{L as Re,q as X,u as oe,R as C,O as W,X as De,e as J,p as P,g as ce,F as I,f as Oe,G as ie,J as H,h as le,i as D}from"../packem_shared/registry-D8odQGcR.js";import{L as ue}from"../packem_shared/index-CIdjkZgt.js";import{y as h}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{U as A,h as O,e as Le,i as Me}from"../packem_shared/env-Aebh_7xU.js";import{f as Ue}from"../packem_shared/removeSync-g1D5kONg-jOsRSIIv.js";import{p as b}from"../packem_shared/package-version-ChA7gKlB.js";import{g as pe,T as fe,l as Wt}from"../packem_shared/npmrc-CIvOb61L.js";import{p as cn}from"../packem_shared/npmrc-CIvOb61L.js";import{O as ge}from"../packem_shared/renderToString-DR0zDUjh-lzGitq_6.js";import{q as We}from"../packem_shared/table-B80pPNSi.js";import{f as Ie}from"../packem_shared/osv-CtKBUlaU.js";import{a as Be}from"../packem_shared/index--eV4qIz5.js";import{a as Z}from"../packem_shared/advisories-CePsyvwG.js";let Ce;const Ae=t=>(Ce??=je(import.meta.url))(t),j=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xe=t=>{if(typeof j<"u"&&j.versions&&j.versions.node){const[e,n]=j.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return j.getBuiltinModule(t)}return Ae(t)},{createInterface:Fe}=xe("node:readline"),G=["dependencies","devDependencies","optionalDependencies"],Ge=new Set([...G,"overrides","peerDependencies","pnpm.overrides","resolutions"]),x=t=>{const e=t.lastIndexOf(":");if(e===-1)return;const n=t.slice(e+1);if(Ge.has(n))return{depType:n,relativePath:t.slice(0,e)}},L=t=>{const e=ue("vis",{create:!0,cwd:t});if(!e)throw new Error("Cannot resolve cache directory. Ensure node_modules exists in your workspace. Run your package manager's install command first.");return g(e,"backup")},Y=(t,e)=>e==="bun"?g(t,"package.json"):g(t,"pnpm-workspace.yaml"),K=(t,e)=>{const n=L(t),s=new Set;for(const a of e){const r=x(a.catalogName);r&&s.add(r.relativePath==="."?"package.json":g(r.relativePath,"package.json"))}if(s.size!==0){O(n);for(const a of s){const r=g(t,a);if(h(r)){const o=g(n,a),c=V(o);O(c),A(o,N(r))}}return n}},q=(t,e)=>{const n=Y(t,e),s=L(t);return g(s,`${_e(n)}.bak`)},Ve=(t,e,n)=>{if((e==="npm"||e==="yarn")&&n)return K(t,n);let s;const a=Y(t,e);if(h(a)&&(s=q(t,e),O(V(s)),A(s,N(a))),n){const r=n.filter(o=>x(o.catalogName));r.length>0&&K(t,r)}return s},Xe=t=>{const e=L(t);if(!h(e))return!1;for(const n of Re(e,{includeDirs:!1})){const s=n.path.slice(e.length+1),a=g(t,s);A(a,N(n.path))}return Ue(e),!0},Xt=(t,e)=>{if(e==="npm"||e==="yarn")return Xe(t);const n=Y(t,e),s=q(t,e);if(!h(s))return!1;const a=N(s);return A(n,a),!0},Jt=(t,e)=>{if(e==="npm"||e==="yarn")try{const n=L(t);return h(n)}catch{return!1}try{return h(q(t,e))}catch{return!1}},de=t=>{if(h(t))try{return b(t)}catch{return}},Je=t=>{const e=de(g(t,"package.json"));return!!(e?.workspaces?.catalog||e?.workspaces?.catalogs)},He=t=>{const e=new Map;if(t.workspaces?.catalog&&typeof t.workspaces.catalog=="object"&&e.set("default",new Map(Object.entries(t.workspaces.catalog))),t.workspaces?.catalogs&&typeof t.workspaces.catalogs=="object")for(const[n,s]of Object.entries(t.workspaces.catalogs))s&&typeof s=="object"&&e.set(n,new Map(Object.entries(s)));return e},Ye=t=>{const e=de(g(t,"package.json"));return e?He(e):new Map},qe=(t,e,n)=>{const s=g(t,"package.json"),a=b(s);for(const r of e)if(r.catalogName==="default")a.workspaces?.catalog&&(a.workspaces.catalog[r.packageName]=r.newRange);else{const o=a.workspaces?.catalogs?.[r.catalogName];o&&(o[r.packageName]=r.newRange)}X(s,a,{indent:oe(s,{useEditorconfig:n}),overwrite:!0})},ze=/\*+/g,Qe=/[.+^${}()|[\]\\]/g,ee=new Map,E=(t,e)=>{let n=ee.get(e);if(!n){const a=e.replaceAll(ze,"*").replaceAll(Qe,String.raw`\$&`);n=new RegExp(`^${a.replaceAll("*",".*").replaceAll("?",".")}$`),ee.set(e,n)}return n.test(t)},me=(t,e,n)=>n.some(s=>E(t,s))?!1:e.length>0?e.some(s=>E(t,s)):!0,te=new Map,he=(t,e,n)=>{if(!n)return e;const s=n[t];if(s!==void 0)return s;for(const[a,r]of Object.entries(n))if(a!==t){if(a.startsWith("/")&&a.endsWith("/")){let o=te.get(a);if(o||(o=new RegExp(a.slice(1,-1)),te.set(a,o)),o.test(t))return r}else if(E(t,a))return r}return e},Ze=/^(?:'([^']+)'|"([^"]+)"|([^:\s]+)):\s*(?:'([^']+)'|"([^"]+)"|(\S+))/,Ke=/^catalog:/m,et=/^catalogs:/m,ke=/^['"]|['"]$/g,we=t=>{const e=Ze.exec(t);if(!e)return;const n=e[1]??e[2]??e[3],s=e[4]??e[5]??e[6];if(!(!n||!s))return[n,s]},ye=(t,e,n,s)=>{t.has(e)||t.set(e,new Map);const a=t.get(e);a&&a.set(n,s)},tt=(t,e,n)=>{if(n<2)return;const s=we(e);s&&ye(t,"default",s[0],s[1])},nt=(t,e,n,s)=>{if(n===2&&e.endsWith(":"))return e.slice(0,-1).trim().replaceAll(ke,"");if(n>=4&&s){const a=we(e);a&&ye(t,s,a[0],a[1])}return s},$e=t=>t==="catalog:"||t.startsWith("catalog:")?"catalog":t==="catalogs:"||t.startsWith("catalogs:")?"catalogs":"none",st=t=>{const e=new Map;let n="none",s="";for(const a of t.split(`
2
- `)){const r=a.trimStart(),o=a.length-r.length;if(o===0&&r.length>0&&!r.startsWith("#")){n=$e(r),n==="catalogs"&&(s="");continue}r.length===0||r.startsWith("#")||(n==="catalog"&&tt(e,r,o),n==="catalogs"&&(s=nt(e,r,o,s)))}return e},at=t=>{const e=g(t,"pnpm-workspace.yaml");if(!h(e))return!1;const n=N(e);return Ke.test(n)||et.test(n)},rt=t=>{const e=g(t,"pnpm-workspace.yaml");if(!h(e))return new Map;const n=N(e);return st(n)},ne=/[.*+?^${}()|[\]\\]/g,ot=(t,e)=>{const n=t.replaceAll(ne,String.raw`\$&`),s=e.replaceAll(ne,String.raw`\$&`);return new RegExp(String.raw`^(?:'${n}'|"${n}"|${n}):\s*['"]?${s}['"]?`)},ct=(t,e,n)=>ot(e,n).test(t),it=t=>{const e=new Map;for(const n of t){e.has(n.catalogName)||e.set(n.catalogName,new Map);const s=e.get(n.catalogName);s&&s.set(n.packageName,{newRange:n.newRange,oldRange:n.currentRange})}return e},se=(t,e,n)=>{if(!n)return t;for(const[s,{newRange:a,oldRange:r}]of n)if(ct(e,s,r))return t.replace(r,a);return t},lt=(t,e,n,s)=>{const a=t.trimStart(),r=t.length-a.length;return a.length===0||a.startsWith("#")?t:e==="catalog"&&r>=2?se(t,a,s.get("default")):e==="catalogs"&&r>=4&&n?se(t,a,s.get(n)):t},ut=(t,e)=>{const n=g(t,"pnpm-workspace.yaml"),a=N(n).split(`
3
- `),r=it(e);let o="none",c="";const i=[];for(const l of a){const u=l.trimStart(),p=l.length-u.length;p===0&&u.length>0&&!u.startsWith("#")&&(o=$e(u),o==="catalogs"&&(c="")),o==="catalogs"&&p===2&&u.endsWith(":")&&(c=u.slice(0,-1).trim().replaceAll(ke,"")),i.push(lt(l,o,c,r))}A(n,i.join(`
4
- `))},pt=/github\.com[/:]([\w.-]+)\/([\w.-]+?)(?:\.git|\/|$)/,Ht=async(t,e=1e4,n)=>{const s=[],a=new AbortController,r=setTimeout(()=>{a.abort()},e),o=async u=>{const p=`https://www.npmjs.com/package/${u.packageName}`;try{const f=n?pe(u.packageName,n):{url:"https://registry.npmjs.org"},w=f.url.replace(fe,""),y={Accept:"application/json"};f.token&&(y.Authorization=`Bearer ${f.token}`);const m=await fetch(`${w}/${u.packageName}/latest`,{headers:y,signal:a.signal});if(!m.ok)return{npmUrl:p,packageName:u.packageName};const $=(await m.json()).repository?.url;if(!$)return{npmUrl:p,packageName:u.packageName};const d=pt.exec($);if(!d)return{npmUrl:p,packageName:u.packageName,repoUrl:$};const v=d[1],T=d[2],k=`https://github.com/${v}/${T}/releases/tag/v${u.targetVersion}`;return{npmUrl:p,packageName:u.packageName,releaseUrl:k,repoUrl:`https://github.com/${v}/${T}`}}catch{return{npmUrl:p,packageName:u.packageName}}},c=Math.min(8,t.length);let i=0;const l=async()=>{for(;i<t.length;){const u=i;i+=1,s[u]=await o(t[u])}};try{await Promise.all(Array.from({length:c},()=>l()))}finally{clearTimeout(r)}return s},Yt=t=>JSON.stringify(t,void 0,2),qt=t=>t.map(e=>`${e.packageName} ${e.currentRange} → ${e.newRange}`).join(`
5
- `),ft=t=>{const e=new Map;for(const n of t){e.has(n.catalogName)||e.set(n.catalogName,[]);const s=e.get(n.catalogName);s&&s.push(n)}return e},gt=t=>{const e=x(t);return e?`${e.relativePath==="."?"root":e.relativePath} (${e.depType})`:`Catalog: ${t}`},zt=(t,e)=>{const n=ft(t),s=process.stdout.columns||80,a=t.some(r=>r.socketReport);for(const[r,o]of n){const c=o.flatMap(u=>{const p=u.vulnerabilities&&u.vulnerabilities.length>0,f=u.socketReport&&u.socketReport.alerts.length>0,y=`${p||f?"[SEC] ":""}${u.packageName}`,m=u.socketReport?`${String(Math.round(u.socketReport.score.overall*100))}%`:"",S={current:u.currentRange,package:y,target:u.newRange,type:u.updateType};a&&(S.score=m);const $=[S];if(u.vulnerabilities)for(const d of u.vulnerabilities){const v={current:d.summary,package:` ${d.severity} ${d.id}`,target:"",type:""};a&&(v.score=""),$.push(v)}if(u.socketReport)for(const d of u.socketReport.alerts){const v={current:d.category,package:` [${d.severity.toUpperCase()}] ${d.type}`,target:"",type:""};a&&(v.score=""),$.push(v)}return $}),i=gt(r),l=ge(C.createElement(We,{data:c}),{columns:s});e.info(`${i}
6
- ${l}
7
- `)}},Qt=(t,e=Le)=>{let n=0,s=0,a=0,r=0,o=0,c=0;for(const f of t)f.updateType==="major"?n++:f.updateType==="minor"?s++:a++,f.vulnerabilities&&f.vulnerabilities.length>0&&r++,f.socketReport?.alerts.length&&o++,f.socketReport&&f.socketReport.score.overall<e&&c++;const i=[];n&&i.push(`${String(n)} major`),s&&i.push(`${String(s)} minor`),a&&i.push(`${String(a)} patch`),r&&i.push(`${String(r)} with vulnerabilities`),o&&i.push(`${String(o)} with Socket.dev alerts`);const l=`Found ${String(t.length)} outdated (${i.join(", ")})`,u=process.stdout.columns||80,p=[C.createElement(W,{bold:!0},"─ Summary"),C.createElement(W,null,` ${l}`)];return c>0&&p.push(C.createElement(W,{color:"yellow"},` ${String(c)} package${c===1?"":"s"} with low Socket.dev score (<${String(Math.round(e*100))}%)`)),ge(C.createElement(De,{flexDirection:"column",paddingX:1},...p),{columns:u})},ve=15e3,dt=async(t,e,n=ve,s=!1)=>{const r=`${(e?.url??"https://registry.npmjs.org").replace(fe,"")}/${t}`,o=s?{Accept:"application/json"}:{Accept:"application/vnd.npm.install-v1+json"};e?.authToken&&(o.Authorization=`Bearer ${e.authToken}`);const c=new AbortController,i=setTimeout(()=>{c.abort()},n);try{const l=await fetch(r,{headers:o,signal:c.signal});if(!l.ok)throw new Error(`Failed to fetch ${t}: ${String(l.status)} ${l.statusText}`);const u=await l.json(),p={latest:u["dist-tags"]?.latest??"",versions:Object.keys(u.versions??{})};return s&&u.time&&(p.publishTimes=new Map(Object.entries(u.time))),p}finally{clearTimeout(i)}},mt=async(t,e,n,s=!1,a)=>{const r=new Map,o=[],c=Math.max(1,Math.min(64,Math.floor(a??8)||8));let i=0,l=0;const u=async w=>{try{const y=e?pe(w,e):void 0,m=await dt(w,y?{authToken:y.token,url:y.url}:void 0,ve,s);r.set(w,m)}catch{o.push(w)}finally{i+=1,n&&n(i,t.length)}},p=async()=>{for(;l<t.length;){const w=t[l];l+=1,await u(w)}},f=Math.min(c,t.length);return await Promise.all(Array.from({length:f},()=>p())),{failed:o,versionCache:r}},Se=(t,e,n)=>{const s=e?.get(t);return s?Date.now()-new Date(s).getTime()<n:!1},ht=t=>t?.minimumReleaseAge?t.packageName&&t.minimumReleaseAgeExclude?.some(n=>E(t.packageName,n))?0:t.minimumReleaseAge*60*1e3:0,be=(t,e)=>e??(t?"any":"stable"),B=(t,e,n,s,a,r,o)=>{const c=be(n,o);return t.map(l=>({parsed:P(l),raw:l})).filter(l=>!l.parsed||!ie(l.parsed,e,c)||!H(e,l.parsed)||s&&Se(l.raw,a,s)?!1:r?r(l.parsed):!0).toSorted((l,u)=>Be.rcompare(l.raw,u.raw))[0]?.raw},kt=(t,e,n,s,a,r,o)=>{const c=P(n);if(!c)return;const i=ht(r),l=be(a,o);if(s==="latest"){const p=P(e);return p?ie(p,c,l)?H(c,p)?!i||!Se(e,r?.publishTimes,i)?e:B(t,c,a,i,r?.publishTimes,void 0,l):void 0:B(t,c,a,i,r?.publishTimes,void 0,l):void 0}const u=s==="patch"?p=>p.major===c.major&&p.minor===c.minor:p=>p.major===c.major;return B(t,c,a,i,r?.publishTimes,u,l)},wt=(t,e)=>{const n=[],s=new Set;for(const[a,r]of t)for(const[o,c]of r)if(!(c.startsWith("workspace:")||c.startsWith("file:")||c.startsWith("link:")||c==="*")&&!(!e.includeLocked&&!J(c))){if(e.ignore.some(i=>E(o,i))){s.add(o);continue}me(o,e.include,e.exclude)&&n.push({catalogName:a,packageName:o,range:c})}return{entries:n,ignored:[...s]}},ae=(t,e,n)=>{const s=[];for(const a of t){const r=e.get(a.packageName);if(!r)continue;const o=he(a.packageName,n.target,n.packageMode),c=kt(r.versions,r.latest,a.range,o,n.includePrerelease,{minimumReleaseAge:n.minimumReleaseAge,minimumReleaseAgeExclude:n.minimumReleaseAgeExclude,packageName:a.packageName,publishTimes:r.publishTimes},n.releaseChannel);if(!c)continue;const i=P(a.range),l=P(c);if(!i||!l)continue;const u=ce(i,l);if(u==="none")continue;const p=J(a.range);s.push({catalogName:a.catalogName,currentRange:a.range,newRange:`${p}${c}`,packageName:a.packageName,targetVersion:c,updateType:u})}return s},yt=async(t,e,n,s)=>{const a=[...new Map(e.map(i=>{const l=I(P(i.range));return[Z(i.packageName,l),{name:i.packageName,version:l}]})).values()].filter(i=>i.version),r=n&&n.length>0?Oe(n,a):void 0,[o,c]=await Promise.all([Ie(a),r]);for(const i of t){const l=o.get(Z(i.packageName,I(P(i.currentRange))));l&&l.length>0&&(i.vulnerabilities=l);const u=P(i.currentRange),p=I(u);if(c){const f=c.get(`${i.packageName}@${p}`);f&&(i.socketReport={alerts:f.alerts,license:f.license,score:f.score})}if(s){const f=Me(i.packageName,p,s);f&&(i.acceptedRisk=f)}}},$t=6e4,vt=(t,e,n,s)=>{const a=[];for(const[c,i]of t)for(const[l,u]of i)a.push(`${c}:${l}=${u}`);if(a.push(`target=${e.target},pre=${String(e.includePrerelease)},chan=${e.releaseChannel??"_"},sec=${String(e.security??!1)}`),a.push(`in=${e.include.join(",")},ex=${e.exclude.join(",")},ig=${e.ignore.join(",")}`),a.push(`locked=${String(e.includeLocked)}`),a.push(`mra=${String(e.minimumReleaseAge??0)}`),e.packageMode){const c=Object.entries(e.packageMode).map(([i,l])=>`${i}=${l}`).toSorted().join(",");a.push(`pkgMode=${c}`)}a.push(`socket=${String(n??!1)}`),s&&s.length>0&&a.push(`risks=${s.toSorted().join(",")}`);let r=5381;const o=a.join("|");for(let c=0;c<o.length;c++)r=(r<<5)+r+o.charCodeAt(c)|0;return String(r)},Te=t=>{const e=ue("vis",{create:!0,cwd:t});return e?g(e,"outdated-cache.json"):void 0},St=(t,e)=>{const n=Te(t);if(!(!n||!h(n)))try{const s=b(n);if(s.hash===e&&Date.now()-s.timestamp<$t)return s.result}catch{}},bt=(t,e,n)=>{const s=Te(t);if(s)try{O(V(s)),X(s,{hash:e,result:n,timestamp:Date.now()})}catch{}},Zt=async(t,e,n,s,a,r,o)=>{const c=!!(r&&r.length>0),i=vt(t,e,c,o?Object.keys(o):void 0);if(a){const d=St(a,i);if(d)return d}const{entries:l,ignored:u}=wt(t,e),p=[...new Set(l.map(d=>d.packageName))],f=!!(e.minimumReleaseAge&&e.minimumReleaseAge>0),{failed:w,versionCache:y}=await mt(p,n,s,f,e.maxConcurrentRequests),m=ae(l,y,e);let S=[];if(e.target!=="latest"){const d=new Set(m.map(k=>k.packageName)),v={...e,packageMode:void 0,target:"latest"};S=ae(l,y,v).filter(k=>!d.has(k.packageName))}(e.security||c)&&m.length>0&&await yt(m,l,r,o);const $={checkedCount:p.length,failed:w,filteredByTarget:S,ignored:u,outdated:m};return a&&bt(a,i,$),$},Kt=async t=>{const e=Fe({input:process.stdin,output:process.stdout}),n=a=>new Promise(r=>{e.question(a,o=>{r(o.trim())})});process.stdout.write(`
8
- Outdated catalog dependencies:
9
- `);for(const[a,r]of t.entries())r&&process.stdout.write(` ${String(a+1)}. ${r.packageName}: ${r.currentRange} → ${r.newRange} (${r.updateType})
10
- `);process.stdout.write(`
11
- `);const s=await n("Apply updates? [a]ll / [n]one / [s]elect: ");if(s.toLowerCase()==="a"||s.toLowerCase()==="all")return e.close(),t;if(s.toLowerCase()==="n"||s.toLowerCase()==="none")return e.close(),[];if(s.toLowerCase()==="s"||s.toLowerCase()==="select"){const a=await n("Enter numbers to apply (comma-separated): ");return e.close(),a.split(",").map(o=>Number.parseInt(o.trim(),10)-1).filter(o=>o>=0&&o<t.length).map(o=>t[o]).filter(o=>o!==void 0)}return e.close(),[]},Pe=t=>t?.dev?["devDependencies"]:t?.prod?["dependencies"]:t?.depFields&&t.depFields.length>0?t.depFields:t?.peer?[...G,"peerDependencies"]:G,Tt=(t,e,n)=>{const s=new Set;e&&s.add(e);for(const a of n){const r=g(t,a,"package.json");if(h(r))try{const o=b(r);o.name&&s.add(o.name)}catch{}}return s},z=(t,e)=>{const n=e.split(".");let s=t;for(const a of n)if(s&&typeof s=="object")s=s[a];else return;return typeof s=="object"&&s!==null?s:void 0},Pt=(t,e,n,s)=>{const a=e.split(".");let r=t;for(const c of a.slice(0,-1))(!r[c]||typeof r[c]!="object")&&(r[c]={}),r=r[c];const o=a.at(-1);(!r[o]||typeof r[o]!="object")&&(r[o]={}),r[o][n]=s},Nt=(t,e)=>{const n=new Map;for(const[s,a]of Object.entries(t))e.has(s)||a.startsWith("workspace:")||a.startsWith("file:")||a.startsWith("link:")||a.startsWith("catalog:")||a.startsWith("$")||n.set(s,a);return n},Et=(t,e,n,s,a,r)=>{const o=e==="."?n:g(t,e,"package.json");if(!h(o))return;let c;try{c=b(o)}catch{return}for(const i of s){const l=i.includes(".")?z(c,i):c[i];if(!l||typeof l!="object")continue;const u=Nt(l,a);u.size>0&&r.set(`${e}:${i}`,u)}},jt=(t,e)=>{const n=new Map,s=g(t,"package.json");if(!h(s))return n;const a=b(s);let r=[];const o=le(t);if(o)r=D(t,o);else{const u=a.workspaces;if(u){const p=Array.isArray(u)?u:u.packages;p&&(r=D(t,p))}}const c=e?.includeInternal?new Set:Tt(t,a.name,r),i=Pe(e),l=[".",...r];for(const u of l)Et(t,u,s,i,c,n);return n},F=t=>{const e=g(t,"package.json");if(!h(e))return!1;try{const n=b(e);return!!(n.dependencies||n.devDependencies||n.peerDependencies||n.optionalDependencies||n.overrides||n.resolutions||z(n,"pnpm.overrides"))}catch{return!1}},re=(t,e,n)=>{const s=new Map;for(const a of e){const r=x(a.catalogName);if(!r)continue;const o=r.relativePath==="."?g(t,"package.json"):g(t,r.relativePath,"package.json");s.has(o)||s.set(o,[]);const c=s.get(o);c&&c.push({depType:r.depType,newRange:a.newRange,packageName:a.packageName})}for(const[a,r]of s){const o=b(a);for(const{depType:c,newRange:i,packageName:l}of r)c.includes(".")?Pt(o,c,l,i):o[c]&&(o[c][l]=i);X(a,o,{indent:oe(a,{useEditorconfig:n}),overwrite:!0})}},en=(t,e)=>e==="bun"?Je(t)||F(t):e==="npm"||e==="yarn"?F(t):at(t)||F(t),tn=(t,e,n)=>{let s;e==="bun"?s=Ye(t):e==="npm"||e==="yarn"?s=new Map:s=rt(t);const a=jt(t,n);for(const[r,o]of a)s.has(r)||s.set(r,o);return s},Ct=(t,e)=>{const n=new Map;for(const s of e){const a=g(t,s,"package.json");if(h(a))try{const r=b(a);r.name&&r.version&&n.set(r.name,r.version)}catch{}}return n},nn=(t,e)=>{const n=g(t,"package.json");if(!h(n))return{ignored:[],outdated:[]};const s=b(n);let a=[];const r=le(t);if(r)a=D(t,r);else{const m=s.workspaces;if(m){const S=Array.isArray(m)?m:m.packages;S&&(a=D(t,S))}}const o=Ct(t,a);if(o.size===0)return{ignored:[],outdated:[]};const c=Pe(e),i=[".",...a],l=e?.include??[],u=e?.exclude??[],p=e?.ignore??[],f=e?.target??"latest",w=new Set,y=[];for(const m of i){const S=m==="."?n:g(t,m,"package.json");if(!h(S))continue;let $;try{$=b(S)}catch{continue}for(const d of c){const v=d.includes(".")?z($,d):$[d];if(!(!v||typeof v!="object"))for(const[T,k]of Object.entries(v)){const _=o.get(T);if(!_||k.startsWith("workspace:")||k.startsWith("file:")||k.startsWith("link:")||k.startsWith("catalog:")||k.startsWith("$")||k==="*")continue;if(p.some(Ee=>E(T,Ee))){w.add(T);continue}if(!me(T,l,u))continue;const M=P(k),U=P(_);if(!M||!U||!H(M,U))continue;const R=ce(M,U);if(R==="none")continue;const Q=he(T,f,e?.packageMode);if(Q==="patch"&&R!=="patch"||Q==="minor"&&R==="major")continue;const Ne=J(k);y.push({catalogName:`${m}:${d}`,currentRange:k,newRange:`${Ne}${_}`,packageName:T,targetVersion:_,updateType:R})}}}return{ignored:[...w],outdated:y}},sn=t=>t?Array.isArray(t)?t:[t]:[],an=(t,e,n,s=!0,a={})=>{const{useEditorconfig:r}=a;let o;s&&(o=Ve(t,n,e));const c=[],i=[];for(const l of e)x(l.catalogName)?i.push(l):c.push(l);return c.length>0&&(n==="npm"||n==="yarn"?re(t,c,r):n==="bun"?qe(t,c,r):ut(t,c)),i.length>0&&re(t,i,r),o};export{an as applyCatalogUpdates,re as applyPackageJsonUpdates,Zt as checkOutdated,nn as collectInternalOutdated,Ve as createBackup,J as extractPrefix,Ht as fetchChangelogInfo,dt as fetchPackageVersions,Ie as fetchVulnerabilities,kt as findTargetVersion,Yt as formatOutdatedJson,qt as formatOutdatedMinimal,zt as formatOutdatedTable,Qt as formatSummary,pe as getRegistryForPackage,ce as getUpdateType,ft as groupByCatalog,Jt as hasBackup,en as hasCatalogs,F as hasPackageJsonDeps,H as isNewer,Wt as loadNpmrc,me as matchesFilters,E as matchesPattern,He as parseBunCatalogs,st as parseCatalogsFromYaml,x as parseCompositeCatalogName,cn as parseNpmrc,P as parseVersion,Kt as promptPackageSelection,tn as readCatalogs,jt as readPackageJsonDeps,he as resolvePackageTarget,Xt as restoreFromBackup,sn as toFilterArray};