eser 4.1.26 → 4.1.29
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.
- package/README.md +1 -1
- package/chunks/add-O35CHPAB.js +8 -0
- package/chunks/anthropic-2MXDKLNX.js +2 -0
- package/chunks/approve-XMPDDDZD.js +2 -0
- package/chunks/{ask-TFJCKH5G.js → ask-BZIPZT7O.js} +2 -1
- package/chunks/block-C2GOOMFH.js +2 -0
- package/chunks/{browser-XCMD2IZQ.js → browser-JNDQ24XT.js} +2 -1
- package/chunks/{build-2W7YVR7J.js → build-LADMCGZD.js} +3 -2
- package/chunks/{bun-YFFBDKUJ.js → bun-ZPIZVC7D.js} +2 -1
- package/chunks/changelog-gen-KMNP2KO4.js +10 -0
- package/chunks/{chunk-WUJUQPHI.js → chunk-2BOCLC67.js} +2 -1
- package/chunks/chunk-2SEPWXDK.js +2 -0
- package/chunks/{chunk-6U2VEZEM.js → chunk-2VEVVX6U.js} +2 -1
- package/chunks/{chunk-NUSNMQPL.js → chunk-3BEX5FYF.js} +2 -1
- package/chunks/chunk-3HC6RWFJ.js +2 -0
- package/chunks/chunk-3SXTMY75.js +2 -0
- package/chunks/{chunk-34GCQZ3Z.js → chunk-3XJLLDR5.js} +1 -0
- package/chunks/{chunk-NTPOK5H6.js → chunk-4MELQSFH.js} +2 -1
- package/chunks/{chunk-UKYKMDYU.js → chunk-4NEBMHCP.js} +2 -1
- package/chunks/{chunk-U47ABJCC.js → chunk-536RBSFU.js} +2 -1
- package/chunks/{chunk-DWYVBWBP.js → chunk-5BHHLJJN.js} +2 -1
- package/chunks/{chunk-SBOTNOWZ.js → chunk-5YVKJFG6.js} +2 -1
- package/chunks/{chunk-CPRLAMEG.js → chunk-6HGMAVFR.js} +2 -1
- package/chunks/chunk-6LVNPRHQ.js +4 -0
- package/chunks/{chunk-ANY26ROY.js → chunk-6XW64HCG.js} +2 -1
- package/chunks/{chunk-GLSCZGXA.js → chunk-7ATUODBM.js} +2 -1
- package/chunks/{chunk-USCAYIWL.js → chunk-7DPLGQHN.js} +1 -0
- package/chunks/{chunk-CKD2KOHA.js → chunk-7FMX4QXF.js} +2 -1
- package/chunks/chunk-7ZVGNL76.js +4 -0
- package/chunks/chunk-7ZYDAZBD.js +1 -0
- package/chunks/chunk-A3MBTPHJ.js +2 -0
- package/chunks/{chunk-DQAEQEXD.js → chunk-A6RDYP6R.js} +2 -1
- package/chunks/{chunk-QIODVVTY.js → chunk-AN5JOFHD.js} +2 -1
- package/chunks/{chunk-ZE5T64HQ.js → chunk-AP72BKVG.js} +1 -0
- package/chunks/{chunk-GETSWLMF.js → chunk-B5IPHVXT.js} +3 -2
- package/chunks/{chunk-5MN3MWQN.js → chunk-BNQAZLIQ.js} +1 -0
- package/chunks/{chunk-KAEAT6A4.js → chunk-C2FHTZ2Y.js} +2 -1
- package/chunks/{chunk-T7K64JD5.js → chunk-CDPSH56U.js} +1 -0
- package/chunks/{chunk-BDTJR6UH.js → chunk-CFTANV4S.js} +2 -1
- package/chunks/chunk-CLXOJOH3.js +2 -0
- package/chunks/{chunk-4VL2RZIN.js → chunk-COJNSVOS.js} +2 -1
- package/chunks/{chunk-GVSBZ6JV.js → chunk-CS3FL7HI.js} +2 -1
- package/chunks/{chunk-AK3OJD4W.js → chunk-DAK2I7UC.js} +2 -1
- package/chunks/{chunk-3K42AALS.js → chunk-DPL7GREV.js} +2 -1
- package/chunks/{chunk-ACQUINWH.js → chunk-DTO2YJWZ.js} +1 -0
- package/chunks/chunk-EETBL6X2.js +2 -0
- package/chunks/{chunk-ETMOOGY2.js → chunk-EJ4XBQTD.js} +2 -1
- package/chunks/chunk-EZE3F4PG.js +2 -0
- package/chunks/{chunk-5RK3346P.js → chunk-FXBDWBXT.js} +2 -1
- package/chunks/{chunk-VVHXAOEH.js → chunk-G35GBI4M.js} +2 -1
- package/chunks/{chunk-DXB73IDG.js → chunk-G6NAG2EK.js} +1 -0
- package/chunks/{chunk-6FMPNAZ3.js → chunk-GE3LJ6QM.js} +2 -1
- package/chunks/{chunk-G34MS4XJ.js → chunk-GITZBQ2Z.js} +2 -1
- package/chunks/{chunk-Y6DZEK4W.js → chunk-GTHXGAMQ.js} +1 -0
- package/chunks/{chunk-3OEM65F2.js → chunk-H7XLUEAU.js} +3 -2
- package/chunks/chunk-HFFIXVAB.js +13 -0
- package/chunks/{chunk-NLNSK3KE.js → chunk-HYFBCDIO.js} +2 -1
- package/chunks/{chunk-TUTRX7VR.js → chunk-IAZ2MM3P.js} +2 -1
- package/chunks/{chunk-XMCQMTAA.js → chunk-IKYBNRCS.js} +2 -1
- package/chunks/{chunk-LOFP256P.js → chunk-J2Z7NG2X.js} +1 -0
- package/chunks/{chunk-OLM5RTFK.js → chunk-J7YTWK67.js} +1 -0
- package/chunks/{chunk-MBC2JM7F.js → chunk-JPCJIMM5.js} +2 -1
- package/chunks/chunk-JPFGKN4T.js +4 -0
- package/chunks/chunk-JYNHFD6B.js +140 -0
- package/chunks/{chunk-RBB5ITAS.js → chunk-KLHDNHD3.js} +2 -1
- package/chunks/chunk-KLWWCHOL.js +2 -0
- package/chunks/{chunk-Q54LOR4S.js → chunk-KP3HXVLZ.js} +2 -1
- package/chunks/{chunk-U65FD6J3.js → chunk-KXI7O3KZ.js} +2 -1
- package/chunks/{chunk-OBIEQJDE.js → chunk-LCG4SK6K.js} +2 -1
- package/chunks/chunk-LNNNLUZT.js +2 -0
- package/chunks/chunk-LT7CC4SX.js +2 -0
- package/chunks/chunk-LXE2WGIW.js +2 -0
- package/chunks/{chunk-HPPFA3XU.js → chunk-MG65QJY6.js} +1 -0
- package/chunks/chunk-MNVCCOJS.js +2 -0
- package/chunks/{chunk-A2GDVOQP.js → chunk-N7DXBY3O.js} +2 -1
- package/chunks/{chunk-2J2PXBOC.js → chunk-NBA6EFWU.js} +1 -0
- package/chunks/chunk-NP2CCJ4C.js +40 -0
- package/chunks/{chunk-3APERFKY.js → chunk-P7WCO724.js} +1 -0
- package/chunks/{chunk-YWCEHTZB.js → chunk-PASFORZM.js} +2 -1
- package/chunks/chunk-PDJEHSKZ.js +3 -0
- package/chunks/{chunk-FKF2SWQM.js → chunk-PE2TDUXD.js} +1 -0
- package/chunks/chunk-PHI2BESG.js +2 -0
- package/chunks/chunk-PWLF3WXM.js +1 -0
- package/chunks/{chunk-TXL6YOFL.js → chunk-Q2KSOC32.js} +2 -1
- package/chunks/{chunk-YMY2URYM.js → chunk-QEZJTCNE.js} +2 -1
- package/chunks/{chunk-NGZZAQ7G.js → chunk-QTOUP2B7.js} +2 -1
- package/chunks/chunk-RMGMMTO6.js +2 -0
- package/chunks/{chunk-YXSB6RET.js → chunk-RYOLIM3I.js} +2 -1
- package/chunks/{chunk-AKJB4CER.js → chunk-RZKZDGNM.js} +2 -1
- package/chunks/{chunk-4S7QYPS6.js → chunk-S7S2I2K5.js} +1 -0
- package/chunks/chunk-SAQAIPUB.js +5 -0
- package/chunks/{chunk-6HYGGBEQ.js → chunk-SMT3I5PQ.js} +2 -1
- package/chunks/{chunk-ZED5RIVL.js → chunk-SOCLJVZ3.js} +2 -1
- package/chunks/chunk-SOSF762G.js +1 -0
- package/chunks/{chunk-FDZP7B5Y.js → chunk-STI6DX7K.js} +1 -0
- package/chunks/{chunk-PO3SXFUE.js → chunk-T4CNY6II.js} +2 -1
- package/chunks/{chunk-H4OFOQQ2.js → chunk-TBHZHGUF.js} +2 -1
- package/chunks/{chunk-QIYWONJL.js → chunk-TBOM65KB.js} +2 -1
- package/chunks/{chunk-762C2IM6.js → chunk-TDQRRGDJ.js} +2 -1
- package/chunks/{chunk-IA7GIU76.js → chunk-TFPT4BDY.js} +2 -1
- package/chunks/chunk-U3FRSRMK.js +7 -0
- package/chunks/{chunk-C3PZVQ3Z.js → chunk-V4AJMSER.js} +2 -1
- package/chunks/chunk-VC5BX56D.js +3 -0
- package/chunks/{chunk-JOXKA7TJ.js → chunk-VIOT4AMI.js} +2 -1
- package/chunks/{chunk-AAV7D6DF.js → chunk-VKSH6UPG.js} +2 -1
- package/chunks/{chunk-UNL4H5EY.js → chunk-VXA3KMDF.js} +2 -1
- package/chunks/{chunk-4H4O3TGK.js → chunk-VXTKQXGM.js} +2 -1
- package/chunks/{chunk-ZH37DSUQ.js → chunk-WF6JNPZS.js} +1 -0
- package/chunks/{chunk-4HAIX3WN.js → chunk-XAV6BM52.js} +2 -1
- package/chunks/{chunk-SG4G3OOO.js → chunk-XMVLDQGA.js} +2 -1
- package/chunks/{chunk-3EFU5R2M.js → chunk-Y53YTL4C.js} +2 -1
- package/chunks/chunk-YSJNWJ24.js +61 -0
- package/chunks/{chunk-ZF2XYULB.js → chunk-YTF3BAQS.js} +1 -0
- package/chunks/chunk-YZ4L35HK.js +3 -0
- package/chunks/{chunk-W3REWI3H.js → chunk-Z2CGXVFY.js} +2 -1
- package/chunks/{chunk-YQU3TEIG.js → chunk-ZKUI7MRS.js} +2 -1
- package/chunks/chunk-ZTPERUHN.js +2 -0
- package/chunks/claude-code-T26K2CSI.js +2 -0
- package/chunks/clone-UYEZ44LL.js +6 -0
- package/chunks/{commitmsg-ZGOEO5YG.js → commitmsg-646PHU7A.js} +3 -2
- package/chunks/concern-YRABYUVO.js +2 -0
- package/chunks/{deno-MMJLKXAE.js → deno-VWFDRCYK.js} +2 -1
- package/chunks/{dev-JHAHGTZP.js → dev-G4VQ2IYE.js} +3 -2
- package/chunks/done-5SD4KWRA.js +2 -0
- package/chunks/file-tools-shared-6W7Q4BM3.js +2 -0
- package/chunks/{fileFromPath-4UEDFJ4U.js → fileFromPath-MB3IRZVW.js} +2 -1
- package/chunks/gemini-F4KLO5VU.js +2 -0
- package/chunks/gh-CD3B5KEN.js +5 -0
- package/chunks/{gh-contributors-G3QZZAUO.js → gh-contributors-35JDS77W.js} +2 -1
- package/chunks/init-FAWK4Z3E.js +2 -0
- package/chunks/{init-IPZHDMAH.js → init-URA5HJ76.js} +4 -3
- package/chunks/install-M74UAT7X.js +3 -0
- package/chunks/invoke-hook-4LHASYW3.js +10 -0
- package/chunks/kiro-G4OHOVFL.js +2 -0
- package/chunks/{list-2RZIQZGH.js → list-4EO2DKMM.js} +2 -1
- package/chunks/{list-DSVIPH45.js → list-J5HOVH5E.js} +2 -1
- package/chunks/list-LBUVQR7O.js +2 -0
- package/chunks/load-config-DVKFZVST.js +2 -0
- package/chunks/{main-FQFNY7SM.js → main-ODLLH74E.js} +3 -2
- package/chunks/manifest-QSFTIV3B.js +2 -0
- package/chunks/mod-4ILLF5PK.js +2 -0
- package/chunks/mod-5ZKIEGUP.js +2 -0
- package/chunks/mod-6DSPYXMK.js +2 -0
- package/chunks/{mod-QJMMYECF.js → mod-BE3R7D2V.js} +3 -2
- package/chunks/{mod-TLLZ3NAM.js → mod-EWGGLW3S.js} +2 -1
- package/chunks/{mod-TSU5UWXA.js → mod-QHYBU43F.js} +2 -1
- package/chunks/mod-RLMNE7UW.js +2 -0
- package/chunks/{mod-VZPKQ7DG.js → mod-S5HDMMLJ.js} +2 -1
- package/chunks/{mod-WYRORC72.js → mod-T55CWDLD.js} +2 -1
- package/chunks/mod-U23K3LXJ.js +2 -0
- package/chunks/mod-YSMK5V7P.js +2 -0
- package/chunks/mod-ZZYMEYCH.js +28 -0
- package/chunks/{new-EAETGSIR.js → new-GDE5UZWP.js} +2 -1
- package/chunks/next-2HGZUAMR.js +4 -0
- package/chunks/{node-RWYXITVV.js → node-KCQF6QQA.js} +2 -1
- package/chunks/{node-SMAAGOR3.js → node-SUFYFPRO.js} +2 -1
- package/chunks/ollama-EE7S3UZE.js +2 -0
- package/chunks/openai-EU5TJZ5T.js +2 -0
- package/chunks/{openai-EKIA3VP3.js → openai-IKXRJYI3.js} +2 -1
- package/chunks/opencode-WUF4YPPD.js +2 -0
- package/chunks/purge-OIEP3ALR.js +5 -0
- package/chunks/recipe-applier-WZ43N5XT.js +2 -0
- package/chunks/registry-fetcher-G33L5S7X.js +2 -0
- package/chunks/{release-6PVE4O6P.js → release-5BYYTQJI.js} +3 -2
- package/chunks/{release-notes-734LKEJB.js → release-notes-6M2YRB3G.js} +2 -1
- package/chunks/release-tag-QP4ZKQNS.js +2 -0
- package/chunks/reset-TKTDLTXB.js +2 -0
- package/chunks/rule-6TDBH4BL.js +3 -0
- package/chunks/{run-ES4BLQQX.js → run-SU27QAHR.js} +3 -2
- package/chunks/run-TQEEFEDE.js +4 -0
- package/chunks/{scripts-COIXD5AD.js → scripts-ZSF43ZJN.js} +2 -1
- package/chunks/{sdk-5JGXLIO5.js → sdk-MXV452BR.js} +2 -1
- package/chunks/serve-JSDQDTTM.js +4 -0
- package/chunks/{server-RYWDAYED.js → server-P46LIK5C.js} +2 -1
- package/chunks/spec-ATRKKK2P.js +2 -0
- package/chunks/status-H2KLEMT6.js +2 -0
- package/chunks/sync-CK7PWMKK.js +2 -0
- package/chunks/system-IV54LJTN.js +2 -0
- package/chunks/system-NSABXTHD.js +2 -0
- package/chunks/{unstable_chmod-WRDBWEC2.js → unstable_chmod-GDQI7NKH.js} +2 -1
- package/chunks/update-HP5WGRNK.js +6 -0
- package/chunks/validate-bom-KGIGVVOU.js +2 -0
- package/chunks/validate-case-conflict-OO2AO434.js +2 -0
- package/chunks/validate-circular-deps-32ISYSEO.js +2 -0
- package/chunks/validate-commit-msg-2FLWH6TC.js +2 -0
- package/chunks/validate-docs-MNQ7ZRID.js +2 -0
- package/chunks/validate-eof-E33EQKDM.js +2 -0
- package/chunks/validate-export-names-IWS4NRYR.js +2 -0
- package/chunks/validate-filenames-GKDIEJH4.js +2 -0
- package/chunks/validate-json-L7BSQN3G.js +2 -0
- package/chunks/validate-large-files-CHHOQREX.js +2 -0
- package/chunks/validate-licenses-5WEHTSL4.js +2 -0
- package/chunks/validate-line-endings-EWGW2ZWD.js +2 -0
- package/chunks/validate-merge-conflict-IN5ZQJDJ.js +2 -0
- package/chunks/validate-mod-exports-PHEFFLDK.js +2 -0
- package/chunks/validate-package-configs-FXHXJMG4.js +2 -0
- package/chunks/validate-secrets-ABX5UNHC.js +2 -0
- package/chunks/validate-shebangs-47GMC7WX.js +2 -0
- package/chunks/validate-submodules-4BPO5ORH.js +2 -0
- package/chunks/validate-symlinks-OCGMLYJS.js +2 -0
- package/chunks/validate-toml-MYSG53JW.js +2 -0
- package/chunks/validate-trailing-whitespace-AXXHTIAE.js +2 -0
- package/chunks/validate-yaml-FT5PODBP.js +2 -0
- package/chunks/versions-PZPDQ673.js +2 -0
- package/chunks/vertexai-EXTYPVHK.js +2 -0
- package/chunks/watch-47KEOG5L.js +9 -0
- package/chunks/workerd-LDORGZ6V.js +2 -0
- package/eser.js +2 -1
- package/package.json +1 -1
- package/chunks/add-ORJYWG26.js +0 -7
- package/chunks/anthropic-SL274RBQ.js +0 -1
- package/chunks/approve-5NJ4JWD3.js +0 -1
- package/chunks/block-ADHHHUFZ.js +0 -1
- package/chunks/changelog-gen-LV5VWTZS.js +0 -7
- package/chunks/chunk-3I4JG3PJ.js +0 -1
- package/chunks/chunk-5AK4OGCO.js +0 -1
- package/chunks/chunk-AYSPDG4K.js +0 -1
- package/chunks/chunk-BCHXUKWW.js +0 -3
- package/chunks/chunk-BK2BDHKB.js +0 -1
- package/chunks/chunk-DDLQMSA7.js +0 -0
- package/chunks/chunk-GXPLME3K.js +0 -14
- package/chunks/chunk-HTBLWLKV.js +0 -1
- package/chunks/chunk-LO424HF3.js +0 -60
- package/chunks/chunk-LXVBR775.js +0 -1
- package/chunks/chunk-MYSTBVWT.js +0 -2
- package/chunks/chunk-NT2MQK7O.js +0 -6
- package/chunks/chunk-PLJNPQFC.js +0 -1
- package/chunks/chunk-Q7QMINSQ.js +0 -0
- package/chunks/chunk-QZY4BKI7.js +0 -1
- package/chunks/chunk-RYLOB2JU.js +0 -1
- package/chunks/chunk-TTYO2XJO.js +0 -32
- package/chunks/chunk-V2N5L24J.js +0 -2
- package/chunks/chunk-Z4WPWVC7.js +0 -10
- package/chunks/chunk-ZOZYBQX2.js +0 -0
- package/chunks/claude-code-K37KYX7W.js +0 -1
- package/chunks/clone-PAQMCIA3.js +0 -5
- package/chunks/file-tools-shared-77P7MI54.js +0 -1
- package/chunks/gemini-ARTUPDPZ.js +0 -1
- package/chunks/gh-SXEDNWHD.js +0 -4
- package/chunks/init-3GXDO32O.js +0 -1
- package/chunks/install-VY2L6NDB.js +0 -2
- package/chunks/kiro-XQDHURLU.js +0 -1
- package/chunks/list-V2HZCPDN.js +0 -1
- package/chunks/load-config-KG4RTCR2.js +0 -1
- package/chunks/manifest-5CYL3HR3.js +0 -1
- package/chunks/mod-5ACKR2OE.js +0 -1
- package/chunks/mod-6P2JPEHC.js +0 -1
- package/chunks/mod-CUIGNRIK.js +0 -1
- package/chunks/mod-NSY6WUYH.js +0 -27
- package/chunks/mod-T76TRJWM.js +0 -1
- package/chunks/mod-U6LEXPVR.js +0 -1
- package/chunks/next-F2BIIAZC.js +0 -3
- package/chunks/ollama-6JZ2IKR7.js +0 -1
- package/chunks/openai-XMIVMDDL.js +0 -1
- package/chunks/opencode-CHIAJALZ.js +0 -1
- package/chunks/recipe-applier-R4YJPGQR.js +0 -1
- package/chunks/registry-fetcher-J6X32PGP.js +0 -1
- package/chunks/release-tag-YX727TXO.js +0 -1
- package/chunks/reset-PAPDZIDC.js +0 -1
- package/chunks/rule-4GNOR3GE.js +0 -2
- package/chunks/serve-B4V2BCWM.js +0 -3
- package/chunks/spec-SNAUMQSR.js +0 -1
- package/chunks/status-CY5IKIYS.js +0 -1
- package/chunks/sync-OAPV43JS.js +0 -1
- package/chunks/system-5A6DQLM5.js +0 -1
- package/chunks/system-5LLFPIWV.js +0 -1
- package/chunks/update-O75M4SDJ.js +0 -5
- package/chunks/validate-bom-6G7EYFOP.js +0 -1
- package/chunks/validate-case-conflict-OWHWRTSQ.js +0 -1
- package/chunks/validate-circular-deps-TCYSZKME.js +0 -1
- package/chunks/validate-commit-msg-UPJJ7E4M.js +0 -1
- package/chunks/validate-docs-ZTCE5XLF.js +0 -1
- package/chunks/validate-eof-6RMNMAWI.js +0 -1
- package/chunks/validate-export-names-5ZVQ4PGM.js +0 -1
- package/chunks/validate-filenames-5YB27RN4.js +0 -1
- package/chunks/validate-json-6CLTN4AN.js +0 -1
- package/chunks/validate-large-files-KEMHYWKH.js +0 -1
- package/chunks/validate-licenses-WIVY6G5Z.js +0 -1
- package/chunks/validate-line-endings-KNFYAVBG.js +0 -1
- package/chunks/validate-merge-conflict-PYKGIFY5.js +0 -1
- package/chunks/validate-mod-exports-X5UZPD7J.js +0 -1
- package/chunks/validate-package-configs-SYKEIB53.js +0 -1
- package/chunks/validate-secrets-BWDFWN64.js +0 -1
- package/chunks/validate-shebangs-MP6VTLWO.js +0 -1
- package/chunks/validate-submodules-RQXISWKG.js +0 -1
- package/chunks/validate-symlinks-IPRYMDZD.js +0 -1
- package/chunks/validate-toml-KJZK7QVM.js +0 -1
- package/chunks/validate-trailing-whitespace-RO42VWQG.js +0 -1
- package/chunks/validate-yaml-H7G726ZM.js +0 -1
- package/chunks/versions-KW5UTMNV.js +0 -1
- package/chunks/vertexai-TPGIAJNA.js +0 -1
- package/chunks/workerd-LKKH32SO.js +0 -1
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ eser
|
|
|
44
44
|
│ └── update Re-fetch and update an applied recipe
|
|
45
45
|
├── codebase Codebase management tools
|
|
46
46
|
│ ├── scaffolding Initialize project from template
|
|
47
|
-
│ ├── install Install git hooks from .manifest.yml
|
|
47
|
+
│ ├── install Install git hooks from .eser/manifest.yml
|
|
48
48
|
│ ├── uninstall Remove managed git hooks
|
|
49
49
|
│ ├── status Show git hook installation status
|
|
50
50
|
│ ├── versions Manage workspace package versions
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as N,b as x,c as H}from"./chunk-HYFBCDIO.js";import{f as C}from"./chunk-KP3HXVLZ.js";import{a as E,d as $}from"./chunk-3BEX5FYF.js";import{k as S}from"./chunk-KLWWCHOL.js";import{f as b,h,k as I}from"./chunk-NP2CCJ4C.js";import{d as o,f as k,g,h as A,k as y}from"./chunk-3SXTMY75.js";import{a as v}from"./chunk-MG65QJY6.js";import{a as d,b as c,c as R}from"./chunk-A6RDYP6R.js";import{t as w}from"./chunk-RYOLIM3I.js";import"./chunk-XMVLDQGA.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var _=r=>E(async e=>{try{let t=await S(r.registrySource,{verbose:r.verbose,local:r.local}),s=t.recipes.find(n=>n.name===r.recipeName);if(s===void 0)return c({_tag:"RecipeNotFound",message:`Recipe '${r.recipeName}' not found. Run \`eser kit list\` to see available recipes.`});let a=await N(r.cwd),i=x(s,a);for(let n of i.warnings)e.out.writeln(A(`Warning: ${n}`));let l=await C(r.recipeName,t.recipes,{cwd:r.cwd,registryUrl:t.registryUrl,force:r.force,skipExisting:r.skipExisting,dryRun:r.dryRun,verbose:r.verbose,variables:r.variables}),m=0,p=0;for(let n of l.recipes)m+=n.result.written.length,p+=n.result.skipped.length;e.out.writeln(g(`\u2713 Added ${m} file(s)`)),l.recipes.length>1&&e.out.writeln(o(` Applied ${l.recipes.length} recipes (including dependencies)`)),p>0&&e.out.writeln(o(` Skipped ${p} existing file(s)`));let f=l.recipes.find(n=>n.name===r.recipeName);if(f!==void 0)for(let n of f.result.written)e.out.writeln(` \u2192 ${n}`);let u;if(!r.noInstall&&!r.dryRun&&i.instructions.length>0){e.out.writeln(o(`
|
|
3
|
+
Installing dependencies...`)),u=await H(i.instructions,r.cwd,{verbose:r.verbose});for(let n of u)n.success?e.out.writeln(g(` \u2713 ${n.command}`)):e.out.writeln(k(` \u2717 ${n.command}: ${n.error}`))}else if(i.instructions.length>0){e.out.writeln(o(`
|
|
4
|
+
Dependencies (run manually):`));for(let n of i.instructions)e.out.writeln(o(` ${n}`))}return d({recipe:s,chainResult:l,depInfo:i,installResults:u})}catch(t){let s=t instanceof Error?t.message:String(t);return c({_tag:"ApplyError",message:s})}});var j=r=>{let e={};for(let t of r){let[s,...a]=String(t).split("=");s!==void 0&&s!==""&&(e[s]=a.join("="))}return e},B=async r=>{let e=v(r??[],{string:["registry","var"],boolean:["dry-run","force","skip-existing","verbose","local","no-install"],collect:["var"]}),t=e._[0],s=b({renderer:I.ansi(),sink:h.stdout()});if(t===void 0)return s.writeln("Usage: eser kit add <recipe> [--registry <url>] [--dry-run] [--var key=value]"),s.writeln(),s.writeln("Run ",o("`eser kit list`")," to see available recipes."),await s.close(),d(void 0);let a=e["dry-run"]===!0;a?s.writeln(y(`
|
|
5
|
+
Dry run: ${t}
|
|
6
|
+
`)):s.writeln(y(`
|
|
7
|
+
Adding ${t}...
|
|
8
|
+
`));let i=await $(_({recipeName:t,cwd:w.process.cwd(),registrySource:e.registry,local:e.local===!0,dryRun:a,force:e.force===!0,skipExisting:e["skip-existing"]===!0,verbose:e.verbose===!0,noInstall:e["no-install"]===!0,variables:j(e.var)}),{out:s});return await s.close(),R(i)?d(void 0):c({exitCode:1})};export{B as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as C}from"./chunk-7ZVGNL76.js";import{a as P,d as R}from"./chunk-6LVNPRHQ.js";import"./chunk-PDJEHSKZ.js";import{e as y}from"./chunk-ZTPERUHN.js";import{a as p}from"./chunk-LNNNLUZT.js";import{d as h,e as S,j as g,n as v}from"./chunk-U3FRSRMK.js";import"./chunk-JYNHFD6B.js";import{f,h as u,k as w}from"./chunk-NP2CCJ4C.js";import{c as n,d as c,f as l,g as m,k as d}from"./chunk-3SXTMY75.js";import{a as i}from"./chunk-A6RDYP6R.js";import{t as o}from"./chunk-RYOLIM3I.js";import"./chunk-XMVLDQGA.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var $=async E=>{let r=f({renderer:w.ansi(),sink:u.stdout()}),s=o.process.cwd(),e=await h(s),a=await g(s);if(e.phase==="SPEC_DRAFT"){if(e.classification===null&&e.spec!==null){let A=(await v(s)).filter(D=>a?.concerns.includes(D.id)??!1);try{await C(s,e,A)}catch{}}let t=y(e);await S(s,t),t.spec!==null&&(await P(s,t.spec,"approved"),await R(s,t.spec,"approved")),r.writeln(m("\u2714")," Spec approved. Phase: ",d("SPEC_APPROVED")),r.writeln("When ready, run ",n(`${p('next --answer="start"',a)}`)," to begin execution.")}else e.phase==="DISCOVERY"&&e.discovery.completed?(r.writeln(c("Discovery complete. Spec draft already generated.")),r.writeln("Review the spec and run ",n(p("approve",a))," again when in SPEC_DRAFT phase.")):r.writeln(l(`Cannot approve in phase: ${e.phase}`));return await r.close(),i(void 0)};export{$ as main};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as _,b as $}from"./chunk-GE3LJ6QM.js";import{a as F}from"./chunk-BNQAZLIQ.js";import{d as x,f as v,g as I,h as y,k as P}from"./chunk-NP2CCJ4C.js";import{d as O,e as L,g as R}from"./chunk-LCG4SK6K.js";import{a as T}from"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-J7YTWK67.js";import{d as S}from"./chunk-JPFGKN4T.js";import{a as C,b as g}from"./chunk-A6RDYP6R.js";import{t as m}from"./chunk-RYOLIM3I.js";import"./chunk-XMVLDQGA.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var k=(e,t,n)=>{let i=e.streamText(t,n);return{name:`ai-text/${e.provider}/${e.modelId}`,readable:new ReadableStream({async start(o){try{for await(let s of i)s.kind==="content_delta"&&o.enqueue(x(s.textDelta));o.close()}catch(s){o.error(s)}}})}};var Y={cc:"claude-code",ol:"ollama",oc:"opencode",oai:"openai",ant:"anthropic",gem:"gemini",vtx:"vertexai"},q={"claude-code":"Claude Code",ollama:"Ollama",opencode:"OpenCode",kiro:"Kiro",anthropic:"Anthropic API",openai:"OpenAI API",gemini:"Gemini API",vertexai:"Vertex AI"},H=e=>Y[e]??e,K=async e=>{if(e){let t=m.process.stderr.getWriter(),n=v({renderer:P.ansi(),sink:y.writable(new WritableStream({async write(i){await t.write(new TextEncoder().encode(String(i.data)))},close(){t.releaseLock()}}))});await O.configure({sinks:{stderr:R.getOutputSink(n)},loggers:[{category:["ai"],lowestLevel:T.Debug,sinks:["stderr"]}]})}return L.getLogger(["ai","ask"])},M=async e=>{await e.info("Auto-detecting AI provider...");try{if(await S`which claude`.noThrow().code()===0)return await e.info("Claude Code detected."),"claude-code"}catch{}try{if((await fetch("http://localhost:11434/api/version",{signal:AbortSignal.timeout(1e3)})).ok)return await e.info("Ollama detected at localhost:11434."),"ollama"}catch{}try{if(await S`which opencode`.noThrow().code()===0)return await e.info("OpenCode detected."),"opencode"}catch{}if(m.capabilities.env){if(m.env.has("ANTHROPIC_API_KEY"))return await e.info("Anthropic API key detected."),"anthropic";if(m.env.has("OPENAI_API_KEY"))return await e.info("OpenAI API key detected."),"openai"}throw new Error("No AI provider detected. Install claude, ollama, or set ANTHROPIC_API_KEY / OPENAI_API_KEY.")},U=async e=>{switch(e){case"claude-code":return(await import("./claude-code-T26K2CSI.js")).claudeCodeFactory;case"ollama":return(await import("./ollama-EE7S3UZE.js")).ollamaFactory;case"opencode":return(await import("./opencode-WUF4YPPD.js")).openCodeFactory;case"kiro":return(await import("./kiro-G4OHOVFL.js")).kiroFactory;case"anthropic":return(await import("./anthropic-2MXDKLNX.js")).anthropicFactory;case"openai":return(await import("./openai-EU5TJZ5T.js")).openaiFactory;case"gemini":return(await import("./gemini-F4KLO5VU.js")).geminiFactory;case"vertexai":return(await import("./vertexai-EXTYPVHK.js")).vertexaiFactory;default:throw new Error(`Unknown provider: ${e}`)}},le=async e=>{let t=e??[],n=null,i=null,o=null,s=!1,p=!1,A=[],a=0;for(;a<t.length;){let r=t[a];if(r==="-p"||r==="--provider"){n=t[a+1]??null,a+=2;continue}if(r==="-m"||r==="--model"){i=t[a+1]??null,a+=2;continue}if(r==="--max-tokens"){let c=t[a+1];c!==void 0&&(o=Number(c)),a+=2;continue}if(r==="--json"){s=!0,a+=1;continue}if(r==="-v"||r==="--verbose"){p=!0,a+=1;continue}r.startsWith("-")||A.push(r),a+=1}let f=A.join(" ");if(f.length===0)return g({message:'Usage: ai ask "your prompt" [-p provider] [-m model] [--verbose]',exitCode:1});let d=await K(p);try{let r=n!==null?H(n):await M(d),c=q[r]??r,E=i??z(r);await d.info(`Using ${c} (${E})`);let N=await U(r),w=new _({factories:[N]});await w.addModel("default",{provider:r,model:E});let h=w.getDefault();if(h===null)return g({message:"Failed to initialize model",exitCode:1});let b=[F("user",f)];if(await d.info(`Sending prompt (${f.length} chars)...`),s){let u=await h.generateText({messages:b,maxTokens:o??void 0});await d.info(`Response received (${$(u).length} chars)`);let l=v({sink:y.stdout()});l.writeln(JSON.stringify(u,null,2)),await l.close()}else{let u=k(h,{messages:b,maxTokens:o??void 0});await I().from(u).to(V()).run();let l=m.process.stdout.getWriter();await l.write(new TextEncoder().encode(`
|
|
2
3
|
`)),l.releaseLock()}return await w.close(),C(void 0)}catch(r){let c=r instanceof Error?r.message:String(r);return await d.error(c),p&&r instanceof Error&&r.cause!==void 0&&await d.debug(`Cause: ${String(r.cause)}`),g({message:c,exitCode:1})}},j=12,G=e=>new Promise(t=>setTimeout(t,e)),V=(e=j)=>{let t=new TextEncoder;return{name:"typewriter",writable:new WritableStream({async write(n){let i=String(n.data),o=m.process.stdout.getWriter();for(let s of i)await o.write(t.encode(s)),await G(e);o.releaseLock()}})}},z=e=>{switch(e){case"claude-code":return"claude-sonnet-4-20250514";case"ollama":return"llama3";case"opencode":return"default";case"kiro":return"default";case"anthropic":return"claude-sonnet-4-20250514";case"openai":return"gpt-4o";case"gemini":return"gemini-2.0-flash";case"vertexai":return"gemini-2.0-flash";default:return"default"}};export{le as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{g as k}from"./chunk-ZTPERUHN.js";import{a as g}from"./chunk-LNNNLUZT.js";import{d as w,e as f,j as h}from"./chunk-U3FRSRMK.js";import"./chunk-JYNHFD6B.js";import{f as p,h as d,k as u}from"./chunk-NP2CCJ4C.js";import{c as i,d as m,f as l,h as c}from"./chunk-3SXTMY75.js";import{a as o,b as n}from"./chunk-A6RDYP6R.js";import{t as a}from"./chunk-RYOLIM3I.js";import"./chunk-XMVLDQGA.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var $=async b=>{let e=p({renderer:u.ansi(),sink:d.stdout()}),s=a.process.cwd(),r=b?.join(" ")??"No reason given",t=await w(s),x=await h(s);if(t.phase!=="EXECUTING")return e.writeln(l(`Cannot block in phase: ${t.phase}`)),await e.close(),n({exitCode:1});let y=k(t,r);return await f(s,y),e.writeln(c("\u26A0")," Spec blocked: ",m(r)),e.writeln("Resolve with: ",i(`${g('next --answer="resolution"',x)}`)),await e.close(),o(void 0)};export{$ as main};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as s}from"./chunk-STI6DX7K.js";import{a as r}from"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var o={fs:!1,fsSync:!1,exec:!1,process:!1,env:!1,stdin:!1,stdout:!1,kv:!1},t=e=>()=>{throw new r(e,"browser")},n=()=>{let e=t("fs");return{readFile:e,readTextFile:e,writeFile:e,writeTextFile:e,exists:e,stat:e,lstat:e,mkdir:e,ensureDir:e,remove:e,readDir:e,copyFile:e,rename:e,makeTempDir:e,realPath:e,watch:e,walk:e,chmod:e}},i=()=>{let e=t("exec");return{spawn:e,exec:e,execJson:e,spawnChild:e}},a=()=>{let e=t("process");return{exit:e,setExitCode:e,cwd:e,chdir:e,hostname:e,execPath:e,get args(){throw new r("process","browser")},get pid(){throw new r("process","browser")},get stdin(){throw new r("process","browser")},get stdout(){throw new r("process","browser")},get stderr(){throw new r("process","browser")}}},c=()=>({get:()=>{},set:()=>{},delete:()=>{},has:()=>!1,toObject:()=>({})}),l=()=>({name:"browser",version:globalThis.navigator?.userAgent??"unknown",capabilities:o,fs:n(),path:s,exec:i(),env:c(),process:a()});export{o as BROWSER_CAPABILITIES,l as createBrowserRuntime};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{f as d,h as g,k as m}from"./chunk-NP2CCJ4C.js";import{b as c,d as L,h as C,k as u}from"./chunk-3SXTMY75.js";import"./chunk-PWLF3WXM.js";import{a as v}from"./chunk-5BHHLJJN.js";import"./chunk-MG65QJY6.js";import{a as y}from"./chunk-A6RDYP6R.js";import"./chunk-RYOLIM3I.js";import"./chunk-XMVLDQGA.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var V=["trace","debug","info","warn","error","fatal"],N=async x=>{let{flags:o}=v(x??[],[{name:"out-dir",type:"string",default:"dist",description:"Output directory"},{name:"clean",type:"boolean",description:"Clean output first"},{name:"no-minify",type:"boolean",description:"Disable minification"},{name:"analyze",type:"boolean",description:"Analyze bundle size"},{name:"log-level",type:"string",default:"info",description:"Log level"}]),t=d({renderer:m.ansi(),sink:g.stdout()});t.writeln(u(`
|
|
2
3
|
\u{1F4E6} Building for production...
|
|
3
|
-
`));let e=await import("./mod-
|
|
4
|
+
`));let e=await import("./mod-4ILLF5PK.js"),{runtime:n}=await import("./mod-T55CWDLD.js"),i=n.process.cwd(),p=o["out-dir"],S=!o["no-minify"],h=o.clean,k=o.analyze,f=o["log-level"]??"info",b=V.includes(f.toLowerCase())?f.toLowerCase():"info",z={trace:e.Severities.Trace,debug:e.Severities.Debug,info:e.Severities.Info,warn:e.Severities.Warning,error:e.Severities.Error,fatal:e.Severities.Critical},D=d({renderer:m.ansi(),sink:g.stdout()});await e.config.configure({sinks:{console:e.sinks.getOutputSink(D)},loggers:[{category:["laroux-bundler"],lowestLevel:z[b],sinks:["console"]}]});let[{build:A,createBuildContext:E},{loadConfig:O},{reactPlugin:B},{createTailwindPlugin:P}]=await Promise.all([import("./system-IV54LJTN.js"),import("./load-config-DVKFZVST.js"),import("./mod-EWGGLW3S.js"),import("./mod-U23K3LXJ.js")]),T=e.logger.getLogger(["laroux-bundler","cli"]),s=await O(i),r={projectRoot:i,srcDir:n.path.resolve(i,s.srcDir),distDir:n.path.resolve(i,p),logLevel:b,fonts:s.fonts,images:s.images,cssModuleTypes:s.cssModuleTypes,noCssModuleAutoReference:s.noCssModuleAutoReference,browserShims:s.browserShims,serverExternals:s.build.serverExternals,build:{...s.build,minify:S}};if(h)try{await n.fs.remove(r.distDir,{recursive:!0}),T.debug(`Cleaned ${r.distDir}`)}catch{}let R=P({globalCssPath:n.path.resolve(i,"src/app/styles/global.css")}),j=E(r,{framework:B,css:R,bundlerBackend:"rolldown"});if(await A(j),await e.config.reset(),k){t.writeln(u(`
|
|
4
5
|
\u{1F4CA} Bundle Analysis:
|
|
5
6
|
`));try{let M=`${p}/client/manifest.json`,$=await n.fs.readTextFile(M),w=JSON.parse($);t.writeln(c("Chunks:"));for(let[a,l]of Object.entries(w.files)){let I=(l.size/1024).toFixed(2);t.writeln(c(` ${a.padEnd(30)} ${I.padStart(8)} KB`))}let F=Object.values(w.files).reduce((a,l)=>a+l.size,0);t.writeln(L(`
|
|
6
7
|
Total: ${(F/1024).toFixed(2)} KB`))}catch{t.writeln(C("Could not analyze build (manifest.json not found)"))}}return await t.close(),y(void 0)};export{N as main};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as F}from"./chunk-CDPSH56U.js";import{b as v,d as b}from"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";import*as n from"node:fs/promises";import*as O from"node:fs";import*as o from"node:path";import*as w from"node:os";import m from"node:process";import{Readable as x,Writable as k}from"node:stream";var E={fs:!0,fsSync:!0,exec:!0,process:!0,env:!0,stdin:!0,stdout:!0,kv:!1},R=()=>{let s=e=>({isFile:e.isFile(),isDirectory:e.isDirectory(),isSymlink:e.isSymbolicLink(),size:e.size,mtime:e.mtime,atime:e.atime,birthtime:e.birthtime}),a=(e,t)=>{throw e instanceof Error&&"code"in e&&e.code==="ENOENT"?new v(t):e};return{async readFile(e,t){try{let r=await n.readFile(e,{signal:t?.signal});return new Uint8Array(r)}catch(r){return a(r,e)}},async readTextFile(e,t){try{return await n.readFile(e,{encoding:"utf-8",signal:t?.signal})}catch(r){return a(r,e)}},async writeFile(e,t,r){let d=r?.append?"a":"w";await n.writeFile(e,t,{signal:r?.signal,mode:r?.mode,flag:d})},async writeTextFile(e,t,r){let d=r?.append?"a":"w";await n.writeFile(e,t,{encoding:"utf-8",signal:r?.signal,mode:r?.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 s(t)}catch(t){return a(t,e)}},async lstat(e){try{let t=await n.lstat(e);return s(t)}catch(t){return a(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(r){a(r,e)}},async*readDir(e){try{let t=await n.readdir(e,{withFileTypes:!0});for(let r of t)yield{name:r.name,isFile:r.isFile(),isDirectory:r.isDirectory(),isSymlink:r.isSymbolicLink()}}catch(t){a(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??w.tmpdir(),r=e?.prefix??"",d=e?.suffix??"",i=await n.mkdtemp(o.join(t,r));if(d){let c=i+d;return await n.rename(i,c),c}return i},async realPath(e){try{return await n.realpath(e)}catch(t){throw t instanceof Error&&"code"in t&&t.code==="ENOENT"?new v(e):t}},watch(e,t){let r=t?.recursive??!0,d=[],i=[],c=[],u=!1,h=l=>{u||(c.length>0?c.shift()({value:l,done:!1}):i.push(l))};for(let l of e)try{let P=O.watch(l,{recursive:r},(y,f)=>{f!==null&&h({kind:y==="rename"?"create":"modify",paths:[o.join(l,f)]})});d.push(P)}catch{}return{close:()=>{u=!0;for(let l of d)l.close();for(let l of c)l({value:void 0,done:!0});c=[]},[Symbol.asyncIterator]:()=>({next:()=>u?Promise.resolve({value:void 0,done:!0}):i.length>0?Promise.resolve({value:i.shift(),done:!1}):new Promise(l=>{c.push(l)})})}},async chmod(e,t){await n.chmod(e,t)},async*walk(e,t){let r=t?.includeDirs??!0,d=t?.includeFiles??!0,i=t?.exts,c=t?.skip,u=async function*(h){let l=await n.readdir(h,{withFileTypes:!0});for(let P of l){let y=o.join(h,P.name);if(c?.some(p=>p.test(y)))continue;let f=P.isSymbolicLink();if(P.isDirectory())r&&(yield{path:y,name:P.name,isFile:!1,isDirectory:!0,isSymlink:f}),yield*u(y);else if(P.isFile()||f){if(!d||i&&!i.some(p=>P.name.endsWith(p.startsWith(".")?p:`.${p}`)))continue;yield{path:y,name:P.name,isFile:P.isFile(),isDirectory:!1,isSymlink:f}}}};yield*u(e)}}},S=()=>({join:o.join,resolve:o.resolve,dirname:o.dirname,basename:o.basename,extname:o.extname,normalize:o.normalize,isAbsolute:o.isAbsolute,relative:o.relative,parse:o.parse,format:o.format,sep:o.sep,delimiter:o.delimiter}),g=async s=>{if(!s)return new Uint8Array(0);let a=[],e=s.getReader();try{for(;;){let{done:i,value:c}=await e.read();if(i)break;a.push(c)}}finally{e.releaseLock()}let t=a.reduce((i,c)=>i+c.length,0),r=new Uint8Array(t),d=0;for(let i of a)r.set(i,d),d+=i.length;return r},A=()=>({async spawn(s,a=[],e){let[t,r,d]=F(e),i=Bun.spawn([s,...a],{cwd:e?.cwd,env:e?.env,stdin:t,stdout:r,stderr:d}),[c,u,h]=await Promise.all([i.exited,g(i.stdout),g(i.stderr)]);return{success:c===0,code:c,stdout:u,stderr:h}},async exec(s,a=[],e){let t=await this.spawn(s,a,e);if(!t.success){let r=new TextDecoder().decode(t.stderr);throw new b(s,t.code,r)}return new TextDecoder().decode(t.stdout).trim()},async execJson(s,a=[],e){let t=await this.exec(s,a,e);return JSON.parse(t)},spawnChild(s,a=[],e){let[t,r,d]=F(e),i=Bun.spawn([s,...a],{cwd:e?.cwd,env:e?.env,stdin:t,stdout:r,stderr:d}),c=i.exited.then(u=>({success:u===0,code:u,signal:void 0}));return{pid:i.pid,stdin:i.stdin,stdout:i.stdout,stderr:i.stderr,status:c,output:async()=>{let[u,h,l]=await Promise.all([c,g(i.stdout),g(i.stderr)]);return{success:u.success,code:u.code,stdout:h,stderr:l}},kill:u=>{i.kill(u)}}}}),W=()=>({get(s){return m.env[s]},set(s,a){m.env[s]=a},delete(s){delete m.env[s]},has(s){return s in m.env},toObject(){let s={};for(let[a,e]of Object.entries(m.env))e!==void 0&&(s[a]=e);return s}}),D=()=>({exit(s){m.exit(s)},setExitCode(s){m.exitCode=s},cwd(){return m.cwd()},chdir(s){m.chdir(s)},hostname(){return w.hostname()},execPath(){return m.execPath},args:m.argv.slice(2),pid:m.pid,stdin:x.toWeb(m.stdin),stdout:k.toWeb(m.stdout),stderr:k.toWeb(m.stderr)}),C=()=>{let s=R(),a=S(),e=A(),t=W(),r=D();return{name:"bun",version:Bun.version,capabilities:E,fs:s,path:a,exec:e,env:t,process:r}};export{E as BUN_CAPABILITIES,C as createBunRuntime};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as $,b as S}from"./chunk-V4AJMSER.js";import{a as O}from"./chunk-KLHDNHD3.js";import"./chunk-YZ4L35HK.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import{a as E}from"./chunk-2VEVVX6U.js";import{a as w,b as A}from"./chunk-C2FHTZ2Y.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as R}from"./chunk-3BEX5FYF.js";import"./chunk-NP2CCJ4C.js";import"./chunk-7DPLGQHN.js";import{b as u,f as h,g as y,h as v,i as x}from"./chunk-3SXTMY75.js";import"./chunk-JPFGKN4T.js";import{a as C}from"./chunk-MG65QJY6.js";import{g as p}from"./chunk-A6RDYP6R.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{v as m}from"./chunk-RYOLIM3I.js";import"./chunk-XMVLDQGA.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var f=w(),G={feat:"Added",fix:"Fixed",refactor:"Changed",perf:"Changed",docs:"Changed",revert:"Removed"},T=new Set(["chore","ci","test"]),N=/^(\w+)(?:\(([^)]+)\))?!?:\s{1,5}(.+)$/,I=/\s{0,100}\(take\s{1,100}[IVXLCDM\d]+\)\s{0,100}\.?$/i,P=(n,t)=>{let o=n.match(N);if(o!==null)return{type:o[1].toLowerCase(),scope:o[2],message:o[3].trim(),hash:t}},b=n=>n.replace(I,"").trim(),M=n=>{let t=[];for(let o of n){let e=P(o.subject,o.hash);e!==void 0&&t.push(e)}return t},k=n=>{let t=new Set,o=[];for(let e of n){let s=b(e.message),a=s.replace(/[.\s]{1,20}$/,"").toLowerCase(),l=`${e.type}:${a}`;t.has(l)||(t.add(l),o.push({...e,message:s}))}return o},L=n=>{let t=new Map;for(let o of n){if(T.has(o.type))continue;let e=G[o.type];if(e===void 0)continue;let s=t.get(e);s!==void 0?s.push(o):t.set(e,[o])}return t},F=n=>n.scope!==void 0?`- **${n.scope}:** ${n.message}`:`- ${n.message}`,H=(n,t)=>{let o=L(t);if(o.size===0){let l=new Date().toISOString().split("T")[0];return`## ${n} - ${l}
|
|
3
|
+
|
|
4
|
+
_Maintenance release._`}let e=new Date().toISOString().split("T")[0],s=[`## ${n} - ${e}`],a=["Added","Changed","Fixed","Removed"];for(let l of a){let r=o.get(l);if(!(r===void 0||r.length===0)){s.push("",`### ${l}`,"");for(let g of r)s.push(F(g))}}return s.join(`
|
|
5
|
+
`)},j=(n,t,o)=>{let e=n.split(`
|
|
6
|
+
`);if(o!==void 0){let r=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),g=new RegExp(`^##\\s+${r}\\b`),i=e.findIndex(d=>g.test(d));if(i!==-1){let d=e.length;for(let c=i+1;c<e.length;c++)if(/^##\s+/.test(e[c])){d=c;break}return e.splice(i,d-i,t),e.join(`
|
|
7
|
+
`)}}let s=e.findIndex(r=>/^##\s+\[Unreleased\]/i.test(r));if(s===-1){let r=e.findIndex((i,d)=>d>0&&i.startsWith("## ")),g=r===-1?e.length:r;return e.splice(g,0,"",t,""),e.join(`
|
|
8
|
+
`)}let a=-1;for(let r=s+1;r<e.length;r++)if(/^##\s+/.test(e[r])){a=r;break}let l=a===-1?e.length:a;return e.splice(l,0,t,""),e.join(`
|
|
9
|
+
`)},_=async(n={})=>{let{root:t=".",dryRun:o=!1}=n,e=await O({root:t});if(e===void 0||e==="")throw new Error("VERSION file is missing or empty.");let s;try{s=await $()}catch{throw new Error("No git tags found. Create an initial tag first (e.g., git tag v0.0.0).")}let a=await S(s,"HEAD");if(a.length===0)throw new Error(`No commits found since ${s}. Nothing to release.`);let l=M(a),r=k(l),g=H(e,r);if(!o){let i=m.runtime.path.join(t,"CHANGELOG.md"),d;try{d=await m.runtime.fs.readTextFile(i)}catch{throw new Error(`CHANGELOG.md not found at ${i}. Create one first.`)}let c=j(d,g,e);await m.runtime.fs.writeTextFile(i,c)}return{version:e,commitCount:a.length,entryCount:r.filter(i=>!T.has(i.type)).length,content:g,dryRun:o}},D=n=>R.fromPromise(()=>_(n)),V=n=>p.ok({dryRun:n.flags["dry-run"]===!0}),z=n=>{if(p.isFail(n))return f.writeln(h("\u2717"),u(" "+(n.error instanceof Error?n.error.message:String(n.error)))),p.fail({exitCode:1});let{value:t}=n;return t.dryRun?(f.writeln(v("\u26A0"),u(" [DRY RUN] Generated changelog preview:")),f.writeln(x("\u2139"),u(`
|
|
10
|
+
${t.content}`))):f.writeln(y("\u2713"),u(` Added ${t.entryCount} entries to CHANGELOG.md for v${t.version}`)),p.ok(void 0)},B=E.createTrigger({handler:D,adaptInput:V,adaptOutput:z}),ee=async n=>{let t=C(n??[],{boolean:["dry-run"],alias:{n:"dry-run"}}),o=A("changelog-gen",t);return await B(o)};export{k as deduplicateCommits,_ as generateChangelog,D as generateChangelogHandler,H as generateChangelogSection,L as groupBySection,B as handleCli,j as insertIntoChangelog,ee as main,P as parseConventionalCommit,M as parseConventionalCommits,b as stripTakeSuffix};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as v,b as N,c as H,l as D,m as h}from"./chunk-7ATUODBM.js";import{a as x,b as p,c as u,e as A,f as P}from"./chunk-AP72BKVG.js";function L(e){e instanceof URL&&(e=v(e)),p(e);let r=-1,t=0,i=-1,n=!0,o=0;for(let s=e.length-1;s>=0;--s){let f=e.charCodeAt(s);if(u(f)){if(!n){t=s+1;break}continue}i===-1&&(n=!1,i=s+1),f===46?r===-1?r=s:o!==1&&(o=1):r!==-1&&(o=-1)}return r===-1||i===-1||o===0||o===1&&r===i-1&&r===t+1?"":e.slice(r,i)}function T(e){e instanceof URL&&(e=H(e)),p(e);let r=0,t=-1,i=0,n=-1,o=!0,s=0;e.length>=2&&e.charCodeAt(1)===58&&P(e.charCodeAt(0))&&(r=i=2);for(let f=e.length-1;f>=r;--f){let c=e.charCodeAt(f);if(A(c)){if(!o){i=f+1;break}continue}n===-1&&(o=!1,n=f+1),c===46?t===-1?t=f:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===i+1?"":e.slice(t,n)}function j(e){return x?T(e):L(e)}function w(e,r){let t=r.dir||r.root,i=r.base||(r.name??"")+(r.ext??"");return t?i===e?t:t===r.root?t+i:t+e+i:i}function R(e){if(e===null||typeof e!="object")throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof e}"`)}function W(e){return R(e),w("/",e)}function E(e){return R(e),w("\\",e)}function le(e){return x?E(e):W(e)}function O(e){p(e);let r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;let t=u(e.charCodeAt(0)),i;t?(r.root="/",i=1):i=0;let n=-1,o=0,s=-1,f=!0,c=e.length-1,d=0;for(;c>=i;--c){let l=e.charCodeAt(c);if(u(l)){if(!f){o=c+1;break}continue}s===-1&&(f=!1,s=c+1),l===46?n===-1?n=c:d!==1&&(d=1):n!==-1&&(d=-1)}return n===-1||s===-1||d===0||d===1&&n===s-1&&n===o+1?(s!==-1&&(o===0&&t?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(o,s)),r.base=r.base||"/"):(o===0&&t?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(o,n),r.base=e.slice(o,s)),r.ext=e.slice(n,s)),o>0?r.dir=N(e.slice(0,o-1),u):t&&(r.dir="/"),r}function y(e){p(e);let r={root:"",dir:"",base:"",ext:"",name:""},t=e.length;if(t===0)return r;let i=0,n=e.charCodeAt(0);if(t>1){if(A(n)){if(i=1,A(e.charCodeAt(1))){let a=2,m=a;for(;a<t&&!A(e.charCodeAt(a));++a);if(a<t&&a!==m){for(m=a;a<t&&A(e.charCodeAt(a));++a);if(a<t&&a!==m){for(m=a;a<t&&!A(e.charCodeAt(a));++a);a===t?i=a:a!==m&&(i=a+1)}}}}else if(P(n)&&e.charCodeAt(1)===58)if(i=2,t>2){if(A(e.charCodeAt(2))){if(t===3)return r.root=r.dir=e,r.base="\\",r;i=3}}else return r.root=r.dir=e,r}else if(A(n))return r.root=r.dir=e,r.base="\\",r;i>0&&(r.root=e.slice(0,i));let o=-1,s=i,f=-1,c=!0,d=e.length-1,l=0;for(;d>=i;--d){if(n=e.charCodeAt(d),A(n)){if(!c){s=d+1;break}continue}f===-1&&(c=!1,f=d+1),n===46?o===-1?o=d:l!==1&&(l=1):o!==-1&&(l=-1)}return o===-1||f===-1||l===0||l===1&&o===f-1&&o===s+1?f!==-1&&(r.base=r.name=e.slice(s,f)):(r.name=e.slice(s,o),r.base=e.slice(s,f),r.ext=e.slice(o,f)),r.base=r.base||"\\",s>0&&s!==i?r.dir=e.slice(0,s-1):r.dir=r.root,r}function we(e){return x?y(e):O(e)}function k(e,r){if(p(e),p(r),e===r)return""}function U(e,r){if(k(e,r),e=D(e),r=D(r),e===r)return"";let t=1,i=e.length;for(;t<i&&u(e.charCodeAt(t));++t);let n=i-t,o=1,s=r.length;for(;o<s&&u(r.charCodeAt(o));++o);let f=s-o,c=n<f?n:f,d=-1,l=0;for(;l<=c;++l){if(l===c){if(f>c){if(u(r.charCodeAt(o+l)))return r.slice(o+l+1);if(l===0)return r.slice(o+l)}else n>c&&(u(e.charCodeAt(t+l))?d=l:l===0&&(d=0));break}let m=e.charCodeAt(t+l),g=r.charCodeAt(o+l);if(m!==g)break;u(m)&&(d=l)}let a="";for(l=t+d+1;l<=i;++l)(l===i||u(e.charCodeAt(l)))&&(a.length===0?a+="..":a+="/..");return a.length>0?a+r.slice(o+d):(o+=d,u(r.charCodeAt(o))&&++o,r.slice(o))}function z(e,r){k(e,r);let t=h(e),i=h(r);if(t===i||(e=t.toLowerCase(),r=i.toLowerCase(),e===r))return"";let n=0,o=e.length;for(;n<o&&e.charCodeAt(n)===92;++n);for(;o-1>n&&e.charCodeAt(o-1)===92;--o);let s=o-n,f=0,c=r.length;for(;f<c&&r.charCodeAt(f)===92;++f);for(;c-1>f&&r.charCodeAt(c-1)===92;--c);let d=c-f,l=s<d?s:d,a=-1,m=0;for(;m<=l;++m){if(m===l){if(d>l){if(r.charCodeAt(f+m)===92)return i.slice(f+m+1);if(m===2)return i.slice(f+m)}s>l&&(e.charCodeAt(n+m)===92?a=m:m===2&&(a=3));break}let _=e.charCodeAt(n+m),G=r.charCodeAt(f+m);if(_!==G)break;_===92&&(a=m)}if(m!==l&&a===-1)return i;let g="";for(a===-1&&(a=0),m=n+a+1;m<=o;++m)(m===o||e.charCodeAt(m)===92)&&(g.length===0?g+="..":g+="\\..");return g.length>0?g+i.slice(f+a,c):(f+=a,i.charCodeAt(f)===92&&++f,i.slice(f,c))}function ze(e,r){return x?z(e,r):U(e,r)}export{j as a,le as b,we as c,ze as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as o}from"./chunk-EZE3F4PG.js";var n=[{id:"status_quo",text:"What does the user do today without this feature?",concerns:["product:status_quo","eng:replace_scope","qa:regression_risk"]},{id:"ambition",text:"Describe the 1-star and 10-star versions.",concerns:["product:scope_direction","eng:complexity_tier","qa:test_depth"]},{id:"reversibility",text:"Does this change involve an irreversible decision?",concerns:["product:one_way_door","eng:migration_strategy","qa:verification_stringency"]},{id:"user_impact",text:"Does this change affect existing users' behavior?",concerns:["product:breaking_change","eng:backward_compat","qa:regression_tests"]},{id:"verification",text:"How do you verify this works correctly?",concerns:["product:success_metric","eng:test_strategy","qa:acceptance_criteria"]},{id:"scope_boundary",text:"What should this feature NOT do?",concerns:["product:focus","eng:out_of_scope","qa:negative_tests"]}],a=t=>n.map(e=>({...e,extras:o(t,e.id)})),c=(t,e)=>{let r=new Set(e.map(s=>s.questionId));for(let s of t)if(!r.has(s.id))return s;return null},d=t=>{let e=new Set(t.map(r=>r.questionId));return n.every(r=>e.has(r.id))};export{n as a,a as b,c,d};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as o,d as l}from"./chunk-3BEX5FYF.js";import{d as n}from"./chunk-A6RDYP6R.js";import{d as E}from"./chunk-G6NAG2EK.js";var i={};E(i,{adaptError:()=>d,bind:()=>u,createTrigger:()=>c});var d=(e,r)=>({_tag:"AdaptError",message:e,source:r}),u=(e,r)=>s=>{let t=r(s);return n(t)?o(t.error):e(t.value)},c=e=>async(r,...s)=>{let t=u(e.handler,e.adaptInput),p=await l(t(r),...s);return e.adaptOutput(p)};export{i as a};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as i,b as n,c as u,d as R}from"./chunk-A6RDYP6R.js";import{d as y}from"./chunk-G6NAG2EK.js";var U={};y(U,{all:()=>A,allPar:()=>O,failTask:()=>d,flatMap:()=>v,flatMapW:()=>w,fromPromise:()=>x,map:()=>k,provideContext:()=>P,runTask:()=>g,succeed:()=>m,task:()=>a,validate:()=>C,withAbort:()=>b,withLogging:()=>h,withRetry:()=>z,withTimeout:()=>F});var c=async(r,t,s=0)=>{let e=n(new Error("No attempts made"));for(let o=0;o<t;o++){if(e=await r(),u(e))return e;o<t-1&&s>0&&await new Promise(l=>setTimeout(l,s))}return e};var E=async(r,t,s)=>{let e=null,o=new Promise(l=>{e=setTimeout(()=>l(n(s)),t)});try{return await Promise.race([r(),o])}finally{e!==null&&clearTimeout(e)}};var a=r=>({_tag:"Task",execute:r}),m=r=>a(()=>Promise.resolve(i(r))),d=r=>a(()=>Promise.resolve(n(r))),x=(r,t=s=>s)=>a(async()=>{try{return i(await r())}catch(s){return n(t(s))}}),k=(r,t)=>a(async s=>{let e=await r.execute(s);return u(e)?i(t(e.value)):e}),v=(r,t)=>a(async s=>{let e=await r.execute(s);return R(e)?e:t(e.value).execute(s)}),w=(r,t)=>a(async s=>{let e=await r.execute(s);return R(e)?e:t(e.value).execute(s)}),g=(r,...t)=>r.execute(t[0]),P=(r,t)=>a(()=>r.execute(t)),b=(r,t)=>a(async s=>{let{signal:e}=s,o=s;if(e.aborted)return n({_tag:"AbortError",message:"Operation was already aborted"});let l;try{let p=new Promise(T=>{e.addEventListener("abort",()=>T(n({_tag:"AbortError",message:"Operation aborted"})),{once:!0}),t>0&&(l=setTimeout(()=>T(n({_tag:"AbortError",message:`Operation timed out after ${t}ms`})),t))});return await Promise.race([r.execute(o),p])}finally{l!==void 0&&clearTimeout(l)}}),h=(r,t)=>a(async s=>{let{logger:e}=s,o=s;e.info(`[${t}] started`);let l=await r.execute(o);return u(l)?e.info(`[${t}] completed`):e.error(`[${t}] failed`,{error:l.error}),l}),C=(r,t)=>s=>r(s)?m(s):d({_tag:"ValidationError",message:t}),A=r=>a(async t=>{let s=[];for(let e of r){let o=await e.execute(t);if(R(o))return o;s.push(o.value)}return i(s)}),O=r=>a(async t=>{let s=await Promise.all(r.map(o=>o.execute(t))),e=[];for(let o of s){if(R(o))return o;e.push(o.value)}return i(e)}),z=(r,t,s=0)=>a(e=>c(()=>r.execute(e),t,s)),F=(r,t,s)=>a(e=>E(()=>r.execute(e),t,s));export{a,d as b,x as c,g as d,F as e,U as f};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{t as n}from"./chunk-RYOLIM3I.js";var o=()=>n.env.get("HOME")??"",s=()=>{let e=n.env.get("SHELL")??"";return e.includes("zsh")?"zsh":e.includes("fish")?"fish":"bash"},l=e=>{let t=o();switch(e){case"zsh":return n.path.join(t,".zshrc");case"bash":return n.path.join(t,".bashrc");case"fish":return n.path.join(t,".config","fish","config.fish")}},c=(e,t)=>{let i=o();switch(e){case"zsh":return n.path.join(i,".zshrc");case"bash":return n.path.join(i,".bashrc");case"fish":return n.path.join(i,".config","fish","completions",`${t}.fish`)}},a=(e,t)=>`eval "$(${t} system completions --shell ${e})"`,h=e=>e==="fish"?"file":"eval",f=(e,t="eser")=>{let i=e??s(),r=h(i);return{shell:i,rcFile:l(i),completionType:r,completionsFile:r==="file"?c(i,t):void 0}},g=["CLAUDE_CODE","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_SESSION_ID","CURSOR_SESSION","CURSOR","KIRO_SESSION","KIRO","WINDSURF_SESSION","GITHUB_COPILOT"],p=()=>{for(let e of g){let t=n.env.get(e);if(t!==void 0&&t!=="")return"agent"}return"human"};export{s as a,a as b,f as c,p as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{d as p}from"./chunk-G6NAG2EK.js";var L={};p(L,{alert:()=>A,blue:()=>b,bold:()=>d,codeBlock:()=>x,color:()=>r,cyan:()=>m,dim:()=>i,gauge:()=>T,gray:()=>w,green:()=>h,group:()=>s,italic:()=>S,list:()=>G,magenta:()=>I,nl:()=>u,normalize:()=>a,plainLength:()=>t,red:()=>g,separator:()=>v,strikethrough:()=>y,table:()=>B,text:()=>o,underline:()=>c,white:()=>C,yellow:()=>k});var a=n=>n.map(e=>typeof e=="string"?o(e):e),o=n=>({kind:"text",value:n}),d=(...n)=>({kind:"bold",children:a(n)}),i=(...n)=>({kind:"dim",children:a(n)}),S=(...n)=>({kind:"italic",children:a(n)}),c=(...n)=>({kind:"underline",children:a(n)}),y=(...n)=>({kind:"strikethrough",children:a(n)}),s=(...n)=>({kind:"group",children:a(n)}),u=()=>({kind:"newline"}),r=(n,...e)=>({kind:"color",color:n,children:a(e)}),g=(...n)=>r("red",...n),h=(...n)=>r("green",...n),k=(...n)=>r("yellow",...n),b=(...n)=>r("blue",...n),I=(...n)=>r("magenta",...n),m=(...n)=>r("cyan",...n),w=(...n)=>r("gray",...n),C=(...n)=>r("white",...n),x=(n,e)=>({kind:"code-block",language:e,value:n}),B=(n,e)=>({kind:"table",headers:a(n),rows:e.map(l=>a(l))}),G=n=>({kind:"list",items:n.map(e=>a(e))}),T=(n,e)=>({kind:"gauge",percent:Math.max(0,Math.min(100,n)),width:e?.width,label:e?.label}),v=n=>({kind:"separator",label:n}),A=(n,...e)=>({kind:"alert",level:n,children:a(e)}),t=n=>{switch(n.kind){case"text":return n.value.length;case"newline":return 1;case"bold":case"dim":case"italic":case"underline":case"strikethrough":case"color":case"group":return n.children.reduce((e,l)=>e+t(l),0);case"code-block":return n.value.length;case"table":case"list":return 0;case"gauge":{let e=n.width??20,l=n.label?` ${n.label}`:"";return e+` ${n.percent}%`.length+l.length}case"separator":return 0;case"alert":return 2+n.children.reduce((e,l)=>e+t(l),0)}};export{a,o as b,d as c,i as d,s as e,g as f,h as g,k as h,b as i,I as j,m as k,w as l,B as m,A as n,t as o,L as p};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
1
2
|
function c(s){if(new.target)throw new TypeError("Cannot create an instance: parse is not a constructor");return new o(s).parse()}var o=class{#i=new Set(` \r
|
|
2
3
|
`);#o=new Set([..."[]{}:,/",...this.#i]);#e;#r;#n;constructor(e){this.#e=`${e}`,this.#r=this.#e.length,this.#n=this.#h()}parse(){let e=this.#t(),t=this.#s(e),{done:r,value:i}=this.#n.next();if(!r)throw new SyntaxError(n(i));return t}#t(){let{done:e,value:t}=this.#n.next();if(e)throw new SyntaxError("Cannot parse JSONC: unexpected end of JSONC input");return t}*#h(){for(let e=0;e<this.#r;e++)if(!this.#i.has(this.#e[e])){if(this.#e[e]==="/"&&this.#e[e+1]==="*"){e+=2;let t=!1;for(;e<this.#r;e++)if(this.#e[e]==="*"&&this.#e[e+1]==="/"){t=!0;break}if(!t)throw new SyntaxError("Cannot parse JSONC: unexpected end of JSONC input");e++;continue}if(this.#e[e]==="/"&&this.#e[e+1]==="/"){for(e+=2;e<this.#r&&!(this.#e[e]===`
|
|
3
4
|
`||this.#e[e]==="\r");e++);continue}switch(this.#e[e]){case"{":yield{type:"BeginObject",position:e};break;case"}":yield{type:"EndObject",position:e};break;case"[":yield{type:"BeginArray",position:e};break;case"]":yield{type:"EndArray",position:e};break;case":":yield{type:"NameSeparator",position:e};break;case",":yield{type:"ValueSeparator",position:e};break;case'"':{let t=e,r=!1;for(e++;e<this.#r&&!(this.#e[e]==='"'&&!r);e++)r=this.#e[e]==="\\"&&!r;yield{type:"String",sourceText:this.#e.substring(t,e+1),position:t};break}default:{let t=e;for(;e<this.#r&&!this.#o.has(this.#e[e]);e++);e--,yield{type:"NullOrTrueOrFalseOrNumber",sourceText:this.#e.substring(t,e+1),position:t}}}}}#s(e){switch(e.type){case"BeginObject":return this.#c();case"BeginArray":return this.#u();case"NullOrTrueOrFalseOrNumber":return this.#p(e);case"String":return this.#a(e);default:throw new SyntaxError(n(e))}}#c(){let e={};for(;;){let t=this.#t();if(t.type==="EndObject")return e;if(t.type!=="String")throw new SyntaxError(n(t));let r=this.#a(t),i=this.#t();if(i.type!=="NameSeparator")throw new SyntaxError(n(i));let h=this.#t();Object.defineProperty(e,r,{value:this.#s(h),writable:!0,enumerable:!0,configurable:!0});let a=this.#t();if(a.type==="EndObject")return e;if(a.type!=="ValueSeparator")throw new SyntaxError(n(a))}}#u(){let e=[];for(;;){let t=this.#t();if(t.type==="EndArray")return e;e.push(this.#s(t));let r=this.#t();if(r.type==="EndArray")return e;if(r.type!=="ValueSeparator")throw new SyntaxError(n(r))}}#a(e){let t;try{t=JSON.parse(e.sourceText)}catch{throw new SyntaxError(n(e))}if(typeof t!="string")throw new TypeError(`Parsed value is not a string: ${t}`);return t}#p(e){if(e.sourceText==="null")return null;if(e.sourceText==="true")return!0;if(e.sourceText==="false")return!1;let t;try{t=JSON.parse(e.sourceText)}catch{throw new SyntaxError(n(e))}if(typeof t!="number")throw new TypeError(`Parsed value is not a number: ${t}`);return t}};function n({type:s,sourceText:e,position:t}){let r="";switch(s){case"BeginObject":r="{";break;case"EndObject":r="}";break;case"BeginArray":r="[";break;case"EndArray":r="]";break;case"NameSeparator":r=":";break;case"ValueSeparator":r=",";break;case"NullOrTrueOrFalseOrNumber":case"String":r=30<e.length?`${e.slice(0,30)}...`:e;break}return`Cannot parse JSONC: unexpected token "${r}" in JSONC at position ${t}`}export{c as a};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as b,b as w,d as F,f as D}from"./chunk-YZ4L35HK.js";import{a as C}from"./chunk-2VEVVX6U.js";import{a as h}from"./chunk-C2FHTZ2Y.js";import{f as R}from"./chunk-3BEX5FYF.js";import{b as l,f as m,g as k,h as A,i as g}from"./chunk-3SXTMY75.js";import{g as d}from"./chunk-A6RDYP6R.js";var x=(e,r)=>{let o={},t=e.length;for(let s=0;s<t;s++){let n=e[s],a=r(n);o[a]===void 0?o[a]=[n]:o[a].push(n)}return o};var u=h(),P=(e,r)=>e===r?!0:typeof e!=typeof r||typeof e!="object"||e===null||r===null?!1:JSON.stringify(e)===JSON.stringify(r),O=(e,r)=>e[r],j=e=>e.startsWith("npm:@jsr/"),B=e=>{let r=e.slice(9),o=r.indexOf("__");if(o===-1)throw new Error(`Invalid npm JSR format: ${e}`);let t=r.slice(0,o),s=r.slice(o+2),n=s.indexOf("@"),a,p;return n===-1?(a=s,p=""):(a=s.slice(0,n),p=s.slice(n)),`jsr:@${t}/${a}${p}`},_=(e,r)=>j(r)?B(r):r.startsWith("npm:")?r:`npm:${e}@${r}`,S=e=>e==="workspace:*"||e.startsWith("workspace:"),M=(e,r,o)=>{let t=[],s=r.dependencies??{},n=r.devDependencies??{},a={...s,...n},p=o.imports??{};for(let[y,c]of Object.entries(a)){if(S(c))continue;let f=_(y,c),i=p[y];i===void 0?t.push({packageName:e,dependencyName:y,issue:"missing_in_deno",expected:f}):i!==f&&t.push({packageName:e,dependencyName:y,issue:"version_mismatch",expected:f,actual:i})}for(let[y,c]of Object.entries(p))a[y]===void 0&&t.push({packageName:e,dependencyName:y,issue:"missing_in_package",actual:p[y]});return t},G=async(e,r)=>{let o=[],t=[],s=await w({baseDir:e,includeFiles:[b.DenoJson,b.PackageJson]}),n=s._loadedFiles.find(c=>c.fileType===b.DenoJson),a=s._loadedFiles.find(c=>c.fileType===b.PackageJson);if(n===void 0||a===void 0)return{inconsistencies:[],dependencyInconsistencies:[]};let p=["name","version","exports"];for(let c of p){let f=O(n.content,c),i=O(a.content,c);f===void 0||i===void 0||P(f,i)||o.push({packageName:r,field:c,denoValue:f,packageValue:i})}let y=M(r,a.content,n.content);return t.push(...y),{inconsistencies:o,dependencyInconsistencies:t}},K=async(e={})=>{let{root:r=".",failFast:o=!1}=e,[t,s]=await D(r),n=[],a=[],p=0;for(let c of s){let f=F(c.config);try{let i=await G(f,c.name);if(p++,i.inconsistencies.length>0&&n.push(...i.inconsistencies),i.dependencyInconsistencies.length>0&&a.push(...i.dependencyInconsistencies),o&&(i.inconsistencies.length>0||i.dependencyInconsistencies.length>0))return{isConsistent:!1,inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}}catch{continue}}return{isConsistent:!(n.length>0||a.length>0),inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}},v=e=>typeof e=="string"?`"${e}"`:JSON.stringify(e,null,2),H=e=>{switch(e.issue){case"missing_in_deno":return`Missing in deno.json imports. Expected: ${e.expected}`;case"missing_in_package":return`Extra in deno.json imports (not in package.json): ${e.actual}`;case"version_mismatch":return`Version mismatch. Expected: ${e.expected}, Actual: ${e.actual}`}},L=e=>R.fromPromise(()=>K(e)),$=e=>d.ok({root:"."}),N=e=>{if(d.isFail(e))return u.writeln(m("\u2717"),l(" "+String(e.error))),d.fail({exitCode:1});let{value:r}=e;if(u.writeln(g("\u2139"),l(` Checked ${r.packagesChecked} packages.`)),!r.isConsistent){if(r.inconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.inconsistencies.length} field inconsistencies:`));let o=x(r.inconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.field} mismatch:`)),u.writeln(g("\u2139"),l(` deno.json: ${v(n.denoValue)}`)),u.writeln(g("\u2139"),l(` package.json: ${v(n.packageValue)}`))}}if(r.dependencyInconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.dependencyInconsistencies.length} dependency inconsistencies:`));let o=x(r.dependencyInconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.dependencyName}:`)),u.writeln(g("\u2139"),l(` ${H(n)}`))}}return d.fail({exitCode:1})}return u.writeln(k("\u2713"),l(" All package configs are consistent.")),d.ok(void 0)},J=C.createTrigger({handler:L,adaptInput:$,adaptOutput:N}),qn=async e=>await J({command:"validate-package-configs",args:[],flags:{}});export{K as a,L as b,J as c,qn as d};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as $}from"./chunk-VXTKQXGM.js";import{e as x}from"./chunk-LCG4SK6K.js";import{t as c}from"./chunk-RYOLIM3I.js";import{Scanner as ie}from"@tailwindcss/oxide";import{compile as j}from"tailwindcss";async function L(e,s){if(e.startsWith(".")||e.startsWith("/")){let r=c.path.resolve(s,e),n=await c.fs.readTextFile(r);return{path:r,content:n,base:c.path.dirname(r)}}let t=s;for(;t!=="/"&&t!=="";){let r=c.path.resolve(t,"node_modules",e);try{let n=await c.fs.readTextFile(r);return{path:r,content:n,base:c.path.dirname(r)}}catch{if(!e.endsWith(".css")){let a=`${r}.css`;try{let o=await c.fs.readTextFile(a);return{path:a,content:o,base:c.path.dirname(a)}}catch{}}let n=c.path.resolve(t,"node_modules",e,"index.css");try{let a=await c.fs.readTextFile(n);return{path:n,content:a,base:c.path.dirname(n)}}catch{t=c.path.dirname(t)}}}let l=c.path.resolve(s,e),i=await c.fs.readTextFile(l);return{path:l,content:i,base:c.path.dirname(l)}}async function w(e,s){let t=await j(e,{base:s.base,loadStylesheet:L}),l=s.candidates??[];return t.build(l)}function v(e,s){return w(e,{base:s,candidates:[]})}var R=["theme","base","properties"],P=[/^\.(flex|grid|block|inline|hidden)/,/^\.(items-|justify-|gap-|space-)/,/^\.(w-|h-|min-h-|max-w-)/,/^\.(p-|px-|py-|pt-|pb-|pl-|pr-)/,/^\.(m-|mx-|my-|mt-|mb-|ml-|mr-)/,/^\.(text-|font-|leading-)/,/^\.(bg-|border-)/,/^\.(from-|via-|to-)/,/^\.(container|wrapper)/,/^\.(rounded|shadow)/,/^\.(overflow-)/,/^\.(sm:|md:|lg:|xl:)/],B=[/--tw-gradient/,/--tw-rotate/,/--tw-scale/,/--tw-skew/,/--tw-translate/,/--tw-shadow/,/--tw-ring/,/--tw-blur/,/--tw-brightness/];function N(){return{criticalLayers:R,aboveFoldPatterns:P,forceInclude:[],forceExclude:[]}}var b=x.getLogger(["laroux-bundler","critical-page-css"]);function W(e,s){let t=s;for(;t<e.length&&e[t]!=="{";)t++;if(t>=e.length)return null;let l=t+1,i=1;for(t++;t<e.length&&i>0;)e[t]==="{"?i++:e[t]==="}"&&i--,t++;return{innerContent:e.slice(l,t-1).trim(),end:t}}function V(e){let s=[],t="@keyframes",l=0;for(;l<e.length;){let i=e.indexOf(t,l);if(i===-1)break;let r=i+t.length;for(;r<e.length&&/\s/.test(e[r]??"");)r++;let n=r;for(;n<e.length&&e[n]!=="{"&&!/\s/.test(e[n]??"");)n++;let a=e.slice(r,n),o=n;for(;o<e.length&&e[o]!=="{";)o++;if(o>=e.length){l=e.length;break}let g=1,u=o+1;for(;u<e.length&&g>0;)e[u]==="{"?g++:e[u]==="}"&&g--,u++;let d=e.slice(i,u);s.push({name:a,block:d}),l=u}return s}function Z(e){let s=new Map,t=new Map,l=new Map,i=/@layer\s+([a-zA-Z_-][a-zA-Z0-9_-]*)\s*[{;]/g,r;for(;(r=i.exec(e))!==null;){let n=r[1];if(n===void 0||r[0].endsWith(";"))continue;let a=W(e,r.index+r[0].length-1);a&&(t.has(n)||(t.set(n,[]),l.set(n,{start:r.index,end:a.end})),t.get(n).push(a.innerContent),l.get(n).end=a.end)}for(let[n,a]of t){let o=a.join(`
|
|
2
3
|
`),g=l.get(n);s.set(n,{block:`@layer ${n} {
|
|
3
4
|
${o}
|
|
4
5
|
}`,start:g.start,end:g.end})}return s}function Y(e){let s=[],t=0;for(;t<e.length;){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)break;let l=t;for(;t<e.length&&e[t]!=="{";)t++;if(t>=e.length)break;let i=e.slice(l,t).trim();if(!i){t++;continue}let r=1;for(t++;t<e.length&&r>0;)e[t]==="{"?r++:e[t]==="}"&&r--,t++;let n=e.slice(l,t);i.startsWith("@media")||i.startsWith("@supports")?s.push({selector:"@media",full:n}):i&&!i.startsWith("@")&&s.push({selector:i,full:n})}return s}function H(e,s){let t=e.match(/\.([a-zA-Z_-][a-zA-Z0-9_\-\\:/.[\]]*)/g);if(t)for(let r of t){let n=r.substring(1);if(n=n.replace(/\\/g,""),n=n.split(":")[0]??"",n&&new RegExp(`class=["'][^"']*\\b${q(n)}\\b`,"i").test(s))return!0}let l=e.match(/^([a-zA-Z][a-zA-Z0-9-]*)/);if(l&&l[1]){let r=l[1].toLowerCase();if(new RegExp(`<${r}[\\s>]`,"i").test(s))return!0}let i=e.match(/#([a-zA-Z_-][a-zA-Z0-9_-]*)/g);if(i)for(let r of i){let n=r.substring(1);if(new RegExp(`id=["']${n}["']`,"i").test(s))return!0}return!1}function q(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function z(e,s){return s.some(t=>typeof t=="string"?e.includes(t):t.test(e))}function K(e){return P.some(s=>s.test(e))}function k(e){let{html:s,css:t,forceInclude:l=[],forceExclude:i=[]}=e;b.debug("Extracting critical page CSS (Tailwind v4 aware)...");let r=[],n=[],a=0,o=0,g=t.match(/^\/\*![\s\S]*?\*\//);g&&r.push(g[0]);let u=t.match(/@layer\s+[\w,-]{1,200}(?:\s+[\w,-]{1,50})*\s*;/);u&&r.push(u[0]);let d=/@property\s+--[\w-]+\s*\{[^}]{0,5000}\}/g,f=t.match(d)??[];f.length>0&&(r.push(f.join(`
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{c as y,d as h,e as k,f as T}from"./chunk-TDQRRGDJ.js";import{a as m,e as p}from"./chunk-J7YTWK67.js";var c=class{capabilities=["text_generation","streaming","tool_calling","vision","audio","structured_output","reasoning"];provider="vertexai";modelId;client;config;constructor(e,t){this.client=e,this.config=t,this.modelId=t.model}async generateText(e,t){let r=x(this.config,e);try{let o=await this.client.models.generateContent({model:this.config.model,...r,config:{...r.config,httpOptions:t!==void 0?{signal:t}:void 0}});return k(o,this.modelId)}catch(o){throw v(o)}}async*streamText(e,t){let r=x(this.config,e);try{let o=await this.client.models.generateContentStream({model:this.config.model,...r,config:{...r.config,httpOptions:t!==void 0?{signal:t}:void 0}}),a=0,s=0;for await(let l of o){let g=l?.candidates??[];if(g.length>0){let f=g[0],C=f?.content?.parts??[];for(let i of C)i.text!==void 0&&(yield{kind:"content_delta",textDelta:i.text}),i.functionCall!==void 0&&(yield{kind:"tool_call_delta",toolCall:{id:i.functionCall.name,name:i.functionCall.name,arguments:i.functionCall.args??{}}});let d=f?.finishReason;if(d!=null){let i=l?.usageMetadata;a=i?.promptTokenCount??a,s=i?.candidatesTokenCount??s;let u="end_turn";d==="MAX_TOKENS"&&(u="max_tokens"),yield{kind:"message_done",stopReason:u,usage:{inputTokens:a,outputTokens:s,totalTokens:a+s}}}}}}catch(o){yield{kind:"error",error:v(o)}}}async close(){}getRawClient(){return this.client}},w={provider:"vertexai",async createModel(n){let{GoogleGenAI:e}=await import("./node-KCQF6QQA.js"),t={vertexai:!0,project:n.projectId,location:n.location??"us-central1"};n.apiKey!==void 0&&(t.apiKey=n.apiKey);let r=new e(t);return new c(r,n)}},x=(n,e)=>{let{contents:t,systemInstruction:r}=y(e.messages),o={maxOutputTokens:e.maxTokens??n.maxTokens};e.temperature!==void 0&&(o.temperature=e.temperature),e.topP!==void 0&&(o.topP=e.topP),e.stopWords!==void 0&&(o.stopSequences=e.stopWords),e.responseFormat!==void 0&&e.responseFormat.type==="json_schema"&&(o.responseMimeType="application/json",o.responseSchema=e.responseFormat.jsonSchema),e.thinkingBudget!==void 0&&(o.thinkingConfig={thinkingBudget:e.thinkingBudget});let a={contents:t,config:o},s=e.system??r;return s!=null&&(a.systemInstruction=s),e.tools!==void 0&&(a.tools=h(e.tools)),e.safetySettings!==void 0&&(a.safetySettings=e.safetySettings),a},v=n=>{if(n instanceof m)return n;let e=n instanceof Error?n:new Error(String(n)),t=T(n);return p("vertexai",t,e)};export{c as a,w as b};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as u}from"./chunk-MG65QJY6.js";import{a as p,b as f}from"./chunk-A6RDYP6R.js";import{t as x}from"./chunk-RYOLIM3I.js";var h=t=>{let e=[],n=[],r={},s={};for(let i of t)i.type==="boolean"?e.push(i.name):n.push(i.name),i.short!==void 0&&(r[i.short]=i.name),i.default!==void 0&&(s[i.name]=i.default);return{boolean:e,string:n,alias:r,default:s}},T=t=>t!=null&&t.constructor===String,V={boolean:t=>!!t,number:t=>T(t)?Number(t):t,string:t=>String(t),"string[]":t=>Array.isArray(t)?t.map(String):[String(t)]},v=(t,e)=>{if(t!==void 0)return V[e]?.(t)??t},$=(t,e)=>{let n={};for(let r of e){let s=t[r.name];n[r.name]=v(s,r.type)}return n},re=(t,e)=>{let n=h(e),r=u(t,n);return{positional:r._,flags:$(r,e)}},_=(t,e)=>{let n=[];for(let r of e)if(r.required===!0){let s=t[r.name];(s===void 0||s===""||s===!1)&&n.push(`Required flag --${r.name} is missing`)}return n};var O=(t,e)=>t+" ".repeat(Math.max(0,e-t.length)),U=t=>{let e=t.short!==void 0?`-${t.short}, `:"",n=t.type!=="boolean"?` <${t.type}>`:"";return`${e}--${t.name}${n}`},q=(t,e)=>[t.description!==void 0?`${e} - ${t.description}`:e,""],B=(t,e)=>{if(t.usage!==void 0)return["Usage:",` ${t.usage}`,""];let n=t.children.length>0?" <command>":"",r=t.flags.length>0?" [options]":"";return["Usage:",` ${e}${n}${r}`,""]},I=t=>{if(t.length===0)return[];let e=s=>s.aliases!==void 0&&s.aliases.length>0?`${s.name}, ${s.aliases.join(", ")}`:s.name,n=Math.max(...t.map(s=>e(s).length));return["Commands:",...t.map(s=>` ${O(e(s),n+2)}${s.description??""}`),""]},Y=t=>{if(t.length===0)return[];let e=t.map(s=>({flag:U(s),desc:s.description})),n=Math.max(...e.map(s=>s.flag.length));return["Options:",...e.map(({flag:s,desc:i})=>` ${O(s,n+2)}${i}`),""]},Z=t=>t?.length?["Examples:",...t.map(e=>` ${e}`),""]:[],M=(t,e)=>{let n=e.join(" "),r=[...q(t,n),...B(t,n),...I(t.children),...Y(t.flags),...Z(t.examples)];return t.children.length>0&&r.push(`Run '${n} <command> --help' for more information on a command.`),r.join(`
|
|
2
3
|
`)};var w=t=>{let e=[];for(let n of t)e.push(`--${n.name}`),n.short!==void 0&&e.push(`-${n.short}`);return e.join(" ")},k=(t,e)=>{if(t.children===void 0||t.children.length===0)return"";let n=t.children.map(o=>o.name).join(" "),r=t.flags!==void 0?w(t.flags):"",s=[n,r].filter(o=>o.length>0).join(" "),i=` ${e})
|
|
3
4
|
`;i+=` COMPREPLY=( $(compgen -W "${s}" -- "\${cur}") )
|
|
4
5
|
`,i+=` return 0
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as T,c as f}from"./chunk-6HGMAVFR.js";import{a as F,b as k}from"./chunk-C2FHTZ2Y.js";import{b as c,f as x,g as h}from"./chunk-3SXTMY75.js";import{a as g}from"./chunk-MG65QJY6.js";import{g as d}from"./chunk-A6RDYP6R.js";var m=F(),I=e=>{let y=async o=>{let i={root:o?.root??".",fix:o?.fix??!1,exclude:o?.exclude??[],...e.defaults,...o},r=o?._changedFiles,t={root:i.root,extensions:e.extensions,exclude:i.exclude,includeOnly:r!==void 0&&r.length>0?r:void 0},l=await T(t),n=[],u=[];if(e.checkAll!==void 0){let s=await e.checkAll(l,i);n.push(...s)}else if(e.checkFile!==void 0)for(let s of l){let a=await f(s),p=e.checkFile(s,a,i);n.push(...p)}if(i.fix&&e.canFix&&e.fixFile!==void 0)for(let s of l){let a=await f(s);if(a===void 0)continue;let p=e.fixFile(s,a,i);p!==void 0&&u.push(p)}return{name:e.name,issues:n,mutations:u,filesChecked:l.length}},w={name:e.name,description:e.description,requiredStacks:e.stacks,async validate(o){let i=o.options?.fix,r=o.options??{},t=await y({root:o.root,fix:i??!1,exclude:[],...r});return{name:e.name,passed:t.issues.length===0,issues:t.issues.map(l=>({severity:"error",message:`${l.message}${l.fixed?" (fixed)":""}`,file:l.path,line:l.line})),stats:{filesChecked:t.filesChecked,issuesFound:t.issues.length,fixedCount:t.mutations.length}}}},C=async o=>{let i=e.canFix&&o.flags.fix===!0,r=o.flags.root??".",t=o.flags.exclude,l=t!==void 0?Array.isArray(t)?t:[t]:[];try{let n=await y({root:r,fix:i,exclude:l});if(n.mutations.length>0){let{writeMutations:s}=await import("./file-tools-shared-6W7Q4BM3.js"),a=await s(n.mutations);m.writeln(h("\u2713"),c(` Fixed ${a} file(s) for ${e.name}.`))}if(n.issues.length===0&&n.mutations.length===0)return m.writeln(h("\u2713"),c(` ${e.name}: ${n.filesChecked} files checked, no issues.`)),d.ok(void 0);let u=n.issues.filter(s=>!s.fixed);if(u.length>0){for(let s of u){let a=s.line!==void 0?`${s.path}:${s.line}`:s.path;m.writeln(x("\u2717"),c(` ${a}: ${s.message}`))}return d.fail({exitCode:1})}return d.ok(void 0)}catch(n){return m.writeln(x("\u2717"),c(" "+(n instanceof Error?n.message:String(n)))),d.fail({exitCode:1})}};return{config:e,run:y,validator:w,main:async o=>{let i=e.canFix?["fix"]:[],r=g(o??[],{boolean:[...i,"help"],string:["root","exclude"],alias:{h:"help"}});if(r.help)return console.log(`eser codebase ${e.name} \u2014 ${e.description}
|
|
2
3
|
`),console.log(`Usage: eser codebase ${e.name} [options]
|
|
3
4
|
`),console.log("Options:"),e.canFix&&console.log(" --fix Auto-fix issues"),console.log(" --root <dir> Root directory (default: .)"),console.log(" --exclude <p> Exclude pattern"),console.log(" -h, --help Show this help"),d.ok(void 0);let t=k(e.name,r);return await C(t)}}};export{I as a};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{d as g}from"./chunk-NBA6EFWU.js";import{d as p}from"./chunk-JPFGKN4T.js";import{t as o}from"./chunk-RYOLIM3I.js";var m=[/node_modules/,/\.git\//,/\/dist\//,/etc\/coverage/,/etc\/temp/,/\.output\//],x=async t=>{try{let n=await p`git ls-files --cached --others --exclude-standard`.cwd(t).noThrow().lines();return n.length>0?n:null}catch{return null}},k=async(t={})=>{let{root:n=".",extensions:e,exclude:s=[]}=t,l=[...m,...s.map(r=>typeof r=="string"?new RegExp(r):r)],u=[],d=await x(n);if(d!==null)for(let r of d){let i=o.path.join(n,r),c=o.path.basename(r);if(e!==void 0&&e.length>0&&!g(r,e)||l.some(a=>a.test(i)||a.test(r)))continue;let y=0,f=!1;try{let a=await o.fs.lstat(i);if(y=a.size,f=a.isSymlink,a.isDirectory&&!(t.includeDirs??!1))continue}catch{continue}u.push({path:i,name:c,size:y,isSymlink:f})}else for await(let r of o.fs.walk(n,{includeDirs:t.includeDirs??!1,includeFiles:!0,exts:e,skip:l})){if(!r.isFile&&!r.isSymlink)continue;let i=0;try{i=(await o.fs.stat(r.path)).size}catch{continue}u.push({path:r.path,name:r.name,size:i,isSymlink:r.isSymlink})}if(t.includeOnly!==void 0&&t.includeOnly.length>0){let r=t.includeOnly;return u.filter(i=>r.some(c=>i.path.endsWith(c)||i.path.includes(c)))}return u},B=async t=>{if(t.textContent!==void 0)return t.textContent;try{let n=await h(t);if(w(n))return;let e=new TextDecoder().decode(n);return t.textContent=e,e}catch{return}},h=async t=>{if(t.rawBytes!==void 0)return t.rawBytes;let n=await o.fs.readFile(t.path);return t.rawBytes=n,n},w=t=>{let n=Math.min(t.length,8192);for(let e=0;e<n;e++)if(t[e]===0)return!0;return!1},M=(t,n)=>{for(let e of n)if(typeof e=="string"){if(t.includes(e)||t.endsWith(e))return!0}else if(e.test(t))return!0;return!1},b=(t,n)=>{let e=new Map;for(let s of n)e.set(s.path,s);for(let s of t){let l=e.get(s.path);l!==void 0&&(s.textContent=l.newContent,s.rawBytes=void 0)}},D=async t=>{let n=0;for(let e of t)e.oldContent!==e.newContent&&(await o.fs.writeTextFile(e.path,e.newContent),n++);return n};export{m as a,k as b,B as c,h as d,w as e,M as f,b as g,D as h};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{c as o}from"./chunk-U3FRSRMK.js";import{t as e}from"./chunk-RYOLIM3I.js";var d=async(r,i,n)=>{let s=`${r}/${o.specFile(i)}`;try{let t=await e.fs.readTextFile(s);t=t.replace(/^## Status: .+$/m,`## Status: ${n}`),await e.fs.writeTextFile(s,t)}catch{}},u=async(r,i,n)=>{let s=`${r}/${o.specFile(i)}`;try{let t=await e.fs.readTextFile(s),a=new RegExp(`^(- )\\[ \\]( ${n}:.*)$`,"m");t=t.replace(a,"$1[x]$2"),await e.fs.writeTextFile(s,t)}catch{}},w=async(r,i,n,s)=>{let t=`${r}/${o.specDir(i)}/progress.json`;try{let a=await e.fs.readTextFile(t),c=JSON.parse(a);for(let p of c.tasks)p.id===n&&(p.status=s);c.updatedAt=new Date().toISOString(),await e.fs.writeTextFile(t,JSON.stringify(c,null,2)+`
|
|
3
|
+
`)}catch{}},f=async(r,i,n)=>{let s=`${r}/${o.specDir(i)}/progress.json`;try{let t=await e.fs.readTextFile(s),a=JSON.parse(t);a.status=n,a.updatedAt=new Date().toISOString(),await e.fs.writeTextFile(s,JSON.stringify(a,null,2)+`
|
|
4
|
+
`)}catch{}};export{d as a,u as b,w as c,f as d};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as n}from"./chunk-5YVKJFG6.js";var e=n({name:"validate-case-conflict",description:"Detect filenames that differ only by case",canFix:!1,stacks:[],defaults:{},checkAll(r){let o=new Map,s=[];for(let t of r){let a=t.path.toLowerCase(),i=o.get(a);i!==void 0?s.push({path:t.path,message:`case conflict with "${i}"`}):o.set(a,t.path)}return s}}),f=e.run,m=e.validator,d=e.main;export{e as a,f as b,m as c,d};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as u,b as d,c as p,d as W,e as l,f as h,g as y,h as D}from"./chunk-AP72BKVG.js";function $(e,r){if(r.length>=e.length)return e;let n=e.length-r.length;for(let i=r.length-1;i>=0;--i)if(e.charCodeAt(n+i)!==r.charCodeAt(i))return e;return e.slice(0,-r.length)}function T(e,r,n=0){let i=!1,t=e.length;for(let s=e.length-1;s>=n;--s)if(r(e.charCodeAt(s))){if(i){n=s+1;break}}else i||(i=!0,t=s+1);return e.slice(n,t)}function v(e,r){if(d(e),e.length===0)return e;if(typeof r!="string")throw new TypeError(`Suffix must be a string, received "${JSON.stringify(r)}"`)}function U(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function A(e){return e=U(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function R(e,r){if(e.length<=1)return e;let n=e.length;for(let i=e.length-1;i>0&&r(e.charCodeAt(i));i--)n=i;return e.slice(0,n)}function G(e,r=""){e instanceof URL&&(e=A(e)),v(e,r);let n=T(e,p),i=R(n,p);return r?$(i,r):i}function g(e){e=U(e);let r=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(r=`\\\\${e.hostname}${r}`),r}function b(e,r=""){e instanceof URL&&(e=g(e)),v(e,r);let n=0;if(e.length>=2){let s=e.charCodeAt(0);h(s)&&e.charCodeAt(1)===58&&(n=2)}let i=T(e,l,n),t=R(i,l);return r?$(t,r):t}function Ae(e,r=""){return u?b(e,r):G(e,r)}var he=u?";":":",Re=u?"\\":"/";function L(e){if(d(e),e.length===0)return"."}function N(e){e instanceof URL&&(e=A(e)),L(e);let r=-1,n=!1;for(let i=e.length-1;i>=1;--i)if(p(e.charCodeAt(i))){if(n){r=i;break}}else n=!0;return r===-1?p(e.charCodeAt(0))?"/":".":R(e.slice(0,r),p)}function I(e){e instanceof URL&&(e=g(e)),L(e);let r=e.length,n=-1,i=-1,t=!0,s=0,f=e.charCodeAt(0);if(r>1)if(l(f)){if(n=s=1,l(e.charCodeAt(1))){let o=2,c=o;for(;o<r&&!l(e.charCodeAt(o));++o);if(o<r&&o!==c){for(c=o;o<r&&l(e.charCodeAt(o));++o);if(o<r&&o!==c){for(c=o;o<r&&!l(e.charCodeAt(o));++o);if(o===r)return e;o!==c&&(n=s=o+1)}}}}else h(f)&&e.charCodeAt(1)===58&&(n=s=2,r>2&&l(e.charCodeAt(2))&&(n=s=3));else if(l(f))return e;for(let o=r-1;o>=s;--o)if(l(e.charCodeAt(o))){if(!t){i=o;break}}else t=!1;if(i===-1){if(n===-1)return".";i=n}return R(e.slice(0,i),W)}function ye(e){return u?I(e):N(e)}function Ie(e){return u?D(e):y(e)}function z(e){if(d(e),e.length===0)return"."}function w(e,r,n,i){let t="",s=0,f=-1,o=0,c;for(let a=0;a<=e.length;++a){if(a<e.length)c=e.charCodeAt(a);else{if(i(c))break;c=47}if(i(c)){if(!(f===a-1||o===1))if(f!==a-1&&o===2){if(t.length<2||s!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){let C=t.lastIndexOf(n);C===-1?(t="",s=0):(t=t.slice(0,C),s=t.length-1-t.lastIndexOf(n)),f=a,o=0;continue}else if(t.length===2||t.length===1){t="",s=0,f=a,o=0;continue}}r&&(t.length>0?t+=`${n}..`:t="..",s=2)}else t.length>0?t+=n+e.slice(f+1,a):t=e.slice(f+1,a),s=a-f-1;f=a,o=0}else c===46&&o!==-1?++o:o=-1}return t}function S(e){e instanceof URL&&(e=A(e)),z(e);let r=p(e.charCodeAt(0)),n=p(e.charCodeAt(e.length-1));return e=w(e,!r,"/",p),e.length===0&&!r&&(e="."),e.length>0&&n&&(e+="/"),r?`/${e}`:e}function j(e,...r){if(e===void 0)return".";e instanceof URL&&(e=A(e)),r=e?[e,...r]:r,r.forEach(i=>d(i));let n=r.filter(i=>i.length>0).join("/");return n===""?".":S(n)}function P(e){e instanceof URL&&(e=g(e)),z(e);let r=e.length,n=0,i,t=!1,s=e.charCodeAt(0);if(r>1)if(l(s))if(t=!0,l(e.charCodeAt(1))){let o=2,c=o;for(;o<r&&!l(e.charCodeAt(o));++o);if(o<r&&o!==c){let a=e.slice(c,o);for(c=o;o<r&&l(e.charCodeAt(o));++o);if(o<r&&o!==c){for(c=o;o<r&&!l(e.charCodeAt(o));++o);if(o===r)return`\\\\${a}\\${e.slice(c)}\\`;o!==c&&(i=`\\\\${a}\\${e.slice(c,o)}`,n=o)}}}else n=1;else h(s)&&e.charCodeAt(1)===58&&(i=e.slice(0,2),n=2,r>2&&l(e.charCodeAt(2))&&(t=!0,n=3));else if(l(s))return"\\";let f;return n<r?f=w(e.slice(n),!t,"\\",l):f="",f.length===0&&!t&&(f="."),f.length>0&&l(e.charCodeAt(r-1))&&(f+="\\"),i===void 0?t?f.length>0?`\\${f}`:"\\":f:t?f.length>0?`${i}\\${f}`:`${i}\\`:i+f}function k(e,...r){if(e instanceof URL&&(e=g(e)),r=e?[e,...r]:r,r.forEach(f=>d(f)),r=r.filter(f=>f.length>0),r.length===0)return".";let n=!0,i=0,t=r[0];if(l(t.charCodeAt(0))){++i;let f=t.length;f>1&&l(t.charCodeAt(1))&&(++i,f>2&&(l(t.charCodeAt(2))?++i:n=!1))}let s=r.join("\\");if(n){for(;i<s.length&&l(s.charCodeAt(i));++i);i>=2&&(s=`\\${s.slice(i)}`)}return P(s)}function xr(e,...r){return u?k(e,...r):j(e,...r)}function Er(e){return u?P(e):S(e)}function H(...e){let r="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){let t;if(i>=0)t=e[i];else{let{Deno:s}=globalThis;if(typeof s?.cwd!="function")throw new TypeError("Resolved a relative path without a current working directory (CWD)");t=s.cwd()}d(t),t.length!==0&&(r=`${t}/${r}`,n=p(t.charCodeAt(0)))}return r=w(r,!n,"/",p),n?r.length>0?`/${r}`:"/":r.length>0?r:"."}function B(...e){let r="",n="",i=!1;for(let t=e.length-1;t>=-1;t--){let s,{Deno:f}=globalThis;if(t>=0)s=e[t];else if(r){if(typeof f?.env?.get!="function"||typeof f?.cwd!="function")throw new TypeError("Resolved a relative path without a current working directory (CWD)");s=f.cwd(),(s===void 0||s.slice(0,3).toLowerCase()!==`${r.toLowerCase()}\\`)&&(s=`${r}\\`)}else{if(typeof f?.cwd!="function")throw new TypeError("Resolved a drive-letter-less path without a current working directory (CWD)");s=f.cwd()}d(s);let o=s.length;if(o===0)continue;let c=0,a="",C=!1,F=s.charCodeAt(0);if(o>1)if(l(F))if(C=!0,l(s.charCodeAt(1))){let m=2,x=m;for(;m<o&&!l(s.charCodeAt(m));++m);if(m<o&&m!==x){let _=s.slice(x,m);for(x=m;m<o&&l(s.charCodeAt(m));++m);if(m<o&&m!==x){for(x=m;m<o&&!l(s.charCodeAt(m));++m);m===o?(a=`\\\\${_}\\${s.slice(x)}`,c=m):m!==x&&(a=`\\\\${_}\\${s.slice(x,m)}`,c=m)}}}else c=1;else h(F)&&s.charCodeAt(1)===58&&(a=s.slice(0,2),c=2,o>2&&l(s.charCodeAt(2))&&(C=!0,c=3));else l(F)&&(c=1,C=!0);if(!(a.length>0&&r.length>0&&a.toLowerCase()!==r.toLowerCase())&&(r.length===0&&a.length>0&&(r=a),i||(n=`${s.slice(c)}\\${n}`,i=C),i&&r.length>0))break}return n=w(n,!i,"\\",l),r+(i?"\\":"")+n||"."}function Wr(...e){return u?B(...e):H(...e)}function Nr(e){return u?g(e):A(e)}export{A as a,R as b,g as c,Ae as d,he as e,Re as f,ye as g,Nr as h,Ie as i,xr as j,Er as k,H as l,B as m,Wr as n};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
1
2
|
var e={Trace:1,Debug:5,Info:9,Notice:10,Warning:13,Error:17,Critical:21,Alert:22,Emergency:23},r={[e.Trace]:"Trace",[e.Debug]:"Debug",[e.Info]:"Info",[e.Notice]:"Notice",[e.Warning]:"Warning",[e.Error]:"Error",[e.Critical]:"Critical",[e.Alert]:"Alert",[e.Emergency]:"Emergency"};export{e as a,r as b};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as g}from"./chunk-GTHXGAMQ.js";import{e as l}from"./chunk-LCG4SK6K.js";import{a as n}from"./chunk-N7DXBY3O.js";import{t as s}from"./chunk-RYOLIM3I.js";var a={port:8e3,host:"localhost",hmr:!0,open:!1},f=["@eser/laroux","@eser/laroux-server"],d={minify:!0,sourcemap:!0,target:["es2022"],external:[],serverExternals:f},p={mode:"always",streamMode:"streaming-optimal"},c={webp:80,avif:75,jpeg:85,png:90},C={formats:["webp","original"],widths:[640,768,1024,1280,1920],quality:c,placeholder:"blur"},R={width:1300,height:900},u={enabled:!0,viewport:R,forceInclude:[],forceExclude:[]},m={runtimeBundleEndpoint:"/__runtime_bundle.js",runtimeModuleMapEndpoint:"/__runtime_module_map.json",staticAssetsPrefix:"/dist"},v={isDev:!1,isBuild:!1,isServe:!1,isWatch:!1},S={jsr:{"@eser/logging":`
|
|
2
3
|
// Browser shim for @eser/logging
|
|
3
4
|
const noop = () => {};
|
|
4
5
|
const noopLogger = { debug: noop, info: noop, warn: noop, error: noop };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as m}from"./chunk-PDJEHSKZ.js";import{c as d}from"./chunk-U3FRSRMK.js";import{t as l}from"./chunk-RYOLIM3I.js";var h=c=>{let n=c.split(/\n/).flatMap(i=>i.trim().length>0?[i.trim()]:[]);return n.length>1?n:c.split(/\.\s+|;\s+/).map(i=>i.trim()).filter(i=>i.length>5)},v=c=>{let n=[],i=c.find(t=>t.questionId==="ambition");if(i!==void 0){let t=i.answer,e=t.match(/10[- ]?star[:\s]+(.+)/i),r=e!==null?e[1].trim():t.length>120?t.slice(0,120)+"...":t,p=r.charAt(0).toUpperCase()+r.slice(1);n.push(p)}let o=c.find(t=>t.questionId==="verification");if(o!==void 0){let t=h(o.answer);for(let e of t){let r=e.toLowerCase();r.startsWith("run ")||r.startsWith("check ")?n.push(`Test: ${e}`):n.push(e)}}return n.length===0&&n.push("_Tasks need to be defined before execution. Add tasks manually or run discovery with more detail._"),n},w=(c,n)=>{let i={};if(n===null){for(let o of c.specSections)i[o]=!1;return i}for(let o of c.specSections){let t=o.toLowerCase();t.includes("design")||t.includes("mobile")||t.includes("layout")||t.includes("interaction")?i[o]=n.involvesUI:t.includes("contributor")||t.includes("public api")||t.includes("api surface")?i[o]=n.involvesPublicAPI:t.includes("migration")||t.includes("deprecation")||t.includes("backward")||t.includes("compatibility")?i[o]=n.involvesMigration:t.includes("audit")||t.includes("access control")||t.includes("data handling")?i[o]=n.involvesDataHandling:i[o]=!0}return i},g=(c,n,i,o,t)=>{let e=[];e.push(`# Spec: ${c}`),e.push(""),e.push("## Status: draft"),e.push(""),i.length>0&&(e.push(`## Concerns: ${i.map(s=>s.id).join(", ")}`),e.push("")),e.push("## Discovery Answers"),e.push("");for(let s of n)e.push(`### ${s.questionId}`),e.push(""),e.push(s.answer),e.push("");for(let s of i)if(s.specSections.length>0){let a=w(s,t??null);for(let f of s.specSections)a[f]!==!1&&(e.push(`## ${f} (${s.id})`),e.push(""),e.push("_To be addressed during execution._"),e.push(""))}if(o.length>0){e.push("## Decisions"),e.push(""),e.push("| # | Decision | Choice | Promoted |"),e.push("|---|----------|--------|----------|");for(let s=0;s<o.length;s++){let a=o[s];e.push(`| ${s+1} | ${a.question} | ${a.choice} | ${a.promoted?"yes":"no"} |`)}e.push("")}let r=n.find(s=>s.questionId==="scope_boundary");if(r!==void 0){e.push("## Out of Scope"),e.push("");let s=h(r.answer);for(let a of s)e.push(`- ${a}`);e.push("")}let p=v(n);e.push("## Tasks"),e.push("");for(let s=0;s<p.length;s++)e.push(`- [ ] task-${s+1}: ${p[s]}`);e.push("");let u=n.find(s=>s.questionId==="verification");if(e.push("## Verification"),e.push(""),u!==void 0){let s=h(u.answer);for(let a of s)e.push(`- ${a}`)}else e.push("_To be defined._");return e.push(""),e.join(`
|
|
3
|
+
`)};var k=async(c,n,i)=>{if(n.spec===null)throw new Error("No active spec");let o=`${c}/${d.specDir(n.spec)}`,t=`${c}/${d.specFile(n.spec)}`;await l.fs.mkdir(o,{recursive:!0});let e=g(n.spec,n.discovery.answers,i,n.decisions,n.classification);await l.fs.writeTextFile(t,e);let r=m(n.spec,e),p=`${o}/progress.json`,u={spec:n.spec,status:"draft",tasks:r.tasks.map(s=>({id:s.id,title:s.title,status:"pending"})),decisions:n.decisions.map(s=>({question:s.question,choice:s.choice,promoted:s.promoted})),debt:[],updatedAt:new Date().toISOString()};return await l.fs.writeTextFile(p,JSON.stringify(u,null,2)+`
|
|
4
|
+
`),t};export{k as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as C,c as E}from"./chunk-RZKZDGNM.js";import{a as k}from"./chunk-2VEVVX6U.js";import{a as x}from"./chunk-C2FHTZ2Y.js";import{f as h}from"./chunk-3BEX5FYF.js";import{b as i,f as d,g as f,h as u,i as g}from"./chunk-3SXTMY75.js";import{g as n}from"./chunk-A6RDYP6R.js";import{v as c}from"./chunk-RYOLIM3I.js";var l=x(),b=t=>{let e=new Set,r=/export\s+\*\s+from\s+["']([^"']+)["']/g,a=/export\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g,o=/export\s+type\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g;for(let s of t.matchAll(r))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(a))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(o))s[1]!==void 0&&e.add(s[1]);return e},y=t=>{let e=t.startsWith("./")?t.slice(2):t;return e.endsWith(".ts")&&(e=e.slice(0,-3)),e},O=t=>!(t==="mod.ts"||t.endsWith("_test.ts")||t.endsWith("_bench.ts")||t.startsWith("_")||t.includes("/")),P=async(t={})=>{let{root:e=".",failFast:r=!1}=t,a=await C(e),o=[];for(let s of a){let v=c.runtime.path.join(s.path,"mod.ts"),m;try{m=await c.runtime.fs.readTextFile(v)}catch{continue}let M=b(m),w=new Set([...M].map(p=>y(p))),A=await E(s.path);for(let p of A){let R=c.runtime.path.basename(p);if(!O(R))continue;let F=y(p);if(!w.has(F)&&(o.push({packageName:s.name,file:p}),r))return{isComplete:!1,missingExports:o,packagesChecked:a.length}}}return{isComplete:o.length===0,missingExports:o,packagesChecked:a.length}},W=t=>h.fromPromise(()=>P(t)),_=t=>n.ok({root:"."}),z=t=>{if(n.isFail(t))return l.writeln(d("\u2717"),i(" "+String(t.error))),n.fail({exitCode:1});let{value:e}=t;if(l.writeln(g("\u2139"),i(` Checked ${e.packagesChecked} packages.`)),!e.isComplete){l.writeln(d("\u2717"),i(` Found ${e.missingExports.length} missing exports:`));for(let r of e.missingExports)l.writeln(u("\u26A0"),i(` ${r.packageName}: ${r.file}`));return n.fail({exitCode:1})}return l.writeln(f("\u2713"),i(" All mod.ts exports are complete.")),n.ok(void 0)},S=k.createTrigger({handler:W,adaptInput:_,adaptOutput:z}),N=async t=>await S({command:"validate-mod-exports",args:[],flags:{}});export{P as a,W as b,S as c,N as d};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{d as T}from"./chunk-G6NAG2EK.js";var F={};T(F,{all:()=>d,any:()=>O,fail:()=>n,flatMap:()=>l,flatMapError:()=>c,flatMapErrorW:()=>p,flatMapW:()=>u,fromPromise:()=>k,getOrElse:()=>R,getOrNull:()=>y,getOrThrow:()=>x,getOrUndefined:()=>f,isFail:()=>a,isOk:()=>t,map:()=>s,mapError:()=>i,match:()=>v,ok:()=>E,tap:()=>g,tapError:()=>h,toPromise:()=>m,tryCatch:()=>U,tryCatchAsync:()=>w});var E=r=>({_tag:"Ok",value:r,*[Symbol.iterator](){return yield this}}),n=r=>({_tag:"Fail",error:r,*[Symbol.iterator](){return yield this}}),t=r=>r._tag==="Ok",a=r=>r._tag==="Fail",s=(r,e)=>t(r)?E(e(r.value)):r,l=(r,e)=>t(r)?e(r.value):r,u=(r,e)=>t(r)?e(r.value):r,i=(r,e)=>a(r)?n(e(r.error)):r,c=(r,e)=>a(r)?e(r.error):r,p=(r,e)=>a(r)?e(r.error):r,R=(r,e)=>t(r)?r.value:typeof e=="function"?e(r.error):e,x=r=>{if(t(r))return r.value;throw r.error instanceof Error?r.error:new Error(String(r.error))},y=r=>t(r)?r.value:null,f=r=>t(r)?r.value:void 0,v=(r,e)=>t(r)?e.ok(r.value):e.fail(r.error),k=async(r,e=o=>o)=>{try{return E(await r)}catch(o){return n(e(o))}},m=r=>t(r)?Promise.resolve(r.value):Promise.reject(r.error instanceof Error?r.error:new Error(String(r.error))),d=r=>{let e=[];for(let o of r){if(a(o))return o;e.push(o.value)}return E(e)},O=r=>{let e=[];for(let o of r){if(t(o))return o;e.push(o.error)}return n(e)},U=(r,e=o=>o)=>{try{return E(r())}catch(o){return n(e(o))}},w=async(r,e=o=>o)=>{try{return E(await r())}catch(o){return n(e(o))}},g=(r,e)=>(t(r)&&e(r.value),r),h=(r,e)=>(a(r)&&e(r.error),r);export{E as a,n as b,t as c,a as d,v as e,w as f,F as g};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as S,b as g,d as T,e as m,f,g as y}from"./chunk-DPL7GREV.js";import{a as l}from"./chunk-J7YTWK67.js";var k=class{capabilities=["text_generation","streaming"];provider="kiro";modelId;binary;config;constructor(e,r){this.binary=e,this.config=r,this.modelId=r.model}async generateText(e,r){let o=v(this.config,e),c=y(e.messages,e.system);o.push("--prompt",c);let s=g(this.binary,o,{signal:r}),u=m(s.stderr),t=await T(s.stdout,this.modelId),d=await s.waitForExit(),i=await u,a=f("kiro",d.code,i);if(a!==null)throw a;return t}async*streamText(e,r){let o=v(this.config,e),c=y(e.messages,e.system);o.push("--prompt",c);let s=g(this.binary,o,{signal:r}),u=m(s.stderr);try{let t=new TextDecoder,d=s.stdout.getReader(),i="",a=await d.read();for(;a.done!==!0;){i+=t.decode(a.value,{stream:!0});let x=i.split(`
|
|
2
3
|
`);i=x.pop()??"";for(let _ of x){let p=_.trim();if(p.length!==0){try{let A=JSON.parse(p),w=C(A);if(w!==null){yield w;continue}}catch{}yield{kind:"content_delta",textDelta:p+`
|
|
3
4
|
`}}}a=await d.read()}d.releaseLock(),i.trim().length>0&&(yield{kind:"content_delta",textDelta:i.trim()});let E=await s.waitForExit(),b=await u,h=f("kiro",E.code,b);h!==null?yield{kind:"error",error:h}:yield{kind:"message_done",stopReason:"end_turn",usage:{inputTokens:0,outputTokens:0,totalTokens:0}}}catch(t){t instanceof l?yield{kind:"error",error:t}:yield{kind:"error",error:new l(t instanceof Error?t.message:String(t),{provider:"kiro",cause:t instanceof Error?t:void 0})}}}close(){return Promise.resolve()}getRawClient(){return null}},O={provider:"kiro",async createModel(n){let e=await S("kiro",n);return new k(e,n)}},v=(n,e)=>{let r=[];r.push("--output","json"),r.push("--model",n.model),e.maxTokens!==void 0&&r.push("--max-tokens",String(e.maxTokens));let o=n.properties?.args;return o!==void 0&&r.push(...o),r},C=n=>{if(n===null||typeof n!="object")return null;let e=n;if(e.type==="content"||e.type==="text"){let r=e.text??e.content;return r!==void 0?{kind:"content_delta",textDelta:String(r)}:null}return e.type==="done"||e.type==="result"||e.done===!0?{kind:"message_done",stopReason:"end_turn",usage:{inputTokens:e.usage?.input_tokens??0,outputTokens:e.usage?.output_tokens??0,totalTokens:(e.usage?.input_tokens??0)+(e.usage?.output_tokens??0)}}:e.type==="error"?{kind:"error",error:new l(e.error?.message??e.message??"Unknown Kiro error",{provider:"kiro"})}:null};export{k as a,O as b};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
1
2
|
function s(){let t=globalThis,o=t.Deno?.build?.os;return typeof o=="string"?o==="windows":t.navigator?.platform?.startsWith("Win")??t.process?.platform?.startsWith("win")??!1}var a=s();function r(t){if(typeof t!="string")throw new TypeError(`Path must be a string, received "${JSON.stringify(t)}"`)}function n(t){return t===47}function m(t){return r(t),t.length>0&&n(t.charCodeAt(0))}function l(t){return t===47}function e(t){return t===47||t===92}function _(t){return t>=97&&t<=122||t>=65&&t<=90}function K(t){r(t);let o=t.length;if(o===0)return!1;let R=t.charCodeAt(0);return e(R)?!0:!!(_(R)&&o>2&&t.charCodeAt(1)===58&&e(t.charCodeAt(2)))}export{a,r as b,n as c,l as d,e,_ as f,m as g,K as h};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as _,e as b}from"./chunk-J7YTWK67.js";var h=class{capabilities=["text_generation","streaming","tool_calling","vision","batch_processing","structured_output","reasoning"];provider="openai";modelId;client;config;constructor(t,n){this.client=t,this.config=n,this.modelId=n.model}async generateText(t,n){let o=p(this.config,t);try{let s=await this.client.chat.completions.create(o,{signal:n,timeout:this.config.requestTimeoutMs});return w(s,this.modelId)}catch(s){throw d(s)}}async*streamText(t,n){let o=p(this.config,t);try{let s=await this.client.chat.completions.create({...o,stream:!0},{signal:n,timeout:this.config.requestTimeoutMs}),r=new Map,a=0,i=0;for await(let u of s){let c=u.choices?.[0];if(c===void 0)continue;let m=c.delta;if(m?.content!==void 0&&m.content!==null&&(yield{kind:"content_delta",textDelta:m.content}),m?.tool_calls!==void 0)for(let l of m.tool_calls){let f=l.index??0,y=r.get(f);y===void 0?r.set(f,{id:l.id??"",name:l.function?.name??"",args:l.function?.arguments??""}):y.args+=l.function?.arguments??""}if(c.finish_reason!==void 0&&c.finish_reason!==null){for(let[,l]of r){let f={};try{f=JSON.parse(l.args||"{}")}catch{}yield{kind:"tool_call_delta",toolCall:{id:l.id,name:l.name,arguments:f}}}u.usage!==void 0&&(a=u.usage.prompt_tokens??0,i=u.usage.completion_tokens??0),yield{kind:"message_done",stopReason:R(c.finish_reason),usage:{inputTokens:a,outputTokens:i,totalTokens:a+i}}}}}catch(s){yield{kind:"error",error:d(s)}}}async submitBatch(t,n){let s=t.items.map(a=>{let i=p(this.config,a.options);return JSON.stringify({custom_id:a.customId,method:"POST",url:"/v1/chat/completions",body:i})}).join(`
|
|
2
3
|
`),r=new Blob([s],{type:"application/jsonl"});try{let a=await this.client.files.create({file:r,purpose:"batch"},{signal:n}),i=await this.client.batches.create({input_file_id:a.id,endpoint:"/v1/chat/completions",completion_window:"24h"},{signal:n});return g(i)}catch(a){throw d(a)}}async getBatchJob(t,n){try{let o=await this.client.batches.retrieve(t,{signal:n});return g(o)}catch(o){throw d(o)}}async listBatchJobs(t,n){try{let o=await this.client.batches.list({limit:t?.limit,after:t?.after},{signal:n}),s=[];for(let r of o.data??[])s.push(g(r));return s}catch(o){throw d(o)}}async downloadBatchResults(t,n){let o=t.storage?.outputRef;if(o===void 0)return[];try{let a=(await(await this.client.files.content(o,{signal:n})).text()).split(`
|
|
3
|
-
`).filter(u=>u.length>0),i=[];for(let u of a){let c=JSON.parse(u);c.response?.status_code===200?i.push({customId:c.custom_id,result:w(c.response.body,this.modelId)}):i.push({customId:c.custom_id,error:c.error?.message??"Unknown error"})}return i}catch(s){throw d(s)}}async cancelBatchJob(t,n){try{await this.client.batches.cancel(t,{signal:n})}catch(o){throw d(o)}}async close(){}getRawClient(){return this.client}},P={provider:"openai",async createModel(e){let{default:t}=await import("./openai-
|
|
4
|
+
`).filter(u=>u.length>0),i=[];for(let u of a){let c=JSON.parse(u);c.response?.status_code===200?i.push({customId:c.custom_id,result:w(c.response.body,this.modelId)}):i.push({customId:c.custom_id,error:c.error?.message??"Unknown error"})}return i}catch(s){throw d(s)}}async cancelBatchJob(t,n){try{await this.client.batches.cancel(t,{signal:n})}catch(o){throw d(o)}}async close(){}getRawClient(){return this.client}},P={provider:"openai",async createModel(e){let{default:t}=await import("./openai-IKXRJYI3.js"),n={};e.apiKey!==void 0&&(n.apiKey=e.apiKey),e.baseUrl!==void 0&&(n.baseURL=e.baseUrl);let o=new t(n);return new h(o,e)}},p=(e,t)=>{let n=k(t.messages,t.system),o={model:e.model,messages:n,max_tokens:t.maxTokens??e.maxTokens};return t.temperature!==void 0&&(o.temperature=t.temperature),t.topP!==void 0&&(o.top_p=t.topP),t.stopWords!==void 0&&(o.stop=t.stopWords),t.tools!==void 0&&(o.tools=t.tools.map(s=>({type:"function",function:{name:s.name,description:s.description,parameters:s.parameters??{type:"object",properties:{}}}}))),t.toolChoice!==void 0&&(o.tool_choice=t.toolChoice),t.responseFormat!==void 0&&(t.responseFormat.type==="json_schema"?o.response_format={type:"json_schema",json_schema:{name:t.responseFormat.name??"response",schema:t.responseFormat.jsonSchema,strict:!0}}:t.responseFormat.type==="json_object"&&(o.response_format={type:"json_object"})),t.thinkingBudget!==void 0&&(o.reasoning_effort=T(t.thinkingBudget)),o},k=(e,t)=>{let n=[];t!==void 0&&n.push({role:"system",content:t});for(let o of e){if(o.role==="system"){let r=[];for(let a of o.content)a.kind==="text"&&r.push(a.text);n.push({role:"system",content:r.join(`
|
|
4
5
|
`)});continue}if(o.role==="tool"){for(let r of o.content)r.kind==="tool_result"&&n.push({role:"tool",tool_call_id:r.toolResult.toolCallId,content:r.toolResult.content});continue}let s=o.content.map(C);s.length===1&&s[0]?.type==="text"?n.push({role:o.role,content:s[0].text}):n.push({role:o.role,content:s})}return n},C=e=>{switch(e.kind){case"text":return{type:"text",text:e.text};case"image":{let t;if(e.image.url!==void 0)t=e.image.url;else if(e.image.data!==void 0)t=`data:${e.image.mimeType??"image/png"};base64,${x(e.image.data)}`;else return{type:"text",text:"[unsupported image]"};return{type:"image_url",image_url:{url:t,detail:e.image.detail??"auto"}}}case"audio":{if(e.audio.data!==void 0){let t=e.audio.mimeType??"audio/mpeg",n=S(t);return{type:"input_audio",input_audio:{data:x(e.audio.data),format:n}}}return{type:"text",text:"[unsupported audio format]"}}case"tool_call":return{type:"function",id:e.toolCall.id,function:{name:e.toolCall.name,arguments:JSON.stringify(e.toolCall.arguments)}};default:return{type:"text",text:`[unsupported content: ${e.kind}]`}}},w=(e,t)=>{let n=[],o="end_turn",s=e.choices?.[0];if(s!==void 0){if(s.message?.content!==void 0&&s.message.content!==null&&n.push({kind:"text",text:s.message.content}),s.message?.tool_calls!==void 0)for(let r of s.message.tool_calls){let a={};try{a=JSON.parse(r.function?.arguments??"{}")}catch{}n.push({kind:"tool_call",toolCall:{id:r.id,name:r.function?.name??"",arguments:a}})}o=R(s.finish_reason)}return{content:n,stopReason:o,usage:{inputTokens:e.usage?.prompt_tokens??0,outputTokens:e.usage?.completion_tokens??0,totalTokens:e.usage?.total_tokens??0},modelId:t,rawResponse:e}},R=e=>e==="stop"?"end_turn":e==="length"?"max_tokens":e==="tool_calls"?"tool_use":"end_turn",g=e=>({id:e.id,status:B(e.status),createdAt:new Date(e.created_at*1e3),completedAt:e.completed_at!==void 0?new Date(e.completed_at*1e3):void 0,totalCount:e.request_counts?.total??0,doneCount:e.request_counts?.completed??0,failedCount:e.request_counts?.failed??0,storage:{type:"openai_file",inputRef:e.input_file_id,outputRef:e.output_file_id}}),B=e=>e==="completed"?"completed":e==="failed"?"failed":e==="cancelled"||e==="cancelling"?"cancelled":e==="in_progress"||e==="finalizing"?"processing":"pending",T=e=>e<=1e3?"low":e>=1e4?"high":"medium",S=e=>e.includes("mp3")||e.includes("mpeg")?"mp3":e.includes("wav")?"wav":e.includes("flac")?"flac":e.includes("ogg")?"ogg":"mp3",d=e=>{if(e instanceof _)return e;let t=e instanceof Error?e:new Error(String(e)),n=e?.status??e?.statusCode??500;return b("openai",n,t)},x=e=>{let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)};export{h as a,P as b};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
1
2
|
var c=(t,e)=>({role:t,content:[{kind:"text",text:e}]});var l="data:",i=";base64,",u=t=>t.startsWith(l),d=t=>{if(!t.startsWith(l))return null;let e=t.slice(l.length),o=e.indexOf(i);if(o===-1)return null;let s=e.slice(0,o),g=e.slice(o+i.length),r=atob(g),a=new Uint8Array(r.length);for(let n=0;n<r.length;n++)a[n]=r.charCodeAt(n);return{mimeType:s,data:a}},p={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",flac:"audio/flac",m4a:"audio/mp4",webm:"audio/webm",pdf:"application/pdf",json:"application/json",txt:"text/plain"},m=t=>{let e=t.split("?")[0]??t,o=e.lastIndexOf(".");if(o===-1)return null;let s=e.slice(o+1).toLowerCase();return p[s]??null};export{c as a,u as b,d as c,m as d};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{f as e,h as t,k as r}from"./chunk-NP2CCJ4C.js";var g=()=>e({renderer:r.ansi(),sink:t.stdout()}),c=(i,s)=>({command:i,args:s._??[],flags:Object.fromEntries(Object.entries(s).filter(([o])=>o!=="_"))});export{g as a,c as b};
|