eser 4.1.44 → 4.1.48
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/chunks/{add-IM5JC6QA.js → add-HBUORTI5.js} +1 -1
- package/chunks/ajan-CL22MZYV.js +2 -0
- package/chunks/{approve-4CQFJU5A.js → approve-UWBYGXCF.js} +1 -1
- package/chunks/{ask-UTEI7KGQ.js → ask-M3VS3GIJ.js} +1 -1
- package/chunks/{block-MQTVULY3.js → block-W76WKMS3.js} +1 -1
- package/chunks/{browser-JGBNWUEQ.js → browser-D536WJU3.js} +1 -1
- package/chunks/{build-IRLEBMJE.js → build-DPBRNANI.js} +2 -2
- package/chunks/{bun-HIMXX54I.js → bun-7XJSUU6Z.js} +1 -1
- package/chunks/{cancel-56EDMMFO.js → cancel-46C7E5N7.js} +1 -1
- package/chunks/{changelog-gen-USXHO6PE.js → changelog-gen-627BV77Z.js} +1 -1
- package/chunks/{chunk-3F23SLJA.js → chunk-2LF7QSIN.js} +28 -27
- package/chunks/{chunk-YURNTYEP.js → chunk-2TANTKYS.js} +1 -1
- package/chunks/{chunk-TELZ2ZFI.js → chunk-2YTW3JQ6.js} +1 -1
- package/chunks/{chunk-V3NJTF2Y.js → chunk-2ZYCRMUT.js} +1 -1
- package/chunks/chunk-3D5TBTM3.js +3 -0
- package/chunks/{chunk-LSET5TD3.js → chunk-3OG2MEF2.js} +1 -1
- package/chunks/{chunk-BSV66I74.js → chunk-4LQG2WOJ.js} +1 -1
- package/chunks/{chunk-OWQXQ33F.js → chunk-4X4NHXFE.js} +1 -1
- package/chunks/{chunk-H6HLRKRK.js → chunk-5JV6KQMP.js} +4 -4
- package/chunks/{chunk-ZRUM5PE7.js → chunk-6BILFSH2.js} +1 -1
- package/chunks/{chunk-6VHZQNHX.js → chunk-6DBKPC2O.js} +1 -1
- package/chunks/{chunk-BQT5RJZB.js → chunk-6G6UVWJN.js} +1 -1
- package/chunks/{chunk-4EJVA4QA.js → chunk-73IMECRI.js} +1 -1
- package/chunks/{chunk-SK6QUPJR.js → chunk-7KFSTOXR.js} +1 -1
- package/chunks/{chunk-FODF5MI2.js → chunk-7NKYCWAA.js} +1 -1
- package/chunks/{chunk-6E6JUBFH.js → chunk-ALFFE37K.js} +1 -1
- package/chunks/{chunk-UQRZJPYH.js → chunk-ATYDQCCJ.js} +1 -1
- package/chunks/{chunk-IBBGWXAI.js → chunk-C2IORZTF.js} +1 -1
- package/chunks/{chunk-H5GHXMIT.js → chunk-C7NZBKCW.js} +1 -1
- package/chunks/{chunk-IBB6UZR2.js → chunk-CVDLYIOW.js} +1 -1
- package/chunks/{chunk-IWXI3UYI.js → chunk-DLBRD3UT.js} +1 -1
- package/chunks/{chunk-QBQAOXEV.js → chunk-DM6U63HP.js} +1 -1
- package/chunks/chunk-DPZJWN2Y.js +2 -0
- package/chunks/{chunk-VE6XM5OZ.js → chunk-EQUPVWVY.js} +1 -1
- package/chunks/{chunk-2N62LL55.js → chunk-FNPBHLLZ.js} +1 -1
- package/chunks/{chunk-QMRKAC6C.js → chunk-FZ5WFU6R.js} +1 -1
- package/chunks/chunk-GVTM4EOU.js +4 -0
- package/chunks/{chunk-KZAPWWOT.js → chunk-H6P3EACV.js} +1 -1
- package/chunks/{chunk-IQQEVKBP.js → chunk-IIFFSCDJ.js} +1 -1
- package/chunks/{chunk-TYLYMZQC.js → chunk-IZUADMIU.js} +1 -1
- package/chunks/{chunk-2OKCK56H.js → chunk-J5HFD7AQ.js} +1 -1
- package/chunks/{chunk-3LDGQFQZ.js → chunk-JFKHBLJB.js} +1 -1
- package/chunks/{chunk-SMKZDN2Q.js → chunk-JO4JKJ7R.js} +1 -1
- package/chunks/{chunk-CXTPYPO4.js → chunk-KHBIOZJE.js} +1 -1
- package/chunks/{chunk-EXP2TZZC.js → chunk-L5OC7F24.js} +1 -1
- package/chunks/{chunk-7RL5ZFGE.js → chunk-LJ7A5HYR.js} +1 -1
- package/chunks/{chunk-SF6FT44C.js → chunk-LLA75EMV.js} +1 -1
- package/chunks/chunk-LWQPFCWC.js +5 -0
- package/chunks/{chunk-Z2LXZLZV.js → chunk-LYPDFFKK.js} +1 -1
- package/chunks/{chunk-2UHHAPKY.js → chunk-MTCPFQ5I.js} +1 -1
- package/chunks/{chunk-LYKN5EIM.js → chunk-MW3RJU6I.js} +1 -1
- package/chunks/{chunk-XOSAN6PX.js → chunk-N4NDBIQS.js} +1 -1
- package/chunks/{chunk-SH4H7OLV.js → chunk-NMEPQK3T.js} +1 -1
- package/chunks/{chunk-GKOMIH2B.js → chunk-NMSD4ZXJ.js} +1 -1
- package/chunks/{chunk-QD46ROBD.js → chunk-NTY267SI.js} +1 -1
- package/chunks/{chunk-VVWAUS3D.js → chunk-NVPQJFAI.js} +1 -1
- package/chunks/{chunk-L7RS6MQ5.js → chunk-O325ZU5M.js} +1 -1
- package/chunks/{chunk-3U5M6YO6.js → chunk-OLHBVIWG.js} +1 -1
- package/chunks/chunk-R2W7BL7V.js +2 -0
- package/chunks/{chunk-E423U2PP.js → chunk-R3UCRXDC.js} +1 -1
- package/chunks/{chunk-RIOYVPPP.js → chunk-R4GKIRAI.js} +1 -1
- package/chunks/{chunk-WPOZMPUR.js → chunk-RHVDIXOM.js} +1 -1
- package/chunks/{chunk-ZEFYMWGZ.js → chunk-RNFCAHVL.js} +2 -2
- package/chunks/{chunk-MBG7SPPO.js → chunk-SHN5MT56.js} +1 -1
- package/chunks/{chunk-RFHWH6ZX.js → chunk-TFRONHJA.js} +1 -1
- package/chunks/chunk-TMMAF763.js +10 -0
- package/chunks/{chunk-VWQLQJVX.js → chunk-TW23CULJ.js} +1 -1
- package/chunks/{chunk-TNWF37YQ.js → chunk-TZDEJTLC.js} +30 -30
- package/chunks/{chunk-MPGRKZIA.js → chunk-UEMWZOIU.js} +1 -1
- package/chunks/{chunk-QYMHLTVT.js → chunk-UGYRUVUH.js} +1 -1
- package/chunks/{chunk-YJ3ICGHV.js → chunk-ULIMXXRY.js} +1 -1
- package/chunks/{chunk-WF6JNPZS.js → chunk-VV47GXU5.js} +1 -1
- package/chunks/{chunk-4COCZPO5.js → chunk-WI2RW3YL.js} +1 -1
- package/chunks/{chunk-H7U2VQCK.js → chunk-WTMV5GTZ.js} +1 -1
- package/chunks/chunk-WZHVKEPB.js +17 -0
- package/chunks/{chunk-BNMKKNLB.js → chunk-X3L6GBUX.js} +1 -1
- package/chunks/chunk-XOMPQOI6.js +4 -0
- package/chunks/{chunk-2BEIAJ5J.js → chunk-XUV7CW3L.js} +1 -1
- package/chunks/chunk-YACXTCWF.js +2 -0
- package/chunks/{chunk-WWI6727S.js → chunk-YKEVDAWS.js} +1 -1
- package/chunks/chunk-YTF3BAQS.js +2 -0
- package/chunks/{chunk-6V6C6MWY.js → chunk-ZNP3NXAD.js} +1 -1
- package/chunks/claude-code-UJYCO6CN.js +2 -0
- package/chunks/{clone-DSVKII72.js → clone-455UAECS.js} +1 -1
- package/chunks/{cmd-YU4MVRRR.js → cmd-QE4P4DS4.js} +1 -1
- package/chunks/{commitmsg-FS52L6J5.js → commitmsg-57EMHAFY.js} +2 -2
- package/chunks/{concern-4HFEHA2X.js → concern-I6LCWEIC.js} +1 -1
- package/chunks/{deno-I5YAWOB6.js → deno-JAQWMICD.js} +1 -1
- package/chunks/{dev-JQS5G6PA.js → dev-JM7NU24M.js} +2 -2
- package/chunks/{done-OSUBA7YO.js → done-A5VWIFOF.js} +1 -1
- package/chunks/{file-tools-shared-LMF72D6S.js → file-tools-shared-YKDNDDHR.js} +1 -1
- package/chunks/{free-WTJTBNOK.js → free-5NMWMMYS.js} +1 -1
- package/chunks/{gh-PJ2JDGXG.js → gh-DJ2YTDQX.js} +2 -2
- package/chunks/{gh-contributors-EIM2PLGS.js → gh-contributors-SXUFX3SO.js} +1 -1
- package/chunks/{init-ZOMBOUG3.js → init-GBMYF3YG.js} +3 -3
- package/chunks/{init-2AZSHAPG.js → init-M3P2QCX2.js} +1 -1
- package/chunks/{install-J4D2DGTQ.js → install-USGLFPAU.js} +1 -1
- package/chunks/invoke-hook-6BKTP2JY.js +12 -0
- package/chunks/kiro-V6SMU4OL.js +2 -0
- package/chunks/{list-XFPTCIMR.js → list-M5DGQG46.js} +1 -1
- package/chunks/{list-PSLAM3H6.js → list-NX7RRO6R.js} +1 -1
- package/chunks/{list-NS7ECFDY.js → list-ZVCGDRUH.js} +1 -1
- package/chunks/{load-config-OGSPRY4L.js → load-config-JZNJVJXH.js} +1 -1
- package/chunks/loader-command-I5DTYP25.js +2 -0
- package/chunks/loader-reactor-P6I3MX5L.js +2 -0
- package/chunks/{main-BUEG2IMJ.js → main-JAGIKKVD.js} +2 -2
- package/chunks/manager-GN6J4AUV.js +7 -0
- package/chunks/manifest-3GT2RMQL.js +2 -0
- package/chunks/{mod-VRTH35WZ.js → mod-2WMXZZGJ.js} +2 -2
- package/chunks/{mod-G7PJEGW6.js → mod-4XKQZL6W.js} +1 -1
- package/chunks/{mod-Q6SI6S6S.js → mod-5NDTGNVM.js} +2 -2
- package/chunks/mod-7ICCX4OY.js +2 -0
- package/chunks/mod-IALKEUJL.js +9 -0
- package/chunks/{mod-WOZXOD2F.js → mod-KPIOBBDD.js} +1 -1
- package/chunks/{mod-XEK7FROU.js → mod-NSL6IJRQ.js} +1 -1
- package/chunks/{mod-2PIV6QCE.js → mod-OG7BBJP4.js} +1 -1
- package/chunks/mod-QCXWBSGJ.js +2 -0
- package/chunks/mod-TB73AJG3.js +23 -0
- package/chunks/{mod-II7CSZUT.js → mod-TRSW5SEU.js} +1 -1
- package/chunks/{mod-RO7WP3SA.js → mod-VZT7JWPZ.js} +1 -1
- package/chunks/{mod-U2MNO6EC.js → mod-W225AUFE.js} +1 -1
- package/chunks/{new-3ZN4U7FJ.js → new-SS67ZKMK.js} +3 -3
- package/chunks/next-TIUOHHFS.js +9 -0
- package/chunks/{node-ZGM6SXXI.js → node-WWA6BHRC.js} +1 -1
- package/chunks/ollama-DFG5G467.js +2 -0
- package/chunks/opencode-UA45VV3W.js +2 -0
- package/chunks/pack-7TGKWDRO.js +6 -0
- package/chunks/purge-IKPQWHBC.js +5 -0
- package/chunks/{recipe-applier-6SGY2W3A.js → recipe-applier-I2VBGHZU.js} +1 -1
- package/chunks/{registry-fetcher-H63ZWZHU.js → registry-fetcher-TGWYJ5GN.js} +1 -1
- package/chunks/release-SEKFNXRA.js +9 -0
- package/chunks/{release-notes-FSDHH2Y2.js → release-notes-UUCPVHBQ.js} +1 -1
- package/chunks/{release-tag-IOH5HGAA.js → release-tag-F4B6ICW4.js} +1 -1
- package/chunks/{reopen-7EX6OJ6E.js → reopen-G4IUIH73.js} +1 -1
- package/chunks/{reset-IZ76OH4F.js → reset-BJZ263XC.js} +1 -1
- package/chunks/rule-PQ6WRV5W.js +7 -0
- package/chunks/{run-FGMEIO57.js → run-DAKF5SJN.js} +1 -1
- package/chunks/run-Y4ESAQUK.js +4 -0
- package/chunks/{scripts-L2FZBUHU.js → scripts-VRQQ24O3.js} +1 -1
- package/chunks/{serve-VXA7O546.js → serve-OGJIE344.js} +2 -2
- package/chunks/{server-KJW4HWK7.js → server-VCPSLFZ2.js} +1 -1
- package/chunks/session-CFDY73RJ.js +2 -0
- package/chunks/spec-CYRR2XUA.js +2 -0
- package/chunks/{status-EHBO4FYW.js → status-ZE2SA6FP.js} +1 -1
- package/chunks/{sync-M6DR7ZI4.js → sync-N5STAT6M.js} +1 -1
- package/chunks/system-3236RFTI.js +2 -0
- package/chunks/{system-2FUKECOJ.js → system-6GEEPUXD.js} +1 -1
- package/chunks/{update-CV7JPZGM.js → update-VLYRDEH4.js} +1 -1
- package/chunks/validate-bom-ME2NQAP3.js +2 -0
- package/chunks/validate-case-conflict-QUNIB43P.js +2 -0
- package/chunks/validate-circular-deps-DLUCIW7T.js +2 -0
- package/chunks/validate-commit-msg-SRLJRTKU.js +2 -0
- package/chunks/validate-docs-43LWHLVW.js +2 -0
- package/chunks/validate-eof-RV3IK6ZM.js +2 -0
- package/chunks/validate-export-names-D5I5DZTN.js +2 -0
- package/chunks/validate-filenames-WNLZI2S6.js +2 -0
- package/chunks/validate-json-6KIMBNBJ.js +2 -0
- package/chunks/validate-large-files-UXP7AZCW.js +2 -0
- package/chunks/validate-licenses-BL6PNSBP.js +2 -0
- package/chunks/validate-line-endings-NYHXORRG.js +2 -0
- package/chunks/validate-merge-conflict-IWUP4ZMW.js +2 -0
- package/chunks/validate-mod-exports-VCV4VZ5F.js +2 -0
- package/chunks/validate-package-configs-6PGL2YGD.js +2 -0
- package/chunks/validate-secrets-JV4ZSOVR.js +2 -0
- package/chunks/validate-shebangs-YACNWUG7.js +2 -0
- package/chunks/validate-submodules-ZXID3VEK.js +2 -0
- package/chunks/validate-symlinks-QNMKPYUY.js +2 -0
- package/chunks/validate-toml-PV3G7EFD.js +2 -0
- package/chunks/validate-trailing-whitespace-5Q5SEHOD.js +2 -0
- package/chunks/validate-yaml-IOMFQTSQ.js +2 -0
- package/chunks/versions-ROLQITT5.js +2 -0
- package/chunks/{watch-LW6FU2EL.js → watch-4NXY7JEX.js} +1 -1
- package/chunks/{wontfix-YJN2MZCL.js → wontfix-YSXRDPKA.js} +1 -1
- package/chunks/{workerd-LOWXXQEU.js → workerd-LH2MLWIF.js} +1 -1
- package/eser.js +1 -1
- package/package.json +9 -1
- package/chunks/chunk-5MVJUALI.js +0 -4
- package/chunks/chunk-5N2QHREH.js +0 -17
- package/chunks/chunk-JZ7DUWYC.js +0 -2
- package/chunks/chunk-OYNFK77H.js +0 -2
- package/chunks/chunk-PIV56NIC.js +0 -7
- package/chunks/chunk-V6YI7YJ4.js +0 -5
- package/chunks/chunk-VAIRJES2.js +0 -2
- package/chunks/chunk-VNJJQED3.js +0 -3
- package/chunks/chunk-ZJMX5J6E.js +0 -4
- package/chunks/claude-code-VX2T4YII.js +0 -2
- package/chunks/invoke-hook-D5XQP7A7.js +0 -11
- package/chunks/kiro-JGEZGFF3.js +0 -2
- package/chunks/manifest-4EA74HMS.js +0 -2
- package/chunks/mod-KTGLCC3R.js +0 -2
- package/chunks/mod-LAFYLM7O.js +0 -2
- package/chunks/next-NBSEIKEK.js +0 -9
- package/chunks/ollama-LD6OENM2.js +0 -2
- package/chunks/opencode-ECTBCC3O.js +0 -2
- package/chunks/purge-GV7LXDF3.js +0 -5
- package/chunks/release-6I5TL34I.js +0 -9
- package/chunks/rule-CNBMT5LD.js +0 -3
- package/chunks/run-PBQGRZV3.js +0 -4
- package/chunks/spec-AINLSNW6.js +0 -2
- package/chunks/system-X4X6JD4X.js +0 -2
- package/chunks/validate-bom-MYISC3IT.js +0 -2
- package/chunks/validate-case-conflict-B737FXF2.js +0 -2
- package/chunks/validate-circular-deps-WME7VUO4.js +0 -2
- package/chunks/validate-commit-msg-HJ5MXYNE.js +0 -2
- package/chunks/validate-docs-CCYMKDXS.js +0 -2
- package/chunks/validate-eof-6WAM6VAY.js +0 -2
- package/chunks/validate-export-names-Q5FSXTV5.js +0 -2
- package/chunks/validate-filenames-JVBT2GXA.js +0 -2
- package/chunks/validate-json-UPGBABYE.js +0 -2
- package/chunks/validate-large-files-RJLMJSWM.js +0 -2
- package/chunks/validate-licenses-YW5CK3QF.js +0 -2
- package/chunks/validate-line-endings-3VNZ7KT6.js +0 -2
- package/chunks/validate-merge-conflict-SKWYYHFS.js +0 -2
- package/chunks/validate-mod-exports-OMUDATXK.js +0 -2
- package/chunks/validate-package-configs-ZO5YJE2D.js +0 -2
- package/chunks/validate-secrets-FV6672MD.js +0 -2
- package/chunks/validate-shebangs-N55SME72.js +0 -2
- package/chunks/validate-submodules-ADHLOUGA.js +0 -2
- package/chunks/validate-symlinks-4IIIP6AQ.js +0 -2
- package/chunks/validate-toml-OVIYGLPR.js +0 -2
- package/chunks/validate-trailing-whitespace-LWP5QEXS.js +0 -2
- package/chunks/validate-yaml-L7JCSGXY.js +0 -2
- package/chunks/versions-OKK45EDV.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as oe,b as ie}from"./chunk-
|
|
2
|
+
import{a as oe,b as ie}from"./chunk-NTY267SI.js";import{d as ne}from"./chunk-L5OC7F24.js";import{d as Y}from"./chunk-WZHVKEPB.js";import"./chunk-NY4W44PI.js";import{b as P}from"./chunk-2HSGE3TL.js";import{d as se}from"./chunk-2ZYCRMUT.js";import{c as Z,d as ee,e as te}from"./chunk-2LF7QSIN.js";import{a as H,b as _,h as q,l as B,n as K,p as U,z as V}from"./chunk-TMMAF763.js";import{a as Q,c as S,d as X}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import"./chunk-7ZYDAZBD.js";import{a as k,b as M,i as I,j as W,k as z,l as J,m as G,n as h,o as r,p as w}from"./chunk-YACXTCWF.js";import"./chunk-GE3LJ6QM.js";import{a as F}from"./chunk-N4NDBIQS.js";import"./chunk-BNQAZLIQ.js";import"./chunk-SHN5MT56.js";import"./chunk-YVN2NZL4.js";import"./chunk-J7YTWK67.js";import"./chunk-GVTM4EOU.js";import"./chunk-6BILFSH2.js";import"./chunk-NMEPQK3T.js";import"./chunk-RNFCAHVL.js";import"./chunk-MG65QJY6.js";import{a as b}from"./chunk-FFWPJP7A.js";import{i as f}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var re=F;var me=async t=>{try{return await f.fs.stat(t),!0}catch{return!1}},he=[{id:"claude-code",paths:["CLAUDE.md",".claude"]},{id:"cursor",paths:[".cursorrules",".cursor"]},{id:"kiro",paths:[".kiro"]},{id:"copilot",paths:[".github/copilot-instructions.md"]},{id:"windsurf",paths:[".windsurfrules"]},{id:"codex",paths:[".codex",".codex/config.toml"]},{id:"copilot-cli",paths:[".copilot",".github/hooks"]}],ae=async t=>{let e=[];for(let o of he)for(let s of o.paths)if(await me(`${t}/${s}`)){e.push(o.id);break}return e};var a=async t=>{try{return await f.fs.stat(t),!0}catch{return!1}},ce=async(t,e)=>{try{let o=await f.fs.readTextFile(t);return JSON.parse(o)[e]??null}catch{return null}},ye=async t=>{let e=[];return(await a(`${t}/package.json`)||await a(`${t}/deno.json`))&&e.push("typescript"),await a(`${t}/go.mod`)&&e.push("go"),await a(`${t}/Cargo.toml`)&&e.push("rust"),(await a(`${t}/pyproject.toml`)||await a(`${t}/setup.py`))&&e.push("python"),e},Ce=async t=>{let e=[],o=await ce(`${t}/package.json`,"dependencies");return o!==null&&("react"in o&&e.push("react"),"vue"in o&&e.push("vue"),"svelte"in o&&e.push("svelte"),"next"in o&&e.push("nextjs"),"express"in o&&e.push("express"),"hono"in o&&e.push("hono")),e},ve=async t=>{let e=[];return await a(`${t}/.github/workflows`)&&e.push("github-actions"),await a(`${t}/.gitlab-ci.yml`)&&e.push("gitlab-ci"),await a(`${t}/Jenkinsfile`)&&e.push("jenkins"),await a(`${t}/.circleci`)&&e.push("circleci"),e},$e=async t=>{if(await a(`${t}/deno.json`))return"deno";let e=await ce(`${t}/package.json`,"devDependencies");if(e!==null){if("vitest"in e)return"vitest";if("jest"in e)return"jest";if("playwright"in e)return"playwright"}return null},le=async t=>{let[e,o,s,d]=await Promise.all([ye(t),Ce(t),ve(t),$e(t)]);return{languages:e,frameworks:o,ci:s,testRunner:d}};var Ge=async t=>{let e=f.process.cwd(),o=oe(t),s=M({target:o==="agent"?"non-interactive":"interactive"}),d=ie(t),y=de(d,"--concerns"),g=de(d,"--tools"),u=d.includes("--non-interactive")||o==="agent";if(await V(e))return r.warn(s,"noskills is already initialized in this project."),r.info(s,`Run \`${S("sync")}\` to regenerate tool files.`),b(void 0);W(s,"noskills init");let D=w(s,"Scanning project...");D.start();let m=await le(e);D.succeed("Project scanned");for(let n of m.languages)r.step(s,` ${n}`);for(let n of m.frameworks)r.step(s,` ${n}`);for(let n of m.ci)r.step(s,` ${n}`);m.testRunner!==null&&r.step(s,` test runner: ${m.testRunner}`),h(s);let j=w(s,"Detecting coding tools...");j.start();let A=await ae(e),C=ne(),L=C!==null&&!A.includes(C)?[C]:[],v=[...new Set([...L,...A])];j.succeed(`${v.length} coding tool(s) detected`);for(let n of v){let i=n===C?" (current)":"";r.step(s,` ${n}${i}`)}let p;if(g!==null){let n=["claude-code","cursor","kiro","copilot","windsurf","opencode","codex","copilot-cli"],i=g.filter(l=>n.includes(l));p=[...new Set([...L,...i])]}else u?p=[...v]:(h(s),p=await be(s,v,C));h(s);let O=w(s,"Detecting AI providers...");O.start();let x=(await re()).filter(n=>n.available).map(n=>n.name);O.succeed(`${x.length} provider(s) detected`),h(s);let T=await P(),c;if(y!==null){let n=T.map(i=>i.id);c=y.filter(i=>n.includes(i)).sort((i,l)=>n.indexOf(i)-n.indexOf(l))}else if(u)c=[];else{let n=T.map(l=>({value:l.id,label:l.name,hint:l.description.slice(0,60)})),i=await I(s,{message:"What kind of project is this? (space to toggle, enter to confirm)",options:n});c=k(i)?[]:[...i]}c.length>0?r.success(s,` Concerns: ${c.join(", ")}`):r.info(s,"No concerns selected. Add later with `concern add <id> [<id2> ...]`."),h(s);let E=w(s,"Initializing...");E.start(),await U(e);let ue=T.filter(n=>c.includes(n.id));for(let n of ue)await K(e,n);let N=await X();Q(N);let $={..._(c,p,x,m),command:N};await B(e,$);let R=H();if(await q(e,R),E.succeed("Scaffolded `.eser/`"),p.length>0){let n=w(s,"Syncing tool files...");n.start();let i=await te(e,p,$);n.succeed(`Synced ${i.length} tool(s)`)}else r.warn(s,"No tools selected. noskills will work in agentless CLI mode only."),r.info(s,"Add tools later with `noskills sync`.");if(z(s,`Done. ${p.length} tool(s), ${x.length} provider(s), ${c.length} concern(s).`),o==="agent"){let i=(await P()).filter(ge=>c.includes(ge.id)),l=await Z(e),pe=ee($?.tools??[]),fe=Y(R,i,l,$,void 0,void 0,void 0,pe);await se(fe,"json")}else J(s),G(s,`Start a spec with: ${S('spec new "..."')}`);return b(void 0)},Te=[{value:"claude-code",label:"Claude Code"},{value:"cursor",label:"Cursor"},{value:"kiro",label:"Kiro"},{value:"copilot",label:"GitHub Copilot"},{value:"windsurf",label:"Windsurf"},{value:"opencode",label:"OpenCode"},{value:"codex",label:"Codex CLI"},{value:"copilot-cli",label:"Copilot CLI"}],be=async(t,e,o)=>{let s=e.length===0?"No coding tools detected. Which tools do you use? (space to toggle)":"Any additional tools? (space to toggle, enter to skip)",d=new Set(e),y=await I(t,{message:s,options:Te.map(u=>({...u,hint:u.value===o?"you're running inside it":d.has(u.value)?"detected":void 0,disabled:u.value===o})),initialValues:[...e],required:!1});if(k(y))return[...e];let g=[...y];return o!==null&&!g.includes(o)&&g.unshift(o),g},de=(t,e)=>{if(t===void 0)return null;for(let o of t)if(o.startsWith(`${e}=`))return o.slice(e.length+1).split(",").map(s=>s.trim()).filter(Boolean);return null};export{Ge as main};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as j}from"./chunk-
|
|
2
|
+
import{b as j}from"./chunk-4X4NHXFE.js";import"./chunk-2XNFZXHY.js";import"./chunk-VV47GXU5.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as A,h as P,k as H}from"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import{b,c as O,d,f as k,g as w,h as y,i as E}from"./chunk-YVN2NZL4.js";import{a as $}from"./chunk-MG65QJY6.js";import{g as r}from"./chunk-FFWPJP7A.js";import{j as e}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var M={precommit:{hookName:"pre-commit",args:""},commitmsg:{hookName:"commit-msg",args:'-- "$1"'},prepush:{hookName:"pre-push",args:""}},C="# @eser managed hook",I=async(i,n)=>{let t=(await e.detectExecutionContext({command:"eser",devCommand:"deno task cli",npmPackage:"eser",jsrPackage:"@eser/cli"})).command,o=n.length>0?` ${n}`:"",a=`${t} workflows run -e ${i}${o}`;return["#!/bin/sh",`${C} \u2014 generated by \`eser codebase install\``,"# Do not edit. Re-run `eser codebase install` to update.","",a,""].join(`
|
|
3
3
|
`)},S=async()=>{try{let t=(await e.runtime.exec.exec("git",["rev-parse","--git-dir"])).trim();if(t.length>0)return t}catch{}let i=e.runtime.process.cwd(),n=e.runtime.path.join(i,".git");try{if((await e.runtime.fs.stat(n)).isDirectory)return n}catch{}return null},G=i=>{let n=i.workflows;if(!Array.isArray(n))return[];let s=new Set;for(let t of n)if(Array.isArray(t.on))for(let o of t.on)typeof o=="string"&&s.add(o);return[...s]},T=H.ansi(),U=async i=>{let n=$(i??[],{boolean:["force","dry-run","help"],alias:{h:"help",f:"force",n:"dry-run"}});if(n.help)return console.log("eser codebase install \u2014 Install git hooks from .eser/manifest.yml"),console.log(""),console.log("Flags:"),console.log(" --force, -f Overwrite non-managed hooks"),console.log(" --dry-run, -n Show what would happen without writing"),console.log(" --help, -h Show this help"),r.ok(void 0);let s=A({renderer:T,sink:P.stdout()}),t=n.force,o=n["dry-run"],a=await S();if(a===null)return s.writeln(k("Error: not inside a git repository")),await s.close(),r.fail({exitCode:1});let p=e.runtime.path.join(a,"hooks"),g=e.runtime.process.cwd(),l=await j(g);if(l===null)return s.writeln(k("Error: no .eser/manifest.yml found in current directory")),await s.close(),r.fail({exitCode:1});let c=G(l);if(c.length===0)return s.writeln(y("No workflow events found \u2014 nothing to install.")),await s.close(),r.ok(void 0);o||await e.runtime.fs.ensureDir(p);let f=0,v=0,u=0;for(let N of c){let F=M[N];if(F===void 0){s.writeln(d(` skip ${N} (unknown event, no hook mapping)`));continue}let{hookName:m,args:K}=F,D=e.runtime.path.join(p,m),_=await I(N,K),R=!1,x=!1;try{let q=await e.runtime.fs.readTextFile(D);R=!0,x=q.includes(C)}catch{}if(o){R?x?s.writeln(E(` would update ${m} (managed)`)):t?s.writeln(y(` would overwrite ${m} (--force)`)):s.writeln(y(` would skip ${m} (user hook; use --force to overwrite)`)):s.writeln(E(` would create ${m}`));continue}if(R&&!x&&!t){s.writeln(y(` skip ${m} \u2014 user hook exists (use --force to overwrite)`)),v++;continue}await e.runtime.fs.writeTextFile(D,_);try{await e.runtime.fs.chmod(D,493)}catch{}R&&x?(s.writeln(w(` updated ${m}`)),u++):(s.writeln(w(` installed ${m}`)),f++)}s.writeln();let h=[];return f>0&&h.push(`${f} installed`),u>0&&h.push(`${u} updated`),v>0&&h.push(`${v} skipped`),o?s.writeln(d("(dry run \u2014 no changes made)")):h.length>0?s.writeln(w(`Done: ${h.join(", ")}.`)):s.writeln(d("Nothing to do.")),await s.close(),r.ok(void 0)},W=async i=>{if($(i??[],{boolean:["help"],alias:{h:"help"}}).help)return console.log("eser codebase uninstall \u2014 Remove managed git hooks"),r.ok(void 0);let s=A({renderer:T,sink:P.stdout()}),t=await S();if(t===null)return s.writeln(k("Error: not inside a git repository")),await s.close(),r.fail({exitCode:1});let o=e.runtime.path.join(t,"hooks"),a=0,p=Object.values(M).map(l=>l.hookName),g=[...new Set(p)];for(let l of g){let c=e.runtime.path.join(o,l);try{(await e.runtime.fs.readTextFile(c)).includes(C)&&(await e.runtime.fs.remove(c),s.writeln(w(` removed ${l}`)),a++)}catch{}}return s.writeln(),a>0?s.writeln(w(`Done: ${a} hook(s) removed.`)):s.writeln(d("No managed hooks found.")),await s.close(),r.ok(void 0)},X=async i=>{if($(i??[],{boolean:["help"],alias:{h:"help"}}).help)return console.log("eser codebase status \u2014 Show git hook installation status"),r.ok(void 0);let s=A({renderer:T,sink:P.stdout()}),t=await S();if(t===null)return s.writeln(k("Error: not inside a git repository")),await s.close(),r.fail({exitCode:1});let o=e.runtime.path.join(t,"hooks"),a=e.runtime.process.cwd(),p=await j(a);if(p===null)return s.writeln(k("Error: no .eser/manifest.yml found in current directory")),await s.close(),r.fail({exitCode:1});let g=G(p);if(g.length===0)return s.writeln(d("No workflow events found in manifest.")),await s.close(),r.ok(void 0);s.writeln(O("Git hook status:")),s.writeln();for(let l of g){let c=M[l];if(c===void 0){s.writeln(b(" "),d(l.padEnd(14)),b(" "),d("(no hook mapping)"));continue}let{hookName:f}=c,v=e.runtime.path.join(o,f),u;try{(await e.runtime.fs.readTextFile(v)).includes(C)?u=w("managed (@eser)"):u=y("user hook")}catch{u=d("not installed")}s.writeln(b(` ${f.padEnd(14)} `),u)}return s.writeln(),await s.close(),r.ok(void 0)};export{U as main,X as statusMain,W as uninstallMain};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{d as F}from"./chunk-WZHVKEPB.js";import"./chunk-NY4W44PI.js";import"./chunk-2HSGE3TL.js";import{c as A,d as _}from"./chunk-2LF7QSIN.js";import{c as g,d as D,e as b,k as E,o as $,s as x,t as N,z as P}from"./chunk-TMMAF763.js";import{c as m}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{a as l}from"./chunk-FFWPJP7A.js";import{i as a}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var L=new Set(["log","diff","status","show","blame","rev-parse","ls-files","ls-tree","cat-file","describe","shortlog","name-rev","for-each-ref","rev-list","help","version"]),I=new Map([["branch",new Set(["","--list","-l","-a","--all","-r","--remotes","-v","--verbose","--contains","--no-contains","--merged","--no-merged"])],["tag",new Set(["","-l","--list","-v","--verify","-n"])],["stash",new Set(["list","show"])],["remote",new Set(["","-v","--verbose","show","get-url"])],["config",new Set(["--get","--get-all","--get-regexp","--list","-l","--global","--local","--system"])],["reflog",new Set(["","show"])]]),S=e=>{let s=e.trim();if(!s.startsWith("git"))return!0;let t=s.slice(3).trim();if(t.length===0)return!0;let i=t.split(/\s+/),r=i[0]??"";if(L.has(r))return!0;let n=I.get(r);if(n!==void 0){let o=i[1]??"";if(n.has(o))return!0}return!1};var G=e=>{let s=[/(?:bash|sh|\/bin\/bash|\/bin\/sh)\s+-c\s+["'](.+?)["']/g,/(?:bash|sh|\/bin\/bash|\/bin\/sh)\s+-c\s+(\S+)/g,/eval\s+["'](.+?)["']/g];for(let r of s){let n;for(;(n=r.exec(e))!==null;){let o=n[1]??"";if(o.includes("git")&&!S(o))return!0}}let t=e.split(/\s*\|\s*/);for(let r of t){let n=r.trim();if(n.startsWith("git")&&!S(n))return!0}let i=e.matchAll(/\bgit\s+([\w-]+)/g);for(let r of i){let n=r[1]??"";if(!L.has(n)&&!I.has(n))return!0;if(I.has(n)){let o=r.index??0,p=e.slice(o);if(!S(p.split(/[;&|$)`]/)[0]??""))return!0}}return!1};var R=async()=>{let e=a.process.stdin.getReader(),s=[];try{for(;;){let{done:n,value:o}=await e.read();if(n||o===void 0)break;s.push(o)}}finally{e.releaseLock()}let t=0,i=new Uint8Array(s.reduce((n,o)=>n+o.length,0));for(let n of s)i.set(n,t),t+=n.length;let r=new TextDecoder().decode(i);try{return JSON.parse(r)}catch{return{}}},M=async e=>{let s=new TextEncoder,t=a.process.stdout.getWriter();await t.write(s.encode(JSON.stringify(e))),t.releaseLock()},ee=async e=>{switch(e?.[0]){case"pre-tool-use":return await B();case"stop":return await Y();case"post-file-write":return await J();case"post-bash":return await K();case"session-start":return await j();default:return l(void 0)}},v=async e=>{await M({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`noskills: ${e}`}})},W=(e,s)=>{if(s||!e.includes("git"))return null;let t=e.split(/\s*(?:&&|;)\s*/);for(let i of t){let r=i.trim();if(r.startsWith("git")&&!S(r))return"Git write operations are not allowed. Only read commands (log, diff, status, show, blame, branch, tag) are permitted. The user controls git, the agent controls files."}return G(e)?"Git write operations detected in subshell or pipe. Only read commands are permitted. The user controls git, the agent controls files.":null},B=async()=>{let e=await R(),s=e.tool_name??"unknown",t=e.tool_input??{},i=e.cwd??a.process.cwd(),r=await E(i),n=a.env.get("NOSKILLS_SESSION")??null;if(n!==null){let c=await x(i,n);if(c!==null&&c.mode==="free"){if(s==="Bash"){let u=(t.command??"").trim(),d=r?.allowGit??!1;if(!d&&u.includes("git")){let h=W(u,d);if(h!==null)return await v(h),l(void 0)}}return l(void 0)}}let o={};if(n!==null){let c=await x(i,n);if(c!==null&&c.mode==="spec"&&c.phase!==null)o={phase:c.phase};else if(c!==null&&c.spec!==null)try{o=await b(i,c.spec)}catch{return l(void 0)}else return l(void 0)}else{let c=await N(i);if(c.length>0){let u={DISCOVERY:10,DISCOVERY_REVIEW:10,SPEC_DRAFT:10,SPEC_APPROVED:8,BLOCKED:8,EXECUTING:2,FREE:0,IDLE:0,COMPLETED:0},d="IDLE",h=0;for(let U of c){let C=U.phase??"IDLE",T=u[C]??0;T>h&&(h=T,d=C)}o={phase:d};let y=new TextEncoder,O=a.process.stderr.getWriter();await O.write(y.encode(`noskills: WARNING \u2014 ${c.length} session(s) active but NOSKILLS_SESSION not set. Using most restrictive phase (${d}). Set NOSKILLS_SESSION for correct per-instance enforcement.
|
|
3
|
+
`)),O.releaseLock()}else try{o=await D(i)}catch{return l(void 0)}}if(s==="Bash"){let c=(t.command??"").trim(),u=r?.allowGit??!1,d=W(c,u);return d!==null?(await v(d),l(void 0)):l(void 0)}let p=["Write","Edit","MultiEdit"];if(!p.includes(s))return l(void 0);let w=t.file_path??t.path??"";if(w.includes(".eser/")||w.includes(".claude/"))return l(void 0);let f=o.phase??"UNKNOWN";if(f==="EXECUTING"||f==="IDLE"||f==="FREE"||f==="COMPLETED"||f==="UNKNOWN"){if(f==="EXECUTING"&&p.includes(s)){let c=`${i}/${g.stateDir}/executor-warned.flag`;try{await a.fs.readTextFile(c)}catch{try{await a.fs.mkdir(`${i}/${g.stateDir}`,{recursive:!0}),await a.fs.writeTextFile(c,new Date().toISOString());let u=new TextEncoder,d=a.process.stderr.getWriter();await d.write(u.encode(`noskills: REMINDER \u2014 You should be spawning a noskills-executor sub-agent for implementation work. If you're the main orchestrator agent, delegate to a sub-agent instead of editing directly. If you ARE a sub-agent, ignore this message and continue.
|
|
4
|
+
`)),d.releaseLock()}catch{}}}return l(void 0)}let k={DISCOVERY:`You are in DISCOVERY \u2014 this is a thinking phase, not an implementation phase. Read and discuss only. To write code, complete discovery and get the spec approved first. Run \`${m("next")}\` to continue.`,DISCOVERY_REVIEW:`You are in DISCOVERY_REVIEW \u2014 this is a thinking phase, not an implementation phase. Read and discuss only. To write code, complete discovery and get the spec approved first. Run \`${m('next --answer="approve"')}\` or revise answers.`,SPEC_DRAFT:`You are in SPEC_DRAFT \u2014 this is a thinking phase, not an implementation phase. Read and discuss only. To write code, approve the spec first. Run \`${m("approve")}\``,SPEC_APPROVED:`You are in SPEC_APPROVED \u2014 start execution first: \`${m('next --answer="start"')}\``,BLOCKED:`Execution blocked. Resolve with \`${m('next --answer="resolution"')}\``};return await v(k[f]??`Run \`${m("next")}\` first.`),l(void 0)},Y=async()=>{let e=await R();if(e.stop_hook_active===!0)return l(void 0);let s=e.cwd??a.process.cwd(),t;try{let u=await a.fs.readTextFile(`${s}/${g.stateFile}`);t=JSON.parse(u)}catch{return l(void 0)}if(t.phase!=="EXECUTING")return l(void 0);let i=t.execution??{},r=`${s}/${g.stateDir}/files-changed.jsonl`,n=[];try{let d=(await a.fs.readTextFile(r)).trim().split(`
|
|
5
|
+
`).filter(Boolean);n=[...new Set(d.map(h=>{try{return JSON.parse(h).file}catch{return null}}).filter(h=>h!==null))]}catch{}let o=[],p="no changes";try{let{execSync:u}=await import("node:child_process");o=u("git diff --name-only",{cwd:s,encoding:"utf-8",timeout:5e3}).trim().split(`
|
|
6
|
+
`).filter(Boolean);let y=u("git diff --stat",{cwd:s,encoding:"utf-8",timeout:5e3}).trim().split(`
|
|
7
|
+
`);p=y[y.length-1]??"no changes"}catch{}let w=[...new Set([...n,...o])],f=(i.iteration??0)+1,k=`${s}/${g.stateDir}/iterations`;try{await a.fs.mkdir(k,{recursive:!0}),await a.fs.writeTextFile(`${k}/iteration-${f}.json`,JSON.stringify({iteration:f,files:w,gitStat:p.trim(),timestamp:new Date().toISOString()},null,2)+`
|
|
8
|
+
`)}catch{}let c=15;try{let u=await E(s);u!==null&&(c=u.maxIterationsBeforeRestart)}catch{}t.execution={...i,iteration:f,modifiedFiles:w,lastProgress:p.trim()||i.lastProgress||null},t.lastCalledAt=new Date().toISOString();try{await a.fs.writeTextFile(`${s}/${g.stateFile}`,JSON.stringify(t,null,2)+`
|
|
9
|
+
`)}catch{}try{await a.fs.writeTextFile(r,"")}catch{}try{await a.fs.remove(`${s}/${g.stateDir}/executor-warned.flag`)}catch{}if(f>=c){let u=new TextEncoder,d=a.process.stderr.getWriter();await d.write(u.encode(`noskills: iteration ${f} reached threshold (${c}). Consider starting a fresh conversation.
|
|
10
|
+
`)),d.releaseLock()}return l(void 0)},J=async()=>{let e=await R(),s=e.tool_input??{},t=s.file_path??s.path??"";if(!t||t.includes(".eser/")||t.includes(".claude/"))return l(void 0);let i=e.cwd??a.process.cwd(),r=`${i}/${g.stateDir}/files-changed.jsonl`,n=JSON.stringify({file:t,tool:e.tool_name,ts:new Date().toISOString()});try{await a.fs.mkdir(`${i}/${g.stateDir}`,{recursive:!0});let o="";try{o=await a.fs.readTextFile(r)}catch{}await a.fs.writeTextFile(r,o+n+`
|
|
11
|
+
`)}catch{}return l(void 0)},K=async()=>{let e=await R(),t=(e.tool_input??{}).command??"";if(!t.includes("noskills"))return l(void 0);let i=e.cwd??a.process.cwd(),r=`${i}/${g.stateDir}/noskills-calls.jsonl`,n=JSON.stringify({command:t,ts:new Date().toISOString()});try{await a.fs.mkdir(`${i}/${g.stateDir}`,{recursive:!0});let o="";try{o=await a.fs.readTextFile(r)}catch{}await a.fs.writeTextFile(r,o+n+`
|
|
12
|
+
`)}catch{}return l(void 0)},j=async()=>{let e=a.process.cwd();if(!await P(e))return l(void 0);let s=await D(e),t=await E(e),r=(await $(e)).filter(w=>t!==null&&t.concerns.includes(w.id)),n=await A(e),o=_(t?.tools??[]),p=F(s,r,n,t,void 0,void 0,void 0,o);return await M(p),l(void 0)};export{ee as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b}from"./chunk-C2IORZTF.js";import"./chunk-2TANTKYS.js";import"./chunk-J7YTWK67.js";import"./chunk-GVTM4EOU.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{a as KiroModel,b as kiroFactory};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as R,d as h}from"./chunk-P2MUEKFT.js";import{k as S}from"./chunk-
|
|
2
|
+
import{a as R,d as h}from"./chunk-P2MUEKFT.js";import{k as S}from"./chunk-NMSD4ZXJ.js";import{f as m,h as f,k as y}from"./chunk-SHN5MT56.js";import{c as p,d as l,k as d}from"./chunk-YVN2NZL4.js";import{a as u}from"./chunk-MG65QJY6.js";import{a as n,b as o,c as g}from"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var w=["project","structure","utility"],C={project:"PROJECTS",structure:"STRUCTURES",utility:"UTILITIES"},k=t=>R(async r=>{try{let s=await S(t.registrySource,{local:t.local}),e=[...s.recipes];if(t.language!==void 0&&(e=e.filter(i=>i.language===t.language)),t.scale!==void 0&&(e=e.filter(i=>i.scale===t.scale)),t.tag!==void 0&&(e=e.filter(i=>i.tags!==void 0&&i.tags.includes(t.tag))),e.length===0)return r.out.writeln("No recipes found matching your filters."),r.out.writeln("Run ",l("`eser kit list`")," without filters to see all recipes."),n({manifest:s,recipes:e});r.out.writeln(p(`${s.name} \u2014 ${s.description}`)),r.out.writeln();for(let i of w){let c=e.filter(a=>a.scale===i);if(c.length!==0){r.out.writeln(d(C[i]));for(let a of c)r.out.writeln(` ${a.name.padEnd(20)} ${a.description} `,l(`[${a.language}]`));r.out.writeln()}}return n({manifest:s,recipes:e})}catch(s){let e=s instanceof Error?s.message:String(s);return o({_tag:"RegistryError",message:e})}});var $=async t=>{let r=u(t??[],{string:["registry","language","scale","tag"],boolean:["local"]}),s=m({renderer:y.ansi(),sink:f.stdout()}),e=await h(k({registrySource:r.registry,language:r.language,scale:r.scale,tag:r.tag,local:r.local===!0}),{out:s});return await s.close(),g(e)?n(void 0):o({exitCode:1})};export{$ as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as p}from"./chunk-
|
|
2
|
+
import{a as p}from"./chunk-N4NDBIQS.js";import{f as o,h as m,k as d}from"./chunk-SHN5MT56.js";import{c as t,d as a,g as l,m as n}from"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import{a as i}from"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var $=async b=>{let e=o({renderer:d.ansi(),sink:m.stdout()});e.writeln(t("AI Providers")),e.writeln("");let r=await p(),v=r.map(s=>[s.available?l("\u25CF"):a("\u25CB"),s.available?t(`${s.name} (${s.alias})`):a(`${s.name} (${s.alias})`),a(s.type),s.available?s.detail:a(s.detail)]);e.writeln(n(["","Provider","Type","Status"],v));let u=r.filter(s=>s.available).length;return e.writeln(a(`${u}/${r.length} providers available`)),await e.close(),i(void 0)};export{$ as main};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as h,b as u,c as k}from"./chunk-
|
|
2
|
+
import{a as h,b as u,c as k}from"./chunk-WTMV5GTZ.js";import"./chunk-4X4NHXFE.js";import"./chunk-2XNFZXHY.js";import{f as m,h as c,k as w}from"./chunk-SHN5MT56.js";import{b as t,c as a,d as e}from"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import{a as g}from"./chunk-MG65QJY6.js";import{a as i}from"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var R=async(y,p)=>{let d=g(y??[],{string:["config"],boolean:["help"],alias:{h:"help"}});if(d.help)return console.log(`eser workflows list \u2014 List available workflows and tools
|
|
3
3
|
`),console.log("Options:"),console.log(" --config <path> Config directory (default: .)"),console.log(" -h, --help Show this help"),i(void 0);let o=m({renderer:w.ansi(),sink:c.stdout()}),A=d.config??".",r=await u(A),n=h();if(n.register(k),p?.tools!==void 0&&n.registerAll(p.tools),r!==null&&r.workflows.length>0){o.writeln(a("Workflows:"));for(let s of r.workflows){let x=s.on.length>0?s.on.join(", "):"(no events)",f=s.steps.length,C=f===1?"step":"steps";o.writeln(t(` ${s.id.padEnd(20)} `),e(x.padEnd(25)),t(` ${f} ${C}`))}}else o.writeln(e("No workflows defined."));o.writeln();let l=n.getAll();if(l.length>0){o.writeln(a(`Registered tools (${l.length}):`));for(let s of l)o.writeln(t(` ${s.name.padEnd(28)} `),e(s.description))}else o.writeln(e("No tools registered."));return await o.close(),i(void 0)};export{R as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-LLA75EMV.js";import"./chunk-GTHXGAMQ.js";import"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-N7DXBY3O.js";import"./chunk-AP72BKVG.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{a as loadConfig};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as i}from"./chunk-R2W7BL7V.js";import"./chunk-5WJ6AUNY.js";var w=async a=>{let c=(await import("node:fs")).readFileSync(a),d=await WebAssembly.compile(c),u=s=>{let r=JSON.stringify(s),t=new TextEncoder().encode(r),e=new i({stdin:t}),l=new WebAssembly.Instance(d,{wasi_snapshot_preview1:e.wasiImport});e.start(l);let o=e.getStdout().trim();return o.length===0?{ok:!1,error:"WASM module produced no output"}:JSON.parse(o)},n=(s,r)=>{let t={fn:s};r!==void 0&&(t.args=r);let e=u(t);if(!e.ok)throw new Error(`eser-ajan WASM call "${s}" failed: ${e.error??"unknown error"}`);return e.result??""};return{symbols:{EserAjanVersion:()=>n("version"),EserAjanInit:()=>(n("init"),0),EserAjanShutdown:()=>{n("shutdown")},EserAjanFree:s=>{},EserAjanConfigLoad:s=>n("configLoad",{path:s}),EserAjanDIResolve:s=>n("diResolve",{name:s})},close:()=>{}}};export{w as loadCommandWasm};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as i}from"./chunk-R2W7BL7V.js";import"./chunk-5WJ6AUNY.js";var d=async _=>{let m=(await import("node:fs")).readFileSync(_),c=await WebAssembly.compile(m),a=new i,t=new WebAssembly.Instance(c,{wasi_snapshot_preview1:a.wasiImport}),n=t.exports;a.initialize(t);let s=e=>{if(e<=0)return"";let r=n.eser_ajan_result_ptr();if(r===0)return"";let u=new Uint8Array(n.memory.buffer,r,e),o=new Uint8Array(e);return o.set(u),new TextDecoder().decode(o)};return{symbols:{EserAjanVersion:()=>{let e=n.eser_ajan_version();return s(e)},EserAjanInit:()=>n.eser_ajan_init(),EserAjanShutdown:()=>{n.eser_ajan_shutdown()},EserAjanFree:e=>{},EserAjanConfigLoad:e=>{let r=n.eser_ajan_config_load();return s(r)},EserAjanDIResolve:e=>{let r=n.eser_ajan_di_resolve();return s(r)}},close:()=>{}}};export{d as loadReactorWasm};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as K,b as j,c as M,d as F,f as N}from"./chunk-
|
|
2
|
+
import{a as K,b as j,c as M,d as F,f as N}from"./chunk-5JV6KQMP.js";import{a as Q}from"./chunk-LLA75EMV.js";import"./chunk-LWQPFCWC.js";import"./chunk-NVPQJFAI.js";import"./chunk-3OG2MEF2.js";import"./chunk-3D5TBTM3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import{a as X}from"./chunk-YTF3BAQS.js";import{b as Y}from"./chunk-NBA6EFWU.js";import{d as G,e as m,g as V}from"./chunk-5DWJ7WEE.js";import{a as v}from"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{i as s}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import{m as W}from"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var B=m.getLogger(["laroux-bundler","prebuilt-bundler"]),w=class{config;cachedManifest=null;constructor(e){this.config=e}async getBundle(){B.debug("\u{1F4E6} Loading prebuilt bundle from disk...");let e=s.path.resolve(this.config.distDir,"client","manifest.json"),t=await s.fs.readTextFile(e),r=JSON.parse(t),o=s.path.resolve(this.config.distDir,"client","module-map.json"),i={};try{let p=await s.fs.readTextFile(o);i=JSON.parse(p),B.debug(`\u2705 Loaded module map with ${Object.keys(i).length} entries`)}catch{B.warn("\u26A0\uFE0F Module map not found, SSR may fail for client components")}this.cachedManifest=r;let l=r.entrypoint?`/${r.entrypoint}`:"/client.js";return B.debug(`\u2705 Loaded manifest with entrypoint: ${l}`),{clientCode:null,moduleMap:i,chunkManifest:r,entrypoint:l}}async reload(){this.cachedManifest=null,await this.getBundle()}};var A=m.getLogger(["laroux-bundler","runtime-bundler"]),_=class{clientComponents=new Map;moduleMap=null;bundleCode=null;chunkManifest=null;lastScan=0;scanInterval=1e3;config;async getOrCreateBundle(){let e=Date.now();return(e-this.lastScan>this.scanInterval||!this.bundleCode)&&(await this.rebuild(),this.lastScan=e),{clientCode:this.bundleCode,moduleMap:this.moduleMap,clientComponents:this.clientComponents,chunkManifest:this.chunkManifest}}constructor(e){this.config=e}async rebuild(){let{plugin:e}=this.config,t=e.analyzeClientComponents?await e.analyzeClientComponents(this.config.srcDir,this.config.projectRoot):[];this.clientComponents.clear();for(let o of t)this.clientComponents.set(o.filePath,o);this.moduleMap=e.createModuleMap?await e.createModuleMap(t):{};let r=await this.bundleClientCode(t);this.bundleCode=r.code,this.chunkManifest=r.manifest}async bundleClientCode(e){let{plugin:t}=this.config,r=s.process.cwd(),o=await s.fs.makeTempDir({prefix:"rsc-runtime-",dir:r});try{if(!t.createClientEntry)throw new Error("Framework plugin does not provide createClientEntry");let i=await t.createClientEntry(e,r,o),l=K("deno-bundler",{entryName:"client"}),p={client:i};for(let g of e)p[g.relativePath]=g.filePath;let u={entrypoints:p,outputDir:o,format:"esm",platform:"browser",codeSplitting:j.codeSplitting,minify:j.minify,sourcemap:!1},a=await l.bundle(u);if(!a.success){let g=a.errors?.map(c=>c.message).join(", ")??"Unknown error";throw new Error(`Bundle failed: ${g}`)}let d=a.outputs.get("client.js");if(!d)throw new Error("Bundle output 'client.js' not found in bundle result");let f=new TextDecoder().decode(d.code),h={version:"1.0",buildId:"runtime",timestamp:Date.now(),logLevel:"debug",entrypoint:"__runtime_bundle.js",hmrEnabled:!0,chunks:{},files:{}};for(let g of e){let c=g.relativePath;h.chunks[c]={main:"__runtime_bundle",deps:[],size:0}}return{code:f,manifest:h}}catch(i){let l=i instanceof Error?i.message:String(i),p=i instanceof Error?i.stack:null;A.error("\u274C Runtime bundling failed:"),A.error(` Error: ${l}`),p!==null&&A.error(` Stack trace:
|
|
3
3
|
${p}`);let u=f=>f.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),a=`
|
|
4
4
|
console.error("Runtime bundling failed:", ${JSON.stringify(l)});
|
|
5
5
|
document.getElementById("root").innerHTML = '<div class="error"><h2>Bundle Error</h2><pre>${u(l)}</pre></div>';
|
|
6
|
-
`,d={version:"1.0",buildId:"runtime-error",timestamp:Date.now(),logLevel:"error",entrypoint:"__runtime_bundle.js",hmrEnabled:!1,chunks:{},files:{}};return{code:a,manifest:d}}finally{try{await s.fs.remove(o,{recursive:!0})}catch(i){A.debug("Temp directory cleanup failed",{error:i})}}}clear(){this.clientComponents.clear(),this.moduleMap=null,this.bundleCode=null,this.lastScan=0}};var D=class{cache;constructor(e){this.cache=new _(e)}async getBundle(){let e=await this.cache.getOrCreateBundle();return{clientCode:e.clientCode,moduleMap:e.moduleMap,chunkManifest:e.chunkManifest,entrypoint:"/__runtime_bundle.js"}}async getRuntimeBundle(){return await this.cache.getOrCreateBundle()}async rebuild(){await this.cache.rebuild()}clear(){this.cache.clear()}};var Z={name:"noop",renderPage:()=>Promise.resolve({html:""}),renderRSC:()=>Promise.resolve(new Response("")),generateBootstrapScript:()=>""};var ee={name:"noop",createShell:()=>"<!DOCTYPE html><html><head></head><body></body></html>",createStreamingStart:()=>"<!DOCTYPE html><html><head></head><body>",createStreamingEnd:()=>"</body></html>"};var b=m.getLogger(["laroux-server","hmr"]),$=class{clients=new Set;handleConnection(e){this.clients.add(e),b.debug(`HMR client connected (${this.clients.size} total)`),this.sendToClient(e,{type:"connected"}),e.addEventListener("close",()=>{this.clients.delete(e),b.debug(`HMR client disconnected (${this.clients.size} remaining)`)}),e.addEventListener("error",t=>{b.error("HMR WebSocket error:",{event:t}),this.clients.delete(e)})}notifyUpdate(e=Date.now(),t){let r={type:"update",timestamp:e,changedModules:t};b.debug(`Notifying ${this.clients.size} clients of update${t?` (${t.length} modules changed)`:""}`);for(let o of this.clients)this.sendToClient(o,r)}notifyError(e){let t={type:"error",message:e};b.warn(`Notifying clients of error: ${e}`);for(let r of this.clients)this.sendToClient(r,t)}sendToClient(e,t){if(e.readyState===WebSocket.OPEN)try{e.send(JSON.stringify(t))}catch(r){b.error("Failed to send HMR message:",{error:r})}}getClientCount(){return this.clients.size}close(){for(let e of this.clients)e.close();this.clients.clear()}};var L=m.getLogger(["laroux-server","api-handler"]);function ie(n){let e=new Set;return{pattern:n.replace(/\[\.\.\.(\w+)\]/g,(r,o)=>(e.add(o),`:${o}*`)).replace(/\[(\w+)\]/g,(r,o)=>`:${o}`),catchAllParams:e}}function se(n,e){let{pattern:t,catchAllParams:r}=ie(e),i=new URLPattern({pathname:t}).exec({pathname:n});if(!i)return null;let l={},p=i.pathname.groups;for(let[u,a]of Object.entries(p))r.has(u)?l[u]=a?a.split("/").filter(Boolean):[]:l[u]=a??"";return l}var H=class{routes=[];moduleCache=new Map;registryDir="";async loadRoutes(e){try{let t=`file://${e}/server/api-routes.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.routes=r.apiRoutes||[],L.debug(`Loaded ${this.routes.length} API route(s)`)}catch{this.routes=[],L.debug("No API routes registry found")}}async handleRequest(e,t){let r=new URL(e.url),o=e.method;for(let i of this.routes){let l=se(t,i.path);if(l!==null){L.debug(`API route matched: ${o} ${t} -> ${i.path}`);try{let p=s.path.resolve(this.registryDir,i.modulePath),u=this.moduleCache.get(p);u||(u=await import(`file://${p}`),this.moduleCache.set(p,u));let a=u[o];return a?await a({request:e,params:l,searchParams:r.searchParams}):(L.debug(`Method ${o} not allowed for ${i.path}`),new Response("Method Not Allowed",{status:405,headers:{Allow:this.getAllowedMethods(u).join(", ")}}))}catch(p){return L.error(`API route error: ${i.path}`,{error:p}),new Response(JSON.stringify({error:"Internal Server Error"}),{status:500,headers:{"Content-Type":"application/json"}})}}}return null}getAllowedMethods(e){let t=[];return e.GET&&t.push("GET"),e.POST&&t.push("POST"),e.PUT&&t.push("PUT"),e.DELETE&&t.push("DELETE"),e.PATCH&&t.push("PATCH"),e.HEAD&&t.push("HEAD"),e.OPTIONS&&t.push("OPTIONS"),t}clearCache(){this.moduleCache.clear()}};var P=m.getLogger(["laroux-server","proxy-handler"]),T=class{proxies=[];moduleCache=new Map;registryDir="";async loadProxies(e){try{let t=`file://${e}/server/proxy-registry.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.proxies=r.proxyRegistry||[],P.debug(`Loaded ${this.proxies.length} proxy definition(s)`)}catch{this.proxies=[],P.debug("No proxy registry found")}}async runProxies(e,t){let r=t;for(let o of this.proxies)if(this.matchesPrefix(r,o.pathPrefix)){P.debug(`Running proxy: ${o.pathPrefix} for ${r}`);try{let i=s.path.resolve(this.registryDir,o.modulePath),l=this.moduleCache.get(i);l||(l=await import(`file://${i}`),this.moduleCache.set(i,l));let p=l.default;if(typeof p!="function"){P.warn(`Proxy ${o.modulePath} does not export a default function`);continue}let u=await p({request:e,pathname:r,params:{}});if(u.type==="response")return P.debug(`Proxy ${o.pathPrefix} returned response`),{result:u,finalPathname:r};if(u.type==="redirect")return P.debug(`Proxy ${o.pathPrefix} redirecting to ${u.url}`),{result:u,finalPathname:r};u.type==="rewrite"&&(P.debug(`Proxy ${o.pathPrefix} rewriting to ${u.pathname}`),r=u.pathname)}catch(i){return P.error(`Proxy error: ${o.pathPrefix}`,{error:i}),{result:{type:"response",response:new Response(JSON.stringify({error:"Proxy Error"}),{status:500,headers:{"Content-Type":"application/json"}})},finalPathname:r}}}return{result:{type:"next"},finalPathname:r}}matchesPrefix(e,t){return t==="/"?!0:e===t||e.startsWith(t+"/")}clearCache(){this.moduleCache.clear()}};function te(n,e){let t=X(n,e.path);if(t===null)return null;let r={};for(let[o,i]of Object.entries(t))Array.isArray(i)?r[o]=[...i]:typeof i=="string"&&(r[o]=i);return r}function U(n,e){for(let t of e){let r=te(n,t);if(r!==null)return{route:t,params:r}}return null}var le=["trace","debug","info","warn","error","fatal"];var oe="manifest.json",ue=n=>({trace:v.Debug,debug:v.Debug,info:v.Info,warn:v.Warning,error:v.Error,fatal:v.Critical})[n],R,E;async function pe(n){let e=ue(n),{output:t,renderers:r,sinks:o}=await import("./mod-II7CSZUT.js"),i=t({renderer:r.ansi(),sink:o.stdout()});await G.configure({sinks:{console:V.getOutputSink(i)},loggers:[{category:["laroux-server"],lowestLevel:e,sinks:["console"]},{category:["laroux-bundler"],lowestLevel:e,sinks:["console"]},{category:["laroux"],lowestLevel:e,sinks:["console"]}]}),R=m.getLogger(["laroux-server","server"]),E=m.getLogger(["laroux-server","bundler"])}var O=null;function ot(){O=null}async function ce(n){if(O!==null)return O;let t=`file://${s.path.join(n.distDir,"server","_generated-routes.ts")}?t=${Date.now()}`,{generatedRoutes:r}=await import(t);return O=r,r}async function re(n,e){let t=s.path.resolve(n.distDir,"server","src","app",`${e}.js`);if(await s.fs.exists(t))return t;for(let r of Y){let o=s.path.resolve(n.distDir,"server","src","app",`${e}.${r}`);if(await s.fs.exists(o))return o}return t}async function ne(n,e){let t=Date.now(),o=`file://${await re(e,"layout")}?t=${t}`,{Layout:i}=await import(o),l=await ce(e),p=U(n,l);if(p===null){let a=`file://${await re(e,"not-found")}?t=${t}`,{NotFound:d}=await import(a);return{Layout:i,Page:d,params:{}}}return{Layout:i,Page:p.route.component,params:p.params}}async function de(n){try{let e=s.path.resolve(n.distDir,"client",oe),t=await s.fs.readTextFile(e);return JSON.parse(t).buildId}catch{return"unknown"}}async function me(n){try{let e=s.path.resolve(n.distDir,"client",oe),t=await s.fs.stat(e),r=await s.fs.stat(n.srcDir);return t.mtime===null||r.mtime===null?!1:t.mtime>r.mtime}catch{return!1}}function I(n){return{projectRoot:n.projectRoot,srcDir:n.srcDir,distDir:n.distDir,logLevel:n.logLevel,fonts:n.fonts,images:n.images,cssModuleTypes:n.cssModuleTypes,noCssModuleAutoReference:n.noCssModuleAutoReference,browserShims:n.browserShims,serverExternals:n.build.serverExternals}}async function ge(n,e={}){let{config:t,bundler:r,hmrManager:o}=n,{frameworkPlugin:i,cssPlugin:l}=e;try{let c=s.path.resolve(t.distDir,"server","actions-manifest.json");if(await s.fs.exists(c)){let x=await s.fs.readTextFile(c),z=JSON.parse(x),q=Date.now(),C=0;for(let J of z.actions)try{let k=s.path.resolve(t.distDir,"server",J);await s.fs.exists(k)&&(await import(`file://${k}?t=${q}`),C++)}catch(k){R.warn(`Failed to load action ${J}:`,{error:k})}C>0&&R.debug(`Server actions loaded: ${C} file(s)`)}else R.debug("No actions manifest found (optional)")}catch(c){R.warn("Failed to load server actions:",{error:c})}await ne("/",t);let p=await de(t);E.debug(`Build ID: ${p}`);let a={...n,getApp:c=>ne(c,t),buildId:p},d=await r.getBundle(),f={framework:i,css:l,bundlerBackend:"deno-bundler"};if(d.clientCode!==null&&o!==null){if(i!==void 0){let c=M(I(t),f);N(c,async y=>{if(r instanceof D)try{await r.rebuild()}catch(x){E.error("Compilation failed:",{error:x})}E.info(`\u2713 Compiled in ${y.duration.toFixed(0)}ms`),o?.notifyUpdate(Date.now(),y.changedFiles)})}}else if(t.mode.isWatch&&i!==void 0){let c=M(I(t),f);N(c,y=>{E.info(`\u2713 Compiled in ${y.duration.toFixed(0)}ms`)})}let h="";d.clientCode!==null&&o!==null?h=" HMR":d.clientCode!==null&&(h=" Watch"),R.info(`RSC Server${h}`),R.info(` Local: http://localhost:${t.server.port}`);let{startHTTPServer:g}=await import("./server-KJW4HWK7.js");return g(a),a}async function it(n){let e=n.projectRoot??s.process.cwd(),t=n.logLevel??"info",r=n.mode==="dev",{renderer:o,htmlShell:i,frameworkPlugin:l,cssPlugin:p}=n;await pe(t);let u=await Q(e),a={...u,srcDir:s.path.resolve(e,u.srcDir),distDir:s.path.resolve(e,u.distDir),publicDir:s.path.resolve(e,u.publicDir),logLevel:t,mode:{isDev:r,isBuild:!1,isServe:!r,isWatch:r}};n.port!==void 0&&(a.server.port=n.port),n.hmr!==void 0?a.server.hmr=n.hmr:r&&(a.server.hmr=!0),n.open!==void 0&&(a.server.open=n.open),r&&(a.build.minify=!1);let d=await me(a),f=r||!d,h={framework:l,css:p};if(f&&r&&l!==void 0){let C=M(I(a),{...h,bundlerBackend:"deno-bundler"});await F(C)}else if(f&&l!==void 0){let C=M(I(a),{...h,bundlerBackend:"rolldown"});await F(C)}let g,c=null;r&&a.server.hmr?(c=new $,g=new w({distDir:a.distDir})):g=new w({distDir:a.distDir});let y=new H;await y.loadRoutes(a.distDir);let x=new T;await x.loadProxies(a.distDir),await ge({config:a,bundler:g,hmrManager:c,apiHandler:y,middlewareDispatcher:x,renderer:o??Z,htmlShell:i??ee},{frameworkPlugin:l,cssPlugin:p}),n.open&&fe(`http://localhost:${a.server.port}`)}function fe(n){let e={darwin:["open"],linux:["xdg-open"],windows:["cmd","/c","start"]},t=W(),r=e[t];r&&r[0]&&s.exec.spawnChild(r[0],[...r.slice(1),n],{stdout:"null",stderr:"null"})}export{le as VALID_LOG_LEVELS,ot as clearRoutesCache,it as startServer};
|
|
6
|
+
`,d={version:"1.0",buildId:"runtime-error",timestamp:Date.now(),logLevel:"error",entrypoint:"__runtime_bundle.js",hmrEnabled:!1,chunks:{},files:{}};return{code:a,manifest:d}}finally{try{await s.fs.remove(o,{recursive:!0})}catch(i){A.debug("Temp directory cleanup failed",{error:i})}}}clear(){this.clientComponents.clear(),this.moduleMap=null,this.bundleCode=null,this.lastScan=0}};var D=class{cache;constructor(e){this.cache=new _(e)}async getBundle(){let e=await this.cache.getOrCreateBundle();return{clientCode:e.clientCode,moduleMap:e.moduleMap,chunkManifest:e.chunkManifest,entrypoint:"/__runtime_bundle.js"}}async getRuntimeBundle(){return await this.cache.getOrCreateBundle()}async rebuild(){await this.cache.rebuild()}clear(){this.cache.clear()}};var Z={name:"noop",renderPage:()=>Promise.resolve({html:""}),renderRSC:()=>Promise.resolve(new Response("")),generateBootstrapScript:()=>""};var ee={name:"noop",createShell:()=>"<!DOCTYPE html><html><head></head><body></body></html>",createStreamingStart:()=>"<!DOCTYPE html><html><head></head><body>",createStreamingEnd:()=>"</body></html>"};var b=m.getLogger(["laroux-server","hmr"]),$=class{clients=new Set;handleConnection(e){this.clients.add(e),b.debug(`HMR client connected (${this.clients.size} total)`),this.sendToClient(e,{type:"connected"}),e.addEventListener("close",()=>{this.clients.delete(e),b.debug(`HMR client disconnected (${this.clients.size} remaining)`)}),e.addEventListener("error",t=>{b.error("HMR WebSocket error:",{event:t}),this.clients.delete(e)})}notifyUpdate(e=Date.now(),t){let r={type:"update",timestamp:e,changedModules:t};b.debug(`Notifying ${this.clients.size} clients of update${t?` (${t.length} modules changed)`:""}`);for(let o of this.clients)this.sendToClient(o,r)}notifyError(e){let t={type:"error",message:e};b.warn(`Notifying clients of error: ${e}`);for(let r of this.clients)this.sendToClient(r,t)}sendToClient(e,t){if(e.readyState===WebSocket.OPEN)try{e.send(JSON.stringify(t))}catch(r){b.error("Failed to send HMR message:",{error:r})}}getClientCount(){return this.clients.size}close(){for(let e of this.clients)e.close();this.clients.clear()}};var L=m.getLogger(["laroux-server","api-handler"]);function ie(n){let e=new Set;return{pattern:n.replace(/\[\.\.\.(\w+)\]/g,(r,o)=>(e.add(o),`:${o}*`)).replace(/\[(\w+)\]/g,(r,o)=>`:${o}`),catchAllParams:e}}function se(n,e){let{pattern:t,catchAllParams:r}=ie(e),i=new URLPattern({pathname:t}).exec({pathname:n});if(!i)return null;let l={},p=i.pathname.groups;for(let[u,a]of Object.entries(p))r.has(u)?l[u]=a?a.split("/").filter(Boolean):[]:l[u]=a??"";return l}var H=class{routes=[];moduleCache=new Map;registryDir="";async loadRoutes(e){try{let t=`file://${e}/server/api-routes.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.routes=r.apiRoutes||[],L.debug(`Loaded ${this.routes.length} API route(s)`)}catch{this.routes=[],L.debug("No API routes registry found")}}async handleRequest(e,t){let r=new URL(e.url),o=e.method;for(let i of this.routes){let l=se(t,i.path);if(l!==null){L.debug(`API route matched: ${o} ${t} -> ${i.path}`);try{let p=s.path.resolve(this.registryDir,i.modulePath),u=this.moduleCache.get(p);u||(u=await import(`file://${p}`),this.moduleCache.set(p,u));let a=u[o];return a?await a({request:e,params:l,searchParams:r.searchParams}):(L.debug(`Method ${o} not allowed for ${i.path}`),new Response("Method Not Allowed",{status:405,headers:{Allow:this.getAllowedMethods(u).join(", ")}}))}catch(p){return L.error(`API route error: ${i.path}`,{error:p}),new Response(JSON.stringify({error:"Internal Server Error"}),{status:500,headers:{"Content-Type":"application/json"}})}}}return null}getAllowedMethods(e){let t=[];return e.GET&&t.push("GET"),e.POST&&t.push("POST"),e.PUT&&t.push("PUT"),e.DELETE&&t.push("DELETE"),e.PATCH&&t.push("PATCH"),e.HEAD&&t.push("HEAD"),e.OPTIONS&&t.push("OPTIONS"),t}clearCache(){this.moduleCache.clear()}};var P=m.getLogger(["laroux-server","proxy-handler"]),T=class{proxies=[];moduleCache=new Map;registryDir="";async loadProxies(e){try{let t=`file://${e}/server/proxy-registry.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.proxies=r.proxyRegistry||[],P.debug(`Loaded ${this.proxies.length} proxy definition(s)`)}catch{this.proxies=[],P.debug("No proxy registry found")}}async runProxies(e,t){let r=t;for(let o of this.proxies)if(this.matchesPrefix(r,o.pathPrefix)){P.debug(`Running proxy: ${o.pathPrefix} for ${r}`);try{let i=s.path.resolve(this.registryDir,o.modulePath),l=this.moduleCache.get(i);l||(l=await import(`file://${i}`),this.moduleCache.set(i,l));let p=l.default;if(typeof p!="function"){P.warn(`Proxy ${o.modulePath} does not export a default function`);continue}let u=await p({request:e,pathname:r,params:{}});if(u.type==="response")return P.debug(`Proxy ${o.pathPrefix} returned response`),{result:u,finalPathname:r};if(u.type==="redirect")return P.debug(`Proxy ${o.pathPrefix} redirecting to ${u.url}`),{result:u,finalPathname:r};u.type==="rewrite"&&(P.debug(`Proxy ${o.pathPrefix} rewriting to ${u.pathname}`),r=u.pathname)}catch(i){return P.error(`Proxy error: ${o.pathPrefix}`,{error:i}),{result:{type:"response",response:new Response(JSON.stringify({error:"Proxy Error"}),{status:500,headers:{"Content-Type":"application/json"}})},finalPathname:r}}}return{result:{type:"next"},finalPathname:r}}matchesPrefix(e,t){return t==="/"?!0:e===t||e.startsWith(t+"/")}clearCache(){this.moduleCache.clear()}};function te(n,e){let t=X(n,e.path);if(t===null)return null;let r={};for(let[o,i]of Object.entries(t))Array.isArray(i)?r[o]=[...i]:typeof i=="string"&&(r[o]=i);return r}function U(n,e){for(let t of e){let r=te(n,t);if(r!==null)return{route:t,params:r}}return null}var le=["trace","debug","info","warn","error","fatal"];var oe="manifest.json",ue=n=>({trace:v.Debug,debug:v.Debug,info:v.Info,warn:v.Warning,error:v.Error,fatal:v.Critical})[n],R,E;async function pe(n){let e=ue(n),{output:t,renderers:r,sinks:o}=await import("./mod-TRSW5SEU.js"),i=t({renderer:r.ansi(),sink:o.stdout()});await G.configure({sinks:{console:V.getOutputSink(i)},loggers:[{category:["laroux-server"],lowestLevel:e,sinks:["console"]},{category:["laroux-bundler"],lowestLevel:e,sinks:["console"]},{category:["laroux"],lowestLevel:e,sinks:["console"]}]}),R=m.getLogger(["laroux-server","server"]),E=m.getLogger(["laroux-server","bundler"])}var O=null;function ot(){O=null}async function ce(n){if(O!==null)return O;let t=`file://${s.path.join(n.distDir,"server","_generated-routes.ts")}?t=${Date.now()}`,{generatedRoutes:r}=await import(t);return O=r,r}async function re(n,e){let t=s.path.resolve(n.distDir,"server","src","app",`${e}.js`);if(await s.fs.exists(t))return t;for(let r of Y){let o=s.path.resolve(n.distDir,"server","src","app",`${e}.${r}`);if(await s.fs.exists(o))return o}return t}async function ne(n,e){let t=Date.now(),o=`file://${await re(e,"layout")}?t=${t}`,{Layout:i}=await import(o),l=await ce(e),p=U(n,l);if(p===null){let a=`file://${await re(e,"not-found")}?t=${t}`,{NotFound:d}=await import(a);return{Layout:i,Page:d,params:{}}}return{Layout:i,Page:p.route.component,params:p.params}}async function de(n){try{let e=s.path.resolve(n.distDir,"client",oe),t=await s.fs.readTextFile(e);return JSON.parse(t).buildId}catch{return"unknown"}}async function me(n){try{let e=s.path.resolve(n.distDir,"client",oe),t=await s.fs.stat(e),r=await s.fs.stat(n.srcDir);return t.mtime===null||r.mtime===null?!1:t.mtime>r.mtime}catch{return!1}}function I(n){return{projectRoot:n.projectRoot,srcDir:n.srcDir,distDir:n.distDir,logLevel:n.logLevel,fonts:n.fonts,images:n.images,cssModuleTypes:n.cssModuleTypes,noCssModuleAutoReference:n.noCssModuleAutoReference,browserShims:n.browserShims,serverExternals:n.build.serverExternals}}async function ge(n,e={}){let{config:t,bundler:r,hmrManager:o}=n,{frameworkPlugin:i,cssPlugin:l}=e;try{let c=s.path.resolve(t.distDir,"server","actions-manifest.json");if(await s.fs.exists(c)){let x=await s.fs.readTextFile(c),z=JSON.parse(x),q=Date.now(),C=0;for(let J of z.actions)try{let k=s.path.resolve(t.distDir,"server",J);await s.fs.exists(k)&&(await import(`file://${k}?t=${q}`),C++)}catch(k){R.warn(`Failed to load action ${J}:`,{error:k})}C>0&&R.debug(`Server actions loaded: ${C} file(s)`)}else R.debug("No actions manifest found (optional)")}catch(c){R.warn("Failed to load server actions:",{error:c})}await ne("/",t);let p=await de(t);E.debug(`Build ID: ${p}`);let a={...n,getApp:c=>ne(c,t),buildId:p},d=await r.getBundle(),f={framework:i,css:l,bundlerBackend:"deno-bundler"};if(d.clientCode!==null&&o!==null){if(i!==void 0){let c=M(I(t),f);N(c,async y=>{if(r instanceof D)try{await r.rebuild()}catch(x){E.error("Compilation failed:",{error:x})}E.info(`\u2713 Compiled in ${y.duration.toFixed(0)}ms`),o?.notifyUpdate(Date.now(),y.changedFiles)})}}else if(t.mode.isWatch&&i!==void 0){let c=M(I(t),f);N(c,y=>{E.info(`\u2713 Compiled in ${y.duration.toFixed(0)}ms`)})}let h="";d.clientCode!==null&&o!==null?h=" HMR":d.clientCode!==null&&(h=" Watch"),R.info(`RSC Server${h}`),R.info(` Local: http://localhost:${t.server.port}`);let{startHTTPServer:g}=await import("./server-VCPSLFZ2.js");return g(a),a}async function it(n){let e=n.projectRoot??s.process.cwd(),t=n.logLevel??"info",r=n.mode==="dev",{renderer:o,htmlShell:i,frameworkPlugin:l,cssPlugin:p}=n;await pe(t);let u=await Q(e),a={...u,srcDir:s.path.resolve(e,u.srcDir),distDir:s.path.resolve(e,u.distDir),publicDir:s.path.resolve(e,u.publicDir),logLevel:t,mode:{isDev:r,isBuild:!1,isServe:!r,isWatch:r}};n.port!==void 0&&(a.server.port=n.port),n.hmr!==void 0?a.server.hmr=n.hmr:r&&(a.server.hmr=!0),n.open!==void 0&&(a.server.open=n.open),r&&(a.build.minify=!1);let d=await me(a),f=r||!d,h={framework:l,css:p};if(f&&r&&l!==void 0){let C=M(I(a),{...h,bundlerBackend:"deno-bundler"});await F(C)}else if(f&&l!==void 0){let C=M(I(a),{...h,bundlerBackend:"rolldown"});await F(C)}let g,c=null;r&&a.server.hmr?(c=new $,g=new w({distDir:a.distDir})):g=new w({distDir:a.distDir});let y=new H;await y.loadRoutes(a.distDir);let x=new T;await x.loadProxies(a.distDir),await ge({config:a,bundler:g,hmrManager:c,apiHandler:y,middlewareDispatcher:x,renderer:o??Z,htmlShell:i??ee},{frameworkPlugin:l,cssPlugin:p}),n.open&&fe(`http://localhost:${a.server.port}`)}function fe(n){let e={darwin:["open"],linux:["xdg-open"],windows:["cmd","/c","start"]},t=W(),r=e[t];r&&r[0]&&s.exec.spawnChild(r[0],[...r.slice(1),n],{stdout:"null",stderr:"null"})}export{le as VALID_LOG_LEVELS,ot as clearRoutesCache,it as startServer};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{e as oe,j as ce,r as j,u as le,w as ue,y as K,z as de}from"./chunk-TMMAF763.js";import{b as X}from"./chunk-UEMWZOIU.js";import"./chunk-2XNFZXHY.js";import{c as W,d as ie,e as re,r as y,s as l,t as x,u as ae,v as M,w as q}from"./chunk-YACXTCWF.js";import"./chunk-SHN5MT56.js";import"./chunk-YVN2NZL4.js";import{d as se,e as N,f as ne}from"./chunk-GVTM4EOU.js";import{a as _,b as te}from"./chunk-FFWPJP7A.js";import{i as I}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var pe=()=>({tabs:[],selectedTabIndex:-1,focus:"list",running:!0});var we=e=>e===null?"\u2014":{DISCOVERY:"DISC",DISCOVERY_REVIEW:"REVW",SPEC_DRAFT:"DRFT",SPEC_APPROVED:"APPR",EXECUTING:"EXEC",BLOCKED:"BLKD",COMPLETED:"DONE",IDLE:"IDLE",FREE:"FREE"}[e]??e.slice(0,4),Se=e=>{switch(e){case"EXECUTING":return"green";case"DISCOVERY":case"DISCOVERY_REVIEW":return"cyan";case"BLOCKED":return"red";case"SPEC_DRAFT":case"SPEC_APPROVED":return"yellow";case"COMPLETED":return"dim";default:return"dim"}},P=(e,n)=>{let a=new Set(n.filter(o=>o.spec!==null).map(o=>o.spec)),i=e.map(o=>({label:o.name,badge:we(o.phase),badgeColor:Se(o.phase),active:a.has(o.name),dimmed:o.phase==="COMPLETED"}));return i.length===0&&i.push({label:"No specs yet",dimmed:!0,selectable:!1}),i.push({label:"\u2500".repeat(20),dimmed:!0,selectable:!1}),i.push({label:"[n] New spec",badge:"+",badgeColor:"green"}),i.push({label:"[f] Free mode",badge:"~",badgeColor:"cyan"}),i},Y=(e,n,a,i)=>{let o=P(e,n),t=x.drawBox({x:i.x,y:i.y,width:i.width,height:i.height,title:"Specs",borderStyle:"rounded"}),L=M.renderList(o,a,i);return t+L};var xe=["IDLE","DISCOVERY","REVIEW","DRAFT","APPROVED","EXECUTING","DONE"],Ee=e=>{if(e===null||e==="FREE")return"FREE (no enforcement)";let a={DISCOVERY_REVIEW:"REVIEW",SPEC_DRAFT:"DRAFT",SPEC_APPROVED:"APPROVED",COMPLETED:"DONE"}[e]??e;return xe.map(i=>i===a?l.bold(`\u2726${i}\u2726`):l.dim(i)).join("\u2192")},Ie=(e,n,a)=>{if(n===0)return l.dim("no tasks");let i=Math.round(e/n*a),o=a-i;return l.green("\u2588".repeat(i))+l.dim("\u2591".repeat(o))+` ${e}/${n}`},z=(e,n,a)=>{let i=[];return e===null?(i.push(l.dim("No spec selected")),i.push(""),i.push(l.dim("Select a spec from the list or press [n] for new"))):e.mode==="free"?(i.push(l.bold("Mode: ")+l.cyan("FREE")),i.push(l.dim("No enforcement active")),i.push(""),i.push(l.dim(`Session: ${e.sessionId}`))):(i.push(l.bold("Spec: ")+(e.spec??"unknown")),i.push(l.bold("Phase: ")+(e.phase??"unknown")),i.push(""),i.push(Ee(e.phase)),i.push(""),a!==void 0&&i.push(l.bold("Progress: ")+Ie(a.completed,a.total,15)),i.push(""),i.push(l.dim(`Session: ${e.sessionId}`))),x.fillBox({x:n.x,y:n.y,width:n.width,height:n.height,title:"Monitor",borderStyle:"rounded"},i)};var U=(e,n)=>{let a=e!==null?e.mode==="free"?"Terminal (FREE)":`Terminal (${e.spec??"?"})`:"Terminal",i=e!==null&&e.widget!==null,o=x.drawBox({x:n.x,y:n.y,width:n.width,height:n.height,title:a,borderStyle:"rounded",skipInterior:i});if(e===null||e.widget===null&&e.buffer.length===0){let A=l.dim("Waiting for output..."),k=" ".repeat(n.width-2),u="";for(let E=1;E<n.height-1;E++)u+=l.moveTo(n.y+E,n.x+1),u+=E===1?l.truncate(A,n.width-2)+" ".repeat(Math.max(0,n.width-2-l.visibleLength(A))):k;return o+u}if(e.widget!==null)return o+e.widget.render(n);let t=n.height-2,L=e.buffer.slice(-t);return x.fillBox({x:n.x,y:n.y,width:n.width,height:n.height,title:a,borderStyle:"rounded"},L)};var G=(e,n)=>({...e,tabs:[...e.tabs,n],selectedTabIndex:e.tabs.length}),me=(e,n)=>{let a=e.tabs.findIndex(t=>t.id===n);if(a===-1)return e;let i=e.tabs[a];i.process!==null&&i.process.kill();let o=e.tabs.filter(t=>t.id!==n);return{...e,tabs:o,selectedTabIndex:Math.min(e.selectedTabIndex,o.length-1)}},ge=(e,n)=>n<0||n>=e.tabs.length?e:{...e,selectedTabIndex:n},H=(e,n)=>{let a=n.split(`
|
|
3
|
+
`);for(let i of a)e.buffer.push(i);e.buffer.length>1e3&&e.buffer.splice(0,e.buffer.length-1e3)},R=e=>e.selectedTabIndex<0||e.selectedTabIndex>=e.tabs.length?null:e.tabs[e.selectedTabIndex]??null;var fe=(e,n,a)=>{if(a&&n==="c")return{type:"quit"};if(n==="tab")return{type:"toggleFocus"};if(e.focus==="list")switch(n){case"up":return{type:"navigate",direction:"up"};case"down":return{type:"navigate",direction:"down"};case"return":return{type:"select"};case"n":return{type:"newSpec"};case"f":return{type:"freeMode"};case"x":return{type:"closeTab"};case"q":return{type:"quit"};default:return{type:"none"}}return{type:"passthrough",data:n}},be=e=>({...e,focus:e.focus==="list"?"terminal":"list"}),J=(e,n,a)=>{let i=M.nextSelectableIndex(a,e.selectedTabIndex,n);return{...e,selectedTabIndex:i}};var Be=async e=>{let n=e?.includes("--dry-run")??!1,a=I.process.cwd();if(!await de(a))return console.error("noskills is not initialized. Run:",X(),"init"),te({exitCode:1});let o=(await ce(a)).map(s=>({name:s.name,phase:s.state.phase,hasActiveSession:!1})),t=pe(),{cols:L,rows:A}=y.getTerminalSize(),k={leftWidth:.25,rightTopHeight:.35},u=ae.calculateLayout(L,A,k),E=new TextEncoder,g=s=>{I.process.writeToStdout(E.encode(s))};if(n){g(y.clearScreenSeq());let s=` noskills manager | ${o.length} spec(s) | ${X()} | Ctrl+C to quit`;g(l.moveTo(u.statusBar.y,u.statusBar.x)),g(l.inverse(l.truncate(s,u.statusBar.width))),g(Y(o,t.tabs,t.selectedTabIndex,u.left));let r=R(t);return g(z(r,u.rightTop)),g(U(r,u.rightBottom)),g(l.moveTo(A,1)),g(`
|
|
4
|
+
`),_(void 0)}let C=new ne,F=null,Q=async()=>{for(let s of["claude","claude-code"])try{if(await se`which ${s}`.noThrow().code()===0)return s}catch{}return"claude"},w=P(o,t.tabs);t.selectedTabIndex=M.nextSelectableIndex(w,-1,"down");let O=async()=>{let s=K();await j(a,{id:s,spec:null,mode:"free",phase:null,pid:0,startedAt:new Date().toISOString(),lastActiveAt:new Date().toISOString(),tool:"claude-code"});let r=u.rightBottom.width-2,d=u.rightBottom.height-2,c=new q(d,r),m={id:`tab-${s}`,spec:null,mode:"free",sessionId:s,process:null,buffer:[],widget:c,active:!0,phase:null};try{let f=await Q(),b=await N({command:f,cwd:a,env:{...I.env.toObject(),NOSKILLS_SESSION:s},cols:r,rows:d});m.process=b,C.add(m.id,b),b.onData(T=>{c.write(T),H(m,T),F?.()})}catch(f){let b=f instanceof Error?f.message:String(f);c.write(`[noskills manager] Failed to spawn claude: ${b}\r
|
|
5
|
+
`),c.write(`Is Claude Code installed? Set command in manifest.yml\r
|
|
6
|
+
`)}Object.assign(t,G(t,m)),t.focus="terminal",w=P(o,t.tabs)},Z=async s=>{let r=t.tabs.find(h=>h.spec===s);if(r!==void 0){let h=t.tabs.indexOf(r);Object.assign(t,ge(t,h)),t.focus="terminal";return}let d=null;try{d=(await oe(a,s)).phase}catch{}let c=K();await j(a,{id:c,spec:s,mode:"spec",phase:d,pid:0,startedAt:new Date().toISOString(),lastActiveAt:new Date().toISOString(),tool:"claude-code"});let m=u.rightBottom.width-2,f=u.rightBottom.height-2,b=new q(f,m),T={id:`tab-${c}`,spec:s,mode:"spec",sessionId:c,process:null,buffer:[],widget:b,active:!0,phase:d};try{let h=await Q(),D=await N({command:h,cwd:a,env:{...I.env.toObject(),NOSKILLS_SESSION:c},cols:m,rows:f});T.process=D,C.add(T.id,D),D.onData(ee=>{b.write(ee),H(T,ee),F?.()})}catch(h){let D=h instanceof Error?h.message:String(h);b.write(`[noskills manager] Failed to spawn claude for spec "${s}": ${D}\r
|
|
7
|
+
`)}Object.assign(t,G(t,T)),t.focus="terminal",w=P(o,t.tabs)};g(y.enterAlternateScreen()),g(y.hideCursorSeq()),g(y.clearScreenSeq()),g(W.enableMouse());let p=new Set(["specs","monitor","terminal","status"]),v=()=>{let s=R(t),r=[];if(r.push(y.hideCursorSeq()),p.has("status")||p.size===0){let d=t.focus==="list"?"LIST":"TERM",c=` noskills manager | ${o.length} spec(s) | ${t.tabs.length} tab(s) | [${d}] Tab: toggle | q: quit | n: new | f: free`;r.push(l.moveTo(u.statusBar.y,u.statusBar.x)),r.push(l.inverse(l.truncate(c,u.statusBar.width)+" ".repeat(Math.max(0,u.statusBar.width-l.visibleLength(c)))))}p.has("specs")&&r.push(Y(o,t.tabs,t.selectedTabIndex,u.left)),p.has("monitor")&&r.push(z(s,u.rightTop)),p.has("terminal")&&r.push(U(s,u.rightBottom)),r.push(y.showCursorSeq()),p.clear(),g(r.join(""))},S=()=>{p.add("specs"),p.add("monitor"),p.add("terminal"),p.add("status")},$=!1;F=()=>{p.add("terminal"),!$&&($=!0,setTimeout(()=>{$=!1,t.running&&v()},16))},S(),v();let V=(s,r,d)=>s>=d.x&&s<d.x+d.width&&r>=d.y&&r<d.y+d.height,he=async s=>{if(V(s.x+1,s.y+1,u.left)){if(s.type==="mousedown"&&s.button===0){t.focus="list";let r=s.y+1-u.left.y-1;if(r>=0&&r<w.length){let d=w[r];if(d.selectable!==!1){if(t.selectedTabIndex=r,d.label.includes("[n]")||d.label.includes("[f]")){await O(),S();return}let c=o.find(m=>m.name===d.label)?.name;if(c!==void 0){await Z(c),S();return}}}p.add("specs"),p.add("monitor"),p.add("status")}else if(s.type==="wheel"){let r=s.direction==="up"?"up":"down";Object.assign(t,J(t,r,w)),p.add("specs"),p.add("monitor")}return}if(V(s.x+1,s.y+1,u.rightBottom)){t.focus="terminal",p.add("status");let r=R(t);if(r?.process!==null&&r!==null){let d=s.x+1-u.rightBottom.x,c=s.y+1-u.rightBottom.y,m=s.button;s.type==="mousemove"&&(m|=32),s.type==="wheel"&&(m=64|(s.direction==="down"?1:0)),s.shift&&(m|=4),s.ctrl&&(m|=16);let f=s.type==="mouseup"?"m":"M";r.process?.write(`\x1B[<${m};${d};${c}${f}`)}if(s.type==="wheel"&&r?.process!==null&&r!==null){let d=s.direction==="up"?"\x1B[A":"\x1B[B";r.process?.write(d.repeat(3))}return}V(s.x+1,s.y+1,u.rightTop)&&(t.focus="list",p.add("status"))};try{await ie(async()=>{for await(let s of re(I.process.stdin)){if(!t.running)break;if(s.kind==="mouse"){await he(s.event),p.size>0&&v();continue}let r=s.event,d=fe(t,r.name,r.ctrl);switch(d.type){case"quit":t.running=!1;break;case"toggleFocus":Object.assign(t,be(t)),p.add("status");break;case"navigate":Object.assign(t,J(t,d.direction,w)),p.add("specs"),p.add("monitor"),p.add("terminal");break;case"freeMode":await O(),S();break;case"newSpec":await O(),S();break;case"select":{let c=w[t.selectedTabIndex];if(c===void 0)break;let m=c.label;if(m.includes("[n]")||m.includes("[f]"))await O();else{let f=o.find(b=>b.name===m)?.name;f!==void 0&&await Z(f)}S();break}case"closeTab":{let c=R(t);c!==null&&(c.process!==null&&C.remove(c.id),await le(a,c.sessionId),Object.assign(t,me(t,c.id)),w=P(o,t.tabs),t.focus="list"),S();break}case"passthrough":{let c=R(t);c?.process!==null&&c!==null&&c.process?.write(new TextDecoder().decode(r.raw));break}case"none":break}if(!t.running)break;p.size>0&&v()}})}finally{await C.killAll(),C.forceKillAll(),await ue(a),g(W.disableMouse()),g(y.showCursorSeq()),g(y.exitAlternateScreen())}return _(void 0)};export{Be as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c}from"./chunk-4X4NHXFE.js";import"./chunk-2XNFZXHY.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{a as MANIFEST_FILENAMES,c as getManifestPath,b as loadManifest};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as Le}from"./chunk-
|
|
3
|
-
`);for(let c=0;c<t.length;c++){let p=t[c];for(let{pattern:u,replacement:f}of tt){let g=u.exec(p);g!==null&&(ot(p,g.index)||it(p,g.index)||e.push({path:a.path,line:c+1,message:`direct Deno API usage: ${g[0]} \u2014 use @eser/standards/cross-runtime (${f})`}))}}return e}}),St=w.run,Ye=w.validator,$t=w.main;var x={validators:new Map,initialized:!1},nt=()=>{n(J),n(W),n(z),n(Y),n(B),n(le),n(ce),n(me),n(fe),n(ve),n(he),n(be),n(Ve),n(we),n($e),n(Te),n(Fe),n(je),n(Ee),n(Ne),n(Je),n(Ye)},U=()=>{x.initialized||(x.initialized=!0,nt())},n=a=>{x.validators.set(a.name,a)},lt=a=>(U(),x.validators.get(a)??null),E=()=>(U(),[...x.validators.values()]),dt=()=>(U(),[...x.validators.keys()]),ct=a=>({name:a.config.name,description:a.config.description,run:async s=>{let e=await a.run(s);return{name:e.name,passed:e.issues.length===0,issues:e.issues.map(t=>({path:t.path,line:t.line,message:t.message,fixed:t.fixed})),mutations:e.mutations.map(t=>({path:t.path,oldContent:t.oldContent,newContent:t.newContent})),stats:{filesChecked:e.filesChecked,issuesFound:e.issues.length}}}}),pt=a=>({name:a.name,description:a.description,run:async s=>{let e=await a.validate({root:s.root??".",options:s});return{name:e.name,passed:e.passed,issues:e.issues.map(t=>({path:t.file,line:t.line,message:t.message})),mutations:[],stats:e.stats}}}),mt=()=>{let a=[],s=[ne,de,pe,ue,ge,ye,ke,xe,Ce,Se,Re,De,Pe,Ie,Me,_e,w];for(let t of s)a.push(ct(t));let e=[J,W,z,Y,B];for(let t of e)a.push(pt(t));return a.push({name:"validate-commit-msg",description:"Validate conventional commit format",run:async t=>{let c=t.commitMsgFile??t._args?.[0]??".git/COMMIT_EDITMSG",{runtime:p}=await import("./mod-
|
|
2
|
+
import{a as Le}from"./chunk-WI2RW3YL.js";import{a as qe}from"./chunk-H6P3EACV.js";import{a as _e,c as Je}from"./chunk-2YTW3JQ6.js";import{a as We}from"./chunk-TFRONHJA.js";import{a as ze}from"./chunk-YKEVDAWS.js";import{a as Se,c as $e}from"./chunk-R3UCRXDC.js";import{a as Re,c as Te}from"./chunk-JO4JKJ7R.js";import{a as De,c as Fe}from"./chunk-4LQG2WOJ.js";import{a as Pe,c as je}from"./chunk-7KFSTOXR.js";import{a as Ie,c as Ee}from"./chunk-J5HFD7AQ.js";import{a as Me,c as Ne}from"./chunk-ULIMXXRY.js";import{a as Oe}from"./chunk-73IMECRI.js";import{a as Ae}from"./chunk-OLHBVIWG.js";import"./chunk-IIFFSCDJ.js";import{a as de,c as ce}from"./chunk-UGYRUVUH.js";import{a as pe,c as me}from"./chunk-DLBRD3UT.js";import{a as ue,c as fe}from"./chunk-MW3RJU6I.js";import{a as ge,c as ve}from"./chunk-JFKHBLJB.js";import{a as ye,c as he}from"./chunk-R4GKIRAI.js";import{a as ke,c as be}from"./chunk-RHVDIXOM.js";import{a as xe,c as Ve}from"./chunk-XUV7CW3L.js";import{a as Ce,c as we}from"./chunk-LYPDFFKK.js";import"./chunk-3D5TBTM3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import{a as ne,c as le}from"./chunk-C7NZBKCW.js";import{a as re}from"./chunk-ATYDQCCJ.js";import"./chunk-KHBIOZJE.js";import{b as H,c as Q}from"./chunk-4X4NHXFE.js";import"./chunk-2XNFZXHY.js";import"./chunk-LFNUSULJ.js";import{a as ie}from"./chunk-O325ZU5M.js";import{a as q,b as Z,f as ee,h as te,j as ae,k as _,o as m,p as se,q as oe}from"./chunk-YACXTCWF.js";import"./chunk-VV47GXU5.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import{b as X}from"./chunk-NBA6EFWU.js";import"./chunk-P2MUEKFT.js";import"./chunk-SHN5MT56.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import{a as K}from"./chunk-MG65QJY6.js";import{a as P,b as L}from"./chunk-FFWPJP7A.js";import{i as j}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var I=async a=>{let s=await H(a);return s===null?null:s},Ke=async a=>await Q(a);var J={name:"validate-circular-deps",description:"Detect circular package dependencies",requiredStacks:[],async validate(a){let s=await Le({root:a.root});return{name:"validate-circular-deps",passed:!s.hasCycles,issues:s.cycles.map(e=>({severity:"error",message:`Circular dependency: ${e.join(" \u2192 ")}`})),stats:{packagesChecked:s.packagesChecked}}}};var W={name:"validate-mod-exports",description:"Validate mod.ts exports all files",requiredStacks:["javascript"],async validate(a){let s=await We({root:a.root});return{name:"validate-mod-exports",passed:s.isComplete,issues:s.missingExports.map(e=>({severity:"error",message:`Missing export in ${e.packageName}: ${e.file}`,file:e.file})),stats:{packagesChecked:s.packagesChecked}}}};var z={name:"validate-export-names",description:"Validate export naming conventions",requiredStacks:["javascript"],async validate(a){let s=await qe({root:a.root});return{name:"validate-export-names",passed:s.isValid,issues:s.violations.map(e=>({severity:"error",message:`${e.packageName}: "${e.exportPath}" should be "${e.suggestion}"`})),stats:{packagesChecked:s.packagesChecked}}}};var Y={name:"validate-docs",description:"Validate JSDoc documentation",requiredStacks:["javascript"],async validate(a){let s=a.options?.requireExamples,e=await Ae({root:a.root,requireExamples:s});return{name:"validate-docs",passed:e.isValid,issues:e.issues.map(t=>({severity:"error",message:`${t.symbol}: ${t.issue}`,file:t.file,line:t.line})),stats:{filesChecked:e.filesChecked,symbolsChecked:e.symbolsChecked}}}};var B={name:"validate-package-configs",description:"Validate deno.json/package.json consistency",requiredStacks:["javascript"],async validate(a){let s=await ze({root:a.root}),e=[];for(let t of s.inconsistencies)e.push({severity:"error",message:`${t.packageName}: ${t.field} mismatch - deno.json: ${JSON.stringify(t.denoValue)}, package.json: ${JSON.stringify(t.packageValue)}`});for(let t of s.dependencyInconsistencies){let c=`${t.packageName}: ${t.dependencyName} - ${t.issue}`;t.expected!==void 0&&t.actual!==void 0&&(c+=` (expected: ${t.expected}, actual: ${t.actual})`),e.push({severity:"error",message:c})}return{name:"validate-package-configs",passed:s.isConsistent,issues:e,stats:{packagesChecked:s.packagesChecked}}}};var tt=[{pattern:/\bDeno\.cwd\(\)/,replacement:"runtime.process.cwd()"},{pattern:/\bDeno\.env\.get\b/,replacement:"runtime.env.get()"},{pattern:/\bDeno\.env\.set\b/,replacement:"runtime.env.set()"},{pattern:/\bDeno\.env\.delete\b/,replacement:"runtime.env.delete()"},{pattern:/\bDeno\.env\.has\b/,replacement:"runtime.env.has()"},{pattern:/\bDeno\.env\.toObject\b/,replacement:"runtime.env.toObject()"},{pattern:/\bDeno\.readTextFile\b/,replacement:"runtime.fs.readTextFile()"},{pattern:/\bDeno\.readFile\b/,replacement:"runtime.fs.readFile()"},{pattern:/\bDeno\.writeTextFile\b/,replacement:"runtime.fs.writeTextFile()"},{pattern:/\bDeno\.writeFile\b/,replacement:"runtime.fs.writeFile()"},{pattern:/\bDeno\.mkdir\b/,replacement:"runtime.fs.mkdir()"},{pattern:/\bDeno\.remove\b/,replacement:"runtime.fs.remove()"},{pattern:/\bDeno\.stat\b/,replacement:"runtime.fs.stat()"},{pattern:/\bDeno\.lstat\b/,replacement:"runtime.fs.lstat()"},{pattern:/\bDeno\.readDir\b/,replacement:"runtime.fs.readDir()"},{pattern:/\bDeno\.copyFile\b/,replacement:"runtime.fs.copyFile()"},{pattern:/\bDeno\.rename\b/,replacement:"runtime.fs.rename()"},{pattern:/\bDeno\.open\b/,replacement:"runtime.fs (or @eser/streams)"},{pattern:/\bDeno\.exit\b/,replacement:"runtime.process.exit()"},{pattern:/\bnew Deno\.Command\b/,replacement:"runtime.exec.spawn() (or @eser/shell/exec)"},{pattern:/\bDeno\.args\b/,replacement:"runtime.process.args"}],at=[],st=a=>at.some(s=>s.test(a)),ot=(a,s)=>{let e=a.slice(0,s);return e.includes("//")||e.includes("/*")&&!e.includes("*/")},it=(a,s)=>{let e=!1,t=!1,c=!1;for(let p=0;p<s;p++){let u=a[p];(p>0?a[p-1]:"")!=="\\"&&(u==="'"&&!t&&!c&&(e=!e),u==='"'&&!e&&!c&&(t=!t),u==="`"&&!e&&!t&&(c=!c))}return e||t||c},w=re({name:"validate-runtime-js-apis",description:"Detect direct usage of runtime-specific APIs (use @eser/standards/cross-runtime instead)",canFix:!1,stacks:["javascript"],defaults:{},extensions:X,checkFile(a,s){if(s===void 0)return[];if(st(a.path))return[];let e=[],t=s.split(`
|
|
3
|
+
`);for(let c=0;c<t.length;c++){let p=t[c];for(let{pattern:u,replacement:f}of tt){let g=u.exec(p);g!==null&&(ot(p,g.index)||it(p,g.index)||e.push({path:a.path,line:c+1,message:`direct Deno API usage: ${g[0]} \u2014 use @eser/standards/cross-runtime (${f})`}))}}return e}}),St=w.run,Ye=w.validator,$t=w.main;var x={validators:new Map,initialized:!1},nt=()=>{n(J),n(W),n(z),n(Y),n(B),n(le),n(ce),n(me),n(fe),n(ve),n(he),n(be),n(Ve),n(we),n($e),n(Te),n(Fe),n(je),n(Ee),n(Ne),n(Je),n(Ye)},U=()=>{x.initialized||(x.initialized=!0,nt())},n=a=>{x.validators.set(a.name,a)},lt=a=>(U(),x.validators.get(a)??null),E=()=>(U(),[...x.validators.values()]),dt=()=>(U(),[...x.validators.keys()]),ct=a=>({name:a.config.name,description:a.config.description,run:async s=>{let e=await a.run(s);return{name:e.name,passed:e.issues.length===0,issues:e.issues.map(t=>({path:t.path,line:t.line,message:t.message,fixed:t.fixed})),mutations:e.mutations.map(t=>({path:t.path,oldContent:t.oldContent,newContent:t.newContent})),stats:{filesChecked:e.filesChecked,issuesFound:e.issues.length}}}}),pt=a=>({name:a.name,description:a.description,run:async s=>{let e=await a.validate({root:s.root??".",options:s});return{name:e.name,passed:e.passed,issues:e.issues.map(t=>({path:t.file,line:t.line,message:t.message})),mutations:[],stats:e.stats}}}),mt=()=>{let a=[],s=[ne,de,pe,ue,ge,ye,ke,xe,Ce,Se,Re,De,Pe,Ie,Me,_e,w];for(let t of s)a.push(ct(t));let e=[J,W,z,Y,B];for(let t of e)a.push(pt(t));return a.push({name:"validate-commit-msg",description:"Validate conventional commit format",run:async t=>{let c=t.commitMsgFile??t._args?.[0]??".git/COMMIT_EDITMSG",{runtime:p}=await import("./mod-4XKQZL6W.js"),u;try{u=await p.fs.readTextFile(c)}catch{return{name:"validate-commit-msg",passed:!1,issues:[{message:`cannot read commit message file: ${c}`}],mutations:[],stats:{}}}let f=Oe(u,{allowAsterisk:t.allowAsterisk,allowMultipleScopes:t.allowMultipleScopes,forceScope:t.forceScope,types:t.types});return{name:"validate-commit-msg",passed:f.valid,issues:f.issues.map(g=>({message:g})),mutations:[],stats:{}}}}),a};var ut=8,Zt=async(a={})=>{let s=a.root??j.process.cwd(),t=(await I(s))?.stack??[],c=[...a.skip??[]],p=a.only??[],u=E(),f=[],g=[],S=[];for(let i of u){if(p.length>0&&!p.includes(i.name))continue;if(c.includes(i.name)){S.push(i.name);continue}if(i.requiredStacks.length>0&&t.length>0&&!i.requiredStacks.some(G=>t.includes(G))){g.push({name:i.name,reason:`Requires '${i.requiredStacks.join("' or '")}' stack`});continue}let $={...a.fix!==void 0?{fix:a.fix}:{}},h=await i.validate({root:s,options:$});f.push(h)}return{passed:f.every(i=>i.passed),results:f,skipped:g,disabled:S}},ea=async a=>{let s=K(a??j.process.args,{string:["root","only","skip"],boolean:["fix","help","json","yes"],alias:{h:"help",y:"yes"}});if(s.help)return console.log("Usage: deno run --allow-all ./validation/mod.ts [options]"),console.log(),console.log("Options:"),console.log(" --root <dir> Root directory (default: cwd)"),console.log(" --only <validators> Run only specific validators (comma-separated)"),console.log(" --skip <validators> Skip specific validators (comma-separated)"),console.log(" --fix Auto-fix issues where supported"),console.log(" -y, --yes Auto-confirm all fix prompts (no interactive prompts)"),console.log(" --json Output results as JSON (suppresses TUI output)"),console.log(" -h, --help Show this help message"),P(void 0);let e=s.json,t=s.yes,c=s.root,p=s.fix,u=s.only,f=s.skip,g=u!==void 0?u.split(",").map(o=>o.trim()):[],S=f!==void 0?f.split(",").map(o=>o.trim()):[],{ctx:i}=e?{ctx:Z({interaction:"non-interactive"})}:ie(),$=i.interaction==="interactive",h=c??j.process.cwd();e||ae(i,"Validating codebase...");let M=e?void 0:se(i,"Loading config...");M?.start();let R=(await I(h))?.stack??[],Be=R.length>0?R.join(", "):"all (no .eser/manifest.yml)";M?.succeed("Config loaded"),e||m.info(i,`Stack: ${Be}`);let Ue=E(),k=[],T=[],D=[];for(let o of Ue)if(!(g.length>0&&!g.includes(o.name))){if(S.includes(o.name)){D.push(o.name);continue}if(o.requiredStacks.length>0&&R.length>0&&!o.requiredStacks.some(d=>R.includes(d))){T.push({name:o.name,reason:`Requires '${o.requiredStacks.join("' or '")}' stack`});continue}k.push(o)}let V=[],N=e?void 0:oe(i,{total:k.length,label:"Validating..."});N?.start();let O=o=>{if(V.push(o),!e){let l=Object.entries(o.stats).map(([r,y])=>`${y} ${r}`).join(", "),d=`${o.name.padEnd(18)} (${l})`;o.passed?m.success(i,`PASS ${d}`):m.error(i,`FAIL ${d}`)}N?.advance(1)};if(p)for(let o of k){let l=await o.validate({root:h,options:{}}),d=l;if(!l.passed){let r=!0;if($&&!t&&!e){let y=l.issues.length,v=await ee(i,{message:`Fix ${y} issue(s) found by ${o.name}?`,initialValue:!0});(q(v)||!v)&&(r=!1)}r&&(d=await o.validate({root:h,options:{fix:!0}}))}O(d)}else{let o=0,l=async()=>{for(;o<k.length;){let y=o++,v=k[y];if(v===void 0)break;try{let b=await v.validate({root:h,options:{}});O(b)}catch(b){let Ge={name:v.name,passed:!1,issues:[{severity:"error",message:String(b)}],stats:{filesChecked:0,issuesFound:1,fixedCount:0}};O(Ge)}}},d=Math.min(ut,k.length),r=Array.from({length:d},()=>l());await Promise.allSettled(r)}if(N?.stop("Validation complete"),!e&&T.length>0){m.step(i,"Skipped (stack not configured):");for(let o of T)m.step(i,` - ${o.name}: ${o.reason}`)}if(!e&&D.length>0){m.step(i,"Disabled:");for(let o of D)m.step(i,` - ${o}`)}let C=V.flatMap(o=>o.issues.map(l=>({validator:o.name,...l})));if(!e&&C.length>0){m.warn(i,`Issues (${C.length}):`);let o=new Map;for(let l of C){let d=l.file??l.validator,r=o.get(d)??[];r.push(l),o.set(d,r)}for(let[l,d]of o){m.step(i,` ${l}`);for(let r of d){let y=r.severity==="error"?"error":"warning",v=r.line!==void 0?`:${r.line}`:"";r.severity==="error"?m.error(i,` ${y}${v}: ${r.message}`):m.warn(i,` ${y}${v}: ${r.message}`)}}}let F=V.filter(o=>!o.passed);if(!e&&$&&F.length>0)for(;;){let o=[...F.map(r=>({value:r.name,label:`${r.name} (${r.issues.length} issue(s))`})),{value:"__done__",label:"Done"}],l=await te(i,{message:"View details for which validator?",options:o});if(q(l)||l==="__done__")break;let d=F.find(r=>r.name===l);if(d!==void 0){m.info(i,`Details for ${d.name} (${d.issues.length} issue(s)):`);for(let r of d.issues){let y=r.severity==="error"?"error":"warning",v=r.file??d.name,b=r.line!==void 0?`:${r.line}`:"";r.severity==="error"?m.error(i,` ${v}${b} [${y}]: ${r.message}`):m.warn(i,` ${v}${b} [${y}]: ${r.message}`)}}}if(e){let o=V.every(d=>d.passed),l=JSON.stringify({passed:o,results:V,skipped:T,disabled:D},null,2);return console.log(l),o?P(void 0):L({message:"",exitCode:1})}let A=F.length;return A>0?(_(i,`${A} check(s) failed with ${C.length} issue(s)`),L({message:`${A} check(s) failed with ${C.length} issue(s)`,exitCode:1})):(_(i,"All checks passed!"),P(void 0))};export{Ke as getProjectConfigPath,lt as getValidator,dt as getValidatorNames,E as getValidators,mt as getWorkflowTools,I as loadProjectConfig,ea as main,n as registerValidator,Zt as validate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as r,b as s,c as t,d as u,e as v,f as w,g as x,h as A,i as B}from"./chunk-
|
|
2
|
+
import{a as r,b as s,c as t,d as u,e as v,f as w,g as x,h as A,i as B}from"./chunk-6DBKPC2O.js";import{b as y,c as z}from"./chunk-ALFFE37K.js";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{c as AlreadyExistsError,b as NotFoundError,d as ProcessError,a as RuntimeCapabilityError,t as buildCommand,z as clearWorkerdEnv,A as createRuntime,x as detectExecutionContext,s as detectInvoker,g as detectRuntime,n as getArch,w as getCliPrefix,o as getHomedir,m as getPlatform,q as getPlatformInfo,h as getRuntimeVersion,p as getTmpdir,j as isBrowser,u as isCommandInPath,l as isEdge,i as isRuntime,k as isServer,v as matchCliPrefix,y as populateEnvFromContext,f as posixPath,r as resolvePathDirs,B as runtime,e as toPosix};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as re}from"./chunk-2XNFZXHY.js";import{d as _}from"./chunk-NBA6EFWU.js";import{f as G,h as U,k as H}from"./chunk-
|
|
2
|
+
import{a as re}from"./chunk-2XNFZXHY.js";import{d as _}from"./chunk-NBA6EFWU.js";import{f as G,h as U,k as H}from"./chunk-SHN5MT56.js";import{b as w,d as S,f as C,g as q,k as z}from"./chunk-YVN2NZL4.js";import{d as N}from"./chunk-GVTM4EOU.js";import{a as O}from"./chunk-MG65QJY6.js";import{a as E,b as $,d as V,f as D}from"./chunk-FFWPJP7A.js";import{i as l}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import{b as v}from"./chunk-6G6UVWJN.js";import{e as te}from"./chunk-5WJ6AUNY.js";var x=class extends TransformStream{constructor(t){let e;super({transform(s,a){if(e!==void 0){let n=new Uint8Array(e.length+s.length);n.set(e),n.set(s,e.length),s=n}for(let n=t;n<=s.length;n+=t)a.enqueue(s.slice(n-t,n));let f=-s.length%t;e=f?s.slice(f):void 0},flush(s){e?.length&&s.enqueue(e)}})}};var P=class{#s;#n;#t;#e=[];#r=!1;constructor(){let{readable:t,writable:e}=new TransformStream;this.#s=ReadableStream.from(this.#i()),this.#n=e,this.#t=t.pipeThrough(new x(512)).getReader()}async#a(){let{done:t,value:e}=await this.#t.read();if(!t){if(e.length!==512)throw new RangeError(`Cannot extract the tar archive: The tarball chunk has an unexpected number of bytes (${e.length})`);return this.#e.push(e),this.#e.shift()}}async*#i(){for(let e=0;e<2;++e){let{done:s,value:a}=await this.#t.read();if(s||a.length!==512)throw new RangeError("Cannot extract the tar archive: The tarball is too small to be valid");this.#e.push(a)}let t=new TextDecoder;for(;;){for(;this.#r;)await new Promise(n=>setTimeout(n,0));if(this.#e.every(n=>n.every(o=>o===0))){await this.#t.cancel("Tar stream finished prematurely");return}let e=await this.#a();if(e==null){if(this.#e.every(n=>n.every(o=>o===0)))break;throw new TypeError("Cannot extract the tar archive: The tarball has invalid ending")}let s=parseInt(t.decode(e.subarray(148,156)),8);if(e.fill(32,148,156),e.reduce((n,o)=>n+o)!==s)throw new SyntaxError("Cannot extract the tar archive: An archive entry has invalid header checksum");let a={name:t.decode(e.subarray(0,100)).split("\0")[0],mode:parseInt(t.decode(e.subarray(100,108)),8),uid:parseInt(t.decode(e.subarray(108,116)),8),gid:parseInt(t.decode(e.subarray(116,124)),8),size:parseInt(t.decode(e.subarray(124,136)).trimEnd(),8),mtime:parseInt(t.decode(e.subarray(136,147)),8),typeflag:t.decode(e.subarray(156,157)),linkname:t.decode(e.subarray(157,257)).split("\0")[0]};a.typeflag==="\0"&&(a.typeflag="0"),[117,115,116,97,114,0,48,48].every((n,o)=>e[o+257]===n)&&(a={...a,magic:t.decode(e.subarray(257,263)),version:t.decode(e.subarray(263,265)),uname:t.decode(e.subarray(265,297)).split("\0")[0],gname:t.decode(e.subarray(297,329)).split("\0")[0],devmajor:t.decode(e.subarray(329,337)).replaceAll("\0",""),devminor:t.decode(e.subarray(337,345)).replaceAll("\0",""),prefix:t.decode(e.subarray(345,500)).split("\0")[0]});let f={path:("prefix"in a&&a.prefix.length?a.prefix+"/":"")+a.name,header:a};["1","2","3","4","5","6"].includes(a.typeflag)||(f.readable=this.#l(a.size)),yield f}}async*#o(t){for(let e=Math.ceil(t/512);e>0;--e){let s=await this.#a();if(s==null)throw new SyntaxError("Cannot extract the tar archive: Unexpected end of Tarball");e===1&&t%512?yield s.subarray(0,t%512):yield s}}#l(t){this.#r=!0;let e=()=>this.#r=!1,s=this.#o(t);return new ReadableStream({type:"bytes",async pull(a){let{done:f,value:n}=await s.next();if(f)return e(),a.close(),a.byobRequest?.respond(0);if(a.byobRequest?.view){let o=new Uint8Array(a.byobRequest.view.buffer),i=o.length;i<n.length?(o.set(n.slice(0,i)),a.byobRequest.respond(i),a.enqueue(n.slice(i))):(o.set(n),a.byobRequest.respond(n.length))}else a.enqueue(n)},async cancel(){for await(let a of s);e()}})}get readable(){return this.#s}get writable(){return this.#n}};var L=async(r,t,e={})=>{let{stripComponents:s=0,subpath:a}=e,f=a!==void 0?l.path.normalize(a).replace(/^\/+/,""):void 0,o=r.pipeThrough(new DecompressionStream("gzip")).pipeThrough(new P);for await(let i of o){let c=l.path.normalize(i.path);if(c.startsWith("..")||l.path.isAbsolute(c)){i.readable!==void 0&&await i.readable.cancel();continue}let u=c.split(l.path.sep).slice(s);if(u.length===0){i.readable!==void 0&&await i.readable.cancel();continue}let d=u.join(l.path.sep);if(f!==void 0){if(!d.startsWith(f)){i.readable!==void 0&&await i.readable.cancel();continue}if(d.slice(f.length).replace(/^\/+/,"")===""){i.readable!==void 0&&await i.readable.cancel();continue}}let h=f!==void 0?l.path.join(t,d.slice(f.length).replace(/^\/+/,"")):l.path.join(t,d);if(await l.fs.ensureDir(l.path.dirname(h)),i.readable!==void 0){let b=new Response(i.readable),m=new Uint8Array(await b.arrayBuffer());await l.fs.writeFile(h,m)}}};var ne="main",ae=r=>{let[t,e]=r.split("#");if(t===void 0)throw new Error(`Invalid GitHub specifier: ${r}`);let s=t.split("/");if(s.length<2)throw new Error(`Invalid GitHub specifier: ${r}. Expected format: owner/repo[/path][#ref]`);let[a,f,...n]=s;if(a===void 0||f===void 0)throw new Error(`Invalid GitHub specifier: ${r}. Expected format: owner/repo[/path][#ref]`);return{provider:"github",raw:r,owner:a,repo:f,ref:e??ne,path:n.length>0?n.join("/"):void 0}},ie=async(r,t)=>{let e=r,{owner:s,repo:a,ref:f,path:n}=e,o=`https://codeload.github.com/${s}/${a}/tar.gz/${f}`,i=await fetch(o);if(!i.ok)throw i.status===404?new Error(`Repository not found: ${s}/${a} (ref: ${f})`):new Error(`Failed to fetch template: ${i.status} ${i.statusText}`);if(i.body===null)throw new Error("Response body is empty");await L(i.body,t,{stripComponents:1,subpath:n})},B={name:"github",prefixes:["github","gh"],isDefault:!0,parse:ae,fetch:ie};var g={providers:new Map,defaultProvider:null,initialized:!1},A=()=>{g.initialized||(g.initialized=!0,M(B))},M=r=>{g.providers.set(r.name,r);for(let t of r.prefixes)g.providers.set(t,r);r.isDefault===!0&&(g.defaultProvider=r)},oe=r=>(A(),g.providers.get(r)??null),le=()=>(A(),g.defaultProvider),W=r=>{A();let t=r.indexOf(":");if(t!==-1){let e=r.slice(0,t),s=r.slice(t+1),a=g.providers.get(e);if(a===void 0)throw new Error(`Unknown provider prefix: ${e}`);return{provider:a,ref:a.parse(s)}}if(g.defaultProvider===null)throw new Error("No default provider registered");return{provider:g.defaultProvider,ref:g.defaultProvider.parse(r)}},I=async(r,t)=>{let{provider:e,ref:s}=W(r);return await e.fetch(s,t),s};var Y=te(re(),1);var J=[".eser/manifest.yml",".eser/manifest.yaml",".manifest.yml",".manifest.yaml"],j=async r=>{for(let t of J){let e=l.path.join(r,t);try{let s=await l.fs.readTextFile(e),a=Y.parse(s);if(typeof a.name!="string"||a.name==="")throw new Error(`Template config missing required 'name' field: ${e}`);return a}catch(s){if(s instanceof v)continue;throw s}}return null},fe=r=>{let t=r.description??r.name,e=r.default!==void 0?` [${r.default}]`:"",s=r.required===!0?" (required)":"",a=`${t}${s}${e}: `,f=globalThis.prompt(a);return f===null||f===""?r.default??null:f},X=(r,t)=>r.pattern===void 0||new RegExp(r.pattern).test(t)?null:`Value '${t}' does not match pattern '${r.pattern}'`,F=(r,t)=>{let{provided:e,interactive:s}=t,a=r.variables??[],f={...e},n=[];for(let o of a){let{name:i,required:c,default:p}=o;if(f[i]!==void 0){let u=X(o,f[i]);u!==null&&n.push(`${i}: ${u}`);continue}if(s){let u=fe(o);if(u!==null){let d=X(o,u);d!==null?n.push(`${i}: ${d}`):f[i]=u;continue}}if(p!==void 0){f[i]=p;continue}c===!0&&n.push(`Missing required variable: ${i}`)}if(n.length>0)throw new Error(`Variable resolution failed:
|
|
3
3
|
${n.join(`
|
|
4
|
-
`)}`);return f},K=async r=>{for(let t of J){let e=l.path.join(r,t);try{return await l.fs.stat(e),e}catch{continue}}return null};var Q=/\{\{\s*\.(\w+)\s*\}\}/g,ce=["png","jpg","jpeg","gif","ico","webp","svg","woff","woff2","ttf","eot","otf","zip","tar","gz","bz2","xz","7z","pdf","doc","docx","xls","xlsx","ppt","pptx","exe","dll","so","dylib","mp3","mp4","avi","mov","webm"],pe=r=>_(r.toLowerCase(),ce),de=(r,t)=>{for(let e of t)if(e.startsWith("*")){let s=e.slice(1);if(r.endsWith(s))return!0}else if(e.includes("*")){let s=e.replace(/[.+?^${}()|[\]
|
|
4
|
+
`)}`);return f},K=async r=>{for(let t of J){let e=l.path.join(r,t);try{return await l.fs.stat(e),e}catch{continue}}return null};var Q=/\{\{\s*\.(\w+)\s*\}\}/g,ce=["png","jpg","jpeg","gif","ico","webp","svg","woff","woff2","ttf","eot","otf","zip","tar","gz","bz2","xz","7z","pdf","doc","docx","xls","xlsx","ppt","pptx","exe","dll","so","dylib","mp3","mp4","avi","mov","webm"],pe=r=>_(r.toLowerCase(),ce),de=(r,t)=>{for(let e of t)if(e.startsWith("*")){let s=e.slice(1);if(r.endsWith(s))return!0}else if(e.includes("*")){let s=e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"\0GLOBSTAR\0").replace(/\*/g,"[^/]*").replace(/\0GLOBSTAR\0/g,".*");if(new RegExp(`^${s}$`).test(r))return!0}else if(r===e||r.startsWith(e+"/"))return!0;return!1},T=(r,t)=>r.replace(Q,(e,s)=>{let a=t[s];return a===void 0?`{{.${s}}}`:a}),R=r=>Q.test(r),Z=async(r,t)=>{let{variables:e,ignore:s}=t,a=[],f=[];for await(let n of l.fs.walk(r,{includeDirs:!0})){let o=l.path.relative(r,n.path);o!==""&&(de(o,s)||(n.isDirectory?R(n.name)&&f.push(n.path):n.isFile&&a.push(n.path)))}for(let n of a){let o=l.path.basename(n),i=l.path.dirname(n);if(!pe(n))try{let c=await l.fs.readTextFile(n);if(R(c)){let p=T(c,e);await l.fs.writeTextFile(n,p)}}catch(c){if(!(c instanceof Error&&c.name==="InvalidData"))throw c}if(R(o)){let c=T(o,e),p=l.path.join(i,c);p!==n&&await l.fs.rename(n,p)}}f.sort((n,o)=>o.split(l.path.sep).length-n.split(l.path.sep).length);for(let n of f){let o=l.path.basename(n),i=l.path.dirname(n),c=T(o,e),p=l.path.join(i,c);p!==n&&await l.fs.rename(n,p)}},ee=async r=>{try{await l.fs.remove(r)}catch(t){if(!(t instanceof v))throw t}};var k=async r=>{let{specifier:t,targetDir:e,variables:s={},force:a=!1,skipPostInstall:f=!1,interactive:n=!1}=r,o=l.path.isAbsolute(e)?e:l.path.join(l.process.cwd(),e);try{let m=[];for await(let y of l.fs.readDir(o)){m.push(y);break}if(m.length>0&&!a)throw new Error(`Target directory is not empty: ${o}. Use --force to overwrite.`)}catch(m){if(!(m instanceof v))throw m}await l.fs.ensureDir(o),await I(t,o);let i=await j(o),c=i?.name??t,p=i!==null?F(i,{provided:s,interactive:n}):s,u=[".git",".eser/manifest.yml",".eser/manifest.yaml",...i?.ignore??[]];await Z(o,{variables:p,ignore:u});let d=await K(o);d!==null&&await ee(d);let h=i?.postInstall??[],b=[];if(!f&&h.length>0)for(let m of h)try{(await N`${m}`.cwd(o).stdout("inherit").stderr("inherit").noThrow().spawn()).success?b.push(m):console.warn(`Post-install command failed: ${m}`)}catch(y){console.warn(`Post-install command error: ${m}`,y)}return{templateName:c,targetDir:o,variables:p,postInstallCommands:b}};var Ge=async r=>{let t=O(r??l.process.args,{string:["path","var"],boolean:["force","interactive","skip-post-install","help"],alias:{p:"path",f:"force",i:"interactive",h:"help"},collect:["var"]});if(t.help)return console.log(`Usage: scaffold <specifier> [options]
|
|
5
5
|
|
|
6
6
|
Options:
|
|
7
7
|
-p, --path <dir> Target directory (default: .)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-GVTM4EOU.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{b as CommandBuilder,a as CommandError,f as ProcessGroup,d as exec,c as parseCommand,e as spawnPty};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import"./chunk-5WJ6AUNY.js";var A=await import("node:fs"),r=t=>{try{return A.statSync(t),!0}catch{return!1}},_=t=>{let s=globalThis;if(typeof s.process<"u"&&typeof s.process.env=="object")return s.process.env[t]??void 0},W=t=>{if(t!==void 0)return t;let s=globalThis;return typeof s.__dirname=="string"?s.__dirname:typeof s.process<"u"&&typeof s.process.cwd=="function"?s.process.cwd():"."},y={command:"eser-ajan.wasm",reactor:"eser-ajan-reactor.wasm"},h=(t="command",s)=>{let e=y[t]??y.command,a=t==="reactor"?"wasi-reactor":"wasi",o=[],c=_("ESER_AJAN_WASM_PATH");if(c!==void 0){if(r(c))return c;o.push(`$ESER_AJAN_WASM_PATH = ${c}`)}let i=W(s),d=`${i}/${e}`;if(o.push(d),r(d))return d;let g=`${i}/..`,m=`${g}/dist/${a}/${e}`;if(o.push(m),r(m))return m;let f=`${i}/dist/${a}/${e}`;if(o.push(f),r(f))return f;let u=globalThis,p=typeof u.process<"u"&&typeof u.process.cwd=="function"?u.process.cwd():".";if(p!==i){let n=`${p}/pkg/@eser/ajan/dist/${a}/${e}`;if(o.push(n),r(n))return n}let $=[i,g,p];for(let n of $){let l=`${n}/node_modules/@eserstack/ajan-wasm/${e}`;if(o.push(l),r(l))return l}let P=[`/usr/local/lib/${e}`,`/usr/lib/${e}`];for(let n of P)if(o.push(n),r(n))return n;throw new Error(`Could not find eser-ajan WASM module (${e}).
|
|
3
|
+
Checked the following locations:
|
|
4
|
+
`+o.map(n=>` - ${n}`).join(`
|
|
5
|
+
`)+`
|
|
6
|
+
|
|
7
|
+
To fix this:
|
|
8
|
+
1. Install: npm install @eser/ajan
|
|
9
|
+
2. Or set ESER_AJAN_WASM_PATH to the full path of ${e}`)};var w=import.meta.dirname,b=(t="command")=>{try{return h(t,w),!0}catch{return!1}},S=async t=>{let s=t?.mode??"command",e=t?.wasmPath??h(s,w);if(s==="reactor"){let{loadReactorWasm:o}=await import("./loader-reactor-P6I3MX5L.js");return o(e)}let{loadCommandWasm:a}=await import("./loader-command-I5DTYP25.js");return a(e)};export{b as isWasmAvailable,S as loadEserAjanWasm};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as K,b as V}from"./chunk-UQ2BC7UA.js";import{a as G,b as v}from"./chunk-PPSDIDOI.js";import{a as P,b as g}from"./chunk-SBAXURB7.js";import{a as S,b as J}from"./chunk-HLKFDKLZ.js";import{a as h,b as O,c as k,d as R,e as B,f as E}from"./chunk-TDQRRGDJ.js";import"./chunk-BNQAZLIQ.js";import{a as f,b as u}from"./chunk-
|
|
2
|
+
import{a as K,b as V}from"./chunk-UQ2BC7UA.js";import{a as G,b as v}from"./chunk-PPSDIDOI.js";import{a as P,b as g}from"./chunk-SBAXURB7.js";import{a as S,b as J}from"./chunk-HLKFDKLZ.js";import{a as h,b as O,c as k,d as R,e as B,f as E}from"./chunk-TDQRRGDJ.js";import"./chunk-BNQAZLIQ.js";import{a as f,b as u}from"./chunk-EQUPVWVY.js";import{a as A,b as C}from"./chunk-FNPBHLLZ.js";import{a as M,b as w}from"./chunk-LJ7A5HYR.js";import{a as I,b as T}from"./chunk-C2IORZTF.js";import{a as l,b as m,c as s,d,e as y,f as F,g as x}from"./chunk-2TANTKYS.js";import"./chunk-J7YTWK67.js";import"./chunk-GVTM4EOU.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var o=null,b=async()=>{if(o!==null)return o;let{anthropicFactory:e}=await import("./anthropic-QBGNUIP3.js"),{openaiFactory:r}=await import("./openai-2KONKHWL.js"),{geminiFactory:t}=await import("./gemini-43AWJEWI.js"),{vertexaiFactory:a}=await import("./vertexai-2F2A3VTE.js"),{claudeCodeFactory:i}=await import("./claude-code-UJYCO6CN.js"),{ollamaFactory:c}=await import("./ollama-DFG5G467.js"),{openCodeFactory:n}=await import("./opencode-UA45VV3W.js"),{kiroFactory:p}=await import("./kiro-V6SMU4OL.js");return o=[e,r,t,a,i,c,n,p],o};export{G as AnthropicModel,f as ClaudeCodeModel,S as GeminiModel,I as KiroModel,A as OllamaModel,P as OpenAIModel,M as OpenCodeModel,K as VertexAIModel,v as anthropicFactory,y as captureStderr,F as classifyExitCode,E as classifyGenAIError,u as claudeCodeFactory,b as defaultFactories,x as formatMessagesAsText,J as geminiFactory,T as kiroFactory,O as mapContentBlockToGenAIPart,B as mapGenAIResponseToResult,k as mapMessagesToGenAI,h as mapRoleToGenAI,R as mapToolsToGenAI,C as ollamaFactory,w as openCodeFactory,g as openaiFactory,s as parseJsonlStream,d as parseTextOutput,l as resolveBinary,m as spawnCliProcess,V as vertexaiFactory};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as T,h as J}from"./chunk-
|
|
2
|
+
import{c as T,h as J}from"./chunk-LWQPFCWC.js";import{a as S}from"./chunk-3OG2MEF2.js";import{b as B,c as W}from"./chunk-NBA6EFWU.js";import{e as h}from"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{i}from"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";var P=h.getLogger(["laroux-bundler","rsc-analyze"]);function Z(t){return{filePath:t.filePath,relativePath:t.relativePath,exportNames:[...t.exports]}}async function E(t,e,n){if(P.debug(`\u{1F50D} Analyzing client components in: ${t}`),!n){let p=(await T(t,{projectRoot:e})).map(Z);return P.debug(`\u{1F4CA} Total client components found: ${p.length}`),p}let r=[],o=0,a=0,l=await T(t,{projectRoot:e});for(let s of l){let p=0;try{p=(await i.fs.stat(s.filePath)).mtime?.getTime()??0}catch{continue}let c=n.getClientComponent(s.filePath,p);if(c){o++,c.isClient&&r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:c.exportNames});continue}a++;let x=[...s.exports];n.setClientComponent(s.filePath,!0,x,p),r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:x}),P.debug(` \u2713 Found client component: ${s.relativePath} (exports: ${x.join(", ")})`)}return(o>0||a>0)&&P.debug(`\u{1F4CA} Component analysis: ${o} cache hits, ${a} analyzed`),P.debug(`\u{1F4CA} Total client components found: ${r.length}`),r}async function _(t){let e=[],n=/(?:node_modules|\.test\.|\.spec\.)/;for await(let r of S(t,"**/*.{tsx,ts,jsx,js}",n))e.push(i.path.join(t,r));return e}var v=h.getLogger(["laroux-bundler","rsc-transform"]);async function H(t,e){let n=i.path.dirname(t.relativePath),r=i.path.join(e,n);await i.fs.ensureDir(r);let o=tt(t),a=t.relativePath.split("/").pop(),l=i.path.join(r,a);return await i.fs.writeTextFile(l,o),{originalPath:t.filePath,transformedPath:l}}function tt(t){let e=t.exportNames.map(n=>n==="default"?`export default createClientReference(
|
|
3
3
|
"./${t.relativePath}",
|
|
4
4
|
"default"
|
|
5
5
|
);`:`export const ${n} = createClientReference(
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,q as o,r as p,s as q,t as r}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,q as o,r as p,s as q,t as r}from"./chunk-FZ5WFU6R.js";import"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{j as chunkToInlineScript,l as createInlineRSCStream,k as createInlineTransformStream,q as createReactHtmlShellBuilder,o as createReactRenderer,m as generateInlineBootstrapScript,n as generateInlineCompletionScript,c as generateRSCPayloadScript,e as loadModuleMap,r as reactHtmlShellBuilder,p as reactRenderer,i as renderApp,f as renderRSC,h as renderRSCResponse,a as renderSSR,d as renderToReadableStream,b as serializeRSCPayload,g as streamToResponse};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e,f,g}from"./chunk-TZDEJTLC.js";import"./chunk-L5OC7F24.js";import"./chunk-J2Z7NG2X.js";import"./chunk-SHN5MT56.js";import"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import"./chunk-DM6U63HP.js";import"./chunk-FFWPJP7A.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{d as completionsHandler,f as doctorHandler,g as infoHandler,a as installHandler,b as uninstallHandler,c as updateHandler,e as versionHandler};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import"./chunk-5WJ6AUNY.js";var C={EserAjanVersion:{parameters:[],result:"pointer"},EserAjanInit:{parameters:[],result:"i32"},EserAjanShutdown:{parameters:[],result:"void"},EserAjanFree:{parameters:["pointer"],result:"void"},EserAjanConfigLoad:{parameters:["pointer"],result:"pointer"},EserAjanDIResolve:{parameters:["pointer"],result:"pointer"}},S=n=>{let r=new TextEncoder().encode(n),t=new ArrayBuffer(r.length+1),o=new Uint8Array(t);return o.set(r),o},w=n=>n===null?{value:"",ptr:n}:{value:new Deno.UnsafePointerView(n).getCString(),ptr:n},V=n=>{let e=r=>{r!==null&&n.EserAjanFree(r)};return{EserAjanVersion:()=>{let{value:r,ptr:t}=w(n.EserAjanVersion());return e(t),r},EserAjanInit:()=>n.EserAjanInit(),EserAjanShutdown:()=>{n.EserAjanShutdown()},EserAjanFree:r=>{n.EserAjanFree(r)},EserAjanConfigLoad:r=>{let t=S(r),o=n.EserAjanConfigLoad(Deno.UnsafePointer.of(t)),{value:s,ptr:i}=w(o);return e(i),s},EserAjanDIResolve:r=>{let t=S(r),o=n.EserAjanDIResolve(Deno.UnsafePointer.of(t)),{value:s,ptr:i}=w(o);return e(i),s}}},_={name:"deno",available:()=>typeof Deno<"u"&&typeof Deno.dlopen=="function",open:n=>{let e=Deno.dlopen(n,C);return{symbols:V(e.symbols),close:()=>{e.close()}}}};var b=null;try{b=await import("bun:ffi")}catch{}var x={name:"bun",available:()=>b!==null,open:n=>{if(b===null)throw new Error("bun:ffi is not available \u2014 are you running under Bun?");let{dlopen:e,CString:r,ptr:t}=b,o=e(n,{EserAjanVersion:{args:[],returns:"ptr"},EserAjanInit:{args:[],returns:"i32"},EserAjanShutdown:{args:[],returns:"void"},EserAjanFree:{args:["ptr"],returns:"void"},EserAjanConfigLoad:{args:["ptr"],returns:"ptr"},EserAjanDIResolve:{args:["ptr"],returns:"ptr"}}),{symbols:s}=o,i=d=>{let g=new TextEncoder().encode(d+"\0");return t(g)},a=d=>{if(d===null||d===0)return"";let p=new r(d);return s.EserAjanFree(d),p.toString()};return{symbols:{EserAjanVersion:()=>a(s.EserAjanVersion()),EserAjanInit:()=>s.EserAjanInit(),EserAjanShutdown:()=>{s.EserAjanShutdown()},EserAjanFree:d=>{s.EserAjanFree(d)},EserAjanConfigLoad:d=>a(s.EserAjanConfigLoad(i(d))),EserAjanDIResolve:d=>a(s.EserAjanDIResolve(i(d)))},close:()=>{o.close()}}}};var u=null;try{let n=globalThis;typeof n.process<"u"&&typeof n.process.versions?.node=="string"&&typeof n.Deno>"u"&&typeof n.Bun>"u"&&(u=await import("koffi"),u.default!==void 0&&(u=u.default))}catch{}var $={name:"node",available:()=>u!==null&&typeof u.load=="function",open:n=>{if(u===null)throw new Error("koffi is not available. Install it: npm install koffi");let e=u.load(n),r=e.func("char* EserAjanVersion()"),t=e.func("int EserAjanInit()"),o=e.func("void EserAjanShutdown()"),s=e.func("char* EserAjanConfigLoad(const char* path)"),i=e.func("char* EserAjanDIResolve(const char* name)");return{symbols:{EserAjanVersion:()=>r()??"",EserAjanInit:()=>t(),EserAjanShutdown:()=>{o()},EserAjanFree:a=>{},EserAjanConfigLoad:a=>s(a)??"",EserAjanDIResolve:a=>i(a)??""},close:()=>{e.unload()}}}};var O=await import("node:fs"),j=()=>{let n=globalThis;if(typeof n.Deno<"u"){let e=n.Deno.build.os;return e==="darwin"?".dylib":e==="windows"?".dll":".so"}if(typeof n.process<"u"&&typeof n.process.platform=="string"){let e=n.process.platform;return e==="darwin"?".dylib":e==="win32"?".dll":".so"}return".so"},U=()=>{let n=globalThis,e="linux",r="x64";if(typeof n.Deno<"u"){let t=n.Deno.build.os;e=t==="windows"?"win32":t,r=n.Deno.build.arch==="aarch64"?"arm64":"x64"}else typeof n.process<"u"&&(e=n.process.platform,r=n.process.arch==="arm64"?"arm64":"x64");return`${e}-${r}`},l=n=>{try{return O.statSync(n),!0}catch{return!1}},H=n=>{if(n!==void 0)return n;let e=globalThis;return typeof e.__dirname=="string"?e.__dirname:typeof e.process<"u"&&typeof e.process.cwd=="function"?e.process.cwd():"."},I=n=>{let r=`libeser_ajan${j()}`,t=[],o=K("ESER_AJAN_LIB_PATH");if(o!==void 0){if(l(o))return o;t.push(`$ESER_AJAN_LIB_PATH = ${o}`)}let s=H(n),i=`${s}/${r}`;if(t.push(i),l(i))return i;let a=U(),d={x64:"x86_64",arm64:"aarch64"},p={win32:"windows"},g=a.split("-"),k=g[0]??"linux",D=g[1]??"x64",N=d[D]??D,P=p[k]??k,y=`${N}-${P}`,L=`${s}/..`,A=`${L}/dist/${y}/${r}`;if(t.push(A),l(A))return A;let E=`${s}/dist/${y}/${r}`;if(t.push(E),l(E))return E;let m=globalThis,h=typeof m.process<"u"&&typeof m.process.cwd=="function"?m.process.cwd():".";if(h!==s){let c=`${h}/pkg/@eser/ajan/dist/${y}/${r}`;if(t.push(c),l(c))return c}let B=[s,L,h];for(let c of B){let v=`${c}/node_modules/@eserstack/ajan-${a}/${r}`;if(t.push(v),l(v))return v}let T=[`/usr/local/lib/${r}`,`/usr/lib/${r}`];for(let c of T)if(t.push(c),l(c))return c;throw new Error(`Could not find eser-ajan shared library (${r}).
|
|
3
|
+
Checked the following locations:
|
|
4
|
+
`+t.map(c=>` - ${c}`).join(`
|
|
5
|
+
`)+`
|
|
6
|
+
|
|
7
|
+
To fix this:
|
|
8
|
+
1. Install: npm install @eser/ajan
|
|
9
|
+
2. Or set ESER_AJAN_LIB_PATH to the full path of ${r}`)},K=n=>{let e=globalThis;if(typeof e.process<"u"&&typeof e.process.env=="object")return e.process.env[n]??void 0};var q=n=>{try{let e=globalThis;if(typeof e.process<"u"&&e.process.env!=null)return e.process.env[n]}catch{}},f=n=>{let e=q(n);return e!==void 0&&e.toLowerCase()==="disabled"},F=n=>{console.debug(`[eser-ajan/ffi] ${n}`)},R=import.meta.dirname,X=j,Z=n=>I(n??R),z=[_,x,$],G=()=>{let n=globalThis;return typeof n.Deno<"u"&&typeof n.Deno.dlopen=="function"?"deno":typeof n.Bun<"u"?"bun":typeof n.process<"u"&&typeof n.process.versions?.node=="string"&&typeof n.Deno>"u"&&typeof n.Bun>"u"?"node":"unknown"},Q=()=>{for(let e of z)if(e.available())return e;let n=G();throw new Error(`No FFI backend available for runtime "${n}".
|
|
10
|
+
Supported runtimes:
|
|
11
|
+
- Deno 2.7+ (Deno.dlopen)
|
|
12
|
+
- Bun 1.3+ (bun:ffi)
|
|
13
|
+
- Node 25+ (node:ffi, experimental)
|
|
14
|
+
|
|
15
|
+
Current runtime: ${n}`)},nn=async(n,e)=>{let r=typeof n=="string"?n:void 0,t=typeof n=="object"?n:e;if(f("ESER_AJAN"))throw F("ALL disabled \u2014 ESER_AJAN=disabled"),new Error(`Ajan is disabled via ESER_AJAN=disabled environment variable.
|
|
16
|
+
Unset ESER_AJAN to re-enable.`);let o=!f("ESER_AJAN_NATIVE")&&t?.native!==!1,s=!f("ESER_AJAN_WASM")&&t?.wasm!==!1;if(o||F("Native FFI disabled \u2014 skipping to WASM fallback"),s||F("WASM fallback disabled"),o)try{let a=r??I(R);return Q().open(a)}catch{}if(s)try{return await(await import("./mod-IALKEUJL.js")).loadEserAjanWasm()}catch(a){throw new Error(`No native FFI backend available and WASM fallback failed.
|
|
17
|
+
WASM error: ${a instanceof Error?a.message:String(a)}
|
|
18
|
+
|
|
19
|
+
To fix this, install the @eser/ajan package or build the native library.
|
|
20
|
+
See: https://github.com/eser/stack/tree/main/pkg/@eser/ajan`)}let i=[];throw o||i.push(f("ESER_AJAN_NATIVE")?"ESER_AJAN_NATIVE=disabled":"native=false in LoadOptions"),s||i.push(f("ESER_AJAN_WASM")?"ESER_AJAN_WASM=disabled":"wasm=false in LoadOptions"),new Error(`All FFI backends are disabled.
|
|
21
|
+
Reasons: ${i.join(", ")}
|
|
22
|
+
|
|
23
|
+
To fix this, unset the relevant environment variables or adjust LoadOptions.`)};export{G as detectRuntime,X as getLibraryExtension,nn as loadEserAjan,Z as resolveLibraryPath,Q as selectBackend};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f as g,g as h,h as i,i as j,j as k,k as l}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f as g,g as h,h as i,i as j,j as k,k as l}from"./chunk-SHN5MT56.js";import{q as f}from"./chunk-YVN2NZL4.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{b as PipelineError,a as StreamError,c as TimeoutError,d as createChunk,e as defineLayer,k as layers,g as output,h as pipeline,l as renderers,i as sinks,j as sources,f as span};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-NVPQJFAI.js";import"./chunk-3OG2MEF2.js";import"./chunk-NBA6EFWU.js";import"./chunk-5DWJ7WEE.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-GVTM4EOU.js";import"./chunk-6DBKPC2O.js";import"./chunk-ALFFE37K.js";import"./chunk-6G6UVWJN.js";import"./chunk-5WJ6AUNY.js";export{e as ABOVE_FOLD_PATTERNS,d as CRITICAL_LAYERS,f as CRITICAL_PROPERTY_PATTERNS,m as DEFAULT_CRITICAL_UNIVERSAL_CSS,b as compileTailwind,n as createTailwindPlugin,c as expandApplyDirectives,h as extractCriticalPageCss,j as extractCriticalUniversalCss,l as extractThemeLayer,i as generateAsyncCssLoader,k as generateCriticalUniversalCss,g as getDefaultCriticalCssConfig,a as loadStylesheet};
|