eser 4.1.27 → 4.1.30

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 (293) hide show
  1. package/README.md +1 -1
  2. package/chunks/add-5SDE43IH.js +8 -0
  3. package/chunks/anthropic-2MXDKLNX.js +2 -0
  4. package/chunks/approve-XNUZYGYJ.js +2 -0
  5. package/chunks/{ask-TFJCKH5G.js → ask-L3N6REQI.js} +2 -1
  6. package/chunks/block-NWIP4USQ.js +2 -0
  7. package/chunks/{browser-XCMD2IZQ.js → browser-SG2DBNGS.js} +2 -1
  8. package/chunks/{build-2W7YVR7J.js → build-6DCIDFY7.js} +3 -2
  9. package/chunks/bun-3AACRJXG.js +2 -0
  10. package/chunks/{changelog-gen-QDUA5G5K.js → changelog-gen-7V37P7PE.js} +2 -1
  11. package/chunks/{chunk-WUJUQPHI.js → chunk-2BOCLC67.js} +2 -1
  12. package/chunks/chunk-2EVWKUN6.js +5 -0
  13. package/chunks/chunk-2TP6IMXY.js +2 -0
  14. package/chunks/{chunk-6U2VEZEM.js → chunk-2VEVVX6U.js} +2 -1
  15. package/chunks/{chunk-VVHXAOEH.js → chunk-32HV3K27.js} +2 -1
  16. package/chunks/{chunk-NUSNMQPL.js → chunk-3BEX5FYF.js} +2 -1
  17. package/chunks/{chunk-4HAIX3WN.js → chunk-3KCPUYLZ.js} +2 -1
  18. package/chunks/{chunk-EBYJBBYV.js → chunk-3MM5EGFB.js} +2 -1
  19. package/chunks/{chunk-XMCQMTAA.js → chunk-3QIPK7NI.js} +2 -1
  20. package/chunks/chunk-3SXTMY75.js +2 -0
  21. package/chunks/{chunk-34GCQZ3Z.js → chunk-3XJLLDR5.js} +1 -0
  22. package/chunks/chunk-3YUV3QIZ.js +61 -0
  23. package/chunks/{chunk-3K42AALS.js → chunk-455V3AE5.js} +2 -1
  24. package/chunks/{chunk-ZED5RIVL.js → chunk-46ZWBKIW.js} +2 -1
  25. package/chunks/{chunk-KAEAT6A4.js → chunk-4DOMGQOO.js} +2 -1
  26. package/chunks/chunk-4SYC4WJV.js +3 -0
  27. package/chunks/{chunk-BDTJR6UH.js → chunk-4WQGB7NO.js} +2 -1
  28. package/chunks/{chunk-U47ABJCC.js → chunk-536RBSFU.js} +2 -1
  29. package/chunks/{chunk-G34MS4XJ.js → chunk-5MWX3POX.js} +2 -1
  30. package/chunks/chunk-5PNGVDLV.js +2 -0
  31. package/chunks/chunk-6QC7ILI5.js +2 -0
  32. package/chunks/{chunk-GLSCZGXA.js → chunk-7ATUODBM.js} +2 -1
  33. package/chunks/{chunk-ETMOOGY2.js → chunk-7BFBOLLC.js} +2 -1
  34. package/chunks/{chunk-USCAYIWL.js → chunk-7DPLGQHN.js} +1 -0
  35. package/chunks/{chunk-W3REWI3H.js → chunk-7NUMDHE2.js} +2 -1
  36. package/chunks/chunk-7ZYDAZBD.js +1 -0
  37. package/chunks/{chunk-DQAEQEXD.js → chunk-A6RDYP6R.js} +2 -1
  38. package/chunks/{chunk-AKJB4CER.js → chunk-AGRTWPDI.js} +2 -1
  39. package/chunks/{chunk-ZE5T64HQ.js → chunk-AP72BKVG.js} +1 -0
  40. package/chunks/{chunk-GETSWLMF.js → chunk-B5IPHVXT.js} +3 -2
  41. package/chunks/{chunk-PO3SXFUE.js → chunk-BCPCQHDL.js} +2 -1
  42. package/chunks/{chunk-5MN3MWQN.js → chunk-BNQAZLIQ.js} +1 -0
  43. package/chunks/{chunk-C3PZVQ3Z.js → chunk-BP3IFAPO.js} +2 -1
  44. package/chunks/{chunk-T7K64JD5.js → chunk-CDPSH56U.js} +1 -0
  45. package/chunks/chunk-CEYKWASA.js +2 -0
  46. package/chunks/{chunk-YQU3TEIG.js → chunk-CKNA5LIK.js} +2 -1
  47. package/chunks/{chunk-GVSBZ6JV.js → chunk-CLL3YG4W.js} +2 -1
  48. package/chunks/{chunk-3OEM65F2.js → chunk-COKZ6MLN.js} +3 -2
  49. package/chunks/{chunk-4H4O3TGK.js → chunk-CUIMSX4V.js} +2 -1
  50. package/chunks/{chunk-AK3OJD4W.js → chunk-DAK2I7UC.js} +2 -1
  51. package/chunks/{chunk-ACQUINWH.js → chunk-DTO2YJWZ.js} +1 -0
  52. package/chunks/{chunk-TUTRX7VR.js → chunk-EBCQCAQ7.js} +2 -1
  53. package/chunks/{chunk-NGZZAQ7G.js → chunk-ER4ZWF4Y.js} +2 -1
  54. package/chunks/chunk-F5BPXG5L.js +13 -0
  55. package/chunks/{chunk-H4OFOQQ2.js → chunk-FORPNESQ.js} +2 -1
  56. package/chunks/{chunk-DXB73IDG.js → chunk-G6NAG2EK.js} +1 -0
  57. package/chunks/chunk-GBM3TZFD.js +40 -0
  58. package/chunks/{chunk-6FMPNAZ3.js → chunk-GE3LJ6QM.js} +2 -1
  59. package/chunks/{chunk-Y6DZEK4W.js → chunk-GTHXGAMQ.js} +1 -0
  60. package/chunks/{chunk-JOXKA7TJ.js → chunk-H4SPMUT6.js} +2 -1
  61. package/chunks/{chunk-CPRLAMEG.js → chunk-HVLKXRPA.js} +2 -1
  62. package/chunks/{chunk-U65FD6J3.js → chunk-HVOPUZOM.js} +2 -1
  63. package/chunks/{chunk-6HYGGBEQ.js → chunk-HYT26FYU.js} +2 -1
  64. package/chunks/{chunk-Q54LOR4S.js → chunk-I4C675WP.js} +2 -1
  65. package/chunks/chunk-IDMI5OBK.js +3 -0
  66. package/chunks/{chunk-LOFP256P.js → chunk-J2Z7NG2X.js} +1 -0
  67. package/chunks/{chunk-OLM5RTFK.js → chunk-J7YTWK67.js} +1 -0
  68. package/chunks/chunk-JOTAKQMZ.js +2 -0
  69. package/chunks/chunk-JYNHFD6B.js +140 -0
  70. package/chunks/chunk-K6H7JTIH.js +2 -0
  71. package/chunks/chunk-K7MYEXOS.js +2 -0
  72. package/chunks/{chunk-UNL4H5EY.js → chunk-KKBIUT5L.js} +2 -1
  73. package/chunks/{chunk-UKYKMDYU.js → chunk-KPWEJXPI.js} +2 -1
  74. package/chunks/{chunk-QIYWONJL.js → chunk-KQE6FMKW.js} +2 -1
  75. package/chunks/{chunk-OBIEQJDE.js → chunk-LCG4SK6K.js} +2 -1
  76. package/chunks/chunk-LNNNLUZT.js +2 -0
  77. package/chunks/{chunk-HPPFA3XU.js → chunk-MG65QJY6.js} +1 -0
  78. package/chunks/{chunk-YXSB6RET.js → chunk-MRCBHVSB.js} +2 -1
  79. package/chunks/{chunk-AAV7D6DF.js → chunk-MXGRYONZ.js} +2 -1
  80. package/chunks/{chunk-4VL2RZIN.js → chunk-N2VBT43E.js} +2 -1
  81. package/chunks/{chunk-A2GDVOQP.js → chunk-N7DXBY3O.js} +2 -1
  82. package/chunks/{chunk-2J2PXBOC.js → chunk-NBA6EFWU.js} +1 -0
  83. package/chunks/{chunk-YMY2URYM.js → chunk-NP723K5L.js} +2 -1
  84. package/chunks/{chunk-RBB5ITAS.js → chunk-NTHP6SND.js} +2 -1
  85. package/chunks/chunk-OX6ZNNUB.js +2 -0
  86. package/chunks/chunk-P2TABZ4A.js +3 -0
  87. package/chunks/chunk-P74JF7XR.js +4 -0
  88. package/chunks/{chunk-3APERFKY.js → chunk-P7WCO724.js} +1 -0
  89. package/chunks/{chunk-FKF2SWQM.js → chunk-PE2TDUXD.js} +1 -0
  90. package/chunks/chunk-PVPMHMKP.js +4 -0
  91. package/chunks/chunk-PWLF3WXM.js +1 -0
  92. package/chunks/{chunk-TXL6YOFL.js → chunk-Q2KSOC32.js} +2 -1
  93. package/chunks/{chunk-ANY26ROY.js → chunk-QOX7VSID.js} +2 -1
  94. package/chunks/{chunk-SBOTNOWZ.js → chunk-RGUETQSC.js} +2 -1
  95. package/chunks/{chunk-4S7QYPS6.js → chunk-S7S2I2K5.js} +1 -0
  96. package/chunks/{chunk-NLNSK3KE.js → chunk-SOBOSRJB.js} +2 -1
  97. package/chunks/chunk-SOSF762G.js +1 -0
  98. package/chunks/{chunk-DWYVBWBP.js → chunk-SQINSLNL.js} +2 -1
  99. package/chunks/{chunk-FDZP7B5Y.js → chunk-STI6DX7K.js} +1 -0
  100. package/chunks/{chunk-762C2IM6.js → chunk-TDQRRGDJ.js} +2 -1
  101. package/chunks/{chunk-IA7GIU76.js → chunk-TFPT4BDY.js} +2 -1
  102. package/chunks/chunk-U2MR2O3C.js +2 -0
  103. package/chunks/chunk-UESOCN2G.js +2 -0
  104. package/chunks/chunk-UJ6LH5FY.js +2 -0
  105. package/chunks/{chunk-NTPOK5H6.js → chunk-VC6ERZSI.js} +2 -1
  106. package/chunks/{chunk-5RK3346P.js → chunk-VG72SSDI.js} +2 -1
  107. package/chunks/chunk-W3RVRCUB.js +2 -0
  108. package/chunks/{chunk-ZH37DSUQ.js → chunk-WF6JNPZS.js} +1 -0
  109. package/chunks/chunk-WG6J7DFO.js +7 -0
  110. package/chunks/chunk-XU5SILYR.js +2 -0
  111. package/chunks/chunk-XVSIRN6G.js +4 -0
  112. package/chunks/chunk-Y4ARZGGL.js +2 -0
  113. package/chunks/{chunk-3EFU5R2M.js → chunk-Y53YTL4C.js} +2 -1
  114. package/chunks/{chunk-YWCEHTZB.js → chunk-YQVWAWMO.js} +2 -1
  115. package/chunks/{chunk-ZF2XYULB.js → chunk-YTF3BAQS.js} +1 -0
  116. package/chunks/{chunk-QIODVVTY.js → chunk-YVIGHK4H.js} +2 -1
  117. package/chunks/{chunk-CKD2KOHA.js → chunk-ZNGLZECE.js} +2 -1
  118. package/chunks/claude-code-VUBEU7RR.js +2 -0
  119. package/chunks/clone-H3UAEVVP.js +6 -0
  120. package/chunks/{commitmsg-ZGOEO5YG.js → commitmsg-UK2ABB7D.js} +3 -2
  121. package/chunks/concern-Y7LJ2MWE.js +2 -0
  122. package/chunks/{deno-MMJLKXAE.js → deno-7BSPHDRG.js} +2 -1
  123. package/chunks/{dev-JHAHGTZP.js → dev-XBH6C6DH.js} +3 -2
  124. package/chunks/done-DIN56LXZ.js +2 -0
  125. package/chunks/file-tools-shared-G36OYF5S.js +2 -0
  126. package/chunks/{fileFromPath-4UEDFJ4U.js → fileFromPath-MB3IRZVW.js} +2 -1
  127. package/chunks/gemini-F4KLO5VU.js +2 -0
  128. package/chunks/gh-RKKHKA3B.js +5 -0
  129. package/chunks/{gh-contributors-G3QZZAUO.js → gh-contributors-X7BW57DD.js} +2 -1
  130. package/chunks/{init-IPZHDMAH.js → init-32DVDSNZ.js} +4 -3
  131. package/chunks/init-PBLGKCHC.js +2 -0
  132. package/chunks/install-LM44N3DB.js +3 -0
  133. package/chunks/invoke-hook-4DBMDFA5.js +10 -0
  134. package/chunks/kiro-HQLXD6ZU.js +2 -0
  135. package/chunks/list-5TGTYMAU.js +2 -0
  136. package/chunks/{list-DSVIPH45.js → list-N4ZKDFW7.js} +2 -1
  137. package/chunks/{list-2RZIQZGH.js → list-PY3A762R.js} +2 -1
  138. package/chunks/load-config-FTQMJVEW.js +2 -0
  139. package/chunks/{main-FQFNY7SM.js → main-JTYNMHNL.js} +3 -2
  140. package/chunks/manifest-NF2EK757.js +2 -0
  141. package/chunks/mod-4ILLF5PK.js +2 -0
  142. package/chunks/mod-5WXRQGLS.js +28 -0
  143. package/chunks/mod-FEGQZ3ZY.js +2 -0
  144. package/chunks/{mod-TSU5UWXA.js → mod-HKYPZOU7.js} +2 -1
  145. package/chunks/mod-IILBPQMK.js +2 -0
  146. package/chunks/mod-JI2A2546.js +2 -0
  147. package/chunks/mod-JZNE2HH6.js +2 -0
  148. package/chunks/{mod-WYRORC72.js → mod-MLRQFSBE.js} +2 -1
  149. package/chunks/{mod-VZPKQ7DG.js → mod-NCF6OSXO.js} +2 -1
  150. package/chunks/{mod-TLLZ3NAM.js → mod-SA3J2VR5.js} +2 -1
  151. package/chunks/{mod-QJMMYECF.js → mod-Y4UHOKMZ.js} +3 -2
  152. package/chunks/mod-YX3JRMSI.js +2 -0
  153. package/chunks/{new-EAETGSIR.js → new-BOGCXTIY.js} +2 -1
  154. package/chunks/next-NQOJEFA5.js +4 -0
  155. package/chunks/{node-RWYXITVV.js → node-KCQF6QQA.js} +2 -1
  156. package/chunks/node-MFKYO4CY.js +2 -0
  157. package/chunks/ollama-36F5QAOO.js +2 -0
  158. package/chunks/openai-EU5TJZ5T.js +2 -0
  159. package/chunks/{openai-EKIA3VP3.js → openai-IKXRJYI3.js} +2 -1
  160. package/chunks/opencode-7J3JDC44.js +2 -0
  161. package/chunks/purge-SQ6NCKWN.js +5 -0
  162. package/chunks/recipe-applier-6QZYAZ57.js +2 -0
  163. package/chunks/registry-fetcher-76ISLGRR.js +2 -0
  164. package/chunks/{release-3BKLVESS.js → release-WKMSWXDS.js} +3 -2
  165. package/chunks/{release-notes-734LKEJB.js → release-notes-GOUHBQ2F.js} +2 -1
  166. package/chunks/{release-tag-YX727TXO.js → release-tag-5WNEA4HM.js} +2 -1
  167. package/chunks/reset-EYLAZVKO.js +2 -0
  168. package/chunks/rule-HV7DARH6.js +3 -0
  169. package/chunks/run-CPCSTIAL.js +4 -0
  170. package/chunks/{run-ES4BLQQX.js → run-RGEZUAPM.js} +3 -2
  171. package/chunks/{scripts-COIXD5AD.js → scripts-JK6W2MCO.js} +2 -1
  172. package/chunks/{sdk-5JGXLIO5.js → sdk-MXV452BR.js} +2 -1
  173. package/chunks/serve-DEYVWV2K.js +4 -0
  174. package/chunks/{server-RYWDAYED.js → server-KNWQV2HW.js} +2 -1
  175. package/chunks/spec-JCR5EYCU.js +2 -0
  176. package/chunks/status-O5HUGPGE.js +2 -0
  177. package/chunks/sync-ZOU46K25.js +2 -0
  178. package/chunks/system-BJCQKFCP.js +2 -0
  179. package/chunks/system-X3EJ3FN3.js +2 -0
  180. package/chunks/{unstable_chmod-WRDBWEC2.js → unstable_chmod-GDQI7NKH.js} +2 -1
  181. package/chunks/update-4C4WNXCE.js +6 -0
  182. package/chunks/validate-bom-KEC4IOKO.js +2 -0
  183. package/chunks/validate-case-conflict-ZZKZQQX4.js +2 -0
  184. package/chunks/validate-circular-deps-QCJYK5K5.js +2 -0
  185. package/chunks/validate-commit-msg-PZZ4T4QF.js +2 -0
  186. package/chunks/validate-docs-M55HAXPX.js +2 -0
  187. package/chunks/validate-eof-MX52AUUT.js +2 -0
  188. package/chunks/validate-export-names-UFXPIDFW.js +2 -0
  189. package/chunks/validate-filenames-LXIMPWRW.js +2 -0
  190. package/chunks/validate-json-TABLVKEH.js +2 -0
  191. package/chunks/validate-large-files-CMCMEGYA.js +2 -0
  192. package/chunks/validate-licenses-MDGIDYNC.js +2 -0
  193. package/chunks/validate-line-endings-K36HS73S.js +2 -0
  194. package/chunks/validate-merge-conflict-PMGZYM3B.js +2 -0
  195. package/chunks/validate-mod-exports-M3UYNBK7.js +2 -0
  196. package/chunks/validate-package-configs-V5LR7K5C.js +2 -0
  197. package/chunks/validate-secrets-IAMY5DB5.js +2 -0
  198. package/chunks/validate-shebangs-GUBDNU2N.js +2 -0
  199. package/chunks/validate-submodules-ZA2FAF3W.js +2 -0
  200. package/chunks/validate-symlinks-LSEEVFTR.js +2 -0
  201. package/chunks/validate-toml-JLQ3BY73.js +2 -0
  202. package/chunks/validate-trailing-whitespace-3UUUKE22.js +2 -0
  203. package/chunks/validate-yaml-2BG7G35N.js +2 -0
  204. package/chunks/versions-IVXYMSAZ.js +2 -0
  205. package/chunks/vertexai-EXTYPVHK.js +2 -0
  206. package/chunks/watch-YKYNWTZF.js +9 -0
  207. package/chunks/workerd-VVSAKLDZ.js +2 -0
  208. package/eser.js +2 -1
  209. package/package.json +1 -1
  210. package/chunks/add-ORJYWG26.js +0 -7
  211. package/chunks/anthropic-SL274RBQ.js +0 -1
  212. package/chunks/approve-5NJ4JWD3.js +0 -1
  213. package/chunks/block-ADHHHUFZ.js +0 -1
  214. package/chunks/bun-YFFBDKUJ.js +0 -1
  215. package/chunks/chunk-3I4JG3PJ.js +0 -1
  216. package/chunks/chunk-5AK4OGCO.js +0 -1
  217. package/chunks/chunk-AYSPDG4K.js +0 -1
  218. package/chunks/chunk-BCHXUKWW.js +0 -3
  219. package/chunks/chunk-BK2BDHKB.js +0 -1
  220. package/chunks/chunk-DDLQMSA7.js +0 -0
  221. package/chunks/chunk-GXPLME3K.js +0 -14
  222. package/chunks/chunk-HTBLWLKV.js +0 -1
  223. package/chunks/chunk-LXVBR775.js +0 -1
  224. package/chunks/chunk-MYSTBVWT.js +0 -2
  225. package/chunks/chunk-NT2MQK7O.js +0 -6
  226. package/chunks/chunk-PLJNPQFC.js +0 -1
  227. package/chunks/chunk-Q7QMINSQ.js +0 -0
  228. package/chunks/chunk-QZY4BKI7.js +0 -1
  229. package/chunks/chunk-RYLOB2JU.js +0 -1
  230. package/chunks/chunk-SG4G3OOO.js +0 -1
  231. package/chunks/chunk-TTYO2XJO.js +0 -32
  232. package/chunks/chunk-V2N5L24J.js +0 -2
  233. package/chunks/chunk-Z4WPWVC7.js +0 -10
  234. package/chunks/chunk-ZO7RUTSQ.js +0 -60
  235. package/chunks/chunk-ZOZYBQX2.js +0 -0
  236. package/chunks/claude-code-K37KYX7W.js +0 -1
  237. package/chunks/clone-PAQMCIA3.js +0 -5
  238. package/chunks/file-tools-shared-77P7MI54.js +0 -1
  239. package/chunks/gemini-ARTUPDPZ.js +0 -1
  240. package/chunks/gh-SXEDNWHD.js +0 -4
  241. package/chunks/init-3GXDO32O.js +0 -1
  242. package/chunks/install-VY2L6NDB.js +0 -2
  243. package/chunks/kiro-XQDHURLU.js +0 -1
  244. package/chunks/list-V2HZCPDN.js +0 -1
  245. package/chunks/load-config-KG4RTCR2.js +0 -1
  246. package/chunks/manifest-5CYL3HR3.js +0 -1
  247. package/chunks/mod-5ACKR2OE.js +0 -1
  248. package/chunks/mod-6P2JPEHC.js +0 -1
  249. package/chunks/mod-CUIGNRIK.js +0 -1
  250. package/chunks/mod-NSY6WUYH.js +0 -27
  251. package/chunks/mod-U6LEXPVR.js +0 -1
  252. package/chunks/mod-WX4P6LGJ.js +0 -1
  253. package/chunks/next-F2BIIAZC.js +0 -3
  254. package/chunks/node-SMAAGOR3.js +0 -1
  255. package/chunks/ollama-6JZ2IKR7.js +0 -1
  256. package/chunks/openai-XMIVMDDL.js +0 -1
  257. package/chunks/opencode-CHIAJALZ.js +0 -1
  258. package/chunks/recipe-applier-R4YJPGQR.js +0 -1
  259. package/chunks/registry-fetcher-J6X32PGP.js +0 -1
  260. package/chunks/reset-PAPDZIDC.js +0 -1
  261. package/chunks/rule-4GNOR3GE.js +0 -2
  262. package/chunks/serve-B4V2BCWM.js +0 -3
  263. package/chunks/spec-SNAUMQSR.js +0 -1
  264. package/chunks/status-CY5IKIYS.js +0 -1
  265. package/chunks/sync-OAPV43JS.js +0 -1
  266. package/chunks/system-5A6DQLM5.js +0 -1
  267. package/chunks/system-JWO27FMA.js +0 -1
  268. package/chunks/update-O75M4SDJ.js +0 -5
  269. package/chunks/validate-bom-6G7EYFOP.js +0 -1
  270. package/chunks/validate-case-conflict-OWHWRTSQ.js +0 -1
  271. package/chunks/validate-circular-deps-TCYSZKME.js +0 -1
  272. package/chunks/validate-commit-msg-UPJJ7E4M.js +0 -1
  273. package/chunks/validate-docs-ZTCE5XLF.js +0 -1
  274. package/chunks/validate-eof-6RMNMAWI.js +0 -1
  275. package/chunks/validate-export-names-5ZVQ4PGM.js +0 -1
  276. package/chunks/validate-filenames-5YB27RN4.js +0 -1
  277. package/chunks/validate-json-6CLTN4AN.js +0 -1
  278. package/chunks/validate-large-files-KEMHYWKH.js +0 -1
  279. package/chunks/validate-licenses-WIVY6G5Z.js +0 -1
  280. package/chunks/validate-line-endings-KNFYAVBG.js +0 -1
  281. package/chunks/validate-merge-conflict-PYKGIFY5.js +0 -1
  282. package/chunks/validate-mod-exports-X5UZPD7J.js +0 -1
  283. package/chunks/validate-package-configs-SYKEIB53.js +0 -1
  284. package/chunks/validate-secrets-BWDFWN64.js +0 -1
  285. package/chunks/validate-shebangs-MP6VTLWO.js +0 -1
  286. package/chunks/validate-submodules-RQXISWKG.js +0 -1
  287. package/chunks/validate-symlinks-IPRYMDZD.js +0 -1
  288. package/chunks/validate-toml-KJZK7QVM.js +0 -1
  289. package/chunks/validate-trailing-whitespace-RO42VWQG.js +0 -1
  290. package/chunks/validate-yaml-H7G726ZM.js +0 -1
  291. package/chunks/versions-KW5UTMNV.js +0 -1
  292. package/chunks/vertexai-TPGIAJNA.js +0 -1
  293. package/chunks/workerd-LKKH32SO.js +0 -1
