@visulima/vis 2.0.0 → 2.0.2

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 (220) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE.md +862 -170
  3. package/README.md +1 -1
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +2 -2
  6. package/dist/config/index.d.ts +1817 -1811
  7. package/dist/generate/index.d.ts +39 -39
  8. package/dist/packem_chunks/CONFIG_FILES.js +5 -5
  9. package/dist/packem_chunks/bloom-status.js +1 -1
  10. package/dist/packem_chunks/bloom-sync.js +1 -1
  11. package/dist/packem_chunks/cache-attestation.js +1 -1
  12. package/dist/packem_chunks/catalog.js +69 -67
  13. package/dist/packem_chunks/cli-exec.js +1 -1
  14. package/dist/packem_chunks/cli-main.js +150 -145
  15. package/dist/packem_chunks/detect.js +3 -3
  16. package/dist/packem_chunks/detect2.js +4 -4
  17. package/dist/packem_chunks/dispatch.js +3 -3
  18. package/dist/packem_chunks/doctor-probe.js +1 -1
  19. package/dist/packem_chunks/extra-files.js +3 -3
  20. package/dist/packem_chunks/fix.js +9 -9
  21. package/dist/packem_chunks/handler.js +1 -1
  22. package/dist/packem_chunks/handler10.js +5 -5
  23. package/dist/packem_chunks/handler11.js +1 -1
  24. package/dist/packem_chunks/handler12.js +6 -6
  25. package/dist/packem_chunks/handler13.js +1 -1
  26. package/dist/packem_chunks/handler14.js +1 -1
  27. package/dist/packem_chunks/handler15.js +1 -1
  28. package/dist/packem_chunks/handler16.js +1 -1
  29. package/dist/packem_chunks/handler17.js +1 -1
  30. package/dist/packem_chunks/handler18.js +1 -1
  31. package/dist/packem_chunks/handler19.js +1 -1
  32. package/dist/packem_chunks/handler2.js +1 -1
  33. package/dist/packem_chunks/handler20.js +2 -2
  34. package/dist/packem_chunks/handler21.js +2 -2
  35. package/dist/packem_chunks/handler22.js +10 -10
  36. package/dist/packem_chunks/handler23.js +1 -1
  37. package/dist/packem_chunks/handler24.js +1 -1
  38. package/dist/packem_chunks/handler25.js +1 -1
  39. package/dist/packem_chunks/handler26.js +5 -5
  40. package/dist/packem_chunks/handler27.js +1 -1
  41. package/dist/packem_chunks/handler28.js +3 -3
  42. package/dist/packem_chunks/handler29.js +1 -1
  43. package/dist/packem_chunks/handler3.js +2 -3
  44. package/dist/packem_chunks/handler30.js +1 -1
  45. package/dist/packem_chunks/handler31.js +2 -2
  46. package/dist/packem_chunks/handler35.js +3 -3
  47. package/dist/packem_chunks/handler4.js +4 -4
  48. package/dist/packem_chunks/handler40.js +10 -10
  49. package/dist/packem_chunks/handler42.js +3 -3
  50. package/dist/packem_chunks/handler43.js +3 -3
  51. package/dist/packem_chunks/handler5.js +5 -5
  52. package/dist/packem_chunks/handler50.js +5 -5
  53. package/dist/packem_chunks/handler51.js +13 -13
  54. package/dist/packem_chunks/handler52.js +3 -3
  55. package/dist/packem_chunks/handler53.js +1 -1
  56. package/dist/packem_chunks/handler54.js +2 -2
  57. package/dist/packem_chunks/handler55.js +1 -1
  58. package/dist/packem_chunks/handler57.js +5 -5
  59. package/dist/packem_chunks/handler58.js +4 -4
  60. package/dist/packem_chunks/handler59.js +8 -8
  61. package/dist/packem_chunks/handler6.js +7 -7
  62. package/dist/packem_chunks/handler60.js +2 -2
  63. package/dist/packem_chunks/handler61.js +13 -13
  64. package/dist/packem_chunks/handler62.js +4 -4
  65. package/dist/packem_chunks/handler63.js +3 -3
  66. package/dist/packem_chunks/handler64.js +4 -4
  67. package/dist/packem_chunks/handler65.js +6 -6
  68. package/dist/packem_chunks/handler66.js +2 -2
  69. package/dist/packem_chunks/handler67.js +9 -9
  70. package/dist/packem_chunks/handler68.js +7 -7
  71. package/dist/packem_chunks/handler69.js +24 -24
  72. package/dist/packem_chunks/handler7.js +1 -1
  73. package/dist/packem_chunks/handler70.js +6 -6
  74. package/dist/packem_chunks/handler71.js +14 -14
  75. package/dist/packem_chunks/handler72.js +47 -47
  76. package/dist/packem_chunks/handler73.js +9 -9
  77. package/dist/packem_chunks/handler74.js +27 -27
  78. package/dist/packem_chunks/handler75.js +3 -3
  79. package/dist/packem_chunks/handler76.js +8 -8
  80. package/dist/packem_chunks/handler77.js +63 -64
  81. package/dist/packem_chunks/handler78.js +25 -25
  82. package/dist/packem_chunks/handler8.js +1 -1
  83. package/dist/packem_chunks/handler9.js +1 -1
  84. package/dist/packem_chunks/heal-accept.js +5 -5
  85. package/dist/packem_chunks/heal.js +8 -8
  86. package/dist/packem_chunks/help-command.js +46 -46
  87. package/dist/packem_chunks/index2.js +5 -5
  88. package/dist/packem_chunks/index3.js +3 -3
  89. package/dist/packem_chunks/index4.js +11 -11
  90. package/dist/packem_chunks/keys-refresh.js +1 -1
  91. package/dist/packem_chunks/lean.js +2 -2
  92. package/dist/packem_chunks/list.js +2 -2
  93. package/dist/packem_chunks/loader.js +4 -4
  94. package/dist/packem_chunks/orchestrator.js +14 -14
  95. package/dist/packem_chunks/pre-mode.js +2 -2
  96. package/dist/packem_chunks/prompts.js +3 -3
  97. package/dist/packem_chunks/prune.js +1 -1
  98. package/dist/packem_chunks/publish-guards.js +1 -1
  99. package/dist/packem_chunks/registry.js +17 -17
  100. package/dist/packem_chunks/resolveFormatter.js +5 -5
  101. package/dist/packem_chunks/shell-runner.js +1 -1
  102. package/dist/packem_chunks/snapshot.js +2 -2
  103. package/dist/packem_chunks/stage-publisher.js +1 -1
  104. package/dist/packem_chunks/staged-registry.js +2 -2
  105. package/dist/packem_chunks/state.js +3 -3
  106. package/dist/packem_chunks/status.js +1 -1
  107. package/dist/packem_chunks/sync.js +1 -1
  108. package/dist/packem_chunks/sync2.js +1 -1
  109. package/dist/packem_chunks/tar.js +3 -3
  110. package/dist/packem_chunks/tripwire.js +2 -2
  111. package/dist/packem_chunks/ts-loader.js +9 -9
  112. package/dist/packem_chunks/verify-lockfile.js +2 -2
  113. package/dist/packem_chunks/workspace.js +2 -2
  114. package/dist/packem_shared/advisories-CCBGdU8U.js +1 -0
  115. package/dist/packem_shared/affected-selection-Dj-ymxhw.js +1 -0
  116. package/dist/packem_shared/affected-shas-PwkVbPch.js +1 -0
  117. package/dist/packem_shared/ai-analysis-bGCAc1jR.js +68 -0
  118. package/dist/packem_shared/{ai-fix-CLfWbyqY.js → ai-fix-DV5-dHBY.js} +9 -9
  119. package/dist/packem_shared/{augment-BVuj3ee7.js → augment-24KX2nkI.js} +4 -4
  120. package/dist/packem_shared/bin-CtzhnYMp.js +1 -0
  121. package/dist/packem_shared/build-scripts-w4SNeR7D.js +1 -0
  122. package/dist/packem_shared/{command-runtime-DTbo12cP.js → command-runtime-BLFPUYAT.js} +1 -1
  123. package/dist/packem_shared/cyclonedx-C4KaVTn1.js +4 -0
  124. package/dist/packem_shared/{dependency-scan-DZcSlSFp.js → dependency-scan-D_ona0Qm.js} +1 -1
  125. package/dist/packem_shared/{docker-69ybb6g7.js → docker-DaVs-9wK.js} +40 -40
  126. package/dist/packem_shared/{en-C26W78--.js → en-D3CfXlO7.js} +13 -13
  127. package/dist/packem_shared/failure-log-CTneNcio.js +2 -0
  128. package/dist/packem_shared/giget-CAxjpwew.js +2 -0
  129. package/dist/packem_shared/glob-BUjyjdE8-C4M8e02u.js +1 -0
  130. package/dist/packem_shared/index-BWl4DbMp.js +1 -0
  131. package/dist/packem_shared/index-CTMU29dI.js +1 -0
  132. package/dist/packem_shared/index-uBVnF4ji.js +35 -0
  133. package/dist/packem_shared/index.server-CusjRLCh.js +2 -0
  134. package/dist/packem_shared/{interface.d-B7VK2rcH.d.ts → interface.d-CRqRz4jt.d.ts} +39 -39
  135. package/dist/packem_shared/{interface.d-Cezzifoh.d.ts → interface.d-CrHOtJc1.d.ts} +37 -37
  136. package/dist/packem_shared/lifecycle-B8A2T3gx.js +2 -0
  137. package/dist/packem_shared/lockfile-Bccery3L.js +1 -0
  138. package/dist/packem_shared/main-D_cam4hv.js +1 -0
  139. package/dist/packem_shared/manifests-BDkwiVbh.js +1 -0
  140. package/dist/packem_shared/{min-release-age-hK604veF.js → min-release-age-OaYpLwux.js} +2 -2
  141. package/dist/packem_shared/missing-package-json-BqS-OnKd.js +1 -0
  142. package/dist/packem_shared/{native-config-sync-DDKjAy0i.js → native-config-sync-Ds1FtcrM.js} +7 -7
  143. package/dist/packem_shared/osv-bloom-pKp7urSB.js +2 -0
  144. package/dist/packem_shared/package-version-C47v64aB.js +4 -0
  145. package/dist/packem_shared/packument-HBVbyf7x.js +1 -0
  146. package/dist/packem_shared/pm-runner-C6eTANt1.js +1 -0
  147. package/dist/packem_shared/project-name-filter-CJ3XX2TI.js +7 -0
  148. package/dist/packem_shared/prompt-BSAy8SMH.js +1 -0
  149. package/dist/packem_shared/{provenance-CRBV9cko.js → provenance-D4Cza8cp.js} +1 -1
  150. package/dist/packem_shared/{readJsonSync-DuMMeB3s-B9cGBVbJ.js → readJsonSync-DweZd5ZA-0eZh9sGm.js} +1 -1
  151. package/dist/packem_shared/registry-keys-C0ez2VND.js +1 -0
  152. package/dist/packem_shared/{resolve-explicit-BX6aMYl-.js → resolve-explicit-BbT764KS.js} +1 -1
  153. package/dist/packem_shared/{resolve-runtime-COyiEML3.js → resolve-runtime-D_vZovbB.js} +1 -1
  154. package/dist/packem_shared/run-file-DyPFFN9U.js +1 -0
  155. package/dist/packem_shared/{runtime-check-fzDkedMW.js → runtime-check-D4um-yQq.js} +1 -1
  156. package/dist/packem_shared/s1ngularity-St6dhKiq.js +1 -0
  157. package/dist/packem_shared/scan-progress-q-N2JtIp.js +2 -0
  158. package/dist/packem_shared/selectors-Ce_6UAoY.js +3 -0
  159. package/dist/packem_shared/signatures-Dyeyg1q9.js +2 -0
  160. package/dist/packem_shared/subtree-DSm0QEoE.js +2 -0
  161. package/dist/packem_shared/target-merge-Cfy7c__2.js +11 -0
  162. package/dist/packem_shared/target-options-7XcbqGDe.js +1 -0
  163. package/dist/packem_shared/toolchain-C_pNMBM6.js +5 -0
  164. package/dist/packem_shared/typosquats-xzcAGPiM.js +1 -0
  165. package/dist/packem_shared/{use-measured-height-DfNxp6nf.js → use-measured-height-CBjN0fle.js} +1 -1
  166. package/dist/packem_shared/verify-Dve9PQj3.js +1 -0
  167. package/dist/packem_shared/{vis-update-app-De8JjZm0.js → vis-update-app-DMAC2pPf.js} +1 -1
  168. package/dist/packem_shared/vis-user-error-xmha3L4n.js +30 -0
  169. package/dist/packem_shared/watch-BXOOX7lx.js +1 -0
  170. package/dist/packem_shared/watch-loop-Q7UpkVbr.js +11 -0
  171. package/dist/release/core/package-managers/index.d.ts +2 -2
  172. package/dist/release/core/version-actions/index.d.ts +10 -10
  173. package/dist/release/index.d.ts +60 -60
  174. package/dist/release/plugin-sdk.d.ts +80 -80
  175. package/dist/release/presets.d.ts +148 -148
  176. package/dist/release/types.d.ts +840 -840
  177. package/dist/runtime/preload.js +1 -1
  178. package/index.d.ts +204 -204
  179. package/index.js +52 -52
  180. package/package.json +16 -16
  181. package/schemas/project.schema.json +4 -1
  182. package/schemas/vis-config.schema.json +9 -3
  183. package/dist/packem_shared/advisories-B76fBVL-.js +0 -1
  184. package/dist/packem_shared/affected-shas-BOeR4vEc.js +0 -1
  185. package/dist/packem_shared/ai-analysis-D7HOdUwd.js +0 -68
  186. package/dist/packem_shared/bin-CkfFJCAM.js +0 -1
  187. package/dist/packem_shared/build-scripts-CfAqHBlq.js +0 -1
  188. package/dist/packem_shared/cyclonedx--L7NbMBH.js +0 -4
  189. package/dist/packem_shared/failure-log-BZQqxffZ.js +0 -2
  190. package/dist/packem_shared/giget-DVTFJlbR.js +0 -2
  191. package/dist/packem_shared/glob-DMbPwGSj-D2Hk3lFG.js +0 -1
  192. package/dist/packem_shared/index-2LCHaVNX.js +0 -35
  193. package/dist/packem_shared/index-B0EsgdzO.js +0 -1
  194. package/dist/packem_shared/index-Bhzio2RB.js +0 -1
  195. package/dist/packem_shared/index-Bq6YEpiq.js +0 -28
  196. package/dist/packem_shared/index.server-qvZ-cy29.js +0 -2
  197. package/dist/packem_shared/lifecycle-BcCMt9wn.js +0 -2
  198. package/dist/packem_shared/lockfile-Cwt0Nwr0.js +0 -1
  199. package/dist/packem_shared/main-B3juSU5z.js +0 -1
  200. package/dist/packem_shared/manifests-BshBdSb-.js +0 -1
  201. package/dist/packem_shared/missing-package-json-Cu0iWMT2.js +0 -1
  202. package/dist/packem_shared/osv-bloom-DMhXP184.js +0 -2
  203. package/dist/packem_shared/package-version-TsxLc6w2.js +0 -4
  204. package/dist/packem_shared/packument-CtVAoNo7.js +0 -1
  205. package/dist/packem_shared/pm-runner-CfyxALPK.js +0 -1
  206. package/dist/packem_shared/prompt-DjXHVgYU.js +0 -1
  207. package/dist/packem_shared/registry-keys-Ci2keQNi.js +0 -1
  208. package/dist/packem_shared/run-file-CTJfIZ0I.js +0 -1
  209. package/dist/packem_shared/s1ngularity-Cq1cCSpU.js +0 -1
  210. package/dist/packem_shared/scan-progress-DQ9qIGzr.js +0 -2
  211. package/dist/packem_shared/selectors-B9dOMIMq.js +0 -3
  212. package/dist/packem_shared/signatures-DvD1E8Xa.js +0 -2
  213. package/dist/packem_shared/subtree-C7bZuiSQ.js +0 -2
  214. package/dist/packem_shared/target-merge-Dg25Izl5.js +0 -11
  215. package/dist/packem_shared/target-options-aPqByoww.js +0 -1
  216. package/dist/packem_shared/toolchain-CiaW3bx4.js +0 -5
  217. package/dist/packem_shared/typosquats-CRnvlYPw.js +0 -1
  218. package/dist/packem_shared/verify-23b6IfSg.js +0 -1
  219. package/dist/packem_shared/watch-B3P2dwoG.js +0 -1
  220. package/dist/packem_shared/watch-loop-B3_O8hF-.js +0 -11
