eser 4.1.13 → 4.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -3
- package/chunks/add-4LRHVBEC.js +7 -0
- package/chunks/anthropic-GBDSASP5.js +1 -0
- package/chunks/approve-364KOMLB.js +1 -0
- package/chunks/ask-752YJEHO.js +2 -0
- package/chunks/block-JVJQU723.js +1 -0
- package/chunks/browser-6UKLTPJO.js +1 -0
- package/chunks/build-VKOO2WEA.js +6 -0
- package/chunks/bun-N3TIWBPP.js +1 -0
- package/chunks/changelog-gen-ZCNNOY7G.js +7 -0
- package/chunks/chunk-2R4MK2KR.js +2 -0
- package/chunks/chunk-2TRQKCFC.js +1 -0
- package/chunks/chunk-34GCQZ3Z.js +3 -0
- package/chunks/chunk-3APERFKY.js +18 -0
- package/chunks/chunk-3DMTTLUJ.js +1 -0
- package/chunks/chunk-3TYZYY77.js +1 -0
- package/chunks/chunk-4HMEWMWL.js +1 -0
- package/chunks/chunk-4OIKB2P5.js +1 -0
- package/chunks/chunk-4Q3SEHPE.js +1 -0
- package/chunks/chunk-4S7QYPS6.js +1 -0
- package/chunks/chunk-5C7ZQN6X.js +3 -0
- package/chunks/chunk-5O7V5P53.js +1 -0
- package/chunks/chunk-5UGVJVIQ.js +1 -0
- package/chunks/chunk-6FMPNAZ3.js +1 -0
- package/chunks/chunk-6U2VEZEM.js +1 -0
- package/chunks/chunk-6YRN6OJC.js +2 -0
- package/chunks/chunk-7GS5KPVF.js +1 -0
- package/chunks/chunk-7M3ONEMO.js +32 -0
- package/chunks/chunk-7QNRH7OR.js +3 -0
- package/chunks/chunk-A2GDVOQP.js +1 -0
- package/chunks/chunk-AK3OJD4W.js +1 -0
- package/chunks/chunk-ATLUGTI7.js +2 -0
- package/chunks/chunk-BK2BDHKB.js +1 -0
- package/chunks/chunk-BKVQBSFV.js +6 -0
- package/chunks/chunk-BP2MZX2P.js +2 -0
- package/chunks/chunk-C3OSYHJY.js +2 -0
- package/chunks/chunk-CDLEA2PD.js +1 -0
- package/chunks/chunk-DDLQMSA7.js +0 -0
- package/chunks/chunk-DLVQNMNV.js +1 -0
- package/chunks/chunk-DOV5776P.js +3 -0
- package/chunks/chunk-DQAEQEXD.js +1 -0
- package/chunks/chunk-DRQWYJMH.js +1 -0
- package/chunks/chunk-DXB73IDG.js +1 -0
- package/chunks/chunk-DZD6MI45.js +5 -0
- package/chunks/chunk-EW5NCPPE.js +3 -0
- package/chunks/chunk-FGDJVQG3.js +32 -0
- package/chunks/chunk-FKF2SWQM.js +18 -0
- package/chunks/chunk-GETSWLMF.js +4 -0
- package/chunks/chunk-GLSCZGXA.js +1 -0
- package/chunks/chunk-GRTR6TNJ.js +1 -0
- package/chunks/chunk-GXPLME3K.js +14 -0
- package/chunks/chunk-H2JGLZIR.js +1 -0
- package/chunks/chunk-HPPFA3XU.js +1 -0
- package/chunks/chunk-HPVL4BVQ.js +2 -0
- package/chunks/chunk-HVMMNGY5.js +7 -0
- package/chunks/chunk-IA7GIU76.js +14 -0
- package/chunks/chunk-IAWIWTDY.js +1 -0
- package/chunks/chunk-JQHMDTPL.js +1 -0
- package/chunks/chunk-L2BYHWDC.js +1 -0
- package/chunks/chunk-LRL56YFE.js +1 -0
- package/chunks/chunk-LU3DHXOC.js +2 -0
- package/chunks/chunk-LXVBR775.js +1 -0
- package/chunks/chunk-M5TBBQQC.js +21 -0
- package/chunks/chunk-MQH4XBFN.js +1 -0
- package/chunks/chunk-NADES3GN.js +1 -0
- package/chunks/chunk-NIX3WX3O.js +1 -0
- package/chunks/chunk-NSZ4HGDI.js +1 -0
- package/chunks/chunk-NUSNMQPL.js +1 -0
- package/chunks/chunk-NZFUFGOC.js +1 -0
- package/chunks/chunk-O2MNBI7V.js +1 -0
- package/chunks/chunk-OBIEQJDE.js +4 -0
- package/chunks/chunk-OLM5RTFK.js +1 -0
- package/chunks/chunk-PBSR4XR2.js +335 -0
- package/chunks/chunk-PLJNPQFC.js +1 -0
- package/chunks/chunk-PLRSDG6G.js +2 -0
- package/chunks/chunk-Q7QMINSQ.js +0 -0
- package/chunks/chunk-QIUIPRJP.js +1 -0
- package/chunks/chunk-QXTK62N4.js +1 -0
- package/chunks/chunk-R6F4EK2B.js +4 -0
- package/chunks/chunk-RGUC6KAZ.js +1 -0
- package/chunks/chunk-RUZDG5PT.js +60 -0
- package/chunks/chunk-SCCNNGD4.js +2 -0
- package/chunks/chunk-SCULX2ND.js +1 -0
- package/chunks/chunk-SJQWPBMJ.js +1 -0
- package/chunks/chunk-TMFPDVYN.js +127 -0
- package/chunks/chunk-UJX2S56V.js +1 -0
- package/chunks/chunk-USCAYIWL.js +1 -0
- package/chunks/chunk-V5HTJPFW.js +3 -0
- package/chunks/chunk-VFMYWG2I.js +3 -0
- package/chunks/chunk-VGFZXQMW.js +1 -0
- package/chunks/chunk-VTQ72OK7.js +1 -0
- package/chunks/chunk-WE7PSSAQ.js +91 -0
- package/chunks/chunk-WUJUQPHI.js +1 -0
- package/chunks/chunk-X4ZCYXOT.js +1 -0
- package/chunks/chunk-XJ3VEVYL.js +3 -0
- package/chunks/chunk-XMTGT2NJ.js +10 -0
- package/chunks/chunk-XWYLEYLY.js +1 -0
- package/chunks/chunk-Y6DLCHJN.js +1 -0
- package/chunks/chunk-Y6DZEK4W.js +1 -0
- package/chunks/chunk-YUXQ7JNG.js +1 -0
- package/chunks/chunk-Z7742D7Q.js +1 -0
- package/chunks/chunk-ZE5T64HQ.js +1 -0
- package/chunks/chunk-ZF2XYULB.js +1 -0
- package/chunks/chunk-ZOZYBQX2.js +0 -0
- package/chunks/chunk-ZTLJ775S.js +1 -0
- package/chunks/chunk-ZY72QNKZ.js +3 -0
- package/chunks/claude-code-PWTLM554.js +1 -0
- package/chunks/clone-DASXIL35.js +5 -0
- package/chunks/commitmsg-SQRQONCS.js +10 -0
- package/chunks/deno-PZXN5K3J.js +1 -0
- package/chunks/dev-FLO2KEPZ.js +3 -0
- package/chunks/file-tools-shared-ESMPLZVJ.js +1 -0
- package/chunks/fileFromPath-4UEDFJ4U.js +6 -0
- package/chunks/gemini-I6F5N7PS.js +1 -0
- package/chunks/gh-Y4BXDXR5.js +4 -0
- package/chunks/gh-contributors-5SHGJHAQ.js +11 -0
- package/chunks/init-GXBXQGGV.js +1 -0
- package/chunks/init-UFJL24PW.js +12 -0
- package/chunks/install-Q2KQZM62.js +2 -0
- package/chunks/kiro-NMTIFMT4.js +1 -0
- package/chunks/list-B7L4FZKG.js +2 -0
- package/chunks/list-MN7OUE52.js +1 -0
- package/chunks/list-UZKWSA4S.js +1 -0
- package/chunks/load-config-TSM3AAQ6.js +1 -0
- package/chunks/main-WVXCURBF.js +5 -0
- package/chunks/manifest-VJQJG2LS.js +1 -0
- package/chunks/mod-3PJAIZ2O.js +1 -0
- package/chunks/mod-6P2JPEHC.js +1 -0
- package/chunks/mod-CI56JMO4.js +43 -0
- package/chunks/mod-FKPTF5D5.js +1 -0
- package/chunks/mod-GZ6BSK2P.js +1 -0
- package/chunks/mod-JTBNNSZZ.js +1 -0
- package/chunks/mod-MKMQWZ6G.js +1 -0
- package/chunks/mod-PEAFMI6F.js +1 -0
- package/chunks/mod-QODEWK3G.js +9 -0
- package/chunks/mod-S33TIBIC.js +1 -0
- package/chunks/mod-STKIZYZ3.js +27 -0
- package/chunks/new-W5YBJFGW.js +4 -0
- package/chunks/next-773GX25N.js +3 -0
- package/chunks/node-RWYXITVV.js +59 -0
- package/chunks/node-VPHAK3FD.js +1 -0
- package/chunks/ollama-DQ5VM4HI.js +1 -0
- package/chunks/openai-EKIA3VP3.js +19 -0
- package/chunks/openai-XMIVMDDL.js +1 -0
- package/chunks/opencode-IZMQZ4ZK.js +1 -0
- package/chunks/recipe-applier-F2REROYS.js +1 -0
- package/chunks/registry-fetcher-ZJ76EHBA.js +1 -0
- package/chunks/release-YJOLKWDT.js +8 -0
- package/chunks/release-notes-Z53AFCII.js +3 -0
- package/chunks/release-tag-QRIKYVQB.js +1 -0
- package/chunks/reset-5LQGIOGB.js +1 -0
- package/chunks/rule-K42YEAMO.js +2 -0
- package/chunks/run-7JXDS75G.js +4 -0
- package/chunks/scripts-RSK5XDRW.js +1 -0
- package/chunks/sdk-5JGXLIO5.js +18 -0
- package/chunks/serve-U6IXMGXQ.js +3 -0
- package/chunks/server-PXE4DB3V.js +69 -0
- package/chunks/spec-5446CSQC.js +1 -0
- package/chunks/status-HK3P6J6G.js +1 -0
- package/chunks/sync-4FSA5257.js +1 -0
- package/chunks/system-3MH6OCP6.js +1 -0
- package/chunks/system-DTVAUBIX.js +1 -0
- package/chunks/unstable_chmod-WRDBWEC2.js +1 -0
- package/chunks/update-QD5S73WT.js +5 -0
- package/chunks/validate-bom-IVALGNGE.js +1 -0
- package/chunks/validate-case-conflict-LKECKLD5.js +1 -0
- package/chunks/validate-circular-deps-PXFPCBXA.js +1 -0
- package/chunks/validate-commit-msg-77CBKGOF.js +1 -0
- package/chunks/validate-docs-3UGB7LN7.js +1 -0
- package/chunks/validate-eof-ZSIYNHO5.js +1 -0
- package/chunks/validate-export-names-BPSCBX7B.js +1 -0
- package/chunks/validate-filenames-G4XJ2LHN.js +1 -0
- package/chunks/validate-json-YRCFW2O7.js +1 -0
- package/chunks/validate-large-files-MWWSFDOE.js +1 -0
- package/chunks/validate-licenses-Q2YA2MND.js +1 -0
- package/chunks/validate-line-endings-C6NHWHGI.js +1 -0
- package/chunks/validate-merge-conflict-KTBL4FUY.js +1 -0
- package/chunks/validate-mod-exports-LQIIQRIS.js +1 -0
- package/chunks/validate-package-configs-36PYXIWC.js +1 -0
- package/chunks/validate-secrets-UFDJ7ITY.js +1 -0
- package/chunks/validate-shebangs-3UO4MDMZ.js +1 -0
- package/chunks/validate-submodules-YA654D3B.js +1 -0
- package/chunks/validate-symlinks-R2PNE5TG.js +1 -0
- package/chunks/validate-toml-7H2N5AKI.js +1 -0
- package/chunks/validate-trailing-whitespace-HXO7M3ED.js +1 -0
- package/chunks/validate-yaml-ZJJCQVBB.js +1 -0
- package/chunks/versions-CWT5S7G4.js +1 -0
- package/chunks/vertexai-2SMP54AR.js +1 -0
- package/chunks/workerd-NXKZMQPV.js +1 -0
- package/eser.js +1 -986
- package/package.json +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import{a as u}from"./chunk-HPPFA3XU.js";import{a as p,b as f}from"./chunk-DQAEQEXD.js";import{t as x}from"./chunk-GRTR6TNJ.js";var h=t=>{let e=[],n=[],r={},s={};for(let i of t)i.type==="boolean"?e.push(i.name):n.push(i.name),i.short!==void 0&&(r[i.short]=i.name),i.default!==void 0&&(s[i.name]=i.default);return{boolean:e,string:n,alias:r,default:s}},T=t=>t!=null&&t.constructor===String,V={boolean:t=>!!t,number:t=>T(t)?Number(t):t,string:t=>String(t),"string[]":t=>Array.isArray(t)?t.map(String):[String(t)]},v=(t,e)=>{if(t!==void 0)return V[e]?.(t)??t},$=(t,e)=>{let n={};for(let r of e){let s=t[r.name];n[r.name]=v(s,r.type)}return n},re=(t,e)=>{let n=h(e),r=u(t,n);return{positional:r._,flags:$(r,e)}},_=(t,e)=>{let n=[];for(let r of e)if(r.required===!0){let s=t[r.name];(s===void 0||s===""||s===!1)&&n.push(`Required flag --${r.name} is missing`)}return n};var O=(t,e)=>t+" ".repeat(Math.max(0,e-t.length)),U=t=>{let e=t.short!==void 0?`-${t.short}, `:"",n=t.type!=="boolean"?` <${t.type}>`:"";return`${e}--${t.name}${n}`},q=(t,e)=>[t.description!==void 0?`${e} - ${t.description}`:e,""],B=(t,e)=>{if(t.usage!==void 0)return["Usage:",` ${t.usage}`,""];let n=t.children.length>0?" <command>":"",r=t.flags.length>0?" [options]":"";return["Usage:",` ${e}${n}${r}`,""]},I=t=>{if(t.length===0)return[];let e=Math.max(...t.map(r=>r.name.length));return["Commands:",...t.map(r=>` ${O(r.name,e+2)}${r.description??""}`),""]},Y=t=>{if(t.length===0)return[];let e=t.map(s=>({flag:U(s),desc:s.description})),n=Math.max(...e.map(s=>s.flag.length));return["Options:",...e.map(({flag:s,desc:i})=>` ${O(s,n+2)}${i}`),""]},Z=t=>t?.length?["Examples:",...t.map(e=>` ${e}`),""]:[],k=(t,e)=>{let n=e.join(" "),r=[...q(t,n),...B(t,n),...I(t.children),...Y(t.flags),...Z(t.examples)];return t.children.length>0&&r.push(`Run '${n} <command> --help' for more information on a command.`),r.join(`
|
|
2
|
+
`)};var w=t=>{let e=[];for(let n of t)e.push(`--${n.name}`),n.short!==void 0&&e.push(`-${n.short}`);return e.join(" ")},M=(t,e)=>{if(t.children===void 0||t.children.length===0)return"";let n=t.children.map(o=>o.name).join(" "),r=t.flags!==void 0?w(t.flags):"",s=[n,r].filter(o=>o.length>0).join(" "),i=` ${e})
|
|
3
|
+
`;i+=` COMPREPLY=( $(compgen -W "${s}" -- "\${cur}") )
|
|
4
|
+
`,i+=` return 0
|
|
5
|
+
`,i+=` ;;
|
|
6
|
+
`;for(let o of t.children)o.children!==void 0&&o.children.length>0&&(i+=M(o,`${e} ${o.name}`));return i},R=(t,e)=>{let n=e.children?.map(o=>o.name).join(" ")??"",r=e.flags!==void 0?w(e.flags):"",s=[n,r].filter(o=>o.length>0).join(" "),i="";if(e.children!==void 0)for(let o of e.children)i+=M(o,o.name);return`# ${t} bash completion
|
|
7
|
+
# Generated by @eser/shell/completions
|
|
8
|
+
|
|
9
|
+
_${t}_completions() {
|
|
10
|
+
local cur prev words cword
|
|
11
|
+
_init_completion || return
|
|
12
|
+
|
|
13
|
+
COMPREPLY=()
|
|
14
|
+
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
15
|
+
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
16
|
+
|
|
17
|
+
# Build the command path from words
|
|
18
|
+
local cmd_path=""
|
|
19
|
+
local i
|
|
20
|
+
for ((i=1; i<COMP_CWORD; i++)); do
|
|
21
|
+
case "\${COMP_WORDS[i]}" in
|
|
22
|
+
-*)
|
|
23
|
+
# Skip flags
|
|
24
|
+
;;
|
|
25
|
+
*)
|
|
26
|
+
if [[ -n "$cmd_path" ]]; then
|
|
27
|
+
cmd_path="$cmd_path \${COMP_WORDS[i]}"
|
|
28
|
+
else
|
|
29
|
+
cmd_path="\${COMP_WORDS[i]}"
|
|
30
|
+
fi
|
|
31
|
+
;;
|
|
32
|
+
esac
|
|
33
|
+
done
|
|
34
|
+
|
|
35
|
+
case "$cmd_path" in
|
|
36
|
+
${i} "")
|
|
37
|
+
COMPREPLY=( $(compgen -W "${s}" -- "\${cur}") )
|
|
38
|
+
return 0
|
|
39
|
+
;;
|
|
40
|
+
esac
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
complete -F _${t}_completions ${t}
|
|
44
|
+
`};var D=t=>t.replace(/'/g,"'\\''"),K=t=>{let e=[];for(let n of t){let r=D(n.description??`${n.name} flag`);n.takesValue===!0?(e.push(`'--${n.name}=[${r}]'`),n.short!==void 0&&e.push(`'-${n.short}=[${r}]'`)):(e.push(`'--${n.name}[${r}]'`),n.short!==void 0&&e.push(`'-${n.short}[${r}]'`))}return e},Q=t=>t.map(n=>{let r=D(n.description??n.name);return`'${n.name}:${r}'`}).join(`
|
|
45
|
+
`),P=(t,e,n)=>{let s=`${n.length===0?`_${t}`:`_${t}_${n.join("_")}`}() {
|
|
46
|
+
`;if(s+=` local -a commands
|
|
47
|
+
`,s+=` local -a flags
|
|
48
|
+
|
|
49
|
+
`,e.flags!==void 0&&e.flags.length>0){let i=K(e.flags);s+=` flags=(
|
|
50
|
+
${i.join(`
|
|
51
|
+
`)}
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
`}if(e.children!==void 0&&e.children.length>0){s+=` commands=(
|
|
55
|
+
`,s+=` ${Q(e.children)}
|
|
56
|
+
`,s+=` )
|
|
57
|
+
|
|
58
|
+
`,s+=` _arguments -C \\
|
|
59
|
+
`,e.flags!==void 0&&e.flags.length>0&&(s+=' "${flags[@]}" \\\n'),s+=` '1: :->command' \\
|
|
60
|
+
`,s+=` '*::arg:->args'
|
|
61
|
+
|
|
62
|
+
`,s+=` case "$state" in
|
|
63
|
+
`,s+=` command)
|
|
64
|
+
`,s+=` _describe -t commands 'command' commands
|
|
65
|
+
`,s+=` ;;
|
|
66
|
+
`,s+=` args)
|
|
67
|
+
`,s+=' case "${words[1]}" in\n';for(let i of e.children){let o=[...n,i.name],a=`_${t}_${o.join("_")}`;s+=` ${i.name})
|
|
68
|
+
`,s+=` ${a}
|
|
69
|
+
`,s+=` ;;
|
|
70
|
+
`}s+=` esac
|
|
71
|
+
`,s+=` ;;
|
|
72
|
+
`,s+=` esac
|
|
73
|
+
`}else e.flags!==void 0&&e.flags.length>0&&(s+=' _arguments "${flags[@]}"\n');if(s+=`}
|
|
74
|
+
|
|
75
|
+
`,e.children!==void 0)for(let i of e.children)s+=P(t,i,[...n,i.name]);return s},S=(t,e)=>{let n=`#compdef ${t}
|
|
76
|
+
`;return n+=`# ${t} zsh completion
|
|
77
|
+
`,n+=`# Generated by @eser/shell/completions
|
|
78
|
+
|
|
79
|
+
`,n+=P(t,e,[]),n};var H=t=>t.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),ee=(t,e,n)=>{let r="";for(let s of e){let i=H(s.description??`${s.name} flag`),o=`complete -c ${t} ${n}`;o+=` -l ${s.name}`,s.short!==void 0&&(o+=` -s ${s.short}`),s.takesValue===!0&&(o+=" -r"),o+=` -d '${i}'`,r+=o+`
|
|
80
|
+
`}return r},A=(t,e,n)=>{let r="",s;if(n.length===0?s="-n __fish_use_subcommand":s=`-n "${n.map(o=>`__fish_seen_subcommand_from ${o}`).join("; and ")}"`,e.children!==void 0&&e.children.length>0){for(let i of e.children){let o=H(i.description??i.name);if(n.length===0)r+=`complete -c ${t} -f ${s} `,r+=`-a "${i.name}" -d '${o}'
|
|
81
|
+
`;else{let a=`-n "__fish_seen_subcommand_from ${n[n.length-1]}"`;r+=`complete -c ${t} -f ${a} `,r+=`-a "${i.name}" -d '${o}'
|
|
82
|
+
`}}for(let i of e.children)r+=A(t,i,[...n,i.name])}return e.flags!==void 0&&e.flags.length>0&&(r+=ee(t,e.flags,s)),r},j=(t,e)=>{let n=`# ${t} fish completion
|
|
83
|
+
`;return n+=`# Generated by @eser/shell/completions
|
|
84
|
+
|
|
85
|
+
`,n+=`complete -c ${t} -f
|
|
86
|
+
|
|
87
|
+
`,n+=A(t,e,[]),n};var E=(t,e,n)=>{switch(t){case"bash":return R(e,n);case"zsh":return S(e,n);case"fish":return j(e,n)}};var N=class t{#e;#a;#d;#c=[];#u=[];#h=[];#g=[];#i=[];#s=new Map;#o=new Map;#n;#m;#p;#r={validation:"none"};#f;#t;constructor(e){this.#e=e}get name(){return this.#e}description(e){return this.#a=e,this}usage(e){return this.#d=e,this}example(e){return this.#c.push(e),this}aliases(...e){return this.#u=e,this}version(e){return this.#f=e,this}flag(e){return this.#h.push(e),this}persistentFlag(e){return this.#g.push({...e,persistent:!0}),this}args(e,n){return e==="exact"&&typeof n=="number"?this.#r={validation:e,count:n}:e==="min"&&typeof n=="number"?this.#r={validation:e,min:n}:e==="max"&&typeof n=="number"?this.#r={validation:e,max:n}:e==="range"&&Array.isArray(n)?this.#r={validation:e,min:n[0],max:n[1]}:this.#r={validation:e},this}command(e){return e.#t=this,this.#i.push(e),this}commands(...e){for(let n of e)this.command(n);return this}run(e){return this.#p=e,this}lazyCommand(e,n){return this.#s.set(e,n),this}group(e,n){return this.#o.set(e,n),this}modules(e){return this.#n=e,this}fallback(e){return this.#m=e,this}static#b=[{name:"help",short:"h",type:"boolean",description:"Show help for this command"}];#l(){let e=[],n=this.#t;for(;n!==void 0;)e.push(...n.#g),n=n.#t;return[...t.#b,...e,...this.#g,...this.#h]}#$(){return this.#t===void 0?this:this.#t.#$()}#C(){return this.#t===void 0?[this.#e]:[...this.#t.#C(),this.#e]}#x(e){return this.#i.find(n=>n.#e===e||n.#u.includes(e))}#_(e){let{validation:n,count:r,min:s,max:i}=this.#r,o=e.length;switch(n){case"no-args":if(o>0)return"This command takes no arguments";break;case"exact":if(o!==r)return`Expected exactly ${r} argument(s), got ${o}`;break;case"min":if(o<(s??0))return`Expected at least ${s} argument(s), got ${o}`;break;case"max":if(o>(i??1/0))return`Expected at most ${i} argument(s), got ${o}`;break;case"range":if(o<(s??0)||o>(i??1/0))return`Expected ${s}-${i} arguments, got ${o}`;break}}async parse(e){let n=e??x.process.args;return await this.#y(n,[])}async#y(e,n){let r=this.#l(),s=h(r),i=this.#i.length>0||this.#s.size>0||this.#o.size>0||this.#n!==void 0,o=u(e,{...s,stopEarly:i}),a=$(o,r),d=o._;if(this.#f!==void 0&&a.version===!0)return console.log(`${this.#e} ${this.#f}`),p(void 0);if(a.help===!0)return console.log(this.help()),p(void 0);let c=d[0];if(c!==void 0&&i){let F=this.#x(c);if(F!==void 0)return await F.#y(d.slice(1),[...n,this.#e]);if(this.#s.has(c)){let l=await this.#s.get(c).load();return l instanceof t?(l.#t=this,await l.parse(d.slice(1))):"parse"in l&&typeof l.parse=="function"?await l.parse(d.slice(1)):(console.log(l.help()),p(void 0))}if(this.#n!==void 0){let g=this.#n.aliases?.[c]??c,l=this.#n.modules[g];if(l!==void 0)return await(await l.load()).main(d.slice(1))}for(let[g,l]of this.#o)if(c===g){let m=d[1];if(m===void 0||m==="--help"||m==="-h")return this.#F(g,l),p(void 0);let G=l.aliases?.[m]??m,b=l.modules[G];return b===void 0?(console.error(`Unknown module: ${g} ${m}
|
|
88
|
+
`),this.#F(g,l),f({exitCode:1})):await(await b.load()).main(d.slice(2))}if(this.#m!==void 0)return await this.#m(c,d.slice(1))}if(this.#p===void 0)return console.log(this.help()),p(void 0);let C=_(a,r);if(C.length>0)return f({message:C.join(`
|
|
89
|
+
`),exitCode:1});let y=this.#_(d);if(y!==void 0)return f({message:y,exitCode:1});let L=[...n,this.#e],z={args:d,flags:a,root:this.#$(),commandPath:L};return await this.#p(z)}#F(e,n){console.log(`${this.#e} ${e} - ${n.description}
|
|
90
|
+
`),console.log(`Usage: ${this.#e} ${e} <module> [options]
|
|
91
|
+
`);let r=new Map;for(let[s,i]of Object.entries(n.modules)){let o=i.category??"Modules",a=r.get(o)??[];a.push([s,i]),r.set(o,a)}for(let[s,i]of r){console.log(`${s}:`);for(let[o,a]of i)console.log(` ${o.padEnd(24)} ${a.description}`);console.log()}if(n.aliases!==void 0&&Object.keys(n.aliases).length>0){console.log("Aliases:");for(let[s,i]of Object.entries(n.aliases))console.log(` ${s.padEnd(24)} \u2192 ${i}`)}}help(){let e=[...this.#i.map(r=>({name:r.#e,description:r.#a,usage:r.#d,examples:r.#c,flags:r.#l(),children:[]})),...[...this.#s.entries()].map(([r,s])=>({name:r,description:s.description,flags:[],children:[]})),...this.#n!==void 0?Object.entries(this.#n.modules).map(([r,s])=>({name:r,description:s.description,flags:s.flags??[],children:[]})):[],...[...this.#o.entries()].map(([r,s])=>({name:r,description:s.description,flags:[],children:[]}))],n={name:this.#e,description:this.#a,usage:this.#d,examples:this.#c,flags:this.#l(),children:e};return k(n,this.#C())}#O(){let e=r=>r.map(s=>({name:s.name,short:s.short,description:s.description,takesValue:s.type!=="boolean"})),n=r=>{let s=r.#i.map(n);for(let[i,o]of r.#s)s.push({name:i,description:o.description,children:[],flags:[]});if(r.#n!==void 0)for(let[i,o]of Object.entries(r.#n.modules))s.push({name:i,description:o.description,children:[],flags:o.flags!==void 0?e(o.flags):[]});for(let[i,o]of r.#o){let a=Object.entries(o.modules).map(([d,c])=>({name:d,description:c.description,children:[],flags:c.flags!==void 0?e(c.flags):[]}));s.push({name:i,description:o.description,children:a,flags:[]})}return{name:r.#e,description:r.#a,children:s,flags:e(r.#l())}};return n(this)}completions(e){let n=this.#O();return E(e,this.#e,n)}};export{re as a,N as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v,b as N,c as H,l as D,m as h}from"./chunk-GLSCZGXA.js";import{a as x,b as p,c as u,e as A,f as P}from"./chunk-ZE5T64HQ.js";function L(e){e instanceof URL&&(e=v(e)),p(e);let r=-1,t=0,i=-1,n=!0,o=0;for(let s=e.length-1;s>=0;--s){let f=e.charCodeAt(s);if(u(f)){if(!n){t=s+1;break}continue}i===-1&&(n=!1,i=s+1),f===46?r===-1?r=s:o!==1&&(o=1):r!==-1&&(o=-1)}return r===-1||i===-1||o===0||o===1&&r===i-1&&r===t+1?"":e.slice(r,i)}function T(e){e instanceof URL&&(e=H(e)),p(e);let r=0,t=-1,i=0,n=-1,o=!0,s=0;e.length>=2&&e.charCodeAt(1)===58&&P(e.charCodeAt(0))&&(r=i=2);for(let f=e.length-1;f>=r;--f){let c=e.charCodeAt(f);if(A(c)){if(!o){i=f+1;break}continue}n===-1&&(o=!1,n=f+1),c===46?t===-1?t=f:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===i+1?"":e.slice(t,n)}function j(e){return x?T(e):L(e)}function w(e,r){let t=r.dir||r.root,i=r.base||(r.name??"")+(r.ext??"");return t?i===e?t:t===r.root?t+i:t+e+i:i}function R(e){if(e===null||typeof e!="object")throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof e}"`)}function W(e){return R(e),w("/",e)}function E(e){return R(e),w("\\",e)}function le(e){return x?E(e):W(e)}function O(e){p(e);let r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;let t=u(e.charCodeAt(0)),i;t?(r.root="/",i=1):i=0;let n=-1,o=0,s=-1,f=!0,c=e.length-1,d=0;for(;c>=i;--c){let l=e.charCodeAt(c);if(u(l)){if(!f){o=c+1;break}continue}s===-1&&(f=!1,s=c+1),l===46?n===-1?n=c:d!==1&&(d=1):n!==-1&&(d=-1)}return n===-1||s===-1||d===0||d===1&&n===s-1&&n===o+1?(s!==-1&&(o===0&&t?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(o,s)),r.base=r.base||"/"):(o===0&&t?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(o,n),r.base=e.slice(o,s)),r.ext=e.slice(n,s)),o>0?r.dir=N(e.slice(0,o-1),u):t&&(r.dir="/"),r}function y(e){p(e);let r={root:"",dir:"",base:"",ext:"",name:""},t=e.length;if(t===0)return r;let i=0,n=e.charCodeAt(0);if(t>1){if(A(n)){if(i=1,A(e.charCodeAt(1))){let a=2,m=a;for(;a<t&&!A(e.charCodeAt(a));++a);if(a<t&&a!==m){for(m=a;a<t&&A(e.charCodeAt(a));++a);if(a<t&&a!==m){for(m=a;a<t&&!A(e.charCodeAt(a));++a);a===t?i=a:a!==m&&(i=a+1)}}}}else if(P(n)&&e.charCodeAt(1)===58)if(i=2,t>2){if(A(e.charCodeAt(2))){if(t===3)return r.root=r.dir=e,r.base="\\",r;i=3}}else return r.root=r.dir=e,r}else if(A(n))return r.root=r.dir=e,r.base="\\",r;i>0&&(r.root=e.slice(0,i));let o=-1,s=i,f=-1,c=!0,d=e.length-1,l=0;for(;d>=i;--d){if(n=e.charCodeAt(d),A(n)){if(!c){s=d+1;break}continue}f===-1&&(c=!1,f=d+1),n===46?o===-1?o=d:l!==1&&(l=1):o!==-1&&(l=-1)}return o===-1||f===-1||l===0||l===1&&o===f-1&&o===s+1?f!==-1&&(r.base=r.name=e.slice(s,f)):(r.name=e.slice(s,o),r.base=e.slice(s,f),r.ext=e.slice(o,f)),r.base=r.base||"\\",s>0&&s!==i?r.dir=e.slice(0,s-1):r.dir=r.root,r}function we(e){return x?y(e):O(e)}function k(e,r){if(p(e),p(r),e===r)return""}function U(e,r){if(k(e,r),e=D(e),r=D(r),e===r)return"";let t=1,i=e.length;for(;t<i&&u(e.charCodeAt(t));++t);let n=i-t,o=1,s=r.length;for(;o<s&&u(r.charCodeAt(o));++o);let f=s-o,c=n<f?n:f,d=-1,l=0;for(;l<=c;++l){if(l===c){if(f>c){if(u(r.charCodeAt(o+l)))return r.slice(o+l+1);if(l===0)return r.slice(o+l)}else n>c&&(u(e.charCodeAt(t+l))?d=l:l===0&&(d=0));break}let m=e.charCodeAt(t+l),g=r.charCodeAt(o+l);if(m!==g)break;u(m)&&(d=l)}let a="";for(l=t+d+1;l<=i;++l)(l===i||u(e.charCodeAt(l)))&&(a.length===0?a+="..":a+="/..");return a.length>0?a+r.slice(o+d):(o+=d,u(r.charCodeAt(o))&&++o,r.slice(o))}function z(e,r){k(e,r);let t=h(e),i=h(r);if(t===i||(e=t.toLowerCase(),r=i.toLowerCase(),e===r))return"";let n=0,o=e.length;for(;n<o&&e.charCodeAt(n)===92;++n);for(;o-1>n&&e.charCodeAt(o-1)===92;--o);let s=o-n,f=0,c=r.length;for(;f<c&&r.charCodeAt(f)===92;++f);for(;c-1>f&&r.charCodeAt(c-1)===92;--c);let d=c-f,l=s<d?s:d,a=-1,m=0;for(;m<=l;++m){if(m===l){if(d>l){if(r.charCodeAt(f+m)===92)return i.slice(f+m+1);if(m===2)return i.slice(f+m)}s>l&&(e.charCodeAt(n+m)===92?a=m:m===2&&(a=3));break}let _=e.charCodeAt(n+m),G=r.charCodeAt(f+m);if(_!==G)break;_===92&&(a=m)}if(m!==l&&a===-1)return i;let g="";for(a===-1&&(a=0),m=n+a+1;m<=o;++m)(m===o||e.charCodeAt(m)===92)&&(g.length===0?g+="..":g+="\\..");return g.length>0?g+i.slice(f+a,c):(f+=a,i.charCodeAt(f)===92&&++f,i.slice(f,c))}function ze(e,r){return x?z(e,r):U(e,r)}export{j as a,le as b,we as c,ze as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as i}from"./chunk-DOV5776P.js";var t=async a=>{try{return await i`which ${a}`.noThrow().code()===0}catch{return!1}},r=async()=>{try{return(await fetch("http://localhost:11434/api/version",{signal:AbortSignal.timeout(1e3)})).ok}catch{return!1}},e=a=>typeof globalThis.Deno<"u"?Deno.env.get(a)!==void 0:!1,c=async()=>{let[a,o,n,l]=await Promise.all([t("claude"),r(),t("opencode"),t("kiro")]);return[{name:"claude-code",alias:"cc",type:"CLI",available:a,detail:a?"claude binary found":"claude not on PATH"},{name:"ollama",alias:"ol",type:"HTTP",available:o,detail:o?"localhost:11434 reachable":"localhost:11434 not reachable"},{name:"opencode",alias:"oc",type:"CLI",available:n,detail:n?"opencode binary found":"opencode not on PATH"},{name:"kiro",alias:"kr",type:"CLI",available:l,detail:l?"kiro binary found":"kiro not on PATH"},{name:"anthropic",alias:"ant",type:"API",available:e("ANTHROPIC_API_KEY"),detail:e("ANTHROPIC_API_KEY")?"ANTHROPIC_API_KEY set":"ANTHROPIC_API_KEY not set"},{name:"openai",alias:"oai",type:"API",available:e("OPENAI_API_KEY"),detail:e("OPENAI_API_KEY")?"OPENAI_API_KEY set":"OPENAI_API_KEY not set"},{name:"gemini",alias:"gem",type:"API",available:e("GEMINI_API_KEY")||e("GOOGLE_API_KEY"),detail:e("GEMINI_API_KEY")||e("GOOGLE_API_KEY")?"API key set":"GEMINI_API_KEY not set"},{name:"vertexai",alias:"vtx",type:"API",available:e("GOOGLE_CLOUD_PROJECT"),detail:e("GOOGLE_CLOUD_PROJECT")?"GOOGLE_CLOUD_PROJECT set":"GOOGLE_CLOUD_PROJECT not set"}]};export{c as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as t}from"./chunk-VFMYWG2I.js";var n=t({name:"validate-line-endings",description:"Normalize line endings to LF",canFix:!0,stacks:[],defaults:{},checkFile(i,e){return e===void 0?[]:e.includes("\r")?[{path:i.path,message:"file contains CRLF or CR line endings"}]:[]},fixFile(i,e){let r=e.replace(/\r\n/g,`
|
|
2
|
+
`).replace(/\r/g,`
|
|
3
|
+
`);if(r!==e)return{path:i.path,oldContent:e,newContent:r}}}),s=n.run,d=n.validator,p=n.main;export{n as a,s as b,d as c,p as d};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var c="<!-- noskills:start -->",i="<!-- noskills:end -->",y=n=>{let e=[c,"## noskills orchestrator","","This project uses noskills. Do not read skill files, concern files,","or rule files directly.","","At every step, run:",""," npx eser noskills next","","Follow the output. To submit a result or answer:","",' npx eser noskills next --answer="your response here"',"","Do not make architectural decisions independently.","noskills will tell you what to do next."];if(n.length>0){e.push("","### Active Rules","");for(let s of n)e.push(`- ${s}`)}return e.push(i),e.join(`
|
|
2
|
+
`)},a=async(n,e)=>{let s=`${n}/CLAUDE.md`,t=y(e),o;try{o=await Deno.readTextFile(s);let r=o.indexOf(c),l=o.indexOf(i);r!==-1&&l!==-1?o=o.slice(0,r)+t+o.slice(l+i.length):o=o.trimEnd()+`
|
|
3
|
+
|
|
4
|
+
`+t+`
|
|
5
|
+
`}catch{o=t+`
|
|
6
|
+
`}await Deno.writeTextFile(s,o)};var u=async(n,e)=>{let s=["# Generated by noskills \u2014 do not edit manually","","## Orchestration","","This project uses noskills for AI orchestration.","Run `npx eser noskills next` at every step.",'Follow the JSON output. Submit results with `npx eser noskills next --answer="..."`',""];if(e.length>0){s.push("## Rules","");for(let t of e)s.push(`- ${t}`);s.push("")}await Deno.writeTextFile(`${n}/.cursorrules`,s.join(`
|
|
7
|
+
`))};var d=async(n,e)=>{let s=["# Generated by noskills \u2014 do not edit manually","","## Orchestration","","This project uses noskills for AI orchestration.","Run `npx eser noskills next` at every step.",""];if(e.length>0){s.push("## Rules","");for(let t of e)s.push(`- ${t}`);s.push("")}await Deno.mkdir(`${n}/.kiro/steering`,{recursive:!0}),await Deno.writeTextFile(`${n}/.kiro/steering/conventions.md`,s.join(`
|
|
8
|
+
`))};var p=async(n,e)=>{let s=["# Generated by noskills \u2014 do not edit manually","","## Orchestration","","This project uses noskills for AI orchestration.","Run `npx eser noskills next` at every step.",""];if(e.length>0){s.push("## Rules","");for(let t of e)s.push(`- ${t}`);s.push("")}await Deno.mkdir(`${n}/.github`,{recursive:!0}),await Deno.writeTextFile(`${n}/.github/copilot-instructions.md`,s.join(`
|
|
9
|
+
`))};var h=async(n,e)=>{let s=["# Generated by noskills \u2014 do not edit manually","","## Orchestration","","This project uses noskills for AI orchestration.","Run `npx eser noskills next` at every step.",""];if(e.length>0){s.push("## Rules","");for(let t of e)s.push(`- ${t}`);s.push("")}await Deno.writeTextFile(`${n}/.windsurfrules`,s.join(`
|
|
10
|
+
`))};var w=async n=>{let e=`${n}/.nos/rules`,s=[];try{for await(let t of Deno.readDir(e))if(t.isFile&&(t.name.endsWith(".md")||t.name.endsWith(".txt"))){let o=await Deno.readTextFile(`${e}/${t.name}`);s.push(o.trim())}}catch{}return s},T={"claude-code":a,cursor:u,kiro:d,copilot:p,windsurf:h},D=async(n,e)=>{let s=await w(n),t=[];for(let o of e){let r=T[o];r!==void 0&&(await r(n,s),t.push(o))}return t};export{w as a,D as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as w}from"./chunk-DLVQNMNV.js";import{a as v}from"./chunk-6U2VEZEM.js";import{a as y}from"./chunk-JQHMDTPL.js";import{f as k}from"./chunk-NUSNMQPL.js";import{b as l,e as f,f as h,g as C,h as m}from"./chunk-PLJNPQFC.js";import{g as a}from"./chunk-DQAEQEXD.js";var p=y(),D=e=>{let s=new Map,r=new Set(e.map(i=>i.name));for(let i of e){let n=[];for(let d of i.config._loadedFiles){let t=d.content,u=t.dependencies;if(u!==void 0)for(let c of Object.keys(u))r.has(c)&&n.push(c);let o=t.imports;if(o!==void 0)for(let c of Object.values(o))r.has(c)&&n.push(c)}s.set(i.name,[...new Set(n)])}return s},x=e=>{let s=[],r=new Set,i=new Set,n=[],d=t=>{r.add(t),i.add(t),n.push(t);let u=e.get(t)??[];for(let o of u)if(!r.has(o))d(o);else if(i.has(o)){let c=n.indexOf(o),g=n.slice(c);g.push(o),s.push(g)}n.pop(),i.delete(t)};for(let t of e.keys())r.has(t)||d(t);return s},R=async(e={})=>{let{root:s="."}=e,r=await w(s),i=D(r),n=x(i);return{hasCycles:n.length>0,cycles:n,packagesChecked:r.length}},O=e=>k.fromPromise(()=>R(e)),b=e=>a.ok({root:"."}),A=e=>{if(a.isFail(e))return p.writeln(f("\u2717"),l(" "+(e.error instanceof Error?e.error.message:String(e.error)))),a.fail({exitCode:1});let{value:s}=e;if(p.writeln(m("\u2139"),l(` Checked ${s.packagesChecked} packages.`)),s.hasCycles){p.writeln(f("\u2717"),l(` Found ${s.cycles.length} circular dependencies:`));for(let r of s.cycles)p.writeln(C("\u26A0"),l(` ${r.join(" \u2192 ")}`));return a.fail({exitCode:1})}return p.writeln(h("\u2713"),l(" No circular dependencies found.")),a.ok(void 0)},M=v.createTrigger({handler:O,adaptInput:b,adaptOutput:A}),_=async e=>await M({command:"validate-circular-deps",args:[],flags:{}});export{R as a,O as b,M as c,_ as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as x}from"./chunk-DOV5776P.js";import{t as i}from"./chunk-GRTR6TNJ.js";var m=[/node_modules/,/\.git\//,/\/dist\//,/etc\/coverage/,/etc\/temp/,/\.output\//],g=async t=>{try{let n=await x`git ls-files --cached --others --exclude-standard`.cwd(t).noThrow().lines();return n.length>0?n:null}catch{return null}},k=async(t={})=>{let{root:n=".",extensions:e,exclude:o=[]}=t,l=[...m,...o.map(r=>typeof r=="string"?new RegExp(r):r)],d=[],y=await g(n);if(y!==null)for(let r of y){let s=i.path.join(n,r),c=i.path.basename(r);if(e!==void 0&&e.length>0){let a=i.path.extname(r);if(!e.map(u=>u.startsWith(".")?u:`.${u}`).includes(a))continue}if(l.some(a=>a.test(s)||a.test(r)))continue;let f=0,p=!1;try{let a=await i.fs.lstat(s);if(f=a.size,p=a.isSymlink,a.isDirectory&&!(t.includeDirs??!1))continue}catch{continue}d.push({path:s,name:c,size:f,isSymlink:p})}else for await(let r of i.fs.walk(n,{includeDirs:t.includeDirs??!1,includeFiles:!0,exts:e,skip:l})){if(!r.isFile&&!r.isSymlink)continue;let s=0;try{s=(await i.fs.stat(r.path)).size}catch{continue}d.push({path:r.path,name:r.name,size:s,isSymlink:r.isSymlink})}if(t.includeOnly!==void 0&&t.includeOnly.length>0){let r=t.includeOnly;return d.filter(s=>r.some(c=>s.path.endsWith(c)||s.path.includes(c)))}return d},B=async t=>{if(t.textContent!==void 0)return t.textContent;try{let n=await h(t);if(w(n))return;let e=new TextDecoder().decode(n);return t.textContent=e,e}catch{return}},h=async t=>{if(t.rawBytes!==void 0)return t.rawBytes;let n=await i.fs.readFile(t.path);return t.rawBytes=n,n},w=t=>{let n=Math.min(t.length,8192);for(let e=0;e<n;e++)if(t[e]===0)return!0;return!1},M=(t,n)=>{for(let e of n)if(typeof e=="string"){if(t.includes(e)||t.endsWith(e))return!0}else if(e.test(t))return!0;return!1},b=(t,n)=>{let e=new Map;for(let o of n)e.set(o.path,o);for(let o of t){let l=e.get(o.path);l!==void 0&&(o.textContent=l.newContent,o.rawBytes=void 0)}},D=async t=>{let n=0;for(let e of t)e.oldContent!==e.newContent&&(await i.fs.writeTextFile(e.path,e.newContent),n++);return n};export{m as a,k as b,B as c,h as d,w as e,M as f,b as g,D as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l=class extends Error{constructor(a){super(a),this.name="DeepMergeError"}},E=(d,a,j)=>{if(a==null){let s=d.constructor,e=new s;for(let r of Object.keys(d))e[r]=d[r];return e}let O=j?.maxDepth??100,U=j?.noSkipUndefined??!1,p=new WeakSet,b=new WeakSet,f=(s,e,r)=>{if(!(s instanceof Object))return s;if(p.has(s))throw new l("Circular reference detected in first argument: cannot deep merge objects with circular references");if(e instanceof Object&&b.has(e))throw new l("Circular reference detected in second argument: cannot deep merge objects with circular references");if(r>O)throw new l(`Maximum recursion depth exceeded (${O}). Objects are too deeply nested or contain circular references.`);p.add(s),e instanceof Object&&b.add(e);try{let R=s.constructor,c=new R,x=Object.keys(s),m=new Set;for(let o=0,T=x.length;o<T;o++){let t=x[o],n=s[t],y=e!==void 0&&t in e,i=e?.[t];m.add(t);let g=y&&i===void 0&&!U;if(n instanceof Object&&n.constructor!==Array){let u;g?u=f(n,{},r+1):y&&i instanceof Object&&i.constructor!==Array?u=f(n,i,r+1):y?u=i:u=f(n,{},r+1),c[t]=u}else g?c[t]=n:c[t]=y?i:n}if(e===void 0)return c;let w=Object.keys(e);for(let o=0,T=w.length;o<T;o++){let t=w[o];if(m.has(t))continue;let n=e[t];n===void 0&&!U||(n instanceof Object&&n.constructor!==Array?c[t]=f({},n,r+1):c[t]=n)}return c}finally{p.delete(s),e instanceof Object&&b.delete(e)}};return f(d,a,0)};export{E as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./chunk-VFMYWG2I.js";import{a as r}from"./chunk-3APERFKY.js";var t=i({name:"validate-toml",description:"Validate TOML syntax",canFix:!1,stacks:[],defaults:{},extensions:[".toml"],checkFile(e,a){if(a===void 0)return[];try{return r(a),[]}catch(o){let n=o instanceof Error?o.message:"invalid TOML";return[{path:e.path,message:n}]}}}),p=t.run,d=t.validator,u=t.main;export{t as a,p as b,d as c,u as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as s}from"./chunk-VTQ72OK7.js";import{a as t}from"./chunk-QXTK62N4.js";var c={fs:!1,fsSync:!1,exec:!1,process:!1,env:!0,stdin:!1,stdout:!1,kv:!0},d=()=>{let e=()=>{throw new t("fs","workerd")};return{readFile:e,readTextFile:e,writeFile:e,writeTextFile:e,exists:e,stat:e,lstat:e,mkdir:e,ensureDir:e,remove:e,readDir:()=>{throw new t("fs","workerd")},copyFile:e,rename:e,makeTempDir:e,realPath:e,watch:e,walk:e,chmod:e}},w=()=>s,u=()=>{let e=()=>{throw new t("exec","workerd")};return{spawn:e,exec:e,execJson:e,spawnChild:e}},r=new Map,l=()=>({get(e){return r.get(e)},set(e,o){r.set(e,o)},delete(e){r.delete(e)},has(e){return r.has(e)},toObject(){return Object.fromEntries(r)}}),g=e=>{for(let[o,n]of Object.entries(e))n!=null&&n.constructor===String&&r.set(o,n)},k=()=>{r.clear()},m=()=>{let e=()=>{throw new t("process","workerd")};return{exit:e,setExitCode:e,cwd:e,chdir:e,hostname:e,execPath:e,get args(){throw new t("process","workerd")},get pid(){throw new t("process","workerd")},get stdin(){throw new t("process","workerd")},get stdout(){throw new t("process","workerd")},get stderr(){throw new t("process","workerd")}}},v=()=>{let e=d(),o=w(),n=u(),i=l(),a=m();return{name:"workerd",version:"unknown",capabilities:c,fs:e,path:o,exec:n,env:i,process:a}};export{c as a,g as b,k as c,v as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function s(){let t=globalThis,o=t.Deno?.build?.os;return typeof o=="string"?o==="windows":t.navigator?.platform?.startsWith("Win")??t.process?.platform?.startsWith("win")??!1}var a=s();function r(t){if(typeof t!="string")throw new TypeError(`Path must be a string, received "${JSON.stringify(t)}"`)}function n(t){return t===47}function m(t){return r(t),t.length>0&&n(t.charCodeAt(0))}function l(t){return t===47}function e(t){return t===47||t===92}function _(t){return t>=97&&t<=122||t>=65&&t<=90}function K(t){r(t);let o=t.length;if(o===0)return!1;let R=t.charCodeAt(0);return e(R)?!0:!!(_(R)&&o>2&&t.charCodeAt(1)===58&&e(t.charCodeAt(2)))}export{a,r as b,n as c,l as d,e,_ as f,m as g,K as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=a=>{let n=[],i=new Set,r="",e=a,o=/\[(\.\.\.)?(\w+)\]/;for(;e.length>0;){let t=o.exec(e);if(t===null){r+=l(e);break}t.index>0&&(r+=l(e.slice(0,t.index)));let m=t[1]==="...",s=t[2];s!==void 0&&(n.push(s),m?(i.add(s),r+="(.*)"):r+="([^/]+)"),e=e.slice(t.index+t[0].length)}return{regex:new RegExp(`^${r}$`),paramNames:n,catchAllParams:i}},u=(a,n)=>{let i=a.match(n.regex);if(i===null)return null;let r={};for(let e=0;e<n.paramNames.length;e++){let o=n.paramNames[e],t=i[e+1];o!==void 0&&(n.catchAllParams.has(o)?r[o]=t!==void 0&&t!==""?t.split("/").filter(Boolean):[]:r[o]=t??"")}return r},g=(a,n)=>{let i=c(n);return u(a,i)};export{g as a};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as E}from"./chunk-DLVQNMNV.js";import{a as y}from"./chunk-6U2VEZEM.js";import{a as C}from"./chunk-JQHMDTPL.js";import{f as v}from"./chunk-NUSNMQPL.js";import{b as a,e as m,f as x,g as k,h as g}from"./chunk-PLJNPQFC.js";import{g as p}from"./chunk-DQAEQEXD.js";import{u as h}from"./chunk-GRTR6TNJ.js";var l=C(),d=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase(),f=(e,o=[])=>{let s=e.split("/").filter(r=>r.length>0);for(let r of s){let t=r.startsWith(".")?r.slice(1):r;if(t.length===0)continue;let i=h.current.path.extname(t);if(i.length>0&&(t=t.slice(0,-i.length)),t.length!==0&&!o.includes(t)&&!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(t))return!1}return!0},N=async(e={})=>{let{root:o=".",ignoreWords:s=[]}=e,r=await E(o),t=[];for(let i of r){let n=i.config.exports?.value;if(n!=null){if(typeof n=="string"){f(n,s)||t.push({packageName:i.name,exportPath:n,suggestion:d(n)});continue}if(n!==null&&typeof n=="object")for(let[u,c]of Object.entries(n))f(u,s)||t.push({packageName:i.name,exportPath:u,suggestion:d(u)}),typeof c=="string"&&!f(c,s)&&t.push({packageName:i.name,exportPath:c,suggestion:d(c)})}}return{isValid:t.length===0,violations:t,packagesChecked:r.length}},w=e=>v.fromPromise(()=>N(e)),b=e=>p.ok({root:"."}),A=e=>{if(p.isFail(e))return l.writeln(m("\u2717"),a(" "+String(e.error))),p.fail({exitCode:1});let{value:o}=e;if(l.writeln(g("\u2139"),a(` Checked ${o.packagesChecked} packages.`)),!o.isValid){l.writeln(m("\u2717"),a(` Found ${o.violations.length} naming violations:`));for(let s of o.violations)l.writeln(k("\u26A0"),a(" "+s.packageName)),l.writeln(g("\u2139"),a(` Export: ${s.exportPath}`)),l.writeln(g("\u2139"),a(` Suggestion: ${s.suggestion}`));return p.fail({exitCode:1})}return l.writeln(x("\u2713"),a(" All export names follow conventions.")),p.ok(void 0)},P=y.createTrigger({handler:w,adaptInput:b,adaptOutput:A}),W=async e=>await P({command:"validate-export-names",args:[],flags:{}});export{N as a,w as b,P as c,W as d};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c as u}from"./chunk-7QNRH7OR.js";import{a as i,e as m}from"./chunk-OLM5RTFK.js";var p="http://localhost:11434",d=class{capabilities=["text_generation","streaming","vision"];provider="ollama";modelId;baseUrl;config;constructor(e,o){this.baseUrl=e,this.config=o,this.modelId=o.model}async generateText(e,o){let s=g(this.config,e,!1);try{let t=await fetch(`${this.baseUrl}/api/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),signal:o});if(!t.ok)throw await f(t);let r=await t.json();return h(r,this.modelId)}catch(t){throw t instanceof i?t:new i(t instanceof Error?t.message:String(t),{provider:"ollama",cause:t instanceof Error?t:void 0})}}async*streamText(e,o){let s=g(this.config,e,!0);try{let t=await fetch(`${this.baseUrl}/api/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),signal:o});if(!t.ok){yield{kind:"error",error:await f(t)};return}if(t.body===null){yield{kind:"error",error:new i("No response body",{provider:"ollama"})};return}for await(let r of u(t.body)){let l=k(r);l!==null&&(yield l)}}catch(t){t instanceof i?yield{kind:"error",error:t}:yield{kind:"error",error:new i(t instanceof Error?t.message:String(t),{provider:"ollama",cause:t instanceof Error?t:void 0})}}}close(){return Promise.resolve()}getRawClient(){return null}},v={provider:"ollama",createModel(n){let e=n.properties?.baseUrl??p;return Promise.resolve(new d(e,n))}},g=(n,e,o)=>{let s=y(e.messages,e.system),t={model:n.model,messages:s,stream:o},r={};return e.temperature!==void 0&&(r.temperature=e.temperature),e.maxTokens!==void 0&&(r.num_predict=e.maxTokens),e.topP!==void 0&&(r.top_p=e.topP),e.stopWords!==void 0&&(r.stop=e.stopWords),Object.keys(r).length>0&&(t.options=r),e.responseFormat!==void 0&&(e.responseFormat.type==="json_schema"?t.format=e.responseFormat.jsonSchema:e.responseFormat.type==="json_object"&&(t.format="json")),t},y=(n,e)=>{let o=[];e!==void 0&&o.push({role:"system",content:e});for(let s of n){if(s.role==="system"){let a=[];for(let c of s.content)c.kind==="text"&&a.push(c.text);o.push({role:"system",content:a.join(`
|
|
2
|
+
`)});continue}let t=[],r=[];for(let a of s.content)a.kind==="text"?t.push(a.text):a.kind==="image"&&a.image.url!==void 0&&r.push(a.image.url);let l={role:s.role==="tool"?"user":s.role,content:t.join(`
|
|
3
|
+
`)};r.length>0&&(l.images=r),o.push(l)}return o},h=(n,e)=>{let o=[];return n.message?.content!==void 0&&o.push({kind:"text",text:n.message.content}),{content:o,stopReason:n.done_reason==="length"?"max_tokens":"end_turn",usage:{inputTokens:n.prompt_eval_count??0,outputTokens:n.eval_count??0,totalTokens:(n.prompt_eval_count??0)+(n.eval_count??0)},modelId:e,rawResponse:n}},k=n=>{if(n===null||typeof n!="object")return null;let e=n;return e.done===!0?{kind:"message_done",stopReason:e.done_reason==="length"?"max_tokens":"end_turn",usage:{inputTokens:e.prompt_eval_count??0,outputTokens:e.eval_count??0,totalTokens:(e.prompt_eval_count??0)+(e.eval_count??0)}}:e.message?.content!==void 0&&e.message.content.length>0?{kind:"content_delta",textDelta:e.message.content}:e.response!==void 0&&e.response.length>0?{kind:"content_delta",textDelta:e.response}:null},f=async n=>{let e;try{e=(await n.json()).error??`Ollama HTTP ${n.status}`}catch{e=`Ollama HTTP ${n.status}: ${n.statusText}`}return m("ollama",n.status,new Error(e))};export{d as a,v as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-3DMTTLUJ.js";import"./chunk-7QNRH7OR.js";import"./chunk-OLM5RTFK.js";import"./chunk-DOV5776P.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";export{a as ClaudeCodeModel,b as claudeCodeFactory};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as x,b as E}from"./chunk-3TYZYY77.js";import{e as $}from"./chunk-6YRN6OJC.js";import{a as C,d as P}from"./chunk-NUSNMQPL.js";import{j}from"./chunk-SCULX2ND.js";import{f as v,h as k,k as b}from"./chunk-FGDJVQG3.js";import{d,e as w,f as R,j as h}from"./chunk-PLJNPQFC.js";import{a as y}from"./chunk-HPPFA3XU.js";import{a as p,b as c,c as g}from"./chunk-DQAEQEXD.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var A=r=>{let n=r.replace(/^gh:/,""),[t,e]=n.split("#");if(t===void 0)return;let s=t.split("/");if(!(s.length!==2||s[0]===""||s[1]===""))return{owner:s[0],repo:s[1],ref:e??"main"}},S=r=>C(async n=>{try{let{specifier:t}=r,e=r.recipePath??"recipe.json",s=await j(t.owner,t.repo,t.ref,e),o=r.cwd;r.projectName!==void 0&&(o=`${r.cwd}/${r.projectName}`,await Deno.mkdir(o,{recursive:!0}));let a={...r.variables};r.projectName!==void 0&&a.project_name===void 0&&(a.project_name=r.projectName);let f=`https://raw.githubusercontent.com/${t.owner}/${t.repo}/${t.ref}`,i=await $(s,{cwd:o,registryUrl:f,force:r.force,skipExisting:r.skipExisting,dryRun:r.dryRun,verbose:r.verbose,variables:a}),u=await x(o),m=E(s,u),I=r.dryRun?"Would write":"Cloned";n.out.writeln(R(`\u2713 ${I} ${i.written.length} file(s) from ${s.name}`));for(let l of i.written)n.out.writeln(` \u2192 ${l}`);if(i.postInstallRan.length>0){n.out.writeln(d(`
|
|
2
|
+
Post-install:`));for(let l of i.postInstallRan)n.out.writeln(d(` \u2713 ${l}`))}if(m.instructions.length>0){n.out.writeln(d(`
|
|
3
|
+
Dependencies:`));for(let l of m.instructions)n.out.writeln(d(` Run: ${l}`))}return p({recipe:s,result:i,depInfo:m,targetDir:o})}catch(t){let e=t instanceof Error?t.message:String(t);return c({_tag:"ApplyError",message:e})}});var W=async r=>{let n=y(r??[],{string:["recipe","name","var"],boolean:["force","dry-run","skip-existing","verbose"],collect:["var"],alias:{p:"name"}}),t=n._[0],e=v({renderer:b.ansi(),sink:k.stdout()});if(t===void 0)return e.writeln("Usage: eser kit clone <specifier> [options]"),e.writeln(),e.writeln("Specifier formats:"),e.writeln(" eser/ajan GitHub repo (default branch)"),e.writeln(" gh:eser/ajan#v1.0 GitHub repo at specific tag/branch"),e.writeln(),e.writeln("Options:"),e.writeln(" --recipe <path> Path to recipe.json (default: recipe.json)"),e.writeln(" --name, -p <dir> Target directory"),e.writeln(" --var key=value Template variable (repeatable)"),e.writeln(" --force Overwrite existing files"),e.writeln(" --dry-run Preview without writing"),await e.close(),p(void 0);let s=A(t);if(s===void 0)return e.writeln(w(`Invalid specifier: '${t}'. Use format: owner/repo or gh:owner/repo#ref`)),await e.close(),c({exitCode:1});let o={};for(let f of n.var){let[i,...u]=String(f).split("=");i!==void 0&&i!==""&&(o[i]=u.join("="))}e.writeln(h(`
|
|
4
|
+
Cloning from ${s.owner}/${s.repo}@${s.ref}...
|
|
5
|
+
`));let a=await P(S({specifier:s,recipePath:n.recipe,cwd:Deno.cwd(),projectName:n.name,dryRun:n["dry-run"]===!0,force:n.force===!0,skipExisting:n["skip-existing"]===!0,verbose:n.verbose===!0,variables:o}),{out:e});return await e.close(),g(a)?p(void 0):c({exitCode:1})};export{W as main};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import"./chunk-Q7QMINSQ.js";import{a as w,b as x}from"./chunk-6FMPNAZ3.js";import{a as h}from"./chunk-LRL56YFE.js";import"./chunk-X4ZCYXOT.js";import{f,h as g,k as p}from"./chunk-FGDJVQG3.js";import{c as n,d,e as u}from"./chunk-PLJNPQFC.js";import"./chunk-OLM5RTFK.js";import{b as o}from"./chunk-DOV5776P.js";import"./chunk-5O7V5P53.js";import"./chunk-DRQWYJMH.js";import"./chunk-WE7PSSAQ.js";import"./chunk-HPPFA3XU.js";import{a as l,b as m}from"./chunk-DQAEQEXD.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var b=`Output ONLY a conventional commit message. No explanation, no markdown, no code blocks, no bullet points.
|
|
2
|
+
|
|
3
|
+
Format: type(scope): description
|
|
4
|
+
Types: feat, fix, chore, docs, refactor, test, style, perf, ci, build
|
|
5
|
+
Max 72 characters. One line only. No body. No quotes. No backticks.
|
|
6
|
+
|
|
7
|
+
Example output:
|
|
8
|
+
feat(ai): add streaming support for Claude Code adapter`,v=async i=>{let e=f({renderer:p.ansi(),sink:g.stdout()});try{let t=await o`git diff --cached`.noThrow().text();if(t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0)return e.writeln(d("No changes detected (nothing staged or modified).")),await e.close(),l(void 0);let s=await y(t),r=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/`/g,"\\`").replace(/\$/g,"\\$").replace(/!/g,"\\!");return e.writeln(""),e.writeln(n("Plain Format:")),e.writeln("```"),e.writeln(s),e.writeln("```"),e.writeln(""),e.writeln(n("Shell Command:")),e.writeln("```"),e.writeln(`git commit -m "${r}"`),e.writeln("```"),e.writeln(""),e.writeln(n("Copy to Clipboard:")),e.writeln("```"),e.writeln(`echo "${r}" | pbcopy`),e.writeln("```"),await e.close(),l(void 0)}catch(t){let s=t instanceof Error?t.message:String(t);return e.writeln(u(`Error: ${s}`)),await e.close(),m({message:s,exitCode:1})}},y=async(i,e)=>{let s=await(await import("./mod-GZ6BSK2P.js")).defaultFactories(),r=new w({factories:s}),a=e;if(a===void 0)try{await o`which claude`.noThrow().code()===0&&(a="claude-code")}catch{}a===void 0&&(a="anthropic"),await r.addModel("default",{provider:a,model:"default"});let c=r.getDefault();if(c===null)throw new Error("No AI model available for commit message generation");let k=await c.generateText({system:b,messages:[h("user",`Generate a commit message for this diff:
|
|
9
|
+
|
|
10
|
+
${i}`)],maxTokens:256});return await r.close(),x(k).trim()},O={name:"ai-commitmsg",description:"Generate commit message from git diff using AI",run:async i=>{try{let e=i.provider,t=await o`git diff --cached`.noThrow().text();return t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0?{name:"ai-commitmsg",passed:!0,issues:[],mutations:[],stats:{skipped:1}}:{name:"ai-commitmsg",passed:!0,issues:[{message:`Suggested: ${await y(t,e)}`}],mutations:[],stats:{generated:1}}}catch(e){return{name:"ai-commitmsg",passed:!1,issues:[{message:e instanceof Error?e.message:String(e)}],mutations:[],stats:{errors:1}}}}};export{y as generateCommitMessage,v as main,O as workflowTool};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as P,b as v,c as x,d as O}from"./chunk-WUJUQPHI.js";import"./chunk-A2GDVOQP.js";import{d as h,e as D,f as g,g as f,i as F,j as w,k,n as S}from"./chunk-GLSCZGXA.js";import"./chunk-ZE5T64HQ.js";import{a as y}from"./chunk-4OIKB2P5.js";import{b as d,d as p}from"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var b={fs:!0,fsSync:!0,exec:!0,process:!0,env:!0,stdin:!0,stdout:!0,kv:!0},E=()=>{let n=t=>({isFile:t.isFile,isDirectory:t.isDirectory,isSymlink:t.isSymlink,size:t.size,mtime:t.mtime,atime:t.atime,birthtime:t.birthtime});return{async readFile(t,e){try{return await Deno.readFile(t,{signal:e?.signal})}catch(r){throw r instanceof Deno.errors.NotFound?new d(t):r}},async readTextFile(t,e){try{return await Deno.readTextFile(t,{signal:e?.signal})}catch(r){throw r instanceof Deno.errors.NotFound?new d(t):r}},async writeFile(t,e,r){await Deno.writeFile(t,e,{signal:r?.signal,mode:r?.mode,create:r?.create??!0,append:r?.append??!1})},async writeTextFile(t,e,r){await Deno.writeTextFile(t,e,{signal:r?.signal,mode:r?.mode,create:r?.create??!0,append:r?.append??!1})},async exists(t){try{return await Deno.stat(t),!0}catch(e){if(e instanceof Deno.errors.NotFound)return!1;throw e}},async stat(t){try{let e=await Deno.stat(t);return n(e)}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},async lstat(t){try{let e=await Deno.lstat(t);return n(e)}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},async mkdir(t,e){await Deno.mkdir(t,{recursive:e?.recursive??!1,mode:e?.mode})},async ensureDir(t){try{await Deno.mkdir(t,{recursive:!0})}catch(e){if(!(e instanceof Deno.errors.AlreadyExists))throw e}},async remove(t,e){try{await Deno.remove(t,{recursive:e?.recursive??!1})}catch(r){throw r instanceof Deno.errors.NotFound?new d(t):r}},async*readDir(t){try{for await(let e of Deno.readDir(t))yield{name:e.name,isFile:e.isFile,isDirectory:e.isDirectory,isSymlink:e.isSymlink}}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},async copyFile(t,e){await Deno.copyFile(t,e)},async rename(t,e){await Deno.rename(t,e)},async makeTempDir(t){return await Deno.makeTempDir({dir:t?.dir,prefix:t?.prefix,suffix:t?.suffix})},async realPath(t){try{return await Deno.realPath(t)}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},watch(t,e){let r=e?.recursive??!0,a=Deno.watchFs(t,{recursive:r}),s=c=>({kind:c.kind,paths:c.paths,flag:c.flag});return{close:()=>a.close(),[Symbol.asyncIterator]:async function*(){for await(let c of a)yield s(c)}}},async*walk(t,e){let r=e?.includeDirs??!0,a=e?.includeFiles??!0,s=e?.exts,c=e?.skip,o=async function*(l){for await(let i of Deno.readDir(l)){let m=w(l,i.name);if(!c?.some(u=>u.test(m))){if(i.isDirectory)r&&(yield{path:m,name:i.name,isFile:!1,isDirectory:!0,isSymlink:i.isSymlink}),yield*o(m);else if(i.isFile||i.isSymlink){if(!a||s&&!s.some(u=>i.name.endsWith(u.startsWith(".")?u:`.${u}`)))continue;yield{path:m,name:i.name,isFile:i.isFile,isDirectory:!1,isSymlink:i.isSymlink}}}}};yield*o(t)},async chmod(t,e){let{chmod:r}=await import("./unstable_chmod-WRDBWEC2.js");await r(t,e)}}},R=()=>({join:w,resolve:S,dirname:f,basename:h,extname:P,normalize:k,isAbsolute:F,relative:O,parse:x,format:v,sep:g,delimiter:D}),A=()=>({async spawn(n,t=[],e){let r=y(e),s=await new Deno.Command(n,{args:t,cwd:e?.cwd,env:e?.env,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,signal:e?.signal}).output();return{success:s.success,code:s.code,stdout:r.stdout==="piped"?s.stdout:new Uint8Array,stderr:r.stderr==="piped"?s.stderr:new Uint8Array}},async exec(n,t=[],e){let r=await this.spawn(n,t,e);if(!r.success){let a=new TextDecoder().decode(r.stderr);throw new p(n,r.code,a)}return new TextDecoder().decode(r.stdout).trim()},async execJson(n,t=[],e){let r=await this.exec(n,t,e);return JSON.parse(r)},spawnChild(n,t=[],e){let r=y(e),s=new Deno.Command(n,{args:t,cwd:e?.cwd,env:e?.env,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,signal:e?.signal}).spawn(),c=(o,l)=>l!=="piped"||!o?Promise.resolve(new Uint8Array):new Response(o).arrayBuffer().then(i=>new Uint8Array(i));return{pid:s.pid,stdin:r.stdin==="piped"?s.stdin:null,stdout:r.stdout==="piped"?s.stdout:null,stderr:r.stderr==="piped"?s.stderr:null,status:s.status.then(o=>({success:o.success,code:o.code,signal:o.signal??void 0})),output:async()=>{let o=r.stdout==="piped"?s.stdout:null,l=r.stderr==="piped"?s.stderr:null,[i,m,u]=await Promise.all([s.status,c(o,r.stdout),c(l,r.stderr)]);return{success:i.success,code:i.code,stdout:m,stderr:u}},kill:o=>{s.kill(o)}}}}),T=()=>({get(n){return Deno.env.get(n)},set(n,t){Deno.env.set(n,t)},delete(n){Deno.env.delete(n)},has(n){return Deno.env.get(n)!==void 0},toObject(){return Deno.env.toObject()}}),I=()=>({exit(n){Deno.exit(n)},setExitCode(n){Deno.exitCode=n},cwd(){return Deno.cwd()},chdir(n){Deno.chdir(n)},hostname(){return Deno.hostname()},execPath(){return Deno.execPath()},args:Deno.args,pid:Deno.pid,stdin:Deno.stdin.readable,stdout:Deno.stdout.writable,stderr:Deno.stderr.writable}),U=()=>{let n=E(),t=R(),e=A(),r=T(),a=I();return{name:"deno",version:Deno.version.deno,capabilities:b,fs:n,path:t,exec:e,env:r,process:a}};export{b as DENO_CAPABILITIES,U as createDenoRuntime};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{f as a,h as l,k as i}from"./chunk-FGDJVQG3.js";import{j as n}from"./chunk-PLJNPQFC.js";import"./chunk-ZOZYBQX2.js";import{a as t}from"./chunk-WE7PSSAQ.js";import"./chunk-HPPFA3XU.js";import{a as o}from"./chunk-DQAEQEXD.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var h=["trace","debug","info","warn","error","fatal"],k=async m=>{let{flags:e}=t(m??[],[{name:"port",short:"p",type:"number",default:8e3,description:"Server port"},{name:"no-hmr",type:"boolean",description:"Disable HMR"},{name:"log-level",type:"string",default:"info",description:"Log level"},{name:"open",short:"o",type:"boolean",description:"Open browser"}]),r=a({renderer:i.ansi(),sink:l.stdout()});r.writeln(n(`
|
|
2
|
+
\u26A1 Starting development server...
|
|
3
|
+
`));let p=e.port,s=e["log-level"]??"info",c=!e["no-hmr"],g=e.open??!1,d=h.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:u},{reactRenderer:L,reactHtmlShellBuilder:f},{reactPlugin:v},{createTailwindPlugin:b}]=await Promise.all([import("./main-WVXCURBF.js"),import("./mod-MKMQWZ6G.js"),import("./mod-CI56JMO4.js"),import("./mod-JTBNNSZZ.js")]);return await r.close(),await u({mode:"dev",port:p,logLevel:d,hmr:c,open:g,renderer:L,htmlShell:f,frameworkPlugin:v,cssPlugin:b({globalCssPath:"src/app/styles/global.css"})}),o(void 0)};export{k as main};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-Y6DLCHJN.js";import"./chunk-DOV5776P.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";export{a as DEFAULT_EXCLUDES,g as applyMutations,e as isBinaryBytes,d as loadBytes,c as loadContent,f as matchesAnyPattern,b as walkSourceFiles,h as writeMutations};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as h,d as j}from"./chunk-FKF2SWQM.js";import{a as M,c as g,e as P}from"./chunk-DXB73IDG.js";var m=g((v,d)=>{if(!globalThis.DOMException)try{let{MessageChannel:e}=M("worker_threads"),t=new e().port1,r=new ArrayBuffer;t.postMessage(r,[r,r])}catch(e){e.constructor.name==="DOMException"&&(globalThis.DOMException=e.constructor)}d.exports=globalThis.DOMException});var b=P(m(),1);import{statSync as S,createReadStream as T,promises as w}from"fs";import{basename as _}from"path";var E=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase();function F(e){if(E(e)!=="object")return!1;let t=Object.getPrototypeOf(e);return t==null?!0:(t.constructor&&t.constructor.toString())===Object.toString()}var p=F;var u=function(e,t,r,o,i){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},a=function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},s,c,x="The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.",f=class e{constructor(t){s.set(this,void 0),c.set(this,void 0),u(this,s,t.path,"f"),u(this,c,t.start||0,"f"),this.name=_(a(this,s,"f")),this.size=t.size,this.lastModified=t.lastModified}slice(t,r){return new e({path:a(this,s,"f"),lastModified:this.lastModified,size:r-t,start:t})}async*stream(){let{mtimeMs:t}=await w.stat(a(this,s,"f"));if(t>this.lastModified)throw new b.default(x,"NotReadableError");this.size&&(yield*T(a(this,s,"f"),{start:a(this,c,"f"),end:a(this,c,"f")+this.size-1}))}get[(s=new WeakMap,c=new WeakMap,Symbol.toStringTag)](){return"File"}};function y(e,{mtimeMs:t,size:r},o,i={}){let n;p(o)?[i,n]=[o,void 0]:n=o;let l=new f({path:e,size:r,lastModified:t});return n||(n=l.name),new h([l],n,{...i,lastModified:l.lastModified})}function G(e,t,r={}){let o=S(e);return y(e,o,t,r)}async function A(e,t,r){let o=await w.stat(e);return y(e,o,t,r)}export{A as fileFromPath,G as fileFromPathSync,j as isFile};
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
node-domexception/index.js:
|
|
5
|
+
(*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
|
6
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-NIX3WX3O.js";import"./chunk-PLRSDG6G.js";import"./chunk-LRL56YFE.js";import"./chunk-OLM5RTFK.js";import"./chunk-DXB73IDG.js";export{a as GeminiModel,b as geminiFactory};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as l}from"./chunk-JQHMDTPL.js";import"./chunk-2TRQKCFC.js";import"./chunk-ZF2XYULB.js";import"./chunk-5UGVJVIQ.js";import"./chunk-4S7QYPS6.js";import"./chunk-FGDJVQG3.js";import"./chunk-USCAYIWL.js";import{b as o,e as r,h as i}from"./chunk-PLJNPQFC.js";import{g as t}from"./chunk-DQAEQEXD.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var c=l(),m=()=>{c.writeln(i("\u2139"),o(` eser codebase gh \u2014 GitHub operations
|
|
2
|
+
`)),console.log("Subcommands:"),console.log(" contributors Update contributor list in README.md"),console.log(" release-notes Sync CHANGELOG to GitHub Releases"),console.log(" release-tag Create and push release git tags"),console.log(`
|
|
3
|
+
Run 'eser codebase gh <subcommand> --help' for details.`)},w=async u=>{let n=u??[],e=n[0],s=n.slice(1);if(e===void 0||e==="--help"||e==="-h")return m(),t.ok(void 0);switch(e){case"contributors":return await(await import("./gh-contributors-5SHGJHAQ.js")).main(s);case"release-notes":return await(await import("./release-notes-Z53AFCII.js")).main(s);case"release-tag":return await(await import("./release-tag-QRIKYVQB.js")).main(s);default:return c.writeln(r("\u2717"),o(` Unknown gh subcommand: ${e}
|
|
4
|
+
`)),m(),t.fail({exitCode:1})}};export{w as main};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import"./chunk-DDLQMSA7.js";import{a as A}from"./chunk-6U2VEZEM.js";import{a as R,b as $}from"./chunk-JQHMDTPL.js";import"./chunk-2TRQKCFC.js";import"./chunk-ZF2XYULB.js";import"./chunk-5UGVJVIQ.js";import"./chunk-4S7QYPS6.js";import{f as y}from"./chunk-NUSNMQPL.js";import"./chunk-FGDJVQG3.js";import"./chunk-USCAYIWL.js";import{b as c,e as C,f as g,h as x}from"./chunk-PLJNPQFC.js";import{c as l}from"./chunk-DOV5776P.js";import"./chunk-ZOZYBQX2.js";import"./chunk-DRQWYJMH.js";import"./chunk-WE7PSSAQ.js";import{a as w}from"./chunk-HPPFA3XU.js";import{g as a}from"./chunk-DQAEQEXD.js";import"./chunk-WUJUQPHI.js";import"./chunk-A2GDVOQP.js";import{n as b}from"./chunk-GLSCZGXA.js";import"./chunk-ZE5T64HQ.js";import{u as m}from"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var d=R(),p="<!-- CONTRIBUTORS:START -->",u="<!-- CONTRIBUTORS:END -->",O=async()=>{let t=await l.exec`gh repo view --json owner,name`.text(),e=JSON.parse(t);return{owner:e.owner.login,name:e.name}},U=async(t,e)=>{let n=await l.exec`gh api repos/${t}/${e}/contributors --paginate`.text();return JSON.parse(n).filter(o=>!o.login.includes("[bot]"))},M=(t,e=8)=>{if(t.length===0)return`${p}
|
|
2
|
+
${u}`;let n=[];for(let r=0;r<t.length;r+=e){let i=t.slice(r,r+e).map(s=>` <td align="center"><a href="${s.html_url}"><img src="${s.avatar_url}?s=80" width="80" /><br /><sub>${s.login}</sub></a></td>`);n.push(` <tr>
|
|
3
|
+
${i.join(`
|
|
4
|
+
`)}
|
|
5
|
+
</tr>`)}return`${p}
|
|
6
|
+
<table>
|
|
7
|
+
${n.join(`
|
|
8
|
+
`)}
|
|
9
|
+
</table>
|
|
10
|
+
${u}`},T=(t,e)=>{let n=t.indexOf(p),r=t.indexOf(u);if(n===-1||r===-1)throw new Error(`Could not find contributor markers in README. Add '${p}' and '${u}' markers to the file.`);let o=t.slice(0,n),i=t.slice(r+u.length),s=`${o}${e}${i}`;return{content:s,changed:s!==t}},k=async(t={})=>{let{readmePath:e="README.md",columnsPerRow:n=8,commit:r=!1}=t,o=b(e),i=await O(),s=await U(i.owner,i.name),E=M(s,n),P=await m.current.fs.readTextFile(o),{content:v,changed:h}=T(P,E),f=!1;return h&&(await m.current.fs.writeTextFile(o,v),r&&(await l.exec`git add ${o}`.spawn(),await l.exec`git -c user.name=${"github-actions[bot]"} -c user.email=${"github-actions[bot]@users.noreply.github.com"} commit -m ${"docs: update contributors list"}`.spawn(),await l.exec`git push`.spawn(),f=!0)),{contributorCount:s.length,readmePath:o,updated:h,committed:f}},N=t=>y.fromPromise(()=>k(t)),S=t=>{let e=t.flags.columns,n=e!==void 0?Number(e):void 0;return a.ok({readmePath:t.flags.readme??void 0,columnsPerRow:n,commit:t.flags.commit===!0})},I=t=>{if(a.isFail(t)){let n=t.error,r=n instanceof Error?n.message:n.message??String(n);return d.writeln(C("\u2717"),c(" "+r)),a.fail({exitCode:1})}let{value:e}=t;return e.updated?e.committed?d.writeln(g("\u2713"),c(` Updated ${e.contributorCount} contributors and committed changes.`)):d.writeln(g("\u2713"),c(` Updated ${e.contributorCount} contributors in ${e.readmePath}.`)):d.writeln(x("\u2139"),c(` No changes \u2014 ${e.contributorCount} contributors already up to date.`)),a.ok(void 0)},D=A.createTrigger({handler:N,adaptInput:S,adaptOutput:I}),G=async t=>{let e=w(t??[],{string:["columns","readme"],boolean:["commit"],alias:{h:"help"}});if(e.help)return console.log(`eser codebase gh contributors \u2014 Update contributor list
|
|
11
|
+
`),console.log("Options:"),console.log(" --columns <n> Number of columns per row (default: 8)"),console.log(" --readme <path> Path to README.md (default: README.md)"),console.log(" --commit Auto-commit and push changes"),console.log(" --help, -h Show this help"),a.ok(void 0);let n=$("gh-contributors",e);return await D(n)};export{U as fetchContributors,M as generateContributorMarkdown,O as getRepoInfo,D as handleCli,G as main,T as replaceContributorSection,k as updateContributors,N as updateContributorsHandler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d}from"./chunk-BK2BDHKB.js";import{a as y,b as $,e as v,g as k,h as P,j,k as b}from"./chunk-BKVQBSFV.js";import"./chunk-Q7QMINSQ.js";import"./chunk-6FMPNAZ3.js";import"./chunk-LRL56YFE.js";import{a as h}from"./chunk-X4ZCYXOT.js";import{f as m,h as w,k as g}from"./chunk-FGDJVQG3.js";import{c as l,d as a,f as o,g as f}from"./chunk-PLJNPQFC.js";import"./chunk-OLM5RTFK.js";import"./chunk-DOV5776P.js";import"./chunk-5O7V5P53.js";import"./chunk-DRQWYJMH.js";import"./chunk-WE7PSSAQ.js";import"./chunk-HPPFA3XU.js";import{a as p}from"./chunk-DQAEQEXD.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var D=h;var i=async t=>{try{return await Deno.stat(t),!0}catch{return!1}},C=async(t,e)=>{try{let n=await Deno.readTextFile(t);return JSON.parse(n)[e]??null}catch{return null}},A=async t=>{let e=[];return(await i(`${t}/package.json`)||await i(`${t}/deno.json`))&&e.push("typescript"),await i(`${t}/go.mod`)&&e.push("go"),await i(`${t}/Cargo.toml`)&&e.push("rust"),(await i(`${t}/pyproject.toml`)||await i(`${t}/setup.py`))&&e.push("python"),e},T=async t=>{let e=[],n=await C(`${t}/package.json`,"dependencies");return n!==null&&("react"in n&&e.push("react"),"vue"in n&&e.push("vue"),"svelte"in n&&e.push("svelte"),"next"in n&&e.push("nextjs"),"express"in n&&e.push("express"),"hono"in n&&e.push("hono")),e},z=async t=>{let e=[];return await i(`${t}/.github/workflows`)&&e.push("github-actions"),await i(`${t}/.gitlab-ci.yml`)&&e.push("gitlab-ci"),await i(`${t}/Jenkinsfile`)&&e.push("jenkins"),await i(`${t}/.circleci`)&&e.push("circleci"),e},B=async t=>{if(await i(`${t}/deno.json`))return"deno";let e=await C(`${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},x=async t=>{let[e,n,r,c]=await Promise.all([A(t),T(t),z(t),B(t)]);return{languages:e,frameworks:n,ci:r,testRunner:c}};var H=async t=>{let e=m({renderer:g.ansi(),sink:w.stdout()}),n=Deno.cwd();if(await b(n))return e.writeln(f("noskills is already initialized in this project.")),e.writeln(a("Run `noskills sync` to regenerate tool files.")),await e.close(),p(void 0);e.writeln(l("noskills init")),e.writeln(""),e.writeln(a("Scanning project..."));let r=await x(n);for(let s of r.languages)e.writeln(" ",o("\u2714"),` ${s}`);for(let s of r.frameworks)e.writeln(" ",o("\u2714"),` ${s}`);for(let s of r.ci)e.writeln(" ",o("\u2714"),` ${s}`);r.testRunner!==null&&e.writeln(" ",o("\u2714"),` test runner: ${r.testRunner}`),e.writeln(""),e.writeln(a("Detecting AI providers..."));let c=await D();for(let s of c)s.available?e.writeln(" ",o("\u25CF")," ",l(`${s.name} (${s.alias})`),a(` ${s.detail}`)):e.writeln(" ",a("\u25CB")," ",a(`${s.name} (${s.alias}) ${s.detail}`));let u=c.filter(s=>s.available).map(s=>s.name);e.writeln(""),e.writeln(a("Initializing...")),await j(n),e.writeln(" Created .nos/");for(let s of d)await P(n,s);e.writeln(` Bootstrapped ${d.length} concerns into .nos/concerns/`);let I=$([],u,r);await k(n,I),e.writeln(" Created .nos/config.json");let N=y();await v(n,N),e.writeln(" Created .nos/.state/state.json"),e.writeln("");let R=u.length;return e.writeln(o("Done."),` ${R} AI provider(s) detected.`),e.writeln("Start a spec with: ",l('noskills spec new "..."')),await e.close(),p(void 0)};export{H as main};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{f as E,h as P,k as R}from"./chunk-FGDJVQG3.js";import{b as t,c as T,d as s,e as o,f as b,j as x}from"./chunk-PLJNPQFC.js";import"./chunk-ZOZYBQX2.js";import{a as A}from"./chunk-WE7PSSAQ.js";import"./chunk-HPPFA3XU.js";import{a as C,b as i,f as $}from"./chunk-DQAEQEXD.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var F=["minimal","blog","dashboard","docs"],U=async S=>{let{positional:O,flags:m}=A(S??[],[{name:"template",short:"t",type:"string",default:"minimal",description:"Project template"},{name:"force",short:"f",type:"boolean",description:"Overwrite"},{name:"no-git",type:"boolean",description:"Skip git"},{name:"no-install",type:"boolean",description:"Skip install"}]),r=O[0]??"my-laroux-app",l=m.template,v=m.force,D=m["no-git"],n=R.ansi(),e=E({renderer:n,sink:P.stdout()});if(!F.includes(l))return await e.close(),i({message:`${n.render([o(`
|
|
2
|
+
Error: Invalid template "${l}"`)])}
|
|
3
|
+
Available templates: ${F.join(", ")}`,exitCode:1});e.writeln(x(`
|
|
4
|
+
\u2728 Creating new laroux.js project in ./${r}
|
|
5
|
+
`)),e.writeln(s(` Template: ${l}`));let c="eser",p=`laroux-template-${l}`,j="main",d=`${Deno.cwd()}/${r}`;try{await Deno.mkdir(d,{recursive:!0})}catch{return await e.close(),i({message:n.render([o(`
|
|
6
|
+
Could not create directory: ${d}`)]),exitCode:1})}e.writeln(s(` Fetching from gh:${c}/${p}...
|
|
7
|
+
`));try{let a=await import("./registry-fetcher-ZJ76EHBA.js"),u=await import("./recipe-applier-F2REROYS.js"),f=await $(()=>a.fetchRecipeFromRepo(c,p,j,"recipe.json"),()=>{});if(f._tag==="Ok"&&f.value!==void 0){let g=`https://raw.githubusercontent.com/${c}/${p}/${j}`,w=await u.applyRecipe(f.value,{cwd:d,registryUrl:g,force:v,variables:{project_name:r}});e.writeln(b(`
|
|
8
|
+
\u{1F389} Project created successfully!`)),e.writeln(s(` ${w.written.length} files written`))}else{let g=await import("./mod-STKIZYZ3.js"),w=`gh:${c}/${p}`,y=await $(()=>g.scaffold({specifier:w,targetDir:r,force:v,skipPostInstall:D,interactive:!0}),h=>({message:h.message}));if(y._tag==="Fail")return await e.close(),i({message:n.render([o(`
|
|
9
|
+
Scaffolding failed: ${y.error.message}`)]),exitCode:1});let k=y.value;if(e.writeln(b(`
|
|
10
|
+
\u{1F389} Project created successfully!`)),Object.keys(k.variables).length>0){e.writeln(t(`
|
|
11
|
+
Variables applied:`));for(let[h,N]of Object.entries(k.variables))e.writeln(t(" "),s(h),t(`: ${N}`))}}}catch(a){let u=a instanceof Error?a.message:String(a);return await e.close(),i({message:n.render([o(`
|
|
12
|
+
Failed: ${u}`)]),exitCode:1})}return e.writeln(),e.writeln(T("Next steps:")),e.writeln(),e.writeln(t(` cd ${r}`)),e.writeln(t(" laroux dev")),e.writeln(),e.writeln(t("Then open "),x("http://localhost:8000"),t(" in your browser.")),e.writeln(),e.writeln(s("Learn more at https://laroux.now/")),e.writeln(),await e.close(),C(void 0)};export{U as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as M}from"./chunk-7GS5KPVF.js";import"./chunk-2TRQKCFC.js";import"./chunk-ZF2XYULB.js";import"./chunk-5UGVJVIQ.js";import"./chunk-4S7QYPS6.js";import"./chunk-GXPLME3K.js";import{f as C,h as P,k as H}from"./chunk-FGDJVQG3.js";import"./chunk-USCAYIWL.js";import{b as A,c as O,d as l,e as k,f as w,g as y,h as E}from"./chunk-PLJNPQFC.js";import{a as b}from"./chunk-HPPFA3XU.js";import{g as r}from"./chunk-DQAEQEXD.js";import{u as t}from"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var R={precommit:{hookName:"pre-commit",args:""},commitmsg:{hookName:"commit-msg",args:'-- "$1"'},prepush:{hookName:"pre-push",args:""}},N="# @eser managed hook",I=async(i,n)=>{let e=await t.getCliCommand({command:"eser",devCommand:"deno task cli",npmPackage:"eser",jsrPackage:"@eser/cli"}),s=n.length>0?` ${n}`:"",o=`${e} workflows run -e ${i}${s}`;return["#!/bin/sh",`${N} \u2014 generated by \`eser codebase install\``,"# Do not edit. Re-run `eser codebase install` to update.","",o,""].join(`
|
|
2
|
+
`)},S=async()=>{try{let s=(await t.current.exec.exec("git",["rev-parse","--git-dir"])).trim();if(s.length>0)return s}catch{}let i=t.current.process.cwd(),n=t.current.path.join(i,".git");try{if((await t.current.fs.stat(n)).isDirectory)return n}catch{}return null},G=i=>{let n=i.workflows;if(!Array.isArray(n))return[];let e=new Set;for(let s of n)if(Array.isArray(s.on))for(let o of s.on)typeof o=="string"&&e.add(o);return[...e]},T=H.ansi(),U=async i=>{let n=b(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 .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 e=C({renderer:T,sink:P.stdout()}),s=n.force,o=n["dry-run"],d=await S();if(d===null)return e.writeln(k("Error: not inside a git repository")),await e.close(),r.fail({exitCode:1});let m=t.current.path.join(d,"hooks"),g=t.current.process.cwd(),a=await M(g);if(a===null)return e.writeln(k("Error: no .manifest.yml found in current directory")),await e.close(),r.fail({exitCode:1});let c=G(a);if(c.length===0)return e.writeln(y("No workflow events found \u2014 nothing to install.")),await e.close(),r.ok(void 0);o||await t.current.fs.ensureDir(m);let f=0,v=0,u=0;for(let D of c){let F=R[D];if(F===void 0){e.writeln(l(` skip ${D} (unknown event, no hook mapping)`));continue}let{hookName:p,args:K}=F,j=t.current.path.join(m,p),_=await I(D,K),x=!1,$=!1;try{let q=await t.current.fs.readTextFile(j);x=!0,$=q.includes(N)}catch{}if(o){x?$?e.writeln(E(` would update ${p} (managed)`)):s?e.writeln(y(` would overwrite ${p} (--force)`)):e.writeln(y(` would skip ${p} (user hook; use --force to overwrite)`)):e.writeln(E(` would create ${p}`));continue}if(x&&!$&&!s){e.writeln(y(` skip ${p} \u2014 user hook exists (use --force to overwrite)`)),v++;continue}await t.current.fs.writeTextFile(j,_);try{await t.current.fs.chmod(j,493)}catch{}x&&$?(e.writeln(w(` updated ${p}`)),u++):(e.writeln(w(` installed ${p}`)),f++)}e.writeln();let h=[];return f>0&&h.push(`${f} installed`),u>0&&h.push(`${u} updated`),v>0&&h.push(`${v} skipped`),o?e.writeln(l("(dry run \u2014 no changes made)")):h.length>0?e.writeln(w(`Done: ${h.join(", ")}.`)):e.writeln(l("Nothing to do.")),await e.close(),r.ok(void 0)},W=async i=>{if(b(i??[],{boolean:["help"],alias:{h:"help"}}).help)return console.log("eser codebase uninstall \u2014 Remove managed git hooks"),r.ok(void 0);let e=C({renderer:T,sink:P.stdout()}),s=await S();if(s===null)return e.writeln(k("Error: not inside a git repository")),await e.close(),r.fail({exitCode:1});let o=t.current.path.join(s,"hooks"),d=0,m=Object.values(R).map(a=>a.hookName),g=[...new Set(m)];for(let a of g){let c=t.current.path.join(o,a);try{(await t.current.fs.readTextFile(c)).includes(N)&&(await t.current.fs.remove(c),e.writeln(w(` removed ${a}`)),d++)}catch{}}return e.writeln(),d>0?e.writeln(w(`Done: ${d} hook(s) removed.`)):e.writeln(l("No managed hooks found.")),await e.close(),r.ok(void 0)},X=async i=>{if(b(i??[],{boolean:["help"],alias:{h:"help"}}).help)return console.log("eser codebase status \u2014 Show git hook installation status"),r.ok(void 0);let e=C({renderer:T,sink:P.stdout()}),s=await S();if(s===null)return e.writeln(k("Error: not inside a git repository")),await e.close(),r.fail({exitCode:1});let o=t.current.path.join(s,"hooks"),d=t.current.process.cwd(),m=await M(d);if(m===null)return e.writeln(k("Error: no .manifest.yml found in current directory")),await e.close(),r.fail({exitCode:1});let g=G(m);if(g.length===0)return e.writeln(l("No workflow events found in manifest.")),await e.close(),r.ok(void 0);e.writeln(O("Git hook status:")),e.writeln();for(let a of g){let c=R[a];if(c===void 0){e.writeln(A(" "),l(a.padEnd(14)),A(" "),l("(no hook mapping)"));continue}let{hookName:f}=c,v=t.current.path.join(o,f),u;try{(await t.current.fs.readTextFile(v)).includes(N)?u=w("managed (@eser)"):u=y("user hook")}catch{u=l("not installed")}e.writeln(A(` ${f.padEnd(14)} `),u)}return e.writeln(),await e.close(),r.ok(void 0)};export{U as main,X as statusMain,W as uninstallMain};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-5C7ZQN6X.js";import"./chunk-7QNRH7OR.js";import"./chunk-OLM5RTFK.js";import"./chunk-DOV5776P.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";export{a as KiroModel,b as kiroFactory};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as h,b as u,c as k}from"./chunk-2R4MK2KR.js";import"./chunk-7GS5KPVF.js";import"./chunk-GXPLME3K.js";import{f as m,h as c,k as w}from"./chunk-FGDJVQG3.js";import{b as t,c as a,d as e}from"./chunk-PLJNPQFC.js";import"./chunk-DOV5776P.js";import{a as g}from"./chunk-HPPFA3XU.js";import{a as i}from"./chunk-DQAEQEXD.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.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
|
|
2
|
+
`),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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as R,d as h}from"./chunk-NUSNMQPL.js";import{f as S}from"./chunk-SCULX2ND.js";import{f as m,h as f,k as y}from"./chunk-FGDJVQG3.js";import{c as p,d as l,j as d}from"./chunk-PLJNPQFC.js";import{a as u}from"./chunk-HPPFA3XU.js";import{a as n,b as o,c as g}from"./chunk-DQAEQEXD.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as p}from"./chunk-X4ZCYXOT.js";import{f as o,h as m,k as d}from"./chunk-FGDJVQG3.js";import{c as t,d as a,f as l,l as n}from"./chunk-PLJNPQFC.js";import"./chunk-DOV5776P.js";import{a as i}from"./chunk-DQAEQEXD.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-M5TBBQQC.js";import"./chunk-Y6DZEK4W.js";import"./chunk-OBIEQJDE.js";import"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-A2GDVOQP.js";import"./chunk-ZE5T64HQ.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";export{a as loadConfig};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as K,b as j,c as M,d as F,f as N}from"./chunk-TMFPDVYN.js";import{a as Q}from"./chunk-M5TBBQQC.js";import"./chunk-R6F4EK2B.js";import"./chunk-7M3ONEMO.js";import"./chunk-RGUC6KAZ.js";import"./chunk-ATLUGTI7.js";import"./chunk-Y6DZEK4W.js";import"./chunk-34GCQZ3Z.js";import"./chunk-3APERFKY.js";import{a as X}from"./chunk-ZF2XYULB.js";import{b as Y}from"./chunk-5UGVJVIQ.js";import"./chunk-GXPLME3K.js";import{d as G,e as m,g as V}from"./chunk-OBIEQJDE.js";import{a as v}from"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-DOV5776P.js";import"./chunk-A2GDVOQP.js";import"./chunk-GLSCZGXA.js";import"./chunk-ZE5T64HQ.js";import{g as W,t as s}from"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var B=m.getLogger(["laroux-bundler","prebuilt-bundler"]),w=class{config;cachedManifest=null;constructor(e){this.config=e}async getBundle(){B.debug("\u{1F4E6} Loading prebuilt bundle from disk...");let e=s.path.resolve(this.config.distDir,"client","manifest.json"),t=await s.fs.readTextFile(e),r=JSON.parse(t),o=s.path.resolve(this.config.distDir,"client","module-map.json"),i={};try{let p=await s.fs.readTextFile(o);i=JSON.parse(p),B.debug(`\u2705 Loaded module map with ${Object.keys(i).length} entries`)}catch{B.warn("\u26A0\uFE0F Module map not found, SSR may fail for client components")}this.cachedManifest=r;let l=r.entrypoint?`/${r.entrypoint}`:"/client.js";return B.debug(`\u2705 Loaded manifest with entrypoint: ${l}`),{clientCode:null,moduleMap:i,chunkManifest:r,entrypoint:l}}async reload(){this.cachedManifest=null,await this.getBundle()}};var A=m.getLogger(["laroux-bundler","runtime-bundler"]),_=class{clientComponents=new Map;moduleMap=null;bundleCode=null;chunkManifest=null;lastScan=0;scanInterval=1e3;config;async getOrCreateBundle(){let e=Date.now();return(e-this.lastScan>this.scanInterval||!this.bundleCode)&&(await this.rebuild(),this.lastScan=e),{clientCode:this.bundleCode,moduleMap:this.moduleMap,clientComponents:this.clientComponents,chunkManifest:this.chunkManifest}}constructor(e){this.config=e}async rebuild(){let{plugin:e}=this.config,t=e.analyzeClientComponents?await e.analyzeClientComponents(this.config.srcDir,this.config.projectRoot):[];this.clientComponents.clear();for(let o of t)this.clientComponents.set(o.filePath,o);this.moduleMap=e.createModuleMap?await e.createModuleMap(t):{};let r=await this.bundleClientCode(t);this.bundleCode=r.code,this.chunkManifest=r.manifest}async bundleClientCode(e){let{plugin:t}=this.config,r=s.process.cwd(),o=await s.fs.makeTempDir({prefix:"rsc-runtime-",dir:r});try{if(!t.createClientEntry)throw new Error("Framework plugin does not provide createClientEntry");let i=await t.createClientEntry(e,r,o),l=K("deno-bundler",{entryName:"client"}),p={client:i};for(let g of e)p[g.relativePath]=g.filePath;let u={entrypoints:p,outputDir:o,format:"esm",platform:"browser",codeSplitting:j.codeSplitting,minify:j.minify,sourcemap:!1},a=await l.bundle(u);if(!a.success){let g=a.errors?.map(c=>c.message).join(", ")??"Unknown error";throw new Error(`Bundle failed: ${g}`)}let d=a.outputs.get("client.js");if(!d)throw new Error("Bundle output 'client.js' not found in bundle result");let f=new TextDecoder().decode(d.code),h={version:"1.0",buildId:"runtime",timestamp:Date.now(),logLevel:"debug",entrypoint:"__runtime_bundle.js",hmrEnabled:!0,chunks:{},files:{}};for(let g of e){let c=g.relativePath;h.chunks[c]={main:"__runtime_bundle",deps:[],size:0}}return{code:f,manifest:h}}catch(i){let l=i instanceof Error?i.message:String(i),p=i instanceof Error?i.stack:null;A.error("\u274C Runtime bundling failed:"),A.error(` Error: ${l}`),p!==null&&A.error(` Stack trace:
|
|
2
|
+
${p}`);let u=f=>f.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),a=`
|
|
3
|
+
console.error("Runtime bundling failed:", ${JSON.stringify(l)});
|
|
4
|
+
document.getElementById("root").innerHTML = '<div class="error"><h2>Bundle Error</h2><pre>${u(l)}</pre></div>';
|
|
5
|
+
`,d={version:"1.0",buildId:"runtime-error",timestamp:Date.now(),logLevel:"error",entrypoint:"__runtime_bundle.js",hmrEnabled:!1,chunks:{},files:{}};return{code:a,manifest:d}}finally{try{await s.fs.remove(o,{recursive:!0})}catch(i){A.debug("Temp directory cleanup failed",{error:i})}}}clear(){this.clientComponents.clear(),this.moduleMap=null,this.bundleCode=null,this.lastScan=0}};var D=class{cache;constructor(e){this.cache=new _(e)}async getBundle(){let e=await this.cache.getOrCreateBundle();return{clientCode:e.clientCode,moduleMap:e.moduleMap,chunkManifest:e.chunkManifest,entrypoint:"/__runtime_bundle.js"}}async getRuntimeBundle(){return await this.cache.getOrCreateBundle()}async rebuild(){await this.cache.rebuild()}clear(){this.cache.clear()}};var Z={name:"noop",renderPage:()=>Promise.resolve({html:""}),renderRSC:()=>Promise.resolve(new Response("")),generateBootstrapScript:()=>""};var ee={name:"noop",createShell:()=>"<!DOCTYPE html><html><head></head><body></body></html>",createStreamingStart:()=>"<!DOCTYPE html><html><head></head><body>",createStreamingEnd:()=>"</body></html>"};var b=m.getLogger(["laroux-server","hmr"]),$=class{clients=new Set;handleConnection(e){this.clients.add(e),b.debug(`HMR client connected (${this.clients.size} total)`),this.sendToClient(e,{type:"connected"}),e.addEventListener("close",()=>{this.clients.delete(e),b.debug(`HMR client disconnected (${this.clients.size} remaining)`)}),e.addEventListener("error",t=>{b.error("HMR WebSocket error:",{event:t}),this.clients.delete(e)})}notifyUpdate(e=Date.now(),t){let r={type:"update",timestamp:e,changedModules:t};b.debug(`Notifying ${this.clients.size} clients of update${t?` (${t.length} modules changed)`:""}`);for(let o of this.clients)this.sendToClient(o,r)}notifyError(e){let t={type:"error",message:e};b.warn(`Notifying clients of error: ${e}`);for(let r of this.clients)this.sendToClient(r,t)}sendToClient(e,t){if(e.readyState===WebSocket.OPEN)try{e.send(JSON.stringify(t))}catch(r){b.error("Failed to send HMR message:",{error:r})}}getClientCount(){return this.clients.size}close(){for(let e of this.clients)e.close();this.clients.clear()}};var L=m.getLogger(["laroux-server","api-handler"]);function ie(n){let e=new Set;return{pattern:n.replace(/\[\.\.\.(\w+)\]/g,(r,o)=>(e.add(o),`:${o}*`)).replace(/\[(\w+)\]/g,(r,o)=>`:${o}`),catchAllParams:e}}function se(n,e){let{pattern:t,catchAllParams:r}=ie(e),i=new URLPattern({pathname:t}).exec({pathname:n});if(!i)return null;let l={},p=i.pathname.groups;for(let[u,a]of Object.entries(p))r.has(u)?l[u]=a?a.split("/").filter(Boolean):[]:l[u]=a??"";return l}var H=class{routes=[];moduleCache=new Map;registryDir="";async loadRoutes(e){try{let t=`file://${e}/server/api-routes.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.routes=r.apiRoutes||[],L.debug(`Loaded ${this.routes.length} API route(s)`)}catch{this.routes=[],L.debug("No API routes registry found")}}async handleRequest(e,t){let r=new URL(e.url),o=e.method;for(let i of this.routes){let l=se(t,i.path);if(l!==null){L.debug(`API route matched: ${o} ${t} -> ${i.path}`);try{let p=s.path.resolve(this.registryDir,i.modulePath),u=this.moduleCache.get(p);u||(u=await import(`file://${p}`),this.moduleCache.set(p,u));let a=u[o];return a?await a({request:e,params:l,searchParams:r.searchParams}):(L.debug(`Method ${o} not allowed for ${i.path}`),new Response("Method Not Allowed",{status:405,headers:{Allow:this.getAllowedMethods(u).join(", ")}}))}catch(p){return L.error(`API route error: ${i.path}`,{error:p}),new Response(JSON.stringify({error:"Internal Server Error"}),{status:500,headers:{"Content-Type":"application/json"}})}}}return null}getAllowedMethods(e){let t=[];return e.GET&&t.push("GET"),e.POST&&t.push("POST"),e.PUT&&t.push("PUT"),e.DELETE&&t.push("DELETE"),e.PATCH&&t.push("PATCH"),e.HEAD&&t.push("HEAD"),e.OPTIONS&&t.push("OPTIONS"),t}clearCache(){this.moduleCache.clear()}};var P=m.getLogger(["laroux-server","proxy-handler"]),T=class{proxies=[];moduleCache=new Map;registryDir="";async loadProxies(e){try{let t=`file://${e}/server/proxy-registry.ts`;this.registryDir=s.path.resolve(e,"server");let r=await import(t);this.proxies=r.proxyRegistry||[],P.debug(`Loaded ${this.proxies.length} proxy definition(s)`)}catch{this.proxies=[],P.debug("No proxy registry found")}}async runProxies(e,t){let r=t;for(let o of this.proxies)if(this.matchesPrefix(r,o.pathPrefix)){P.debug(`Running proxy: ${o.pathPrefix} for ${r}`);try{let i=s.path.resolve(this.registryDir,o.modulePath),l=this.moduleCache.get(i);l||(l=await import(`file://${i}`),this.moduleCache.set(i,l));let p=l.default;if(typeof p!="function"){P.warn(`Proxy ${o.modulePath} does not export a default function`);continue}let u=await p({request:e,pathname:r,params:{}});if(u.type==="response")return P.debug(`Proxy ${o.pathPrefix} returned response`),{result:u,finalPathname:r};if(u.type==="redirect")return P.debug(`Proxy ${o.pathPrefix} redirecting to ${u.url}`),{result:u,finalPathname:r};u.type==="rewrite"&&(P.debug(`Proxy ${o.pathPrefix} rewriting to ${u.pathname}`),r=u.pathname)}catch(i){return P.error(`Proxy error: ${o.pathPrefix}`,{error:i}),{result:{type:"response",response:new Response(JSON.stringify({error:"Proxy Error"}),{status:500,headers:{"Content-Type":"application/json"}})},finalPathname:r}}}return{result:{type:"next"},finalPathname:r}}matchesPrefix(e,t){return t==="/"?!0:e===t||e.startsWith(t+"/")}clearCache(){this.moduleCache.clear()}};function te(n,e){let t=X(n,e.path);if(t===null)return null;let r={};for(let[o,i]of Object.entries(t))Array.isArray(i)?r[o]=[...i]:typeof i=="string"&&(r[o]=i);return r}function U(n,e){for(let t of e){let r=te(n,t);if(r!==null)return{route:t,params:r}}return null}var le=["trace","debug","info","warn","error","fatal"];var oe="manifest.json",ue=n=>({trace:v.Debug,debug:v.Debug,info:v.Info,warn:v.Warning,error:v.Error,fatal:v.Critical})[n],R,E;async function pe(n){let e=ue(n),{output:t,renderers:r,sinks:o}=await import("./mod-PEAFMI6F.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-PXE4DB3V.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 @@
|
|
|
1
|
+
import{a,b,c}from"./chunk-7GS5KPVF.js";import"./chunk-GXPLME3K.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";export{a as MANIFEST_FILENAMES,c as getManifestPath,b as loadManifest};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as P}from"./chunk-OBIEQJDE.js";import"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import{t as a}from"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var h=P.getLogger(["laroux","image-optimizer"]),$=null;async function q(){return $===null&&($=await import("npm:sharp@^0.33.5")),$.default??$}var C={formats:["webp","original"],widths:[640,768,1024,1280,1920],quality:{webp:80,avif:75,jpeg:85,png:90},generateBlurPlaceholder:!0,placeholderWidth:10};async function S(t){let r=[],o=[".jpg",".jpeg",".png",".gif",".webp"];async function n(e){try{for await(let i of a.fs.readDir(e)){let s=a.path.resolve(e,i.name);if(i.isDirectory)await n(s);else if(i.isFile){let g=a.path.extname(i.name).toLowerCase();o.includes(g)&&r.push(s)}}}catch{}}return await n(t),r}async function B(t,r){return`data:image/webp;base64,${(await(await q())(t).resize(r,void 0,{fit:"inside"}).blur(5).webp({quality:20}).toBuffer()).toString("base64")}`}async function j(t,r,o,n={}){let e=await q(),i={...C,...n},s=e(t),g=await s.metadata();if(g.width===void 0||g.height===void 0)throw new Error(`Could not read image dimensions: ${t}`);let c=g.width,w=g.height,y=c/w,m=a.path.basename(t,a.path.extname(t)),f=`${o}/${m}`,u=[];for(let l of i.widths){if(l>c)continue;let v=Math.round(l/y);for(let b of i.formats){let z,d;if(b==="original"){let O=a.path.extname(t).toLowerCase();d=O.replace(".",""),z=a.path.resolve(r,`${m}-${l}w${O}`)}else d=b,z=a.path.resolve(r,`${m}-${l}w.${b}`);await a.fs.ensureDir(a.path.dirname(z));let p=s.clone().resize(l,v,{fit:"cover"});b==="webp"?p=p.webp({quality:i.quality.webp}):b==="avif"?p=p.avif({quality:i.quality.avif}):d==="jpg"||d==="jpeg"?p=p.jpeg({quality:i.quality.jpeg}):d==="png"&&(p=p.png({quality:i.quality.png}));let x=await p.toBuffer();await a.fs.writeFile(z,x),u.push({path:z,format:d,width:l,height:v,size:x.length})}}let I;return i.generateBlurPlaceholder&&(I=await B(t,i.placeholderWidth)),{originalPath:t,publicPath:f,originalWidth:c,originalHeight:w,variants:u,blurDataUrl:I,aspectRatio:y}}async function F(t,r,o="/images",n={}){h.info(`Scanning for images in ${t}...`);let e=await S(t);if(e.length===0)return h.debug("No images found to optimize"),{timestamp:Date.now(),images:{}};h.info(`Found ${e.length} image(s) to optimize`);let i={},s=0,g=0;for(let m of e)try{let f=await a.fs.stat(m);s+=f.size;let u=await j(m,r,o,n);i[m]=u;let I=u.variants.reduce((l,v)=>l+v.size,0);g+=I,h.debug(`Optimized: ${a.path.basename(m)} \u2192 ${u.variants.length} variants`)}catch(f){h.warn(`Failed to optimize ${m}: ${f instanceof Error?f.message:String(f)}`)}let c={timestamp:Date.now(),images:i},w=a.path.resolve(r,"image-manifest.json");await a.fs.ensureDir(a.path.dirname(w)),await a.fs.writeTextFile(w,JSON.stringify(c,null,2));let y=s>0?((1-g/s)*100).toFixed(1):0;return h.info(`Image optimization complete: ${e.length} images, ${y}% size reduction`),c}function V(t,r="webp"){return t.variants.filter(n=>n.format===r).sort((n,e)=>n.width-e.width).map(n=>`${n.path} ${n.width}w`).join(", ")}function M(t,r,o="webp"){let n=t.variants.filter(e=>e.format===o).sort((e,i)=>e.width-i.width);return n.find(e=>e.width>=r)??n.at(-1)}export{V as generateSrcset,M as getBestVariant,j as optimizeImage,F as optimizeImages,S as scanImages};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c as e,d as f,e as g,f as h,g as i,h as j,i as k}from"./chunk-OBIEQJDE.js";import{a as c,b as d}from"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-DXB73IDG.js";export{c as Severities,d as SeverityNames,b as category,f as config,e as context,j as filters,h as formatters,g as logger,i as sinks,k as tracer,a as types};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import{c as T,h as J}from"./chunk-R6F4EK2B.js";import{a as S}from"./chunk-RGUC6KAZ.js";import{b as B,c as W}from"./chunk-5UGVJVIQ.js";import{e as h}from"./chunk-OBIEQJDE.js";import"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-DOV5776P.js";import"./chunk-GLSCZGXA.js";import"./chunk-ZE5T64HQ.js";import{t as i}from"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var P=h.getLogger(["laroux-bundler","rsc-analyze"]);function Z(t){return{filePath:t.filePath,relativePath:t.relativePath,exportNames:[...t.exports]}}async function E(t,e,n){if(P.debug(`\u{1F50D} Analyzing client components in: ${t}`),!n){let p=(await T(t,{projectRoot:e})).map(Z);return P.debug(`\u{1F4CA} Total client components found: ${p.length}`),p}let r=[],o=0,a=0,l=await T(t,{projectRoot:e});for(let s of l){let p=0;try{p=(await i.fs.stat(s.filePath)).mtime?.getTime()??0}catch{continue}let m=n.getClientComponent(s.filePath,p);if(m){o++,m.isClient&&r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:m.exportNames});continue}a++;let x=[...s.exports];n.setClientComponent(s.filePath,!0,x,p),r.push({filePath:s.filePath,relativePath:s.relativePath,exportNames:x}),P.debug(` \u2713 Found client component: ${s.relativePath} (exports: ${x.join(", ")})`)}return(o>0||a>0)&&P.debug(`\u{1F4CA} Component analysis: ${o} cache hits, ${a} analyzed`),P.debug(`\u{1F4CA} Total client components found: ${r.length}`),r}async function _(t){let e=[],n=/(?:node_modules|\.test\.|\.spec\.)/;for await(let r of S(t,"**/*.{tsx,ts,jsx,js}",n))e.push(i.path.join(t,r));return e}var v=h.getLogger(["laroux-bundler","rsc-transform"]);async function H(t,e){let n=i.path.dirname(t.relativePath),r=i.path.join(e,n);await i.fs.ensureDir(r);let o=tt(t),a=t.relativePath.split("/").pop(),l=i.path.join(r,a);return await i.fs.writeTextFile(l,o),{originalPath:t.filePath,transformedPath:l}}function tt(t){let e=t.exportNames.map(n=>n==="default"?`export default createClientReference(
|
|
2
|
+
"./${t.relativePath}",
|
|
3
|
+
"default"
|
|
4
|
+
);`:`export const ${n} = createClientReference(
|
|
5
|
+
"./${t.relativePath}",
|
|
6
|
+
"${n}"
|
|
7
|
+
);`);return`/**
|
|
8
|
+
* Auto-generated client component reference
|
|
9
|
+
* Original: ${t.relativePath}
|
|
10
|
+
* Exports: ${t.exportNames.join(", ")}
|
|
11
|
+
* This file is generated at build time - do not edit!
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { createClientReference } from "@eser/laroux-react/protocol";
|
|
15
|
+
|
|
16
|
+
// Export client components as references
|
|
17
|
+
// The actual component code runs in the browser
|
|
18
|
+
${e.join(`
|
|
19
|
+
|
|
20
|
+
`)}
|
|
21
|
+
`}async function A(t,e,n){v.debug(`\u{1F504} Transforming ${t.length} client component(s)...`);let r=[];for(let o of t){let a=await H(o,e);v.debug(` \u2713 ${o.relativePath} \u2192 ${i.path.relative(n,a.transformedPath)}`),r.push(a)}return v.debug("\u2705 Transformation complete"),r}function et(t){let e=new Map;for(let n of t){e.set(`./${n.originalPath}`,n.transformedPath);let r=n.originalPath.split("/").pop();e.set(`./${r}`,n.transformedPath)}return e}async function U(t,e,n){let r={generated:new Date().toISOString(),components:t.map(o=>({original:o.originalPath,transformed:i.path.relative(n,o.transformedPath)}))};await i.fs.writeTextFile(e,JSON.stringify(r,null,2)),v.debug(`\u{1F4DD} Transform manifest saved to: ${i.path.relative(n,e)}`)}var nt=h.getLogger(["laroux-bundler","rsc-module-map"]);function L(t){let e={};for(let n of t){let r=`./${n.relativePath}`,o=W(n.relativePath,".js");e[r]={id:r,chunks:[o],name:n.exportNames[0]??"default"}}return e}function rt(t){let e={};for(let[n,r]of Object.entries(t))e[n]={id:r.id,chunks:r.chunks,name:r.name};return e}async function F(t,e){let n=JSON.stringify(t,null,2);await i.fs.writeTextFile(e,n),nt.debug(`\u{1F4DD} Module map saved to: ${e}`)}async function ot(t){let e=await i.fs.readTextFile(t);return JSON.parse(e)}function N(t){let e={};for(let n of t)e[n.relativePath]={id:n.relativePath,chunks:["client.js"],name:n.exportNames[0]??"default"};return e}var u=h.getLogger(["laroux-bundler","rsc-rewrite-imports"]);function st(t,e){let n=!1,r=!1,o=!1,a="";for(let l=0;l<e;l++){let s=t[l];if(s===void 0)break;if(a==="\\"){a=s;continue}s==="'"&&!r&&!o?n=!n:s==='"'&&!n&&!o?r=!r:s==="`"&&!n&&!r&&(o=!o),a=s}return n||r||o}function Q(t){let e=[],n=/import\s+(?:type\s+)?(?:(?:\{[^}]*\}|\*\s+as\s+\w+|\w+)(?:\s*,\s*(?:\{[^}]*\}|\*\s+as\s+\w+|\w+))*\s+from\s+)?["']([^"']+)["'];?/g,r;for(;(r=n.exec(t))!==null;){let o=r[1];o&&(st(t,r.index)||(o.startsWith("./")||o.startsWith("../")||o.startsWith("@/"))&&e.push({original:r[0],path:o,startIndex:r.index,endIndex:r.index+r[0].length}))}return e}function G(t,e,n){if(e.startsWith("@/")){let a=e.slice(2);return i.path.join(n,"src",a)}let r=i.path.dirname(t);return i.path.resolve(r,e)}function it(t,e){if(e.has(t))return e.get(t);let n=B.map(r=>`.${r}`);for(let r of n){let o=t.endsWith(r)?t:t+r;if(e.has(o))return e.get(o)}return null}function X(t,e){if(e.has(t))return e.get(t);if(!t.endsWith(".module.css")){let n=t+".module.css";if(e.has(n))return e.get(n)}return null}async function q(t,e,n,r,o){let a=await i.fs.readTextFile(t),l=Q(a),s=a,p=0,m=0;for(let c of l){let C=G(t,c.path,o);if(X(C,n)){let M=c.path.endsWith(".module.css")?`${c.path}.json`:`${c.path}.module.css.json`,y=c.original.match(/^import\s+["']/),f;y?f=c.original.replace(/^import\s+["']([^"']+)["'];?/,`import styles from "${M}" with { type: "json" };`):f=c.original.replace(`"${c.path}"`,`"${M}" with { type: "json" }`).replace(`'${c.path}'`,`'${M}' with { type: "json" }`);let d=c.startIndex+m,w=c.endIndex+m;s=s.slice(0,d)+f+s.slice(w),m+=f.length-c.original.length,p++;continue}let $=it(C,e);if($){let M=i.path.relative(o,t),y=i.path.join(r,M),f=i.path.relative(i.path.dirname(y),$),d=f.startsWith(".")?f:`./${f}`,w=c.original.replace(`"${c.path}"`,`"${d}"`).replace(`'${c.path}'`,`'${d}'`),I=c.startIndex+m,b=c.endIndex+m;s=s.slice(0,I)+w+s.slice(b),m+=w.length-c.original.length,p++}else if(c.path.startsWith("@/")){let M=i.path.relative(o,t),y=i.path.join(r,M),f=i.path.join(o,"dist","server","src",c.path.slice(2)),d=i.path.relative(i.path.dirname(y),f),w=d.startsWith(".")?d:`./${d}`,I=c.original.replace(`"${c.path}"`,`"${w}"`).replace(`'${c.path}'`,`'${w}'`),b=c.startIndex+m,Y=c.endIndex+m;s=s.slice(0,b)+I+s.slice(Y),m+=I.length-c.original.length,p++}}let x=i.path.relative(o,t),g=i.path.join(r,x);return await i.fs.ensureDir(i.path.dirname(g)),await i.fs.writeTextFile(g,s),{originalPath:t,rewrittenPath:g,importsRewritten:p}}function K(t){let e=new Map;for(let n of t){e.set(n.originalPath,n.transformedPath);let r=n.originalPath.replace(/\.(tsx|ts|jsx|js)$/,"");e.set(r,n.transformedPath)}return e}function R(t){let e=new Map;for(let n of t){let r=n.replace(/\.module\.css$/,".module.css.json");e.set(n,r);let o=n.replace(/\.module\.css$/,"");e.set(o,r)}return e}async function z(t,e,n,r,o){u.debug(`\u{1F504} Rewriting imports in ${t.length} server component(s)...`);let a=K(e),l=R(n);u.debug(` Found ${n.length} CSS module(s) to track`);let s=[];for(let p of t){let m=await q(p,a,l,r,o);m.importsRewritten>0?u.debug(` \u2713 ${i.path.relative(o,p)} (${m.importsRewritten} import(s) rewritten)`):u.debug(` \u2713 ${i.path.relative(o,p)} (no client imports)`),s.push(m)}return u.debug("\u2705 Import rewriting complete"),s}async function V(t,e,n){let r=await i.fs.readTextFile(t),o=Q(r),a=r,l=0,s=0;for(let p of o){let m=G(t,p.path,n);if(X(m,e)){let g=p.path.endsWith(".module.css")?`${p.path}.json`:`${p.path}.module.css.json`,c=p.original.match(/^import\s+["']/),C;c?C=p.original.replace(/^import\s+["']([^"']+)["'];?/,`import styles from "${g}" with { type: "json" };`):C=p.original.replace(`"${p.path}"`,`"${g}" with { type: "json" }`).replace(`'${p.path}'`,`'${g}' with { type: "json" }`);let O=p.startIndex+s,$=p.endIndex+s;a=a.slice(0,O)+C+a.slice($),s+=C.length-p.original.length,l++}}return l>0&&await i.fs.writeTextFile(t,a),{importsRewritten:l}}async function at(t,e,n,r){u.debug(`\u{1F504} Rewriting CSS module imports in ${t.length} client component(s)...`);let o=R(e);u.debug(` Found ${e.length} CSS module(s) to track`);let a=0;for(let l of t){let s=await V(l.filePath,o,r);s.importsRewritten>0&&(u.debug(` \u2713 ${i.path.relative(r,l.filePath)} (${s.importsRewritten} CSS import(s) rewritten)`),a+=s.importsRewritten)}a>0?u.debug(`\u2705 Rewrote ${a} CSS module import(s) in ${t.length} client component(s)`):u.debug("\u2705 No CSS module imports found in client components")}async function D(t,e,n){u.debug("\u{1F504} Rewriting CSS module imports in all src files...");let r=R(e),o=[];for await(let l of S(t,"**/*.{tsx,ts}",/node_modules/))o.push(i.path.join(t,l));u.debug(` Found ${o.length} source file(s) to check`);let a=0;for(let l of o){let s=await V(l,r,n);s.importsRewritten>0&&(u.debug(` \u2713 ${i.path.relative(n,l)} (${s.importsRewritten} CSS import(s) rewritten)`),a+=s.importsRewritten)}a>0?u.debug(`\u2705 Rewrote ${a} CSS module import(s) in ${o.length} source file(s)`):u.debug("\u2705 No CSS module imports needed rewriting")}var lt=["entry.tsx","error-boundary.tsx","error-overlay.tsx","globals.d.ts","hmr-client.tsx","index.ts","lazy-loader.ts","smart-refresh.tsx"];function pt(t){if(t.startsWith("jsr:"))return!0;if(URL.canParse(t)){let e=new URL(t);return e.protocol==="https:"||e.protocol==="http:"}return!1}function ct(t){return URL.canParse(t)&&t.startsWith("file://")?new URL(t).pathname:t}function mt(t){let e=t.match(/^jsr:@([^/]+)\/([^@]+)@[\^~]?([^/]+)(.*)$/);if(e){let[,r,o,a,l]=e;return`${new URL(`https://jsr.io/@${r}/${o}/${a}`).href}${l}`}let n=t.match(/^jsr:@([^/]+)\/([^/]+)(.*)$/);if(n){let[,r,o,a]=n;return`${new URL(`https://jsr.io/@${r}/${o}`).href}${a}`}throw new Error(`Cannot parse JSR specifier: ${t}`)}function ut(t){return t.replace(/@jsxImportSource\s+npm:react@[^\s*]+/g,"@jsxImportSource react").replace(/@jsxImportSourceTypes\s+npm:react@[^\s*]+/g,"@jsxImportSourceTypes react").replace(/from\s+["']jsr:(@[^@]+)@[^"'/]+([^"']*)["']/g,'from "$1$2"').replace(/import\s*\(\s*["']jsr:(@[^@]+)@[^"'/]+([^"']*)["']\s*\)/g,'import("$1$2")').replace(/from\s+["']npm:\/?([^@]+)@[^"'/]+([^"']*)["']/g,'from "$1$2"').replace(/import\s*\(\s*["']npm:\/?([^@]+)@[^"'/]+([^"']*)["']\s*\)/g,'import("$1$2")')}function ft(){let e=import.meta.resolve("@eser/laroux-react/client/bootstrap").replace(/\/index\.ts$/,"");return e.startsWith("jsr:")&&(e=mt(e)),{isRemote:pt(e),baseUrl:e}}async function gt(t){let{isRemote:e,baseUrl:n}=ft();for(let r of lt){let o=i.path.resolve(t,r),a=n.endsWith("/")?new URL(r,n).href:new URL(`${n}/${r}`).href;if(e)try{let l=await fetch(a);if(!l.ok)throw new Error(`HTTP ${l.status}`);let s=await l.text();s=ut(s),await i.fs.writeTextFile(o,s)}catch(l){throw new Error(`Failed to fetch bootstrap file ${r} from ${a}: ${l instanceof Error?l.message:String(l)}`)}else{let l=ct(a);await J(l,o,{overwrite:!0})}}}async function k(t,e,n){let r=i.path.resolve(n,"_client-entry.tsx");await i.fs.ensureDir(n),await gt(n);let o=t.map((s,p)=>`import * as __component_${p} from "${s.filePath}";`).join(`
|
|
22
|
+
`),a=t.map((s,p)=>` __RUNTIME_MODULES__["${`./${s.relativePath}`}"] = __component_${p};`).join(`
|
|
23
|
+
`),l=`/**
|
|
24
|
+
* Auto-generated Client Entry Point - Runtime Bundle
|
|
25
|
+
* This file contains the bootstrap code and all client components
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
${o}
|
|
29
|
+
|
|
30
|
+
// Create global module registry for runtime components
|
|
31
|
+
if (typeof globalThis !== "undefined") {
|
|
32
|
+
globalThis.__RUNTIME_MODULES__ = globalThis.__RUNTIME_MODULES__ ?? {};
|
|
33
|
+
}
|
|
34
|
+
const __RUNTIME_MODULES__ = typeof globalThis !== "undefined"
|
|
35
|
+
? globalThis.__RUNTIME_MODULES__
|
|
36
|
+
: {};
|
|
37
|
+
|
|
38
|
+
// Register all client components
|
|
39
|
+
${a}
|
|
40
|
+
|
|
41
|
+
// Import and run the bootstrap code (copied to dist/)
|
|
42
|
+
import "./entry.tsx";
|
|
43
|
+
`;return await i.fs.writeTextFile(r,l),r}var dt={name:"react",analyzeClientComponents:async(t,e,n)=>await E(t,e,n),getAllComponents:async t=>await _(t),transformClientComponents:async(t,e,n)=>(await A(t,e,n)).map(o=>({originalPath:o.originalPath,transformedPath:o.transformedPath})),generateTransformManifest:async(t,e,n)=>{await U(t,e,n)},createModuleMap:t=>Promise.resolve(L(t)),saveModuleMap:async(t,e)=>{await F(t,e)},createClientManifest:t=>Promise.resolve(N(t)),rewriteServerComponents:async(t,e,n,r,o)=>{await z(t,e,n,r,o)},rewriteCssModuleImports:async(t,e,n)=>{await D(t,e,n)},createClientEntry:async(t,e,n)=>await k(t,e,n)};export{E as analyzeClientComponents,rt as createBundlerConfig,R as createCSSModuleMap,K as createClientComponentMap,k as createClientEntry,N as createClientManifest,et as createImportMapping,L as generateModuleMap,U as generateTransformManifest,_ as getAllComponents,ot as loadModuleMap,dt as reactPlugin,at as rewriteAllClientComponentCSSImports,z as rewriteAllServerComponents,D as rewriteAllSrcCSSModuleImports,q as rewriteServerComponentImports,F as saveModuleMap,A as transformAllClientComponents,H as transformClientComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l,i as m,j as n,k as o,l as r,m as s,n as t,o as u,p as v,q as w,r as x,s as A,t as B}from"./chunk-GRTR6TNJ.js";import{b as y,c as z}from"./chunk-Z7742D7Q.js";import{a as p,b as q}from"./chunk-VTQ72OK7.js";import{a,b,c,d}from"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";export{c as AlreadyExistsError,b as NotFoundError,d as ProcessError,a as RuntimeCapabilityError,u as buildCommand,z as clearWorkerdEnv,A as createRuntime,B as current,x as detectExecutionContext,t as detectInvoker,e as detectRuntime,l as getArch,w as getCliCommand,m as getHomedir,k as getPlatform,o as getPlatformInfo,f as getRuntimeVersion,n as getTmpdir,h as isBrowser,v as isCommandInPath,j as isEdge,g as isRuntime,i as isServer,y as populateEnvFromContext,q as posixPath,s as resolvePathDirs,r as searchFileHierarchy,p as toPosix};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as G,b as v}from"./chunk-UJX2S56V.js";import{a as P,b as g}from"./chunk-GETSWLMF.js";import{a as S,b as J}from"./chunk-NIX3WX3O.js";import{a as K,b as V}from"./chunk-4Q3SEHPE.js";import{a as h,b as O,c as k,d as R,e as B,f as E}from"./chunk-PLRSDG6G.js";import"./chunk-LRL56YFE.js";import{a as f,b as u}from"./chunk-3DMTTLUJ.js";import{a as A,b as C}from"./chunk-ZY72QNKZ.js";import{a as M,b as w}from"./chunk-NZFUFGOC.js";import{a as I,b as T}from"./chunk-5C7ZQN6X.js";import{a as l,b as m,c as s,d,e as y,f as F,g as x}from"./chunk-7QNRH7OR.js";import"./chunk-OLM5RTFK.js";import"./chunk-DOV5776P.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";var o=null,b=async()=>{if(o!==null)return o;let{anthropicFactory:e}=await import("./anthropic-GBDSASP5.js"),{openaiFactory:r}=await import("./openai-XMIVMDDL.js"),{geminiFactory:t}=await import("./gemini-I6F5N7PS.js"),{vertexaiFactory:a}=await import("./vertexai-2SMP54AR.js"),{claudeCodeFactory:i}=await import("./claude-code-PWTLM554.js"),{ollamaFactory:c}=await import("./ollama-DQ5VM4HI.js"),{openCodeFactory:n}=await import("./opencode-IZMQZ4ZK.js"),{kiroFactory:p}=await import("./kiro-NMTIFMT4.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-7M3ONEMO.js";import"./chunk-RGUC6KAZ.js";import"./chunk-5UGVJVIQ.js";import"./chunk-OBIEQJDE.js";import"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-DOV5776P.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,q as o,r as p,s as q,t as r}from"./chunk-PBSR4XR2.js";import"./chunk-OBIEQJDE.js";import"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.js";export{j as chunkToInlineScript,l as createInlineRSCStream,k as createInlineTransformStream,q as createReactHtmlShellBuilder,o as createReactRenderer,m as generateInlineBootstrapScript,n as generateInlineCompletionScript,c as generateRSCPayloadScript,e as loadModuleMap,r as reactHtmlShellBuilder,p as reactRenderer,i as renderApp,f as renderRSC,h as renderRSCResponse,a as renderSSR,d as renderToReadableStream,b as serializeRSCPayload,g as streamToResponse};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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-FGDJVQG3.js";import{n as f}from"./chunk-PLJNPQFC.js";import"./chunk-GRTR6TNJ.js";import"./chunk-Z7742D7Q.js";import"./chunk-VTQ72OK7.js";import"./chunk-QXTK62N4.js";import"./chunk-DXB73IDG.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};
|