@@ -1,5 +1,6 @@
1
- import{a as K,b as j,c as M,d as F,f as N}from"./chunk-3OEM65F2.js";import{a as Q}from"./chunk-CKD2KOHA.js";import"./chunk-5RK3346P.js";import"./chunk-UKYKMDYU.js";import"./chunk-4H4O3TGK.js";import"./chunk-V2N5L24J.js";import"./chunk-Y6DZEK4W.js";import"./chunk-34GCQZ3Z.js";import"./chunk-3APERFKY.js";import{a as X}from"./chunk-ZF2XYULB.js";import"./chunk-GXPLME3K.js";import{b as Y}from"./chunk-2J2PXBOC.js";import{d as G,e as m,g as V}from"./chunk-OBIEQJDE.js";import{a as v}from"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-BCHXUKWW.js";import"./chunk-A2GDVOQP.js";import"./chunk-GLSCZGXA.js";import"./chunk-ZE5T64HQ.js";import{g as W,t as s}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var B=m.getLogger(["laroux-bundler","prebuilt-bundler"]),w=class{config;cachedManifest=null;constructor(e){this.config=e}async getBundle(){B.debug("\u{1F4E6} Loading prebuilt bundle from disk...");let e=s.path.resolve(this.config.distDir,"client","manifest.json"),t=await s.fs.readTextFile(e),r=JSON.parse(t),o=s.path.resolve(this.config.distDir,"client","module-map.json"),i={};try{let p=await s.fs.readTextFile(o);i=JSON.parse(p),B.debug(`\u2705 Loaded module map with ${Object.keys(i).length} entries`)}catch{B.warn("\u26A0\uFE0F Module map not found, SSR may fail for client components")}this.cachedManifest=r;let l=r.entrypoint?`/${r.entrypoint}`:"/client.js";return B.debug(`\u2705 Loaded manifest with entrypoint: ${l}`),{clientCode:null,moduleMap:i,chunkManifest:r,entrypoint:l}}async reload(){this.cachedManifest=null,await this.getBundle()}};var A=m.getLogger(["laroux-bundler","runtime-bundler"]),_=class{clientComponents=new Map;moduleMap=null;bundleCode=null;chunkManifest=null;lastScan=0;scanInterval=1e3;config;async getOrCreateBundle(){let e=Date.now();return(e-this.lastScan>this.scanInterval||!this.bundleCode)&&(await this.rebuild(),this.lastScan=e),{clientCode:this.bundleCode,moduleMap:this.moduleMap,clientComponents:this.clientComponents,chunkManifest:this.chunkManifest}}constructor(e){this.config=e}async rebuild(){let{plugin:e}=this.config,t=e.analyzeClientComponents?await e.analyzeClientComponents(this.config.srcDir,this.config.projectRoot):[];this.clientComponents.clear();for(let o of t)this.clientComponents.set(o.filePath,o);this.moduleMap=e.createModuleMap?await e.createModuleMap(t):{};let r=await this.bundleClientCode(t);this.bundleCode=r.code,this.chunkManifest=r.manifest}async bundleClientCode(e){let{plugin:t}=this.config,r=s.process.cwd(),o=await s.fs.makeTempDir({prefix:"rsc-runtime-",dir:r});try{if(!t.createClientEntry)throw new Error("Framework plugin does not provide createClientEntry");let i=await t.createClientEntry(e,r,o),l=K("deno-bundler",{entryName:"client"}),p={client:i};for(let g of e)p[g.relativePath]=g.filePath;let u={entrypoints:p,outputDir:o,format:"esm",platform:"browser",codeSplitting:j.codeSplitting,minify:j.minify,sourcemap:!1},a=await l.bundle(u);if(!a.success){let g=a.errors?.map(c=>c.message).join(", ")??"Unknown error";throw new Error(`Bundle failed: ${g}`)}let d=a.outputs.get("client.js");if(!d)throw new Error("Bundle output 'client.js' not found in bundle result");let f=new TextDecoder().decode(d.code),h={version:"1.0",buildId:"runtime",timestamp:Date.now(),logLevel:"debug",entrypoint:"__runtime_bundle.js",hmrEnabled:!0,chunks:{},files:{}};for(let g of e){let c=g.relativePath;h.chunks[c]={main:"__runtime_bundle",deps:[],size:0}}return{code:f,manifest:h}}catch(i){let l=i instanceof Error?i.message:String(i),p=i instanceof Error?i.stack:null;A.error("\u274C Runtime bundling failed:"),A.error(` Error: ${l}`),p!==null&&A.error(` Stack trace:
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as Q}from"./chunk-ZNGLZECE.js";import{a as K,b as j,c as M,d as F,f as N}from"./chunk-COKZ6MLN.js";import"./chunk-VG72SSDI.js";import"./chunk-KPWEJXPI.js";import"./chunk-CUIMSX4V.js";import"./chunk-4SYC4WJV.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import{a as X}from"./chunk-YTF3BAQS.js";import{b as Y}from"./chunk-NBA6EFWU.js";import{d as G,e as m,g as V}from"./chunk-LCG4SK6K.js";import{a as v}from"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{g as W,t as s}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var B=m.getLogger(["laroux-bundler","prebuilt-bundler"]),w=class{config;cachedManifest=null;constructor(e){this.config=e}async getBundle(){B.debug("\u{1F4E6} Loading prebuilt bundle from disk...");let e=s.path.resolve(this.config.distDir,"client","manifest.json"),t=await s.fs.readTextFile(e),r=JSON.parse(t),o=s.path.resolve(this.config.distDir,"client","module-map.json"),i={};try{let p=await s.fs.readTextFile(o);i=JSON.parse(p),B.debug(`\u2705 Loaded module map with ${Object.keys(i).length} entries`)}catch{B.warn("\u26A0\uFE0F Module map not found, SSR may fail for client components")}this.cachedManifest=r;let l=r.entrypoint?`/${r.entrypoint}`:"/client.js";return B.debug(`\u2705 Loaded manifest with entrypoint: ${l}`),{clientCode:null,moduleMap:i,chunkManifest:r,entrypoint:l}}async reload(){this.cachedManifest=null,await this.getBundle()}};var A=m.getLogger(["laroux-bundler","runtime-bundler"]),_=class{clientComponents=new Map;moduleMap=null;bundleCode=null;chunkManifest=null;lastScan=0;scanInterval=1e3;config;async getOrCreateBundle(){let e=Date.now();return(e-this.lastScan>this.scanInterval||!this.bundleCode)&&(await this.rebuild(),this.lastScan=e),{clientCode:this.bundleCode,moduleMap:this.moduleMap,clientComponents:this.clientComponents,chunkManifest:this.chunkManifest}}constructor(e){this.config=e}async rebuild(){let{plugin:e}=this.config,t=e.analyzeClientComponents?await e.analyzeClientComponents(this.config.srcDir,this.config.projectRoot):[];this.clientComponents.clear();for(let o of t)this.clientComponents.set(o.filePath,o);this.moduleMap=e.createModuleMap?await e.createModuleMap(t):{};let r=await this.bundleClientCode(t);this.bundleCode=r.code,this.chunkManifest=r.manifest}async bundleClientCode(e){let{plugin:t}=this.config,r=s.process.cwd(),o=await s.fs.makeTempDir({prefix:"rsc-runtime-",dir:r});try{if(!t.createClientEntry)throw new Error("Framework plugin does not provide createClientEntry");let i=await t.createClientEntry(e,r,o),l=K("deno-bundler",{entryName:"client"}),p={client:i};for(let g of e)p[g.relativePath]=g.filePath;let u={entrypoints:p,outputDir:o,format:"esm",platform:"browser",codeSplitting:j.codeSplitting,minify:j.minify,sourcemap:!1},a=await l.bundle(u);if(!a.success){let g=a.errors?.map(c=>c.message).join(", ")??"Unknown error";throw new Error(`Bundle failed: ${g}`)}let d=a.outputs.get("client.js");if(!d)throw new Error("Bundle output 'client.js' not found in bundle result");let f=new TextDecoder().decode(d.code),h={version:"1.0",buildId:"runtime",timestamp:Date.now(),logLevel:"debug",entrypoint:"__runtime_bundle.js",hmrEnabled:!0,chunks:{},files:{}};for(let g of e){let c=g.relativePath;h.chunks[c]={main:"__runtime_bundle",deps:[],size:0}}return{code:f,manifest:h}}catch(i){let l=i instanceof Error?i.message:String(i),p=i instanceof Error?i.stack:null;A.error("\u274C Runtime bundling failed:"),A.error(` Error: ${l}`),p!==null&&A.error(` Stack trace:
2
3
  ${p}`);let u=f=>f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),a=`
3
4
  console.error("Runtime bundling failed:", ${JSON.stringify(l)});
4
5
  document.getElementById("root").innerHTML = '<div class="error"><h2>Bundle Error</h2><pre>${u(l)}</pre></div>';
5
- `,d={version:"1.0",buildId:"runtime-error",timestamp:Date.now(),logLevel:"error",entrypoint:"__runtime_bundle.js",hmrEnabled:!1,chunks:{},files:{}};return{code:a,manifest:d}}finally{try{await s.fs.remove(o,{recursive:!0})}catch(i){A.debug("Temp directory cleanup failed",{error:i})}}}clear(){this.clientComponents.clear(),this.moduleMap=null,this.bundleCode=null,this.lastScan=0}};var D=class{cache;constructor(e){this.cache=new _(e)}async getBundle(){let e=await this.cache.getOrCreateBundle();return{clientCode:e.clientCode,moduleMap:e.moduleMap,chunkManifest:e.chunkManifest,entrypoint:"/__runtime_bundle.js"}}async getRuntimeBundle(){return await this.cache.getOrCreateBundle()}async rebuild(){await this.cache.rebuild()}clear(){this.cache.clear()}};var Z={name:"noop",renderPage:()=>Promise.resolve({html:""}),renderRSC:()=>Promise.resolve(new Response("")),generateBootstrapScript:()=>""};var ee={name:"noop",createShell:()=>"<!DOCTYPE html><html><head></head><body></body></html>",createStreamingStart:()=>"<!DOCTYPE html><html><head></head><body>",createStreamingEnd:()=>"</body></html>"};var b=m.getLogger(["laroux-server","hmr"]),$=class{clients=new Set;handleConnection(e){this.clients.add(e),b.debug(`HMR client connected (${this.clients.size} total)`),this.sendToClient(e,{type:"connected"}),e.addEventListener("close",()=>{this.clients.delete(e),b.debug(`HMR client disconnected (${this.clients.size} remaining)`)}),e.addEventListener("error",t=>{b.error("HMR WebSocket error:",{event:t}),this.clients.delete(e)})}notifyUpdate(e=Date.now(),t){let r={type:"update",timestamp:e,changedModules:t};b.debug(`Notifying ${this.clients.size} clients of update${t?` (${t.length} modules changed)`:""}`);for(let o of this.clients)this.sendToClient(o,r)}notifyError(e){let t={type:"error",message:e};b.warn(`Notifying clients of error: ${e}`);for(let r of this.clients)this.sendToClient(r,t)}sendToClient(e,t){if(e.readyState===WebSocket.OPEN)try{e.send(JSON.stringify(t))}catch(r){b.error("Failed to send HMR message:",{error:r})}}getClientCount(){return this.clients.size}close(){for(let e of this.clients)e.close();this.clients.clear()}};var L=m.getLogger(["laroux-server","api-handler"]);function ie(n){let e=new Set;return{pattern:n.replace(/\[\.\.\.(\w+)\]/g,(r,o)=>(e.add(o),`:${o}*`)).replace(/\[(\w+)\]/g,(r,o)=>`:${o}`),catchAllParams:e}}function se(n,e){let{pattern:t,catchAllParams:r}=ie(e),i=new URLPattern({pathname:t}).exec({pathname:n});if(!i)return null;let l={},p=i.pathname.groups;for(let[u,a]of Object.entries(p))r.has(u)?l[u]=a?a.split("/").filter(Boolean):[]:l[u]=a??"";return l}var H=class{routes=[];moduleCache=new Map;registryDir="";async loadRoutes(e){try{let t=`file://${e}/server/api-routes.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.routes=r.apiRoutes||[],L.debug(`Loaded ${this.routes.length} API route(s)`)}catch{this.routes=[],L.debug("No API routes registry found")}}async handleRequest(e,t){let r=new URL(e.url),o=e.method;for(let i of this.routes){let l=se(t,i.path);if(l!==null){L.debug(`API route matched: ${o} ${t} -> ${i.path}`);try{let p=s.path.resolve(this.registryDir,i.modulePath),u=this.moduleCache.get(p);u||(u=await import(`file://${p}`),this.moduleCache.set(p,u));let a=u[o];return a?await a({request:e,params:l,searchParams:r.searchParams}):(L.debug(`Method ${o} not allowed for ${i.path}`),new Response("Method Not Allowed",{status:405,headers:{Allow:this.getAllowedMethods(u).join(", ")}}))}catch(p){return L.error(`API route error: ${i.path}`,{error:p}),new Response(JSON.stringify({error:"Internal Server Error"}),{status:500,headers:{"Content-Type":"application/json"}})}}}return null}getAllowedMethods(e){let t=[];return e.GET&&t.push("GET"),e.POST&&t.push("POST"),e.PUT&&t.push("PUT"),e.DELETE&&t.push("DELETE"),e.PATCH&&t.push("PATCH"),e.HEAD&&t.push("HEAD"),e.OPTIONS&&t.push("OPTIONS"),t}clearCache(){this.moduleCache.clear()}};var P=m.getLogger(["laroux-server","proxy-handler"]),T=class{proxies=[];moduleCache=new Map;registryDir="";async loadProxies(e){try{let t=`file://${e}/server/proxy-registry.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.proxies=r.proxyRegistry||[],P.debug(`Loaded ${this.proxies.length} proxy definition(s)`)}catch{this.proxies=[],P.debug("No proxy registry found")}}async runProxies(e,t){let r=t;for(let o of this.proxies)if(this.matchesPrefix(r,o.pathPrefix)){P.debug(`Running proxy: ${o.pathPrefix} for ${r}`);try{let i=s.path.resolve(this.registryDir,o.modulePath),l=this.moduleCache.get(i);l||(l=await import(`file://${i}`),this.moduleCache.set(i,l));let p=l.default;if(typeof p!="function"){P.warn(`Proxy ${o.modulePath} does not export a default function`);continue}let u=await p({request:e,pathname:r,params:{}});if(u.type==="response")return P.debug(`Proxy ${o.pathPrefix} returned response`),{result:u,finalPathname:r};if(u.type==="redirect")return P.debug(`Proxy ${o.pathPrefix} redirecting to ${u.url}`),{result:u,finalPathname:r};u.type==="rewrite"&&(P.debug(`Proxy ${o.pathPrefix} rewriting to ${u.pathname}`),r=u.pathname)}catch(i){return P.error(`Proxy error: ${o.pathPrefix}`,{error:i}),{result:{type:"response",response:new Response(JSON.stringify({error:"Proxy Error"}),{status:500,headers:{"Content-Type":"application/json"}})},finalPathname:r}}}return{result:{type:"next"},finalPathname:r}}matchesPrefix(e,t){return t==="/"?!0:e===t||e.startsWith(t+"/")}clearCache(){this.moduleCache.clear()}};function te(n,e){let t=X(n,e.path);if(t===null)return null;let r={};for(let[o,i]of Object.entries(t))Array.isArray(i)?r[o]=[...i]:typeof i=="string"&&(r[o]=i);return r}function U(n,e){for(let t of e){let r=te(n,t);if(r!==null)return{route:t,params:r}}return null}var le=["trace","debug","info","warn","error","fatal"];var oe="manifest.json",ue=n=>({trace:v.Debug,debug:v.Debug,info:v.Info,warn:v.Warning,error:v.Error,fatal:v.Critical})[n],R,E;async function pe(n){let e=ue(n),{output:t,renderers:r,sinks:o}=await import("./mod-CUIGNRIK.js"),i=t({renderer:r.ansi(),sink:o.stdout()});await G.configure({sinks:{console:V.getOutputSink(i)},loggers:[{category:["laroux-server"],lowestLevel:e,sinks:["console"]},{category:["laroux-bundler"],lowestLevel:e,sinks:["console"]},{category:["laroux"],lowestLevel:e,sinks:["console"]}]}),R=m.getLogger(["laroux-server","server"]),E=m.getLogger(["laroux-server","bundler"])}var O=null;function ot(){O=null}async function ce(n){if(O!==null)return O;let t=`file://${s.path.join(n.distDir,"server","_generated-routes.ts")}?t=${Date.now()}`,{generatedRoutes:r}=await import(t);return O=r,r}async function re(n,e){let t=s.path.resolve(n.distDir,"server","src","app",`${e}.js`);if(await s.fs.exists(t))return t;for(let r of Y){let o=s.path.resolve(n.distDir,"server","src","app",`${e}.${r}`);if(await s.fs.exists(o))return o}return t}async function ne(n,e){let t=Date.now(),o=`file://${await re(e,"layout")}?t=${t}`,{Layout:i}=await import(o),l=await ce(e),p=U(n,l);if(p===null){let a=`file://${await re(e,"not-found")}?t=${t}`,{NotFound:d}=await import(a);return{Layout:i,Page:d,params:{}}}return{Layout:i,Page:p.route.component,params:p.params}}async function de(n){try{let e=s.path.resolve(n.distDir,"client",oe),t=await s.fs.readTextFile(e);return JSON.parse(t).buildId}catch{return"unknown"}}async function me(n){try{let e=s.path.resolve(n.distDir,"client",oe),t=await s.fs.stat(e),r=await s.fs.stat(n.srcDir);return t.mtime===null||r.mtime===null?!1:t.mtime>r.mtime}catch{return!1}}function I(n){return{projectRoot:n.projectRoot,srcDir:n.srcDir,distDir:n.distDir,logLevel:n.logLevel,fonts:n.fonts,images:n.images,cssModuleTypes:n.cssModuleTypes,noCssModuleAutoReference:n.noCssModuleAutoReference,browserShims:n.browserShims,serverExternals:n.build.serverExternals}}async function ge(n,e={}){let{config:t,bundler:r,hmrManager:o}=n,{frameworkPlugin:i,cssPlugin:l}=e;try{let c=s.path.resolve(t.distDir,"server","actions-manifest.json");if(await s.fs.exists(c)){let x=await s.fs.readTextFile(c),z=JSON.parse(x),q=Date.now(),C=0;for(let J of z.actions)try{let k=s.path.resolve(t.distDir,"server",J);await s.fs.exists(k)&&(await import(`file://${k}?t=${q}`),C++)}catch(k){R.warn(`Failed to load action ${J}:`,{error:k})}C>0&&R.debug(`Server actions loaded: ${C} file(s)`)}else R.debug("No actions manifest found (optional)")}catch(c){R.warn("Failed to load server actions:",{error:c})}await ne("/",t);let p=await de(t);E.debug(`Build ID: ${p}`);let a={...n,getApp:c=>ne(c,t),buildId:p},d=await r.getBundle(),f={framework:i,css:l,bundlerBackend:"deno-bundler"};if(d.clientCode!==null&&o!==null){if(i!==void 0){let c=M(I(t),f);N(c,async y=>{if(r instanceof D)try{await r.rebuild()}catch(x){E.error("Compilation failed:",{error:x})}E.info(`\u2713 Compiled in ${y.duration.toFixed(0)}ms`),o?.notifyUpdate(Date.now(),y.changedFiles)})}}else if(t.mode.isWatch&&i!==void 0){let c=M(I(t),f);N(c,y=>{E.info(`\u2713 Compiled in ${y.duration.toFixed(0)}ms`)})}let h="";d.clientCode!==null&&o!==null?h=" HMR":d.clientCode!==null&&(h=" Watch"),R.info(`RSC Server${h}`),R.info(` Local: http://localhost:${t.server.port}`);let{startHTTPServer:g}=await import("./server-RYWDAYED.js");return g(a),a}async function it(n){let e=n.projectRoot??s.process.cwd(),t=n.logLevel??"info",r=n.mode==="dev",{renderer:o,htmlShell:i,frameworkPlugin:l,cssPlugin:p}=n;await pe(t);let u=await Q(e),a={...u,srcDir:s.path.resolve(e,u.srcDir),distDir:s.path.resolve(e,u.distDir),publicDir:s.path.resolve(e,u.publicDir),logLevel:t,mode:{isDev:r,isBuild:!1,isServe:!r,isWatch:r}};n.port!==void 0&&(a.server.port=n.port),n.hmr!==void 0?a.server.hmr=n.hmr:r&&(a.server.hmr=!0),n.open!==void 0&&(a.server.open=n.open),r&&(a.build.minify=!1);let d=await me(a),f=r||!d,h={framework:l,css:p};if(f&&r&&l!==void 0){let C=M(I(a),{...h,bundlerBackend:"deno-bundler"});await F(C)}else if(f&&l!==void 0){let C=M(I(a),{...h,bundlerBackend:"rolldown"});await F(C)}let g,c=null;r&&a.server.hmr?(c=new $,g=new w({distDir:a.distDir})):g=new w({distDir:a.distDir});let y=new H;await y.loadRoutes(a.distDir);let x=new T;await x.loadProxies(a.distDir),await ge({config:a,bundler:g,hmrManager:c,apiHandler:y,middlewareDispatcher:x,renderer:o??Z,htmlShell:i??ee},{frameworkPlugin:l,cssPlugin:p}),n.open&&fe(`http://localhost:${a.server.port}`)}function fe(n){let e={darwin:["open"],linux:["xdg-open"],windows:["cmd","/c","start"]},t=W(),r=e[t];r&&r[0]&&s.exec.spawnChild(r[0],[...r.slice(1),n],{stdout:"null",stderr:"null"})}export{le as VALID_LOG_LEVELS,ot as clearRoutesCache,it as startServer};
6
+ `,d={version:"1.0",buildId:"runtime-error",timestamp:Date.now(),logLevel:"error",entrypoint:"__runtime_bundle.js",hmrEnabled:!1,chunks:{},files:{}};return{code:a,manifest:d}}finally{try{await s.fs.remove(o,{recursive:!0})}catch(i){A.debug("Temp directory cleanup failed",{error:i})}}}clear(){this.clientComponents.clear(),this.moduleMap=null,this.bundleCode=null,this.lastScan=0}};var D=class{cache;constructor(e){this.cache=new _(e)}async getBundle(){let e=await this.cache.getOrCreateBundle();return{clientCode:e.clientCode,moduleMap:e.moduleMap,chunkManifest:e.chunkManifest,entrypoint:"/__runtime_bundle.js"}}async getRuntimeBundle(){return await this.cache.getOrCreateBundle()}async rebuild(){await this.cache.rebuild()}clear(){this.cache.clear()}};var Z={name:"noop",renderPage:()=>Promise.resolve({html:""}),renderRSC:()=>Promise.resolve(new Response("")),generateBootstrapScript:()=>""};var ee={name:"noop",createShell:()=>"<!DOCTYPE html><html><head></head><body></body></html>",createStreamingStart:()=>"<!DOCTYPE html><html><head></head><body>",createStreamingEnd:()=>"</body></html>"};var b=m.getLogger(["laroux-server","hmr"]),$=class{clients=new Set;handleConnection(e){this.clients.add(e),b.debug(`HMR client connected (${this.clients.size} total)`),this.sendToClient(e,{type:"connected"}),e.addEventListener("close",()=>{this.clients.delete(e),b.debug(`HMR client disconnected (${this.clients.size} remaining)`)}),e.addEventListener("error",t=>{b.error("HMR WebSocket error:",{event:t}),this.clients.delete(e)})}notifyUpdate(e=Date.now(),t){let r={type:"update",timestamp:e,changedModules:t};b.debug(`Notifying ${this.clients.size} clients of update${t?` (${t.length} modules changed)`:""}`);for(let o of this.clients)this.sendToClient(o,r)}notifyError(e){let t={type:"error",message:e};b.warn(`Notifying clients of error: ${e}`);for(let r of this.clients)this.sendToClient(r,t)}sendToClient(e,t){if(e.readyState===WebSocket.OPEN)try{e.send(JSON.stringify(t))}catch(r){b.error("Failed to send HMR message:",{error:r})}}getClientCount(){return this.clients.size}close(){for(let e of this.clients)e.close();this.clients.clear()}};var L=m.getLogger(["laroux-server","api-handler"]);function ie(n){let e=new Set;return{pattern:n.replace(/\[\.\.\.(\w+)\]/g,(r,o)=>(e.add(o),`:${o}*`)).replace(/\[(\w+)\]/g,(r,o)=>`:${o}`),catchAllParams:e}}function se(n,e){let{pattern:t,catchAllParams:r}=ie(e),i=new URLPattern({pathname:t}).exec({pathname:n});if(!i)return null;let l={},p=i.pathname.groups;for(let[u,a]of Object.entries(p))r.has(u)?l[u]=a?a.split("/").filter(Boolean):[]:l[u]=a??"";return l}var H=class{routes=[];moduleCache=new Map;registryDir="";async loadRoutes(e){try{let t=`file://${e}/server/api-routes.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.routes=r.apiRoutes||[],L.debug(`Loaded ${this.routes.length} API route(s)`)}catch{this.routes=[],L.debug("No API routes registry found")}}async handleRequest(e,t){let r=new URL(e.url),o=e.method;for(let i of this.routes){let l=se(t,i.path);if(l!==null){L.debug(`API route matched: ${o} ${t} -> ${i.path}`);try{let p=s.path.resolve(this.registryDir,i.modulePath),u=this.moduleCache.get(p);u||(u=await import(`file://${p}`),this.moduleCache.set(p,u));let a=u[o];return a?await a({request:e,params:l,searchParams:r.searchParams}):(L.debug(`Method ${o} not allowed for ${i.path}`),new Response("Method Not Allowed",{status:405,headers:{Allow:this.getAllowedMethods(u).join(", ")}}))}catch(p){return L.error(`API route error: ${i.path}`,{error:p}),new Response(JSON.stringify({error:"Internal Server Error"}),{status:500,headers:{"Content-Type":"application/json"}})}}}return null}getAllowedMethods(e){let t=[];return e.GET&&t.push("GET"),e.POST&&t.push("POST"),e.PUT&&t.push("PUT"),e.DELETE&&t.push("DELETE"),e.PATCH&&t.push("PATCH"),e.HEAD&&t.push("HEAD"),e.OPTIONS&&t.push("OPTIONS"),t}clearCache(){this.moduleCache.clear()}};var P=m.getLogger(["laroux-server","proxy-handler"]),T=class{proxies=[];moduleCache=new Map;registryDir="";async loadProxies(e){try{let t=`file://${e}/server/proxy-registry.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.proxies=r.proxyRegistry||[],P.debug(`Loaded ${this.proxies.length} proxy definition(s)`)}catch{this.proxies=[],P.debug("No proxy registry found")}}async runProxies(e,t){let r=t;for(let o of this.proxies)if(this.matchesPrefix(r,o.pathPrefix)){P.debug(`Running proxy: ${o.pathPrefix} for ${r}`);try{let i=s.path.resolve(this.registryDir,o.modulePath),l=this.moduleCache.get(i);l||(l=await import(`file://${i}`),this.moduleCache.set(i,l));let p=l.default;if(typeof p!="function"){P.warn(`Proxy ${o.modulePath} does not export a default function`);continue}let u=await p({request:e,pathname:r,params:{}});if(u.type==="response")return P.debug(`Proxy ${o.pathPrefix} returned response`),{result:u,finalPathname:r};if(u.type==="redirect")return P.debug(`Proxy ${o.pathPrefix} redirecting to ${u.url}`),{result:u,finalPathname:r};u.type==="rewrite"&&(P.debug(`Proxy ${o.pathPrefix} rewriting to ${u.pathname}`),r=u.pathname)}catch(i){return P.error(`Proxy error: ${o.pathPrefix}`,{error:i}),{result:{type:"response",response:new Response(JSON.stringify({error:"Proxy Error"}),{status:500,headers:{"Content-Type":"application/json"}})},finalPathname:r}}}return{result:{type:"next"},finalPathname:r}}matchesPrefix(e,t){return t==="/"?!0:e===t||e.startsWith(t+"/")}clearCache(){this.moduleCache.clear()}};function te(n,e){let t=X(n,e.path);if(t===null)return null;let r={};for(let[o,i]of Object.entries(t))Array.isArray(i)?r[o]=[...i]:typeof i=="string"&&(r[o]=i);return r}function U(n,e){for(let t of e){let r=te(n,t);if(r!==null)return{route:t,params:r}}return null}var le=["trace","debug","info","warn","error","fatal"];var oe="manifest.json",ue=n=>({trace:v.Debug,debug:v.Debug,info:v.Info,warn:v.Warning,error:v.Error,fatal:v.Critical})[n],R,E;async function pe(n){let e=ue(n),{output:t,renderers:r,sinks:o}=await import("./mod-FEGQZ3ZY.js"),i=t({renderer:r.ansi(),sink:o.stdout()});await G.configure({sinks:{console:V.getOutputSink(i)},loggers:[{category:["laroux-server"],lowestLevel:e,sinks:["console"]},{category:["laroux-bundler"],lowestLevel:e,sinks:["console"]},{category:["laroux"],lowestLevel:e,sinks:["console"]}]}),R=m.getLogger(["laroux-server","server"]),E=m.getLogger(["laroux-server","bundler"])}var O=null;function ot(){O=null}async function ce(n){if(O!==null)return O;let t=`file://${s.path.join(n.distDir,"server","_generated-routes.ts")}?t=${Date.now()}`,{generatedRoutes:r}=await import(t);return O=r,r}async function re(n,e){let t=s.path.resolve(n.distDir,"server","src","app",`${e}.js`);if(await s.fs.exists(t))return t;for(let r of Y){let o=s.path.resolve(n.distDir,"server","src","app",`${e}.${r}`);if(await s.fs.exists(o))return o}return t}async function ne(n,e){let t=Date.now(),o=`file://${await re(e,"layout")}?t=${t}`,{Layout:i}=await import(o),l=await ce(e),p=U(n,l);if(p===null){let a=`file://${await re(e,"not-found")}?t=${t}`,{NotFound:d}=await import(a);return{Layout:i,Page:d,params:{}}}return{Layout:i,Page:p.route.component,params:p.params}}async function de(n){try{let e=s.path.resolve(n.distDir,"client",oe),t=await s.fs.readTextFile(e);return JSON.parse(t).buildId}catch{return"unknown"}}async function me(n){try{let e=s.path.resolve(n.distDir,"client",oe),t=await s.fs.stat(e),r=await s.fs.stat(n.srcDir);return t.mtime===null||r.mtime===null?!1:t.mtime>r.mtime}catch{return!1}}function I(n){return{projectRoot:n.projectRoot,srcDir:n.srcDir,distDir:n.distDir,logLevel:n.logLevel,fonts:n.fonts,images:n.images,cssModuleTypes:n.cssModuleTypes,noCssModuleAutoReference:n.noCssModuleAutoReference,browserShims:n.browserShims,serverExternals:n.build.serverExternals}}async function ge(n,e={}){let{config:t,bundler:r,hmrManager:o}=n,{frameworkPlugin:i,cssPlugin:l}=e;try{let c=s.path.resolve(t.distDir,"server","actions-manifest.json");if(await s.fs.exists(c)){let x=await s.fs.readTextFile(c),z=JSON.parse(x),q=Date.now(),C=0;for(let J of z.actions)try{let k=s.path.resolve(t.distDir,"server",J);await s.fs.exists(k)&&(await import(`file://${k}?t=${q}`),C++)}catch(k){R.warn(`Failed to load action ${J}:`,{error:k})}C>0&&R.debug(`Server actions loaded: ${C} file(s)`)}else R.debug("No actions manifest found (optional)")}catch(c){R.warn("Failed to load server actions:",{error:c})}await ne("/",t);let p=await de(t);E.debug(`Build ID: ${p}`);let a={...n,getApp:c=>ne(c,t),buildId:p},d=await r.getBundle(),f={framework:i,css:l,bundlerBackend:"deno-bundler"};if(d.clientCode!==null&&o!==null){if(i!==void 0){let c=M(I(t),f);N(c,async y=>{if(r instanceof D)try{await r.rebuild()}catch(x){E.error("Compilation failed:",{error:x})}E.info(`\u2713 Compiled in ${y.duration.toFixed(0)}ms`),o?.notifyUpdate(Date.now(),y.changedFiles)})}}else if(t.mode.isWatch&&i!==void 0){let c=M(I(t),f);N(c,y=>{E.info(`\u2713 Compiled in ${y.duration.toFixed(0)}ms`)})}let h="";d.clientCode!==null&&o!==null?h=" HMR":d.clientCode!==null&&(h=" Watch"),R.info(`RSC Server${h}`),R.info(` Local: http://localhost:${t.server.port}`);let{startHTTPServer:g}=await import("./server-KNWQV2HW.js");return g(a),a}async function it(n){let e=n.projectRoot??s.process.cwd(),t=n.logLevel??"info",r=n.mode==="dev",{renderer:o,htmlShell:i,frameworkPlugin:l,cssPlugin:p}=n;await pe(t);let u=await Q(e),a={...u,srcDir:s.path.resolve(e,u.srcDir),distDir:s.path.resolve(e,u.distDir),publicDir:s.path.resolve(e,u.publicDir),logLevel:t,mode:{isDev:r,isBuild:!1,isServe:!r,isWatch:r}};n.port!==void 0&&(a.server.port=n.port),n.hmr!==void 0?a.server.hmr=n.hmr:r&&(a.server.hmr=!0),n.open!==void 0&&(a.server.open=n.open),r&&(a.build.minify=!1);let d=await me(a),f=r||!d,h={framework:l,css:p};if(f&&r&&l!==void 0){let C=M(I(a),{...h,bundlerBackend:"deno-bundler"});await F(C)}else if(f&&l!==void 0){let C=M(I(a),{...h,bundlerBackend:"rolldown"});await F(C)}let g,c=null;r&&a.server.hmr?(c=new $,g=new w({distDir:a.distDir})):g=new w({distDir:a.distDir});let y=new H;await y.loadRoutes(a.distDir);let x=new T;await x.loadProxies(a.distDir),await ge({config:a,bundler:g,hmrManager:c,apiHandler:y,middlewareDispatcher:x,renderer:o??Z,htmlShell:i??ee},{frameworkPlugin:l,cssPlugin:p}),n.open&&fe(`http://localhost:${a.server.port}`)}function fe(n){let e={darwin:["open"],linux:["xdg-open"],windows:["cmd","/c","start"]},t=W(),r=e[t];r&&r[0]&&s.exec.spawnChild(r[0],[...r.slice(1),n],{stdout:"null",stderr:"null"})}export{le as VALID_LOG_LEVELS,ot as clearRoutesCache,it as startServer};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c}from"./chunk-W3RVRCUB.js";import"./chunk-JYNHFD6B.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as MANIFEST_FILENAMES,c as getManifestPath,b as loadManifest};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c as e,d as f,e as g,f as h,g as i,h as j,i as k}from"./chunk-LCG4SK6K.js";import{a as c,b as d}from"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-G6NAG2EK.js";export{c as Severities,d as SeverityNames,b as category,f as config,e as context,j as filters,h as formatters,g as logger,i as sinks,k as tracer,a as types};
@@ -0,0 +1,28 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as re}from"./chunk-JYNHFD6B.js";import{d as _}from"./chunk-NBA6EFWU.js";import{f as U,h as H,k as G}from"./chunk-GBM3TZFD.js";import{b as w,d as S,f as C,g as O,k as z}from"./chunk-3SXTMY75.js";import{d as N}from"./chunk-PVPMHMKP.js";import{a as q}from"./chunk-MG65QJY6.js";import{a as E,b as $,d as V,f as D}from"./chunk-A6RDYP6R.js";import{t as l}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import{b as v}from"./chunk-DTO2YJWZ.js";import{e as te}from"./chunk-G6NAG2EK.js";var x=class extends TransformStream{constructor(t){let e;super({transform(s,a){if(e!==void 0){let n=new Uint8Array(e.length+s.length);n.set(e),n.set(s,e.length),s=n}for(let n=t;n<=s.length;n+=t)a.enqueue(s.slice(n-t,n));let f=-s.length%t;e=f?s.slice(f):void 0},flush(s){e?.length&&s.enqueue(e)}})}};var P=class{#s;#n;#t;#e=[];#r=!1;constructor(){let{readable:t,writable:e}=new TransformStream;this.#s=ReadableStream.from(this.#i()),this.#n=e,this.#t=t.pipeThrough(new x(512)).getReader()}async#a(){let{done:t,value:e}=await this.#t.read();if(!t){if(e.length!==512)throw new RangeError(`Cannot extract the tar archive: The tarball chunk has an unexpected number of bytes (${e.length})`);return this.#e.push(e),this.#e.shift()}}async*#i(){for(let e=0;e<2;++e){let{done:s,value:a}=await this.#t.read();if(s||a.length!==512)throw new RangeError("Cannot extract the tar archive: The tarball is too small to be valid");this.#e.push(a)}let t=new TextDecoder;for(;;){for(;this.#r;)await new Promise(n=>setTimeout(n,0));if(this.#e.every(n=>n.every(o=>o===0))){await this.#t.cancel("Tar stream finished prematurely");return}let e=await this.#a();if(e==null){if(this.#e.every(n=>n.every(o=>o===0)))break;throw new TypeError("Cannot extract the tar archive: The tarball has invalid ending")}let s=parseInt(t.decode(e.subarray(148,156)),8);if(e.fill(32,148,156),e.reduce((n,o)=>n+o)!==s)throw new SyntaxError("Cannot extract the tar archive: An archive entry has invalid header checksum");let a={name:t.decode(e.subarray(0,100)).split("\0")[0],mode:parseInt(t.decode(e.subarray(100,108)),8),uid:parseInt(t.decode(e.subarray(108,116)),8),gid:parseInt(t.decode(e.subarray(116,124)),8),size:parseInt(t.decode(e.subarray(124,136)).trimEnd(),8),mtime:parseInt(t.decode(e.subarray(136,147)),8),typeflag:t.decode(e.subarray(156,157)),linkname:t.decode(e.subarray(157,257)).split("\0")[0]};a.typeflag==="\0"&&(a.typeflag="0"),[117,115,116,97,114,0,48,48].every((n,o)=>e[o+257]===n)&&(a={...a,magic:t.decode(e.subarray(257,263)),version:t.decode(e.subarray(263,265)),uname:t.decode(e.subarray(265,297)).split("\0")[0],gname:t.decode(e.subarray(297,329)).split("\0")[0],devmajor:t.decode(e.subarray(329,337)).replaceAll("\0",""),devminor:t.decode(e.subarray(337,345)).replaceAll("\0",""),prefix:t.decode(e.subarray(345,500)).split("\0")[0]});let f={path:("prefix"in a&&a.prefix.length?a.prefix+"/":"")+a.name,header:a};["1","2","3","4","5","6"].includes(a.typeflag)||(f.readable=this.#l(a.size)),yield f}}async*#o(t){for(let e=Math.ceil(t/512);e>0;--e){let s=await this.#a();if(s==null)throw new SyntaxError("Cannot extract the tar archive: Unexpected end of Tarball");e===1&&t%512?yield s.subarray(0,t%512):yield s}}#l(t){this.#r=!0;let e=()=>this.#r=!1,s=this.#o(t);return new ReadableStream({type:"bytes",async pull(a){let{done:f,value:n}=await s.next();if(f)return e(),a.close(),a.byobRequest?.respond(0);if(a.byobRequest?.view){let o=new Uint8Array(a.byobRequest.view.buffer),i=o.length;i<n.length?(o.set(n.slice(0,i)),a.byobRequest.respond(i),a.enqueue(n.slice(i))):(o.set(n),a.byobRequest.respond(n.length))}else a.enqueue(n)},async cancel(){for await(let a of s);e()}})}get readable(){return this.#s}get writable(){return this.#n}};var L=async(r,t,e={})=>{let{stripComponents:s=0,subpath:a}=e,f=a!==void 0?l.path.normalize(a).replace(/^\/+/,""):void 0,o=r.pipeThrough(new DecompressionStream("gzip")).pipeThrough(new P);for await(let i of o){let c=l.path.normalize(i.path);if(c.startsWith("..")||l.path.isAbsolute(c)){i.readable!==void 0&&await i.readable.cancel();continue}let u=c.split(l.path.sep).slice(s);if(u.length===0){i.readable!==void 0&&await i.readable.cancel();continue}let d=u.join(l.path.sep);if(f!==void 0){if(!d.startsWith(f)){i.readable!==void 0&&await i.readable.cancel();continue}if(d.slice(f.length).replace(/^\/+/,"")===""){i.readable!==void 0&&await i.readable.cancel();continue}}let h=f!==void 0?l.path.join(t,d.slice(f.length).replace(/^\/+/,"")):l.path.join(t,d);if(await l.fs.ensureDir(l.path.dirname(h)),i.readable!==void 0){let b=new Response(i.readable),m=new Uint8Array(await b.arrayBuffer());await l.fs.writeFile(h,m)}}};var ne="main",ae=r=>{let[t,e]=r.split("#");if(t===void 0)throw new Error(`Invalid GitHub specifier: ${r}`);let s=t.split("/");if(s.length<2)throw new Error(`Invalid GitHub specifier: ${r}. Expected format: owner/repo[/path][#ref]`);let[a,f,...n]=s;if(a===void 0||f===void 0)throw new Error(`Invalid GitHub specifier: ${r}. Expected format: owner/repo[/path][#ref]`);return{provider:"github",raw:r,owner:a,repo:f,ref:e??ne,path:n.length>0?n.join("/"):void 0}},ie=async(r,t)=>{let e=r,{owner:s,repo:a,ref:f,path:n}=e,o=`https://codeload.github.com/${s}/${a}/tar.gz/${f}`,i=await fetch(o);if(!i.ok)throw i.status===404?new Error(`Repository not found: ${s}/${a} (ref: ${f})`):new Error(`Failed to fetch template: ${i.status} ${i.statusText}`);if(i.body===null)throw new Error("Response body is empty");await L(i.body,t,{stripComponents:1,subpath:n})},M={name:"github",prefixes:["github","gh"],isDefault:!0,parse:ae,fetch:ie};var g={providers:new Map,defaultProvider:null,initialized:!1},A=()=>{g.initialized||(g.initialized=!0,W(M))},W=r=>{g.providers.set(r.name,r);for(let t of r.prefixes)g.providers.set(t,r);r.isDefault===!0&&(g.defaultProvider=r)},oe=r=>(A(),g.providers.get(r)??null),le=()=>(A(),g.defaultProvider),B=r=>{A();let t=r.indexOf(":");if(t!==-1){let e=r.slice(0,t),s=r.slice(t+1),a=g.providers.get(e);if(a===void 0)throw new Error(`Unknown provider prefix: ${e}`);return{provider:a,ref:a.parse(s)}}if(g.defaultProvider===null)throw new Error("No default provider registered");return{provider:g.defaultProvider,ref:g.defaultProvider.parse(r)}},I=async(r,t)=>{let{provider:e,ref:s}=B(r);return await e.fetch(s,t),s};var Y=te(re(),1);var J=[".eser/manifest.yml",".eser/manifest.yaml",".manifest.yml",".manifest.yaml"],j=async r=>{for(let t of J){let e=l.path.join(r,t);try{let s=await l.fs.readTextFile(e),a=Y.parse(s);if(typeof a.name!="string"||a.name==="")throw new Error(`Template config missing required 'name' field: ${e}`);return a}catch(s){if(s instanceof v)continue;throw s}}return null},fe=r=>{let t=r.description??r.name,e=r.default!==void 0?` [${r.default}]`:"",s=r.required===!0?" (required)":"",a=`${t}${s}${e}: `,f=globalThis.prompt(a);return f===null||f===""?r.default??null:f},X=(r,t)=>r.pattern===void 0||new RegExp(r.pattern).test(t)?null:`Value '${t}' does not match pattern '${r.pattern}'`,F=(r,t)=>{let{provided:e,interactive:s}=t,a=r.variables??[],f={...e},n=[];for(let o of a){let{name:i,required:c,default:p}=o;if(f[i]!==void 0){let u=X(o,f[i]);u!==null&&n.push(`${i}: ${u}`);continue}if(s){let u=fe(o);if(u!==null){let d=X(o,u);d!==null?n.push(`${i}: ${d}`):f[i]=u;continue}}if(p!==void 0){f[i]=p;continue}c===!0&&n.push(`Missing required variable: ${i}`)}if(n.length>0)throw new Error(`Variable resolution failed:
3
+ ${n.join(`
4
+ `)}`);return f},K=async r=>{for(let t of J){let e=l.path.join(r,t);try{return await l.fs.stat(e),e}catch{continue}}return null};var Q=/\{\{\s*\.(\w+)\s*\}\}/g,ce=["png","jpg","jpeg","gif","ico","webp","svg","woff","woff2","ttf","eot","otf","zip","tar","gz","bz2","xz","7z","pdf","doc","docx","xls","xlsx","ppt","pptx","exe","dll","so","dylib","mp3","mp4","avi","mov","webm"],pe=r=>_(r.toLowerCase(),ce),de=(r,t)=>{for(let e of t)if(e.startsWith("*")){let s=e.slice(1);if(r.endsWith(s))return!0}else if(e.includes("*")){let s=e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,".*").replace(/\*/g,"[^/]*");if(new RegExp(`^${s}$`).test(r))return!0}else if(r===e||r.startsWith(e+"/"))return!0;return!1},T=(r,t)=>r.replace(Q,(e,s)=>{let a=t[s];return a===void 0?`{{.${s}}}`:a}),R=r=>Q.test(r),Z=async(r,t)=>{let{variables:e,ignore:s}=t,a=[],f=[];for await(let n of l.fs.walk(r,{includeDirs:!0})){let o=l.path.relative(r,n.path);o!==""&&(de(o,s)||(n.isDirectory?R(n.name)&&f.push(n.path):n.isFile&&a.push(n.path)))}for(let n of a){let o=l.path.basename(n),i=l.path.dirname(n);if(!pe(n))try{let c=await l.fs.readTextFile(n);if(R(c)){let p=T(c,e);await l.fs.writeTextFile(n,p)}}catch(c){if(!(c instanceof Error&&c.name==="InvalidData"))throw c}if(R(o)){let c=T(o,e),p=l.path.join(i,c);p!==n&&await l.fs.rename(n,p)}}f.sort((n,o)=>o.split(l.path.sep).length-n.split(l.path.sep).length);for(let n of f){let o=l.path.basename(n),i=l.path.dirname(n),c=T(o,e),p=l.path.join(i,c);p!==n&&await l.fs.rename(n,p)}},ee=async r=>{try{await l.fs.remove(r)}catch(t){if(!(t instanceof v))throw t}};var k=async r=>{let{specifier:t,targetDir:e,variables:s={},force:a=!1,skipPostInstall:f=!1,interactive:n=!1}=r,o=l.path.isAbsolute(e)?e:l.path.join(l.process.cwd(),e);try{let m=[];for await(let y of l.fs.readDir(o)){m.push(y);break}if(m.length>0&&!a)throw new Error(`Target directory is not empty: ${o}. Use --force to overwrite.`)}catch(m){if(!(m instanceof v))throw m}await l.fs.ensureDir(o),await I(t,o);let i=await j(o),c=i?.name??t,p=i!==null?F(i,{provided:s,interactive:n}):s,u=[".git",".eser/manifest.yml",".eser/manifest.yaml",...i?.ignore??[]];await Z(o,{variables:p,ignore:u});let d=await K(o);d!==null&&await ee(d);let h=i?.postInstall??[],b=[];if(!f&&h.length>0)for(let m of h)try{(await N`${m}`.cwd(o).stdout("inherit").stderr("inherit").noThrow().spawn()).success?b.push(m):console.warn(`Post-install command failed: ${m}`)}catch(y){console.warn(`Post-install command error: ${m}`,y)}return{templateName:c,targetDir:o,variables:p,postInstallCommands:b}};var Ue=async r=>{let t=q(r??l.process.args,{string:["path","var"],boolean:["force","interactive","skip-post-install","help"],alias:{p:"path",f:"force",i:"interactive",h:"help"},collect:["var"]});if(t.help)return console.log(`Usage: scaffold <specifier> [options]
5
+
6
+ Options:
7
+ -p, --path <dir> Target directory (default: .)
8
+ -f, --force Overwrite existing files
9
+ -i, --interactive Prompt for missing variables
10
+ --var key=value Set a template variable (repeatable)
11
+ --skip-post-install Skip post-install commands
12
+ -h, --help Show this help message
13
+
14
+ Examples:
15
+ scaffold eser/ajan
16
+ scaffold gh:eser/ajan#v1.0 -p ./my-project
17
+ scaffold eser/ajan --var name=my-app --var author=me`),E(void 0);let e=G.ansi(),s=U({renderer:e,sink:H.stdout()});if(t._.length===0)return await s.close(),$({message:`${e.render([C("Error: Template specifier is required")])}
18
+
19
+ Usage: scaffold <specifier> [options]
20
+
21
+ Examples:
22
+ scaffold eser/ajan
23
+ scaffold gh:eser/ajan#v1.0
24
+ scaffold eser/ajan -p ./my-project`,exitCode:1});let a=String(t._[0]),f=t.path??".",n=t.force??!1,o=t["skip-post-install"]??!1,i=t.interactive??!1,c=t.var,p={};if(c!==void 0)for(let h of c){let[b,...m]=String(h).split("=");b!==void 0&&(p[b]=m.join("="))}s.writeln(w("Scaffolding from "),z(a),w("..."));let u=await D(()=>k({specifier:a,targetDir:f,variables:p,force:n,skipPostInstall:o,interactive:i}),h=>({message:h.message}));if(V(u))return await s.close(),$({message:e.render([C(`
25
+ Scaffolding failed: ${u.error.message}`)]),exitCode:1});let d=u.value;if(s.writeln(O(`
26
+ Scaffolded ${d.templateName} to ${d.targetDir}`)),Object.keys(d.variables).length>0){s.writeln(w(`
27
+ Variables applied:`));for(let[h,b]of Object.entries(d.variables))s.writeln(w(" "),S(h),w(`: ${b}`))}if(d.postInstallCommands.length>0){s.writeln(w(`
28
+ Post-install commands executed:`));for(let h of d.postInstallCommands)s.writeln(w(" "),S(h))}return await s.close(),E(void 0)};export{I as fetchTemplate,le as getDefaultProvider,oe as getProvider,R as hasVariables,j as loadTemplateConfig,Ue as main,B as parseSpecifier,W as registerProvider,F as resolveVariables,k as scaffold,T as substituteVariables};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d,e,f as g,g as h,h as i,i as j,j as k,k as l}from"./chunk-GBM3TZFD.js";import{p as f}from"./chunk-3SXTMY75.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{b as PipelineError,a as StreamError,c as TimeoutError,d as createChunk,e as defineLayer,k as layers,g as output,h as pipeline,l as renderers,i as sinks,j as sources,f as span};
@@ -1 +1,2 @@
1
- import{d as S}from"./chunk-2J2PXBOC.js";import{e as q}from"./chunk-OBIEQJDE.js";import"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import{t as n}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var h=q.getLogger(["laroux","image-optimizer"]),$=null;async function j(){return $===null&&($=await import("npm:sharp@^0.33.5")),$.default??$}var F={formats:["webp","original"],widths:[640,768,1024,1280,1920],quality:{webp:80,avif:75,jpeg:85,png:90},generateBlurPlaceholder:!0,placeholderWidth:10};async function B(i){let r=[],o=["jpg","jpeg","png","gif","webp"];async function a(t){try{for await(let e of n.fs.readDir(t)){let s=n.path.resolve(t,e.name);e.isDirectory?await a(s):e.isFile&&S(e.name.toLowerCase(),o)&&r.push(s)}}catch{}}return await a(i),r}async function E(i,r){return`data:image/webp;base64,${(await(await j())(i).resize(r,void 0,{fit:"inside"}).blur(5).webp({quality:20}).toBuffer()).toString("base64")}`}async function C(i,r,o,a={}){let t=await j(),e={...F,...a},s=t(i),l=await s.metadata();if(l.width===void 0||l.height===void 0)throw new Error(`Could not read image dimensions: ${i}`);let u=l.width,w=l.height,y=u/w,m=n.path.extname(i),p=m.slice(1).toLowerCase(),f=n.path.basename(i,m),x=`${o}/${f}`,I=[];for(let c of e.widths){if(c>u)continue;let O=Math.round(c/y);for(let b of e.formats){let z,d;b==="original"?(d=p,z=n.path.resolve(r,`${f}-${c}w.${p}`)):(d=b,z=n.path.resolve(r,`${f}-${c}w.${b}`)),await n.fs.ensureDir(n.path.dirname(z));let g=s.clone().resize(c,O,{fit:"cover"});b==="webp"?g=g.webp({quality:e.quality.webp}):b==="avif"?g=g.avif({quality:e.quality.avif}):d==="jpg"||d==="jpeg"?g=g.jpeg({quality:e.quality.jpeg}):d==="png"&&(g=g.png({quality:e.quality.png}));let P=await g.toBuffer();await n.fs.writeFile(z,P),I.push({path:z,format:d,width:c,height:O,size:P.length})}}let v;return e.generateBlurPlaceholder&&(v=await E(i,e.placeholderWidth)),{originalPath:i,publicPath:x,originalWidth:u,originalHeight:w,variants:I,blurDataUrl:v,aspectRatio:y}}async function V(i,r,o="/images",a={}){h.info(`Scanning for images in ${i}...`);let t=await B(i);if(t.length===0)return h.debug("No images found to optimize"),{timestamp:Date.now(),images:{}};h.info(`Found ${t.length} image(s) to optimize`);let e={},s=0,l=0;for(let m of t)try{let p=await n.fs.stat(m);s+=p.size;let f=await C(m,r,o,a);e[m]=f;let x=f.variants.reduce((I,v)=>I+v.size,0);l+=x,h.debug(`Optimized: ${n.path.basename(m)} \u2192 ${f.variants.length} variants`)}catch(p){h.warn(`Failed to optimize ${m}: ${p instanceof Error?p.message:String(p)}`)}let u={timestamp:Date.now(),images:e},w=n.path.resolve(r,"image-manifest.json");await n.fs.ensureDir(n.path.dirname(w)),await n.fs.writeTextFile(w,JSON.stringify(u,null,2));let y=s>0?((1-l/s)*100).toFixed(1):0;return h.info(`Image optimization complete: ${t.length} images, ${y}% size reduction`),u}function M(i,r="webp"){return i.variants.filter(a=>a.format===r).sort((a,t)=>a.width-t.width).map(a=>`${a.path} ${a.width}w`).join(", ")}function D(i,r,o="webp"){let a=i.variants.filter(t=>t.format===o).sort((t,e)=>t.width-e.width);return a.find(t=>t.width>=r)??a.at(-1)}export{M as generateSrcset,D as getBestVariant,C as optimizeImage,V as optimizeImages,B as scanImages};
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{d as S}from"./chunk-NBA6EFWU.js";import{e as q}from"./chunk-LCG4SK6K.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import{t as n}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var h=q.getLogger(["laroux","image-optimizer"]),$=null;async function j(){return $===null&&($=await import("npm:sharp@^0.33.5")),$.default??$}var F={formats:["webp","original"],widths:[640,768,1024,1280,1920],quality:{webp:80,avif:75,jpeg:85,png:90},generateBlurPlaceholder:!0,placeholderWidth:10};async function B(i){let r=[],o=["jpg","jpeg","png","gif","webp"];async function a(t){try{for await(let e of n.fs.readDir(t)){let s=n.path.resolve(t,e.name);e.isDirectory?await a(s):e.isFile&&S(e.name.toLowerCase(),o)&&r.push(s)}}catch{}}return await a(i),r}async function E(i,r){return`data:image/webp;base64,${(await(await j())(i).resize(r,void 0,{fit:"inside"}).blur(5).webp({quality:20}).toBuffer()).toString("base64")}`}async function C(i,r,o,a={}){let t=await j(),e={...F,...a},s=t(i),l=await s.metadata();if(l.width===void 0||l.height===void 0)throw new Error(`Could not read image dimensions: ${i}`);let u=l.width,w=l.height,y=u/w,m=n.path.extname(i),p=m.slice(1).toLowerCase(),f=n.path.basename(i,m),x=`${o}/${f}`,I=[];for(let c of e.widths){if(c>u)continue;let O=Math.round(c/y);for(let b of e.formats){let z,d;b==="original"?(d=p,z=n.path.resolve(r,`${f}-${c}w.${p}`)):(d=b,z=n.path.resolve(r,`${f}-${c}w.${b}`)),await n.fs.ensureDir(n.path.dirname(z));let g=s.clone().resize(c,O,{fit:"cover"});b==="webp"?g=g.webp({quality:e.quality.webp}):b==="avif"?g=g.avif({quality:e.quality.avif}):d==="jpg"||d==="jpeg"?g=g.jpeg({quality:e.quality.jpeg}):d==="png"&&(g=g.png({quality:e.quality.png}));let P=await g.toBuffer();await n.fs.writeFile(z,P),I.push({path:z,format:d,width:c,height:O,size:P.length})}}let v;return e.generateBlurPlaceholder&&(v=await E(i,e.placeholderWidth)),{originalPath:i,publicPath:x,originalWidth:u,originalHeight:w,variants:I,blurDataUrl:v,aspectRatio:y}}async function V(i,r,o="/images",a={}){h.info(`Scanning for images in ${i}...`);let t=await B(i);if(t.length===0)return h.debug("No images found to optimize"),{timestamp:Date.now(),images:{}};h.info(`Found ${t.length} image(s) to optimize`);let e={},s=0,l=0;for(let m of t)try{let p=await n.fs.stat(m);s+=p.size;let f=await C(m,r,o,a);e[m]=f;let x=f.variants.reduce((I,v)=>I+v.size,0);l+=x,h.debug(`Optimized: ${n.path.basename(m)} \u2192 ${f.variants.length} variants`)}catch(p){h.warn(`Failed to optimize ${m}: ${p instanceof Error?p.message:String(p)}`)}let u={timestamp:Date.now(),images:e},w=n.path.resolve(r,"image-manifest.json");await n.fs.ensureDir(n.path.dirname(w)),await n.fs.writeTextFile(w,JSON.stringify(u,null,2));let y=s>0?((1-l/s)*100).toFixed(1):0;return h.info(`Image optimization complete: ${t.length} images, ${y}% size reduction`),u}function M(i,r="webp"){return i.variants.filter(a=>a.format===r).sort((a,t)=>a.width-t.width).map(a=>`${a.path} ${a.width}w`).join(", ")}function D(i,r,o="webp"){let a=i.variants.filter(t=>t.format===o).sort((t,e)=>t.width-e.width);return a.find(t=>t.width>=r)??a.at(-1)}export{M as generateSrcset,D as getBestVariant,C as optimizeImage,V as optimizeImages,B as scanImages};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d,e,f}from"./chunk-3YUV3QIZ.js";import"./chunk-XU5SILYR.js";import"./chunk-J2Z7NG2X.js";import"./chunk-GBM3TZFD.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-3MM5EGFB.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as completionsHandler,f as doctorHandler,a as installHandler,b as uninstallHandler,c as updateHandler,e as versionHandler};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-PVPMHMKP.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{b as CommandBuilder,a as CommandError,d as exec,c as parseCommand};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-KPWEJXPI.js";import"./chunk-CUIMSX4V.js";import"./chunk-NBA6EFWU.js";import"./chunk-LCG4SK6K.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{e as ABOVE_FOLD_PATTERNS,d as CRITICAL_LAYERS,f as CRITICAL_PROPERTY_PATTERNS,m as DEFAULT_CRITICAL_UNIVERSAL_CSS,b as compileTailwind,n as createTailwindPlugin,c as expandApplyDirectives,h as extractCriticalPageCss,j as extractCriticalUniversalCss,l as extractThemeLayer,i as generateAsyncCssLoader,k as generateCriticalUniversalCss,g as getDefaultCriticalCssConfig,a as loadStylesheet};
@@ -1 +1,2 @@
1
- import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l,i as m,j as n,k as o,l as r,m as s,n as t,o as u,p as v,q as w,r as x,s as A,t as B,u as C}from"./chunk-YXSB6RET.js";import{b as y,c as z}from"./chunk-SG4G3OOO.js";import{a as p,b as q}from"./chunk-FDZP7B5Y.js";import{a,b,c,d}from"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";export{c as AlreadyExistsError,b as NotFoundError,d as ProcessError,a as RuntimeCapabilityError,u as buildCommand,z as clearWorkerdEnv,A as createRuntime,C as current,x as detectExecutionContext,t as detectInvoker,e as detectRuntime,l as getArch,w as getCliCommand,m as getHomedir,k as getPlatform,o as getPlatformInfo,f as getRuntimeVersion,n as getTmpdir,h as isBrowser,v as isCommandInPath,j as isEdge,g as isRuntime,i as isServer,y as populateEnvFromContext,q as posixPath,s as resolvePathDirs,B as runtime,r as searchFileHierarchy,p as toPosix};
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l,i as m,j as n,k as o,l as r,m as s,n as t,o as u,p as v,q as w,r as x,s as A,t as B,u as C}from"./chunk-MRCBHVSB.js";import{b as y,c as z}from"./chunk-Y4ARZGGL.js";import{a as p,b as q}from"./chunk-STI6DX7K.js";import{a,b,c,d}from"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{c as AlreadyExistsError,b as NotFoundError,d as ProcessError,a as RuntimeCapabilityError,u as buildCommand,z as clearWorkerdEnv,A as createRuntime,C as current,x as detectExecutionContext,t as detectInvoker,e as detectRuntime,l as getArch,w as getCliCommand,m as getHomedir,k as getPlatform,o as getPlatformInfo,f as getRuntimeVersion,n as getTmpdir,h as isBrowser,v as isCommandInPath,j as isEdge,g as isRuntime,i as isServer,y as populateEnvFromContext,q as posixPath,s as resolvePathDirs,B as runtime,r as searchFileHierarchy,p as toPosix};
@@ -1 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,q as o,r as p,s as q,t as r}from"./chunk-ETMOOGY2.js";import"./chunk-OBIEQJDE.js";import"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";export{j as chunkToInlineScript,l as createInlineRSCStream,k as createInlineTransformStream,q as createReactHtmlShellBuilder,o as createReactRenderer,m as generateInlineBootstrapScript,n as generateInlineCompletionScript,c as generateRSCPayloadScript,e as loadModuleMap,r as reactHtmlShellBuilder,p as reactRenderer,i as renderApp,f as renderRSC,h as renderRSCResponse,a as renderSSR,d as renderToReadableStream,b as serializeRSCPayload,g as streamToResponse};
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,q as o,r as p,s as q,t as r}from"./chunk-7BFBOLLC.js";import"./chunk-LCG4SK6K.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{j as chunkToInlineScript,l as createInlineRSCStream,k as createInlineTransformStream,q as createReactHtmlShellBuilder,o as createReactRenderer,m as generateInlineBootstrapScript,n as generateInlineCompletionScript,c as generateRSCPayloadScript,e as loadModuleMap,r as reactHtmlShellBuilder,p as reactRenderer,i as renderApp,f as renderRSC,h as renderRSCResponse,a as renderSSR,d as renderToReadableStream,b as serializeRSCPayload,g as streamToResponse};
@@ -1,4 +1,5 @@
1
- import{c as T,h as J}from"./chunk-5RK3346P.js";import{a as S}from"./chunk-4H4O3TGK.js";import{b as B,c as W}from"./chunk-2J2PXBOC.js";import{e as h}from"./chunk-OBIEQJDE.js";import"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-BCHXUKWW.js";import"./chunk-GLSCZGXA.js";import"./chunk-ZE5T64HQ.js";import{t as i}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var P=h.getLogger(["laroux-bundler","rsc-analyze"]);function Z(t){return{filePath:t.filePath,relativePath:t.relativePath,exportNames:[...t.exports]}}async function E(t,e,n){if(P.debug(`\u{1F50D} Analyzing client components in: ${t}`),!n){let p=(await T(t,{projectRoot:e})).map(Z);return P.debug(`\u{1F4CA} Total client components found: ${p.length}`),p}let r=[],o=0,a=0,l=await T(t,{projectRoot:e});for(let s of l){let p=0;try{p=(await i.fs.stat(s.filePath)).mtime?.getTime()??0}catch{continue}let c=n.getClientComponent(s.filePath,p);if(c){o++,c.isClient&&r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:c.exportNames});continue}a++;let x=[...s.exports];n.setClientComponent(s.filePath,!0,x,p),r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:x}),P.debug(` \u2713 Found client component: ${s.relativePath} (exports: ${x.join(", ")})`)}return(o>0||a>0)&&P.debug(`\u{1F4CA} Component analysis: ${o} cache hits, ${a} analyzed`),P.debug(`\u{1F4CA} Total client components found: ${r.length}`),r}async function _(t){let e=[],n=/(?:node_modules|\.test\.|\.spec\.)/;for await(let r of S(t,"**/*.{tsx,ts,jsx,js}",n))e.push(i.path.join(t,r));return e}var v=h.getLogger(["laroux-bundler","rsc-transform"]);async function H(t,e){let n=i.path.dirname(t.relativePath),r=i.path.join(e,n);await i.fs.ensureDir(r);let o=tt(t),a=t.relativePath.split("/").pop(),l=i.path.join(r,a);return await i.fs.writeTextFile(l,o),{originalPath:t.filePath,transformedPath:l}}function tt(t){let e=t.exportNames.map(n=>n==="default"?`export default createClientReference(
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{c as T,h as J}from"./chunk-VG72SSDI.js";import{a as S}from"./chunk-CUIMSX4V.js";import{b as B,c as W}from"./chunk-NBA6EFWU.js";import{e as h}from"./chunk-LCG4SK6K.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{t as i}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var P=h.getLogger(["laroux-bundler","rsc-analyze"]);function Z(t){return{filePath:t.filePath,relativePath:t.relativePath,exportNames:[...t.exports]}}async function E(t,e,n){if(P.debug(`\u{1F50D} Analyzing client components in: ${t}`),!n){let p=(await T(t,{projectRoot:e})).map(Z);return P.debug(`\u{1F4CA} Total client components found: ${p.length}`),p}let r=[],o=0,a=0,l=await T(t,{projectRoot:e});for(let s of l){let p=0;try{p=(await i.fs.stat(s.filePath)).mtime?.getTime()??0}catch{continue}let c=n.getClientComponent(s.filePath,p);if(c){o++,c.isClient&&r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:c.exportNames});continue}a++;let x=[...s.exports];n.setClientComponent(s.filePath,!0,x,p),r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:x}),P.debug(` \u2713 Found client component: ${s.relativePath} (exports: ${x.join(", ")})`)}return(o>0||a>0)&&P.debug(`\u{1F4CA} Component analysis: ${o} cache hits, ${a} analyzed`),P.debug(`\u{1F4CA} Total client components found: ${r.length}`),r}async function _(t){let e=[],n=/(?:node_modules|\.test\.|\.spec\.)/;for await(let r of S(t,"**/*.{tsx,ts,jsx,js}",n))e.push(i.path.join(t,r));return e}var v=h.getLogger(["laroux-bundler","rsc-transform"]);async function H(t,e){let n=i.path.dirname(t.relativePath),r=i.path.join(e,n);await i.fs.ensureDir(r);let o=tt(t),a=t.relativePath.split("/").pop(),l=i.path.join(r,a);return await i.fs.writeTextFile(l,o),{originalPath:t.filePath,transformedPath:l}}function tt(t){let e=t.exportNames.map(n=>n==="default"?`export default createClientReference(
2
3
  "./${t.relativePath}",
3
4
  "default"
4
5
  );`:`export const ${n} = createClientReference(
@@ -1,5 +1,6 @@
1
- import{a as Pe}from"./chunk-AYSPDG4K.js";import{a as $e}from"./chunk-NTPOK5H6.js";import{a as ke,c as he}from"./chunk-W3REWI3H.js";import{a as xe,c as be}from"./chunk-XMCQMTAA.js";import{a as Ve,c as we}from"./chunk-VVHXAOEH.js";import{a as Ce}from"./chunk-TUTRX7VR.js";import{a as Se}from"./chunk-4HAIX3WN.js";import{a as De}from"./chunk-HTBLWLKV.js";import{a as Te}from"./chunk-GVSBZ6JV.js";import"./chunk-AKJB4CER.js";import{a as Fe,c as Re}from"./chunk-JOXKA7TJ.js";import{a as ae,c as se}from"./chunk-G34MS4XJ.js";import{a as oe,c as ie}from"./chunk-ANY26ROY.js";import{a as re,c as ne}from"./chunk-H4OFOQQ2.js";import{a as le,c as de}from"./chunk-U65FD6J3.js";import{a as ce,c as pe}from"./chunk-6HYGGBEQ.js";import{a as me,c as ue}from"./chunk-QZY4BKI7.js";import{a as fe,c as ge}from"./chunk-4VL2RZIN.js";import{a as ve,c as ye}from"./chunk-NGZZAQ7G.js";import{a as K,c as U}from"./chunk-PO3SXFUE.js";import{a as X,c as H}from"./chunk-YWCEHTZB.js";import{a as Q,c as Z}from"./chunk-YMY2URYM.js";import{a as ee,c as te}from"./chunk-YQU3TEIG.js";import{a as G}from"./chunk-SBOTNOWZ.js";import"./chunk-CPRLAMEG.js";import{b as B,c as Y}from"./chunk-3I4JG3PJ.js";import"./chunk-V2N5L24J.js";import"./chunk-Y6DZEK4W.js";import"./chunk-34GCQZ3Z.js";import"./chunk-3APERFKY.js";import"./chunk-6U2VEZEM.js";import"./chunk-KAEAT6A4.js";import"./chunk-ZH37DSUQ.js";import"./chunk-LOFP256P.js";import"./chunk-ZF2XYULB.js";import"./chunk-4S7QYPS6.js";import"./chunk-NUSNMQPL.js";import"./chunk-GXPLME3K.js";import{b as _}from"./chunk-2J2PXBOC.js";import{f as W,h as J,k as z}from"./chunk-TTYO2XJO.js";import"./chunk-USCAYIWL.js";import{b as g,d as y,e as x,f as R,g as L,j as q}from"./chunk-PLJNPQFC.js";import"./chunk-BCHXUKWW.js";import{a as O}from"./chunk-HPPFA3XU.js";import{a as T,b as A}from"./chunk-DQAEQEXD.js";import{t as F}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var C=async t=>{let s=await B(t);return s===null?null:s},Me=async t=>await Y(t);var P={name:"validate-circular-deps",description:"Detect circular package dependencies",requiredStacks:[],async validate(t){let s=await De({root:t.root});return{name:"validate-circular-deps",passed:!s.hasCycles,issues:s.cycles.map(a=>({severity:"error",message:`Circular dependency: ${a.join(" \u2192 ")}`})),stats:{packagesChecked:s.packagesChecked}}}};var $={name:"validate-mod-exports",description:"Validate mod.ts exports all files",requiredStacks:["javascript"],async validate(t){let s=await Pe({root:t.root});return{name:"validate-mod-exports",passed:s.isComplete,issues:s.missingExports.map(a=>({severity:"error",message:`Missing export in ${a.packageName}: ${a.file}`,file:a.file})),stats:{packagesChecked:s.packagesChecked}}}};var E={name:"validate-export-names",description:"Validate export naming conventions",requiredStacks:["javascript"],async validate(t){let s=await Te({root:t.root});return{name:"validate-export-names",passed:s.isValid,issues:s.violations.map(a=>({severity:"error",message:`${a.packageName}: "${a.exportPath}" should be "${a.suggestion}"`})),stats:{packagesChecked:s.packagesChecked}}}};var j={name:"validate-docs",description:"Validate JSDoc documentation",requiredStacks:["javascript"],async validate(t){let s=t.options?.requireExamples,a=await Se({root:t.root,requireExamples:s});return{name:"validate-docs",passed:a.isValid,issues:a.issues.map(e=>({severity:"error",message:`${e.symbol}: ${e.issue}`,file:e.file,line:e.line})),stats:{filesChecked:a.filesChecked,symbolsChecked:a.symbolsChecked}}}};var M={name:"validate-package-configs",description:"Validate deno.json/package.json consistency",requiredStacks:["javascript"],async validate(t){let s=await $e({root:t.root}),a=[];for(let e of s.inconsistencies)a.push({severity:"error",message:`${e.packageName}: ${e.field} mismatch - deno.json: ${JSON.stringify(e.denoValue)}, package.json: ${JSON.stringify(e.packageValue)}`});for(let e of s.dependencyInconsistencies){let i=`${e.packageName}: ${e.dependencyName} - ${e.issue}`;e.expected!==void 0&&e.actual!==void 0&&(i+=` (expected: ${e.expected}, actual: ${e.actual})`),a.push({severity:"error",message:i})}return{name:"validate-package-configs",passed:s.isConsistent,issues:a,stats:{packagesChecked:s.packagesChecked}}}};var qe=[{pattern:/\bDeno\.cwd\(\)/,replacement:"runtime.process.cwd()"},{pattern:/\bDeno\.env\.get\b/,replacement:"runtime.env.get()"},{pattern:/\bDeno\.env\.set\b/,replacement:"runtime.env.set()"},{pattern:/\bDeno\.env\.delete\b/,replacement:"runtime.env.delete()"},{pattern:/\bDeno\.env\.has\b/,replacement:"runtime.env.has()"},{pattern:/\bDeno\.env\.toObject\b/,replacement:"runtime.env.toObject()"},{pattern:/\bDeno\.readTextFile\b/,replacement:"runtime.fs.readTextFile()"},{pattern:/\bDeno\.readFile\b/,replacement:"runtime.fs.readFile()"},{pattern:/\bDeno\.writeTextFile\b/,replacement:"runtime.fs.writeTextFile()"},{pattern:/\bDeno\.writeFile\b/,replacement:"runtime.fs.writeFile()"},{pattern:/\bDeno\.mkdir\b/,replacement:"runtime.fs.mkdir()"},{pattern:/\bDeno\.remove\b/,replacement:"runtime.fs.remove()"},{pattern:/\bDeno\.stat\b/,replacement:"runtime.fs.stat()"},{pattern:/\bDeno\.lstat\b/,replacement:"runtime.fs.lstat()"},{pattern:/\bDeno\.readDir\b/,replacement:"runtime.fs.readDir()"},{pattern:/\bDeno\.copyFile\b/,replacement:"runtime.fs.copyFile()"},{pattern:/\bDeno\.rename\b/,replacement:"runtime.fs.rename()"},{pattern:/\bDeno\.open\b/,replacement:"runtime.fs (or @eser/streams)"},{pattern:/\bDeno\.exit\b/,replacement:"runtime.process.exit()"},{pattern:/\bnew Deno\.Command\b/,replacement:"runtime.exec.spawn() (or @eser/shell/exec)"},{pattern:/\bDeno\.args\b/,replacement:"runtime.process.args"}],We=[],Je=t=>We.some(s=>s.test(t)),ze=(t,s)=>{let a=t.slice(0,s);return a.includes("//")||a.includes("/*")&&!a.includes("*/")},_e=(t,s)=>{let a=!1,e=!1,i=!1;for(let n=0;n<s;n++){let l=t[n];(n>0?t[n-1]:"")!=="\\"&&(l==="'"&&!e&&!i&&(a=!a),l==='"'&&!a&&!i&&(e=!e),l==="`"&&!a&&!e&&(i=!i))}return a||e||i},b=G({name:"validate-runtime-js-apis",description:"Detect direct usage of runtime-specific APIs (use @eser/standards/cross-runtime instead)",canFix:!1,stacks:["javascript"],defaults:{},extensions:_,checkFile(t,s){if(s===void 0)return[];if(Je(t.path))return[];let a=[],e=s.split(`
2
- `);for(let i=0;i<e.length;i++){let n=e[i];for(let{pattern:l,replacement:d}of qe){let c=l.exec(n);c!==null&&(ze(n,c.index)||_e(n,c.index)||a.push({path:t.path,line:i+1,message:`direct Deno API usage: ${c[0]} \u2014 use @eser/standards/cross-runtime (${d})`}))}}return a}}),ct=b.run,Ee=b.validator,pt=b.main;var k={validators:new Map,initialized:!1},Ye=()=>{o(P),o($),o(E),o(j),o(M),o(U),o(H),o(Z),o(te),o(se),o(ie),o(ne),o(de),o(pe),o(ue),o(ge),o(ye),o(he),o(be),o(we),o(Re),o(Ee)},I=()=>{k.initialized||(k.initialized=!0,Ye())},o=t=>{k.validators.set(t.name,t)},Ge=t=>(I(),k.validators.get(t)??null),N=()=>(I(),[...k.validators.values()]),Ke=()=>(I(),[...k.validators.keys()]),Ue=t=>({name:t.config.name,description:t.config.description,run:async s=>{let a=await t.run(s);return{name:a.name,passed:a.issues.length===0,issues:a.issues.map(e=>({path:e.path,line:e.line,message:e.message,fixed:e.fixed})),mutations:a.mutations.map(e=>({path:e.path,oldContent:e.oldContent,newContent:e.newContent})),stats:{filesChecked:a.filesChecked,issuesFound:a.issues.length}}}}),Xe=t=>({name:t.name,description:t.description,run:async s=>{let a=await t.validate({root:s.root??".",options:s});return{name:a.name,passed:a.passed,issues:a.issues.map(e=>({path:e.file,line:e.line,message:e.message})),mutations:[],stats:a.stats}}}),He=()=>{let t=[],s=[K,X,Q,ee,ae,oe,re,le,ce,me,fe,ve,ke,xe,Ve,Fe,b];for(let e of s)t.push(Ue(e));let a=[P,$,E,j,M];for(let e of a)t.push(Xe(e));return t.push({name:"validate-commit-msg",description:"Validate conventional commit format",run:async e=>{let i=e.commitMsgFile??e._args?.[0]??".git/COMMIT_EDITMSG",{runtime:n}=await import("./mod-WYRORC72.js"),l;try{l=await n.fs.readTextFile(i)}catch{return{name:"validate-commit-msg",passed:!1,issues:[{message:`cannot read commit message file: ${i}`}],mutations:[],stats:{}}}let d=Ce(l,{allowAsterisk:e.allowAsterisk,allowMultipleScopes:e.allowMultipleScopes,forceScope:e.forceScope,types:e.types});return{name:"validate-commit-msg",passed:d.valid,issues:d.issues.map(c=>({message:c})),mutations:[],stats:{}}}}),t};var Qe=async(t={})=>{let s=t.root??F.process.cwd(),e=(await C(s))?.stack??[],i=[...t.skip??[]],n=t.only??[],l=N(),d=[],c=[],V=[];for(let p of l){if(n.length>0&&!n.includes(p.name))continue;if(i.includes(p.name)){V.push(p.name);continue}if(p.requiredStacks.length>0&&e.length>0&&!p.requiredStacks.some(w=>e.includes(w))){c.push({name:p.name,reason:`Requires '${p.requiredStacks.join("' or '")}' stack`});continue}let S={...t.fix!==void 0?{fix:t.fix}:{}},m=await p.validate({root:s,options:S});d.push(m)}return{passed:d.every(p=>p.passed),results:d,skipped:c,disabled:V}},Ot=async t=>{let s=O(t??F.process.args,{string:["root","only","skip"],boolean:["fix","help"],alias:{h:"help"}});if(s.help)return console.log("Usage: deno run --allow-all ./validation/mod.ts [options]"),console.log(),console.log("Options:"),console.log(" --root <dir> Root directory (default: cwd)"),console.log(" --only <validators> Run only specific validators (comma-separated)"),console.log(" --skip <validators> Skip specific validators (comma-separated)"),console.log(" --fix Auto-fix issues where supported"),console.log(" -h, --help Show this help message"),T(void 0);let a=z.ansi(),e=W({renderer:a,sink:J.stdout()}),i=s.root,n=s.fix,l=s.only,d=s.skip,c=l!==void 0?l.split(",").map(r=>r.trim()):void 0,V=d!==void 0?d.split(",").map(r=>r.trim()):void 0,S=(await C(i??"."))?.stack?.join(", ")??"all (no .manifest.yml)";e.writeln(g(`Validating codebase...
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as Fe,c as Re}from"./chunk-H4SPMUT6.js";import{a as Pe}from"./chunk-K7MYEXOS.js";import{a as $e}from"./chunk-VC6ERZSI.js";import{a as ve,c as ye}from"./chunk-ER4ZWF4Y.js";import{a as ke,c as he}from"./chunk-7NUMDHE2.js";import{a as xe,c as be}from"./chunk-3QIPK7NI.js";import{a as Ve,c as we}from"./chunk-32HV3K27.js";import{a as Ce}from"./chunk-EBCQCAQ7.js";import{a as Se}from"./chunk-3KCPUYLZ.js";import{a as De}from"./chunk-5PNGVDLV.js";import{a as Te}from"./chunk-CLL3YG4W.js";import"./chunk-AGRTWPDI.js";import{a as ee,c as te}from"./chunk-CKNA5LIK.js";import{a as ae,c as se}from"./chunk-5MWX3POX.js";import{a as oe,c as ie}from"./chunk-QOX7VSID.js";import{a as re,c as ne}from"./chunk-FORPNESQ.js";import{a as le,c as de}from"./chunk-HVOPUZOM.js";import{a as ce,c as pe}from"./chunk-HYT26FYU.js";import{a as me,c as ue}from"./chunk-K6H7JTIH.js";import{a as fe,c as ge}from"./chunk-N2VBT43E.js";import{a as K,c as U}from"./chunk-BCPCQHDL.js";import{a as X,c as H}from"./chunk-YQVWAWMO.js";import{a as Q,c as Z}from"./chunk-NP723K5L.js";import{a as G}from"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import{b as B,c as Y}from"./chunk-W3RVRCUB.js";import"./chunk-4SYC4WJV.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import"./chunk-2VEVVX6U.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import{b as _}from"./chunk-NBA6EFWU.js";import"./chunk-3BEX5FYF.js";import{f as W,h as J,k as z}from"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import{b as g,d as y,f as x,g as R,h as L,k as q}from"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import{a as O}from"./chunk-MG65QJY6.js";import{a as T,b as A}from"./chunk-A6RDYP6R.js";import{t as F}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var C=async t=>{let s=await B(t);return s===null?null:s},Me=async t=>await Y(t);var P={name:"validate-circular-deps",description:"Detect circular package dependencies",requiredStacks:[],async validate(t){let s=await De({root:t.root});return{name:"validate-circular-deps",passed:!s.hasCycles,issues:s.cycles.map(a=>({severity:"error",message:`Circular dependency: ${a.join(" \u2192 ")}`})),stats:{packagesChecked:s.packagesChecked}}}};var $={name:"validate-mod-exports",description:"Validate mod.ts exports all files",requiredStacks:["javascript"],async validate(t){let s=await Pe({root:t.root});return{name:"validate-mod-exports",passed:s.isComplete,issues:s.missingExports.map(a=>({severity:"error",message:`Missing export in ${a.packageName}: ${a.file}`,file:a.file})),stats:{packagesChecked:s.packagesChecked}}}};var E={name:"validate-export-names",description:"Validate export naming conventions",requiredStacks:["javascript"],async validate(t){let s=await Te({root:t.root});return{name:"validate-export-names",passed:s.isValid,issues:s.violations.map(a=>({severity:"error",message:`${a.packageName}: "${a.exportPath}" should be "${a.suggestion}"`})),stats:{packagesChecked:s.packagesChecked}}}};var j={name:"validate-docs",description:"Validate JSDoc documentation",requiredStacks:["javascript"],async validate(t){let s=t.options?.requireExamples,a=await Se({root:t.root,requireExamples:s});return{name:"validate-docs",passed:a.isValid,issues:a.issues.map(e=>({severity:"error",message:`${e.symbol}: ${e.issue}`,file:e.file,line:e.line})),stats:{filesChecked:a.filesChecked,symbolsChecked:a.symbolsChecked}}}};var M={name:"validate-package-configs",description:"Validate deno.json/package.json consistency",requiredStacks:["javascript"],async validate(t){let s=await $e({root:t.root}),a=[];for(let e of s.inconsistencies)a.push({severity:"error",message:`${e.packageName}: ${e.field} mismatch - deno.json: ${JSON.stringify(e.denoValue)}, package.json: ${JSON.stringify(e.packageValue)}`});for(let e of s.dependencyInconsistencies){let i=`${e.packageName}: ${e.dependencyName} - ${e.issue}`;e.expected!==void 0&&e.actual!==void 0&&(i+=` (expected: ${e.expected}, actual: ${e.actual})`),a.push({severity:"error",message:i})}return{name:"validate-package-configs",passed:s.isConsistent,issues:a,stats:{packagesChecked:s.packagesChecked}}}};var qe=[{pattern:/\bDeno\.cwd\(\)/,replacement:"runtime.process.cwd()"},{pattern:/\bDeno\.env\.get\b/,replacement:"runtime.env.get()"},{pattern:/\bDeno\.env\.set\b/,replacement:"runtime.env.set()"},{pattern:/\bDeno\.env\.delete\b/,replacement:"runtime.env.delete()"},{pattern:/\bDeno\.env\.has\b/,replacement:"runtime.env.has()"},{pattern:/\bDeno\.env\.toObject\b/,replacement:"runtime.env.toObject()"},{pattern:/\bDeno\.readTextFile\b/,replacement:"runtime.fs.readTextFile()"},{pattern:/\bDeno\.readFile\b/,replacement:"runtime.fs.readFile()"},{pattern:/\bDeno\.writeTextFile\b/,replacement:"runtime.fs.writeTextFile()"},{pattern:/\bDeno\.writeFile\b/,replacement:"runtime.fs.writeFile()"},{pattern:/\bDeno\.mkdir\b/,replacement:"runtime.fs.mkdir()"},{pattern:/\bDeno\.remove\b/,replacement:"runtime.fs.remove()"},{pattern:/\bDeno\.stat\b/,replacement:"runtime.fs.stat()"},{pattern:/\bDeno\.lstat\b/,replacement:"runtime.fs.lstat()"},{pattern:/\bDeno\.readDir\b/,replacement:"runtime.fs.readDir()"},{pattern:/\bDeno\.copyFile\b/,replacement:"runtime.fs.copyFile()"},{pattern:/\bDeno\.rename\b/,replacement:"runtime.fs.rename()"},{pattern:/\bDeno\.open\b/,replacement:"runtime.fs (or @eser/streams)"},{pattern:/\bDeno\.exit\b/,replacement:"runtime.process.exit()"},{pattern:/\bnew Deno\.Command\b/,replacement:"runtime.exec.spawn() (or @eser/shell/exec)"},{pattern:/\bDeno\.args\b/,replacement:"runtime.process.args"}],We=[],Je=t=>We.some(s=>s.test(t)),ze=(t,s)=>{let a=t.slice(0,s);return a.includes("//")||a.includes("/*")&&!a.includes("*/")},_e=(t,s)=>{let a=!1,e=!1,i=!1;for(let n=0;n<s;n++){let l=t[n];(n>0?t[n-1]:"")!=="\\"&&(l==="'"&&!e&&!i&&(a=!a),l==='"'&&!a&&!i&&(e=!e),l==="`"&&!a&&!e&&(i=!i))}return a||e||i},b=G({name:"validate-runtime-js-apis",description:"Detect direct usage of runtime-specific APIs (use @eser/standards/cross-runtime instead)",canFix:!1,stacks:["javascript"],defaults:{},extensions:_,checkFile(t,s){if(s===void 0)return[];if(Je(t.path))return[];let a=[],e=s.split(`
3
+ `);for(let i=0;i<e.length;i++){let n=e[i];for(let{pattern:l,replacement:d}of qe){let c=l.exec(n);c!==null&&(ze(n,c.index)||_e(n,c.index)||a.push({path:t.path,line:i+1,message:`direct Deno API usage: ${c[0]} \u2014 use @eser/standards/cross-runtime (${d})`}))}}return a}}),ct=b.run,Ee=b.validator,pt=b.main;var k={validators:new Map,initialized:!1},Ye=()=>{o(P),o($),o(E),o(j),o(M),o(U),o(H),o(Z),o(te),o(se),o(ie),o(ne),o(de),o(pe),o(ue),o(ge),o(ye),o(he),o(be),o(we),o(Re),o(Ee)},I=()=>{k.initialized||(k.initialized=!0,Ye())},o=t=>{k.validators.set(t.name,t)},Ge=t=>(I(),k.validators.get(t)??null),N=()=>(I(),[...k.validators.values()]),Ke=()=>(I(),[...k.validators.keys()]),Ue=t=>({name:t.config.name,description:t.config.description,run:async s=>{let a=await t.run(s);return{name:a.name,passed:a.issues.length===0,issues:a.issues.map(e=>({path:e.path,line:e.line,message:e.message,fixed:e.fixed})),mutations:a.mutations.map(e=>({path:e.path,oldContent:e.oldContent,newContent:e.newContent})),stats:{filesChecked:a.filesChecked,issuesFound:a.issues.length}}}}),Xe=t=>({name:t.name,description:t.description,run:async s=>{let a=await t.validate({root:s.root??".",options:s});return{name:a.name,passed:a.passed,issues:a.issues.map(e=>({path:e.file,line:e.line,message:e.message})),mutations:[],stats:a.stats}}}),He=()=>{let t=[],s=[K,X,Q,ee,ae,oe,re,le,ce,me,fe,ve,ke,xe,Ve,Fe,b];for(let e of s)t.push(Ue(e));let a=[P,$,E,j,M];for(let e of a)t.push(Xe(e));return t.push({name:"validate-commit-msg",description:"Validate conventional commit format",run:async e=>{let i=e.commitMsgFile??e._args?.[0]??".git/COMMIT_EDITMSG",{runtime:n}=await import("./mod-MLRQFSBE.js"),l;try{l=await n.fs.readTextFile(i)}catch{return{name:"validate-commit-msg",passed:!1,issues:[{message:`cannot read commit message file: ${i}`}],mutations:[],stats:{}}}let d=Ce(l,{allowAsterisk:e.allowAsterisk,allowMultipleScopes:e.allowMultipleScopes,forceScope:e.forceScope,types:e.types});return{name:"validate-commit-msg",passed:d.valid,issues:d.issues.map(c=>({message:c})),mutations:[],stats:{}}}}),t};var Qe=async(t={})=>{let s=t.root??F.process.cwd(),e=(await C(s))?.stack??[],i=[...t.skip??[]],n=t.only??[],l=N(),d=[],c=[],V=[];for(let p of l){if(n.length>0&&!n.includes(p.name))continue;if(i.includes(p.name)){V.push(p.name);continue}if(p.requiredStacks.length>0&&e.length>0&&!p.requiredStacks.some(w=>e.includes(w))){c.push({name:p.name,reason:`Requires '${p.requiredStacks.join("' or '")}' stack`});continue}let S={...t.fix!==void 0?{fix:t.fix}:{}},m=await p.validate({root:s,options:S});d.push(m)}return{passed:d.every(p=>p.passed),results:d,skipped:c,disabled:V}},Ot=async t=>{let s=O(t??F.process.args,{string:["root","only","skip"],boolean:["fix","help"],alias:{h:"help"}});if(s.help)return console.log("Usage: deno run --allow-all ./validation/mod.ts [options]"),console.log(),console.log("Options:"),console.log(" --root <dir> Root directory (default: cwd)"),console.log(" --only <validators> Run only specific validators (comma-separated)"),console.log(" --skip <validators> Skip specific validators (comma-separated)"),console.log(" --fix Auto-fix issues where supported"),console.log(" -h, --help Show this help message"),T(void 0);let a=z.ansi(),e=W({renderer:a,sink:J.stdout()}),i=s.root,n=s.fix,l=s.only,d=s.skip,c=l!==void 0?l.split(",").map(r=>r.trim()):void 0,V=d!==void 0?d.split(",").map(r=>r.trim()):void 0,S=(await C(i??"."))?.stack?.join(", ")??"all (no .eser/manifest.yml)";e.writeln(g(`Validating codebase...
3
4
  `)),e.writeln(g("Stack: "),q(S),g(`
4
5
  `));let m=await Qe({root:i,only:c,skip:V,fix:n});for(let r of m.results){let u=r.passed?R("PASS"):x("FAIL"),v=Object.entries(r.stats).map(([f,D])=>`${D} ${f}`).join(", ");e.writeln(g(` ${r.name.padEnd(18)} `),u,g(` (${v})`))}if(m.skipped.length>0){e.writeln(y(`
5
6
  Skipped (stack not configured):`));for(let r of m.skipped)e.writeln(y(` - ${r.name}: ${r.reason}`))}if(m.disabled.length>0){e.writeln(y(`
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as G,b as v}from"./chunk-Q2KSOC32.js";import{a as P,b as g}from"./chunk-B5IPHVXT.js";import{a as S,b as J}from"./chunk-Y53YTL4C.js";import{a as K,b as V}from"./chunk-536RBSFU.js";import{a as h,b as O,c as k,d as R,e as B,f as E}from"./chunk-TDQRRGDJ.js";import"./chunk-BNQAZLIQ.js";import{a as f,b as u}from"./chunk-4WQGB7NO.js";import{a as A,b as C}from"./chunk-KQE6FMKW.js";import{a as M,b as w}from"./chunk-MXGRYONZ.js";import{a as I,b as T}from"./chunk-YVIGHK4H.js";import{a as l,b as m,c as s,d,e as y,f as F,g as x}from"./chunk-455V3AE5.js";import"./chunk-J7YTWK67.js";import"./chunk-PVPMHMKP.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var o=null,b=async()=>{if(o!==null)return o;let{anthropicFactory:e}=await import("./anthropic-2MXDKLNX.js"),{openaiFactory:r}=await import("./openai-EU5TJZ5T.js"),{geminiFactory:t}=await import("./gemini-F4KLO5VU.js"),{vertexaiFactory:a}=await import("./vertexai-EXTYPVHK.js"),{claudeCodeFactory:i}=await import("./claude-code-VUBEU7RR.js"),{ollamaFactory:c}=await import("./ollama-36F5QAOO.js"),{openCodeFactory:n}=await import("./opencode-7J3JDC44.js"),{kiroFactory:p}=await import("./kiro-HQLXD6ZU.js");return o=[e,r,t,a,i,c,n,p],o};export{G as AnthropicModel,f as ClaudeCodeModel,S as GeminiModel,I as KiroModel,A as OllamaModel,P as OpenAIModel,M as OpenCodeModel,K as VertexAIModel,v as anthropicFactory,y as captureStderr,F as classifyExitCode,E as classifyGenAIError,u as claudeCodeFactory,b as defaultFactories,x as formatMessagesAsText,J as geminiFactory,T as kiroFactory,O as mapContentBlockToGenAIPart,B as mapGenAIResponseToResult,k as mapMessagesToGenAI,h as mapRoleToGenAI,R as mapToolsToGenAI,C as ollamaFactory,w as openCodeFactory,g as openaiFactory,s as parseJsonlStream,d as parseTextOutput,l as resolveBinary,m as spawnCliProcess,V as vertexaiFactory};
@@ -1,4 +1,5 @@
1
- import{a as b,b as D}from"./chunk-NLNSK3KE.js";import{e as C}from"./chunk-Q54LOR4S.js";import{a as A,d as E}from"./chunk-NUSNMQPL.js";import{f as y}from"./chunk-5AK4OGCO.js";import{f as k,h as R,k as $}from"./chunk-TTYO2XJO.js";import{d as m,e as w,f as h,j as v}from"./chunk-PLJNPQFC.js";import{a as P}from"./chunk-HPPFA3XU.js";import{a as g,b as p,c as j}from"./chunk-DQAEQEXD.js";import{t as N}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var S=r=>A(async t=>{try{let s=await y(r.registrySource,{local:r.local}),a=s.recipes.filter(n=>n.scale==="project"),o=a.find(n=>n.name===r.templateName);if(o===void 0)return p({_tag:"TemplateNotFound",message:`Template '${r.templateName}' not found. Available: ${a.map(n=>n.name).join(", ")}`});await N.fs.mkdir(r.targetDir,{recursive:!0});let f={project_name:r.projectName,...r.variables},e=await C(o,{cwd:r.targetDir,registryUrl:s.registryUrl,force:!0,variables:f}),u=await b(r.targetDir),d=D(o,u);t.out.writeln(h(`\u2713 Created ${r.projectName} with ${e.written.length} file(s)`));for(let n of e.written)t.out.writeln(` \u2192 ${n}`);if(d.instructions.length>0){t.out.writeln(m(`
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as b,b as D}from"./chunk-SOBOSRJB.js";import{e as C}from"./chunk-I4C675WP.js";import{a as A,d as E}from"./chunk-3BEX5FYF.js";import{k as y}from"./chunk-UJ6LH5FY.js";import{f as k,h as R,k as $}from"./chunk-GBM3TZFD.js";import{d as m,f as w,g as h,k as v}from"./chunk-3SXTMY75.js";import{a as P}from"./chunk-MG65QJY6.js";import{a as g,b as p,c as j}from"./chunk-A6RDYP6R.js";import{t as N}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var S=r=>A(async t=>{try{let s=await y(r.registrySource,{local:r.local}),a=s.recipes.filter(n=>n.scale==="project"),o=a.find(n=>n.name===r.templateName);if(o===void 0)return p({_tag:"TemplateNotFound",message:`Template '${r.templateName}' not found. Available: ${a.map(n=>n.name).join(", ")}`});await N.fs.mkdir(r.targetDir,{recursive:!0});let f={project_name:r.projectName,...r.variables},e=await C(o,{cwd:r.targetDir,registryUrl:s.registryUrl,force:!0,variables:f}),u=await b(r.targetDir),d=D(o,u);t.out.writeln(h(`\u2713 Created ${r.projectName} with ${e.written.length} file(s)`));for(let n of e.written)t.out.writeln(` \u2192 ${n}`);if(d.instructions.length>0){t.out.writeln(m(`
2
3
  Next steps:`)),t.out.writeln(m(` cd ${r.projectName}`));for(let n of d.instructions)t.out.writeln(m(` ${n}`))}return g({template:o,result:e,depInfo:d})}catch(s){let a=s instanceof Error?s.message:String(s);return p({_tag:"ApplyError",message:a})}});var B=async r=>{let t=P(r??[],{string:["name","registry","var"],boolean:["local"],collect:["var"]}),s=t._[0],a=t.name??s,o=t.registry,f=t.local===!0,e=k({renderer:$.ansi(),sink:R.stdout()}),u={};for(let c of t.var){let[i,...l]=String(c).split("=");i!==void 0&&i!==""&&(u[i]=l.join("="))}if(s===void 0){try{let i=(await y(o,{local:f})).recipes.filter(l=>l.scale==="project");e.writeln("Usage: eser kit new <template> [--name <project-name>] [--var key=value]"),e.writeln(),e.writeln("Available project templates:"),e.writeln();for(let l of i)e.writeln(` ${l.name.padEnd(20)} ${l.description} `,m(`[${l.language}]`))}catch(c){let i=c instanceof Error?c.message:String(c);e.writeln(w(`Error: ${i}`))}return await e.close(),g(void 0)}if(a===void 0)return e.writeln(w("Project name is required.")),await e.close(),p({exitCode:1});e.writeln(v(`
3
4
  Creating ${a} from ${s}...
4
5
  `));let d=`${Deno.cwd()}/${a}`,n=await E(S({templateName:s,projectName:a,targetDir:d,registrySource:o,local:f,variables:u}),{out:e});return await e.close(),j(n)?g(void 0):p({exitCode:1})};export{B as main};
@@ -0,0 +1,4 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as _}from"./chunk-XVSIRN6G.js";import{a as B,b as H,c as Q,d as z}from"./chunk-P74JF7XR.js";import{a as A}from"./chunk-2TP6IMXY.js";import{a as v}from"./chunk-IDMI5OBK.js";import{a as P}from"./chunk-F5BPXG5L.js";import{b as L,c as N,d as V}from"./chunk-OX6ZNNUB.js";import"./chunk-U2MR2O3C.js";import{a as j,c as b,d as G,f as J,h as W}from"./chunk-UESOCN2G.js";import{a as q,b as M,d as x}from"./chunk-2EVWKUN6.js";import{a as U}from"./chunk-LNNNLUZT.js";import{c as O,d as E,j as I,n as $,p as y,q as T}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{a as F,b as D}from"./chunk-A6RDYP6R.js";import{t as h}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var Z=o=>o.split(`
3
+ `).map(e=>e.replace(/^[-*]\s+/,"").trim()).filter(e=>e.length>0&&!e.startsWith("#")),ee=async(o,e)=>{let i=[],n=(e.startsWith(o)?e.slice(o.length+1):e).split("/");n.pop();for(let t=n.length;t>=0;t--){let r=`${t===0?o:`${o}/${n.slice(0,t).join("/")}`}/.folder-rules.md`,c=t===0?".":n.slice(0,t).join("/");try{let p=await h.fs.readTextFile(r),g=Z(p);for(let f of g)i.push({folder:c,rule:f})}catch{}}return i},k=async(o,e)=>{let i=new Set,a=[];for(let n of e){let t=await ee(o,n);for(let s of t){let r=`${s.folder}::${s.rule}`;i.has(r)||(i.add(r),a.push(s))}}return a};var ye=async o=>{let e=h.process.cwd(),i=q(o),a=M(o);if(!await T(e)){let l=await I(e);return await x({error:`noskills not initialized. Run: ${U("init",l)}`},i),D({exitCode:1})}let n=null;for(let l of a)l.startsWith("--answer=")&&(n=l.slice(9));let t=await E(e),s=await I(e);if(t.pendingClear&&(t={...t,pendingClear:!1},await y(e,t)),s===null)return await x({error:"No config found"},i),D({exitCode:1});let c=(await $(e)).filter(l=>s.concerns.includes(l.id));if(n!==null){let l=await se(e,t,s,c,n);await y(e,l);let u={...l,lastCalledAt:new Date().toISOString()};await y(e,u);let m=await P(e),d=u.spec!==null?await v(e,u.spec):null,R=await K(e,u),X=await k(e,R),Y=A(u,c,m,s,d,X);return await x(Y,i),F(void 0)}let p={...t,lastCalledAt:new Date().toISOString()};await y(e,p);let g=await P(e),f=p.spec!==null?await v(e,p.spec):null,w=await K(e,p),C=await k(e,w),S=A(p,c,g,s,f,C);return await x(S,i),F(void 0)},se=async(o,e,i,a,n)=>{switch(e.phase){case"DISCOVERY":{let t=null;try{let r=JSON.parse(n);typeof r=="object"&&r!==null&&!Array.isArray(r)&&(t=r)}catch{}let s=e;if(t!==null)for(let[r,c]of Object.entries(t))typeof c=="string"&&c.length>0&&(s=b(s,r,c));else{let r=L(a),c=N(r,s.discovery.answers);if(c===null)return e;s=b(s,c.id,n)}return V(s.discovery.answers)&&(s=G(s)),s}case"SPEC_DRAFT":{if(e.classification===null){let t;try{let r=JSON.parse(n);t={involvesUI:r.involvesUI===!0,involvesPublicAPI:r.involvesPublicAPI===!0,involvesMigration:r.involvesMigration===!0,involvesDataHandling:r.involvesDataHandling===!0}}catch{t={involvesUI:!1,involvesPublicAPI:!1,involvesMigration:!1,involvesDataHandling:!1}}let s={...e,classification:t};try{await _(o,s,a)}catch{}return s}return e}case"SPEC_APPROVED":{let t=J(e);return t.spec!==null&&(await B(o,t.spec,"executing"),await z(o,t.spec,"executing")),t}case"EXECUTING":{if(!e.execution.awaitingStatusReport){let t={...e,execution:{...e.execution,lastProgress:n}};if(i.verifyCommand!==null&&i.verifyCommand!==void 0&&i.verifyCommand.length>0){let s=await ie(o,i.verifyCommand);if(t={...t,execution:{...t.execution,lastVerification:s}},!s.passed)return t}return t={...t,execution:{...t.execution,awaitingStatusReport:!0}},t}return await ne(o,e,n,a)}case"BLOCKED":{let t=e.execution.lastProgress??"Unknown",s={id:`d${e.decisions.length+1}`,question:t.replace(/^BLOCKED:\s*/,""),choice:n,promoted:!1,timestamp:new Date().toISOString()},r=W(e,s);return r=j(r,"EXECUTING"),r={...r,execution:{...r.execution,lastProgress:`Resolved: ${n}`}},r}default:return e}},ne=async(o,e,i,a)=>{let n;try{n=JSON.parse(i)}catch{return{...e,execution:{...e.execution,lastProgress:i,awaitingStatusReport:!1}}}let t=n.completed??[],s=n.remaining??[],r=n.blocked??[],c=[...s,...r],p=e.execution.debt?.unaddressedIterations??0,g=c.length>0?{items:c,fromIteration:e.execution.iteration,unaddressedIterations:1}:null,f=g;if(e.execution.debt!==null&&g!==null){let l=new Set(t.map(d=>d.toLowerCase().trim())),u=e.execution.debt.items.filter(d=>!l.has(d.toLowerCase().trim())),m=[...new Set([...u,...c])];f=m.length>0?{items:m,fromIteration:e.execution.debt.fromIteration,unaddressedIterations:u.length>0?p+1:1}:null}else if(e.execution.debt!==null&&g===null){let l=new Set(t.map(m=>m.toLowerCase().trim())),u=e.execution.debt.items.filter(m=>!l.has(m.toLowerCase().trim()));f=u.length>0?{items:u,fromIteration:e.execution.debt.fromIteration,unaddressedIterations:p+1}:null}let w=t.length>0?`Completed: ${t.join(", ")}`:"Status report submitted",C=e.execution.lastVerification===null||e.execution.lastVerification.passed===!0,S=f===null&&C;if(S&&e.spec!==null){let l=await v(o,e.spec);if(l!==null){let u=e.execution.completedTasks??[],m=new Set(u),d=l.tasks.find(R=>!m.has(R.id));if(d!==void 0)return await H(o,e.spec,d.id),await Q(o,e.spec,d.id,"done"),{...e,pendingClear:!0,execution:{...e.execution,lastProgress:`Task ${d.id} accepted: ${w}`,awaitingStatusReport:!1,debt:f,completedTasks:[...u,d.id]}}}}return{...e,pendingClear:S,execution:{...e.execution,lastProgress:S?w:`Task not accepted \u2014 remaining items must be addressed first. ${w}`,awaitingStatusReport:!1,debt:f}}},ie=async(o,e)=>{try{let{execSync:i}=await import("node:child_process"),a=i(e,{cwd:o,encoding:"utf-8",timeout:6e4,stdio:["pipe","pipe","pipe"]});return{passed:!0,output:String(a).slice(0,4e3),timestamp:new Date().toISOString()}}catch(i){let a=i,n=((a.stdout??"")+(a.stderr??"")).slice(0,4e3);return a.status!==void 0?{passed:!1,output:n||"Verification failed with no output",timestamp:new Date().toISOString()}:{passed:!1,output:`Verification command failed to execute: ${i instanceof Error?i.message:String(i)}`,timestamp:new Date().toISOString()}}},K=async(o,e)=>{let i=[...e.execution.modifiedFiles??[]],a=await re(o);return[...new Set([...i,...a])]},re=async o=>{let e=`${o}/${O.stateDir}/files-changed.jsonl`;try{let a=(await h.fs.readTextFile(e)).trim().split(`
4
+ `).filter(Boolean),n=[];for(let t of a)try{let s=JSON.parse(t);n.includes(s.file)||n.push(s.file)}catch{}return n}catch{return[]}};export{ye as main};
@@ -1,4 +1,5 @@
1
- import{a as Nh,b as kh}from"./chunk-AK3OJD4W.js";import{a as U,b as me,c as M,d as Rh,f as Ph}from"./chunk-DXB73IDG.js";var mo=M((WS,dl)=>{"use strict";var Er=Object.prototype.hasOwnProperty,fl=Object.prototype.toString,ol=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,al=function(e){return typeof Array.isArray=="function"?Array.isArray(e):fl.call(e)==="[object Array]"},ll=function(e){if(!e||fl.call(e)!=="[object Object]")return!1;var t=Er.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Er.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!r)return!1;var i;for(i in e);return typeof i>"u"||Er.call(e,i)},cl=function(e,t){ol&&t.name==="__proto__"?ol(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ul=function(e,t){if(t==="__proto__")if(Er.call(e,t)){if(sl)return sl(e,t).value}else return;return e[t]};dl.exports=function n(){var e,t,r,i,o,s,c=arguments[0],f=1,u=arguments.length,d=!1;for(typeof c=="boolean"&&(d=c,c=arguments[1]||{},f=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});f<u;++f)if(e=arguments[f],e!=null)for(t in e)r=ul(c,t),i=ul(e,t),c!==i&&(d&&i&&(ll(i)||(o=al(i)))?(o?(o=!1,s=r&&al(r)?r:[]):s=r&&ll(r)?r:{},cl(c,{name:t,newValue:n(d,s,i)})):typeof i<"u"&&cl(c,{name:t,newValue:i}));return c}});var pl=M((JS,hl)=>{"use strict";var Xe=n=>n!==null&&typeof n=="object"&&typeof n.pipe=="function";Xe.writable=n=>Xe(n)&&n.writable!==!1&&typeof n._write=="function"&&typeof n._writableState=="object";Xe.readable=n=>Xe(n)&&n.readable!==!1&&typeof n._read=="function"&&typeof n._readableState=="object";Xe.duplex=n=>Xe.writable(n)&&Xe.readable(n);Xe.transform=n=>Xe.duplex(n)&&typeof n._transform=="function";hl.exports=Xe});var gl=M((KS,bh)=>{bh.exports={name:"gaxios",version:"6.7.1",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/src/index.js",types:"build/src/index.d.ts",files:["build/src"],scripts:{lint:"gts check",test:"c8 mocha build/test","presystem-test":"npm run compile","system-test":"mocha build/system-test --timeout 80000",compile:"tsc -p .",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"compodoc src/","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean",precompile:"gts clean"},repository:"googleapis/gaxios",keywords:["google"],engines:{node:">=14"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@compodoc/compodoc":"1.1.19","@types/cors":"^2.8.6","@types/express":"^4.16.1","@types/extend":"^3.0.1","@types/mocha":"^9.0.0","@types/multiparty":"0.0.36","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.0.0","@types/node-fetch":"^2.5.7","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^10.0.0","abort-controller":"^3.0.0",assert:"^2.0.0",browserify:"^17.0.0",c8:"^8.0.0",cheerio:"1.0.0-rc.10",cors:"^2.8.5",execa:"^5.0.0",express:"^4.16.4","form-data":"^4.0.0",gts:"^5.0.0","is-docker":"^2.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0",linkinator:"^3.0.0",mocha:"^8.0.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^13.0.0","null-loader":"^4.0.0",puppeteer:"^19.0.0",sinon:"^18.0.0","stream-browserify":"^3.0.0",tmp:"0.2.3","ts-loader":"^8.0.0",typescript:"^5.1.6",webpack:"^5.35.0","webpack-cli":"^4.0.0"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","is-stream":"^2.0.0","node-fetch":"^2.6.9",uuid:"^9.0.1"}}});var ml=M(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.pkg=void 0;vr.pkg=gl()});var Eo=M(Ne=>{"use strict";var Mh=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},yl;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.GaxiosError=Ne.GAXIOS_ERROR_SYMBOL=void 0;Ne.defaultErrorRedactor=El;var Oh=U("url"),yo=ml(),_l=Mh(mo());Ne.GAXIOS_ERROR_SYMBOL=Symbol.for(`${yo.pkg.name}-gaxios-error`);var _o=class n extends Error{static[(yl=Ne.GAXIOS_ERROR_SYMBOL,Symbol.hasInstance)](e){return e&&typeof e=="object"&&Ne.GAXIOS_ERROR_SYMBOL in e&&e[Ne.GAXIOS_ERROR_SYMBOL]===yo.pkg.version?!0:Function.prototype[Symbol.hasInstance].call(n,e)}constructor(e,t,r,i){var o;if(super(e),this.config=t,this.response=r,this.error=i,this[yl]=yo.pkg.version,this.config=(0,_l.default)(!0,{},t),this.response&&(this.response.config=(0,_l.default)(!0,{},this.response.config)),this.response){try{this.response.data=Dh(this.config.responseType,(o=this.response)===null||o===void 0?void 0:o.data)}catch{}this.status=this.response.status}i&&"code"in i&&i.code&&(this.code=i.code),t.errorRedactor&&t.errorRedactor({config:this.config,response:this.response})}};Ne.GaxiosError=_o;function Dh(n,e){switch(n){case"stream":return e;case"json":return JSON.parse(JSON.stringify(e));case"arraybuffer":return JSON.parse(Buffer.from(e).toString("utf8"));case"blob":return JSON.parse(e.text());default:return e}}function El(n){let e="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function t(o){if(o)for(let s of Object.keys(o))/^authentication$/i.test(s)&&(o[s]=e),/^authorization$/i.test(s)&&(o[s]=e),/secret/i.test(s)&&(o[s]=e)}function r(o,s){if(typeof o=="object"&&o!==null&&typeof o[s]=="string"){let c=o[s];(/grant_type=/i.test(c)||/assertion=/i.test(c)||/secret/i.test(c))&&(o[s]=e)}}function i(o){typeof o=="object"&&o!==null&&("grant_type"in o&&(o.grant_type=e),"assertion"in o&&(o.assertion=e),"client_secret"in o&&(o.client_secret=e))}if(n.config){t(n.config.headers),r(n.config,"data"),i(n.config.data),r(n.config,"body"),i(n.config.body);try{let o=new Oh.URL("",n.config.url);o.searchParams.has("token")&&o.searchParams.set("token",e),o.searchParams.has("client_secret")&&o.searchParams.set("client_secret",e),n.config.url=o.toString()}catch{}}return n.response&&(El({config:n.response.config}),t(n.response.headers),r(n.response,"data"),i(n.response.data)),n}});var Tl=M(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.getRetryConfig=Uh;async function Uh(n){let e=vl(n);if(!n||!n.config||!e&&!n.config.retry)return{shouldRetry:!1};e=e||{},e.currentRetryAttempt=e.currentRetryAttempt||0,e.retry=e.retry===void 0||e.retry===null?3:e.retry,e.httpMethodsToRetry=e.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],e.noResponseRetries=e.noResponseRetries===void 0||e.noResponseRetries===null?2:e.noResponseRetries,e.retryDelayMultiplier=e.retryDelayMultiplier?e.retryDelayMultiplier:2,e.timeOfFirstRequest=e.timeOfFirstRequest?e.timeOfFirstRequest:Date.now(),e.totalTimeout=e.totalTimeout?e.totalTimeout:Number.MAX_SAFE_INTEGER,e.maxRetryDelay=e.maxRetryDelay?e.maxRetryDelay:Number.MAX_SAFE_INTEGER;let t=[[100,199],[408,408],[429,429],[500,599]];if(e.statusCodesToRetry=e.statusCodesToRetry||t,n.config.retryConfig=e,!await(e.shouldRetry||Fh)(n))return{shouldRetry:!1,config:n.config};let i=Lh(e);n.config.retryConfig.currentRetryAttempt+=1;let o=e.retryBackoff?e.retryBackoff(n,i):new Promise(s=>{setTimeout(s,i)});return e.onRetryAttempt&&e.onRetryAttempt(n),await o,{shouldRetry:!0,config:n.config}}function Fh(n){var e;let t=vl(n);if(n.name==="AbortError"||((e=n.error)===null||e===void 0?void 0:e.name)==="AbortError"||!t||t.retry===0||!n.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries||!n.config.method||t.httpMethodsToRetry.indexOf(n.config.method.toUpperCase())<0)return!1;if(n.response&&n.response.status){let r=!1;for(let[i,o]of t.statusCodesToRetry){let s=n.response.status;if(s>=i&&s<=o){r=!0;break}}if(!r)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}function vl(n){if(n&&n.config&&n.config.retryConfig)return n.config.retryConfig}function Lh(n){var e;let r=(n.currentRetryAttempt?0:(e=n.retryDelay)!==null&&e!==void 0?e:100)+(Math.pow(n.retryDelayMultiplier,n.currentRetryAttempt)-1)/2*1e3,i=n.totalTimeout-(Date.now()-n.timeOfFirstRequest);return Math.min(r,i,n.maxRetryDelay)}});import qh from"crypto";function Mn(){return Tr>Cr.length-16&&(qh.randomFillSync(Cr),Tr=0),Cr.slice(Tr,Tr+=16)}var Cr,Tr,To=me(()=>{Cr=new Uint8Array(256),Tr=Cr.length});var Cl,Sl=me(()=>{Cl=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function Gh(n){return typeof n=="string"&&Cl.test(n)}var mt,On=me(()=>{Sl();mt=Gh});function kt(n,e=0){return he[n[e+0]]+he[n[e+1]]+he[n[e+2]]+he[n[e+3]]+"-"+he[n[e+4]]+he[n[e+5]]+"-"+he[n[e+6]]+he[n[e+7]]+"-"+he[n[e+8]]+he[n[e+9]]+"-"+he[n[e+10]]+he[n[e+11]]+he[n[e+12]]+he[n[e+13]]+he[n[e+14]]+he[n[e+15]]}function Bh(n,e=0){let t=kt(n,e);if(!mt(t))throw TypeError("Stringified UUID is invalid");return t}var he,wl,Dn=me(()=>{On();he=[];for(let n=0;n<256;++n)he.push((n+256).toString(16).slice(1));wl=Bh});function Vh(n,e,t){let r=e&&t||0,i=e||new Array(16);n=n||{};let o=n.node||Al,s=n.clockseq!==void 0?n.clockseq:Co;if(o==null||s==null){let g=n.random||(n.rng||Mn)();o==null&&(o=Al=[g[0]|1,g[1],g[2],g[3],g[4],g[5]]),s==null&&(s=Co=(g[6]<<8|g[7])&16383)}let c=n.msecs!==void 0?n.msecs:Date.now(),f=n.nsecs!==void 0?n.nsecs:wo+1,u=c-So+(f-wo)/1e4;if(u<0&&n.clockseq===void 0&&(s=s+1&16383),(u<0||c>So)&&n.nsecs===void 0&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");So=c,wo=f,Co=s,c+=122192928e5;let d=((c&268435455)*1e4+f)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;let h=c/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=h&255,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=s>>>8|128,i[r++]=s&255;for(let g=0;g<6;++g)i[r+g]=o[g];return e||kt(i)}var Al,Co,So,wo,xl,Il=me(()=>{To();Dn();So=0,wo=0;xl=Vh});function Hh(n){if(!mt(n))throw TypeError("Invalid UUID");let e,t=new Uint8Array(16);return t[0]=(e=parseInt(n.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}var Sr,Ao=me(()=>{On();Sr=Hh});function $h(n){n=unescape(encodeURIComponent(n));let e=[];for(let t=0;t<n.length;++t)e.push(n.charCodeAt(t));return e}function Un(n,e,t){function r(i,o,s,c){var f;if(typeof i=="string"&&(i=$h(i)),typeof o=="string"&&(o=Sr(o)),((f=o)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+i.length);if(u.set(o),u.set(i,o.length),u=t(u),u[6]=u[6]&15|e,u[8]=u[8]&63|128,s){c=c||0;for(let d=0;d<16;++d)s[c+d]=u[d];return s}return kt(u)}try{r.name=n}catch{}return r.DNS=Wh,r.URL=Jh,r}var Wh,Jh,xo=me(()=>{Dn();Ao();Wh="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Jh="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});import Kh from"crypto";function Yh(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),Kh.createHash("md5").update(n).digest()}var Rl,Pl=me(()=>{Rl=Yh});var zh,Nl,kl=me(()=>{xo();Pl();zh=Un("v3",48,Rl),Nl=zh});import Xh from"crypto";var Io,bl=me(()=>{Io={randomUUID:Xh.randomUUID}});function jh(n,e,t){if(Io.randomUUID&&!e&&!n)return Io.randomUUID();n=n||{};let r=n.random||(n.rng||Mn)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=r[i];return e}return kt(r)}var Ml,Ol=me(()=>{bl();To();Dn();Ml=jh});import Zh from"crypto";function Qh(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),Zh.createHash("sha1").update(n).digest()}var Dl,Ul=me(()=>{Dl=Qh});var ep,Fl,Ll=me(()=>{xo();Ul();ep=Un("v5",80,Dl),Fl=ep});var ql,Gl=me(()=>{ql="00000000-0000-0000-0000-000000000000"});function tp(n){if(!mt(n))throw TypeError("Invalid UUID");return parseInt(n.slice(14,15),16)}var Bl,Vl=me(()=>{On();Bl=tp});var Hl={};Rh(Hl,{NIL:()=>ql,parse:()=>Sr,stringify:()=>wl,v1:()=>xl,v3:()=>Nl,v4:()=>Ml,v5:()=>Fl,validate:()=>mt,version:()=>Bl});var $l=me(()=>{Il();kl();Ol();Ll();Gl();Vl();On();Dn();Ao()});var Po=M(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.GaxiosInterceptorManager=void 0;var Ro=class extends Set{};wr.GaxiosInterceptorManager=Ro});var No=M((Bw,Wl)=>{function np(n){t.debug=t,t.default=t,t.coerce=f,t.disable=s,t.enable=i,t.enabled=c,t.humanize=kh(),t.destroy=u,Object.keys(n).forEach(d=>{t[d]=n[d]}),t.names=[],t.skips=[],t.formatters={};function e(d){let h=0;for(let g=0;g<d.length;g++)h=(h<<5)-h+d.charCodeAt(g),h|=0;return t.colors[Math.abs(h)%t.colors.length]}t.selectColor=e;function t(d){let h,g=null,v,w;function C(...N){if(!C.enabled)return;let k=C,G=Number(new Date),L=G-(h||G);k.diff=L,k.prev=h,k.curr=G,h=G,N[0]=t.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let q=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(B,J)=>{if(B==="%%")return"%";q++;let Y=t.formatters[J];if(typeof Y=="function"){let D=N[q];B=Y.call(k,D),N.splice(q,1),q--}return B}),t.formatArgs.call(k,N),(k.log||t.log).apply(k,N)}return C.namespace=d,C.useColors=t.useColors(),C.color=t.selectColor(d),C.extend=r,C.destroy=t.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(v!==t.namespaces&&(v=t.namespaces,w=t.enabled(d)),w),set:N=>{g=N}}),typeof t.init=="function"&&t.init(C),C}function r(d,h){let g=t(this.namespace+(typeof h>"u"?":":h)+d);return g.log=this.log,g}function i(d){t.save(d),t.namespaces=d,t.names=[],t.skips=[];let h=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of h)g[0]==="-"?t.skips.push(g.slice(1)):t.names.push(g)}function o(d,h){let g=0,v=0,w=-1,C=0;for(;g<d.length;)if(v<h.length&&(h[v]===d[g]||h[v]==="*"))h[v]==="*"?(w=v,C=g,v++):(g++,v++);else if(w!==-1)v=w+1,C++,g=C;else return!1;for(;v<h.length&&h[v]==="*";)v++;return v===h.length}function s(){let d=[...t.names,...t.skips.map(h=>"-"+h)].join(",");return t.enable(""),d}function c(d){for(let h of t.skips)if(o(d,h))return!1;for(let h of t.names)if(o(d,h))return!0;return!1}function f(d){return d instanceof Error?d.stack||d.message:d}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}Wl.exports=np});var Jl=M((Ce,Ar)=>{Ce.formatArgs=ip;Ce.save=op;Ce.load=sp;Ce.useColors=rp;Ce.storage=ap();Ce.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ce.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function rp(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ip(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+Ar.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;n.splice(1,0,e,"color: inherit");let t=0,r=0;n[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(t++,i==="%c"&&(r=t))}),n.splice(r,0,e)}Ce.log=console.debug||console.log||(()=>{});function op(n){try{n?Ce.storage.setItem("debug",n):Ce.storage.removeItem("debug")}catch{}}function sp(){let n;try{n=Ce.storage.getItem("debug")||Ce.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function ap(){try{return localStorage}catch{}}Ar.exports=No()(Ce);var{formatters:lp}=Ar.exports;lp.j=function(n){try{return JSON.stringify(n)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Yl=M((ce,Ir)=>{var cp=U("tty"),xr=U("util");ce.init=mp;ce.log=hp;ce.formatArgs=fp;ce.save=pp;ce.load=gp;ce.useColors=up;ce.destroy=xr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ce.colors=[6,2,3,4,5,1];try{let n=U("supports-color");n&&(n.stderr||n).level>=2&&(ce.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ce.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),n[t]=r,n},{});function up(){return"colors"in ce.inspectOpts?!!ce.inspectOpts.colors:cp.isatty(process.stderr.fd)}function fp(n){let{namespace:e,useColors:t}=this;if(t){let r=this.color,i="\x1B[3"+(r<8?r:"8;5;"+r),o=` ${i};1m${e} \x1B[0m`;n[0]=o+n[0].split(`
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a as Nh,b as kh}from"./chunk-DAK2I7UC.js";import{a as U,b as me,c as M,d as Rh,f as Ph}from"./chunk-G6NAG2EK.js";var mo=M((WS,dl)=>{"use strict";var Er=Object.prototype.hasOwnProperty,fl=Object.prototype.toString,ol=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,al=function(e){return typeof Array.isArray=="function"?Array.isArray(e):fl.call(e)==="[object Array]"},ll=function(e){if(!e||fl.call(e)!=="[object Object]")return!1;var t=Er.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Er.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!r)return!1;var i;for(i in e);return typeof i>"u"||Er.call(e,i)},cl=function(e,t){ol&&t.name==="__proto__"?ol(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ul=function(e,t){if(t==="__proto__")if(Er.call(e,t)){if(sl)return sl(e,t).value}else return;return e[t]};dl.exports=function n(){var e,t,r,i,o,s,c=arguments[0],f=1,u=arguments.length,d=!1;for(typeof c=="boolean"&&(d=c,c=arguments[1]||{},f=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});f<u;++f)if(e=arguments[f],e!=null)for(t in e)r=ul(c,t),i=ul(e,t),c!==i&&(d&&i&&(ll(i)||(o=al(i)))?(o?(o=!1,s=r&&al(r)?r:[]):s=r&&ll(r)?r:{},cl(c,{name:t,newValue:n(d,s,i)})):typeof i<"u"&&cl(c,{name:t,newValue:i}));return c}});var pl=M((JS,hl)=>{"use strict";var Xe=n=>n!==null&&typeof n=="object"&&typeof n.pipe=="function";Xe.writable=n=>Xe(n)&&n.writable!==!1&&typeof n._write=="function"&&typeof n._writableState=="object";Xe.readable=n=>Xe(n)&&n.readable!==!1&&typeof n._read=="function"&&typeof n._readableState=="object";Xe.duplex=n=>Xe.writable(n)&&Xe.readable(n);Xe.transform=n=>Xe.duplex(n)&&typeof n._transform=="function";hl.exports=Xe});var gl=M((KS,bh)=>{bh.exports={name:"gaxios",version:"6.7.1",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/src/index.js",types:"build/src/index.d.ts",files:["build/src"],scripts:{lint:"gts check",test:"c8 mocha build/test","presystem-test":"npm run compile","system-test":"mocha build/system-test --timeout 80000",compile:"tsc -p .",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"compodoc src/","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean",precompile:"gts clean"},repository:"googleapis/gaxios",keywords:["google"],engines:{node:">=14"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@compodoc/compodoc":"1.1.19","@types/cors":"^2.8.6","@types/express":"^4.16.1","@types/extend":"^3.0.1","@types/mocha":"^9.0.0","@types/multiparty":"0.0.36","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.0.0","@types/node-fetch":"^2.5.7","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^10.0.0","abort-controller":"^3.0.0",assert:"^2.0.0",browserify:"^17.0.0",c8:"^8.0.0",cheerio:"1.0.0-rc.10",cors:"^2.8.5",execa:"^5.0.0",express:"^4.16.4","form-data":"^4.0.0",gts:"^5.0.0","is-docker":"^2.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0",linkinator:"^3.0.0",mocha:"^8.0.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^13.0.0","null-loader":"^4.0.0",puppeteer:"^19.0.0",sinon:"^18.0.0","stream-browserify":"^3.0.0",tmp:"0.2.3","ts-loader":"^8.0.0",typescript:"^5.1.6",webpack:"^5.35.0","webpack-cli":"^4.0.0"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","is-stream":"^2.0.0","node-fetch":"^2.6.9",uuid:"^9.0.1"}}});var ml=M(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.pkg=void 0;vr.pkg=gl()});var Eo=M(Ne=>{"use strict";var Mh=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},yl;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.GaxiosError=Ne.GAXIOS_ERROR_SYMBOL=void 0;Ne.defaultErrorRedactor=El;var Oh=U("url"),yo=ml(),_l=Mh(mo());Ne.GAXIOS_ERROR_SYMBOL=Symbol.for(`${yo.pkg.name}-gaxios-error`);var _o=class n extends Error{static[(yl=Ne.GAXIOS_ERROR_SYMBOL,Symbol.hasInstance)](e){return e&&typeof e=="object"&&Ne.GAXIOS_ERROR_SYMBOL in e&&e[Ne.GAXIOS_ERROR_SYMBOL]===yo.pkg.version?!0:Function.prototype[Symbol.hasInstance].call(n,e)}constructor(e,t,r,i){var o;if(super(e),this.config=t,this.response=r,this.error=i,this[yl]=yo.pkg.version,this.config=(0,_l.default)(!0,{},t),this.response&&(this.response.config=(0,_l.default)(!0,{},this.response.config)),this.response){try{this.response.data=Dh(this.config.responseType,(o=this.response)===null||o===void 0?void 0:o.data)}catch{}this.status=this.response.status}i&&"code"in i&&i.code&&(this.code=i.code),t.errorRedactor&&t.errorRedactor({config:this.config,response:this.response})}};Ne.GaxiosError=_o;function Dh(n,e){switch(n){case"stream":return e;case"json":return JSON.parse(JSON.stringify(e));case"arraybuffer":return JSON.parse(Buffer.from(e).toString("utf8"));case"blob":return JSON.parse(e.text());default:return e}}function El(n){let e="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function t(o){if(o)for(let s of Object.keys(o))/^authentication$/i.test(s)&&(o[s]=e),/^authorization$/i.test(s)&&(o[s]=e),/secret/i.test(s)&&(o[s]=e)}function r(o,s){if(typeof o=="object"&&o!==null&&typeof o[s]=="string"){let c=o[s];(/grant_type=/i.test(c)||/assertion=/i.test(c)||/secret/i.test(c))&&(o[s]=e)}}function i(o){typeof o=="object"&&o!==null&&("grant_type"in o&&(o.grant_type=e),"assertion"in o&&(o.assertion=e),"client_secret"in o&&(o.client_secret=e))}if(n.config){t(n.config.headers),r(n.config,"data"),i(n.config.data),r(n.config,"body"),i(n.config.body);try{let o=new Oh.URL("",n.config.url);o.searchParams.has("token")&&o.searchParams.set("token",e),o.searchParams.has("client_secret")&&o.searchParams.set("client_secret",e),n.config.url=o.toString()}catch{}}return n.response&&(El({config:n.response.config}),t(n.response.headers),r(n.response,"data"),i(n.response.data)),n}});var Tl=M(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.getRetryConfig=Uh;async function Uh(n){let e=vl(n);if(!n||!n.config||!e&&!n.config.retry)return{shouldRetry:!1};e=e||{},e.currentRetryAttempt=e.currentRetryAttempt||0,e.retry=e.retry===void 0||e.retry===null?3:e.retry,e.httpMethodsToRetry=e.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],e.noResponseRetries=e.noResponseRetries===void 0||e.noResponseRetries===null?2:e.noResponseRetries,e.retryDelayMultiplier=e.retryDelayMultiplier?e.retryDelayMultiplier:2,e.timeOfFirstRequest=e.timeOfFirstRequest?e.timeOfFirstRequest:Date.now(),e.totalTimeout=e.totalTimeout?e.totalTimeout:Number.MAX_SAFE_INTEGER,e.maxRetryDelay=e.maxRetryDelay?e.maxRetryDelay:Number.MAX_SAFE_INTEGER;let t=[[100,199],[408,408],[429,429],[500,599]];if(e.statusCodesToRetry=e.statusCodesToRetry||t,n.config.retryConfig=e,!await(e.shouldRetry||Fh)(n))return{shouldRetry:!1,config:n.config};let i=Lh(e);n.config.retryConfig.currentRetryAttempt+=1;let o=e.retryBackoff?e.retryBackoff(n,i):new Promise(s=>{setTimeout(s,i)});return e.onRetryAttempt&&e.onRetryAttempt(n),await o,{shouldRetry:!0,config:n.config}}function Fh(n){var e;let t=vl(n);if(n.name==="AbortError"||((e=n.error)===null||e===void 0?void 0:e.name)==="AbortError"||!t||t.retry===0||!n.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries||!n.config.method||t.httpMethodsToRetry.indexOf(n.config.method.toUpperCase())<0)return!1;if(n.response&&n.response.status){let r=!1;for(let[i,o]of t.statusCodesToRetry){let s=n.response.status;if(s>=i&&s<=o){r=!0;break}}if(!r)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}function vl(n){if(n&&n.config&&n.config.retryConfig)return n.config.retryConfig}function Lh(n){var e;let r=(n.currentRetryAttempt?0:(e=n.retryDelay)!==null&&e!==void 0?e:100)+(Math.pow(n.retryDelayMultiplier,n.currentRetryAttempt)-1)/2*1e3,i=n.totalTimeout-(Date.now()-n.timeOfFirstRequest);return Math.min(r,i,n.maxRetryDelay)}});import qh from"crypto";function Mn(){return Tr>Cr.length-16&&(qh.randomFillSync(Cr),Tr=0),Cr.slice(Tr,Tr+=16)}var Cr,Tr,To=me(()=>{Cr=new Uint8Array(256),Tr=Cr.length});var Cl,Sl=me(()=>{Cl=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function Gh(n){return typeof n=="string"&&Cl.test(n)}var mt,On=me(()=>{Sl();mt=Gh});function kt(n,e=0){return he[n[e+0]]+he[n[e+1]]+he[n[e+2]]+he[n[e+3]]+"-"+he[n[e+4]]+he[n[e+5]]+"-"+he[n[e+6]]+he[n[e+7]]+"-"+he[n[e+8]]+he[n[e+9]]+"-"+he[n[e+10]]+he[n[e+11]]+he[n[e+12]]+he[n[e+13]]+he[n[e+14]]+he[n[e+15]]}function Bh(n,e=0){let t=kt(n,e);if(!mt(t))throw TypeError("Stringified UUID is invalid");return t}var he,wl,Dn=me(()=>{On();he=[];for(let n=0;n<256;++n)he.push((n+256).toString(16).slice(1));wl=Bh});function Vh(n,e,t){let r=e&&t||0,i=e||new Array(16);n=n||{};let o=n.node||Al,s=n.clockseq!==void 0?n.clockseq:Co;if(o==null||s==null){let g=n.random||(n.rng||Mn)();o==null&&(o=Al=[g[0]|1,g[1],g[2],g[3],g[4],g[5]]),s==null&&(s=Co=(g[6]<<8|g[7])&16383)}let c=n.msecs!==void 0?n.msecs:Date.now(),f=n.nsecs!==void 0?n.nsecs:wo+1,u=c-So+(f-wo)/1e4;if(u<0&&n.clockseq===void 0&&(s=s+1&16383),(u<0||c>So)&&n.nsecs===void 0&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");So=c,wo=f,Co=s,c+=122192928e5;let d=((c&268435455)*1e4+f)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;let h=c/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=h&255,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=s>>>8|128,i[r++]=s&255;for(let g=0;g<6;++g)i[r+g]=o[g];return e||kt(i)}var Al,Co,So,wo,xl,Il=me(()=>{To();Dn();So=0,wo=0;xl=Vh});function Hh(n){if(!mt(n))throw TypeError("Invalid UUID");let e,t=new Uint8Array(16);return t[0]=(e=parseInt(n.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}var Sr,Ao=me(()=>{On();Sr=Hh});function $h(n){n=unescape(encodeURIComponent(n));let e=[];for(let t=0;t<n.length;++t)e.push(n.charCodeAt(t));return e}function Un(n,e,t){function r(i,o,s,c){var f;if(typeof i=="string"&&(i=$h(i)),typeof o=="string"&&(o=Sr(o)),((f=o)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+i.length);if(u.set(o),u.set(i,o.length),u=t(u),u[6]=u[6]&15|e,u[8]=u[8]&63|128,s){c=c||0;for(let d=0;d<16;++d)s[c+d]=u[d];return s}return kt(u)}try{r.name=n}catch{}return r.DNS=Wh,r.URL=Jh,r}var Wh,Jh,xo=me(()=>{Dn();Ao();Wh="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Jh="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});import Kh from"crypto";function Yh(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),Kh.createHash("md5").update(n).digest()}var Rl,Pl=me(()=>{Rl=Yh});var zh,Nl,kl=me(()=>{xo();Pl();zh=Un("v3",48,Rl),Nl=zh});import Xh from"crypto";var Io,bl=me(()=>{Io={randomUUID:Xh.randomUUID}});function jh(n,e,t){if(Io.randomUUID&&!e&&!n)return Io.randomUUID();n=n||{};let r=n.random||(n.rng||Mn)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=r[i];return e}return kt(r)}var Ml,Ol=me(()=>{bl();To();Dn();Ml=jh});import Zh from"crypto";function Qh(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),Zh.createHash("sha1").update(n).digest()}var Dl,Ul=me(()=>{Dl=Qh});var ep,Fl,Ll=me(()=>{xo();Ul();ep=Un("v5",80,Dl),Fl=ep});var ql,Gl=me(()=>{ql="00000000-0000-0000-0000-000000000000"});function tp(n){if(!mt(n))throw TypeError("Invalid UUID");return parseInt(n.slice(14,15),16)}var Bl,Vl=me(()=>{On();Bl=tp});var Hl={};Rh(Hl,{NIL:()=>ql,parse:()=>Sr,stringify:()=>wl,v1:()=>xl,v3:()=>Nl,v4:()=>Ml,v5:()=>Fl,validate:()=>mt,version:()=>Bl});var $l=me(()=>{Il();kl();Ol();Ll();Gl();Vl();On();Dn();Ao()});var Po=M(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.GaxiosInterceptorManager=void 0;var Ro=class extends Set{};wr.GaxiosInterceptorManager=Ro});var No=M((Bw,Wl)=>{function np(n){t.debug=t,t.default=t,t.coerce=f,t.disable=s,t.enable=i,t.enabled=c,t.humanize=kh(),t.destroy=u,Object.keys(n).forEach(d=>{t[d]=n[d]}),t.names=[],t.skips=[],t.formatters={};function e(d){let h=0;for(let g=0;g<d.length;g++)h=(h<<5)-h+d.charCodeAt(g),h|=0;return t.colors[Math.abs(h)%t.colors.length]}t.selectColor=e;function t(d){let h,g=null,v,w;function C(...N){if(!C.enabled)return;let k=C,G=Number(new Date),L=G-(h||G);k.diff=L,k.prev=h,k.curr=G,h=G,N[0]=t.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let q=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(B,J)=>{if(B==="%%")return"%";q++;let Y=t.formatters[J];if(typeof Y=="function"){let D=N[q];B=Y.call(k,D),N.splice(q,1),q--}return B}),t.formatArgs.call(k,N),(k.log||t.log).apply(k,N)}return C.namespace=d,C.useColors=t.useColors(),C.color=t.selectColor(d),C.extend=r,C.destroy=t.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(v!==t.namespaces&&(v=t.namespaces,w=t.enabled(d)),w),set:N=>{g=N}}),typeof t.init=="function"&&t.init(C),C}function r(d,h){let g=t(this.namespace+(typeof h>"u"?":":h)+d);return g.log=this.log,g}function i(d){t.save(d),t.namespaces=d,t.names=[],t.skips=[];let h=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of h)g[0]==="-"?t.skips.push(g.slice(1)):t.names.push(g)}function o(d,h){let g=0,v=0,w=-1,C=0;for(;g<d.length;)if(v<h.length&&(h[v]===d[g]||h[v]==="*"))h[v]==="*"?(w=v,C=g,v++):(g++,v++);else if(w!==-1)v=w+1,C++,g=C;else return!1;for(;v<h.length&&h[v]==="*";)v++;return v===h.length}function s(){let d=[...t.names,...t.skips.map(h=>"-"+h)].join(",");return t.enable(""),d}function c(d){for(let h of t.skips)if(o(d,h))return!1;for(let h of t.names)if(o(d,h))return!0;return!1}function f(d){return d instanceof Error?d.stack||d.message:d}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}Wl.exports=np});var Jl=M((Ce,Ar)=>{Ce.formatArgs=ip;Ce.save=op;Ce.load=sp;Ce.useColors=rp;Ce.storage=ap();Ce.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ce.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function rp(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ip(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+Ar.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;n.splice(1,0,e,"color: inherit");let t=0,r=0;n[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(t++,i==="%c"&&(r=t))}),n.splice(r,0,e)}Ce.log=console.debug||console.log||(()=>{});function op(n){try{n?Ce.storage.setItem("debug",n):Ce.storage.removeItem("debug")}catch{}}function sp(){let n;try{n=Ce.storage.getItem("debug")||Ce.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function ap(){try{return localStorage}catch{}}Ar.exports=No()(Ce);var{formatters:lp}=Ar.exports;lp.j=function(n){try{return JSON.stringify(n)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Yl=M((ce,Ir)=>{var cp=U("tty"),xr=U("util");ce.init=mp;ce.log=hp;ce.formatArgs=fp;ce.save=pp;ce.load=gp;ce.useColors=up;ce.destroy=xr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ce.colors=[6,2,3,4,5,1];try{let n=U("supports-color");n&&(n.stderr||n).level>=2&&(ce.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ce.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),n[t]=r,n},{});function up(){return"colors"in ce.inspectOpts?!!ce.inspectOpts.colors:cp.isatty(process.stderr.fd)}function fp(n){let{namespace:e,useColors:t}=this;if(t){let r=this.color,i="\x1B[3"+(r<8?r:"8;5;"+r),o=` ${i};1m${e} \x1B[0m`;n[0]=o+n[0].split(`
2
3
  `).join(`
3
4
  `+o),n.push(i+"m+"+Ir.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=dp()+e+" "+n[0]}function dp(){return ce.inspectOpts.hideDate?"":new Date().toISOString()+" "}function hp(...n){return process.stderr.write(xr.formatWithOptions(ce.inspectOpts,...n)+`
4
5
  `)}function pp(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function gp(){return process.env.DEBUG}function mp(n){n.inspectOpts={};let e=Object.keys(ce.inspectOpts);for(let t=0;t<e.length;t++)n.inspectOpts[e[t]]=ce.inspectOpts[e[t]]}Ir.exports=No()(ce);var{formatters:Kl}=Ir.exports;Kl.o=function(n){return this.inspectOpts.colors=this.useColors,xr.inspect(n,this.inspectOpts).split(`
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{b as F}from"./chunk-CDPSH56U.js";import{b as g,d as E}from"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";import*as n from"node:fs/promises";import*as R from"node:fs";import*as i from"node:path";import*as v from"node:os";import*as b from"node:child_process";import a from"node:process";import{Buffer as p}from"node:buffer";import{Readable as k,Writable as O}from"node:stream";var S={fs:!0,fsSync:!0,exec:!0,process:!0,env:!0,stdin:!0,stdout:!0,kv:!1},x=()=>{let r=e=>({isFile:e.isFile(),isDirectory:e.isDirectory(),isSymlink:e.isSymbolicLink(),size:e.size,mtime:e.mtime,atime:e.atime,birthtime:e.birthtime}),c=(e,t)=>{throw e instanceof Error&&"code"in e&&e.code==="ENOENT"?new g(t):e};return{async readFile(e,t){try{let s=await n.readFile(e,{signal:t?.signal});return new Uint8Array(s)}catch(s){return c(s,e)}},async readTextFile(e,t){try{return await n.readFile(e,{encoding:"utf-8",signal:t?.signal})}catch(s){return c(s,e)}},async writeFile(e,t,s){let d=s?.append?"a":"w";await n.writeFile(e,t,{signal:s?.signal,mode:s?.mode,flag:d})},async writeTextFile(e,t,s){let d=s?.append?"a":"w";await n.writeFile(e,t,{encoding:"utf-8",signal:s?.signal,mode:s?.mode,flag:d})},async exists(e){try{return await n.access(e),!0}catch{return!1}},async stat(e){try{let t=await n.stat(e);return r(t)}catch(t){return c(t,e)}},async lstat(e){try{let t=await n.lstat(e);return r(t)}catch(t){return c(t,e)}},async mkdir(e,t){await n.mkdir(e,{recursive:t?.recursive??!1,mode:t?.mode})},async ensureDir(e){await n.mkdir(e,{recursive:!0})},async remove(e,t){try{await n.rm(e,{recursive:t?.recursive??!1,force:!1})}catch(s){c(s,e)}},async*readDir(e){try{let t=await n.readdir(e,{withFileTypes:!0});for(let s of t)yield{name:s.name,isFile:s.isFile(),isDirectory:s.isDirectory(),isSymlink:s.isSymbolicLink()}}catch(t){c(t,e)}},async copyFile(e,t){await n.copyFile(e,t)},async rename(e,t){await n.rename(e,t)},async makeTempDir(e){let t=e?.dir??v.tmpdir(),s=e?.prefix??"",d=e?.suffix??"",u=await n.mkdtemp(i.join(t,s));if(d){let o=u+d;return await n.rename(u,o),o}return u},async realPath(e){try{return await n.realpath(e)}catch(t){throw t instanceof Error&&"code"in t&&t.code==="ENOENT"?new g(e):t}},watch(e,t){let s=t?.recursive??!0,d=[],u=[],o=[],l=!1,P=m=>{l||(o.length>0?o.shift()({value:m,done:!1}):u.push(m))};for(let m of e)try{let f=R.watch(m,{recursive:s},(h,y)=>{y!==null&&P({kind:h==="rename"?"create":"modify",paths:[i.join(m,y)]})});d.push(f)}catch{}return{close:()=>{l=!0;for(let m of d)m.close();for(let m of o)m({value:void 0,done:!0});o=[]},[Symbol.asyncIterator]:()=>({next:()=>l?Promise.resolve({value:void 0,done:!0}):u.length>0?Promise.resolve({value:u.shift(),done:!1}):new Promise(m=>{o.push(m)})})}},async chmod(e,t){await n.chmod(e,t)},async*walk(e,t){let s=t?.includeDirs??!0,d=t?.includeFiles??!0,u=t?.exts,o=t?.skip,l=async function*(P){let m=await n.readdir(P,{withFileTypes:!0});for(let f of m){let h=i.join(P,f.name);if(o?.some(w=>w.test(h)))continue;let y=f.isSymbolicLink();if(f.isDirectory())s&&(yield{path:h,name:f.name,isFile:!1,isDirectory:!0,isSymlink:y}),yield*l(h);else if(f.isFile()||y){if(!d||u&&!u.some(w=>f.name.endsWith(w.startsWith(".")?w:`.${w}`)))continue;yield{path:h,name:f.name,isFile:f.isFile(),isDirectory:!1,isSymlink:y}}}};yield*l(e)}}},W=()=>({join:i.join,resolve:i.resolve,dirname:i.dirname,basename:i.basename,extname:i.extname,normalize:i.normalize,isAbsolute:i.isAbsolute,relative:i.relative,parse:i.parse,format:i.format,sep:i.sep,delimiter:i.delimiter}),T=()=>({spawn(r,c=[],e){return new Promise((t,s)=>{let d=b.spawn(r,c,{cwd:e?.cwd,env:e?.env?{...a.env,...e.env}:void 0,stdio:F(e),signal:e?.signal}),u=[],o=[];d.stdout?.on("data",l=>u.push(l)),d.stderr?.on("data",l=>o.push(l)),d.on("error",s),d.on("close",l=>{t({success:l===0,code:l??1,stdout:new Uint8Array(p.concat(u)),stderr:new Uint8Array(p.concat(o))})})})},async exec(r,c=[],e){let t=await this.spawn(r,c,e);if(!t.success){let s=new TextDecoder().decode(t.stderr);throw new E(r,t.code,s)}return new TextDecoder().decode(t.stdout).trim()},async execJson(r,c=[],e){let t=await this.exec(r,c,e);return JSON.parse(t)},spawnChild(r,c=[],e){let t=b.spawn(r,c,{cwd:e?.cwd,env:e?.env?{...a.env,...e.env}:void 0,stdio:F(e),signal:e?.signal}),s=[],d=[];t.stdout?.on("data",o=>s.push(o)),t.stderr?.on("data",o=>d.push(o));let u=new Promise((o,l)=>{t.on("error",l),t.on("close",(P,m)=>{o({success:P===0,code:P??1,signal:m??void 0})})});return{pid:t.pid,stdin:t.stdin?O.toWeb(t.stdin):null,stdout:t.stdout?k.toWeb(t.stdout):null,stderr:t.stderr?k.toWeb(t.stderr):null,status:u,output:async()=>{let o=await u;return{success:o.success,code:o.code,stdout:new Uint8Array(p.concat(s)),stderr:new Uint8Array(p.concat(d))}},kill:o=>{t.kill(o)}}}}),A=()=>({get(r){return a.env[r]},set(r,c){a.env[r]=c},delete(r){delete a.env[r]},has(r){return r in a.env},toObject(){let r={};for(let[c,e]of Object.entries(a.env))e!==void 0&&(r[c]=e);return r}}),D=()=>({exit(r){a.exit(r)},setExitCode(r){a.exitCode=r},cwd(){return a.cwd()},chdir(r){a.chdir(r)},hostname(){return v.hostname()},execPath(){return a.execPath},args:a.argv.slice(2),pid:a.pid,stdin:k.toWeb(a.stdin),stdout:O.toWeb(a.stdout),stderr:O.toWeb(a.stderr),isTerminal(r){switch(r){case"stdin":return a.stdin.isTTY===!0;case"stdout":return a.stdout.isTTY===!0;case"stderr":return a.stderr.isTTY===!0}},setStdinRaw(r){a.stdin.setRawMode(r)}}),j=()=>{let r=x(),c=W(),e=T(),t=A(),s=D();return{name:"node",version:a.versions.node,capabilities:S,fs:r,path:c,exec:e,env:t,process:s}};export{S as NODE_CAPABILITIES,j as createNodeRuntime};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-KQE6FMKW.js";import"./chunk-455V3AE5.js";import"./chunk-J7YTWK67.js";import"./chunk-PVPMHMKP.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as OllamaModel,b as ollamaFactory};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-B5IPHVXT.js";import"./chunk-J7YTWK67.js";import"./chunk-G6NAG2EK.js";export{a as OpenAIModel,b as openaiFactory};