eser 4.1.40 → 4.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/{add-V7YYHLFH.js → add-IM5JC6QA.js} +1 -1
- package/chunks/approve-ZVP5ZFYD.js +2 -0
- package/chunks/{ask-PMB64QWG.js → ask-UTEI7KGQ.js} +1 -1
- package/chunks/block-XMEV54BW.js +2 -0
- package/chunks/{build-HUKFUVPB.js → build-IRLEBMJE.js} +2 -2
- package/chunks/cancel-NOMB4RWW.js +2 -0
- package/chunks/{changelog-gen-JV3EHOMV.js → changelog-gen-USXHO6PE.js} +1 -1
- package/chunks/{chunk-VIQLCQOI.js → chunk-2BEIAJ5J.js} +1 -1
- package/chunks/{chunk-XYUJCTPP.js → chunk-2N62LL55.js} +1 -1
- package/chunks/{chunk-OPPOHKNZ.js → chunk-2OKCK56H.js} +1 -1
- package/chunks/{chunk-HTJLIAH4.js → chunk-2UHHAPKY.js} +1 -1
- package/chunks/{chunk-NZRU3N6C.js → chunk-3LDGQFQZ.js} +1 -1
- package/chunks/{chunk-NJUIBCQR.js → chunk-3U5M6YO6.js} +1 -1
- package/chunks/{chunk-F5HQDZLN.js → chunk-4COCZPO5.js} +1 -1
- package/chunks/{chunk-BWDCKK63.js → chunk-4EJVA4QA.js} +1 -1
- package/chunks/{chunk-ECY4MUD3.js → chunk-5MVJUALI.js} +1 -1
- package/chunks/{chunk-HP5W5XT6.js → chunk-6V6C6MWY.js} +1 -1
- package/chunks/{chunk-WJKE6XHF.js → chunk-6VHZQNHX.js} +1 -1
- package/chunks/{chunk-UMKCOU3N.js → chunk-7RL5ZFGE.js} +1 -1
- package/chunks/{chunk-AMMTAUXC.js → chunk-B25CIV35.js} +1 -1
- package/chunks/{chunk-5RX5V5BA.js → chunk-B2ANQEQO.js} +1 -1
- package/chunks/{chunk-F35K7YVH.js → chunk-BNMKKNLB.js} +1 -1
- package/chunks/{chunk-OAFB4A6D.js → chunk-BSV66I74.js} +1 -1
- package/chunks/chunk-CDVYNW34.js +2 -0
- package/chunks/{chunk-DWLFTRZS.js → chunk-CXTPYPO4.js} +1 -1
- package/chunks/{chunk-4EHAL3NK.js → chunk-E423U2PP.js} +1 -1
- package/chunks/chunk-EWECBFQO.js +7 -0
- package/chunks/{chunk-MBCPGD5L.js → chunk-EXP2TZZC.js} +1 -1
- package/chunks/{chunk-TEOMM3RD.js → chunk-GKOMIH2B.js} +1 -1
- package/chunks/{chunk-BBOEAL63.js → chunk-H5GHXMIT.js} +1 -1
- package/chunks/{chunk-MOY4CXAZ.js → chunk-H6HLRKRK.js} +2 -2
- package/chunks/{chunk-YEWODYET.js → chunk-H7U2VQCK.js} +1 -1
- package/chunks/chunk-HCCAYXSB.js +82 -0
- package/chunks/{chunk-L7UCWRDZ.js → chunk-IBB6UZR2.js} +1 -1
- package/chunks/{chunk-AHKNU2JM.js → chunk-IBBGWXAI.js} +1 -1
- package/chunks/{chunk-ZWMJQZQF.js → chunk-IQQEVKBP.js} +1 -1
- package/chunks/{chunk-WILZ4OR2.js → chunk-IWXI3UYI.js} +1 -1
- package/chunks/{chunk-H2O5G3XB.js → chunk-JZ7DUWYC.js} +1 -1
- package/chunks/{chunk-EGMYM4TM.js → chunk-KZAPWWOT.js} +1 -1
- package/chunks/{chunk-4FGLERUG.js → chunk-L7RS6MQ5.js} +1 -1
- package/chunks/{chunk-3IZX4OZ7.js → chunk-LSET5TD3.js} +1 -1
- package/chunks/{chunk-WAEXOK7L.js → chunk-LYKN5EIM.js} +1 -1
- package/chunks/chunk-M7KYQS2M.js +4 -0
- package/chunks/{chunk-ZC4F4MYU.js → chunk-MBG7SPPO.js} +1 -1
- package/chunks/{chunk-OAT2D23A.js → chunk-MPGRKZIA.js} +1 -1
- package/chunks/{chunk-L2E2H7YT.js → chunk-OWQXQ33F.js} +1 -1
- package/chunks/{chunk-RVJZFWN7.js → chunk-QD46ROBD.js} +1 -1
- package/chunks/{chunk-HVTJ5LVU.js → chunk-QMRKAC6C.js} +1 -1
- package/chunks/{chunk-ILROPD5P.js → chunk-QYMHLTVT.js} +1 -1
- package/chunks/{chunk-KEOTIPA6.js → chunk-RFHWH6ZX.js} +1 -1
- package/chunks/{chunk-TLVGNOK3.js → chunk-RIOYVPPP.js} +1 -1
- package/chunks/{chunk-OWV223WQ.js → chunk-SF6FT44C.js} +1 -1
- package/chunks/{chunk-QFFGKP3M.js → chunk-SH4H7OLV.js} +1 -1
- package/chunks/{chunk-T4WKRBQZ.js → chunk-SK6QUPJR.js} +1 -1
- package/chunks/{chunk-O2TA7OHJ.js → chunk-SMKZDN2Q.js} +1 -1
- package/chunks/{chunk-DKFL6XPX.js → chunk-TELZ2ZFI.js} +1 -1
- package/chunks/{chunk-4QDEJUAF.js → chunk-TYLYMZQC.js} +1 -1
- package/chunks/{chunk-ULNEO3RY.js → chunk-UQRZJPYH.js} +1 -1
- package/chunks/{chunk-3AA3RXKD.js → chunk-V3NJTF2Y.js} +1 -1
- package/chunks/{chunk-K2MKYDPY.js → chunk-V6YI7YJ4.js} +1 -1
- package/chunks/{chunk-LBMJGMDD.js → chunk-VE6XM5OZ.js} +1 -1
- package/chunks/{chunk-A6K5L4SG.js → chunk-VNJJQED3.js} +1 -1
- package/chunks/{chunk-3QF3I2RD.js → chunk-VVWAUS3D.js} +1 -1
- package/chunks/{chunk-MQ4EMT35.js → chunk-VW5QFRLO.js} +1 -1
- package/chunks/{chunk-CMSPX2RN.js → chunk-WPOZMPUR.js} +1 -1
- package/chunks/{chunk-2KKLYXSA.js → chunk-WWI6727S.js} +1 -1
- package/chunks/{chunk-PXCM4FHO.js → chunk-XOSAN6PX.js} +1 -1
- package/chunks/chunk-XV76AD7Z.js +17 -0
- package/chunks/{chunk-MEZCXQAX.js → chunk-YJ3ICGHV.js} +1 -1
- package/chunks/{chunk-P72TUTYK.js → chunk-YURNTYEP.js} +1 -1
- package/chunks/{chunk-U5Q5MC74.js → chunk-Z2LXZLZV.js} +1 -1
- package/chunks/{chunk-QXATB6Z5.js → chunk-ZEFYMWGZ.js} +1 -1
- package/chunks/{chunk-5224ZYEW.js → chunk-ZRUM5PE7.js} +1 -1
- package/chunks/claude-code-VX2T4YII.js +2 -0
- package/chunks/{clone-YEBQK7CG.js → clone-DSVKII72.js} +1 -1
- package/chunks/{cmd-2DAVTVOF.js → cmd-YU4MVRRR.js} +1 -1
- package/chunks/{commitmsg-FQ3IZ3TH.js → commitmsg-FS52L6J5.js} +2 -2
- package/chunks/concern-MIS5NE4U.js +2 -0
- package/chunks/{deno-XQHOVHKR.js → deno-I5YAWOB6.js} +1 -1
- package/chunks/{dev-BNGJJR2O.js → dev-QZF2X7YC.js} +2 -2
- package/chunks/done-JBMAE4OV.js +2 -0
- package/chunks/{file-tools-shared-KBTCO2FV.js → file-tools-shared-LMF72D6S.js} +1 -1
- package/chunks/{gh-Q7VEABJS.js → gh-FKZHTNFN.js} +2 -2
- package/chunks/{gh-contributors-4KGARSNL.js → gh-contributors-3MFKDSG3.js} +1 -1
- package/chunks/init-5LKHWDV5.js +2 -0
- package/chunks/{init-RV7K5JC4.js → init-ZOMBOUG3.js} +3 -3
- package/chunks/{install-6XIQS5E7.js → install-WD65EAID.js} +1 -1
- package/chunks/invoke-hook-PYVXULCH.js +11 -0
- package/chunks/kiro-JGEZGFF3.js +2 -0
- package/chunks/{list-NYLFIF2U.js → list-NS7ECFDY.js} +1 -1
- package/chunks/{list-UQMPOF5Y.js → list-PSLAM3H6.js} +1 -1
- package/chunks/{list-BOLPKAEY.js → list-XFPTCIMR.js} +1 -1
- package/chunks/{load-config-G4DHKB5K.js → load-config-OGSPRY4L.js} +1 -1
- package/chunks/{main-236QYA7G.js → main-BUEG2IMJ.js} +2 -2
- package/chunks/{manifest-3VJ4O6HR.js → manifest-4EA74HMS.js} +1 -1
- package/chunks/{mod-QWYXFGRG.js → mod-2PIV6QCE.js} +1 -1
- package/chunks/{mod-IHYN4TEM.js → mod-ERJSLSPA.js} +2 -2
- package/chunks/{mod-DXA25A4J.js → mod-G7PJEGW6.js} +1 -1
- package/chunks/{mod-YH5Z6G4Q.js → mod-II7CSZUT.js} +1 -1
- package/chunks/{mod-BQJDMCYC.js → mod-KTGLCC3R.js} +1 -1
- package/chunks/{mod-GSWVSC2C.js → mod-Q6SI6S6S.js} +1 -1
- package/chunks/mod-QZTTX5HQ.js +2 -0
- package/chunks/{mod-EWLBSEHA.js → mod-RO7WP3SA.js} +1 -1
- package/chunks/{mod-PZSJGUM7.js → mod-U2MNO6EC.js} +1 -1
- package/chunks/{mod-IXVUQHXS.js → mod-WOZXOD2F.js} +1 -1
- package/chunks/{mod-SXL6PDQM.js → mod-XEK7FROU.js} +1 -1
- package/chunks/{new-U5U4E6HR.js → new-3ZN4U7FJ.js} +1 -1
- package/chunks/next-L3D5GIYW.js +9 -0
- package/chunks/ollama-LD6OENM2.js +2 -0
- package/chunks/opencode-ECTBCC3O.js +2 -0
- package/chunks/{purge-RM6OD5PV.js → purge-VATLMK3Y.js} +1 -1
- package/chunks/{recipe-applier-TTZEZGSC.js → recipe-applier-6SGY2W3A.js} +1 -1
- package/chunks/{registry-fetcher-SPENFEOH.js → registry-fetcher-H63ZWZHU.js} +1 -1
- package/chunks/{release-UEX6YK4K.js → release-6I5TL34I.js} +2 -2
- package/chunks/{release-notes-GA7CTA54.js → release-notes-GJ4EBMTD.js} +1 -1
- package/chunks/{release-tag-VJWBXG5G.js → release-tag-IOH5HGAA.js} +1 -1
- package/chunks/reopen-DD4BEUJ3.js +2 -0
- package/chunks/reset-H2L4XUQ6.js +2 -0
- package/chunks/{rule-ZQOGLQQI.js → rule-PC5PQJCD.js} +1 -1
- package/chunks/{run-L35K3KRF.js → run-FGMEIO57.js} +1 -1
- package/chunks/run-MSWGAMLB.js +4 -0
- package/chunks/{scripts-VI2TKQOH.js → scripts-L2FZBUHU.js} +1 -1
- package/chunks/{serve-AVVEYGQB.js → serve-R7XGF4EL.js} +2 -2
- package/chunks/{server-R347ON4B.js → server-KJW4HWK7.js} +1 -1
- package/chunks/spec-5F7ZXCOG.js +2 -0
- package/chunks/status-XECKZKHG.js +2 -0
- package/chunks/{sync-PB4KWB3R.js → sync-55L47P6M.js} +1 -1
- package/chunks/{system-KMRRIKMQ.js → system-QR52LT5S.js} +1 -1
- package/chunks/{system-BXJ2LV5O.js → system-X4X6JD4X.js} +1 -1
- package/chunks/{update-522VXIKX.js → update-CV7JPZGM.js} +1 -1
- package/chunks/validate-bom-5IPW3R4O.js +2 -0
- package/chunks/validate-case-conflict-5XOPS6HD.js +2 -0
- package/chunks/validate-circular-deps-WME7VUO4.js +2 -0
- package/chunks/validate-commit-msg-MEQH6ADP.js +2 -0
- package/chunks/validate-docs-LBWVCSN2.js +2 -0
- package/chunks/validate-eof-56S7THGQ.js +2 -0
- package/chunks/validate-export-names-YJGQHPGF.js +2 -0
- package/chunks/validate-filenames-DJF7GO3C.js +2 -0
- package/chunks/validate-json-2OMEH67D.js +2 -0
- package/chunks/validate-large-files-OE4P7FD7.js +2 -0
- package/chunks/validate-licenses-BNEQDBKC.js +2 -0
- package/chunks/validate-line-endings-PHV2ZK7V.js +2 -0
- package/chunks/validate-merge-conflict-XN3376IV.js +2 -0
- package/chunks/validate-mod-exports-D2Q5GV76.js +2 -0
- package/chunks/{validate-package-configs-3Y55ZLUY.js → validate-package-configs-ZO5YJE2D.js} +1 -1
- package/chunks/validate-secrets-ZMBKEXOK.js +2 -0
- package/chunks/validate-shebangs-3OR2L3RH.js +2 -0
- package/chunks/validate-submodules-HIYYVQDP.js +2 -0
- package/chunks/validate-symlinks-QMLLO5R3.js +2 -0
- package/chunks/validate-toml-U77NIEDN.js +2 -0
- package/chunks/validate-trailing-whitespace-UE7AOZEZ.js +2 -0
- package/chunks/validate-yaml-UX2VQJJT.js +2 -0
- package/chunks/versions-OKK45EDV.js +2 -0
- package/chunks/watch-F6CO73RC.js +9 -0
- package/chunks/wontfix-GSHTDPN7.js +2 -0
- package/eser.js +1 -1
- package/package.json +1 -1
- package/chunks/approve-HVIH2A3C.js +0 -2
- package/chunks/block-JSK5CJPO.js +0 -2
- package/chunks/chunk-7UASU4NU.js +0 -10
- package/chunks/chunk-A3JJKZ4C.js +0 -4
- package/chunks/chunk-JI536JLJ.js +0 -2
- package/chunks/chunk-NEHZOG23.js +0 -7
- package/chunks/chunk-RGUPFAEE.js +0 -68
- package/chunks/claude-code-ELUDT5TV.js +0 -2
- package/chunks/concern-TIGYH5DX.js +0 -2
- package/chunks/done-GGPPHJW2.js +0 -2
- package/chunks/init-45ODFAV3.js +0 -2
- package/chunks/invoke-hook-Q3NMJXDO.js +0 -11
- package/chunks/kiro-NZ7LM6HA.js +0 -2
- package/chunks/mod-L26IBE5V.js +0 -2
- package/chunks/next-AQ4TIEL7.js +0 -9
- package/chunks/ollama-LHWMXMLY.js +0 -2
- package/chunks/opencode-24O2MW3L.js +0 -2
- package/chunks/reset-WHYTPTFB.js +0 -2
- package/chunks/run-IX74MQTI.js +0 -4
- package/chunks/spec-KMKZDLV2.js +0 -2
- package/chunks/status-MLX4O37A.js +0 -2
- package/chunks/validate-bom-JCMRVAUT.js +0 -2
- package/chunks/validate-case-conflict-WZQCMKSZ.js +0 -2
- package/chunks/validate-circular-deps-7R4F2YDV.js +0 -2
- package/chunks/validate-commit-msg-PH7Y3JEI.js +0 -2
- package/chunks/validate-docs-WCIOHNYP.js +0 -2
- package/chunks/validate-eof-KRYQLTFQ.js +0 -2
- package/chunks/validate-export-names-OCQ2XSY6.js +0 -2
- package/chunks/validate-filenames-46O7FCXF.js +0 -2
- package/chunks/validate-json-3EZ2L64H.js +0 -2
- package/chunks/validate-large-files-7YX6MSOB.js +0 -2
- package/chunks/validate-licenses-OC7JRVAH.js +0 -2
- package/chunks/validate-line-endings-2DM5UGCJ.js +0 -2
- package/chunks/validate-merge-conflict-UDMWYMJ5.js +0 -2
- package/chunks/validate-mod-exports-W24IV367.js +0 -2
- package/chunks/validate-secrets-66VXCCUF.js +0 -2
- package/chunks/validate-shebangs-AMEAHVLB.js +0 -2
- package/chunks/validate-submodules-DYCE27WK.js +0 -2
- package/chunks/validate-symlinks-QN744GUH.js +0 -2
- package/chunks/validate-toml-5K2XNHAE.js +0 -2
- package/chunks/validate-trailing-whitespace-QYWHHIAK.js +0 -2
- package/chunks/validate-yaml-VGKLHEAQ.js +0 -2
- package/chunks/versions-FYALONNL.js +0 -2
- package/chunks/watch-P56QT3Q2.js +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as N,b as x,c as H}from"./chunk-
|
|
2
|
+
import{a as N,b as x,c as H}from"./chunk-6V6C6MWY.js";import{f as C}from"./chunk-BNMKKNLB.js";import{a as E,d as $}from"./chunk-P2MUEKFT.js";import{k as S}from"./chunk-GKOMIH2B.js";import{f as b,h,k as I}from"./chunk-MBG7SPPO.js";import{d as o,f as k,g,h as A,k as y}from"./chunk-YVN2NZL4.js";import{a as v}from"./chunk-MG65QJY6.js";import{a as d,b as c,c as R}from"./chunk-FFWPJP7A.js";import{i as w}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var _=r=>E(async e=>{try{let t=await S(r.registrySource,{verbose:r.verbose,local:r.local}),s=t.recipes.find(n=>n.name===r.recipeName);if(s===void 0)return c({_tag:"RecipeNotFound",message:`Recipe '${r.recipeName}' not found. Run \`eser kit list\` to see available recipes.`});let a=await N(r.cwd),i=x(s,a);for(let n of i.warnings)e.out.writeln(A(`Warning: ${n}`));let l=await C(r.recipeName,t.recipes,{cwd:r.cwd,registryUrl:t.registryUrl,force:r.force,skipExisting:r.skipExisting,dryRun:r.dryRun,verbose:r.verbose,variables:r.variables}),m=0,p=0;for(let n of l.recipes)m+=n.result.written.length,p+=n.result.skipped.length;e.out.writeln(g(`\u2713 Added ${m} file(s)`)),l.recipes.length>1&&e.out.writeln(o(` Applied ${l.recipes.length} recipes (including dependencies)`)),p>0&&e.out.writeln(o(` Skipped ${p} existing file(s)`));let f=l.recipes.find(n=>n.name===r.recipeName);if(f!==void 0)for(let n of f.result.written)e.out.writeln(` \u2192 ${n}`);let u;if(!r.noInstall&&!r.dryRun&&i.instructions.length>0){e.out.writeln(o(`
|
|
3
3
|
Installing dependencies...`)),u=await H(i.instructions,r.cwd,{verbose:r.verbose});for(let n of u)n.success?e.out.writeln(g(` \u2713 ${n.command}`)):e.out.writeln(k(` \u2717 ${n.command}: ${n.error}`))}else if(i.instructions.length>0){e.out.writeln(o(`
|
|
4
4
|
Dependencies (run manually):`));for(let n of i.instructions)e.out.writeln(o(` ${n}`))}return d({recipe:s,chainResult:l,depInfo:i,installResults:u})}catch(t){let s=t instanceof Error?t.message:String(t);return c({_tag:"ApplyError",message:s})}});var j=r=>{let e={};for(let t of r){let[s,...a]=String(t).split("=");s!==void 0&&s!==""&&(e[s]=a.join("="))}return e},B=async r=>{let e=v(r??[],{string:["registry","var"],boolean:["dry-run","force","skip-existing","verbose","local","no-install"],collect:["var"]}),t=e._[0],s=b({renderer:I.ansi(),sink:h.stdout()});if(t===void 0)return s.writeln("Usage: eser kit add <recipe> [--registry <url>] [--dry-run] [--var key=value]"),s.writeln(),s.writeln("Run ",o("`eser kit list`")," to see available recipes."),await s.close(),d(void 0);let a=e["dry-run"]===!0;a?s.writeln(y(`
|
|
5
5
|
Dry run: ${t}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as k}from"./chunk-M7KYQS2M.js";import"./chunk-TYLYMZQC.js";import{a as x,d as F}from"./chunk-VW5QFRLO.js";import{e as P,g as A}from"./chunk-CDVYNW34.js";import{c as y,e as C,g as R,h as w,i as u,k as D,o as E}from"./chunk-EWECBFQO.js";import{c as p}from"./chunk-MPGRKZIA.js";import"./chunk-2XNFZXHY.js";import{f as S,h as v,k as g}from"./chunk-MBG7SPPO.js";import{c as i,d as l,f as a,g as d,k as m}from"./chunk-YVN2NZL4.js";import{a as h,b as n}from"./chunk-FFWPJP7A.js";import{i as c}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var M=async _=>{let s=S({renderer:g.ansi(),sink:v.stdout()}),r=c.process.cwd(),o=R(_);if(!o.ok)return s.writeln(a(o.error)),await s.close(),n({exitCode:1});let t;try{t=await C(r,o.spec)}catch(e){let f=e instanceof Error?e.message:String(e);return s.writeln(a(f)),await s.close(),n({exitCode:1})}let $=await D(r);if(t.spec!==null){let e=`${r}/${y.specDir(t.spec)}`;try{await c.fs.stat(e)}catch{return s.writeln(a(`Active spec '${t.spec}' directory not found.`)),s.writeln(l("Run `noskills reset` to return to IDLE.")),await s.close(),n({exitCode:1})}}if(t.phase==="SPEC_DRAFT"){if(t.classification===null&&t.spec!==null){let b=(await E(r)).filter(I=>$?.concerns.includes(I.id)??!1);try{await k(r,t,b)}catch{}}let e=A(t);await w(r,e),e.spec!==null&&await u(r,e.spec,e),e.spec!==null&&(await x(r,e.spec,"approved"),await F(r,e.spec,"approved")),s.writeln(d("\u2714")," Spec approved. Phase: ",m("SPEC_APPROVED")),s.writeln("When ready, run ",i(`${p('next --answer="start"')}`)," to begin execution.")}else if(t.phase==="DISCOVERY_REVIEW"){let e=P(t);await w(r,e),e.spec!==null&&await u(r,e.spec,e),s.writeln(d("\u2714")," Discovery answers approved. Phase: ",m("SPEC_DRAFT")),s.writeln("Review the spec and run ",i(p("approve"))," again to approve.")}else t.phase==="DISCOVERY"&&t.discovery.completed?(s.writeln(l("Discovery complete. Spec draft already generated.")),s.writeln("Review the spec and run ",i(p("approve"))," again when in SPEC_DRAFT phase.")):s.writeln(a(`Cannot approve in phase: ${t.phase}`));return await s.close(),h(void 0)};export{M as main};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as _,b as $}from"./chunk-GE3LJ6QM.js";import{a as F}from"./chunk-BNQAZLIQ.js";import{d as x,f as v,g as I,h as y,k as P}from"./chunk-
|
|
2
|
+
import{a as _,b as $}from"./chunk-GE3LJ6QM.js";import{a as F}from"./chunk-BNQAZLIQ.js";import{d as x,f as v,g as I,h as y,k as P}from"./chunk-MBG7SPPO.js";import{d as O,e as L,g as R}from"./chunk-5DWJ7WEE.js";import{a as T}from"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-J7YTWK67.js";import{d as S}from"./chunk-5MVJUALI.js";import{a as C,b as g}from"./chunk-FFWPJP7A.js";import{i as m}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var k=(e,t,n)=>{let i=e.streamText(t,n);return{name:`ai-text/${e.provider}/${e.modelId}`,readable:new ReadableStream({async start(o){try{for await(let s of i)s.kind==="content_delta"&&o.enqueue(x(s.textDelta));o.close()}catch(s){o.error(s)}}})}};var Y={cc:"claude-code",ol:"ollama",oc:"opencode",oai:"openai",ant:"anthropic",gem:"gemini",vtx:"vertexai"},q={"claude-code":"Claude Code",ollama:"Ollama",opencode:"OpenCode",kiro:"Kiro",anthropic:"Anthropic API",openai:"OpenAI API",gemini:"Gemini API",vertexai:"Vertex AI"},H=e=>Y[e]??e,K=async e=>{if(e){let t=m.process.stderr.getWriter(),n=v({renderer:P.ansi(),sink:y.writable(new WritableStream({async write(i){await t.write(new TextEncoder().encode(String(i.data)))},close(){t.releaseLock()}}))});await O.configure({sinks:{stderr:R.getOutputSink(n)},loggers:[{category:["ai"],lowestLevel:T.Debug,sinks:["stderr"]}]})}return L.getLogger(["ai","ask"])},M=async e=>{await e.info("Auto-detecting AI provider...");try{if(await S`which claude`.noThrow().code()===0)return await e.info("Claude Code detected."),"claude-code"}catch{}try{if((await fetch("http://localhost:11434/api/version",{signal:AbortSignal.timeout(1e3)})).ok)return await e.info("Ollama detected at localhost:11434."),"ollama"}catch{}try{if(await S`which opencode`.noThrow().code()===0)return await e.info("OpenCode detected."),"opencode"}catch{}if(m.capabilities.env){if(m.env.has("ANTHROPIC_API_KEY"))return await e.info("Anthropic API key detected."),"anthropic";if(m.env.has("OPENAI_API_KEY"))return await e.info("OpenAI API key detected."),"openai"}throw new Error("No AI provider detected. Install claude, ollama, or set ANTHROPIC_API_KEY / OPENAI_API_KEY.")},U=async e=>{switch(e){case"claude-code":return(await import("./claude-code-VX2T4YII.js")).claudeCodeFactory;case"ollama":return(await import("./ollama-LD6OENM2.js")).ollamaFactory;case"opencode":return(await import("./opencode-ECTBCC3O.js")).openCodeFactory;case"kiro":return(await import("./kiro-JGEZGFF3.js")).kiroFactory;case"anthropic":return(await import("./anthropic-QBGNUIP3.js")).anthropicFactory;case"openai":return(await import("./openai-2KONKHWL.js")).openaiFactory;case"gemini":return(await import("./gemini-43AWJEWI.js")).geminiFactory;case"vertexai":return(await import("./vertexai-2F2A3VTE.js")).vertexaiFactory;default:throw new Error(`Unknown provider: ${e}`)}},le=async e=>{let t=e??[],n=null,i=null,o=null,s=!1,p=!1,A=[],a=0;for(;a<t.length;){let r=t[a];if(r==="-p"||r==="--provider"){n=t[a+1]??null,a+=2;continue}if(r==="-m"||r==="--model"){i=t[a+1]??null,a+=2;continue}if(r==="--max-tokens"){let c=t[a+1];c!==void 0&&(o=Number(c)),a+=2;continue}if(r==="--json"){s=!0,a+=1;continue}if(r==="-v"||r==="--verbose"){p=!0,a+=1;continue}r.startsWith("-")||A.push(r),a+=1}let f=A.join(" ");if(f.length===0)return g({message:'Usage: ai ask "your prompt" [-p provider] [-m model] [--verbose]',exitCode:1});let d=await K(p);try{let r=n!==null?H(n):await M(d),c=q[r]??r,E=i??z(r);await d.info(`Using ${c} (${E})`);let N=await U(r),w=new _({factories:[N]});await w.addModel("default",{provider:r,model:E});let h=w.getDefault();if(h===null)return g({message:"Failed to initialize model",exitCode:1});let b=[F("user",f)];if(await d.info(`Sending prompt (${f.length} chars)...`),s){let u=await h.generateText({messages:b,maxTokens:o??void 0});await d.info(`Response received (${$(u).length} chars)`);let l=v({sink:y.stdout()});l.writeln(JSON.stringify(u,null,2)),await l.close()}else{let u=k(h,{messages:b,maxTokens:o??void 0});await I().from(u).to(V()).run();let l=m.process.stdout.getWriter();await l.write(new TextEncoder().encode(`
|
|
3
3
|
`)),l.releaseLock()}return await w.close(),C(void 0)}catch(r){let c=r instanceof Error?r.message:String(r);return await d.error(c),p&&r instanceof Error&&r.cause!==void 0&&await d.debug(`Cause: ${String(r.cause)}`),g({message:c,exitCode:1})}},j=12,G=e=>new Promise(t=>setTimeout(t,e)),V=(e=j)=>{let t=new TextEncoder;return{name:"typewriter",writable:new WritableStream({async write(n){let i=String(n.data),o=m.process.stdout.getWriter();for(let s of i)await o.write(t.encode(s)),await G(e);o.releaseLock()}})}},z=e=>{switch(e){case"claude-code":return"claude-sonnet-4-20250514";case"ollama":return"llama3";case"opencode":return"default";case"kiro":return"default";case"anthropic":return"claude-sonnet-4-20250514";case"openai":return"gpt-4o";case"gemini":return"gemini-2.0-flash";case"vertexai":return"gemini-2.0-flash";default:return"default"}};export{le as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{i as A}from"./chunk-CDVYNW34.js";import{c as k,e as S,g as y,h as x,i as C}from"./chunk-EWECBFQO.js";import{c as v}from"./chunk-MPGRKZIA.js";import"./chunk-2XNFZXHY.js";import{f as w,h,k as g}from"./chunk-MBG7SPPO.js";import{c as d,d as l,f as i,h as f}from"./chunk-YVN2NZL4.js";import{a as u,b as r}from"./chunk-FFWPJP7A.js";import{i as c}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var q=async p=>{let e=w({renderer:g.ansi(),sink:h.stdout()}),n=c.process.cwd(),o=y(p);if(!o.ok)return e.writeln(i(o.error)),await e.close(),r({exitCode:1});let m=(p??[]).filter(t=>!t.startsWith("--spec=")).join(" ")||"No reason given",s;try{s=await S(n,o.spec)}catch(t){let E=t instanceof Error?t.message:String(t);return e.writeln(i(E)),await e.close(),r({exitCode:1})}if(s.spec!==null){let t=`${n}/${k.specDir(s.spec)}`;try{await c.fs.stat(t)}catch{return e.writeln(i(`Active spec '${s.spec}' directory not found.`)),e.writeln(l("Run `noskills reset` to return to IDLE.")),await e.close(),r({exitCode:1})}}if(s.phase!=="EXECUTING")return e.writeln(i(`Cannot block in phase: ${s.phase}`)),await e.close(),r({exitCode:1});let a=A(s,m);return await x(n,a),a.spec!==null&&await C(n,a.spec,a),e.writeln(f("\u26A0")," Spec blocked: ",l(m)),e.writeln("Resolve with: ",d(`${v('next --answer="resolution"')}`)),await e.close(),u(void 0)};export{q as main};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{f as d,h as g,k as m}from"./chunk-
|
|
2
|
+
import{f as d,h as g,k as m}from"./chunk-MBG7SPPO.js";import{b as c,d as L,h as C,k as u}from"./chunk-YVN2NZL4.js";import"./chunk-PWLF3WXM.js";import{a as v}from"./chunk-ZEFYMWGZ.js";import"./chunk-MG65QJY6.js";import{a as y}from"./chunk-FFWPJP7A.js";import"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var V=["trace","debug","info","warn","error","fatal"],N=async x=>{let{flags:o}=v(x??[],[{name:"out-dir",type:"string",default:"dist",description:"Output directory"},{name:"clean",type:"boolean",description:"Clean output first"},{name:"no-minify",type:"boolean",description:"Disable minification"},{name:"analyze",type:"boolean",description:"Analyze bundle size"},{name:"log-level",type:"string",default:"info",description:"Log level"}]),t=d({renderer:m.ansi(),sink:g.stdout()});t.writeln(u(`
|
|
3
3
|
\u{1F4E6} Building for production...
|
|
4
|
-
`));let e=await import("./mod-5JT4O5L3.js"),{runtime:n}=await import("./mod-
|
|
4
|
+
`));let e=await import("./mod-5JT4O5L3.js"),{runtime:n}=await import("./mod-G7PJEGW6.js"),i=n.process.cwd(),p=o["out-dir"],S=!o["no-minify"],h=o.clean,k=o.analyze,f=o["log-level"]??"info",b=V.includes(f.toLowerCase())?f.toLowerCase():"info",z={trace:e.Severities.Trace,debug:e.Severities.Debug,info:e.Severities.Info,warn:e.Severities.Warning,error:e.Severities.Error,fatal:e.Severities.Critical},D=d({renderer:m.ansi(),sink:g.stdout()});await e.config.configure({sinks:{console:e.sinks.getOutputSink(D)},loggers:[{category:["laroux-bundler"],lowestLevel:z[b],sinks:["console"]}]});let[{build:A,createBuildContext:E},{loadConfig:O},{reactPlugin:B},{createTailwindPlugin:P}]=await Promise.all([import("./system-X4X6JD4X.js"),import("./load-config-OGSPRY4L.js"),import("./mod-XEK7FROU.js"),import("./mod-RO7WP3SA.js")]),T=e.logger.getLogger(["laroux-bundler","cli"]),s=await O(i),r={projectRoot:i,srcDir:n.path.resolve(i,s.srcDir),distDir:n.path.resolve(i,p),logLevel:b,fonts:s.fonts,images:s.images,cssModuleTypes:s.cssModuleTypes,noCssModuleAutoReference:s.noCssModuleAutoReference,browserShims:s.browserShims,serverExternals:s.build.serverExternals,build:{...s.build,minify:S}};if(h)try{await n.fs.remove(r.distDir,{recursive:!0}),T.debug(`Cleaned ${r.distDir}`)}catch{}let R=P({globalCssPath:n.path.resolve(i,"src/app/styles/global.css")}),j=E(r,{framework:B,css:R,bundlerBackend:"rolldown"});if(await A(j),await e.config.reset(),k){t.writeln(u(`
|
|
5
5
|
\u{1F4CA} Bundle Analysis:
|
|
6
6
|
`));try{let M=`${p}/client/manifest.json`,$=await n.fs.readTextFile(M),w=JSON.parse($);t.writeln(c("Chunks:"));for(let[a,l]of Object.entries(w.files)){let I=(l.size/1024).toFixed(2);t.writeln(c(` ${a.padEnd(30)} ${I.padStart(8)} KB`))}let F=Object.values(w.files).reduce((a,l)=>a+l.size,0);t.writeln(L(`
|
|
7
7
|
Total: ${(F/1024).toFixed(2)} KB`))}catch{t.writeln(C("Could not analyze build (manifest.json not found)"))}}return await t.close(),y(void 0)};export{N as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as k,d as D}from"./chunk-VW5QFRLO.js";import{k as C}from"./chunk-CDVYNW34.js";import{c as w,e as h,g as S,h as g,i as y}from"./chunk-EWECBFQO.js";import"./chunk-2XNFZXHY.js";import{f as u,h as d,k as f}from"./chunk-MBG7SPPO.js";import{d as l,f as n,g as m}from"./chunk-YVN2NZL4.js";import{a as p,b as i}from"./chunk-FFWPJP7A.js";import{i as o}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var R=async E=>{let e=u({renderer:f.ansi(),sink:d.stdout()}),r=o.process.cwd(),c=S(E);if(!c.ok)return e.writeln(n(c.error)),await e.close(),i({exitCode:1});let s;try{s=await h(r,c.spec)}catch(a){let I=a instanceof Error?a.message:String(a);return e.writeln(n(I)),await e.close(),i({exitCode:1})}if(s.phase==="IDLE"||s.phase==="UNINITIALIZED"||s.phase==="COMPLETED")return e.writeln(n(`Cannot cancel in phase: ${s.phase}`)),await e.close(),i({exitCode:1});if(s.spec!==null){let a=`${r}/${w.specDir(s.spec)}`;try{await o.fs.stat(a)}catch{return e.writeln(n(`Active spec '${s.spec}' directory not found.`)),e.writeln(l("Run `noskills reset` to return to IDLE.")),await e.close(),i({exitCode:1})}}let t=C(s,"cancelled");return await g(r,t),t.spec!==null&&await y(r,t.spec,t),t.spec!==null&&(await k(r,t.spec,"cancelled"),await D(r,t.spec,"cancelled")),e.writeln(m("\u2714")," Spec cancelled."),await e.close(),p(void 0)};export{R as main};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as R,b as A}from"./chunk-
|
|
2
|
+
import{a as R,b as A}from"./chunk-2UHHAPKY.js";import{a as w}from"./chunk-IBB6UZR2.js";import"./chunk-VNJJQED3.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-2XNFZXHY.js";import{a as x}from"./chunk-LFNUSULJ.js";import{a as y,c as v}from"./chunk-L7RS6MQ5.js";import{l as m}from"./chunk-JZ7DUWYC.js";import"./chunk-WF6JNPZS.js";import"./chunk-VAIRJES2.js";import"./chunk-J2Z7NG2X.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as h}from"./chunk-P2MUEKFT.js";import"./chunk-MBG7SPPO.js";import"./chunk-7DPLGQHN.js";import"./chunk-YVN2NZL4.js";import"./chunk-5MVJUALI.js";import{a as C}from"./chunk-MG65QJY6.js";import{g as u}from"./chunk-FFWPJP7A.js";import"./chunk-2BOCLC67.js";import"./chunk-7ATUODBM.js";import"./chunk-N7DXBY3O.js";import"./chunk-AP72BKVG.js";import{j as p}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var{ctx:f,output:q}=y(),$={feat:"Added",fix:"Fixed",refactor:"Changed",perf:"Changed",docs:"Changed",revert:"Removed"},E=new Set(["chore","ci","test"]),S=/^(\w+)(?:\(([^)]+)\))?!?:\s{1,5}(.+)$/,T=/\s{0,100}\(take\s{1,100}[IVXLCDM\d]+\)\s{0,100}\.?$/i,G=(t,o)=>{let n=t.match(S);if(n!==null)return{type:n[1].toLowerCase(),scope:n[2],message:n[3].trim(),hash:o}},O=t=>t.replace(T,"").trim(),N=t=>{let o=[];for(let n of t){let e=G(n.subject,n.hash);e!==void 0&&o.push(e)}return o},I=t=>{let o=new Set,n=[];for(let e of t){let s=O(e.message),a=s.replace(/[.\s]{1,20}$/,"").toLowerCase(),l=`${e.type}:${a}`;o.has(l)||(o.add(l),n.push({...e,message:s}))}return n},P=t=>{let o=new Map;for(let n of t){if(E.has(n.type))continue;let e=$[n.type];if(e===void 0)continue;let s=o.get(e);s!==void 0?s.push(n):o.set(e,[n])}return o},M=t=>t.scope!==void 0?`- **${t.scope}:** ${t.message}`:`- ${t.message}`,b=(t,o)=>{let n=P(o);if(n.size===0){let l=new Date().toISOString().split("T")[0];return`## ${t} - ${l}
|
|
3
3
|
|
|
4
4
|
_Maintenance release._`}let e=new Date().toISOString().split("T")[0],s=[`## ${t} - ${e}`],a=["Added","Changed","Fixed","Removed"];for(let l of a){let r=n.get(l);if(!(r===void 0||r.length===0)){s.push("",`### ${l}`,"");for(let d of r)s.push(M(d))}}return s.join(`
|
|
5
5
|
`)},k=(t,o,n)=>{let e=t.split(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as n}from"./chunk-3XJLLDR5.js";import{a as r}from"./chunk-
|
|
2
|
+
import{a as n}from"./chunk-3XJLLDR5.js";import{a as r}from"./chunk-UQRZJPYH.js";var o=r({name:"validate-json",description:"Validate JSON syntax",canFix:!1,stacks:[],defaults:{},extensions:["json","jsonc"],checkFile(e,a,t){if(a===void 0)return[];if((t.exclude??[]).some(s=>e.path.includes(s)))return[];try{return e.name.endsWith(".jsonc")?n(a):JSON.parse(a),[]}catch(s){let i=s instanceof SyntaxError?s.message:"invalid JSON";return[{path:e.path,message:i}]}}}),p=o.run,f=o.validator,x=o.main;export{o as a,p as b,f as c,x as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as u}from"./chunk-
|
|
2
|
+
import{c as u}from"./chunk-YURNTYEP.js";import{a as i,e as m}from"./chunk-J7YTWK67.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(`
|
|
3
3
|
`)});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(`
|
|
4
4
|
`)};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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as l}from"./chunk-
|
|
2
|
+
import{a as l}from"./chunk-UQRZJPYH.js";var p=new Set(["con","prn","aux","nul","com1","com2","com3","com4","com5","com6","com7","com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7","lpt8","lpt9"]),E=/^[a-z0-9_./[\]@-]+$/,u=/^[a-z0-9./[\]@-]+$/,g=[".claude/",".github/",".git/","CLAUDE.md","AGENTS.md","CHANGELOG.md","Makefile","Dockerfile","LICENSE","README.md","VERSION"],d=(o,s)=>{for(let e of s)if(e.includes("*")){let a=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]+");if(new RegExp(a).test(o))return!0}else if(o.includes(e)||o.endsWith(e))return!0;return!1},c=l({name:"validate-filenames",description:"Enforce filename conventions (kebab-case / snake_case)",canFix:!1,stacks:[],defaults:{},checkAll(o,s){let e=[],a=s.rules,f=s.exclude??g;for(let t of o){if(d(t.path,f))continue;let i=t.name,m=i.replace(/\.[^.]+$/,"");if(p.has(m.toLowerCase())){e.push({path:t.path,message:`Windows-reserved filename: ${i}`});continue}if(a!==void 0){let r=!1;for(let n of a)if(n.directory==="*"||t.path.includes(n.directory)){if(n.exclude!==void 0&&d(t.path,n.exclude)){r=!0;break}(n.convention==="snake_case"?E:u).test(i)||e.push({path:t.path,message:`filename must be ${n.convention}`}),r=!0;break}if(r)continue}u.test(i)||e.push({path:t.path,message:"filename must be kebab-case"})}return e}}),S=c.run,k=c.validator,v=c.main;export{c as a,S as b,k as c,v as d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{d as i}from"./chunk-
|
|
2
|
+
import{d as i}from"./chunk-5MVJUALI.js";var n="#%$".repeat(35),g=s=>{let e=s.split(n).map(t=>{let c=t.slice(0,40);t=t.slice(40);let r=t.indexOf(`
|
|
3
3
|
`);if(r<0)return{hash:c,subject:t.trim(),body:""};let o=t.slice(0,r).trim(),a=t.slice(r+1).trim();return{hash:c,subject:o,body:a}});return e.shift(),e},m=async()=>await i`git describe --tags --abbrev=0`.text();var l=async(s,e)=>{let t=`--pretty=format:${n}%H%B`,c=`${s}..${e}`,r=await i`git --no-pager log ${t} ${c}`.text();return g(r)};var p=async(s,e)=>{await i`git tag -a ${s} -m ${e}`.spawn()},h=async(s,e)=>{await i`git push ${s} ${e}`.spawn()};export{m as a,l as b,p as c,h as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as o}from"./chunk-
|
|
2
|
+
import{a as o}from"./chunk-UQRZJPYH.js";var a=1024,s=o({name:"validate-large-files",description:"Detect files exceeding size limit",canFix:!1,stacks:[],defaults:{maxKb:a},checkAll(n,r){let e=r.maxKb??a,l=e*1024,t=[];for(let i of n)if(i.size>l){let c=Math.round(i.size/1024);t.push({path:i.path,message:`file is ${c}KB (max: ${e}KB)`})}return t}}),d=s.run,f=s.validator,x=s.main;export{s as a,d as b,f as c,x as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as E,b as A,c as I}from"./chunk-
|
|
2
|
+
import{a as E,b as A,c as I}from"./chunk-IQQEVKBP.js";import{a as w}from"./chunk-LFNUSULJ.js";import{b as v}from"./chunk-L7RS6MQ5.js";import{f as D}from"./chunk-P2MUEKFT.js";import{b as l,f as g,g as k,h as C,i as h}from"./chunk-YVN2NZL4.js";import{g as a}from"./chunk-FFWPJP7A.js";import{j as b}from"./chunk-6VHZQNHX.js";var u=v(),O=/\/\*\*\s*([\s\S]*?)\s*\*\//g,R=/export\s+(const|function|class|type|interface)\s+(\w+)/g,$=/@example/,S=s=>{let n=[],i;for(R.lastIndex=0;(i=R.exec(s))!==null;){let e=i.index,t=i[2];if(t===void 0)continue;let c=s.substring(0,e).split(`
|
|
3
3
|
`).length,p=null,m=[...s.substring(0,e).matchAll(O)];if(m.length>0){let r=m[m.length-1];if(r!==void 0){let d=(r.index??0)+r[0].length,f=s.substring(d,e);/^\s*$/.test(f)&&(p=r[1]??null)}}n.push({jsdoc:p,symbolName:t,line:c})}return n},_=(s,n,i)=>{let e=[];if(s===null)return e.push("missing-description"),e;let t=s.split(`
|
|
4
4
|
`)[0]?.trim();return(!t||t.startsWith("@"))&&e.push("empty-description"),i&&!$.test(s)&&e.push("missing-example"),e},F=async(s={})=>{let{root:n=".",requireExamples:i=!1}=s,e=await E(n),t=[],o=0,c=0;for(let p of e){let y=await I(p.path);for(let m of y){let r=A(m,p.path),d;try{d=await b.runtime.fs.readTextFile(r)}catch{continue}o++;let f=S(d);for(let{jsdoc:T,symbolName:x,line:P}of f){c++;let M=_(T,x,i);for(let N of M)t.push({file:r,symbol:x,issue:N,line:P})}}}return{isValid:t.length===0,issues:t,filesChecked:o,symbolsChecked:c}},J=s=>{switch(s){case"missing-description":return"Missing JSDoc documentation";case"missing-param":return"Missing @param documentation";case"missing-returns":return"Missing @returns documentation";case"missing-example":return"Missing @example";case"empty-description":return"Empty description"}},j=s=>D.fromPromise(()=>F(s)),V=s=>a.ok({root:"."}),q=s=>{if(a.isFail(s))return u.writeln(g("\u2717"),l(" "+String(s.error))),a.fail({exitCode:1});let{value:n}=s;if(u.writeln(h("\u2139"),l(` Checked ${n.filesChecked} files, ${n.symbolsChecked} symbols.`)),!n.isValid){u.writeln(g("\u2717"),l(` Found ${n.issues.length} documentation issues:`));let i=new Map;for(let e of n.issues){let t=i.get(e.file)??[];t.push(e),i.set(e.file,t)}for(let[e,t]of i){u.writeln(C("\u26A0"),l(" "+e));for(let o of t){let c=o.line!==void 0?`:${o.line}`:"";u.writeln(h("\u2139"),l(` ${o.symbol}${c}: ${J(o.issue)}`))}}return a.fail({exitCode:1})}return u.writeln(k("\u2713"),l(" All documentation is valid.")),a.ok(void 0)},B=w.createTrigger({handler:j,adaptInput:V,adaptOutput:q}),Q=async s=>await B({command:"validate-docs",args:[],flags:{}});export{F as a,j as b,B as c,Q as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as w}from"./chunk-
|
|
2
|
+
import{a as w}from"./chunk-IQQEVKBP.js";import{a as v}from"./chunk-LFNUSULJ.js";import{b as y}from"./chunk-L7RS6MQ5.js";import{f as k}from"./chunk-P2MUEKFT.js";import{b as l,f,g as h,h as C,i as m}from"./chunk-YVN2NZL4.js";import{g as a}from"./chunk-FFWPJP7A.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as w}from"./chunk-
|
|
2
|
+
import{b as w}from"./chunk-L7RS6MQ5.js";import{b as r,f as n,g as h}from"./chunk-YVN2NZL4.js";import{a as y}from"./chunk-MG65QJY6.js";import{g as i}from"./chunk-FFWPJP7A.js";import{j as v}from"./chunk-6VHZQNHX.js";var m=w(),x=["ci","chore","docs","feat","fix","perf","refactor","revert","test"],C=/^(\w+)(?:\(([^)]+)\))?!?:\s{1,5}.+$/,M=(p,e={})=>{let o=e.allowAsterisk??!0,a=e.allowMultipleScopes??!0,c=e.forceScope??!1,f=new Set(e.types??x),s=[],l=p.split(`
|
|
3
3
|
`)[0]?.trim()??"";if(l==="")return{valid:!1,issues:["commit message is empty"]};if(l.startsWith("Merge "))return{valid:!0,issues:[]};let d=l.match(C);if(d===null)return s.push(`invalid format: expected "type(scope): message", got: "${l}"`),{valid:!1,issues:s};let g=d[1].toLowerCase(),t=d[2];return f.has(g)||s.push(`invalid type "${g}". Must be one of: ${[...f].join(", ")}`),c&&(t===void 0||t.trim()==="")&&s.push("scope is required: use type(scope): message"),t!==void 0&&t.trim()!==""&&(t==="*"&&!o&&s.push('wildcard scope "*" is not allowed (allowAsterisk is false)'),t.includes(",")&&(a?t.split(",").map(u=>u.trim()).filter(u=>u==="").length>0&&s.push("invalid scope: each comma-separated scope must be non-empty"):s.push("multiple scopes are not allowed (allowMultipleScopes is false)"))),{valid:s.length===0,issues:s}},_=async p=>{let e=y(p??[],{string:["message"],boolean:["help"],alias:{h:"help",m:"message"}});if(e.help)return console.log(`eser codebase validate-commit-msg \u2014 Validate conventional commit format
|
|
4
4
|
`),console.log("Usage:"),console.log(" eser codebase validate-commit-msg <commit-msg-file>"),console.log(" eser codebase validate-commit-msg --message 'feat(x): msg'"),i.ok(void 0);let o;if(e.message!==void 0)o=e.message;else if(e._.length>0)try{o=await v.runtime.fs.readTextFile(String(e._[0]))}catch{return m.writeln(n("\u2717"),r(` cannot read commit message file: ${e._[0]}`)),i.fail({exitCode:1})}else return m.writeln(n("\u2717"),r(" no commit message provided")),i.fail({exitCode:1});let a=M(o);if(a.valid)return m.writeln(h("\u2713"),r(" commit message is valid")),i.ok(void 0);for(let c of a.issues)m.writeln(n("\u2717"),r(" "+c));return i.fail({exitCode:1})};export{M as a,_ as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{j as p}from"./chunk-
|
|
2
|
+
import{j as p}from"./chunk-6VHZQNHX.js";import{d as g}from"./chunk-5WJ6AUNY.js";var y={};g(y,{CommandBuilder:()=>a,CommandError:()=>u,exec:()=>f,parseCommand:()=>l});var u=class extends Error{constructor(e,n,s,o){super(e);this.command=n;this.code=s;this.stderr=o;this.name="CommandError"}};var m=new TextDecoder,a=class r{#e;#r;#t;constructor(t,e=[],n={}){this.#e=t,this.#r=e,this.#t={throwOnError:!0,stdout:"piped",stderr:"piped",...n}}cwd(t){return new r(this.#e,this.#r,{...this.#t,cwd:t})}env(t,e){let n=this.#t.env??{},s;return typeof t=="string"&&e!==void 0?s={...n,[t]:e}:t!==null&&typeof t=="object"?s={...n,...t}:s=n,new r(this.#e,this.#r,{...this.#t,env:s})}stdin(t){return new r(this.#e,this.#r,{...this.#t,stdin:t})}stdout(t){return new r(this.#e,this.#r,{...this.#t,stdout:t})}stderr(t){return new r(this.#e,this.#r,{...this.#t,stderr:t})}timeout(t){return new r(this.#e,this.#r,{...this.#t,timeout:t})}noThrow(){return new r(this.#e,this.#r,{...this.#t,throwOnError:!1})}quiet(){return new r(this.#e,this.#r,{...this.#t,stdout:"null",stderr:"null"})}printCommand(){let t=[this.#e,...this.#r].join(" ");return console.log(`$ ${t}`),this}async spawn(){let{runtime:t}=p,e=await t.exec.spawn(this.#e,this.#r,{cwd:this.#t.cwd,env:this.#t.env,stdin:this.#t.stdin,stdout:this.#t.stdout,stderr:this.#t.stderr});if(!e.success&&this.#t.throwOnError===!0){let n=m.decode(e.stderr);throw new u(`Command failed with exit code ${e.code}: ${this.#e}`,this.#e,e.code,n)}return e}async text(t="stdout"){let e=await this.spawn();switch(t){case"stdout":return m.decode(e.stdout).trim();case"stderr":return m.decode(e.stderr).trim();case"combined":return(m.decode(e.stdout)+m.decode(e.stderr)).trim()}}async json(){let t=await this.text();return JSON.parse(t)}async lines(){let t=await this.text();return t===""?[]:t.split(`
|
|
3
3
|
`)}async bytes(){return(await this.spawn()).stdout}async code(){return(await this.noThrow().spawn()).code}pipe(t){return new h([this,t])}child(){let{runtime:t}=p;return t.exec.spawnChild(this.#e,this.#r,{cwd:this.#t.cwd,env:this.#t.env,stdin:this.#t.stdin??"piped",stdout:this.#t.stdout??"piped",stderr:this.#t.stderr??"piped"})}},h=class r{#e;constructor(t){this.#e=t}pipe(t){return new r([...this.#e,t])}async text(){let t="";for(let e of this.#e){let n=await e.spawn();t=m.decode(n.stdout)}return t.trim()}async lines(){let t=await this.text();return t===""?[]:t.split(`
|
|
4
4
|
`)}};var l=(r,t)=>{let e=[];for(let s=0;s<r.length;s++){let o=r[s];if(o!==void 0&&e.push(o),s<t.length){let i=t[s];Array.isArray(i)?e.push(i.map(c=>w(String(c))).join(" ")):i!=null&&e.push(w(String(i)))}}let n=e.join("").trim();return C(n)},w=r=>/[\s"'\\$`]/.test(r)?`'${r.replace(/'/g,"'\\''")}'`:r,C=r=>{let t=[],e="",n=!1,s=!1,o=!1;for(let c=0;c<r.length;c++){let d=r[c];if(o){e+=d,o=!1;continue}if(d==="\\"){o=!0;continue}if(d==="'"&&!s){n=!n;continue}if(d==='"'&&!n){s=!s;continue}if(d===" "&&!n&&!s){e.length>0&&(t.push(e),e="");continue}e+=d}e.length>0&&t.push(e);let i=t[0];return i===void 0?["",[]]:[i,t.slice(1)]};var f=(r,...t)=>{let[e,n]=l(r,t);return new a(e,n)};export{u as a,a as b,l as c,f as d,y as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{i as d}from"./chunk-
|
|
2
|
+
import{i as d}from"./chunk-6VHZQNHX.js";var l=[["go.mod","go"],["deno.json","deno"],["deno.jsonc","deno"],["package.json","node"]],g=async r=>{for(let[c,n]of l)try{return await d.fs.stat(`${r}/${c}`),{type:n,configFile:c}}catch{}return{type:"unknown",configFile:void 0}},f=(r,c)=>{let n=[],t=[],e=r.dependencies;if(e===void 0)return{instructions:n,warnings:t};let i=r.language,o=c.type;if(o!=="unknown"&&(i==="go"&&o==="go"||i==="typescript"&&(o==="deno"||o==="node")||i==="javascript"&&(o==="deno"||o==="node")||t.push(`Recipe '${r.name}' is for ${i}, but detected ${o} project (${c.configFile}).`)),e.go!==void 0&&e.go.length>0)for(let s of e.go)n.push(`go get ${s}`);if(e.jsr!==void 0&&e.jsr.length>0)for(let s of e.jsr)n.push(`deno add ${s}`);if(e.npm!==void 0&&e.npm.length>0)for(let s of e.npm)n.push(`npm install ${s}`);return{instructions:n,warnings:t}},y=async(r,c,n)=>{let t=[];for(let e of r){if(n?.dryRun===!0){t.push({command:e,success:!0});continue}n?.verbose===!0&&console.log(` [install] ${e}`);let i=e.split(/\s+/),o=i[0],s=i.slice(1);try{let a=await d.exec.spawn(o,s,{cwd:c,stdout:"inherit",stderr:"inherit"});if(!a.success){t.push({command:e,success:!1,error:`Exit code ${a.code}`});break}t.push({command:e,success:!0})}catch(a){let u=a instanceof Error?a.message:String(a);t.push({command:e,success:!1,error:u});break}}return t};export{g as a,f as b,y as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as B,c as L}from"./chunk-6E6JUBFH.js";import{a as P,b,c as w,d as O,e as E,f as I,g as a,h as N,i as _,j as W,k as $,l as F,m as p,n as j,o as S,p as A,q as T,y as M}from"./chunk-BQT5RJZB.js";import{d as Q}from"./chunk-5WJ6AUNY.js";var U={};Q(U,{AlreadyExistsError:()=>w,NotFoundError:()=>b,ProcessError:()=>O,RuntimeCapabilityError:()=>P,buildCommand:()=>R,clearWorkerdEnv:()=>L,createRuntime:()=>H,detectExecutionContext:()=>y,detectInvoker:()=>h,detectRuntime:()=>a,getArch:()=>j,getCliPrefix:()=>J,getHomedir:()=>S,getPlatform:()=>p,getPlatformInfo:()=>T,getRuntimeVersion:()=>N,getTmpdir:()=>A,isBrowser:()=>W,isCommandInPath:()=>v,isEdge:()=>F,isRuntime:()=>_,isServer:()=>$,matchCliPrefix:()=>D,populateEnvFromContext:()=>B,posixPath:()=>I,resolvePathDirs:()=>g,runtime:()=>i,toPosix:()=>E});var g=(e,n)=>{let t=n==="windows"?";":":";return e.split(t).filter(r=>r.length>0)},l=new Set(["deno","node","bun"]),h=(e,n,t,r,o,s)=>{let d=l.has(e)?e:n;if(!l.has(d))return{invoker:"binary",mode:"installed"};if(d==="bun")return r.BUN_INSTALL!==void 0?{invoker:"bun",mode:"installed"}:{invoker:"bunx",mode:"on-demand"};if(d==="node"){let m=t[1]??"";if(m.includes("_npx")||m.includes("/npx"))return{invoker:"npx",mode:"on-demand"};if(m.includes("pnpm")||m.includes("pnpx"))return{invoker:"pnpx",mode:"on-demand"};let c=r.npm_execpath??"";return c.includes("npx")?{invoker:"npx",mode:"on-demand"}:c.includes("pnpm")?{invoker:"pnpx",mode:"on-demand"}:(r.npm_config_user_agent??"").includes("pnpm")?{invoker:"pnpm",mode:"installed"}:{invoker:"npm",mode:"installed"}}return d==="deno"?o!==void 0&&(o.startsWith("jsr:")||o.startsWith("https:"))?{invoker:"deno",mode:"on-demand"}:s===!0?{invoker:"dev",mode:"dev"}:{invoker:"deno",mode:"installed"}:{invoker:"unknown",mode:"installed"}},R=(e,n,t)=>e==="npx"?`npx ${t.npmPackage}`:e==="pnpx"?`pnpx ${t.npmPackage}`:e==="bunx"?`bunx ${t.npmPackage}`:e==="deno"&&n==="on-demand"?`deno run --allow-all jsr:${t.jsrPackage}`:e==="dev"?t.devCommand:t.command,v=async e=>{let n=p(),t=n==="windows"?`${e}.exe`:e,r=i.env.get("PATH")??"",o=g(r,n);for(let s of o)try{return await i.fs.stat(i.path.join(s,t)),!0}catch{continue}return!1},D=(e,n)=>{for(let t of e){let r=n.indexOf(t);if(r>=0)return n.slice(0,r+1).join(" ");let o=n.findIndex(s=>s.endsWith(`/${t}`)||s.endsWith(`\\${t}`)||s.includes(`:${t}`));if(o>=0)return n.slice(0,o+1).join(" ")}},J=async(e,n)=>{let t=await y(e),r=i.process.argv;for(let o of n){if(r.includes(o))return`${t.command} ${o}`;if(r.some(d=>d.endsWith(`/${o}`)||d.endsWith(`\\${o}`)||d.includes(`:${o}`)))return t.command}},y=async e=>{let n=i.path.basename(i.process.execPath()),t=a(),r=i.process.argv,o=import.meta.url,s=l.has(n)?n:t,d={BUN_INSTALL:i.env.get("BUN_INSTALL"),npm_execpath:i.env.get("npm_execpath"),npm_config_user_agent:i.env.get("npm_config_user_agent")},m=!1;if(s==="deno"&&o.startsWith("file://")){let k=i.process.cwd();try{let x=i.path.join(k,"deno.json"),C=await i.fs.readTextFile(x),u=JSON.parse(C).tasks;u!==void 0&&"cli"in u&&(m=!0)}catch{}if(!m)try{let x=i.path.join(k,"package.json"),C=await i.fs.readTextFile(x),u=JSON.parse(C).scripts;u!==void 0&&"cli"in u&&(m=!0)}catch{}}let{invoker:c,mode:f}=h(n,t,r,d,o,m),K=l.has(s)?s:"compiled",q=R(c,f,e),z=await v(e.command);return{runtime:K,mode:f,invoker:c,command:q,isInPath:z}};var V={deno:async()=>(await import("./deno-
|
|
2
|
+
import{b as B,c as L}from"./chunk-6E6JUBFH.js";import{a as P,b,c as w,d as O,e as E,f as I,g as a,h as N,i as _,j as W,k as $,l as F,m as p,n as j,o as S,p as A,q as T,y as M}from"./chunk-BQT5RJZB.js";import{d as Q}from"./chunk-5WJ6AUNY.js";var U={};Q(U,{AlreadyExistsError:()=>w,NotFoundError:()=>b,ProcessError:()=>O,RuntimeCapabilityError:()=>P,buildCommand:()=>R,clearWorkerdEnv:()=>L,createRuntime:()=>H,detectExecutionContext:()=>y,detectInvoker:()=>h,detectRuntime:()=>a,getArch:()=>j,getCliPrefix:()=>J,getHomedir:()=>S,getPlatform:()=>p,getPlatformInfo:()=>T,getRuntimeVersion:()=>N,getTmpdir:()=>A,isBrowser:()=>W,isCommandInPath:()=>v,isEdge:()=>F,isRuntime:()=>_,isServer:()=>$,matchCliPrefix:()=>D,populateEnvFromContext:()=>B,posixPath:()=>I,resolvePathDirs:()=>g,runtime:()=>i,toPosix:()=>E});var g=(e,n)=>{let t=n==="windows"?";":":";return e.split(t).filter(r=>r.length>0)},l=new Set(["deno","node","bun"]),h=(e,n,t,r,o,s)=>{let d=l.has(e)?e:n;if(!l.has(d))return{invoker:"binary",mode:"installed"};if(d==="bun")return r.BUN_INSTALL!==void 0?{invoker:"bun",mode:"installed"}:{invoker:"bunx",mode:"on-demand"};if(d==="node"){let m=t[1]??"";if(m.includes("_npx")||m.includes("/npx"))return{invoker:"npx",mode:"on-demand"};if(m.includes("pnpm")||m.includes("pnpx"))return{invoker:"pnpx",mode:"on-demand"};let c=r.npm_execpath??"";return c.includes("npx")?{invoker:"npx",mode:"on-demand"}:c.includes("pnpm")?{invoker:"pnpx",mode:"on-demand"}:(r.npm_config_user_agent??"").includes("pnpm")?{invoker:"pnpm",mode:"installed"}:{invoker:"npm",mode:"installed"}}return d==="deno"?o!==void 0&&(o.startsWith("jsr:")||o.startsWith("https:"))?{invoker:"deno",mode:"on-demand"}:s===!0?{invoker:"dev",mode:"dev"}:{invoker:"deno",mode:"installed"}:{invoker:"unknown",mode:"installed"}},R=(e,n,t)=>e==="npx"?`npx ${t.npmPackage}`:e==="pnpx"?`pnpx ${t.npmPackage}`:e==="bunx"?`bunx ${t.npmPackage}`:e==="deno"&&n==="on-demand"?`deno run --allow-all jsr:${t.jsrPackage}`:e==="dev"?t.devCommand:t.command,v=async e=>{let n=p(),t=n==="windows"?`${e}.exe`:e,r=i.env.get("PATH")??"",o=g(r,n);for(let s of o)try{return await i.fs.stat(i.path.join(s,t)),!0}catch{continue}return!1},D=(e,n)=>{for(let t of e){let r=n.indexOf(t);if(r>=0)return n.slice(0,r+1).join(" ");let o=n.findIndex(s=>s.endsWith(`/${t}`)||s.endsWith(`\\${t}`)||s.includes(`:${t}`));if(o>=0)return n.slice(0,o+1).join(" ")}},J=async(e,n)=>{let t=await y(e),r=i.process.argv;for(let o of n){if(r.includes(o))return`${t.command} ${o}`;if(r.some(d=>d.endsWith(`/${o}`)||d.endsWith(`\\${o}`)||d.includes(`:${o}`)))return t.command}},y=async e=>{let n=i.path.basename(i.process.execPath()),t=a(),r=i.process.argv,o=import.meta.url,s=l.has(n)?n:t,d={BUN_INSTALL:i.env.get("BUN_INSTALL"),npm_execpath:i.env.get("npm_execpath"),npm_config_user_agent:i.env.get("npm_config_user_agent")},m=!1;if(s==="deno"&&o.startsWith("file://")){let k=i.process.cwd();try{let x=i.path.join(k,"deno.json"),C=await i.fs.readTextFile(x),u=JSON.parse(C).tasks;u!==void 0&&"cli"in u&&(m=!0)}catch{}if(!m)try{let x=i.path.join(k,"package.json"),C=await i.fs.readTextFile(x),u=JSON.parse(C).scripts;u!==void 0&&"cli"in u&&(m=!0)}catch{}}let{invoker:c,mode:f}=h(n,t,r,d,o,m),K=l.has(s)?s:"compiled",q=R(c,f,e),z=await v(e.command);return{runtime:K,mode:f,invoker:c,command:q,isInPath:z}};var V={deno:async()=>(await import("./deno-I5YAWOB6.js")).createDenoRuntime(),node:async()=>(await import("./node-ZGM6SXXI.js")).createNodeRuntime(),bun:async()=>(await import("./bun-HIMXX54I.js")).createBunRuntime(),workerd:async()=>(await import("./workerd-LOWXXQEU.js")).createWorkerdRuntime(),browser:async()=>(await import("./browser-JGBNWUEQ.js")).createBrowserRuntime()},X=["fs","exec","env","path","process"],Y=e=>e!==void 0&&X.some(n=>e[n]!==void 0),Z=(e,n,t)=>({name:e.name,version:e.version,capabilities:t,fs:n.fs??e.fs,path:n.path??e.path,exec:n.exec??e.exec,env:n.env??e.env,process:n.process??e.process}),H=async e=>{let n=a(),t=V[n],r=t!==void 0?await t():M(n),o=e?.capabilities?{...r.capabilities,...e.capabilities}:r.capabilities;return e!==void 0&&Y(e)?Z(r,e,o):e?.capabilities?{...r,capabilities:o}:r},i=await H();export{g as a,h as b,R as c,v as d,D as e,J as f,y as g,H as h,i,U as j};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as h,b as u,c as S,d as k,e as g,f as m,g as f}from"./chunk-
|
|
2
|
+
import{a as h,b as u,c as S,d as k,e as g,f as m,g as f}from"./chunk-YURNTYEP.js";import{a as c}from"./chunk-J7YTWK67.js";var y=class{capabilities=["text_generation","streaming"];provider="opencode";modelId;binary;config;constructor(e,r){this.binary=e,this.config=r,this.modelId=r.model}async generateText(e,r){let o=w(this.config,e,"json"),i=f(e.messages,e.system);o.push("-p",i);let s=u(this.binary,o,{signal:r}),l=g(s.stderr),t=await k(s.stdout,this.modelId),p=await s.waitForExit(),a=await l,d=m("opencode",p.code,a);if(d!==null)throw d;return t}async*streamText(e,r){let o=w(this.config,e,"stream-json"),i=f(e.messages,e.system);o.push("-p",i);let s=u(this.binary,o,{signal:r}),l=g(s.stderr);try{for await(let d of S(s.stdout)){let x=v(d);x!==null&&(yield x)}let t=await s.waitForExit(),p=await l,a=m("opencode",t.code,p);a!==null&&(yield{kind:"error",error:a})}catch(t){t instanceof c?yield{kind:"error",error:t}:yield{kind:"error",error:new c(t instanceof Error?t.message:String(t),{provider:"opencode",cause:t instanceof Error?t:void 0})}}}close(){return Promise.resolve()}getRawClient(){return null}},b={provider:"opencode",async createModel(n){let e=await h("opencode",n);return new y(e,n)}},w=(n,e,r)=>{let o=["--output-format",r];o.push("--model",n.model),e.maxTokens!==void 0&&o.push("--max-tokens",String(e.maxTokens));let i=n.properties?.args;return i!==void 0&&o.push(...i),o},v=n=>{if(n===null||typeof n!="object")return null;let e=n;if(e.type==="content_block_delta"||e.type==="assistant"){let r=e.delta?.text??e.message?.content?.[0]?.text;return r!==void 0?{kind:"content_delta",textDelta:r}:null}return e.type==="result"||e.done===!0?{kind:"message_done",stopReason:"end_turn",usage:{inputTokens:e.usage?.input_tokens??0,outputTokens:e.usage?.output_tokens??0,totalTokens:(e.usage?.input_tokens??0)+(e.usage?.output_tokens??0)}}:e.type==="error"?{kind:"error",error:new c(e.error?.message??"Unknown OpenCode error",{provider:"opencode"})}:e.content!==void 0&&typeof e.content=="string"?{kind:"content_delta",textDelta:e.content}:null};export{y as a,b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as b,b as G,c as R}from"./chunk-
|
|
2
|
+
import{a as b,b as G,c as R}from"./chunk-EXP2TZZC.js";import{e as ee}from"./chunk-J2Z7NG2X.js";import{f as p,h as u,k as d}from"./chunk-MBG7SPPO.js";import{b as r,d as i,f as w,g as C,h as Z,k as l}from"./chunk-YVN2NZL4.js";import{d as y}from"./chunk-5MVJUALI.js";import{a as k}from"./chunk-B2ANQEQO.js";import{a as f,b as g}from"./chunk-FFWPJP7A.js";import{g as T,i as m}from"./chunk-6VHZQNHX.js";import{g as ie,m as O,n as J,o as I,p as le}from"./chunk-BQT5RJZB.js";var de="# eser CLI completions",B="eser",te=async e=>{try{return await m.fs.readTextFile(e)}catch{return""}},me=async e=>{try{return await m.fs.stat(e),!0}catch{return!1}},se=async e=>{let t=R(e,B);if(t.completionType==="file")return await me(t.completionsFile);let s=await te(t.rcFile),n=G(e,B);return s.includes(n)},ne=async e=>{let t=R(e,B),s=p({renderer:d.ansi(),sink:u.stdout()});try{if(t.completionType==="file"){let n=t.completionsFile,o=m.path.dirname(n);try{await m.fs.mkdir(o,{recursive:!0})}catch{}await m.fs.writeTextFile(n,`# eser CLI completions
|
|
3
3
|
# This file is auto-generated. Run 'eser system completions --shell fish' to regenerate.
|
|
4
4
|
complete -c eser -f
|
|
5
5
|
complete -c eser -n "__fish_use_subcommand" -a "codebase" -d "Codebase management tools"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
var r={name:"@eser/cli",version:"4.1.
|
|
2
|
+
var r={name:"@eser/cli",version:"4.1.42",type:"module",exports:"./main.ts",bin:{eser:"./bin.ts"},dependencies:{"@eser/ai":"workspace:*","@eser/codebase":"workspace:*","@eser/kit":"workspace:*","@eser/noskills":"workspace:*","@eser/laroux-server":"workspace:*","@eser/workflows":"workspace:*","@eser/functions":"workspace:*","@eser/logging":"workspace:*","@eser/shell":"workspace:*","@eser/standards":"workspace:*","@std/cli":"npm:@jsr/std__cli@^1.0.25","@std/fmt":"npm:@jsr/std__fmt@^1.0.8"},devDependencies:{"@std/assert":"npm:@jsr/std__assert@^1.0.16",esbuild:"^0.27.3"}};export{r as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{m as w,o as R}from"./chunk-
|
|
2
|
+
import{m as w,o as R}from"./chunk-GKOMIH2B.js";import{i as g}from"./chunk-6VHZQNHX.js";var p=class extends Error{constructor(r){super(`Required variable '${r}' has no value and no default`),this.name="MissingVariableError"}},m=(e,r)=>{let t={};for(let n of e){let a=r[n.name];if(a!==void 0)t[n.name]=a;else if(n.default!==void 0)t[n.name]=n.default;else throw new p(n.name)}return t},v=(e,r)=>e.replace(/\{\{\s*\.(\w+)\s*\}\}/g,(t,n)=>n in r?r[n]:t);var y=class extends Error{constructor(r){super(`Circular dependency detected: ${r.join(" \u2192 ")}`),this.name="CyclicDependencyError"}},f=class extends Error{constructor(r,t){super(`Recipe '${r}' requires '${t}', which is not in the registry`),this.name="MissingDependencyError"}},b=(e,r)=>{let t=new Map;for(let s of r)t.set(s.name,s);if(t.get(e)===void 0)throw new f("<root>",e);let a=[],i=new Set,o=new Set,l=(s,d)=>{if(i.has(s))return;if(o.has(s))throw new y([...d,s]);let c=t.get(s);if(c===void 0)throw new f(d[d.length-1]??"<root>",s);if(o.add(s),c.requires!==void 0)for(let u of c.requires)l(u,[...d,s]);o.delete(s),i.add(s),a.push(c)};return l(e,[]),a};var $=(e,r)=>{let t=e.endsWith("/")?e:`${e}/`,n=new URL(r,`file://${t}`).pathname;return n.startsWith(t)||n===e},x=async e=>{let r=e.split("/");r.pop();let t=r.join("/");t!==""&&t!=="."&&await g.fs.mkdir(t,{recursive:!0})},h=async e=>{try{return await g.fs.stat(e),!0}catch{return!1}},k=(e,r)=>r===void 0||Object.keys(r).length===0?e:v(e,r),F=async(e,r,t,n)=>{let a=`${r.cwd}/${e.target}`;if(n.includes(e.target))return;if(r.skipExisting===!0&&await h(a)){r.verbose===!0&&console.log(` [skip] ${e.target} (already exists)`),n.push(e.target);return}if(r.dryRun===!0){console.log(` [dry-run] would write ${e.target}`),t.push(e.target);return}r.verbose===!0&&console.log(` [write] ${e.target}`);let i=await w(r.registryUrl,e.source),o=k(i,r.variables);await x(a),await g.fs.writeTextFile(a,o),t.push(e.target)},E=async(e,r,t,n)=>{let a=await R(r.registryUrl,e.source);for(let i of a){let o=`${e.target}/${i.path}`;if(!$(r.cwd,o))throw new Error(`Folder recipe contains path traversal in '${o}'. Aborting.`)}for(let i of a){let o=`${e.target}/${i.path}`,l=`${r.cwd}/${o}`;if(r.skipExisting===!0&&await h(l)){n.push(o);continue}if(r.dryRun===!0){console.log(` [dry-run] would write ${o}`),t.push(o);continue}r.verbose===!0&&console.log(` [write] ${o}`);let s=k(i.content,r.variables);await x(l),await g.fs.writeTextFile(l,s),t.push(o)}},S=async(e,r,t,n)=>{let a=[];for(let i of e){if(t===!0){console.log(` [dry-run] would run: ${i}`),a.push(i);continue}n===!0&&console.log(` [post-install] ${i}`);let o=i.split(/\s+/),l=await g.exec.spawn(o[0],o.slice(1),{cwd:r,stdout:"inherit",stderr:"inherit"});if(!l.success)throw new Error(`Post-install command failed: '${i}' (exit code ${l.code})`);a.push(i)}return a},q=async(e,r)=>{let t=[],n=[],a=e.files.length,i=r.variables;e.variables!==void 0&&e.variables.length>0&&(i=m(e.variables,r.variables??{}));let o={...r,variables:i};for(let s of e.files)if((s.kind??"file")==="file"&&!$(r.cwd,s.target))throw new Error(`Recipe '${e.name}' contains path traversal in target '${s.target}'. Aborting.`);if(r.force!==!0&&r.skipExisting!==!0)for(let s of e.files){if((s.kind??"file")!=="file")continue;let c=`${r.cwd}/${s.target}`;await h(c)&&(r.dryRun===!0?console.log(` [conflict] ${s.target} (already exists)`):(console.warn(` Warning: ${s.target} already exists. Use --force to overwrite or --skip-existing to skip.`),n.push(s.target)))}for(let s of e.files){let d=s.kind??"file";try{d==="folder"?await E(s,o,t,n):await F(s,o,t,n)}catch(c){let u=c instanceof Error?c.message:String(c);throw new Error(`Failed applying '${s.target}'. ${t.length} files written so far. Retry with \`eser kit add ${e.name} --force\`. Cause: ${u}`)}}let l=[];return e.postInstall!==void 0&&e.postInstall.length>0&&(l=await S(e.postInstall,r.cwd,r.dryRun,r.verbose)),{written:t,skipped:n,total:a,postInstallRan:l}},V=async(e,r,t)=>{let n=b(e,r),a=[];for(let i of n){t.verbose===!0&&console.log(`
|
|
3
3
|
Applying recipe: ${i.name}`);let o=await q(i,t);a.push({name:i.name,result:o})}return{recipes:a}};export{$ as a,h as b,k as c,S as d,q as e,V as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as o}from"./chunk-
|
|
2
|
+
import{a as o}from"./chunk-UQRZJPYH.js";var a=o({name:"validate-shebangs",description:"Validate shebang/executable consistency",canFix:!1,stacks:[],defaults:{},checkFile(t,i){return[]}}),r=a.run,l=a.validator,c=a.main;export{a,r as b,l as c,c as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{c as o}from"./chunk-EWECBFQO.js";var a={UNINITIALIZED:["IDLE"],IDLE:["DISCOVERY","COMPLETED"],DISCOVERY:["DISCOVERY_REVIEW","COMPLETED"],DISCOVERY_REVIEW:["DISCOVERY_REVIEW","SPEC_DRAFT","COMPLETED"],SPEC_DRAFT:["SPEC_DRAFT","SPEC_APPROVED","COMPLETED"],SPEC_APPROVED:["EXECUTING","COMPLETED"],EXECUTING:["COMPLETED","BLOCKED"],BLOCKED:["EXECUTING","COMPLETED"],COMPLETED:["IDLE","DISCOVERY"]},c=(e,t)=>a[e].includes(t),s=(e,t)=>{if(!c(e,t))throw new Error(`Invalid phase transition: ${e} \u2192 ${t}. Allowed: ${a[e].join(", ")}`)},h=(e,t)=>(s(e.phase,t),{...e,phase:t}),E=(e,t,n)=>(s(e.phase,"DISCOVERY"),{...e,phase:"DISCOVERY",spec:t,branch:n,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human"},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[]}),u=(e,t,n)=>{if(e.phase!=="DISCOVERY"&&e.phase!=="DISCOVERY_REVIEW")throw new Error(`Cannot add discovery answer in phase: ${e.phase}`);let i=[...e.discovery.answers.filter(r=>r.questionId!==t),{questionId:t,answer:n}];return{...e,discovery:{...e.discovery,answers:i}}},m=e=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot complete discovery in phase: ${e.phase}`);return{...e,phase:"DISCOVERY_REVIEW",discovery:{...e.discovery,completed:!0},specState:{path:o.specFile(e.spec),status:"draft"}}},d=e=>(s(e.phase,"SPEC_DRAFT"),{...e,phase:"SPEC_DRAFT"}),S=e=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot advance discovery question in phase: ${e.phase}`);return{...e,discovery:{...e.discovery,currentQuestion:e.discovery.currentQuestion+1}}},C=e=>(s(e.phase,"SPEC_APPROVED"),{...e,phase:"SPEC_APPROVED",specState:{...e.specState,status:"approved"}}),D=e=>(s(e.phase,"EXECUTING"),{...e,phase:"EXECUTING",discovery:{answers:[],completed:!0,currentQuestion:0,audience:"human"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]}});var I=(e,t)=>(s(e.phase,"BLOCKED"),{...e,phase:"BLOCKED",execution:{...e.execution,lastProgress:`BLOCKED: ${t}`}}),P=(e,t)=>({...e,decisions:[...e.decisions,t]}),R=(e,t,n)=>(s(e.phase,"COMPLETED"),{...e,phase:"COMPLETED",completionReason:t,completedAt:new Date().toISOString(),completionNote:n??null}),F=e=>{if(e.phase!=="COMPLETED")throw new Error(`Cannot reopen in phase: ${e.phase}`);return{...e,phase:"DISCOVERY",reopenedFrom:e.completionReason,completionReason:null,completedAt:null,completionNote:null,discovery:{...e.discovery,completed:!1,currentQuestion:0},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},classification:null}},O=e=>({...e,phase:"IDLE",spec:null,branch:null,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human"},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[],classification:null,completionReason:null,completedAt:null,completionNote:null,reopenedFrom:null});export{h as a,E as b,u as c,m as d,d as e,S as f,C as g,D as h,I as i,P as j,R as k,F as l,O as m};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{d as g}from"./chunk-NBA6EFWU.js";import{d as p}from"./chunk-
|
|
2
|
+
import{d as g}from"./chunk-NBA6EFWU.js";import{d as p}from"./chunk-5MVJUALI.js";import{i as o}from"./chunk-6VHZQNHX.js";var m=[/node_modules/,/\.git\//,/\/dist\//,/etc\/coverage/,/etc\/temp/,/\.output\//],x=async t=>{try{let n=await p`git ls-files --cached --others --exclude-standard`.cwd(t).noThrow().lines();return n.length>0?n:null}catch{return null}},k=async(t={})=>{let{root:n=".",extensions:e,exclude:s=[]}=t,l=[...m,...s.map(r=>typeof r=="string"?new RegExp(r):r)],u=[],d=await x(n);if(d!==null)for(let r of d){let i=o.path.join(n,r),c=o.path.basename(r);if(e!==void 0&&e.length>0&&!g(r,e)||l.some(a=>a.test(i)||a.test(r)))continue;let y=0,f=!1;try{let a=await o.fs.lstat(i);if(y=a.size,f=a.isSymlink,a.isDirectory&&!(t.includeDirs??!1))continue}catch{continue}u.push({path:i,name:c,size:y,isSymlink:f})}else for await(let r of o.fs.walk(n,{includeDirs:t.includeDirs??!1,includeFiles:!0,exts:e,skip:l})){if(!r.isFile&&!r.isSymlink)continue;let i=0;try{i=(await o.fs.stat(r.path)).size}catch{continue}u.push({path:r.path,name:r.name,size:i,isSymlink:r.isSymlink})}if(t.includeOnly!==void 0&&t.includeOnly.length>0){let r=t.includeOnly;return u.filter(i=>r.some(c=>i.path.endsWith(c)||i.path.includes(c)))}return u},B=async t=>{if(t.textContent!==void 0)return t.textContent;try{let n=await h(t);if(w(n))return;let e=new TextDecoder().decode(n);return t.textContent=e,e}catch{return}},h=async t=>{if(t.rawBytes!==void 0)return t.rawBytes;let n=await o.fs.readFile(t.path);return t.rawBytes=n,n},w=t=>{let n=Math.min(t.length,8192);for(let e=0;e<n;e++)if(t[e]===0)return!0;return!1},M=(t,n)=>{for(let e of n)if(typeof e=="string"){if(t.includes(e)||t.endsWith(e))return!0}else if(e.test(t))return!0;return!1},b=(t,n)=>{let e=new Map;for(let s of n)e.set(s.path,s);for(let s of t){let l=e.get(s.path);l!==void 0&&(s.textContent=l.newContent,s.rawBytes=void 0)}},D=async t=>{let n=0;for(let e of t)e.oldContent!==e.newContent&&(await o.fs.writeTextFile(e.path,e.newContent),n++);return n};export{m as a,k as b,B as c,h as d,w as e,M as f,b as g,D as h};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as o}from"./chunk-
|
|
2
|
+
import{a as o}from"./chunk-UQRZJPYH.js";import{a as l}from"./chunk-2XNFZXHY.js";import{e as n}from"./chunk-5WJ6AUNY.js";var i=n(l(),1);var a=o({name:"validate-yaml",description:"Validate YAML syntax",canFix:!1,stacks:[],defaults:{},extensions:["yml","yaml"],checkFile(e,r){if(r===void 0)return[];try{return i.parse(r),[]}catch(t){let s=t instanceof Error?t.message:"invalid YAML";return[{path:e.path,message:s}]}}}),d=a.run,u=a.validator,f=a.main;export{a,d as b,u as c,f as d};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as D}from"./chunk-2XNFZXHY.js";import{i as s}from"./chunk-6VHZQNHX.js";import{e as w}from"./chunk-5WJ6AUNY.js";var m=()=>({version:"0.1.0",phase:"IDLE",spec:null,branch:null,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human"},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[],lastCalledAt:null,classification:null,completionReason:null,completedAt:null,completionNote:null,reopenedFrom:null}),b=(e,t,r,n)=>({concerns:e,tools:t,providers:r,project:n,maxIterationsBeforeRestart:15,verifyCommand:null,allowGit:!1,command:"npx eser@latest noskills"});var a=w(D(),1);var i=".eser",l=`${i}/.state`,f=`${l}/state.json`,g=`${i}/manifest.yml`,d=`${i}/concerns`,h=`${i}/rules`,p=`${i}/specs`,x=`${i}/workflows`,y=`${l}/specs`,F=`${l}/active.json`,c={eserDir:i,stateDir:l,stateFile:f,manifestFile:g,concernsDir:d,rulesDir:h,specsDir:p,workflowsDir:x,specStatesDir:y,activeFile:F,specDir:e=>`${p}/${e}`,specFile:e=>`${p}/${e}/spec.md`,specStateFile:e=>`${y}/${e}.json`,concernFile:e=>`${d}/${e}.json`,eserGitignore:`${i}/.gitignore`},S=async e=>{let t=`${e}/${f}`;try{let r=await s.fs.readTextFile(t);return JSON.parse(r)}catch{return m()}},E=async(e,t)=>{if(t==null)return S(e);let r=`${e}/${c.specDir(t)}`;try{await s.fs.stat(r)}catch{throw new Error(`Spec '${t}' not found. Run \`noskills spec list\` to see available specs.`)}let n=await v(e,t);if(n.spec===t)return n;let o=await S(e);return o.spec===t?o:{...n,spec:t}},I=e=>{if(e===void 0)return null;for(let t of e)if(t.startsWith("--spec="))return t.slice(7);return null},R=e=>{let t=I(e);return t===null||t.length===0?{ok:!1,error:"Error: --spec=<name> is required. Use `noskills spec list` to see available specs."}:{ok:!0,spec:t}},P=async(e,t)=>{let r=`${e}/${l}`,n=`${e}/${f}`;await s.fs.mkdir(r,{recursive:!0}),await s.fs.writeTextFile(n,JSON.stringify(t,null,2)+`
|
|
3
|
+
`)};var v=async(e,t)=>{let r=`${e}/${c.specStateFile(t)}`;try{let n=await s.fs.readTextFile(r);return JSON.parse(n)}catch{return m()}},C=async(e,t,r)=>{let n=`${e}/${y}`,o=`${e}/${c.specStateFile(t)}`;await s.fs.mkdir(n,{recursive:!0}),await s.fs.writeTextFile(o,JSON.stringify(r,null,2)+`
|
|
4
|
+
`)},k=async e=>{let t=`${e}/${y}`,r=[];try{for await(let n of s.fs.readDir(t))if(n.isFile&&n.name.endsWith(".json")){let o=n.name.replace(/\.json$/,""),u=await s.fs.readTextFile(`${t}/${n.name}`);r.push({name:o,state:JSON.parse(u)})}}catch{}return r},A=async e=>{let t=`${e}/${g}`;try{let r=await s.fs.readTextFile(t),n=a.parse(r);return n?.noskills===void 0?null:n.noskills}catch{return null}},N=async(e,t)=>{let r=`${e}/${g}`,n;try{let u=await s.fs.readTextFile(r);n=a.parseDocument(u)}catch{n=new a.Document({})}let o=n.createNode(t);o.commentBefore=" noskills orchestrator \u2014 inline comments in this section won't be preserved on next write",n.set("noskills",o),await s.fs.writeTextFile(r,n.toString())},O=async(e,t)=>{let r=`${e}/${c.concernFile(t)}`;try{let n=await s.fs.readTextFile(r);return JSON.parse(n)}catch{return null}},_=async(e,t)=>{let r=`${e}/${d}`,n=`${e}/${c.concernFile(t.id)}`;await s.fs.mkdir(r,{recursive:!0}),await s.fs.writeTextFile(n,JSON.stringify(t,null,2)+`
|
|
5
|
+
`)},j=async e=>{let t=`${e}/${d}`,r=[];try{for await(let n of s.fs.readDir(t))if(n.isFile&&n.name.endsWith(".json")){let o=await s.fs.readTextFile(`${t}/${n.name}`);r.push(JSON.parse(o))}}catch{}return r},L=async e=>{let t=[i,l,y,d,h,p,x];for(let n of t)await s.fs.mkdir(`${e}/${n}`,{recursive:!0});let r=`${e}/${c.eserGitignore}`;try{await s.fs.stat(r)}catch{await s.fs.writeTextFile(r,`# eser toolchain runtime state \u2014 not tracked by git
|
|
6
|
+
.state/
|
|
7
|
+
`)}},M=async(e,t)=>{await P(e,t),t.spec!==null&&await C(e,t.spec,t)},V=async e=>{try{let t=await s.fs.readTextFile(`${e}/${g}`);return a.parse(t)?.noskills!==void 0}catch{return!1}};export{m as a,b,c,S as d,E as e,I as f,R as g,P as h,C as i,k as j,A as k,N as l,O as m,_ as n,j as o,L as p,M as q,V as r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{i as o}from"./chunk-
|
|
2
|
+
import{i as o}from"./chunk-6VHZQNHX.js";var r=()=>o.env.get("HOME")??"",l=()=>{let e=o.env.get("SHELL")??"";return e.includes("zsh")?"zsh":e.includes("fish")?"fish":"bash"},s=e=>{let t=r();switch(e){case"zsh":return o.path.join(t,".zshrc");case"bash":return o.path.join(t,".bashrc");case"fish":return o.path.join(t,".config","fish","config.fish")}},c=(e,t)=>{let n=r();switch(e){case"zsh":return o.path.join(n,".zshrc");case"bash":return o.path.join(n,".bashrc");case"fish":return o.path.join(n,".config","fish","completions",`${t}.fish`)}},g=(e,t)=>`eval "$(${t} system completions --shell ${e})"`,a=e=>e==="fish"?"file":"eval",p=(e,t="eser")=>{let n=e??l(),i=a(n);return{shell:n,rcFile:s(n),completionType:i,completionsFile:i==="file"?c(n,t):void 0}},f=[{envVars:["CLAUDE_CODE","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_SESSION_ID"],tool:"claude-code"},{envVars:["CURSOR_SESSION","CURSOR"],tool:"cursor"},{envVars:["KIRO_SESSION","KIRO"],tool:"kiro"},{envVars:["WINDSURF_SESSION"],tool:"windsurf"},{envVars:["GITHUB_COPILOT"],tool:"copilot"}],h=()=>{for(let e of f)for(let t of e.envVars){let n=o.env.get(t);if(n!==void 0&&n!=="")return e.tool}return null},u=()=>h()!==null?"agent":"human";export{l as a,g as b,p as c,h as d,u as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{i as c}from"./chunk-
|
|
2
|
+
import{i as c}from"./chunk-6VHZQNHX.js";var R=["registry/v1"],$=["file","folder"],b=["local","github"],E=r=>r==="project"||r==="structure"||r==="utility",F=r=>{if(typeof r!="object"||r===null)return!1;let e=r;return!(typeof e.source!="string"||typeof e.target!="string"||e.kind!==void 0&&!$.includes(e.kind)||e.provider!==void 0&&!b.includes(e.provider))},S=r=>{if(typeof r!="object"||r===null)return!1;let e=r;return!(e.go!==void 0&&!Array.isArray(e.go)||e.jsr!==void 0&&!Array.isArray(e.jsr)||e.npm!==void 0&&!Array.isArray(e.npm))},k=r=>{if(typeof r!="object"||r===null)return!1;let e=r;return!(typeof e.name!="string"||e.name===""||typeof e.description!="string"||e.default!==void 0&&typeof e.default!="string"||e.prompt!==void 0&&typeof e.prompt!="string")},u=r=>{if(typeof r!="object"||r===null)return!1;let e=r;if(typeof e.name!="string"||e.name===""||typeof e.description!="string"||typeof e.language!="string"||!E(e.scale)||!Array.isArray(e.files)||e.files.length===0)return!1;for(let n of e.files)if(!F(n))return!1;if(e.dependencies!==void 0&&!S(e.dependencies)||e.tags!==void 0&&!Array.isArray(e.tags))return!1;if(e.requires!==void 0){if(!Array.isArray(e.requires))return!1;for(let n of e.requires)if(typeof n!="string")return!1}if(e.variables!==void 0){if(!Array.isArray(e.variables))return!1;for(let n of e.variables)if(!k(n))return!1}if(e.postInstall!==void 0){if(!Array.isArray(e.postInstall))return!1;for(let n of e.postInstall)if(typeof n!="string")return!1}return!0},g=r=>{if(typeof r!="object"||r===null)throw new Error("Registry manifest must be a JSON object");let e=r;if(e.$schema!==void 0){let i=String(e.$schema);R.some(s=>i.includes(s))||console.warn(`Warning: Registry uses unknown schema "${i}". This CLI supports v1.`)}if(typeof e.name!="string"||e.name==="")throw new Error("Registry manifest requires a non-empty 'name' field");if(typeof e.description!="string")throw new Error("Registry manifest requires a 'description' field");if(typeof e.author!="string")throw new Error("Registry manifest requires an 'author' field");if(typeof e.registryUrl!="string"||e.registryUrl==="")throw new Error("Registry manifest requires a non-empty 'registryUrl' field");if(!Array.isArray(e.recipes))throw new Error("Registry manifest requires a 'recipes' array");for(let i of e.recipes)if(!u(i)){let o=typeof i=="object"&&i!==null?i.name??"<unknown>":"<invalid>";throw new Error(`Invalid recipe definition: '${o}'`)}let n=e.recipes,t=new Set;for(let i of n){if(t.has(i.name))throw new Error(`Duplicate recipe name '${i.name}' in registry`);t.add(i.name)}return r},y=r=>{if(!u(r))throw new Error("Invalid recipe definition");return r},h=(r,e)=>{let n=r.replace(/\/{1,20}$/,""),t=e.replace(/^\/{1,20}/,"");return`${n}/${t}`};var P=3e4,T="eser",v="stack",m="main",p=".eser/recipes.json",j=`https://raw.githubusercontent.com/${T}/${v}/${m}/.eser/recipes.json`,D=p,x=r=>{let e=r.replace(/^gh:/,""),n=e.indexOf("#"),t=n===-1?e:e.slice(0,n),i=n===-1?void 0:e.slice(n+1);if(t.includes("/")){let o=t.indexOf("/"),s=t.slice(0,o),f=t.slice(o+1);return s===""||f===""?{kind:"name",name:t,ref:i}:{kind:"repo",owner:s,repo:f,ref:i??m}}return{kind:"name",name:t,ref:i}},l=async r=>await globalThis.fetch(r,{signal:AbortSignal.timeout(P)}),I=async()=>{let r=c.process.cwd();for(let e=0;e<10;e++){let n=`${r}/${p}`;try{return await c.fs.stat(n),n}catch{let t=r.replace(/\/[^/]+$/,"");if(t===r)break;r=t}}},_=async(r,e)=>{let n=r??j;if(e?.local===!0&&r===void 0){let s=await I();s!==void 0&&(n=s,e?.verbose===!0&&console.log(`Using local registry: ${s}`))}let t=n.startsWith("http://")||n.startsWith("https://");e?.verbose===!0&&console.log(`Fetching registry from: ${n}`);let i;if(t){let s=await l(n);if(!s.ok)throw new Error(`Could not reach registry at ${n}. HTTP ${s.status}`);i=await s.text()}else try{i=await c.fs.readTextFile(n)}catch{throw new Error(`Could not read registry file at ${n}`)}let o;try{o=JSON.parse(i)}catch{throw new Error(`Registry at ${n} is not valid JSON`)}return g(o)},C=async(r,e,n,t)=>{let i=`https://raw.githubusercontent.com/${r}/${e}/${n}/${p}`;return await _(i,t)},M=async(r,e)=>{let n=h(r,e),t=await l(n);if(!t.ok)throw new Error(`Could not fetch recipe file at ${n}. HTTP ${t.status}`);return await t.text()},U=r=>{let e=r.match(/^https:\/\/raw\.githubusercontent\.com\/([^/]+)\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(e!==null)return{owner:e[1],repo:e[2],ref:e[3],basePath:e[4]??""}},q=async(r,e)=>{let n=U(r);if(n===void 0)throw new Error(`Cannot fetch folder: registry URL '${r}' is not a GitHub raw URL`);let t=n.basePath?`${n.basePath}/${e}`.replace(/\/+/g,"/"):e,i=`https://api.github.com/repos/${n.owner}/${n.repo}/contents/${t}?ref=${n.ref}`,o=await l(i);if(!o.ok)throw new Error(`Could not list folder '${t}' from ${n.owner}/${n.repo}. HTTP ${o.status}`);let s=await o.json();if(!Array.isArray(s))throw new Error(`Expected directory listing for '${t}', got a file instead`);let w=s.filter(a=>a.type==="file").map(async a=>{if(a.download_url===null)throw new Error(`File '${a.path}' has no download URL (may be too large)`);let d=await l(a.download_url);if(!d.ok)throw new Error(`Could not fetch file '${a.path}'. HTTP ${d.status}`);return{path:a.path.startsWith(t)?a.path.slice(t.length).replace(/^\//,""):a.path,content:await d.text()}});return await Promise.all(w)},H=async(r,e,n="main",t="recipe.json")=>{let i=`https://raw.githubusercontent.com/${r}/${e}/${n}/${t}`,o=await l(i);if(!o.ok)throw new Error(`Could not fetch recipe from ${r}/${e}@${n}/${t}. HTTP ${o.status}`);let s;try{s=JSON.parse(await o.text())}catch{throw new Error(`Recipe file at ${r}/${e}@${n}/${t} is not valid JSON`)}return y(s)};export{P as a,T as b,v as c,m as d,p as e,j as f,D as g,x as h,l as i,I as j,_ as k,C as l,M as m,U as n,q as o,H as p};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as r}from"./chunk-
|
|
2
|
+
import{a as r}from"./chunk-UQRZJPYH.js";var n=r({name:"validate-eof",description:"Ensure files end with exactly one newline",canFix:!0,stacks:[],defaults:{},checkFile(i,e){return e===void 0?[]:e.length===0?[]:e.endsWith(`
|
|
3
3
|
`)?e.endsWith(`
|
|
4
4
|
|
|
5
5
|
`)?[{path:i.path,message:"file has multiple trailing newlines"}]:[]:[{path:i.path,message:"file does not end with a newline"}]},fixFile(i,e){if(e.length===0)return;let t=`${e.replace(/\n+$/,"")}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{a as ge,b as me,d as X,e as Ye,f as et,g as tt,h as U}from"./chunk-V6YI7YJ4.js";import{n as $e}from"./chunk-VVWAUS3D.js";import{a as nt}from"./chunk-LSET5TD3.js";import{c as fe}from"./chunk-VNJJQED3.js";import{a as pe,b as re,c as z,d as Be}from"./chunk-NBA6EFWU.js";import{e as S}from"./chunk-5DWJ7WEE.js";import{i as o}from"./chunk-6VHZQNHX.js";import{e as H,i as Qe}from"./chunk-BQT5RJZB.js";var I=S.getLogger(["laroux-bundler","server-action-transform"]);function mn(e,t){return`${e.replace(/\.[cm]?[jt]sx?$/,"")}#${t}`}function hn(e,t){let n=mn(e,t);return`Object.defineProperties(${t}, {
|
|
3
3
|
$$typeof: { value: Symbol.for("react.server.reference"), enumerable: false },
|
|
4
4
|
$$id: { value: "${n}", enumerable: false },
|
|
5
5
|
$$bound: { value: null, enumerable: false, writable: true }
|
|
@@ -125,4 +125,4 @@ ${l}`),{success:!1,clientBundle:"",moduleMap:{},clientComponents:0,duration:perf
|
|
|
125
125
|
</html>
|
|
126
126
|
`,{forceInclude:[/^\.flex/,/^\.grid/,/^\.block/,/^\.inline/,/^\.items-/,/^\.justify-/,/^\.gap-/,/^\.space-/,/^\.min-h-/,/^\.max-w-/,/^\.w-/,/^\.h-/,/^\.mx-/,/^\.my-/,/^\.px-/,/^\.py-/,/^\.p-/,/^\.m-/,/^\.mt-/,/^\.mb-/,/^\.ml-/,/^\.mr-/,/^\.pt-/,/^\.pb-/,/^\.pl-/,/^\.pr-/,/^\.sm:/,/^\.md:/,/^\.lg:/,/^\.xl:/,/^\.2xl:/,/^\.bg-neutral-/,/^\.bg-surface/,/^\.bg-primary-/,/^\.text-neutral-/,/^\.text-primary-/,/^\.text-white/,/^\.border/,/^\.rounded/,/^\.text-sm/,/^\.text-lg/,/^\.text-xl/,/^\.text-2xl/,/^\.text-3xl/,/^\.text-4xl/,/^\.text-5xl/,/^\.font-/,/^\.leading-/,/^\.overflow-/,/^\.visible/,/^\.invisible/,/^\.hidden/,/^\.relative/,/^\.absolute/,/^\.fixed/,/^\.sticky/,/^\.shadow/,/^html/,/^body/,/^#root/,/^\*/]}),a=o.path.resolve(t,"styles.critical.css"),c=o.path.resolve(t,"styles.deferred.css");await o.fs.writeTextFile(a,i.critical),await o.fs.writeTextFile(c,i.deferred);let u=i.stats;return u?g.debug(`\u2713 Critical CSS extracted: ${u.criticalSize} bytes critical, ${u.deferredSize} bytes deferred`):g.debug("\u2713 Critical CSS extracted"),{criticalPath:a,deferredPath:c}}catch(r){return g.error("Critical CSS extraction failed:",{error:r}),null}}async function Cr(e,t){if(!e.extractUniversalCss)return g.debug("CSS plugin doesn't support universal CSS extraction, skipping"),null;let n=o.path.resolve(t,"styles.css");if(!await o.fs.exists(n))return g.debug("No styles.css found, skipping universal CSS generation"),null;try{let r=await o.fs.readTextFile(n),s=e.extractUniversalCss(r),i=o.path.resolve(t,"styles.universal.css");return await o.fs.writeTextFile(i,s.css),g.debug(`\u2713 Universal CSS generated: ${s.css.length} bytes`),i}catch(r){return g.error("Universal CSS generation failed:",{error:r}),null}}async function vr(e,t){if(await o.fs.exists(e))if(t){g.debug("\u{1F9F9} Cleaning build directory (preserving CSS)");let n=o.path.resolve(e,G);await o.fs.exists(n)&&await o.fs.remove(n,{recursive:!0});let r=o.path.resolve(e,ke);if(await o.fs.exists(r))for await(let s of o.fs.readDir(r)){if(s.name.endsWith(".css")||s.name==="fonts"||s.name==="fonts.css"||s.name==="font-preloads.json")continue;let i=o.path.resolve(r,s.name);await o.fs.remove(i,{recursive:!0})}}else await o.fs.remove(e,{recursive:!0}),g.debug("\u{1F9F9} Cleaned build directory")}async function Sr(e,t){let r=Ve(t)[0];if(!r){g.debug("\u2713 No fonts configured, skipping font optimization");return}let s=o.path.resolve(e,"fonts"),i="/fonts";try{let a=await He(r,s,i),c=o.path.resolve(e,"fonts.css");await o.fs.writeTextFile(c,a.fontFaceCSS);let u=o.path.resolve(e,"font-preloads.json");await o.fs.writeTextFile(u,JSON.stringify(a.preloadHints,null,2)),g.debug(`\u2713 Fonts optimized: ${a.files.length} file(s), ${(a.totalSize/1024).toFixed(2)} KB`)}catch(a){g.error("Font optimization failed:",{error:a}),g.warn("Continuing build without font optimization")}}async function qe(e){let t=[];async function n(r){for await(let s of o.fs.readDir(r)){let i=o.path.resolve(r,s.name);s.isDirectory?await n(i):s.isFile&&s.name.endsWith(".module.css")&&t.push(i)}}return await n(e),t}async function an(e,t,n,r){let s=r?.cssModulePaths??await qe(n.srcDir);if(s.length===0)return g.debug("No CSS modules found, skipping CSS module processing"),new Map;g.debug(`Found ${s.length} CSS module(s)`);try{let i=await Ke(s,{generateDTS:n.cssModuleTypes,projectRoot:e,cache:r?.cache});for(let[a,c]of i)await nn(a,c,t,{skipCss:r?.skipCss,projectRoot:e});return g.debug(`\u2713 Processed ${s.length} CSS module(s)${n.cssModuleTypes?" with TypeScript definitions":""}`),i}catch(i){throw g.error("CSS module processing failed:",{error:i}),i}}async function ln(e,t,n){let r=0;for(let s of e){let i=o.path.relative(t,s),a=o.path.basename(s)+".json",c=o.path.join(t,o.path.dirname(i),a),u=o.path.join(n,o.path.dirname(i),a);await o.fs.ensureDir(o.path.dirname(u));try{await U(c,u,{overwrite:!0}),r++}catch(l){g.warn(` \u26A0 Failed to copy JSON for ${o.path.relative(t,s)}:`,{error:l})}}r>0&&g.debug(`\u2713 Copied ${r} CSS module JSON file(s)`)}async function Rr(e,t,n,r){if(e.length===0)return;let s;r?s=r:s=await Ke(e,{generateDTS:!1,projectRoot:t});let i=[];for(let[,a]of s)i.push(a.code);if(i.length>0){let a=o.path.resolve(n,"styles.css"),c="";try{c=await o.fs.readTextFile(a)}catch{}c=c.replace(/\x1B\[[0-9;]*[a-zA-Z]/g,"");let u=i.map(p=>p.replace(/\x1B\[[0-9;]*[a-zA-Z]/g,"")),l=c+`
|
|
127
127
|
`+u.join(`
|
|
128
|
-
`);await o.fs.writeTextFile(a,l),g.debug(`\u2713 Appended ${i.length} CSS module(s) to styles.css`)}}async function Pr(e,t,n){let{optimizeImages:r,scanImages:s}=await import("./mod-
|
|
128
|
+
`);await o.fs.writeTextFile(a,l),g.debug(`\u2713 Appended ${i.length} CSS module(s) to styles.css`)}}async function Pr(e,t,n){let{optimizeImages:r,scanImages:s}=await import("./mod-U2MNO6EC.js"),i=o.path.resolve(e,"public"),a=o.path.resolve(i,"images");if(!await o.fs.exists(a)){g.debug("\u2713 No images directory found, skipping image optimization");return}if((await s(a)).length===0){g.debug("\u2713 No images found, skipping image optimization");return}try{let u=o.path.resolve(t,"images"),l=await r(a,u,"/images",{formats:n.images.formats,widths:n.images.widths,quality:n.images.quality,generateBlurPlaceholder:n.images.placeholder==="blur"}),p=Object.keys(l.images).length;p>0&&g.debug(`\u2713 Optimized ${p} image(s)`)}catch(u){g.error("Image optimization failed:",{error:u}),g.warn("Continuing build without image optimization")}}export{Pe as a,_s as b,ai as c,dn as d,li as e,ui as f};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as w}from"./chunk-
|
|
2
|
+
import{b as w}from"./chunk-OWQXQ33F.js";import{a as p}from"./chunk-2XNFZXHY.js";import{b as c}from"./chunk-5MVJUALI.js";import{e as y}from"./chunk-5WJ6AUNY.js";var C=()=>{let e=new Map;return{register:o=>{e.set(o.name,o)},registerAll:o=>{for(let r of o)e.set(r.name,r)},get:o=>e.get(o),getAll:()=>[...e.values()],has:o=>e.has(o),names:()=>[...e.keys()]}};var k=y(p(),1);var h=e=>{let o=e.workflows;if(!Array.isArray(o))throw new Error("Invalid config: 'workflows' must be an array");for(let r=0;r<o.length;r++){let n=o[r],t=n?.id!==void 0&&n.id!==""?`workflow '${n.id}'`:`workflow at index ${r}`;if(typeof n?.id!="string"||n.id==="")throw new Error(`Invalid config: ${t} must have a non-empty 'id' string`);if(!Array.isArray(n.on)||n.on.length===0)throw new Error(`Invalid config: ${t} must have a non-empty 'on' array`);if(!Array.isArray(n.steps)||n.steps.length===0)throw new Error(`Invalid config: ${t} must have a non-empty 'steps' array`);for(let s=0;s<n.steps.length;s++){let i=n.steps[s];if(typeof i=="string")continue;if(typeof i!="object"||i===null||Array.isArray(i))throw new Error(`Invalid config: ${t}, step ${s} must be a string or an object with exactly one key`);let l=Object.keys(i);if(l.length!==1)throw new Error(`Invalid config: ${t}, step ${s} must be an object with exactly one key (got ${l.length})`)}}};var b=async e=>{let o=await w(e);if(o===null)return null;let r={stack:o.stack,workflows:o.workflows??[],scripts:o.scripts};return h(r),r};var I={name:"shell",description:"Execute shell commands",run:async e=>{let o=e.command,r=e.fixCommand,n=e.name??o??"shell",t=e.fix??!1,s=e.root??".",i=e.workingDirectory??s;if(o===void 0||o.length===0)throw new Error(`Shell tool requires a 'command' option. Usage: { shell: { command: "deno fmt --check" } }`);let l=t&&r!==void 0?r:o,a=await new c("sh",["-c",l]).cwd(i).noThrow().spawn(),f=a.code;if(f===0)return{name:n,passed:!0,issues:[],mutations:[],stats:{exitCode:0}};let d=new TextDecoder,g=d.decode(a.stderr).trim(),m=[d.decode(a.stdout).trim(),g].filter(u=>u.length>0).join(`
|
|
3
3
|
`);return{name:n,passed:!1,issues:[{message:m||`Command exited with code ${f}`}],mutations:[],stats:{exitCode:f}}}};export{C as a,b,I as c};
|