@@ -1,4 +1,4 @@
1
- import{I as N}from"./index-B0EsgdzO.js";import{i as D}from"./en-C26W78--.js";import{p as y,d as R}from"./prompt-DjXHVgYU.js";import{h as M,M as T,r as A,a as S,b as E,c as C,d as P,e as x,f as V}from"./s1ngularity-Cq1cCSpU.js";import{m as u,D as g,r as j}from"./provenance-CRBV9cko.js";import{g as w}from"./packument-CtVAoNo7.js";import{i as b,p as m}from"../packem_chunks/cli-main.js";import{r as I}from"./signatures-DvD1E8Xa.js";import{s as L}from"./index-BAe6e0XE.js";import{f as O}from"./utils-CRueU43T.js";const W=15,B=e=>{const a=(e.TERM??"").toLowerCase();return a!=="dumb"&&a!=="unknown"&&a!==""},U=async(e,a,n,s)=>new Promise(c=>{if(s?.aborted){c(!1);return}const o=B(n)&&a.isTTY!==!1;let r=e;const i=()=>{o?a.write(`\rContinuing in ${String(r)}s... press Ctrl-C to abort. `):r===e&&a.write(`Warnings present; proceeding in ${String(e)}s.
1
+ import{I as N}from"./index-BWl4DbMp.js";import{i as D}from"./en-D3CfXlO7.js";import{p as y,d as R}from"./prompt-BSAy8SMH.js";import{h as M,M as T,r as A,a as S,b as E,c as C,d as P,e as x,f as V}from"./s1ngularity-St6dhKiq.js";import{m as u,D as g,r as j}from"./provenance-D4Cza8cp.js";import{g as w}from"./packument-HBVbyf7x.js";import{i as b,p as m}from"../packem_chunks/cli-main.js";import{r as I}from"./signatures-Dyeyg1q9.js";import{s as L}from"./index-BAe6e0XE.js";import{f as O}from"./utils-CRueU43T.js";const W=15,B=e=>{const a=(e.TERM??"").toLowerCase();return a!=="dumb"&&a!=="unknown"&&a!==""},U=async(e,a,n,s)=>new Promise(c=>{if(s?.aborted){c(!1);return}const o=B(n)&&a.isTTY!==!1;let r=e;const i=()=>{o?a.write(`\rContinuing in ${String(r)}s... press Ctrl-C to abort. `):r===e&&a.write(`Warnings present; proceeding in ${String(e)}s.
2
2
  `)};i();const d=setInterval(()=>{if(r-=1,r<=0){clearInterval(d),s?.removeEventListener("abort",l),o&&a.write(`\rContinuing now.
3
3
  `),c(!0);return}i()},1e3),l=()=>{clearInterval(d),o&&a.write(`\rAborted.
4
4
  `),c(!1)};s?.addEventListener("abort",l,{once:!0})}),Y=async(e,a={})=>{if(e.length===0)return{proceed:!0};const n=a.env??process.env,s=a.isTty??!!process.stdin.isTTY,c=a.isCi??N,o=a.strict??!1,r=a.readline??R,i=a.output??{isTTY:!!process.stdout.isTTY,write:p=>process.stdout.write(p)},d=D(n.VIS_DISABLE_AUTO_CONTINUE),l=Number.parseInt(n.VIS_AUTO_CONTINUE_SECONDS??"",10),t=a.countdownSeconds??(Number.isFinite(l)&&l>0?l:W);return e.some(p=>p.severity==="error")?o?{proceed:!1,reason:"errors-present"}:c?{proceed:!1,reason:"errors-present"}:s?await y("Proceed despite errors? [y/N] ",r)?{proceed:!0}:{proceed:!1,reason:"user-aborted"}:{proceed:!1,reason:"non-tty"}:o?{proceed:!1,reason:"ci-strict"}:s?d?await y("Proceed despite warnings? [y/N] ",r)?{proceed:!0}:{proceed:!1,reason:"user-aborted"}:await U(t,i,n,a.signal)?{proceed:!0}:{proceed:!1,reason:"user-aborted"}:{proceed:!0}},be=async(e,a={})=>{if(e.isEmpty())return!0;const n=e.all(),s=a.output??{isTTY:!!process.stdout.isTTY,write:c=>process.stdout.write(c)};for(const c of M(n))s.write(`${c}
@@ -1 +1 @@
1
- import{f as s,m as f,H as b,j as g}from"./index-2LCHaVNX.js";const j={id:"bun",label:"Bun",lockfiles:["bun.lock","bun.lockb"],scriptSource:"package.json"},v={id:"node",label:"Node.js",lockfiles:["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json"],scriptSource:"package.json"},l={bun:j,node:v},a=["node","bun"],u={"deno.lock":"deno"},$=a.flatMap(o=>l[o].lockfiles.map(e=>[e,o])),p="Deno is not supported yet (deferred — see rfc/design-runtime-multitool.md).",d=(o,e)=>{if(o==="node"||o==="bun")return o;throw o in u||o==="deno"?new Error(`${e} requested runtime "${o}", but ${p}`):new Error(`${e} requested unknown runtime "${o}". Supported: ${a.join(", ")}.`)},S=o=>{let e=o;for(;;){for(const[r,n]of $)if(s(f(e,r)))return{runtime:n};for(const r of Object.keys(u))if(s(f(e,r)))return{deferred:u[r]};const t=b(e);if(t===e||g(e).root===e)return{};e=t}},y=(o,e={})=>{const t=e.env??process.env,r=(c,m,k)=>({adapter:l[c],deferredNotice:k,runtime:c,source:m});if(e.flag!==void 0&&e.flag!=="")return r(d(e.flag,"--runtime"),"flag");const n=t.VIS_RUNTIME;if(n!==void 0&&n!=="")return r(d(n,"VIS_RUNTIME"),"env");if(e.config!==void 0)return r(d(e.config,"config runtime:"),"config");const i=S(o);return i.runtime!==void 0?r(i.runtime,"lockfile"):i.deferred!==void 0?r("node","default",`Detected a ${i.deferred} project but ${p} Falling back to node.`):r("node","default")};export{y as r};
1
+ import{l as s,w as f,J as b,M as g}from"./index-uBVnF4ji.js";const v={id:"bun",label:"Bun",lockfiles:["bun.lock","bun.lockb"],scriptSource:"package.json"},j={id:"node",label:"Node.js",lockfiles:["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json"],scriptSource:"package.json"},l={bun:v,node:j},a=["node","bun"],u={"deno.lock":"deno"},$=a.flatMap(o=>l[o].lockfiles.map(e=>[e,o])),p="Deno is not supported yet (deferred — see rfc/design-runtime-multitool.md).",d=(o,e)=>{if(o==="node"||o==="bun")return o;throw o in u||o==="deno"?new Error(`${e} requested runtime "${o}", but ${p}`):new Error(`${e} requested unknown runtime "${o}". Supported: ${a.join(", ")}.`)},w=o=>{let e=o;for(;;){for(const[r,n]of $)if(s(f(e,r)))return{runtime:n};for(const r of Object.keys(u))if(s(f(e,r)))return{deferred:u[r]};const t=b(e);if(t===e||g(e).root===e)return{};e=t}},M=(o,e={})=>{const t=e.env??process.env,r=(c,m,k)=>({adapter:l[c],deferredNotice:k,runtime:c,source:m});if(e.flag!==void 0&&e.flag!=="")return r(d(e.flag,"--runtime"),"flag");const n=t.VIS_RUNTIME;if(n!==void 0&&n!=="")return r(d(n,"VIS_RUNTIME"),"env");if(e.config!==void 0)return r(d(e.config,"config runtime:"),"config");const i=w(o);return i.runtime!==void 0?r(i.runtime,"lockfile"):i.deferred!==void 0?r("node","default",`Detected a ${i.deferred} project but ${p} Falling back to node.`):r("node","default")};export{M as r};
@@ -0,0 +1 @@
1
+ import{createRequire as S}from"node:module";import{w as i,J as l}from"./index-uBVnF4ji.js";import{p as w}from"./augment-24KX2nkI.js";let h;const b=r=>(h??=S(import.meta.url))(r),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=r=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[e,s]=a.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return a.getBuiltinModule(r)}return b(r)},{spawnSync:u}=d("node:child_process"),{existsSync:p}=d("node:fs"),y=r=>{let e=r;for(;;){const s=i(e,".pnp.cjs");if(p(s)){const t=i(e,".pnp.loader.mjs");return{esmLoader:p(t)?t:void 0,pnpCjs:s}}const o=l(e);if(o===e)return;e=o}},x=r=>{const e=y(r);if(e===void 0)return[];const s=["--require",e.pnpCjs];return e.esmLoader!==void 0&&s.push("--import",e.esmLoader),s},E=[{flag:"--enable-source-maps",key:"sourcemaps",min:[22,0]},{flag:"--experimental-sqlite",key:"sqlite",min:[22,5]},{flag:"--experimental-webstorage",key:"webstorage",min:[22,4]},{flag:"--experimental-eventsource",key:"eventsource",min:[22,3]},{flag:"--experimental-websocket",key:"websocket",max:[21,999],min:[20,10]},{flag:"--experimental-vm-modules",key:"vm-modules",min:[22,0]}],I=[22,4],P=r=>{const[e,s]=r.split(".").map(o=>Number.parseInt(o,10));return[e??0,s??0]},f=(r,e)=>r[0]>e[0]||r[0]===e[0]&&r[1]>=e[1],j=(r,e)=>r[0]<e[0]||r[0]===e[0]&&r[1]<=e[1],T=(r,e)=>f(r,e.min)&&(e.max===void 0||j(r,e.max)),L=r=>{const e=r.trim().toLowerCase();return e===""||e==="all"||e==="1"||e==="true"},m=(r,e)=>L(r)||r.split(",").some(s=>s.trim().toLowerCase()===e),g=(r,e,s)=>{const o=P(e),t=[];for(const n of E)m(r,n.key)&&T(o,n)&&t.push(n.flag);return m(r,"localstorage")&&f(o,I)&&(t.includes("--experimental-webstorage")||t.push("--experimental-webstorage"),t.push(`--localstorage-file=${s}`)),t},v="VIS_X_REEXEC",k=(r,e,s)=>{const o={...process.env},t=i(l(process.argv[1]),"runtime","preload.js");if(o.NODE_OPTIONS){const c=o.NODE_OPTIONS.replace(`--import ${JSON.stringify(t)}`,"").replace(`--import ${t}`,"").replaceAll(/\s+/gu," ").trim();c===""?delete o.NODE_OPTIONS:o.NODE_OPTIONS=c}delete o.VIS_AUGMENT_SUBPROCESS,delete o.VIS_UNFLAG,delete o.VIS_POLYFILL;const n=u(process.execPath,[r,...e],{cwd:s,env:o,stdio:"inherit"});if(n.error)throw n.error;return n.status??(n.signal===null?0:1)},_=r=>{let e=r;for(;;){if(p(i(e,"package.json"))||p(i(e,".pnp.cjs")))return i(e,".vis","localstorage");const s=l(e);if(s===e)return i(r,".vis","localstorage");e=s}},A=r=>{const e=process.env.VIS_UNFLAG;return[...e===void 0?[]:g(e,process.versions.node,_(r)),...x(r)]},C=(r,e,s)=>{const o=u("bun",["run",r,...e],{cwd:s,stdio:"inherit"});if(o.error)throw o.error.code==="ENOENT"?new Error("Runtime is set to bun but the `bun` binary is not on PATH. Install it from https://bun.sh."):o.error;return o.status??(o.signal===null?0:1)},R=(r,e,s,o)=>{const t=u(process.execPath,[...r,process.argv[1],"x",e,...s],{cwd:o,env:{...process.env,[v]:"1"},stdio:"inherit"});return t.status??(t.signal===null?0:1)},q=async(r,e,s)=>{if(process.env[v]===void 0){const n=A(s);if(n.length>0)return R(n,r,e,s)}if(process.env.VIS_AUGMENT_SUBPROCESS!==void 0){const n=i(l(process.argv[1]),"runtime","preload.js"),c=process.env.VIS_UNFLAG,O=c===void 0?[]:g(c,process.versions.node,_(s)),N=[process.env.NODE_OPTIONS??"",...O,`--import ${JSON.stringify(n)}`].filter(Boolean);process.env.NODE_OPTIONS=N.join(" ").trim()}const{importTs:o}=await import("../packem_chunks/ts-loader.js").then(n=>n.t);await w(s);const t=process.argv;process.argv=[process.execPath,r,...e];try{await o(r)}finally{process.argv=t}return typeof process.exitCode=="number"?process.exitCode:0},$=async(r,e,s,o,t={})=>t.node?k(r,e,o):s==="bun"?C(r,e,o):q(r,e,o);export{$ as r};
@@ -1 +1 @@
1
- import{m as g,f as m,v as h}from"./index-2LCHaVNX.js";import{whichBin as d}from"#native";import{a as k}from"./readJsonSync-DuMMeB3s-B9cGBVbJ.js";const v=r=>{for(const s of[".nvmrc",".node-version"]){const i=g(r,s);if(m(i))try{return h(i).trim().replace(/^v/,"")}catch{}}},l=(r,s)=>{const i=r.split(/[.\-+]/).map(n=>Number.parseInt(n,10)||0),c=s.split(/[.\-+]/).map(n=>Number.parseInt(n,10)||0),e=Math.max(i.length,c.length);for(let n=0;n<e;n++){const t=i[n]??0,a=c[n]??0;if(t!==a)return t-a}return 0},$=(r,s)=>{const i=s.trim();if(i===""||i==="*")return!0;const c=i.split(/\s+/).filter(Boolean);for(const e of c)if(e.startsWith(">=")){if(l(r,e.slice(2).trim())<0)return!1}else if(e.startsWith("<=")){if(l(r,e.slice(2).trim())>0)return!1}else if(e.startsWith(">")){if(l(r,e.slice(1).trim())<=0)return!1}else if(e.startsWith("<")){if(l(r,e.slice(1).trim())>=0)return!1}else if(/^\d/.test(e)){const n=r.split("."),t=e.split(".");for(const[a,o]of t.entries())if(o!==n[a])return!1}return!0},x=r=>{const s=[],i=g(r,"package.json");let c;try{c=k(i)}catch{return s}const e=process.versions.node;if(c.engines?.node){const t=c.engines.node;$(e,t)||s.push({actual:e,expected:t,kind:"node",message:`package.json engines.node requires ${t}, but the current Node.js is ${e}.`,severity:"error"})}const n=v(r);if(n){const[t,a]=n.split("."),[o,p]=e.split(".");(t!==o||a!==void 0&&a!==p)&&s.push({actual:e,expected:n,kind:"node",message:`.nvmrc pins Node ${n} but the current Node.js is ${e}. Run \`nvm use\` or switch runtimes.`,severity:"warning"})}if(c.packageManager){const[t,a]=c.packageManager.split("@"),o=(process.env.npm_config_user_agent??"").split(" ")[0]??"",[p,u]=o.split("/"),f=t==="aube"&&d("aube")!==null;p&&t&&p!==t?s.push({actual:p,expected:t,kind:"packageManager",message:`package.json packageManager pins ${c.packageManager} but the current invocation is ${o}. Install the correct package manager.`,severity:f?"warning":"error"}):u&&a&&u!==a&&s.push({actual:u,expected:a,kind:"packageManager",message:`package.json packageManager pins ${t}@${a} but the current invocation uses ${t}@${u}.`,severity:"warning"})}return s};export{x as c};
1
+ import{w as g,l as m,z as h}from"./index-uBVnF4ji.js";import{whichBin as d}from"#native";import{a as k}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";const v=r=>{for(const s of[".nvmrc",".node-version"]){const i=g(r,s);if(m(i))try{return h(i).trim().replace(/^v/,"")}catch{}}},l=(r,s)=>{const i=r.split(/[.\-+]/).map(n=>Number.parseInt(n,10)||0),c=s.split(/[.\-+]/).map(n=>Number.parseInt(n,10)||0),e=Math.max(i.length,c.length);for(let n=0;n<e;n++){const t=i[n]??0,a=c[n]??0;if(t!==a)return t-a}return 0},$=(r,s)=>{const i=s.trim();if(i===""||i==="*")return!0;const c=i.split(/\s+/).filter(Boolean);for(const e of c)if(e.startsWith(">=")){if(l(r,e.slice(2).trim())<0)return!1}else if(e.startsWith("<=")){if(l(r,e.slice(2).trim())>0)return!1}else if(e.startsWith(">")){if(l(r,e.slice(1).trim())<=0)return!1}else if(e.startsWith("<")){if(l(r,e.slice(1).trim())>=0)return!1}else if(/^\d/.test(e)){const n=r.split("."),t=e.split(".");for(const[a,o]of t.entries())if(o!==n[a])return!1}return!0},j=r=>{const s=[],i=g(r,"package.json");let c;try{c=k(i)}catch{return s}const e=process.versions.node;if(c.engines?.node){const t=c.engines.node;$(e,t)||s.push({actual:e,expected:t,kind:"node",message:`package.json engines.node requires ${t}, but the current Node.js is ${e}.`,severity:"error"})}const n=v(r);if(n){const[t,a]=n.split("."),[o,p]=e.split(".");(t!==o||a!==void 0&&a!==p)&&s.push({actual:e,expected:n,kind:"node",message:`.nvmrc pins Node ${n} but the current Node.js is ${e}. Run \`nvm use\` or switch runtimes.`,severity:"warning"})}if(c.packageManager){const[t,a]=c.packageManager.split("@"),o=(process.env.npm_config_user_agent??"").split(" ")[0]??"",[p,u]=o.split("/"),f=t==="aube"&&d("aube")!==null;p&&t&&p!==t?s.push({actual:p,expected:t,kind:"packageManager",message:`package.json packageManager pins ${c.packageManager} but the current invocation is ${o}. Install the correct package manager.`,severity:f?"warning":"error"}):u&&a&&u!==a&&s.push({actual:u,expected:a,kind:"packageManager",message:`package.json packageManager pins ${t}@${a} but the current invocation uses ${t}@${u}.`,severity:"warning"})}return s};export{j as c};
@@ -0,0 +1 @@
1
+ import{createRequire as K}from"node:module";import{V,s as R}from"./index.server-CusjRLCh.js";import{l as _,d as j,w as $}from"./index-uBVnF4ji.js";import{g as x}from"./en-D3CfXlO7.js";import{m as p,D as g}from"./provenance-D4Cza8cp.js";import{g as b}from"./packument-HBVbyf7x.js";import{i as w}from"../packem_chunks/cli-main.js";import{a as O}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";import{s as v}from"./index-BAe6e0XE.js";let X;const Y=r=>(X??=K(import.meta.url))(r),M=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=r=>{if(typeof M<"u"&&M.versions&&M.versions.node){const[e,t]=M.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return M.getBuiltinModule(r)}return Y(r)},{rmSync:k,writeFileSync:E}=T("node:fs"),{createHash:Q}=T("node:crypto"),{Resolver:Z}=T("node:dns/promises");class Qe{entries=[];add(e){this.entries.push(e)}addMany(e){for(const t of e)this.entries.push(t)}all(){return this.entries}errors(){return this.entries.filter(e=>e.severity==="error")}warnings(){return this.entries.filter(e=>e.severity==="warning")}hasErrors(){return this.entries.some(e=>e.severity==="error")}hasWarnings(){return this.entries.some(e=>e.severity==="warning")}isEmpty(){return this.entries.length===0}size(){return this.entries.length}}const Ze=r=>{if(r.length===0)return[];const e=[],t=r.filter(s=>s.severity==="error"),n=r.filter(s=>s.severity==="warning");if(t.length>0){e.push(V(`${String(t.length)} error${t.length===1?"":"s"}:`));for(const s of t)e.push(` ${V("✗")} [${s.marshall}] ${s.packageName}: ${s.message}`),s.suggestedAction!==void 0&&e.push(` ${R("→")} ${s.suggestedAction}`)}if(n.length>0){t.length>0&&e.push(""),e.push(R(`${String(n.length)} warning${n.length===1?"":"s"}:`));for(const s of n)e.push(` ${R("⚠")} [${s.marshall}] ${s.packageName}: ${s.message}`),s.suggestedAction!==void 0&&e.push(` ${R("→")} ${s.suggestedAction}`)}return e},er=r=>({errors:r.filter(e=>e.severity==="error"),findings:[...r],summary:{errorCount:r.filter(e=>e.severity==="error").length,warningCount:r.filter(e=>e.severity==="warning").length},warnings:r.filter(e=>e.severity==="warning")}),ee=1440*60*1e3,re=15e3,te="https://api.github.com/repos",B=()=>$(x(),"archived-repo"),q=(r,e)=>$(B(),`${encodeURIComponent(r)}__${encodeURIComponent(e)}.json`),ne=(r,e)=>{const t=q(r,e);if(_(t))try{const n=O(t);if(Date.now()-n.createdAt>n.ttlMs){k(t,{force:!0});return}return n}catch{k(t,{force:!0});return}},W=(r,e,t,n)=>{j(B());const s={createdAt:Date.now(),ttlMs:n,...t};E(q(r,e),JSON.stringify(s),"utf8")},se=r=>{if(typeof r!="string"||r.trim()==="")return;const e=r.trim().replace(/^git\+/,""),t=/^git@github\.com:([^/]+)\/(.+?)(?:\.git)?\/?$/i.exec(e);if(t)return{owner:t[1],repo:t[2]};const n=/^ssh:\/\/git@github\.com\/([^/]+)\/(.+?)(?:\.git)?\/?$/i.exec(e);if(n)return{owner:n[1],repo:n[2]};const s=/^https?:\/\/(?:www\.)?github\.com\/([^/]+)\/([^/?#]+?)(?:\.git)?\/?$/i.exec(e);if(s)return{owner:s[1],repo:s[2]}},ie=async(r,e,t,n)=>{const s=`${te}/${encodeURIComponent(r)}/${encodeURIComponent(e)}`,c=new AbortController,o=setTimeout(()=>{c.abort()},re),i=()=>{c.abort()};n?.addEventListener("abort",i,{once:!0});const a={Accept:"application/vnd.github+json","User-Agent":"visulima-vis-marshall"};t!==void 0&&t!==""&&(a.Authorization=`Bearer ${t}`);try{const d=await fetch(s,{headers:a,signal:c.signal});if(d.status===404)return{kind:"missing"};if(!d.ok)return{kind:"transient-error"};const l=await d.json(),u=l.archived===!0,f=typeof l.archived_at=="string"?l.archived_at:void 0;return{archived:u,archivedAt:f,kind:"ok"}}catch{return{kind:"transient-error"}}finally{clearTimeout(o),n?.removeEventListener("abort",i)}},oe=(r,e)=>e!==void 0&&r.includes(e)?e:r.at(-1),rr=async(r,e={})=>{if(w("archivedRepo"))return[];const t=new Set(e.allowlist),n=e.cacheTtlMs??ee,s=e.githubToken??process.env.GITHUB_TOKEN,c=e.concurrency??g,o=new Map,i=async(a,d)=>{const l=`${a}/${d}`;let u=o.get(l);return u===void 0&&(u=(async()=>{const f=ne(a,d);if(f!==void 0)return f.missing===!0?{archived:!1,kind:"missing"}:{archived:f.archived,archivedAt:f.archivedAt,kind:"ok"};const m=await ie(a,d,s,e.signal);return m.kind==="missing"?W(a,d,{archived:!1,missing:!0},n):m.kind==="ok"&&W(a,d,{archived:m.archived===!0,archivedAt:m.archivedAt},n),m})(),o.set(l,u)),u};return(await p(r,c,async({name:a,version:d})=>{if(t.has(a))return;const l=await b(a,{workspaceRoot:e.workspaceRoot});if(l===void 0)return;const u=l.versions[d]??l.versions[oe(Object.keys(l.versions),l["dist-tags"]?.latest)??""];if(u===void 0)return;const f=se(u.repository?.url);if(f===void 0)return;const m=await i(f.owner,f.repo);if(m.kind!=="transient-error"){if(m.kind==="missing")return{kind:"missing-repo",owner:f.owner,packageName:a,repo:f.repo};if(m.archived===!0)return{...m.archivedAt===void 0?{}:{archivedAt:m.archivedAt},kind:"archived",owner:f.owner,packageName:a,repo:f.repo}}})).filter(a=>a!==void 0)},ae={dormantErrorDays:274,dormantWarnDays:183,newPublisherWindowDays:21,recentVersionErrorDays:7,recentVersionWarnDays:30},ce=1440*60*1e3,U=(r,e)=>(r-e)/ce,A=r=>{if(r!==void 0)return r.email??r.name},de=(r,e,t,n,s)=>{const c=r.time?.[t];if(c===void 0)return;const o=new Date(c).getTime();if(!Number.isFinite(o))return;const i=U(n,o);if(i<s.recentVersionErrorDays)return{kind:"recent-version",message:`published ${i.toFixed(1)} days ago (error threshold: ${String(s.recentVersionErrorDays)})`,packageName:e,severity:"error",version:t};if(i<s.recentVersionWarnDays)return{kind:"recent-version",message:`published ${i.toFixed(1)} days ago (warn threshold: ${String(s.recentVersionWarnDays)})`,packageName:e,severity:"warning",version:t}},le=(r,e,t,n,s)=>{const c=r.versions[t],o=A(c?._npmUser);if(o===void 0)return;const i=Object.keys(r.versions).filter(u=>v.valid(u)!==null).filter(u=>v.lt(u,t));if(i.length===0||i.some(u=>A(r.versions[u]?._npmUser)===o))return;const a=r.time?.[i[0]??""];if(a===void 0)return;const d=new Date(a).getTime();if(!Number.isFinite(d))return;const l=U(n,d);if(!(l<=s.newPublisherWindowDays))return{kind:"new-publisher",message:`first publish by ${o} on a ${l.toFixed(0)}-day-old package`,packageName:e,severity:"error",version:t}},ue=(r,e,t,n,s)=>{const c=r.versions[t],o=A(c?._npmUser);if(o===void 0)return;const i=[];for(const[l,u]of Object.entries(r.versions)){if(l===t||A(u._npmUser)!==o)continue;const f=r.time?.[l];if(f===void 0)continue;const m=new Date(f).getTime();Number.isFinite(m)&&i.push(m)}if(i.length===0)return;const a=Math.max(...i),d=U(n,a);if(d>=s.dormantErrorDays)return{kind:"dormant-maintainer",message:`previous release by ${o} was ${d.toFixed(0)} days ago (error threshold: ${String(s.dormantErrorDays)})`,packageName:e,severity:"error",version:t};if(d>=s.dormantWarnDays)return{kind:"dormant-maintainer",message:`previous release by ${o} was ${d.toFixed(0)} days ago (warn threshold: ${String(s.dormantWarnDays)})`,packageName:e,severity:"warning",version:t}},tr=async(r,e={})=>{if(w("author"))return[];const t=new Set(e.allowlist),n={...ae,...e.thresholds},s=e.now??(()=>Date.now()),c=e.concurrency??g;return(await p(r,c,async({name:o,version:i})=>{if(t.has(o))return[];const a=await b(o,{cacheTtlMs:e.cacheTtlMs,signal:e.signal,workspaceRoot:e.workspaceRoot});if(a===void 0)return[];const d=s(),l=[],u=de(a,o,i,d,n);u!==void 0&&l.push(u);const f=le(a,o,i,d,n);f!==void 0&&l.push(f);const m=ue(a,o,i,d,n);return m!==void 0&&l.push(m),l})).flat()},fe=1440*60*1e3,me=15e3,he=20,ve=1e4,pe="https://api.npmjs.org/downloads/point/last-month",H=()=>$(x(),"downloads"),J=r=>$(H(),`${encodeURIComponent(r)}.json`),ge=r=>{const e=J(r);if(_(e))try{const t=O(e);if(Date.now()-t.createdAt>t.ttlMs){k(e,{force:!0});return}return t.downloads}catch{k(e,{force:!0});return}},we=(r,e,t)=>{j(H());const n={createdAt:Date.now(),downloads:e,observedAt:new Date().toISOString(),ttlMs:t};E(J(r),JSON.stringify(n),"utf8")},ye=async(r,e)=>{const t=`${pe}/${encodeURIComponent(r)}`,n=new AbortController,s=setTimeout(()=>{n.abort()},me),c=()=>{n.abort()};e?.addEventListener("abort",c,{once:!0});try{const o=await fetch(t,{signal:n.signal});if(o.status===404)return{kind:"no-data"};if(!o.ok)return{kind:"error"};const i=await o.json();return typeof i.downloads=="number"?{downloads:i.downloads,kind:"ok"}:{kind:"no-data"}}catch{return{kind:"error"}}finally{clearTimeout(s),e?.removeEventListener("abort",c)}},nr=async(r,e={})=>{if(w("downloads"))return[];const t=new Set(e.allowlist),n=e.errorThreshold??he,s=e.warnThreshold??ve,c=e.cacheTtlMs??fe,o=e.concurrency??g;return(await p(r,o,async i=>{if(t.has(i))return;let a=ge(i);if(a===void 0){const d=await ye(i,e.signal);if(d.kind==="no-data"||d.kind==="error")return{downloadsLastMonth:void 0,kind:"no-data",packageName:i,severity:"warning"};a=d.downloads??0,we(i,a,c)}if(a<n)return{downloadsLastMonth:a,kind:"below-error",packageName:i,severity:"error"};if(a<s)return{downloadsLastMonth:a,kind:"below-warning",packageName:i,severity:"warning"}})).filter(i=>i!==void 0)},ke=1440*60*1e3,$e=4e3,be=["1.1.1.1","8.8.8.8"],z=()=>$(x(),"expired-domains"),G=r=>{const e=Q("sha256").update(r).digest("hex").slice(0,12);return $(z(),`${e}.json`)},Me=r=>{const e=G(r);if(_(e))try{const t=O(e);if(Date.now()-t.createdAt>t.ttlMs){k(e,{force:!0});return}return t}catch{k(e,{force:!0});return}},De=(r,e,t)=>{j(z());const n={createdAt:Date.now(),outcome:e,ttlMs:t};E(G(r),JSON.stringify(n),"utf8")},Re=r=>{if(typeof r!="string")return;const e=r.lastIndexOf("@");if(e===-1||e===r.length-1)return;const t=r.slice(e+1).trim().toLowerCase();return t===""?void 0:t},Ae=(r,e)=>{const t=[];e!==void 0&&t.push(e);for(const n of r??[])t.push(n);return t},Ne=async(r,e)=>{let t;try{return await Promise.race([r,new Promise((n,s)=>{t=setTimeout(()=>{s(new Error("ETIMEDOUT"))},e)})])}finally{t!==void 0&&clearTimeout(t)}},Se=r=>{if(r===null||typeof r!="object")return!1;const{code:e}=r;return e==="ENOTFOUND"||e==="ENODATA"||e==="NXDOMAIN"},Te=async(r,e,t)=>{try{const n=await Ne(r.resolveNs(e),t);return Array.isArray(n)&&n.length>0?{kind:"ok"}:{kind:"expired"}}catch(n){return Se(n)?{kind:"expired"}:{kind:"transient-error"}}},Ee=(r,e)=>e!==void 0&&r.includes(e)?e:r.at(-1),sr=async(r,e={})=>{if(w("expiredDomains"))return[];const t=new Set(e.allowlist),n=new Set((e.allowDomains??[]).map(u=>u.toLowerCase())),s=e.cacheTtlMs??ke,c=e.perDomainTimeoutMs??$e,o=e.dnsServers??be,i=e.concurrency??g,a=e.createResolver===void 0?new Z:e.createResolver();typeof a.setServers=="function"&&a.setServers(o);const d=new Map,l=async u=>{let f=d.get(u);return f===void 0&&(f=(async()=>{const m=Me(u);if(m!==void 0)return{kind:m.outcome==="ok"?"ok":"expired"};const h=await Te(a,u,c);return h.kind!=="transient-error"&&De(u,h.kind,s),h})(),d.set(u,f)),f};return(await p(r,i,async({name:u,version:f})=>{if(t.has(u))return[];const m=await b(u,{workspaceRoot:e.workspaceRoot});if(m===void 0)return[];const h=m.versions[f]??m.versions[Ee(Object.keys(m.versions),m["dist-tags"]?.latest)??""];if(h===void 0)return[];const N=Ae(h.maintainers,h._npmUser),C=new Set,S=[];for(const D of N){const y=Re(D.email);if(y===void 0||n.has(y))continue;const F=`${y}:${D.email??""}`;if(C.has(F))continue;C.add(F);const L=await l(y);L.kind==="expired"?S.push({domain:y,kind:"expired",maintainer:D.email??"",packageName:u,severity:"error"}):L.kind==="transient-error"&&S.push({domain:y,kind:"unresolved",maintainer:D.email??"",packageName:u,severity:"warning"})}return S})).flat()},_e=["readme","license","repo"],je=["ERROR: No README data found!","# Security holding package"],xe=r=>{const e=r.trim();return e===""?!0:je.some(t=>e.startsWith(t))},Oe=(r,e)=>{if(typeof e.readme=="string")return e.readme;if(typeof r.readme=="string")return r.readme},Ue=(r,e)=>{const t=Oe(r,e);if(t===void 0)return"missing-readme";if(xe(t))return"placeholder-readme"},Ce=r=>{const{license:e}=r;return e===void 0?"missing-license":typeof e=="string"?e.trim()===""?"missing-license":void 0:typeof e.type=="string"&&e.type.trim()!==""?void 0:"missing-license"},Fe=r=>{const{repository:e}=r;if(e===void 0)return"missing-repo";const t=typeof e.url=="string"?e.url.trim():"";if(t==="")return"missing-repo";let n=t.replace(/^git\+/,"");const s=/^git@([^:]+):(.+?)(?:\.git)?$/.exec(n);return s&&(n=`https://${s[1]}/${s[2]}`),URL.canParse(n)?void 0:"invalid-repo-url"},Le=r=>{const e=r["dist-tags"]?.latest;return e!==void 0&&Object.hasOwn(r.versions,e)?e:Object.keys(r.versions).at(-1)},ir=async(r,e={})=>{if(w("metadata"))return[];const t=new Set(e.allowlist),n=new Set(e.checks??_e),s=e.concurrency??g;return(await p(r,s,async({name:c,version:o})=>{if(t.has(c))return;const i=await b(c,{workspaceRoot:e.workspaceRoot});if(i===void 0)return;const a=i.versions[o]??i.versions[Le(i)??""];if(a===void 0||a.private===!0)return;const d=[];if(n.has("readme")){const l=Ue(i,a);l!==void 0&&d.push(l)}if(n.has("license")){const l=Ce(a);l!==void 0&&d.push(l)}if(n.has("repo")){const l=Fe(a);l!==void 0&&d.push(l)}if(d.length!==0)return{issues:d,packageName:c,version:o}})).filter(c=>c!==void 0)},I=(r,e)=>r===void 0?{}:typeof r=="string"?{[e.startsWith("@")?e.split("/").at(1)??e:e]:r}:{...r},Ve=(r,e)=>v.valid(e)?Object.keys(r.versions).filter(t=>v.valid(t)!==null&&v.lt(t,e)).sort((t,n)=>v.lt(t,n)?1:-1)[0]:void 0,or=async(r,e={})=>{if(w("newBin"))return[];const t=new Set(e.allowlist),n=new Set(e.allowBins),s=e.concurrency??g;return(await p(r,s,async({name:c,version:o})=>{if(t.has(c))return;const i=await b(c,{workspaceRoot:e.workspaceRoot});if(i===void 0)return;const a=i.versions[o];if(a===void 0)return;const d=Ve(i,o);if(d===void 0)return;const l=i.versions[d];if(l===void 0)return;const u=I(a.bin,c),f=I(l.bin,c),m=Object.entries(u).filter(([h])=>!(h in f)).filter(([h])=>!n.has(h)).map(([h,N])=>({command:N,name:h}));if(m.length!==0)return{fromVersion:d,newBins:m,packageName:c,toVersion:o}})).filter(c=>c!==void 0)},We=["preinstall","install","postinstall"],P=(r,e)=>r.versions[e]?.dist?.attestations?.provenance!==void 0,Ie=(r,e)=>{if(v.valid(e)!==null)return Object.keys(r.versions).filter(t=>v.valid(t)!==null&&v.prerelease(t)===null&&v.lt(t,e)).sort((t,n)=>v.lt(t,n)?1:-1)[0]},Pe=(r,e)=>{const t=r??{},n=e??{},s=[];for(const c of We){const o=t[c];if(o===void 0||o==="")continue;const i=n[c];i===void 0||i===""?s.push({command:o,hook:c,kind:"introduced"}):i!==o&&s.push({command:o,hook:c,kind:"changed"})}return s},ar=async(r,e={})=>{if(w("s1ngularity"))return[];const t=new Set(e.allowlist),n=e.concurrency??g;return(await p(r,n,async({name:s,version:c})=>{if(t.has(s))return;const o=await b(s,{workspaceRoot:e.workspaceRoot});if(o?.versions[c]===void 0)return;const i=Ie(o,c);if(i===void 0||!P(o,i)||P(o,c))return;const a=Pe(o.versions[c]?.scripts,o.versions[i]?.scripts);if(a.length!==0)return{hookChanges:a,packageName:s,priorVersion:i,trustSignal:"provenance-dropped",version:c}})).filter(s=>s!==void 0)};export{Qe as M,ar as a,or as b,ir as c,nr as d,sr as e,rr as f,er as g,Ze as h,tr as r};
@@ -0,0 +1,2 @@
1
+ import{E as x,s as k,I as y,V as S}from"./index.server-CusjRLCh.js";import{l as e,m as c,i,X as $,R as g}from"../packem_chunks/catalog.js";import"./en-D3CfXlO7.js";import{I as C}from"./index-BWl4DbMp.js";import{S as m}from"../packem_chunks/cli-main.js";import{Spinner as T}from"@visulima/tui-kit/spinner";import{D as j,W as I,T as E,C as R}from"./symbols-DPTlrJ3B.js";const w=({rows:a})=>e.jsx(c,{flexDirection:"column",children:a.map(t=>{let r;switch(t.status){case"error":{r=e.jsx(i,{color:"red",children:R});break}case"ok":{r=e.jsx(i,{color:"green",children:E});break}case"running":{r=e.jsx(i,{color:"white",children:e.jsx(T,{type:"dots"})});break}case"warn":{r=e.jsx(i,{color:"yellow",children:I});break}default:{r=e.jsx(i,{dimColor:!0,children:j});break}}return e.jsxs(c,{children:[e.jsx(c,{width:3,children:r}),e.jsx(c,{flexGrow:1,children:e.jsx(i,{children:t.label})}),t.summary?e.jsx(c,{children:e.jsxs(i,{dimColor:!0,children:[j," ",t.summary]})}):null]},t.id)})}),v={error:S(m.failure),ok:y(m.success),pending:x(m.dash),skip:x(m.dash),warn:k(m.warning)},D=(a,t,r)=>{const h=r?`${a} ${x(`— ${r}`)}`:a;return` ${v[t]} ${h}
2
+ `},W=(a,t={})=>{const r=t.stream??process.stderr,h=typeof r.isTTY=="boolean"&&r.isTTY&&!C,b=t.live??h,o=new Map;for(const s of a)o.set(s.id,{id:s.id,label:s.label,status:"pending"});if(!b||a.length===0)return{finish:(s,n,u)=>{const l=o.get(s);l&&(o.set(s,{...l,status:n,summary:u}),r.write(D(l.label,n,u)))},start:s=>{const n=o.get(s);n&&o.set(s,{...n,status:"running"})},stop:()=>{}};const f=()=>a.map(s=>o.get(s.id));let d=$(g.createElement(w,{rows:f()}),{interactive:!0,patchConsole:!1});const p=()=>{d?.rerender(g.createElement(w,{rows:f()}))};return{finish:(s,n,u)=>{const l=o.get(s);l&&(o.set(s,{...l,status:n,summary:u}),p())},start:s=>{const n=o.get(s);n&&(o.set(s,{...n,status:"running"}),p())},stop:()=>{d&&(p(),d.unmount(),d=void 0)}}};export{W as s};
@@ -0,0 +1,3 @@
1
+ import{createRequire as y}from"node:module";import{b as v}from"./index-uBVnF4ji.js";let h;const w=t=>(h??=y(import.meta.url))(t),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[r,e]=d.versions.node.split(".").map(Number);if(r>22||r===22&&e>=3||r===20&&e>=16)return d.getBuiltinModule(t)}return w(t)},{createInterface:k}=_("node:readline"),$=/^#([\w\-/]+):(.+)$/,b=/^([@\w\-/]+):(.+)$/,T=t=>{if(t==="")return;if(t.startsWith(":"))return{kind:"all",target:t.slice(1)};if(t.startsWith("~:"))return{kind:"closest",target:t.slice(2)};const r=$.exec(t);if(r?.[1]&&r[2])return{kind:"tag",tag:r[1],target:r[2]};const e=b.exec(t);return e?.[1]&&e[2]&&(e[1].startsWith("@")||e[1].includes("/")||e[1].includes("-"))?{kind:"project",projects:[e[1]],target:e[2]}:{kind:"all",target:t}},E=async(t,r,e,a)=>{const s=T(t);if(!s)throw new Error(`Invalid target selector: "${t}"`);const o=Object.keys(r.projects);if(s.kind==="all")return{projects:o,target:s.target};if(s.kind==="project")return{projects:s.projects??[],target:s.target};if(s.kind==="tag"){const c=s.tag;return{projects:o.filter(i=>r.projects[i]?.tags?.includes(c)??!1),target:s.target}}const n=v(a,e)||".";let l,u=-1;for(const[c,i]of Object.entries(r.projects)){const p=i.root;p&&(n===p||n.startsWith(`${p}/`))&&p.length>u&&(u=p.length,l=c)}if(!l){if(process.stdout.isTTY){const c=k({input:process.stdin,output:process.stderr}),i=Object.keys(r.projects).sort();process.stderr.write(`No project found at ${n}. Pick one:
2
+ `);for(const[g,m]of i.entries())process.stderr.write(` ${String(g+1)}) ${m}
3
+ `);const p=await new Promise(g=>{c.question("> ",g)});c.close();const f=Number.parseInt(p,10)-1;if(f>=0&&f<i.length)return{projects:[i[f]],target:s.target}}throw new Error(`No project found at or above ${n} for selector "${t}".`)}return{projects:[l],target:s.target}},q=/^(\w+)\s*(!?=)\s*(.+)$/,x=t=>{const r=t.trim();if(r==="")return;const e=r.split("&&").map(c=>c.trim()),a=r.split("||").map(c=>c.trim()),s=e.length>1,o=a.length>1;if(s&&o)throw new Error("Query language does not support mixed && / || — split into multiple --query flags or simplify.");const n=o?a:e,l=o?"||":"&&",u=[];for(const c of n){const i=q.exec(c);if(!i)throw new Error(`Invalid query clause: "${c}". Expected <field>=<value> or <field>!=<value>.`);const[,p,f,g]=i;u.push({field:p,op:f==="!="?"!=":"=",value:g.trim().replaceAll(/^["']|["']$/g,"")})}return{clauses:u,op:l}},j=(t,r,e)=>{const{field:a,op:s,value:o}=t,n=u=>{const c=u===o;return s==="="?c:!c},l=u=>{const c=(u??[]).includes(o);return s==="="?c:!c};switch(a){case"id":case"project":return n(r);case"language":return n(e.language);case"layer":return n(e.layer);case"projectType":case"type":return n(e.projectType);case"stack":return n(e.stack);case"tag":case"tags":return l(e.tags);default:return!1}},I=(t,r,e)=>{const a=(e??[]).flatMap(o=>o.split(",")).map(o=>o.trim()).filter(Boolean);if(a.length===0)return t;const s=new Set(a);return t.filter(o=>{const n=r.projects[o]?.tags;return Array.isArray(n)&&n.some(l=>s.has(l))})},N=(t,r,e)=>{if(!e||e.trim()==="")return t;const a=x(e);return a?t.filter(s=>{const o=r.projects[s];return o?a.op==="&&"?a.clauses.every(n=>j(n,s,o)):a.clauses.some(n=>j(n,s,o)):!1}):t};export{I as a,N as f,T as p,E as r};
@@ -0,0 +1,2 @@
1
+ import{createRequire as h}from"node:module";import{m as N,D as b}from"./provenance-D4Cza8cp.js";import{g as B}from"./packument-HBVbyf7x.js";import{i as P}from"../packem_chunks/cli-main.js";import{f as x}from"./registry-keys-C0ez2VND.js";let w;const _=s=>(w??=h(import.meta.url))(s),g=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$=s=>{if(typeof g<"u"&&g.versions&&g.versions.node){const[e,r]=g.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return g.getBuiltinModule(s)}return _(s)},{createPublicKey:M,createVerify:R}=$("node:crypto"),j=s=>{const e=["-----BEGIN PUBLIC KEY-----"],r=s.replaceAll(/\s+/g,"");for(let a=0;a<r.length;a+=64)e.push(r.slice(a,a+64));return e.push("-----END PUBLIC KEY-----"),e.join(`
2
+ `)},E=({keyBase64:s,message:e,signatureBase64:r})=>{try{const a=M({format:"pem",key:j(s)}),o=R("SHA256");return o.update(e),o.end(),o.verify(a,Buffer.from(r,"base64"))}catch{return!1}},C=(s,e)=>{if(s.expires===void 0||s.expires==="")return!1;const r=Date.parse(s.expires);return Number.isNaN(r)?!1:r<=e},A=(s,e,r)=>`${s}@${e}:${r}`,D=(s,e)=>e!==void 0&&s.includes(e)?e:s.at(-1),K=async(s,e={})=>{if(P("signatures"))return[];const r=new Set(e.allowlist),a=e.treatExpiredAs??"warning",o=e.concurrency??b,l=await x({keysUrl:e.keysUrl,signal:e.signal,ttlMs:e.keysTtlMs});if(l===void 0)return s.filter(({name:i})=>!r.has(i)).map(({name:i,version:t})=>({code:"fetch-failed",message:"Could not fetch registry signing keys.",packageName:i,severity:"warning",version:t}));const m=new Map;for(const i of l.keys)m.set(i.keyid,i);const k=Date.now();return(await N(s,o,async({name:i,version:t})=>{if(r.has(i))return[];const c=await B(i,{workspaceRoot:e.workspaceRoot});if(c===void 0)return[];const y=c.versions[t]??c.versions[D(Object.keys(c.versions),c["dist-tags"]?.latest)??""];if(y===void 0)return[];const f=y.dist?.signatures,p=y.dist?.integrity;if(f===void 0||f.length===0)return[{code:"missing-signature",message:`Package ${i}@${t} has no dist.signatures from the registry.`,packageName:i,severity:"warning",version:t}];if(typeof p!="string"||p==="")return[{code:"missing-signature",message:`Package ${i}@${t} has signatures but no dist.integrity to verify against.`,packageName:i,severity:"warning",version:t}];const v=A(i,t,p),u=[];for(const n of f){const d=m.get(n.keyid);if(d===void 0){u.push({code:"unknown-keyid",keyid:n.keyid,message:`Package ${i}@${t} was signed with an unrecognized keyid (${n.keyid}).`,packageName:i,severity:"error",version:t});continue}if(C(d,k)){u.push({code:"expired-key",keyid:n.keyid,message:`Package ${i}@${t} was signed with an expired key (${n.keyid}, expired ${d.expires??"unknown"}).`,packageName:i,severity:a,version:t});continue}E({keyBase64:d.key,message:v,signatureBase64:n.sig})||u.push({code:"invalid-signature",keyid:n.keyid,message:`Package ${i}@${t} signature did not verify against ${n.keyid}.`,packageName:i,severity:"error",version:t})}return u})).flat()};export{K as r};
@@ -0,0 +1,2 @@
1
+ import{createRequire as p}from"node:module";let m;const h=t=>(m??=p(import.meta.url))(t),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[r,e]=u.versions.node.split(".").map(Number);if(r>22||r===22&&e>=3||r===20&&e>=16)return u.getBuiltinModule(t)}return h(t)},{spawnSync:l}=f("node:child_process"),g=64*1024*1024,n=(t,r)=>{const e=l("git",t,{cwd:r,encoding:"utf8",maxBuffer:g});if(e.error)throw new Error(`Failed to spawn git ${t.join(" ")}: ${e.error.message}`,{cause:e.error});return{status:typeof e.status=="number"?e.status:1,stderr:typeof e.stderr=="string"?e.stderr:"",stdout:typeof e.stdout=="string"?e.stdout:""}},b=(t,r)=>{const e=(r.stderr||r.stdout).trim();return`git ${t.join(" ")} failed (exit ${r.status})${e?`:
2
+ ${e}`:""}`},o=(t,r,e=n)=>{const s=e(t,r);if(s.status!==0)throw new Error(b(t,s));return s.stdout.trim()},$=(t,r=n)=>{const e=r(["rev-parse","--is-inside-work-tree"],t);if(e.status!==0||e.stdout.trim()!=="true")throw new Error(`Not a git repository: ${t}. Run inside a git working tree.`)},_=(t,r=n)=>o(["status","--porcelain"],t,r).length===0,j=(t,r=n)=>{if(!_(t,r))throw new Error("Working tree has uncommitted changes. Commit or stash them before running this command.")},y=({annotate:t,branch:r,cwd:e,prefix:s,runner:i=n})=>{const a=["subtree","split",`--prefix=${s}`];return t&&a.push(`--annotate=${t}`),a.push("-b",r),o(a,e,i),o(["rev-parse",r],e,i)},R=({cwd:t,message:r,prefix:e,ref:s,repo:i,runner:a=n,squash:d})=>{const c=["subtree","add",`--prefix=${e}`];d&&c.push("--squash"),r&&c.push("-m",r),c.push(i,s),o(c,t,a)},v=({branch:t,runner:r=n,source:e,sourceBranch:s,target:i})=>{o(["init","-b",t],i,r),o(["pull",e,s],i,r)},x=(t,r,e=n)=>{o(["branch","-D",t],r,e)},B=(t,r,e,s=n)=>{o(["remote","add",t,r],e,s)},q=(t,r,e,s=n)=>{o(["push","-u",t,r],e,s)},N=(t,r,e=n)=>{const s=o(["rev-list","--count",t],r,e),i=Number.parseInt(s,10);return Number.isNaN(i)?0:i},k=(t,r,e,s=n)=>{o(["rm","-r",t],e,s),o(["commit","-m",r],e,s)};export{$ as a,j as b,B as c,N as d,x as e,R as f,v as i,q as p,k as r,y as s};
@@ -0,0 +1,11 @@
1
+ import{createRequire as co}from"node:module";let fo;const go=e=>(fo??=co(import.meta.url))(e),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mo=e=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[t,o]=be.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return be.getBuiltinModule(e)}return go(e)},{createRequire:ho}=mo("node:module");let bo;const vo=e=>(bo??=ho(import.meta.url))(e),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zt=e=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[t,o]=me.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return me.getBuiltinModule(e)}return vo(e)},{homedir:yo,tmpdir:gt}=Zt("node:os"),{env:ot,cwd:xo,platform:wt}=me,{createRequire:k}=Zt("node:module"),Ao=0,Yt=2,Ro=Symbol("findUpStop"),_o=/^[A-Z]:\//i,st=(e="")=>e&&e.replaceAll("\\","/").replace(_o,t=>t.toUpperCase()),Eo=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,To=/^[A-Z]:$/i,Co=/.(\.[^./]+)$/,So=/^[/\\]|^[a-z]:[/\\]/i,$o=/\/$/,wo=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",ko=(e,t)=>{let o="",c=0,p=-1,r=0,i;for(let l=0;l<=e.length;++l){if(l<e.length)i=e[l];else{if(i==="/")break;i="/"}if(i==="/"){if(!(p===l-1||r===1))if(r===2){if(o.length<2||c!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const f=o.lastIndexOf("/");f===-1?(o="",c=0):(o=o.slice(0,f),c=o.length-1-o.lastIndexOf("/")),p=l,r=0;continue}else if(o.length>0){o="",c=0,p=l,r=0;continue}}t&&(o+=o.length>0?"/..":"..",c=2)}else o.length>0?o+=`/${e.slice(p+1,l)}`:o=e.slice(p+1,l),c=l-p-1;p=l,r=0}else i==="."&&r!==-1?++r:r=-1}return o},rt=e=>Eo.test(e),dt=function(...e){e=e.map(c=>st(c));let t="",o=!1;for(let c=e.length-1;c>=-1&&!o;c--){const p=c>=0?e[c]:wo();!p||p.length===0||(t=`${p}/${t}`,o=rt(p))}return t=ko(t,!o),o&&!rt(t)?`/${t}`:t.length>0?t:"."},Oo=function(e){return Co.exec(st(e))?.[1]??""},Vt=e=>{const t=st(e).replace($o,""),o=t.lastIndexOf("/");if(o===-1)return rt(e)?"/":".";const c=t.slice(0,o);return To.test(c)?`${c}/`:c||(rt(e)?"/":".")},Ho=(e,t)=>{const o=st(e);return o.slice(o.lastIndexOf("/")+1)},No=function(e){const t=So.exec(e)?.[0]?.replaceAll("\\","/")??"",o=Ho(e),c=Oo(o);return{base:o,dir:Vt(e),ext:c,name:o.slice(0,o.length-c.length),root:t}},Lo=k(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bo=e=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[t,o]=ve.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ve.getBuiltinModule(e)}return Lo(e)},{fileURLToPath:Mo}=Bo("node:url");function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kt,Ot;function Do(){return Ot||(Ot=1,kt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),kt}var Go=Do();const zo=Io(Go);new Set(zo);const lt=e=>st(e instanceof URL?Mo(e):e),Jt=e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},Po=k(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Uo=e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,o]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ye.getBuiltinModule(e)}return Po(e)};Uo("node:fs/promises");const jo=k(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fo=e=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[t,o]=xe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return xe.getBuiltinModule(e)}return jo(e)};Fo("node:fs");const Ht=e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},Ko=k(import.meta.url),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xo=e=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[t,o]=Ae.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ae.getBuiltinModule(e)}return Ko(e)};Xo("node:fs/promises");const Wo=k(import.meta.url),Re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Qo=e=>{if(typeof Re<"u"&&Re.versions&&Re.versions.node){const[t,o]=Re.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Re.getBuiltinModule(e)}return Wo(e)},{lstatSync:Nt,mkdirSync:qo}=Qo("node:fs"),_e=e=>{Jt(e);try{const t=Nt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ht(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{qo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const o=Nt(e);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ht(o))}'`,{cause:t})}},Zo=k(import.meta.url),Ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yo=e=>{if(typeof Ee<"u"&&Ee.versions&&Ee.versions.node){const[t,o]=Ee.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ee.getBuiltinModule(e)}return Zo(e)};Yo("node:fs/promises");const Vo=k(import.meta.url),Te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jo=e=>{if(typeof Te<"u"&&Te.versions&&Te.versions.node){const[t,o]=Te.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Te.getBuiltinModule(e)}return Vo(e)};Jo("node:fs");const er=k(import.meta.url),Ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tr=e=>{if(typeof Ce<"u"&&Ce.versions&&Ce.versions.node){const[t,o]=Ce.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ce.getBuiltinModule(e)}return er(e)};tr("node:fs/promises");const or=k(import.meta.url),Se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rr=e=>{if(typeof Se<"u"&&Se.versions&&Se.versions.node){const[t,o]=Se.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Se.getBuiltinModule(e)}return or(e)};rr("node:fs");const sr=k(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nr=e=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[t,o]=$e.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return $e.getBuiltinModule(e)}return sr(e)};nr("node:fs/promises");const ur=k(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ir=e=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[t,o]=we.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return we.getBuiltinModule(e)}return ur(e)};ir("node:fs");k(import.meta.url);const ar=k(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lr=e=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[t,o]=ke.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ke.getBuiltinModule(e)}return ar(e)};lr("node:fs/promises");const pr=k(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,cr=e=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[t,o]=Oe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Oe.getBuiltinModule(e)}return pr(e)};cr("node:fs");const fr=k(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gr=e=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[t,o]=He.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return He.getBuiltinModule(e)}return fr(e)};gr("node:fs/promises");const dr=k(import.meta.url),Ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mr=e=>{if(typeof Ne<"u"&&Ne.versions&&Ne.versions.node){const[t,o]=Ne.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ne.getBuiltinModule(e)}return dr(e)},{statSync:hr,lstatSync:br}=mr("node:fs"),vr=(e,t={})=>{const o=t.cwd?lt(t.cwd):process.cwd();let c=dt(o);const{root:p}=No(c),r=lt(t.stopAt??p),i=dt(c,r),l=t.type??"file",f=function(d){return[e]};t.allowSymlinks??=!0;const x=t.allowSymlinks?hr:br;for(;c&&c!==i&&c!==p;){for(let d of f()){if(d===Ro)return;if(d===void 0)continue;Buffer.isBuffer(d)?d=d.toString():d instanceof URL&&(d=lt(d));const T=rt(d)?d:dt(c,d);try{const C=x(T);if(l==="file"&&C.isFile()||l==="directory"&&C.isDirectory())return T}catch{}}c=Vt(c)}};function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lt={},mt,Bt;function ct(){if(Bt)return mt;Bt=1;const e="[^\\\\/]",t=Symbol("unignore"),o="\\.",c="\\+",p="\\?",r="\\/",i="(?=.)",l="[^/]",f=`(?:${r}|$)`,x=`(?:^|${r})`,d=`${o}{1,2}${f}`,T=`(?!${o})`,C=`(?!${x}${d})`,_=`(?!${o}{0,1}${f})`,B=`(?!${d})`,te=`[^.${r}]`,q=`${l}*?`,K="/",m={DOT_LITERAL:o,PLUS_LITERAL:c,QMARK_LITERAL:p,SLASH_LITERAL:r,ONE_CHAR:i,QMARK:l,END_ANCHOR:f,DOTS_SLASH:d,NO_DOT:T,NO_DOTS:C,NO_DOT_SLASH:_,NO_DOTS_SLASH:B,QMARK_NO_DOT:te,STAR:q,START_ANCHOR:x,SEP:K},b={...m,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${o}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[\\\\/])${o}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},s={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return mt={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:s,UNIGNORE:t,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(v){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${v.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(v){return v===!0?b:m}},mt}var Mt;function ft(){return Mt||(Mt=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_GLOBAL:p}=ct();e.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e.hasRegexChars=r=>c.test(r),e.isRegexChar=r=>r.length===1&&e.hasRegexChars(r),e.escapeRegex=r=>r.replace(p,"\\$1"),e.toPosixSlashes=r=>r.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const r=navigator.platform.toLowerCase();return r==="win32"||r==="windows"}return process.platform?process.platform==="win32":!1},e.removeBackslashes=r=>r.replace(o,i=>i==="\\"?"":i),e.escapeLast=(r,i,l)=>{const f=r.lastIndexOf(i,l);return f===-1?r:r[f-1]==="\\"?e.escapeLast(r,i,f-1):`${r.slice(0,f)}\\${r.slice(f)}`},e.removePrefix=(r,i={})=>{let l=r;return l.startsWith("./")&&(l=l.slice(2),i.prefix="./"),l},e.wrapOutput=(r,i={},l={})=>{const f=l.contains?"":"^",x=l.contains?"":"$";let d=`${f}(?:${r})${x}`;return i.negated===!0&&(d=`(?:^(?!${d}).*$)`),d},e.basename=(r,{windows:i}={})=>{const l=r.split(i?/[\\/]/:"/"),f=l[l.length-1];return f===""?l[l.length-2]:f}})(Lt)),Lt}var ht,It;function yr(){if(It)return ht;It=1;const e=ft(),{CHAR_ASTERISK:t,CHAR_AT:o,CHAR_BACKWARD_SLASH:c,CHAR_COMMA:p,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:f,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:T,CHAR_QUESTION_MARK:C,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:B,CHAR_RIGHT_SQUARE_BRACKET:te}=ct(),q=m=>m===l||m===c,K=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return ht=(m,b)=>{const s=b||{},v=m.length-1,A=s.parts===!0||s.scanToEnd===!0,R=[],y=[],O=[];let X=m,Z=-1,P=0,re=0,W=!1,se=!1,I=!1,le=!1,ge=!1,ne=!1,L=!1,ue=!1,de=!1,Q=!1,F=0,V,E,w={value:"",depth:0,isGlob:!1};const a=()=>Z>=v,Y=()=>X.charCodeAt(Z+1),U=()=>(V=E,X.charCodeAt(++Z));for(;Z<v;){E=U();let H;if(E===c){L=w.backslashes=!0,E=U(),E===f&&(ne=!0);continue}if(ne===!0||E===f){for(F++;a()!==!0&&(E=U());){if(E===c){L=w.backslashes=!0,U();continue}if(E===f){F++;continue}if(ne!==!0&&E===r&&(E=U())===r){if(W=w.isBrace=!0,I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(ne!==!0&&E===p){if(W=w.isBrace=!0,I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(E===_&&(F--,F===0)){ne=!1,W=w.isBrace=!0,Q=!0;break}}if(A===!0)continue;break}if(E===l){if(R.push(Z),y.push(w),w={value:"",depth:0,isGlob:!1},Q===!0)continue;if(V===r&&Z===P+1){P+=2;continue}re=Z+1;continue}if(s.noext!==!0&&(E===T||E===o||E===t||E===C||E===i)&&Y()===x){if(I=w.isGlob=!0,le=w.isExtglob=!0,Q=!0,E===i&&Z===P&&(de=!0),A===!0){for(;a()!==!0&&(E=U());){if(E===c){L=w.backslashes=!0,E=U();continue}if(E===B){I=w.isGlob=!0,Q=!0;break}}continue}break}if(E===t){if(V===t&&(ge=w.isGlobstar=!0),I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(E===C){if(I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(E===d){for(;a()!==!0&&(H=U());){if(H===c){L=w.backslashes=!0,U();continue}if(H===te){se=w.isBracket=!0,I=w.isGlob=!0,Q=!0;break}}if(A===!0)continue;break}if(s.nonegate!==!0&&E===i&&Z===P){ue=w.negated=!0,P++;continue}if(s.noparen!==!0&&E===x){if(I=w.isGlob=!0,A===!0){for(;a()!==!0&&(E=U());){if(E===x){L=w.backslashes=!0,E=U();continue}if(E===B){Q=!0;break}}continue}break}if(I===!0){if(Q=!0,A===!0)continue;break}}s.noext===!0&&(le=!1,I=!1);let z=X,n="",u="";P>0&&(n=X.slice(0,P),X=X.slice(P),re-=P),z&&I===!0&&re>0?(z=X.slice(0,re),u=X.slice(re)):I===!0?(z="",u=X):z=X,z&&z!==""&&z!=="/"&&z!==X&&q(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),s.unescape===!0&&(u&&(u=e.removeBackslashes(u)),z&&L===!0&&(z=e.removeBackslashes(z)));const ee={prefix:n,input:m,start:P,base:z,glob:u,isBrace:W,isBracket:se,isGlob:I,isExtglob:le,isGlobstar:ge,negated:ue,negatedExtglob:de};if(s.tokens===!0&&(ee.maxDepth=0,q(E)||y.push(w),ee.tokens=y),s.parts===!0||s.tokens===!0){let H;for(let D=0;D<R.length;D++){const pe=H?H+1:P,J=R[D],ce=m.slice(pe,J);s.tokens&&(D===0&&P!==0?(y[D].isPrefix=!0,y[D].value=n):y[D].value=ce,K(y[D]),ee.maxDepth+=y[D].depth),(D!==0||ce!=="")&&O.push(ce),H=J}if(H&&H+1<m.length){const D=m.slice(H+1);O.push(D),s.tokens&&(y[y.length-1].value=D,K(y[y.length-1]),ee.maxDepth+=y[y.length-1].depth)}ee.slashes=R,ee.parts=O}return ee},ht}var bt,Dt;function xr(){if(Dt)return bt;Dt=1;const e=ct(),t=ft(),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:c,REGEX_NON_SPECIAL_CHARS:p,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:i}=e,l=(m,b)=>typeof b.expandRange=="function"?b.expandRange(...m,b):(m.sort(),`[${m.join("-")}]`),f=(m,b)=>`Missing ${m}: "${b}" - use "\\\\${b}" to match literal characters`,x=m=>{const b=[];let s=0,v=0,A=0,R="",y=!1;for(const O of m){if(y===!0){R+=O,y=!1;continue}if(O==="\\"){R+=O,y=!0;continue}if(O==='"'){A=A===1?0:1,R+=O;continue}if(A===0){if(O==="[")s++;else if(O==="]"&&s>0)s--;else if(s===0){if(O==="(")v++;else if(O===")"&&v>0)v--;else if(O==="|"&&v===0){b.push(R),R="";continue}}}R+=O}return b.push(R),b},d=m=>{let b=!1;for(const s of m){if(b===!0){b=!1;continue}if(s==="\\"){b=!0;continue}if(/[?*+@!()[\]{}]/.test(s))return!1}return!0},T=m=>{let b=m.trim(),s=!0;for(;s===!0;)s=!1,/^@\([^\\()[\]{}|]+\)$/.test(b)&&(b=b.slice(2,-1),s=!0);if(d(b))return b.replace(/\\(.)/g,"$1")},C=m=>{const b=m.map(T).filter(Boolean);for(let s=0;s<b.length;s++)for(let v=s+1;v<b.length;v++){const A=b[s],R=b[v],y=A[0];if(!(!y||A!==y.repeat(A.length)||R!==y.repeat(R.length))&&(A===R||A.startsWith(R)||R.startsWith(A)))return!0}return!1},_=(m,b=!0)=>{if(m[0]!=="+"&&m[0]!=="*"||m[1]!=="(")return;let s=0,v=0,A=0,R=!1;for(let y=1;y<m.length;y++){const O=m[y];if(R===!0){R=!1;continue}if(O==="\\"){R=!0;continue}if(O==='"'){A=A===1?0:1;continue}if(A!==1){if(O==="["){s++;continue}if(O==="]"&&s>0){s--;continue}if(!(s>0)){if(O==="("){v++;continue}if(O===")"&&(v--,v===0))return b===!0&&y!==m.length-1?void 0:{type:m[0],body:m.slice(2,y),end:y}}}}},B=m=>{let b=0;const s=[];for(;b<m.length;){const v=_(m.slice(b),!1);if(!v||v.type!=="*")return;const A=x(v.body).map(y=>y.trim());if(A.length!==1)return;const R=T(A[0]);if(!R||R.length!==1)return;s.push(R),b+=v.end+1}return s.length<1?void 0:`${s.length===1?t.escapeRegex(s[0]):`[${s.map(v=>t.escapeRegex(v)).join("")}]`}*`},te=m=>{let b=0,s=m.trim(),v=_(s);for(;v;)b++,s=v.body.trim(),v=_(s);return b},q=(m,b)=>{if(b.maxExtglobRecursion===!1)return{risky:!1};const s=typeof b.maxExtglobRecursion=="number"?b.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,v=x(m).map(A=>A.trim());if(v.length>1&&(v.some(A=>A==="")||v.some(A=>/^[*?]+$/.test(A))||C(v)))return{risky:!0};for(const A of v){const R=B(A);if(R)return{risky:!0,safeOutput:R};if(te(A)>s)return{risky:!0}}return{risky:!1}},K=(m,b)=>{if(typeof m!="string")throw new TypeError("Expected a string");m=i[m]||m;const s={...b},v=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o;let A=m.length;if(A>v)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${v}`);const R={type:"bos",value:"",output:s.prepend||""},y=[R],O=s.capture?"":"?:",X=e.globChars(s.windows),Z=e.extglobChars(X),{DOT_LITERAL:P,PLUS_LITERAL:re,SLASH_LITERAL:W,ONE_CHAR:se,DOTS_SLASH:I,NO_DOT:le,NO_DOT_SLASH:ge,NO_DOTS_SLASH:ne,QMARK:L,QMARK_NO_DOT:ue,STAR:de,START_ANCHOR:Q}=X,F=h=>`(${O}(?:(?!${Q}${h.dot?I:P}).)*?)`,V=s.dot?"":le,E=s.dot?L:ue;let w=s.bash===!0?F(s):de;s.capture&&(w=`(${w})`),typeof s.noext=="boolean"&&(s.noextglob=s.noext);const a={input:m,index:-1,start:0,dot:s.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};m=t.removePrefix(m,a),A=m.length;const Y=[],U=[],z=[];let n=R,u;const ee=()=>a.index===A-1,H=a.peek=(h=1)=>m[a.index+h],D=a.advance=()=>m[++a.index]||"",pe=()=>m.slice(a.index+1),J=(h="",M=0)=>{a.consumed+=h,a.index+=M},ce=h=>{a.output+=h.output!=null?h.output:h.value,J(h.value)},lo=()=>{let h=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)D(),a.start++,h++;return h%2===0?!1:(a.negated=!0,a.start++,!0)},it=h=>{a[h]++,z.push(h)},fe=h=>{a[h]--,z.pop()},S=h=>{if(n.type==="globstar"){const M=a.braces>0&&(h.type==="comma"||h.type==="brace"),g=h.extglob===!0||Y.length&&(h.type==="pipe"||h.type==="paren");h.type!=="slash"&&h.type!=="paren"&&!M&&!g&&(a.output=a.output.slice(0,-n.output.length),n.type="star",n.value="*",n.output=w,a.output+=n.output)}if(Y.length&&h.type!=="paren"&&(Y[Y.length-1].inner+=h.value),(h.value||h.output)&&ce(h),n&&n.type==="text"&&h.type==="text"){n.output=(n.output||n.value)+h.value,n.value+=h.value;return}h.prev=n,y.push(h),n=h},at=(h,M)=>{const g={...Z[M],conditions:1,inner:""};g.prev=n,g.parens=a.parens,g.output=a.output,g.startIndex=a.index,g.tokensIndex=y.length;const $=(s.capture?"(":"")+g.open;it("parens"),S({type:h,value:M,output:a.output?"":se}),S({type:"paren",extglob:!0,value:D(),output:$}),Y.push(g)},po=h=>{const M=m.slice(h.startIndex,a.index+1),g=m.slice(h.startIndex+2,a.index),$=q(g,s);if((h.type==="plus"||h.type==="star")&&$.risky){const N=$.safeOutput?(h.output?"":se)+(s.capture?`(${$.safeOutput})`:$.safeOutput):void 0,ie=y[h.tokensIndex];ie.type="text",ie.value=M,ie.output=N||t.escapeRegex(M);for(let ae=h.tokensIndex+1;ae<y.length;ae++)y[ae].value="",y[ae].output="",delete y[ae].suffix;a.output=h.output+ie.output,a.backtrack=!0,S({type:"paren",extglob:!0,value:u,output:""}),fe("parens");return}let G=h.close+(s.capture?")":""),j;if(h.type==="negate"){let N=w;if(h.inner&&h.inner.length>1&&h.inner.includes("/")&&(N=F(s)),(N!==w||ee()||/^\)+$/.test(pe()))&&(G=h.close=`)$))${N}`),h.inner.includes("*")&&(j=pe())&&/^\.[^\\/.]+$/.test(j)){const ie=K(j,{...b,fastpaths:!1}).output;G=h.close=`)${ie})${N})`}h.prev.type==="bos"&&(a.negatedExtglob=!0)}S({type:"paren",extglob:!0,value:u,output:G}),fe("parens")};if(s.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(m)){let h=!1,M=m.replace(r,(g,$,G,j,N,ie)=>j==="\\"?(h=!0,g):j==="?"?$?$+j+(N?L.repeat(N.length):""):ie===0?E+(N?L.repeat(N.length):""):L.repeat(G.length):j==="."?P.repeat(G.length):j==="*"?$?$+j+(N?w:""):w:$?g:`\\${g}`);return h===!0&&(s.unescape===!0?M=M.replace(/\\/g,""):M=M.replace(/\\+/g,g=>g.length%2===0?"\\\\":g?"\\":"")),M===m&&s.contains===!0?(a.output=m,a):(a.output=t.wrapOutput(M,a,b),a)}for(;!ee();){if(u=D(),u==="\0")continue;if(u==="\\"){const g=H();if(g==="/"&&s.bash!==!0||g==="."||g===";")continue;if(!g){u+="\\",S({type:"text",value:u});continue}const $=/^\\+/.exec(pe());let G=0;if($&&$[0].length>2&&(G=$[0].length,a.index+=G,G%2!==0&&(u+="\\")),s.unescape===!0?u=D():u+=D(),a.brackets===0){S({type:"text",value:u});continue}}if(a.brackets>0&&(u!=="]"||n.value==="["||n.value==="[^")){if(s.posix!==!1&&u===":"){const g=n.value.slice(1);if(g.includes("[")&&(n.posix=!0,g.includes(":"))){const $=n.value.lastIndexOf("["),G=n.value.slice(0,$),j=n.value.slice($+2),N=c[j];if(N){n.value=G+N,a.backtrack=!0,D(),!R.output&&y.indexOf(n)===1&&(R.output=se);continue}}}(u==="["&&H()!==":"||u==="-"&&H()==="]")&&(u=`\\${u}`),u==="]"&&(n.value==="["||n.value==="[^")&&(u=`\\${u}`),s.posix===!0&&u==="!"&&n.value==="["&&(u="^"),n.value+=u,ce({value:u});continue}if(a.quotes===1&&u!=='"'){u=t.escapeRegex(u),n.value+=u,ce({value:u});continue}if(u==='"'){a.quotes=a.quotes===1?0:1,s.keepQuotes===!0&&S({type:"text",value:u});continue}if(u==="("){it("parens"),S({type:"paren",value:u});continue}if(u===")"){if(a.parens===0&&s.strictBrackets===!0)throw new SyntaxError(f("opening","("));const g=Y[Y.length-1];if(g&&a.parens===g.parens+1){po(Y.pop());continue}S({type:"paren",value:u,output:a.parens?")":"\\)"}),fe("parens");continue}if(u==="["){if(s.nobracket===!0||!pe().includes("]")){if(s.nobracket!==!0&&s.strictBrackets===!0)throw new SyntaxError(f("closing","]"));u=`\\${u}`}else it("brackets");S({type:"bracket",value:u});continue}if(u==="]"){if(s.nobracket===!0||n&&n.type==="bracket"&&n.value.length===1){S({type:"text",value:u,output:`\\${u}`});continue}if(a.brackets===0){if(s.strictBrackets===!0)throw new SyntaxError(f("opening","["));S({type:"text",value:u,output:`\\${u}`});continue}fe("brackets");const g=n.value.slice(1);if(n.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(u=`/${u}`),n.value+=u,ce({value:u}),s.literalBrackets===!1||t.hasRegexChars(g))continue;const $=t.escapeRegex(n.value);if(a.output=a.output.slice(0,-n.value.length),s.literalBrackets===!0){a.output+=$,n.value=$;continue}n.value=`(${O}${$}|${n.value})`,a.output+=n.value;continue}if(u==="{"&&s.nobrace!==!0){it("braces");const g={type:"brace",value:u,output:"(",outputIndex:a.output.length,tokensIndex:a.tokens.length};U.push(g),S(g);continue}if(u==="}"){const g=U[U.length-1];if(s.nobrace===!0||!g){S({type:"text",value:u,output:u});continue}let $=")";if(g.dots===!0){const G=y.slice(),j=[];for(let N=G.length-1;N>=0&&(y.pop(),G[N].type!=="brace");N--)G[N].type!=="dots"&&j.unshift(G[N].value);$=l(j,s),a.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const G=a.output.slice(0,g.outputIndex),j=a.tokens.slice(g.tokensIndex);g.value=g.output="\\{",u=$="\\}",a.output=G;for(const N of j)a.output+=N.output||N.value}S({type:"brace",value:u,output:$}),fe("braces"),U.pop();continue}if(u==="|"){Y.length>0&&Y[Y.length-1].conditions++,S({type:"text",value:u});continue}if(u===","){let g=u;const $=U[U.length-1];$&&z[z.length-1]==="braces"&&($.comma=!0,g="|"),S({type:"comma",value:u,output:g});continue}if(u==="/"){if(n.type==="dot"&&a.index===a.start+1){a.start=a.index+1,a.consumed="",a.output="",y.pop(),n=R;continue}S({type:"slash",value:u,output:W});continue}if(u==="."){if(a.braces>0&&n.type==="dot"){n.value==="."&&(n.output=P);const g=U[U.length-1];n.type="dots",n.output+=u,n.value+=u,g.dots=!0;continue}if(a.braces+a.parens===0&&n.type!=="bos"&&n.type!=="slash"){S({type:"text",value:u,output:P});continue}S({type:"dot",value:u,output:P});continue}if(u==="?"){if(!(n&&n.value==="(")&&s.noextglob!==!0&&H()==="("&&H(2)!=="?"){at("qmark",u);continue}if(n&&n.type==="paren"){const g=H();let $=u;(n.value==="("&&!/[!=<:]/.test(g)||g==="<"&&!/<([!=]|\w+>)/.test(pe()))&&($=`\\${u}`),S({type:"text",value:u,output:$});continue}if(s.dot!==!0&&(n.type==="slash"||n.type==="bos")){S({type:"qmark",value:u,output:ue});continue}S({type:"qmark",value:u,output:L});continue}if(u==="!"){if(s.noextglob!==!0&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){at("negate",u);continue}if(s.nonegate!==!0&&a.index===0){lo();continue}}if(u==="+"){if(s.noextglob!==!0&&H()==="("&&H(2)!=="?"){at("plus",u);continue}if(n&&n.value==="("||s.regex===!1){S({type:"plus",value:u,output:re});continue}if(n&&(n.type==="bracket"||n.type==="paren"||n.type==="brace")||a.parens>0){S({type:"plus",value:u});continue}S({type:"plus",value:re});continue}if(u==="@"){if(s.noextglob!==!0&&H()==="("&&H(2)!=="?"){S({type:"at",extglob:!0,value:u,output:""});continue}S({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);const g=p.exec(pe());g&&(u+=g[0],a.index+=g[0].length),S({type:"text",value:u});continue}if(n&&(n.type==="globstar"||n.star===!0)){n.type="star",n.star=!0,n.value+=u,n.output=w,a.backtrack=!0,a.globstar=!0,J(u);continue}let h=pe();if(s.noextglob!==!0&&/^\([^?]/.test(h)){at("star",u);continue}if(n.type==="star"){if(s.noglobstar===!0){J(u);continue}const g=n.prev,$=g.prev,G=g.type==="slash"||g.type==="bos",j=$&&($.type==="star"||$.type==="globstar");if(s.bash===!0&&(!G||h[0]&&h[0]!=="/")){S({type:"star",value:u,output:""});continue}const N=a.braces>0&&(g.type==="comma"||g.type==="brace"),ie=Y.length&&(g.type==="pipe"||g.type==="paren");if(!G&&g.type!=="paren"&&!N&&!ie){S({type:"star",value:u,output:""});continue}for(;h.slice(0,3)==="/**";){const ae=m[a.index+4];if(ae&&ae!=="/")break;h=h.slice(3),J("/**",3)}if(g.type==="bos"&&ee()){n.type="globstar",n.value+=u,n.output=F(s),a.output=n.output,a.globstar=!0,J(u);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!j&&ee()){a.output=a.output.slice(0,-(g.output+n.output).length),g.output=`(?:${g.output}`,n.type="globstar",n.output=F(s)+(s.strictSlashes?")":"|$)"),n.value+=u,a.globstar=!0,a.output+=g.output+n.output,J(u);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&h[0]==="/"){const ae=h[1]!==void 0?"|$":"";a.output=a.output.slice(0,-(g.output+n.output).length),g.output=`(?:${g.output}`,n.type="globstar",n.output=`${F(s)}${W}|${W}${ae})`,n.value+=u,a.output+=g.output+n.output,a.globstar=!0,J(u+D()),S({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&h[0]==="/"){n.type="globstar",n.value+=u,n.output=`(?:^|${W}|${F(s)}${W})`,a.output=n.output,a.globstar=!0,J(u+D()),S({type:"slash",value:"/",output:""});continue}if(N&&h[0]==="/"){n.type="globstar",n.value+=u,n.output=`(?:^|${W}|${F(s)}${W})`,a.output+=n.output,a.globstar=!0,J(u+D()),S({type:"slash",value:"/",output:""});continue}a.output=a.output.slice(0,-n.output.length),n.type="globstar",n.output=F(s),n.value+=u,a.output+=n.output,a.globstar=!0,J(u);continue}const M={type:"star",value:u,output:w};if(s.bash===!0){M.output=".*?",(n.type==="bos"||n.type==="slash")&&(M.output=V+M.output),S(M);continue}if(n&&(n.type==="bracket"||n.type==="paren")&&s.regex===!0){M.output=u,S(M);continue}(a.index===a.start||n.type==="slash"||n.type==="dot")&&(n.type==="dot"?(a.output+=ge,n.output+=ge):s.dot===!0?(a.output+=ne,n.output+=ne):(a.output+=V,n.output+=V),H()!=="*"&&(a.output+=se,n.output+=se)),S(M)}for(;a.brackets>0;){if(s.strictBrackets===!0)throw new SyntaxError(f("closing","]"));a.output=t.escapeLast(a.output,"["),fe("brackets")}for(;a.parens>0;){if(s.strictBrackets===!0)throw new SyntaxError(f("closing",")"));a.output=t.escapeLast(a.output,"("),fe("parens")}for(;a.braces>0;){if(s.strictBrackets===!0)throw new SyntaxError(f("closing","}"));a.output=t.escapeLast(a.output,"{"),fe("braces")}if(s.strictSlashes!==!0&&(n.type==="star"||n.type==="bracket")&&S({type:"maybe_slash",value:"",output:`${W}?`}),a.backtrack===!0){a.output="";for(const h of a.tokens)a.output+=h.output!=null?h.output:h.value,h.suffix&&(a.output+=h.suffix)}return a};return K.fastpaths=(m,b)=>{const s={...b},v=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o,A=m.length;if(A>v)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${v}`);m=i[m]||m;const{DOT_LITERAL:R,SLASH_LITERAL:y,ONE_CHAR:O,DOTS_SLASH:X,NO_DOT:Z,NO_DOTS:P,NO_DOTS_SLASH:re,STAR:W,START_ANCHOR:se}=e.globChars(s.windows),I=s.dot?P:Z,le=s.dot?re:Z,ge=s.capture?"":"?:",ne={negated:!1,prefix:""};let L=s.bash===!0?".*?":W;s.capture&&(L=`(${L})`);const ue=V=>V.noglobstar===!0?L:`(${ge}(?:(?!${se}${V.dot?X:R}).)*?)`,de=V=>{switch(V){case"*":return`${I}${O}${L}`;case".*":return`${R}${O}${L}`;case"*.*":return`${I}${L}${R}${O}${L}`;case"*/*":return`${I}${L}${y}${O}${le}${L}`;case"**":return I+ue(s);case"**/*":return`(?:${I}${ue(s)}${y})?${le}${O}${L}`;case"**/*.*":return`(?:${I}${ue(s)}${y})?${le}${L}${R}${O}${L}`;case"**/.*":return`(?:${I}${ue(s)}${y})?${R}${O}${L}`;default:{const E=/^(.*?)\.(\w+)$/.exec(V);if(!E)return;const w=de(E[1]);return w?w+R+E[2]:void 0}}},Q=t.removePrefix(m,ne);let F=de(Q);return F&&s.strictSlashes!==!0&&(F+=`${y}?`),F},bt=K,bt}var vt,Gt;function Ar(){if(Gt)return vt;Gt=1;const e=yr(),t=xr(),o=ft(),c=ct(),p=i=>i&&typeof i=="object"&&!Array.isArray(i),r=(i,l,f=!1)=>{if(Array.isArray(i)){const q=i.map(K=>r(K,l,f));return K=>{for(const m of q){const b=m(K);if(b)return b}return!1}}const x=p(i)&&i.tokens&&i.input;if(i===""||typeof i!="string"&&!x)throw new TypeError("Expected pattern to be a non-empty string");const d=l||{},T=d.windows,C=x?r.compileRe(i,l):r.makeRe(i,l,!1,!0),_=C.state;delete C.state;let B=()=>!1;if(d.ignore){const q={...l,ignore:null,onMatch:null,onResult:null};B=r(d.ignore,q,f)}const te=(q,K=!1)=>{const{isMatch:m,match:b,output:s}=r.test(q,C,l,{glob:i,posix:T}),v={glob:i,state:_,regex:C,posix:T,input:q,output:s,match:b,isMatch:m};if(typeof d.onResult=="function"&&d.onResult(v),m===!1)return v.isMatch=!1,K?v:!1;e:if(B(q)){if(typeof d.onIgnore=="function"&&d.onIgnore(v)===c.UNIGNORE){v.isMatch=!0;break e}return v.isMatch=!1,K?v:!1}return typeof d.onMatch=="function"&&d.onMatch(v),K?v:!0};return f&&(te.state=_),te};return r.test=(i,l,f,{glob:x,posix:d}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const T=f||{},C=T.format||(d?o.toPosixSlashes:null);let _=i===x,B=_&&C?C(i):i;return _===!1&&(B=C?C(i):i,_=B===x),(_===!1||T.capture===!0)&&(T.matchBase===!0||T.basename===!0?_=r.matchBase(i,l,f,d):_=l.exec(B)),{isMatch:!!_,match:_,output:B}},r.matchBase=(i,l,f)=>(l instanceof RegExp?l:r.makeRe(l,f)).test(o.basename(i)),r.isMatch=(i,l,f)=>r(l,f)(i),r.parse=(i,l)=>Array.isArray(i)?i.map(f=>r.parse(f,l)):t(i,{...l,fastpaths:!1}),r.scan=(i,l)=>e(i,l),r.compileRe=(i,l,f=!1,x=!1)=>{if(f===!0)return i.output;const d=l||{},T=d.contains?"":"^",C=d.contains?"":"$";let _=`${T}(?:${i.output})${C}`;i&&i.negated===!0&&(_=`^(?!${_}).*$`);const B=r.toRegex(_,l);return x===!0&&(B.state=i),B},r.makeRe=(i,l={},f=!1,x=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(i[0]==="."||i[0]==="*")&&(d.output=t.fastpaths(i,l)),d.output||(d=t(i,l)),r.compileRe(d,l,f,x)},r.toRegex=(i,l)=>{try{const f=l||{};return new RegExp(i,f.flags||(f.nocase?"i":""))}catch(f){if(l&&l.debug===!0)throw f;return/$^/}},r.constants=c,vt=r,vt}var yt,zt;function Rr(){if(zt)return yt;zt=1;const e=Ar(),t=ft();function o(c,p,r=!1){return p&&(p.windows===null||p.windows===void 0)&&(p={...p,windows:t.isWindows()}),e(c,p,r)}return Object.assign(o,e),yt=o,yt}var _r=Rr();Tt(_r);const Er=k(import.meta.url),Le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nt=e=>{if(typeof Le<"u"&&Le.versions&&Le.versions.node){const[t,o]=Le.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Le.getBuiltinModule(e)}return Er(e)};nt("fs");nt("fs");nt("path");nt("url");const{createRequire:Tr}=nt("module");var Pt=Tr(import.meta.url);try{Pt.resolve("picomatch"),Pt("picomatch")}catch{}var xt,Ut;function Cr(){if(Ut)return xt;Ut=1;/*!
2
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
+ *
4
+ * Copyright (c) 2014-2016, Jon Schlinkert.
5
+ * Licensed under the MIT License.
6
+ */return xt=function(e){if(typeof e!="string"||e==="")return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1},xt}var At,jt;function eo(){if(jt)return At;jt=1;/*!
7
+ * is-glob <https://github.com/jonschlinkert/is-glob>
8
+ *
9
+ * Copyright (c) 2014-2017, Jon Schlinkert.
10
+ * Released under the MIT License.
11
+ */var e=Cr(),t={"{":"}","(":")","[":"]"},o=function(p){if(p[0]==="!")return!0;for(var r=0,i=-2,l=-2,f=-2,x=-2,d=-2;r<p.length;){if(p[r]==="*"||p[r+1]==="?"&&/[\].+)]/.test(p[r])||l!==-1&&p[r]==="["&&p[r+1]!=="]"&&(l<r&&(l=p.indexOf("]",r)),l>r&&(d===-1||d>l||(d=p.indexOf("\\",r),d===-1||d>l)))||f!==-1&&p[r]==="{"&&p[r+1]!=="}"&&(f=p.indexOf("}",r),f>r&&(d=p.indexOf("\\",r),d===-1||d>f))||x!==-1&&p[r]==="("&&p[r+1]==="?"&&/[:!=]/.test(p[r+2])&&p[r+3]!==")"&&(x=p.indexOf(")",r),x>r&&(d=p.indexOf("\\",r),d===-1||d>x))||i!==-1&&p[r]==="("&&p[r+1]!=="|"&&(i<r&&(i=p.indexOf("|",r)),i!==-1&&p[i+1]!==")"&&(x=p.indexOf(")",i),x>i&&(d=p.indexOf("\\",i),d===-1||d>x))))return!0;if(p[r]==="\\"){var T=p[r+1];r+=2;var C=t[T];if(C){var _=p.indexOf(C,r);_!==-1&&(r=_+1)}if(p[r]==="!")return!0}else r++}return!1},c=function(p){if(p[0]==="!")return!0;for(var r=0;r<p.length;){if(/[*?{}()[\]]/.test(p[r]))return!0;if(p[r]==="\\"){var i=p[r+1];r+=2;var l=t[i];if(l){var f=p.indexOf(l,r);f!==-1&&(r=f+1)}if(p[r]==="!")return!0}else r++}return!1};return At=function(p,r){if(typeof p!="string"||p==="")return!1;if(e(p))return!0;var i=o;return r&&r.strict===!1&&(i=c),i(p)},At}const Sr=k(import.meta.url),Be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,to=e=>{if(typeof Be<"u"&&Be.versions&&Be.versions.node){const[t,o]=Be.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Be.getBuiltinModule(e)}return Sr(e)},$r=to("path"),wr=to("os");var Rt,Ft;function kr(){if(Ft)return Rt;Ft=1;var e=eo(),t=$r.posix.dirname,o=wr.platform()==="win32",c="/",p=/\\/g,r=/\\([!*?|[\](){}])/g;Rt=function(f,x){var d=Object.assign({flipBackslashes:!0},x);d.flipBackslashes&&o&&f.indexOf(c)<0&&(f=f.replace(p,c)),i(f)&&(f+=c),f+="a";do f=t(f);while(l(f));return f.replace(r,"$1")};function i(f){var x=f.slice(-1),d;switch(x){case"}":d="{";break;case"]":d="[";break;default:return!1}var T=f.indexOf(d);return T<0?!1:f.slice(T+1,-1).includes(c)}function l(f){return/\([^()]+$/.test(f)||f[0]==="{"||f[0]==="["||/[^\\][{[]/.test(f)?!0:e(f)}return Rt}var Or=kr();Tt(Or);const Hr=k(import.meta.url),Me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Nr=e=>{if(typeof Me<"u"&&Me.versions&&Me.versions.node){const[t,o]=Me.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Me.getBuiltinModule(e)}return Hr(e)};Nr("node:fs/promises");const Lr=k(import.meta.url),Ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Br=e=>{if(typeof Ie<"u"&&Ie.versions&&Ie.versions.node){const[t,o]=Ie.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ie.getBuiltinModule(e)}return Lr(e)},{accessSync:Mr}=Br("node:fs");function pt(e,t=Ao){Jt(e),e=lt(e);try{return Mr(e,t),!0}catch{return!1}}var Ir=eo();Tt(Ir);const Dr=k(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,oo=e=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[t,o]=De.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return De.getBuiltinModule(e)}return Dr(e)};oo("node:fs/promises");oo("node:fs");let Gr=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}};const zr=k(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ro=e=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[t,o]=Ge.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ge.getBuiltinModule(e)}return zr(e)};ro("node:fs/promises");ro("node:zlib");const Pr=k(import.meta.url),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,so=e=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[t,o]=ze.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ze.getBuiltinModule(e)}return Pr(e)};so("node:fs");so("node:zlib");const Ur=k(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jr=e=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[t,o]=Pe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Pe.getBuiltinModule(e)}return Ur(e)},{createRequire:no}=jr("node:module"),Fr=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&Fr.set("AggregateError",AggregateError);const Kr=no(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xr=e=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[t,o]=Ue.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ue.getBuiltinModule(e)}return Kr(e)};Xr("node:util");const Wr=no(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ct=e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,o]=je.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return je.getBuiltinModule(e)}return Wr(e)};Ct("node:fs");Ct("node:path");Ct("node:url");const Qr=k(import.meta.url),Fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,uo=e=>{if(typeof Fe<"u"&&Fe.versions&&Fe.versions.node){const[t,o]=Fe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Fe.getBuiltinModule(e)}return Qr(e)};uo("node:fs");uo("node:fs/promises");const qr=k(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zr=e=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[t,o]=Ke.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ke.getBuiltinModule(e)}return qr(e)};Zr("node:fs");const Yr=k(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vr=e=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[t,o]=Xe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Xe.getBuiltinModule(e)}return Yr(e)};Vr("node:fs/promises");const Jr=k(import.meta.url),We=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,es=e=>{if(typeof We<"u"&&We.versions&&We.versions.node){const[t,o]=We.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return We.getBuiltinModule(e)}return Jr(e)};es("node:fs");k(import.meta.url);const ts=k(import.meta.url),Qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,os=e=>{if(typeof Qe<"u"&&Qe.versions&&Qe.versions.node){const[t,o]=Qe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Qe.getBuiltinModule(e)}return ts(e)};os("node:crypto");new TextEncoder;const rs=k(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ss=e=>{if(typeof qe<"u"&&qe.versions&&qe.versions.node){const[t,o]=qe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return qe.getBuiltinModule(e)}return rs(e)};ss("node:fs/promises");const ns=k(import.meta.url),Ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,us=e=>{if(typeof Ze<"u"&&Ze.versions&&Ze.versions.node){const[t,o]=Ze.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ze.getBuiltinModule(e)}return ns(e)};us("node:fs");const is=k(import.meta.url),Ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,as=e=>{if(typeof Ye<"u"&&Ye.versions&&Ye.versions.node){const[t,o]=Ye.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ye.getBuiltinModule(e)}return is(e)};as("node:fs/promises");const ls=k(import.meta.url),Ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ps=e=>{if(typeof Ve<"u"&&Ve.versions&&Ve.versions.node){const[t,o]=Ve.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ve.getBuiltinModule(e)}return ls(e)};ps("node:fs");const cs=k(import.meta.url),Je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,St=e=>{if(typeof Je<"u"&&Je.versions&&Je.versions.node){const[t,o]=Je.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Je.getBuiltinModule(e)}return cs(e)},fs=St("fs"),gs=St("os"),ds=St("path");var _t={},Kt;function ms(){if(Kt)return _t;Kt=1;var e=Object.defineProperty,t=(d,T)=>e(d,"name",{value:T,configurable:!0}),o=fs,c=gs,p=ds;const r=t(d=>{let T="";for(let C=0;C<d.length;C+=1){const _=d[C],B=_.toUpperCase();T+=_===B?_.toLowerCase():B}return T},"invertCase"),i=new Map,l=t((d,T)=>{const C=p.join(d,`.is-fs-case-sensitive-test-${process.pid}`);try{return T.writeFileSync(C,""),!T.existsSync(r(C))}finally{try{T.unlinkSync(C)}catch{}}},"checkDirectoryCaseWithWrite"),f=t((d,T,C)=>{try{return l(d,C)}catch(_){if(T===void 0)return l(c.tmpdir(),C);throw _}},"checkDirectoryCaseWithFallback"),x=t((d,T=o,C=!0)=>{const _=d??process.cwd();if(C&&i.has(_))return i.get(_);let B;const te=r(_);return te!==_&&T.existsSync(_)?B=!T.existsSync(te):B=f(_,d,T),C&&i.set(_,B),B},"isFsCaseSensitive");return _t.isFsCaseSensitive=x,_t}ms();const hs=/^[A-Z]:\//i,ut=(e="")=>e&&e.replaceAll("\\","/").replace(hs,t=>t.toUpperCase()),bs=/^[/\\]{2}/,vs=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,$t=/^[A-Z]:$/i,ys=/\/$/,xs=()=>{if(typeof process.cwd=="function")try{const e=process.cwd();if(typeof e=="string")return ut(e)}catch{}return"/"},Et="/",io=(e,t)=>{let o="",c=0,p=-1,r=0,i;for(let l=0;l<=e.length;++l){if(l<e.length)i=e[l];else{if(i==="/")break;i="/"}if(i==="/"){if(!(p===l-1||r===1))if(r===2){if(o.length<2||c!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const f=o.lastIndexOf("/");f===-1?(o="",c=0):(o=o.slice(0,f),c=o.length-1-o.lastIndexOf("/")),p=l,r=0;continue}else if(o.length>0){o="",c=0,p=l,r=0;continue}}t&&(o+=o.length>0?"/..":"..",c=2)}else o.length>0?o+=`/${e.slice(p+1,l)}`:o=e.slice(p+1,l),c=l-p-1;p=l,r=0}else i==="."&&r!==-1?++r:r=-1}return o},he=e=>vs.test(e),As=function(e){if(e.length===0)return".";e=ut(e);const t=bs.exec(e),o=he(e),c=e.at(-1)==="/";return e=io(e,!o),e.length===0?o?"/":c?"./":".":(c&&(e+="/"),$t.test(e)&&(e+="/"),t?o?`//${e}`:`//./${e}`:o&&!he(e)?`/${e}`:e)},oe=(...e)=>{let t="";for(const o of e)if(o)if(t.length>0){const c=t.at(-1)==="/",p=o[0]==="/";c&&p?t+=o.slice(1):t+=c||p?o:`/${o}`}else t+=o;return As(t)},Rs=function(...e){e=e.map(c=>ut(c));let t="",o=!1;for(let c=e.length-1;c>=-1&&!o;c--){const p=c>=0?e[c]:xs();!p||p.length===0||(t=`${p}/${t}`,o=he(p))}return t=io(t,!o),$t.test(t)?`${t}/`:o&&!he(t)?`/${t}`:t.length>0?t:"."},_s=e=>{const t=ut(e).replace(ys,""),o=t.lastIndexOf("/");if(o===-1)return he(e)?"/":".";const c=t.slice(0,o);return $t.test(c)?`${c}/`:c||(he(e)?"/":".")};let Es;const Ts=e=>(Es??=k(import.meta.url))(e),et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cs=e=>{if(typeof et<"u"&&et.versions&&et.versions.node){const[t,o]=et.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return et.getBuiltinModule(e)}return Ts(e)},{fileURLToPath:Ss}=Cs("node:url");function $s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xt,Wt;function ws(){return Wt||(Wt=1,Xt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Xt}var ks=ws();const Os=$s(ks);new Set(Os);const ao=e=>ut(e instanceof URL?Ss(e):e),Qt=e=>{const t=yo();if(wt==="win32"){const r=ot.LOCALAPPDATA,i=t?oe(t,"AppData","Local"):gt(),l=r&&r.length>0?r:i;return oe(l,e,"Cache")}if(wt==="darwin"){const r=t?oe(t,"Library","Caches"):gt();return oe(r,e)}const o=ot.XDG_CACHE_HOME,c=t?oe(t,".cache"):gt(),p=o&&o.length>0?o:c;return oe(p,e)},Hs=e=>{if(e.length===0)return;const t=e.map(r=>Rs(ao(r)).split(Et));let o=Number.POSITIVE_INFINITY;for(const r of t)r.length<o&&(o=r.length);const c=[];for(let r=0;r<o;r+=1){const i=t[0][r];if(t.every(l=>l[r]===i))c.push(i);else break}const p=c.join(Et);return p===""?Et:p},tt=(e,t)=>{if(e!==void 0)return t?(...o)=>oe(e,...o):e},Ns=e=>{if(e?.files&&e.files.length>0){const t=Hs(e.files);if(t!==void 0)return t}return e?.cwd??xo()},Ls=e=>new Gr(`No package.json found searching upwards from '${ao(e)}'.`),Bs=e=>!pt(e,Yt)&&pt(e),Ms=(e,t)=>{if(ot.CACHE_DIR&&!["0","1","false","true"].includes(ot.CACHE_DIR)){const x=oe(ot.CACHE_DIR,e);return t?.create&&_e(x),tt(x,t?.thunk)}const o=Ns(t),c=vr("package.json",{cwd:o,type:"file"});if(!c){if(t?.useGlobalCacheFallback){const x=Qt(e);return t.create&&_e(x),tt(x,t.thunk)}if(t?.throwError)throw Ls(o);return}const p=_s(c),r=oe(p,"node_modules"),i=oe(r,".cache"),l=oe(i,e);if(pt(l,Yt))return t?.create&&_e(l),tt(l,t?.thunk);const f=[l,i,r];if(pt(r)||f.push(p),f.some(x=>Bs(x))){if(t?.useGlobalCacheFallback){const x=Qt(e);return t.create&&_e(x),tt(x,t.thunk)}return}return t?.create&&_e(l),tt(l,t?.thunk)},zs=Ms,qt="@inherit",Is=["aliases","dependsOn","inputs","outputs"],Ds=(e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(qt))return[...t];const o=[];for(const c of t){if(c===qt){e!==void 0&&o.push(...e);continue}o.push(c)}return o},Ps=(e,t)=>{const o={...e,...t};for(const c of Is){const p=e?.[c],r=t?.[c],i=Ds(p,r);i===void 0?delete o[c]:o[c]=i}return o};export{zs as F,Ps as m};
@@ -0,0 +1 @@
1
+ import{createRequire as _}from"node:module";import{v as m,w as v,l as I,z as j}from"./index-uBVnF4ji.js";let y;const b=e=>(y??=_(import.meta.url))(e),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[s,r]=h.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return h.getBuiltinModule(e)}return b(e)},{platform:C}=T("node:os"),x={server:{cache:!1,interactive:!1,persistent:!0,runInCI:!1},utility:{cache:!1,runInCI:!1}},q=e=>{const s=e.preset??e.options?.preset;if(!s)return e;const r=x[s];if(!r)return e;const{cache:n,...t}=r;return{...e,cache:e.cache??n,options:{...t,...e.options}}},$=()=>{const e=C();return e==="darwin"?"macos":e==="win32"?"windows":"linux"},k=(e,s)=>{if(!s||s.size===0)return!0;const r=e?.runnerTags;return!r||r.length===0?!0:r.some(n=>s.has(n))},A=(e,s,r=!0)=>{const n=e?.runInCI??!0;return n===!0||n==="always"?!0:n===!1?!s:n==="affected"?!s||r:!0},z=(e,s,r)=>r||!s?e:m(s)?s:v(e,s),B=(e,s)=>{if(s===!1)return{};const r=s===!0?O("production"):Array.isArray(s)?s:[s],n={};for(const t of r)Object.assign(n,R(e,t,n));return n},g=(e,s)=>{const r=t=>{const c=s[t];return c!==void 0?c:process.env[t]??""};let n="";for(let t=0;t<e.length;t+=1){const c=e[t];if(c==="\\"&&e[t+1]==="$"){n+="$",t+=1;continue}if(c!=="$"){n+=c;continue}const a=e[t+1];if(a==="{"){let o=1,l=t+2;for(;l<e.length;){const d=e[l];if(d==="}"){if(o-=1,o===0)break}else d==="{"&&e[l-1]==="$"&&(o+=1);l+=1}if(o!==0){n+=e.slice(t);break}const f=l,i=e.slice(t+2,f),u=i.indexOf(":-");if(u===-1)n+=r(i);else{const d=i.slice(0,u),w=i.slice(u+2),p=s[d]??process.env[d];n+=p!==void 0&&p!==""?p:g(w,s)}t=f;continue}if(a!==void 0&&/[A-Z_]/i.test(a)){let o=t+1;for(;o<e.length&&/\w/.test(e[o]);)o+=1;n+=r(e.slice(t+1,o)),t=o-1;continue}n+=c}return n},O=e=>{const s=[".env"];return e&&s.push(`.env.${e}`),e!=="test"&&s.push(".env.local"),e&&e!=="test"&&s.push(`.env.${e}.local`),s},R=(e,s,r={})=>{const n=m(s)?s:v(e,s);if(!I(n))return{};let t;try{t=j(n)}catch{return{}}const c={};for(const a of t.split(/\r?\n/)){const o=a.trim();if(o===""||o.startsWith("#"))continue;const l=o.indexOf("=");if(l===-1)continue;const f=o.slice(0,l).trim();if(f==="")continue;let i=o.slice(l+1).trim();const u=i.length>=2&&i.startsWith("'")&&i.endsWith("'");(i.startsWith('"')&&i.endsWith('"')||u)&&(i=i.slice(1,-1)),u||(i=g(i,{...r,...c})),c[f]=i}return c},F=(e,s=$())=>{if(e)return s==="windows"&&e.windowsShell?e.windowsShell:(s==="linux"||s==="macos")&&e.unixShell?e.unixShell:e.shell},M=e=>{if(e==="run")return!1;if(e==="build"||e==="test")return!0};export{F as a,M as b,q as c,$ as d,B as l,k as m,z as r,A as s};
@@ -0,0 +1,5 @@
1
+ import{createRequire as F}from"node:module";import{w as v,l as m,a as J,z as y}from"./index-uBVnF4ji.js";import{a as W}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";let D;const q=o=>(D??=F(import.meta.url))(o),w=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,M=o=>{if(typeof w<"u"&&w.versions&&w.versions.node){const[e,n]=w.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return w.getBuiltinModule(o)}return q(o)},{execFileSync:x}=M("node:child_process"),{randomBytes:B}=M("node:crypto"),{writeFileSync:I,renameSync:R,unlinkSync:U}=M("node:fs"),{delimiter:z}=M("node:path"),H=["proto","mise","fnm","volta","asdf","nvm","corepack"],Z={asdf:["bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],corepack:["npm","pnpm","yarn"],fnm:["node"],mise:["aube","bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],nvm:["node"],proto:["bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],volta:["node","npm","pnpm","yarn"]},X=["proto","mise","fnm","volta","asdf","nvm","corepack"],A={asdf:[".tool-versions"],corepack:[],fnm:[".nvmrc",".node-version"],mise:[".mise.toml",".config/mise.toml","mise.toml"],nvm:[".nvmrc"],proto:[".prototools"],volta:[]},b=new Map,h=o=>{const e=b.get(o);if(e!==void 0||b.has(o))return e;const n=process.env.PATH;if(!n){b.set(o,void 0);return}const t=process.platform==="win32"?["",...(process.env.PATHEXT??".COM;.EXE;.BAT;.CMD").split(";")]:[""];for(const r of n.split(z)){const i=r.replaceAll(/^["']|["']$/g,"").trim();if(i!=="")for(const l of t){const s=`${i}${J}${o}${l}`;if(m(s))return b.set(o,s),s}}b.set(o,void 0)},S=(o,e=["--version"])=>{try{const n=x(o,e,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}),t=/\d+\.\d+(?:\.\d+)?/.exec(n);return t?t[0]:n.trim()||void 0}catch{return}},T=(o,e)=>{const n=v(o,"package.json");if(!m(n))return[];try{const t=W(n)[e];if(e==="volta"&&typeof t=="object"&&t!==null&&Object.keys(t).length>0)return["package.json"];if(e==="packageManager"&&typeof t=="string"&&t.length>0)return["package.json"]}catch{}return[]},G=(o,e)=>o==="volta"?T(e,"volta"):o==="corepack"?T(e,"packageManager"):A[o].filter(n=>m(v(e,n))),_=new Map,L=()=>{_.clear(),b.clear()},O=(o,e)=>{{const i=_.get(o);if(i)return i}const n=[],t=!!h("pnpm")||!!h("yarn");for(const i of X){const l=i==="nvm"?void 0:h(i),s=i==="nvm"&&!!process.env.NVM_DIR,c=G(i,o),a=!!l||s;i==="corepack"&&!a&&(!(c.length>0)||t)||!a&&c.length===0||n.push({binPath:l,configFiles:c,installed:a,name:i,version:l?S(l):void 0})}const r=Object.freeze(n);return _.set(o,r),r},de=(o,e,n)=>{const t=O(o);return e?.preferredManager&&e.preferredManager!=="none"?t.find(r=>r.name===e.preferredManager)??{configFiles:[],installed:!1,name:e.preferredManager}:t.find(r=>r.installed&&r.configFiles.length>0)??t.find(r=>r.installed)??t.find(r=>r.configFiles.length>0)??{configFiles:[],installed:!1,name:"none"}},V=(o,e)=>{for(const n of e){const t=v(o,n);if(m(t))try{const r=y(t).trim();if(r!=="")return{name:n,value:r.replace(/^v/,"")}}catch{}}},K=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,Y=o=>{const e=v(o,".prototools");if(!m(e))return[];const n=y(e),t=[];let r=!1;for(const i of n.split(/\r?\n/)){const l=i.trim();if(l===""||l.startsWith("#"))continue;if(l.startsWith("[")){r=!0;continue}if(r)continue;const s=K.exec(l);if(!s)continue;const[,c,a]=s,p=g(c);p&&t.push({source:".prototools",tool:p,version:a.trim()})}return t},Q=/^\[tools\]\s*$/i,ee=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,oe=o=>{for(const e of A.mise){const n=v(o,e);if(!m(n))continue;const t=[],r=y(n);let i=!1;for(const l of r.split(/\r?\n/)){const s=l.trim();if(s===""||s.startsWith("#"))continue;if(s.startsWith("[")){i=Q.test(s);continue}if(!i)continue;const c=ee.exec(s);if(!c)continue;const[,a,p]=c,d=g(a);d&&t.push({source:".mise.toml",tool:d,version:p.trim()})}if(t.length>0)return t}return[]},ne=o=>{const e=v(o,".tool-versions");if(!m(e))return[];const n=y(e),t=[];for(const r of n.split(/\r?\n/)){const i=r.trim();if(i===""||i.startsWith("#"))continue;const l=i.split(/\s+/);if(l.length<2)continue;const[s,...c]=l,a=g(s);a&&c[0]&&t.push({source:".tool-versions",tool:a,version:c[0]})}return t},g=o=>{switch(o.toLowerCase()){case"aube":return"aube";case"bun":return"bun";case"deno":return"deno";case"go":case"golang":return"go";case"node":case"nodejs":return"node";case"npm":return"npm";case"pnpm":return"pnpm";case"python":case"python3":return"python";case"ruby":return"ruby";case"rust":case"rustc":return"rust";case"yarn":return"yarn";default:return}},te=o=>{const[e]=o.split("+",1),n=/^(pnpm|yarn|npm|bun)@(.+)$/.exec(e??"");if(!n)return;const t=g(n[1]);if(t)return{source:"packageManager",tool:t,version:n[2]}},re=(o,e)=>{const n=new Map,t=s=>{n.set(s.tool,s)},r=v(o,"package.json");let i={};try{m(r)&&(i=W(r))}catch{}if(i.engines)for(const[s,c]of Object.entries(i.engines)){const a=g(s);a&&typeof c=="string"&&t({source:"engines",tool:a,version:c})}if(i.packageManager){const s=te(i.packageManager);s&&t(s)}if(i.volta)for(const[s,c]of Object.entries(i.volta)){const a=g(s);a&&typeof c=="string"&&t({source:"volta",tool:a,version:c})}const l=V(o,[".nvmrc",".node-version"]);l&&t({source:l.name===".nvmrc"?".nvmrc":".node-version",tool:"node",version:l.value});for(const s of ne(o))t(s);for(const s of oe(o))t(s);for(const s of Y(o))t(s);if(e?.tools)for(const[s,c]of Object.entries(e.tools)){const a=g(s);a&&typeof c=="string"&&t({source:"vis.config.ts",tool:a,version:c})}return[...n.values()]},P={aube:{args:["--version"],binaries:["aube"]},bun:{args:["--version"],binaries:["bun"]},deno:{args:["--version"],binaries:["deno"]},go:{args:["version"],binaries:["go"]},node:{args:["--version"],binaries:["node"]},npm:{args:["--version"],binaries:["npm"]},pnpm:{args:["--version"],binaries:["pnpm"]},python:{args:["--version"],binaries:["python","python3"]},ruby:{args:["--version"],binaries:["ruby"]},rust:{args:["--version"],binaries:["rustc"]},yarn:{args:["--version"],binaries:["yarn"]}},E=o=>{const e=P[o];for(const n of e.binaries){const t=h(n);if(t)return S(t,e.args)}if(o==="node")return process.versions.node},N=(o,e)=>{const n=e.trim();if(n===""||n==="*"||n==="latest")return!0;if(/^\d[\d.]*$/.test(n))return o===n||o.startsWith(`${n}.`);const t=s=>s.split(/[.\-+]/).map(c=>Number.parseInt(c,10)||0),r=(s,c)=>{const a=t(s),p=t(c),d=Math.max(a.length,p.length);for(let f=0;f<d;f++){const $=a[f]??0,u=p[f]??0;if($!==u)return $-u}return 0},i=s=>{for(const c of s)if(c.startsWith(">=")){if(r(o,c.slice(2).trim())<0)return!1}else if(c.startsWith("<=")){if(r(o,c.slice(2).trim())>0)return!1}else if(c.startsWith(">")){if(r(o,c.slice(1).trim())<=0)return!1}else if(c.startsWith("<")){if(r(o,c.slice(1).trim())>=0)return!1}else if(c.startsWith("^")||c.startsWith("~")){const a=c.slice(1).trim(),[p,d]=t(a),[f,$]=t(o);if(f!==p||c.startsWith("~")&&$!==d||r(o,a)<0)return!1}return!0},l=n.split("||").map(s=>s.trim().split(/\s+/).filter(Boolean)).filter(s=>s.length>0);return l.length===0?!0:l.some(s=>i(s))},se=(o,e)=>{switch(o){case".mise.toml":return["mise"];case".node-version":case".nvmrc":return["fnm","nvm","volta","proto","mise","asdf"];case".prototools":return["proto"];case".tool-versions":return["asdf","mise"];case"packageManager":return e==="pnpm"||e==="yarn"?["self-activate","volta","proto","mise","corepack"]:e==="npm"?["volta","proto","mise","asdf","corepack"]:e==="aube"?["mise"]:e==="bun"?["proto","mise","asdf"]:["volta","proto","mise"];case"volta":return["volta"];default:return["proto","mise","fnm","volta","asdf","nvm","corepack"]}},ie=(o,e,n)=>{if(n?.preferredManager&&n.preferredManager!=="none"&&j(n.preferredManager,o.tool)){const r=e.find(i=>i.name===n.preferredManager);return r?{installed:r.installed,name:r.name}:{installed:!1,name:n.preferredManager,note:`${n.preferredManager} is the preferred manager but isn't on PATH`}}const t=se(o.source,o.tool);for(const r of t){if(r==="self-activate"){if((o.tool==="pnpm"||o.tool==="yarn")&&h(o.tool))return{installed:!0,name:"self-activate",note:`${o.tool} will activate ${o.version} from the packageManager field on next invocation`};continue}if(j(r,o.tool)&&e.find(i=>i.name===r)?.installed)return{installed:!0,name:r}}for(const r of t)if(!(r==="self-activate"||!j(r,o.tool)))return{installed:!1,name:r,note:`${r} can install ${o.tool} — run \`vis toolchain install\` after adding it to PATH`};return{installed:!1,name:"none",note:"No manager knows how to install this tool"}},j=(o,e)=>o==="none"?!1:o==="self-activate"?e==="pnpm"||e==="yarn":Z[o].includes(e),ae=(o,e)=>{const n=O(o),t=re(o,e).map(r=>{const i=E(r.tool),l=i!==void 0&&N(i,r.version),s=ie(r,n,e);return{actual:i,expected:r,manager:s,matches:l}});return{detected:n,tools:t}},ce=(o,e)=>{switch(o){case"asdf":return e?{args:["install",e.tool,e.version],bin:"asdf"}:void 0;case"corepack":return e?{args:["prepare",`${e.tool}@${e.version}`,"--activate"],bin:"corepack"}:{args:["prepare","--activate"],bin:"corepack",hint:"reads the packageManager field in package.json"};case"fnm":return e?.tool!=="node"?void 0:{args:["install",e.version],bin:"fnm"};case"mise":return e?{args:["install",`${e.tool}@${e.version}`],bin:"mise"}:void 0;case"none":return;case"nvm":return{args:[],bin:"nvm",hint:"nvm is a shell function — run `nvm install` / `nvm use` from your shell"};case"proto":return e?{args:["install",e.tool,e.version],bin:"proto"}:void 0;case"self-activate":return{args:[],bin:e?.tool??"pnpm",hint:`${e?.tool??"pnpm"} will self-activate on next invocation — no install needed`};case"volta":return e?{args:["install",`${e.tool}@${e.version}`],bin:"volta"}:{args:["install","node@lts"],bin:"volta",hint:"volta pins per-tool; specify <tool>@<version>"};default:{const n=o;throw new Error(`Unknown manager: ${n}`)}}},ge=(o,e)=>{switch(o){case"asdf":return{args:["local",e.tool,e.version],bin:"asdf",configChange:{file:".tool-versions",hint:`Pins ${e.tool} ${e.version}`}};case"corepack":return e.tool!=="npm"&&e.tool!=="pnpm"&&e.tool!=="yarn"?void 0:{args:["use",`${e.tool}@${e.version}`],bin:"corepack",configChange:{file:"package.json",hint:`Writes packageManager: "${e.tool}@${e.version}"`}};case"fnm":return e.tool==="node"?{args:["use",e.version],bin:"fnm"}:void 0;case"mise":return{args:["use","--",`${e.tool}@${e.version}`],bin:"mise",configChange:{file:".mise.toml",hint:`Pins ${e.tool} ${e.version}`}};case"none":return;case"nvm":return e.tool==="node"?{args:[],bin:"nvm",configChange:{file:".nvmrc",hint:"Write version to .nvmrc manually (nvm doesn't persist)."}}:void 0;case"proto":return{args:["pin",e.tool,e.version],bin:"proto",configChange:{file:".prototools",hint:`Pins ${e.tool} ${e.version}`}};case"self-activate":return{args:[],bin:e.tool,configChange:{file:"package.json",hint:`Set packageManager: "${e.tool}@${e.version}" — ${e.tool} will self-activate on next invocation`}};case"volta":return{args:["pin",`${e.tool}@${e.version}`],bin:"volta",configChange:{file:"package.json",hint:`Writes volta.${e.tool}`}};default:{const n=o;throw new Error(`Unknown manager: ${n}`)}}},he=o=>{for(const e of P[o].binaries){const n=h(e);if(n)return n}},$e=(o,e)=>{const n=P[e].binaries;if(o.installed&&o.binPath&&(o.name==="proto"||o.name==="mise"||o.name==="asdf"||o.name==="volta"||o.name==="fnm"))for(const t of n)try{const r=x(o.binPath,["which",t],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}).trim();if(r)return r}catch{}for(const t of n){const r=h(t);if(r)return r}},C=(o,e)=>{const n=`${o}.${process.pid}.${B(6).toString("hex")}.tmp`;I(n,e);try{R(n,o)}catch(t){try{U(n)}catch{}throw t}},le=(o,e)=>{if("packageManager"in o)return o.packageManager=e,o;const n={};let t=!1;for(const[r,i]of Object.entries(o))!t&&(r==="dependencies"||r==="devDependencies"||r==="peerDependencies"||r==="optionalDependencies")&&(n.packageManager=e,t=!0),n[r]=i;return t||(n.packageManager=e),n},be=(o,e)=>{if(e.tool!=="pnpm"&&e.tool!=="yarn"&&e.tool!=="npm"&&e.tool!=="bun")return;const n=v(o,"package.json");if(!m(n))throw new Error(`Cannot pin ${e.tool}: ${n} does not exist.`);const t=y(n),r=/\n([ \t]+)/.exec(t)?.[1]??" ";let i;try{i=JSON.parse(t)}catch(a){throw new Error(`${n} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${a.message}`,{cause:a})}const l=`${e.tool}@${e.version}`,s=le(i,l),c=t.endsWith(`
2
+ `)?`
3
+ `:"";return C(n,`${JSON.stringify(s,void 0,r)}${c}`),l},ye=(o,e)=>{const n=v(o,"package.json");if(!m(n))return;const t=y(n);let r;try{r=JSON.parse(t)}catch(s){throw new Error(`${n} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${s.message}`,{cause:s})}if(r.engines?.[e.tool]===void 0||r.engines[e.tool]===e.version)return;r.engines[e.tool]=e.version;const i=/\n([ \t]+)/.exec(t)?.[1]??" ",l=t.endsWith(`
4
+ `)?`
5
+ `:"";return C(n,`${JSON.stringify(r,void 0,i)}${l}`),e.version},ke=o=>{const e=/^([a-z][\w-]*)@(.+)$/i.exec(o.trim());if(!e)return;const n=g(e[1]);if(n)return{source:"vis.config.ts",tool:n,version:e[2]}},fe=async(o,e,n)=>{const t=ae(o,e),r=t.tools.filter(a=>!a.matches);if(r.length===0)return{attempted:[],failed:[],upToDate:!0};const i=t.detected.some(a=>a.installed);if(!(e?.autoInstall??i))return{attempted:[],failed:[],upToDate:!1};const l=[],s=[],c=new Map;for(const a of r){const p=c.get(a.manager.name);p?p.push(a):c.set(a.manager.name,[a])}for(const[a,p]of c){if(a==="self-activate"){for(const{expected:f}of p)n.info(`toolchain: ${f.tool} ${f.version} will self-activate on next ${f.tool} invocation`),l.push(f);continue}if(a==="none"){for(const{expected:f}of p)s.push({error:`no manager can install ${f.tool} — install one of ${H.join(", ")}`,spec:f});continue}if(!t.detected.find(f=>f.name===a)?.installed){for(const{expected:f}of p)s.push({error:`${a} is not on PATH`,spec:f});continue}const d=p.map(f=>({invocation:ce(a,f.expected),tool:f})).filter(f=>f.invocation!==void 0);for(const{invocation:f,tool:$}of d){const{expected:u}=$;if(f.bin==="nvm"&&f.args.length===0){const k=E(u.tool);if(k!==void 0&&N(k,u.version)){n.info(`toolchain: ${u.tool} ${k} already satisfies ${u.version}; skipping nvm shell activation`),l.push(u);continue}n.warn(`toolchain: nvm requires a shell-side activation for ${u.tool} ${u.version}. Run \`nvm install\` / \`nvm use\` manually.`),s.push({error:"nvm requires shell-side activation",spec:u});continue}n.info(`toolchain: $ ${f.bin} ${f.args.join(" ")}`);try{x(f.bin,f.args,{cwd:o,stdio:"inherit"}),l.push(u),a==="fnm"&&pe(f.bin,n)}catch(k){s.push({error:k.message,spec:u});break}}}return L(),{attempted:l,failed:s,upToDate:!1}},we=async(o,e,n,t=!1)=>{if(t)return;const r=await fe(o,e,n);for(const i of r.failed)n.warn(`toolchain: ${i.spec.tool} ${i.spec.version} — ${i.error}`)},pe=(o,e)=>{const n=process.platform==="win32"?"powershell":"bash";try{const t=x(o,["env","--shell",n],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3});for(const r of t.split(/\r?\n/)){const i=r.trim();if(i==="")continue;const l=/^\$env:([A-Z_]\w*)\s*=\s*(.+)$/i.exec(i);if(l){const[,a,p]=l;process.env[a]=p.replaceAll(/^["']|["']$/g,"");continue}const s=/^set\s+"?([A-Z_]\w*)=(.*?)"?$/i.exec(i);if(s){const[,a,p]=s;process.env[a]=p;continue}const c=/^(?:export\s+)?([A-Z_]\w*)=(.+)$/i.exec(i);if(c){const[,a,p]=c;process.env[a]=p.replaceAll(/^["']|["']$/g,"")}}}catch(t){e.warn(`toolchain: could not activate fnm env (${t.message}). Subsequent tasks may use the previous Node version.`)}};export{H as S,ke as a,ce as b,ie as c,ge as d,$e as e,O as f,ae as g,he as h,de as p,we as r,ye as u,be as w};
@@ -0,0 +1 @@
1
+ import{createRequire as q}from"node:module";import{V as j,s as b}from"./index.server-CusjRLCh.js";import{w as T,l as A}from"./index-uBVnF4ji.js";import{g as C}from"./_commonjsHelpers-B5Y90VFO.js";import{i as g,p as c}from"../packem_chunks/cli-main.js";import{a as D}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";let $;const _=e=>($??=q(import.meta.url))(e),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,z=e=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[s,r]=d.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return d.getBuiltinModule(e)}return _(e)},{createInterface:M}=z("node:readline");var O=["aj","aju","av","avj","ejv","jav","jv"],R=["angula","angular-node","angularjs"],N=["auto-prefixer"],S=["aaxios","aios","axio","axioos","axios-node","axioss","axis","axiso","axois","axos","axxios"],B=["abel","babbel","babe","babel-js","babel-node","babl","bable","bbael","bebel"],F=["bcrpyt","bcrypt-node","brcypt","crypt","dcrypt"],P=["bcryptjs-node","dcryptjs"],W=["bunan","bunya","bunyan-node","buynan"],E=["cai","cha","chaijs","chal","chi","chia","hai"],L=["cahlk","calk","cchalk","ch4lk","cha1k","chaalk","chaik","chak","chakl","chalk-node","chalkk","challk","chhalk","chlak","chlk","halk","hcalk"],U=["cheero","cherio"],V=["c0lor","ccolor","clor","colo","coloor","color-js","colorjs","colorr","colr","coolor","coolr"],I=["ccolors","colors-node","colorss","colorz","colrs","coolors"],Y=["c0mmander","ccommander","cmmander","cmomander","co-mmander","comamnder","comander","comm4nder","commaander","commader","commadner","commamder","command3r","commandder","commande","commandeer","commander-js","commanderr","commandr","commandre","commanedr","commaner","commannder","commender","commmander","commnader","commnder","coommander","ocmmander","ommander"],G=["cor","corss","cos","cosr","cros","crs","ors"],H=["days"],J=["d3bug","dbeug","dbug","ddebug","debbug","debg","debgu","debu","debu9","debug-js","debug-node","debugg","debugjs","debuug","deebug","deubg","deug","ebug","edbug"],K=["dot-env","dotenv-node","dotenvjs","dotevn"],Q=["3lectron","eectron","eelctron","eelectron","el3ctron","elcetron","elctron","elecctron","elecron","elecrton","electon","electorn","electr0n","electrn","electrno","electro","electrom","electron-node","electronn","electroon","electrron","electtron","eleectron","eletcron","eletron","ellectron","lectron","leectron"],X=["asbuild","ebuild","esbuild-node","esbuildjs","ezbuild","sbuild"],Z=["aslint","elint","eslint-js","eslint-node","eslit","ezlint","slint"],ee=["eexpress","epress","epxress","experss","expess","exppress","expreess","expres","express-node","expressjs","expresss","exprress","exprses","exprss","exress","exrpess","exxpress","xepress","xpress"],oe=["astify"],se=["firebasejs"],re=["form1dable"],ae=["glb","glo","glob-js","globjs","gob","golb","lob"],te=["go","goot","gotjs","gott","gt","gto","ogt","ot","qot"],ne=["helmetjs","helnet"],ce=["homo","hon","hoo","hoon","ohno","ono"],ie=["inquire","inquirer-js","nquirer"],de=["iredis"],me=["ejst","est","jast","jes","jestjs","jestt","jet","jets","jst"],le=["imp","jim","jip","jmp"],pe=["ji","jio","jo","joii","jol","oi","oji"],ue=["jdom","jsdm","jsdo","jsdom-js","jsdon","jsom","sdom"],ve=["jsonwebtoken-js","jsonwebtoken-node"],he=["ka","kao","ko","koaa","koajs","koe","oa","oka"],je=["1odash","iodash","l0dash","ldash","ldoash","llodash","lo-dash","loadsh","loash","lobash","lod4sh","lodaash","lodah","lodahs","lodas","lodash-node","lodashh","lodassh","loddash","lodesh","lodsah","lodsh","loodash","odash","oldash"],be=["luca","luci","lucie"],ke=["luon","luxo","luxon-js"],ge=["imcromatch","mciromatch","micormatch","micrmoatch","micro-match","microamtch","micromacth","micromathc","micromtach","mircomatch"],fe=["minimath"],ye=["mcha","mmocha","moca","moch","mocha-js","moha","nocha","ocha"],xe=["m0ment","mment","mmoent","mmoment","moemnt","moent","mom3nt","momeent","momemt","momen","momen7","momennt","moment-js","momentjs","momentt","momet","mometn","momment","momnet","momnt","monent","mooment","oment","omment"],we=["mognoose","mogoose","mongoos","mongose","monqoose","moongoose"],qe=["moran","organ"],$e=["muler","multer-js","muter"],_e=["mysql"],ze=["ext","mext","n3xt","naxt","net","netx","nex","next-js","next-node","nextjs","nxt"],Me=["node-mailer","nodemailer-js"],Te=["nodemo","nodemonjs","nodmeon"],Ae=["oar","or","ora-node","ore","ra","roa"],Ce=["arcel","parce","parceljs"],De=["passport-js"],Oe=["phase","phaser-node"],Re=["ino","pimo","pin","pino-node","pinojs","pio","pion"],Ne=["playright","playwright-js"],Se=["postcss-js","postcss-node","potscss"],Be=["pettier","pprettier","pretier","prettierjs","prettierr","prtetier"],Fe=["prima","prism","prisma-js","prismajs","prizma"],Pe=["pupeteer"],We=["rada","rama","ramd","randa"],Ee=["eact","eract","r3act","raact","ract","raect","re4ct","reaact","reac","reac7","reacct","react-node","reactjs","reactt","reat","reatc","recat","rect","reeact","reect","rreact"],Le=["erdis","radis","rdis","redi","redis-js","redis-node","rediss","rediz","reds","reis","rredis"],Ue=["resen","rsend"],Ve=["ollup","rollup-js","rollup-node"],Ie=["ass","asss","sas","sass-node","sess","ssas","sss"],Ye=["emver","seemver","semver-node","semvre","senver","sever"],Ge=["sequelize-js","sequelize-node"],He=["harp","shap","shar","sharp-js","sharpjs"],Je=["stipe","strip","stripe-node","tripe"],Ke=["supabase-js"],Qe=["suelte","svelt3","svelte-js","sveltejs","velte"],Xe=["tailwindcss-js"],Ze=["auri","taui"],eo=["hree","htree","thee","there","three-js","three-node","tree"],oo=["stx","sx","ts","tsxx","ttsx","tx","txs","tzx"],so=["ttypescript","typecript","typescipt","typescript-node","typescriptjs","typescrit","typescritp"],ro=["udnerscore","undercore","underscoer","underscore-node","underscroe","undersocre","undesrcore"],ao=["uid","uud","uudi","uui","uuid-js","uuid-node","uuidjs","vuid"],to=["ite","vie","vit","vita","vite-node","vitee","vlte","vte"],no=["itest","uitest","vitestjs","vitezt","vittest","vtest"],co=["ue","uue","uve","ve","veu","vu","vu3","vua","vue-node","vuee","vuejs","vuue","vve","vvue"],io=["web-pack","weback","webpac","webpack-node","webpackjs","webpak","weebpack","wepack","wepback"],mo=["winson","winston-js","winstoon"],lo=["up","uyp","yp","yu","yupjs","yupp"],po=["od","zd","zdo","zo","zob","zod-js","zodjs"];const uo={ajv:O,angular:R,autoprefixer:N,"aws-sdk":["awssdk","ews-sdk"],axios:S,babel:B,bcrypt:F,bcryptjs:P,"body-parser":["body-paresr","body-parse","body-parser-js","body_parser"],bunyan:W,chai:E,chalk:L,cheerio:U,color:V,colors:I,commander:Y,"cookie-parser":["cookie-parse","cookieparser"],cors:G,"cross-env":["crossenv"],"date-fns":["data-fns","date-fn"],dayjs:H,debug:J,dotenv:K,electron:Q,esbuild:X,eslint:Z,express:ee,fastify:oe,firebase:se,formidable:re,glob:ae,got:te,helmet:ne,hono:ce,inquirer:ie,ioredis:de,jest:me,jimp:le,joi:pe,jsdom:ue,jsonwebtoken:ve,koa:he,lodash:je,lucia:be,luxon:ke,micromatch:ge,minimatch:fe,mocha:ye,moment:xe,mongoose:we,morgan:qe,multer:$e,mysql2:_e,next:ze,"node-fetch":["node-fecth","node-fethc","node.fetch"],nodemailer:Me,nodemon:Te,ora:Ae,parcel:Ce,passport:De,phaser:Oe,pino:Re,playwright:Ne,postcss:Se,prettier:Be,prisma:Fe,puppeteer:Pe,ramda:We,react:Ee,"react-dom":["eact-dom","eract-dom","r3act-dom","ract-dom","raect-dom","re4ct-dom","reaact-dom","reac-dom","reac7-dom","reacct-dom","react-bom","react-d0m","react-ddom","react-dm","react-dmo","react-do","react-domm","react-don","react-doom","react-odm","react-om","react.dom","reactdom","reactt-dom","reat-dom","reatc-dom","recat-dom","rect-dom","reeact-dom","rreact-dom"],redis:Le,resend:Ue,rollup:Ve,sass:Ie,semver:Ye,sequelize:Ge,sharp:He,"socket.io":["ocket.io","oscket.io","scket.io","scoket.io","soccket.io","socekt.io","socet.io","sock3t.io","socke.io","socke7.io","sockeet.io","socket.1o","socket.i","socket.iio","socket.ioo","socket.lo","socket.o","socket.oi","sockett.io","sockket.io","sockt.io","sockte.io","sokcet.io","soket.io","soocket.io","ssocket.io"],stripe:Je,supabase:Ke,svelte:Qe,tailwindcss:Xe,tauri:Ze,three:eo,"ts-node":["tts-node"],tsx:oo,typescript:so,underscore:ro,uuid:ao,vite:to,vitest:no,vue:co,webpack:io,winston:mo,yup:lo,zod:po};var u,k;function vo(){return k||(k=1,u={"@tanstack/start":["start-tanstack-app","tanstack","tanstack-app","tanstack-start"]}),u}var ho=vo();const jo=C(ho),bo={a:["4","e"],b:["d"],d:["b"],e:["3","a"],g:["9","q"],i:["1","l"],l:["1","i"],m:["n"],n:["m"],o:["0"],s:["5","z"],t:["7"],u:["v"],v:["u"]},ko=["app","cli","core","kit","lib","pkg","sdk"],go=e=>{const s=new Set;if(e.length<3)return s;for(let o=0;o<e.length;o++){const a=e[o],t=a==="-"||a==="."||a==="_";if(t||s.add(e.slice(0,o)+e.slice(o+1)),t||s.add(e.slice(0,o)+a+e.slice(o)),o<e.length-1&&e[o]!==e[o+1]){const p=e[o+1]==="-"||e[o+1]==="."||e[o+1]==="_";if(!t&&!p){const i=[...e];[i[o],i[o+1]]=[i[o+1],i[o]],s.add(i.join(""))}}const n=e[o].toLowerCase(),h=bo[n];if(h)for(const p of h)s.add(e.slice(0,o)+p+e.slice(o+1))}const r=/[-._]/g;if(r.test(e))s.add(e.replaceAll(r,"")),s.add(e.replaceAll(r,"-")),s.add(e.replaceAll(r,".")),s.add(e.replaceAll(r,"_"));else if(e.length>5)for(let o=2;o<e.length-2;o++)s.add(`${e.slice(0,o)}-${e.slice(o)}`),s.add(`${e.slice(0,o)}.${e.slice(o)}`),s.add(`${e.slice(0,o)}_${e.slice(o)}`);if(e.startsWith("@")||(s.add(`${e}-js`),s.add(`${e}js`),s.add(`${e}-node`)),e.startsWith("@")){const o=e.indexOf("/");if(o>1&&o<e.length-1){const a=e.slice(1,o),t=e.slice(o+1);a.length>=3&&s.add(a);for(const n of["","-",".","_"])s.add(`${a}${n}${t}`),s.add(`${t}${n}${a}`);for(const n of ko)s.add(`${a}-${n}`),s.add(`${t}-${a}-${n}`),s.add(`${n}-${a}-${t}`)}}return s.delete(e),s};let v,l,m;const f=()=>{if(!v){const e={};for(const s of[uo,jo])for(const[r,o]of Object.entries(s)){const a=e[r]??(e[r]=[]);for(const t of o)a.includes(t)||a.push(t)}v=e}return v},fo=()=>{if(!l){l=new Map;for(const[e,s]of Object.entries(f()))for(const r of s)l.set(r,e)}return l},yo=()=>{if(!m){m=new Map;for(const e of Object.keys(f()))for(const s of go(e))m.has(s)||m.set(s,e)}return m},xo=e=>e.startsWith("@")?e.split("/")[1]??e:e,wo=e=>{const s=xo(e),r=fo().get(s);if(r)return{input:e,legitimate:r,method:"blocklist"};const o=yo().get(s);if(o)return{input:e,legitimate:o,method:"heuristic"}},y=(e,s)=>{const r=s?new Set(s):void 0,o=[];for(const a of e){if(r?.has(a))continue;const t=wo(a);t&&o.push(t)}return o},x=(e,s)=>{c.warn(""),c.warn(j(`Possible typosquat${e.length===1?"":"s"} ${s}:`));for(const r of e){const o=r.method==="blocklist"?"known typosquat":"similar name";c.warn(` ${b("⚠")} ${j(r.input)} — did you mean ${b(r.legitimate)}? (${o})`)}c.warn("")},w=async e=>{if(!process.stdin.isTTY){c.warn("Aborting: potential typosquat detected in non-interactive mode. Use --no-typosquat-check to skip.");return}const s=M({input:process.stdin,output:process.stdout}),r=await new Promise(o=>{s.question(e,a=>{o(a.trim().toLowerCase())})});return s.close(),r},Oo=async(e,s)=>{if(g("typosquats"))return{ok:!0,packages:e};const r=y(e,s);if(r.length===0)return{ok:!0,packages:e};x(r,"detected");const o=await w(`Use suggested package${r.length===1?"":"s"} instead? [S]uggested / [y]es, keep original / [N]o, abort (default: N) `);if(o===void 0)return{ok:!1,packages:e};if(o==="s"||o==="suggested"){const a=new Map(r.map(t=>[t.input,t.legitimate]));return{ok:!0,packages:e.map(t=>a.get(t)??t)}}return o==="y"||o==="yes"?{ok:!0,packages:e}:{ok:!1,packages:e}},qo=/^(?:npm|pnpm|yarn):(.+?)(?:@.*)?$/,$o=e=>qo.exec(e)?.[1],_o=e=>{if(!A(e))return[];const s=D(e),r={...s.dependencies,...s.devDependencies,...s.optionalDependencies,...s.peerDependencies},o=new Set;for(const[a,t]of Object.entries(r)){o.add(a);const n=$o(t);n&&o.add(n)}return[...o]},Ro=async(e,s)=>{if(g("typosquats"))return!0;const r=T(e,"package.json"),o=_o(r);if(o.length===0)return!0;const a=y(o,s);if(a.length===0)return!0;x(a,"in package.json dependencies"),c.warn("Fix the package name in package.json before proceeding.");const t=await w("Continue anyway? [y/N] ");return t==="y"||t==="yes"};export{Oo as r,Ro as s};
@@ -1 +1 @@
1
- import{r,Y as a}from"../packem_chunks/catalog.js";import"./en-C26W78--.js";const f=(s,o)=>{const t=r.useRef(null),[u,n]=r.useState(s);return r.useLayoutEffect(()=>{if(!t.current)return;const{height:e}=a(t.current);e>0&&e!==u&&(n(e),o?.(e))}),{measuredHeight:u,ref:t}};export{f as u};
1
+ import{r,Y as a}from"../packem_chunks/catalog.js";import"./en-D3CfXlO7.js";const f=(s,o)=>{const t=r.useRef(null),[u,n]=r.useState(s);return r.useLayoutEffect(()=>{if(!t.current)return;const{height:e}=a(t.current);e>0&&e!==u&&(n(e),o?.(e))}),{measuredHeight:u,ref:t}};export{f as u};
@@ -0,0 +1 @@
1
+ import{createRequire as g}from"node:module";import{w as i,l as a,z as d,u as b}from"./index-uBVnF4ji.js";import"./public-api-WqUCiyIe.js";let h;const u=n=>(h??=g(import.meta.url))(n),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,m=n=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[s,e]=p.versions.node.split(".").map(Number);if(s>22||s===22&&e>=3||s===20&&e>=16)return p.getBuiltinModule(n)}return u(n)},{readdirSync:j}=m("node:fs"),v=[".husky/pre-commit",".vis/hooks/pre-commit",".git/hooks/pre-commit"],$=[".secretlintrc",".secretlintrc.json",".secretlintrc.js",".secretlintrc.mjs",".secretlintrc.cjs",".secretlintrc.yml",".secretlintrc.yaml"],w=[".syncpackrc",".syncpackrc.json",".syncpackrc.yaml",".syncpackrc.yml",".syncpackrc.cjs",".syncpackrc.js",".syncpackrc.mjs",".syncpackrc.ts","syncpack.config.cjs","syncpack.config.js","syncpack.config.mjs","syncpack.config.ts"],_=n=>{const s=i(n,"package.json");if(!a(s))return[];let e;try{e=JSON.parse(d(s))}catch{return[]}const o=[];if(e.scripts)for(const[t,c]of Object.entries(e.scripts))typeof c=="string"&&(/\bgitleaks\b/.test(c)&&o.push({detail:`Script "${t}" still invokes gitleaks: ${c}`,kind:"script",location:"package.json",tool:"gitleaks"}),/\bsecretlint\b/.test(c)&&o.push({detail:`Script "${t}" still invokes secretlint: ${c}`,kind:"script",location:"package.json",tool:"secretlint"}),/\bsyncpack\b/.test(c)&&o.push({detail:`Script "${t}" still invokes syncpack: ${c}`,kind:"script",location:"package.json",tool:"syncpack"}),/\bsherif\b/.test(c)&&o.push({detail:`Script "${t}" still invokes sherif: ${c}`,kind:"script",location:"package.json",tool:"sherif"}));if(e.devDependencies)for(const t of Object.keys(e.devDependencies))(t==="gitleaks"||t==="@gitleaks/cli")&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"gitleaks"}),(t==="secretlint"||t.startsWith("@secretlint/"))&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"secretlint"}),t==="syncpack"&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"syncpack"}),t==="sherif"&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"sherif"});return e.sherif&&o.push({detail:"`sherif` config block still present in package.json",kind:"config",location:"package.json",tool:"sherif"}),o},D=n=>{const s=[];for(const e of v){const o=i(n,e);if(!a(o))continue;const t=d(o);/\bgitleaks\b/.test(t)&&s.push({detail:"gitleaks invocation still present in hook",kind:"hook",location:e,tool:"gitleaks"}),/\bsecretlint\b/.test(t)&&s.push({detail:"secretlint invocation still present in hook",kind:"hook",location:e,tool:"secretlint"}),/\bsyncpack\b/.test(t)&&s.push({detail:"syncpack invocation still present in hook",kind:"hook",location:e,tool:"syncpack"}),/\bsherif\b/.test(t)&&s.push({detail:"sherif invocation still present in hook",kind:"hook",location:e,tool:"sherif"})}return s},S=n=>{const s=[];for(const e of $)a(i(n,e))&&s.push({detail:"secretlint config should be removed after migration",kind:"config",location:e,tool:"secretlint"});for(const e of w)a(i(n,e))&&s.push({detail:"syncpack config should be removed after migration",kind:"config",location:e,tool:"syncpack"});return s},O=[".github/workflows",".gitlab-ci.yml",".circleci/config.yml",".woodpecker.yml",".drone.yml"],q=n=>{const s=[],e=o=>{const t=i(n,o);if(!a(t))return;const c=d(t);/\bsyncpack\b/.test(c)&&s.push({detail:"syncpack invocation still present in CI",kind:"ci",location:o,tool:"syncpack"}),/\bsherif\b/.test(c)&&s.push({detail:"sherif invocation still present in CI",kind:"ci",location:o,tool:"sherif"})};for(const o of O){const t=i(n,o);if(a(t)){if(o===".github/workflows"){try{for(const c of j(t))(c.endsWith(".yml")||c.endsWith(".yaml"))&&e(`.github/workflows/${c}`)}catch{}continue}e(o)}}return s},M=n=>{const s=[],e=i(n,"pnpm-workspace.yaml");if(a(e)){let t;try{t=b(e)}catch{t=void 0}if(t&&typeof t=="object"){const c=t.catalog;c&&typeof c.syncpack=="string"&&s.push({detail:"`syncpack` still listed in pnpm-workspace.yaml#catalog",kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"});const l=t.catalogs;if(l&&typeof l=="object")for(const[k,r]of Object.entries(l))r&&typeof r.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in pnpm-workspace.yaml#catalogs.${k}`,kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"})}}const o=i(n,"package.json");if(a(o)){let t;try{t=JSON.parse(d(o))}catch{return s}const c=t.workspaces;if(c&&typeof c=="object"&&!Array.isArray(c)){const k=c.catalog;k&&typeof k.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#workspaces.catalog",kind:"catalog",location:"package.json",tool:"syncpack"});const r=c.catalogs;if(r&&typeof r=="object")for(const[y,f]of Object.entries(r))f&&typeof f.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in package.json#workspaces.catalogs.${y}`,kind:"catalog",location:"package.json",tool:"syncpack"})}const l=t.catalog;l&&typeof l.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#catalog",kind:"catalog",location:"package.json",tool:"syncpack"})}return s},N=n=>[..._(n),...D(n),...S(n),...q(n),...M(n)],W=(n,s)=>{const e=N(n);if(e.length===0)return s.info("✓ No unmigrated gitleaks/secretlint/sherif/syncpack references found."),[];s.warn(`Found ${String(e.length)} unmigrated reference(s):`);for(const o of e)s.warn(` [${o.kind}] ${o.location} — ${o.detail}`);return e};export{N as s,W as v};