scip-query 0.19.6 → 0.19.8
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/CHANGELOG.md +37 -0
- package/README.md +28 -15
- package/dist/augment-vue-worker.js +1 -1
- package/dist/chunk-2465DLHK.js +3 -0
- package/dist/{chunk-2CVXCGL4.js → chunk-24GTWJ3N.js} +2 -2
- package/dist/{chunk-XVJ3V7LM.js → chunk-2SNGN6U4.js} +2 -2
- package/dist/{chunk-FKGN4A4E.js → chunk-2U3OLUNJ.js} +2 -2
- package/dist/{chunk-UUJBLG6J.js → chunk-33KUO7CG.js} +2 -2
- package/dist/{chunk-N3SE646F.js → chunk-33XTHFKR.js} +2 -2
- package/dist/{chunk-WXAAURU7.js → chunk-3EDFLQ6A.js} +2 -2
- package/dist/chunk-3ZSJ3PWF.js +16 -0
- package/dist/{chunk-G4UQL4CP.js → chunk-43KC6EQZ.js} +2 -2
- package/dist/{chunk-NQLSSVOB.js → chunk-464PLI5O.js} +2 -2
- package/dist/chunk-46XGSFNI.js +2 -0
- package/dist/{chunk-NN4ZIRPK.js → chunk-47BU5Z4T.js} +2 -2
- package/dist/chunk-4BV4QAZJ.js +5 -0
- package/dist/chunk-4YTUWQ6M.js +18 -0
- package/dist/{chunk-LMFVTUW2.js → chunk-5ML2BNRH.js} +2 -2
- package/dist/{chunk-OP3MTFJR.js → chunk-5YLUDDAF.js} +2 -2
- package/dist/chunk-67QRR5YC.js +6 -0
- package/dist/{chunk-273W2U4Y.js → chunk-6GXYN7YA.js} +2 -2
- package/dist/{chunk-JELJLXEE.js → chunk-6M7RONVB.js} +2 -2
- package/dist/{chunk-MLGTCX56.js → chunk-7FT5Y65S.js} +2 -2
- package/dist/{chunk-F42A3AKG.js → chunk-7KYNAMMH.js} +2 -2
- package/dist/{chunk-VP542C25.js → chunk-7LSVMFX7.js} +2 -2
- package/dist/{chunk-YWB2EBNB.js → chunk-7QHY3H7P.js} +2 -2
- package/dist/{chunk-UQK5CRUK.js → chunk-7RAG65VK.js} +2 -2
- package/dist/{chunk-CYJM7CYF.js → chunk-7SWJEWJF.js} +2 -2
- package/dist/{chunk-47X75ZKH.js → chunk-7VCOXZH3.js} +2 -2
- package/dist/chunk-A2TNXAXO.js +8 -0
- package/dist/{chunk-TYQ76QHQ.js → chunk-A3QXWFBK.js} +2 -2
- package/dist/{chunk-S2GP3CU3.js → chunk-AA4UWRNL.js} +2 -2
- package/dist/{chunk-OBKDTVZ3.js → chunk-ACAM6O5R.js} +2 -2
- package/dist/chunk-AQOFWNQJ.js +1 -0
- package/dist/chunk-AZFUMCQB.js +2 -0
- package/dist/{chunk-IYAOX36F.js → chunk-BDOIKGDI.js} +2 -2
- package/dist/{chunk-7E3TH5ZN.js → chunk-BNXICU42.js} +2 -2
- package/dist/chunk-C5Q44Q5D.js +3 -0
- package/dist/{chunk-OQ2A4G2G.js → chunk-CTF2GDEX.js} +2 -2
- package/dist/chunk-DHEQMPLW.js +2 -0
- package/dist/{chunk-EVOC5I5I.js → chunk-DQBCO2UY.js} +2 -2
- package/dist/{chunk-YLVE3SXZ.js → chunk-DQGSM7RZ.js} +2 -2
- package/dist/chunk-E2LAW7SL.js +30 -0
- package/dist/chunk-E3HYEQO7.js +2 -0
- package/dist/chunk-E4NFOAD4.js +6 -0
- package/dist/chunk-E5HNT4X2.js +3 -0
- package/dist/{chunk-6XHTISLI.js → chunk-ELLMY7XJ.js} +2 -2
- package/dist/chunk-FD3HFKXR.js +5 -0
- package/dist/{chunk-RJHCPSZ7.js → chunk-FIJCV235.js} +2 -2
- package/dist/{chunk-KLVJABXA.js → chunk-FJ5UDTQF.js} +2 -2
- package/dist/{chunk-SHKZ7OVJ.js → chunk-GHKEJTCE.js} +2 -2
- package/dist/{chunk-JERWGHQT.js → chunk-GLZTVKAB.js} +3 -3
- package/dist/{chunk-A43URCQ3.js → chunk-GNC4JVAN.js} +2 -2
- package/dist/chunk-HIB452NU.js +949 -0
- package/dist/{chunk-U5CNPPTZ.js → chunk-HZYDQPNY.js} +2 -2
- package/dist/chunk-IF6FP6B2.js +66 -0
- package/dist/{chunk-CSTYYXKC.js → chunk-JAY7YWS3.js} +2 -2
- package/dist/{chunk-6XFC7PQ5.js → chunk-JHF3E4YM.js} +2 -2
- package/dist/chunk-JORHF5AL.js +108 -0
- package/dist/{chunk-QBYYWGAT.js → chunk-K2WO7XY7.js} +2 -2
- package/dist/chunk-KFZNKUNT.js +2 -0
- package/dist/{chunk-J7VT2CRB.js → chunk-KJ2IIBZN.js} +2 -2
- package/dist/{chunk-336DC5NJ.js → chunk-KKME5ZAI.js} +2 -2
- package/dist/chunk-KSGTULOS.js +9 -0
- package/dist/{chunk-E2ZXPB7J.js → chunk-KXDJAG4N.js} +3 -3
- package/dist/{chunk-Z2LHPIOM.js → chunk-L4S2A7BV.js} +2 -2
- package/dist/chunk-LP3ARJKF.js +8 -0
- package/dist/chunk-LSOR3LQG.js +3 -0
- package/dist/{chunk-FHCTEANE.js → chunk-MLFZP76A.js} +2 -2
- package/dist/{chunk-RBFFD4V2.js → chunk-MNSTUIDD.js} +2 -2
- package/dist/{chunk-3OIKRYU5.js → chunk-MSBDMFER.js} +2 -2
- package/dist/{chunk-7LABSJSR.js → chunk-MZZBAITE.js} +5 -5
- package/dist/{chunk-QQWOFXNW.js → chunk-NE3TZUCI.js} +2 -2
- package/dist/{chunk-JZNLMHWY.js → chunk-NTUMF2X3.js} +2 -2
- package/dist/{chunk-DD5BOU5I.js → chunk-O23I56NA.js} +2 -2
- package/dist/{chunk-YHXBD52M.js → chunk-O3O4XXO6.js} +2 -2
- package/dist/{chunk-FQTPPXNA.js → chunk-OUBAF226.js} +2 -2
- package/dist/chunk-P3UO3EH3.js +2 -0
- package/dist/{chunk-5OC3HWP5.js → chunk-QGGLL3UH.js} +2 -2
- package/dist/chunk-QIQ63BHW.js +16 -0
- package/dist/{chunk-RWRLUZ6U.js → chunk-QJIVBYEK.js} +2 -2
- package/dist/chunk-QOXBSI6G.js +20 -0
- package/dist/{chunk-7Q6VYYCH.js → chunk-QXK6UUSM.js} +2 -2
- package/dist/{chunk-ZTTISZ7J.js → chunk-RA3AYNWP.js} +2 -2
- package/dist/chunk-RJMDJR3A.js +2 -0
- package/dist/{chunk-TFUU5MQQ.js → chunk-RLH5VUMG.js} +2 -2
- package/dist/{chunk-OHWZKLVA.js → chunk-S4S2WOIX.js} +2 -2
- package/dist/{chunk-YTUD45PU.js → chunk-SERUIGV5.js} +2 -2
- package/dist/{chunk-2OXVAGGT.js → chunk-SMQWE25B.js} +2 -2
- package/dist/{chunk-K42M2KWT.js → chunk-TAVELHYR.js} +2 -2
- package/dist/{chunk-MGBJHRFB.js → chunk-TWMJ3Y3G.js} +2 -2
- package/dist/chunk-VAXNI5NE.js +146 -0
- package/dist/chunk-VVY2G5ET.js +2 -0
- package/dist/{chunk-XF3KLXN3.js → chunk-W3DBTGL4.js} +2 -2
- package/dist/{chunk-26X7KCJR.js → chunk-WANA4KAQ.js} +2 -2
- package/dist/chunk-WJL2L6MV.js +60 -0
- package/dist/chunk-WUW7YUAH.js +11 -0
- package/dist/{chunk-PC44K7RF.js → chunk-WWKWUPSU.js} +2 -2
- package/dist/{chunk-2EZSOTSY.js → chunk-WY45BHKQ.js} +2 -2
- package/dist/chunk-X4FR5BZF.js +9 -0
- package/dist/chunk-X6RKPDY7.js +2 -0
- package/dist/{chunk-GK3GRUJX.js → chunk-YLFORA5G.js} +2 -2
- package/dist/{chunk-NBRUH7OE.js → chunk-YTVWB7YJ.js} +2 -2
- package/dist/{chunk-YGQN3XGZ.js → chunk-ZCEJ63SP.js} +2 -2
- package/dist/{chunk-2GSQR6YA.js → chunk-ZJ5CBXK3.js} +2 -2
- package/dist/chunk-ZL2OGDCD.js +2 -0
- package/dist/cli.js +8 -3
- package/dist/command-descriptors-ZW5J4ZEM.js +631 -0
- package/dist/{config-types-BWQ5xPGI.d.ts → config-types-B6MEoRNy.d.ts} +4 -0
- package/dist/{db-B0r1o7Vt.d.ts → db-DYLKr9Wn.d.ts} +1 -1
- package/dist/direct-navigation-42YHQPOI.js +3 -0
- package/dist/{health-CFnlCiTz.d.ts → health-DgxIDXJC.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/postinstall.js +1 -1
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +2 -2
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +2 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +2 -2
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-gate.d.ts +2 -2
- package/dist/queries/diff-gate.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +3 -3
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +2 -2
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +2 -2
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +26 -25
- package/dist/reindex.d.ts +7 -3
- package/dist/reindex.js +34 -33
- package/dist/runtime.d.ts +3 -10
- package/dist/runtime.js +3 -3
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-DCvnlZCu.d.ts → scip-cli-Cc6c00-a.d.ts} +2 -2
- package/dist/watch-server.js +5 -5
- package/docs/AGENT_GUIDE.md +19 -3
- package/docs/CLI_JSON_OUTPUT.md +86 -1
- package/docs/COMMAND_REFERENCE.md +5 -3
- package/docs/SECURITY_MODEL.md +129 -0
- package/docs/TELEMETRY_RETENTION.md +5 -0
- package/docs/schemas/cli-output-page.schema.json +104 -0
- package/package.json +8 -7
- package/skills/_shared/SKILL.md +4 -2
- package/skills/scip-audit/SKILL.md +3 -2
- package/skills/scip-explore/SKILL.md +1 -1
- package/skills/scip-improve/SKILL.md +1 -1
- package/skills/scip-plan/SKILL.md +1 -1
- package/skills/scip-verify/SKILL.md +7 -2
- package/dist/chunk-24QNP7MN.js +0 -2
- package/dist/chunk-2ZOCHAL2.js +0 -8
- package/dist/chunk-35SQLYCQ.js +0 -2
- package/dist/chunk-4CGVLUDP.js +0 -18
- package/dist/chunk-4RI4BJGT.js +0 -8
- package/dist/chunk-52HQTTPB.js +0 -2
- package/dist/chunk-A63U2W3P.js +0 -3
- package/dist/chunk-ADFSIJP2.js +0 -16
- package/dist/chunk-AOLE4DYM.js +0 -6
- package/dist/chunk-B5MHCHP3.js +0 -107
- package/dist/chunk-DGAGY7RJ.js +0 -60
- package/dist/chunk-DGMCFMPG.js +0 -11
- package/dist/chunk-GA64UPMI.js +0 -6
- package/dist/chunk-HEBAY673.js +0 -2
- package/dist/chunk-HELS7KFF.js +0 -2
- package/dist/chunk-IPDCSB6N.js +0 -6
- package/dist/chunk-JJJCO4QC.js +0 -945
- package/dist/chunk-KP4KBDVF.js +0 -3
- package/dist/chunk-LRTP3DKL.js +0 -3
- package/dist/chunk-P6HBYNBE.js +0 -5
- package/dist/chunk-QHKUY4FW.js +0 -2
- package/dist/chunk-QHRL4LKM.js +0 -2
- package/dist/chunk-UXP636P5.js +0 -144
- package/dist/chunk-VEVBIAOJ.js +0 -16
- package/dist/chunk-VKRQDBW5.js +0 -9
- package/dist/chunk-VOQFGC2W.js +0 -67
- package/dist/chunk-WMXRRBII.js +0 -8
- package/dist/chunk-X3NLZHPA.js +0 -20
- package/dist/chunk-Z5QQPJ3U.js +0 -30
- package/dist/chunk-ZLJLE6LK.js +0 -2
- package/dist/command-descriptors-SJDZ7QGR.js +0 -617
- package/dist/direct-navigation-HTKOZEOM.js +0 -3
package/dist/chunk-4CGVLUDP.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{a as v}from"./chunk-QOKYJ33H.js";import{a as M,c as _}from"./chunk-XVJ3V7LM.js";import{l as N}from"./chunk-Z5QQPJ3U.js";import{d as w,g as y,i as x}from"./chunk-ZTTISZ7J.js";import{E as R}from"./chunk-DGMCFMPG.js";import{execFileSync as g}from"child_process";import{existsSync as j,readFileSync as U}from"fs";import{basename as A}from"path";var q="Unable to compute git diff.";function Ne(e,n={}){let i=n.plan??H(e,n);return i.note?Y(i.note,i.changedFileLines):i.changedFiles.length===0?V(i.changedFileLines):Z(i.changedFiles,[J(e,i.changedFiles,i.changedFiles,i.changedRanges)])}function H(e,n={}){let{base:i="HEAD"}=n;try{let t=K(e.config.projectRoot,i),r=t.changedFileLines,s=ie(e,r),a=re(e,t.changedRanges);return{changedFileLines:r,changedFiles:s,changedRanges:a,renamedFiles:ee(e.config.projectRoot,i,s,t),note:r.length===0?"No changed files found.":void 0}}catch{return{changedFileLines:[],changedFiles:[],changedRanges:[],renamedFiles:[],note:q}}}function J(e,n,i,t=[]){let r=new _(e),s=new Set(i),a=v(t),o=[],c=new Map,u=n.flatMap(f=>r.definitionsForFile(f)).filter(be),d=u.filter(f=>oe(f,a)),l=le(e,u,d,a),m=fe([...d,...l.definitions]).sort((f,h)=>f.relativePath.localeCompare(h.relativePath)||f.startLine-h.startLine),p=m.map(f=>f.symbolId),F=pe(e,p),z=he(e,p,i),C=m.filter(f=>(F.get(f.symbolId)??0)===0),I=E(()=>N(e,C)),W=C.filter(f=>(I.get(f.symbolId)?.size??0)===0),G=E(()=>M(e,W));for(let f of m)ge(e,f,s,o,c,I.get(f.symbolId)??new Set,G.get(f.symbolId)??new Set,F.get(f.symbolId)??0,z.get(f.symbolId)??new Set);return{changedSymbols:o,consumerEntries:[...c.entries()].map(([f,h])=>({file:f,symbols:[...h].sort()})),attributionNotes:l.notes}}function Z(e,n){let i=new Map,t=n.flatMap(a=>a.changedSymbols),r=n.flatMap(a=>a.attributionNotes??[]);for(let a of n)for(let o of a.consumerEntries){let c=i.get(o.file);c||(c=new Set,i.set(o.file,c));for(let u of o.symbols)c.add(u)}let s=ye(i);return{changedFiles:[...e],changedSymbols:t,affectedConsumers:s,attributionNotes:r,summary:{totalChangedFiles:e.length,totalChangedSymbols:t.length,totalAffectedFiles:s.length}}}function Y(e,n=[]){return{changedFiles:n,changedSymbols:[],affectedConsumers:[],attributionNotes:[],summary:{totalChangedFiles:n.length,totalChangedSymbols:0,totalAffectedFiles:0,note:e}}}function V(e){return{changedFiles:e,changedSymbols:[],affectedConsumers:[],attributionNotes:[],summary:{totalChangedFiles:e.length,totalChangedSymbols:0,totalAffectedFiles:0,note:"Changed files are not present in the current SCIP index."}}}function K(e,n){let i=g("git",["diff","--name-status","--find-renames",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:67108864}),t=g("git",["diff","--name-status","--find-renames","--cached",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024}),r=g("git",["ls-files","--others","--exclude-standard"],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024}),s=g("git",["diff","--unified=0",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024}),a=g("git",["diff","--unified=0","--cached",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024}),o=ne([i,t]);return{changedFileLines:[...new Set([...o.changedFiles,...T(r)])],changedRanges:O([...P(s),...P(a)]),renamedFiles:o.renamedFiles,deletedFiles:o.deletedFiles}}function L(e,n,i){try{return g("git",["show",`${n}:./${i}`],{encoding:"utf-8",cwd:e,timeout:1e4,stdio:["ignore","pipe","ignore"]})}catch{return null}}function _e(e,n,i=[]){let t=Q(e,n,i);return r=>(t.has(r)||t.set(r,L(e,n,r)),t.get(r)??null)}function ve(e,n=e.changedFiles){let i=new Map(e.renamedFiles.map(t=>[t.to,t.from]));return[...new Set(n.map(t=>i.get(t)??t))]}function Q(e,n,i){let t=[...new Set(i)],r=new Map;if(t.length===0)return r;try{let s=t.map(o=>`${n}:./${o}
|
|
2
|
-
`).join(""),a=g("git",["cat-file","--batch"],{cwd:e,input:s,maxBuffer:256*1024*1024,timeout:1e4,stdio:["pipe","pipe","ignore"]});return X(a,t)}catch{for(let s of t)r.set(s,L(e,n,s));return r}}function X(e,n){let i=new Map,t=0;for(let r of n){let s=e.indexOf(10,t);if(s<0)throw new Error("git cat-file batch output ended before object header");let a=e.subarray(t,s).toString("utf-8");if(t=s+1,a.endsWith(" missing")){i.set(r,null);continue}let o=/^[0-9a-f]+ ([^ ]+) (\d+)$/.exec(a);if(!o)throw new Error(`unexpected git cat-file batch header: ${a}`);let[,c,u]=o,d=Number(u);if(!Number.isFinite(d)||d<0)throw new Error(`unexpected git cat-file batch size: ${a}`);if(t+d>e.length)throw new Error("git cat-file batch output ended before blob payload");let l=e.subarray(t,t+d);i.set(r,c==="blob"?l.toString("utf-8"):null),t+=d,e[t]===10&&(t+=1)}return i}function ee(e,n,i,t){if(i.length===0)return[];let r=new Map,s=new Set;for(let o of t.renamedFiles)i.includes(o.to)&&(r.set(o.to,o),s.add(o.from));let a=t.deletedFiles;if(a.length===0)return[...r.values()].sort((o,c)=>o.to.localeCompare(c.to));for(let o of i){if(r.has(o)||!j(`${e}/${o}`))continue;let c=a.filter(l=>!s.has(l)).filter(l=>A(l)===A(o));if(c.length===0)continue;let u=U(`${e}/${o}`,"utf-8"),d=c.map(l=>({from:l,to:o,similarity:te(L(e,n,l)??"",u)})).sort((l,m)=>m.similarity-l.similarity)[0];d&&d.similarity>=.45&&(r.set(o,d),s.add(d.from))}return[...r.values()].sort((o,c)=>o.to.localeCompare(c.to))}function ne(e){let n=new Set,i=new Map,t=new Set;for(let r of e.flatMap(s=>T(s))){let[s,a,o]=r.split(" ");if(!(!s||!a)){if(s.startsWith("R")&&o){n.add(o),i.set(o,{from:a,to:o,similarity:Number(s.slice(1))/100});continue}n.add(a),s.startsWith("D")&&t.add(a)}}return{changedFiles:[...n],renamedFiles:[...i.values()],deletedFiles:[...t]}}function te(e,n){let i=new Set(B(e)),t=new Set(B(n));if(i.size===0&&t.size===0)return 1;if(i.size===0||t.size===0)return 0;let r=0;for(let s of i)t.has(s)&&(r+=1);return 2*r/(i.size+t.size)}function B(e){return e.match(/[A-Za-z_$][\w$]*|[{}()[\].,]/g)??[]}function T(e){return e.split(`
|
|
3
|
-
`).map(n=>n.trim()).filter(n=>n.length>0)}function ie(e,n){let i=$(e),t=[];for(let r of n){let s=i(r);s&&!e.isIgnored(s)&&t.push(s)}return t}function re(e,n){let i=$(e),t=[];for(let r of n){let s=i(r.file);s&&!e.isIgnored(s)&&t.push({...r,file:s})}return O(t)}function $(e){let n=e.all(`SELECT relative_path FROM documents
|
|
4
|
-
ORDER BY id`).map(t=>t.relative_path),i=new Map(n.map(t=>[t,t]));return t=>{let r=t.replace(/\\/g,"/"),s=i.get(r);return s||(n.find(a=>a.endsWith(r))??null)}}function P(e){let n=[],i=null;for(let t of e.split(`
|
|
5
|
-
`)){if(t.startsWith("+++ ")){i=se(t.slice(4).trim());continue}if(!i||!t.startsWith("@@ "))continue;let r=/@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@/.exec(t);if(!r)continue;let s=Math.max(0,Number(r[1])-1),a=r[2]===void 0?1:Number(r[2]);n.push({file:i,startLine:s,endLine:Math.max(s,s+Math.max(a,1)-1)})}return n}function se(e){return e==="/dev/null"?null:e.startsWith("a/")||e.startsWith("b/")?e.slice(2):e}function O(e){let n=new Set,i=[];for(let t of e){let r=`${t.file}:${t.startLine}:${t.endLine}`;n.has(r)||(n.add(r),i.push(t))}return i}function oe(e,n){let i=n.get(e.relativePath);return!i||i.length===0?!0:i.some(t=>D(e.startLine,e.endLine,t.startLine,t.endLine))}function ae(e,n,i){let t=new Map,r=[],s=k(e),a=ue(i);for(let o of n){let c=s.get(o.file)??[];if(c.some(l=>D(l.startLine,l.endLine,o.startLine,o.endLine)))continue;let u=a.get(o.file)??[],d=me(u,o);if(d){let l=c.find(m=>m.startLine>=d.startLine&&m.startLine<=d.endLine);if(l){t.set(l.symbolId,l),r.push(b(o,"ast-widened"));continue}}if(u.length===0){let l=[...c].filter(m=>m.startLine<=o.startLine).sort((m,p)=>p.startLine-m.startLine||m.endLine-p.endLine)[0];if(l){t.set(l.symbolId,l),r.push(b(o,"nearest-preceding"));continue}}r.push(b(o,"unattributed"))}return{definitions:[...t.values()],notes:r}}function le(e,n,i,t){let r=k(i),s=[],a=[],o=[...new Set(n.map(c=>c.relativePath))];for(let c of o){let u=t.get(c)??[];if(u.length===0)continue;let d=r.get(c)??[];for(let l of u)d.some(m=>D(m.startLine,m.endLine,l.startLine,l.endLine))||s.push(l);s.some(l=>l.file===c)&&a.push(...ce(e,c))}return ae(n,s,a)}function ce(e,n){let i=R(e,n);return i?i.rootNode.namedChildren.filter(de).map(t=>({file:n,startLine:t.startPosition.row,endLine:t.endPosition.row})).filter(t=>t.endLine>=t.startLine):[]}function de(e){return e.endPosition.row<e.startPosition.row?!1:!new Set(["import_statement","comment"]).has(e.type)}function fe(e){let n=new Map;for(let i of e)n.set(i.symbolId,i);return[...n.values()]}function k(e){let n=new Map;for(let i of e){let t=n.get(i.relativePath)??[];t.push(i),n.set(i.relativePath,t)}return n}function ue(e){let n=new Map;for(let i of e){let t=n.get(i.file)??[];t.push(i),n.set(i.file,t)}return n}function me(e,n){return e.filter(i=>i.startLine<=n.startLine&&i.endLine>=n.endLine).sort((i,t)=>i.endLine-i.startLine-(t.endLine-t.startLine))[0]}function b(e,n){return{file:e.file,startLine:e.startLine,endLine:e.endLine,method:n}}function D(e,n,i,t){return e<=t&&i<=n}function ge(e,n,i,t,r,s,a,o,c){let u=Math.max(o,s.size,a.size);if(!Se(n,u))return;let d=w(n.symbol);t.push({symbol:n.symbol,shortName:d,file:n.relativePath,startLine:n.startLine,endLine:n.endLine,fanIn:u});for(let l of c)S(e,i,r,l,d);for(let l of s)S(e,i,r,l,d);for(let l of a)S(e,i,r,l,d)}function E(e){try{return e()}catch(n){return console.error(`warning: diff-impact enrichment scan failed, continuing without it: ${n instanceof Error?n.message:n}`),new Map}}function pe(e,n){if(n.length===0)return new Map;let i=e.all(`SELECT m.symbol_id, COUNT(DISTINCT c.document_id) AS fan_in
|
|
6
|
-
FROM mentions m
|
|
7
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
8
|
-
WHERE m.symbol_id IN (${n.map(()=>"?").join(",")})
|
|
9
|
-
AND m.role != 1
|
|
10
|
-
GROUP BY m.symbol_id`,...n);return new Map(i.map(t=>[t.symbol_id,t.fan_in]))}function he(e,n,i){if(n.length===0||i.length===0)return new Map;let t=e.all(`SELECT DISTINCT m.symbol_id, ref_d.relative_path
|
|
11
|
-
FROM mentions m
|
|
12
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
13
|
-
JOIN documents ref_d ON c.document_id = ref_d.id
|
|
14
|
-
WHERE m.symbol_id IN (${n.map(()=>"?").join(",")})
|
|
15
|
-
AND m.role != 1
|
|
16
|
-
AND ref_d.relative_path NOT IN (${i.map(()=>"?").join(",")})
|
|
17
|
-
${e.pathExclusionsFor("ref_d")}`,...n,...i),r=new Map;for(let s of t){let a=r.get(s.symbol_id);a||(a=new Set,r.set(s.symbol_id,a)),a.add(s.relative_path)}return r}function S(e,n,i,t,r){if(e.isIgnored(t)||n.has(t))return;let s=i.get(t);s||(s=new Set,i.set(t,s)),s.add(r)}function ye(e){return[...e.entries()].map(([n,i])=>({file:n,consumedSymbols:i.size})).sort((n,i)=>i.consumedSymbols-n.consumedSymbols)}function be(e){return!(x(e.symbol)||e.parentTypeName!==null&&!y(e.symbol))}function Se(e,n){return y(e.symbol)||e.isTypeLike?!0:e.parentTypeName===null&&n>0}export{q as a,Ne as b,H as c,J as d,Z as e,L as f,_e as g,ve as h,Q as i,ae as j};
|
|
18
|
-
//# sourceMappingURL=chunk-4CGVLUDP.js.map
|
package/dist/chunk-4RI4BJGT.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-APMMR5Y2.js";import m from"process";import{existsSync as G,readFileSync as Ae}from"fs";import{dirname as I,join as Te,resolve as x,sep as Ce}from"path";import{fileURLToPath as De}from"url";import{spawn as ie}from"child_process";var l=class extends Error{},p=class extends Error{},w=class extends Error{constructor(r,n,i){super(`rust-analyzer LSP request ${n} failed: ${i}`);this.code=r}code},se=3e4,oe=16*1024,ae=64*1024*1024,q=64*1024,j=256*1024*1024,g=Buffer.from(`\r
|
|
2
|
-
\r
|
|
3
|
-
`,"ascii"),b=class{constructor(e,r={}){this.transport=e;this.requestTimeoutMs=r.requestTimeoutMs??se,this.configuration=r.configuration??{};let n=ue(r.maxHeaderBytes,r.maxMessageBytes);this.maxHeaderBytes=n.maxHeaderBytes,this.maxMessageBytes=n.maxMessageBytes,this.monotonicNow=r.monotonicNow??d,this.headerBuffer=Buffer.allocUnsafe(this.maxHeaderBytes+g.length),this.transport.onData(i=>this.handleData(i)),this.transport.onClose((i,s)=>this.failTransport(new Error(he(i,s)),!1)),this.transport.onError(i=>this.failTransport(i,!0))}transport;nextId=1;pending=new Map;diagnosedUris=new Set;diagnosticWaiters=new Map;readinessWaiters=new Set;requestTimeoutMs;configuration;maxHeaderBytes;maxMessageBytes;monotonicNow;headerBuffer;headerLength=0;bodyBuffer=null;bodyLength=0;transportFailure=null;transportKilled=!1;currentServerStatusGeneration=0;latestServerStatus=null;shutdownStarted=!1;async initialize(e,r={}){let n=e.capabilities??{},i=n.experimental&&typeof n.experimental=="object"&&!Array.isArray(n.experimental)?n.experimental:{},s=await this.request("initialize",{...e,capabilities:{...n,experimental:{...i,serverStatusNotification:!0}}},r);return this.notify("initialized",{}),s}async references(e,r={}){let n=await this.request("textDocument/references",e,r);return Array.isArray(n)?n:[]}async definition(e,r={}){let n=await this.request("textDocument/definition",e,r);return de(n)}async prepareCallHierarchy(e,r={}){let n=await this.request("textDocument/prepareCallHierarchy",e,r);return Array.isArray(n)?n:[]}async outgoingCalls(e,r={}){let n=await this.request("callHierarchy/outgoingCalls",{item:e},r);return Array.isArray(n)?n:[]}async hover(e,r={}){let n=await this.request("textDocument/hover",e,r);return n&&typeof n=="object"?n:null}async readinessBarrier(e={}){try{await this.request("scip-query/readinessBarrier",null,e)}catch(r){if(r instanceof w&&r.code===-32601)return;throw r}}serverStatusGeneration(){return this.currentServerStatusGeneration}serverStatusSnapshot(){let e=this.latestServerStatus;return e?{generation:e.generation,status:{...e.status}}:null}waitForQuiescence(e,r){if(this.transportFailure)return Promise.reject(this.transportFailure);let n=this.latestServerStatus;if(n&&n.generation>e){if(n.status.health==="error")return Promise.reject(F());if(n.status.quiescent)return Promise.resolve(n.status)}return new Promise((i,s)=>{let o={afterGeneration:e,resolve:i,reject:s,timeout:setTimeout(()=>{this.readinessWaiters.delete(o),s(new Error(`rust-analyzer readiness timed out after ${r}ms`))},r)};this.readinessWaiters.add(o)})}didOpenTextDocument(e){this.notify("textDocument/didOpen",{textDocument:e})}waitForDiagnostics(e,r){return this.transportFailure?Promise.resolve(!1):this.diagnosedUris.has(e)?Promise.resolve(!0):new Promise(n=>{let i=u=>{clearTimeout(s),n(u)},s=setTimeout(()=>{let u=this.diagnosticWaiters.get(e)?.filter(c=>c!==i);u&&u.length>0?this.diagnosticWaiters.set(e,u):this.diagnosticWaiters.delete(e),n(!1)},r),o=this.diagnosticWaiters.get(e)??[];o.push(i),this.diagnosticWaiters.set(e,o)})}async shutdown(e={}){if(!this.shutdownStarted){this.shutdownStarted=!0;try{await this.request("shutdown",null,e),this.notify("exit",null)}catch(r){throw this.notify("exit",null),this.killTransportOnce(),r}}}request(e,r,n={}){if(this.transportFailure)return Promise.reject(this.transportFailure);let i=S(n.timeoutMs??this.requestTimeoutMs,n.deadlineMs,this.monotonicNow),s=this.nextId++,o={jsonrpc:"2.0",id:s,method:e,params:r};return new Promise((u,c)=>{let f=setTimeout(()=>{this.pending.delete(s),c(i.deadlineLimited?new l(`rust-analyzer readiness deadline expired during LSP request ${e}`):new Error(`rust-analyzer LSP request ${e} timed out after ${i.timeoutMs}ms`))},i.timeoutMs);this.pending.set(s,{method:e,deadlineMs:n.deadlineMs,resolve:R=>u(R),reject:c,timeout:f}),this.transport.write(A(o))})}notify(e,r){this.transportFailure||this.transport.write(A({jsonrpc:"2.0",method:e,params:r}))}handleData(e){if(this.transportFailure||e.length===0)return;let r=0;for(;r<e.length&&!this.transportFailure;){if(this.bodyBuffer){let o=Math.min(e.length-r,this.bodyBuffer.length-this.bodyLength);if(e.copy(this.bodyBuffer,this.bodyLength,r,r+o),r+=o,this.bodyLength+=o,this.bodyLength===this.bodyBuffer.length){let u=this.bodyBuffer.toString("utf8");this.bodyBuffer=null,this.bodyLength=0;let c;try{c=ye(u)}catch{this.failProtocol("rust-analyzer LSP response body was not a valid JSON object");continue}try{this.dispatchMessage(c)}catch{this.failTransport(new Error("rust-analyzer LSP message handling failed"),!0)}}continue}if(this.headerLength===this.headerBuffer.length){this.failProtocol(`rust-analyzer LSP header exceeded ${this.maxHeaderBytes} byte limit`);return}if(this.headerBuffer[this.headerLength++]=e[r++],!this.headerDelimiterComplete())continue;let n=this.headerLength-g.length;if(n>this.maxHeaderBytes){this.failProtocol(`rust-analyzer LSP header exceeded ${this.maxHeaderBytes} byte limit`);return}let i=this.headerBuffer.subarray(0,n).toString("ascii");this.headerLength=0;let s;try{s=le(i,this.maxMessageBytes)}catch(o){this.failProtocol(o instanceof Error?o.message:String(o));return}this.bodyBuffer=Buffer.allocUnsafe(s),this.bodyLength=0,s===0&&(this.bodyBuffer=null,this.failProtocol("rust-analyzer LSP response body was not a valid JSON object"))}}headerDelimiterComplete(){if(this.headerLength<g.length)return!1;let e=this.headerLength-g.length;return this.headerBuffer.subarray(e,this.headerLength).equals(g)}failProtocol(e){this.failTransport(new p(e),!0)}failTransport(e,r){this.transportFailure||(this.transportFailure=e,this.headerLength=0,this.bodyBuffer=null,this.bodyLength=0,r&&this.killTransportOnce(),this.rejectPending(e),this.resolveDiagnosticWaiters(!1))}killTransportOnce(){this.transportKilled||(this.transportKilled=!0,this.transport.kill())}dispatchMessage(e){if(this.recordDiagnosticNotification(e),this.recordServerStatusNotification(e),e.id!==void 0&&e.id!==null&&e.method){this.respondToServerRequest(e);return}if(e.id===void 0||e.id===null)return;let r=this.pending.get(e.id);if(r){if(clearTimeout(r.timeout),this.pending.delete(e.id),e.error){r.reject(new w(e.error.code,r.method,e.error.message));return}if(r.deadlineMs!==void 0&&this.monotonicNow()>=r.deadlineMs){r.reject(new l(`rust-analyzer readiness deadline expired during LSP request ${r.method}`));return}r.resolve(e.result)}}recordDiagnosticNotification(e){if(e.method!=="textDocument/publishDiagnostics")return;let r=e.params,n=r&&typeof r=="object"&&typeof r.uri=="string"?r.uri:null;if(!n)return;this.diagnosedUris.add(n);let i=this.diagnosticWaiters.get(n)??[];this.diagnosticWaiters.delete(n),i.forEach(s=>s(!0))}recordServerStatusNotification(e){if(e.method!=="experimental/serverStatus"||e.id!==void 0||!ce(e.params))return;let r=e.params,n={health:r.health,quiescent:r.quiescent,...typeof r.message=="string"?{message:r.message}:{}},i=++this.currentServerStatusGeneration;if(this.latestServerStatus={generation:i,status:n},n.health==="error"){this.rejectReadinessWaiters(F());return}if(n.quiescent)for(let s of this.readinessWaiters)i<=s.afterGeneration||(clearTimeout(s.timeout),this.readinessWaiters.delete(s),s.resolve(n))}respondToServerRequest(e){if(e.id===void 0||e.id===null||!e.method)return;let r=e.method==="workspace/configuration"?this.workspaceConfiguration(e.params):null;this.transport.write(A({jsonrpc:"2.0",id:e.id,result:r}))}workspaceConfiguration(e){return(e&&typeof e=="object"&&Array.isArray(e.items)?e.items:[]).map(n=>typeof n.section=="string"?fe(this.configuration,n.section):this.configuration)}rejectPending(e){for(let[r,n]of this.pending)clearTimeout(n.timeout),n.reject(e),this.pending.delete(r);this.rejectReadinessWaiters(e)}resolveDiagnosticWaiters(e){for(let r of this.diagnosticWaiters.values())r.forEach(n=>n(e));this.diagnosticWaiters.clear()}rejectReadinessWaiters(e){for(let r of this.readinessWaiters)clearTimeout(r.timeout),r.reject(e),this.readinessWaiters.delete(r)}};function ue(t=oe,e=ae){if(!Number.isSafeInteger(t)||t<=0)throw new TypeError("maxHeaderBytes must be a positive safe integer.");if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxMessageBytes must be a positive safe integer.");if(t>q)throw new RangeError(`maxHeaderBytes cannot exceed ${q} bytes for rust-analyzer LSP.`);if(t+g.length+e>j)throw new RangeError(`Combined rust-analyzer LSP header and message limits cannot exceed ${j} bytes.`);return{maxHeaderBytes:t,maxMessageBytes:e}}function le(t,e){let r=[];for(let s of t.split(`\r
|
|
4
|
-
`)){let o=s.indexOf(":");o<0||s.slice(0,o).trim().toLowerCase()!=="content-length"||r.push(s.slice(o+1).trim())}if(r.length===0)throw new p("rust-analyzer LSP response missing Content-Length header");if(r.length>1){let s=new Set(r).size>1?"rust-analyzer LSP response has conflicting Content-Length headers":"rust-analyzer LSP response has duplicate Content-Length headers";throw new p(s)}let n=r[0];if(!/^\d+$/.test(n))throw new p("rust-analyzer LSP Content-Length must be a non-negative safe integer");let i=Number(n);if(!Number.isSafeInteger(i))throw new p("rust-analyzer LSP Content-Length must be a non-negative safe integer");if(i>e)throw new p(`rust-analyzer LSP Content-Length exceeds ${e} byte message limit`);return i}function S(t,e,r=d){if(e===void 0)return{timeoutMs:t,deadlineLimited:!1};let n=e-r();if(n<=0)throw new l("rust-analyzer readiness deadline expired before LSP operation");return{timeoutMs:Math.min(t,n),deadlineLimited:n<=t}}function ce(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=t;return(e.health==="ok"||e.health==="warning"||e.health==="error")&&typeof e.quiescent=="boolean"&&(e.message===void 0||e.message===null||typeof e.message=="string")}function F(){return new l("rust-analyzer reported error health before reaching readiness")}function fe(t,e){let r=e.startsWith("rust-analyzer.")?e.slice(14):e;if(r===""||r==="rust-analyzer")return t;let n=t;for(let i of r.split(".")){if(!n||typeof n!="object")return null;n=n[i]}return n??null}function de(t){return t?(Array.isArray(t)?t:[t]).flatMap(r=>me(r)?[r]:pe(r)?[{uri:r.targetUri,range:r.targetSelectionRange}]:[]):[]}function me(t){return!!(t&&typeof t=="object"&&typeof t.uri=="string")}function pe(t){return!!(t&&typeof t=="object"&&typeof t.targetUri=="string")}function H(t,e,r=process.env){let n=ie(t,[],{cwd:e,env:r,stdio:["pipe","pipe","pipe"]});return{write(i){n.stdin.write(i)},onData(i){n.stdout.on("data",i)},onClose(i){n.on("close",i)},onError(i){n.on("error",i)},kill(){n.kill()}}}function A(t){let e=JSON.stringify(t);return`Content-Length: ${Buffer.byteLength(e,"utf8")}\r
|
|
5
|
-
\r
|
|
6
|
-
${e}`}function ye(t){let e=JSON.parse(t);if(!e||typeof e!="object")throw new Error("rust-analyzer LSP response was not a JSON object");return e}function he(t,e){return`rust-analyzer LSP transport closed${e?` by ${e}`:t===null?"":` with code ${t}`}`}async function _(t,e,r,n=d){let i=r-n();if(i<=0)throw new l("rust-analyzer readiness deadline expired before quiescence");try{let s=await t.waitForQuiescence(e,i);if(L(r,n,"during quiescence"),s.health==="error")throw new l("rust-analyzer reported error health before reaching readiness");if(!s.quiescent)throw new l("rust-analyzer did not report quiescence before reaching readiness");return s}catch(s){throw s instanceof l?s:new l(s instanceof Error?s.message:String(s))}}async function it(t,e,r,n,i,s=d,o=C){let u=await _(t,e,n,s);if(r===0)return u;let c=t.serverStatusSnapshot();if(!c)throw new l("rust-analyzer status is unavailable after initial document open");return await ge(t,c,r,n,i,s,o)??u}async function ge(t,e,r,n,i,s=d,o=C){if(r===0)return null;if(!e)throw new l("rust-analyzer status is unavailable before document open");N(e.status,"before document open");try{await t.readinessBarrier({deadlineMs:n}),L(n,s,"during post-open synchronization")}catch(f){throw f instanceof l?f:new l(f instanceof Error?f.message:String(f))}let u=t.serverStatusSnapshot();if(!u||u.generation<e.generation)throw new l("rust-analyzer status is unavailable after document open");let c;return u.generation===e.generation?(N(u.status,"after document open"),c=u.status):c=await _(t,e.generation,n,s),await T(i,n,s,o),c}async function st(t,e,r,n=d){let i=S(e,r,n);await t(i.timeoutMs),L(r,n,"during diagnostics")}async function T(t,e,r=d,n=C){if(t<=0)return;if(S(t,e,r).deadlineLimited)throw new l("rust-analyzer readiness deadline cannot accommodate delay");await n(t),L(e,r,"during delay")}async function ot(t,e){try{return await t()}catch(r){throw r instanceof l&&await e(),r}}function at(t){return t instanceof l?{ok:!1,error:t.message}:null}function L(t,e,r){if(t-e()<=0)throw new l(`rust-analyzer readiness deadline expired ${r}`)}function N(t,e){if(t.health==="error")throw new l(`rust-analyzer reported error health ${e}`);if(!t.quiescent)throw new l(`rust-analyzer did not report quiescence ${e}`)}function C(t){return new Promise(e=>setTimeout(e,t))}import{existsSync as Re,readFileSync as we}from"fs";import{relative as be,resolve as U,sep as Se}from"path";import{fileURLToPath as Le,pathToFileURL as ve}from"url";function v(t,e){return ve(U(t,e)).href}function M(t,e){let r=Le(e);return be(t,r).split(Se).join("/")}function P(t,e,r){return{textDocument:{uri:v(t,e.relativePath)},position:Pe(t,e),context:{includeDeclaration:r}}}function Pe(t,e){let r={line:e.startLine,character:e.startChar??0},n=U(t,e.relativePath);if(!Re(n))return r;try{return xe(we(n,"utf8"),e,r)}catch{return r}}function xe(t,e,r={line:e.startLine,character:e.startChar??0}){let n=t.split(/\r?\n/),i=n[e.startLine];if(i===void 0||e.leaf.length===0)return r;let s=Math.max(0,Math.min(r.character,i.length)),o=i.indexOf(e.leaf,s);if(o>=0)return{line:e.startLine,character:D(o,e.leaf)};let u=i.indexOf(e.leaf);if(u>=0)return{line:e.startLine,character:D(u,e.leaf)};let c=ze(n,e.startLine,e.leaf);return c||r}function D(t,e){return t+Math.max(0,e.length-2)}function ze(t,e,r){for(let n of[-1,1,-2,2]){let i=e+n;if(i<0||i>=t.length)continue;let s=t[i].indexOf(r);if(s>=0)return{line:i,character:D(s,r)}}return null}function $(t,e){return e.map(r=>({file:M(t,r.uri),line:r.range.start.line,column:r.range.start.character}))}function J(t){let e=new Map;for(let r of t)e.set(`${r.file}\0${r.line}\0${r.column}`,r);return[...e.values()].sort((r,n)=>{let i=r.file.localeCompare(n.file);return i!==0?i:r.line!==n.line?r.line-n.line:r.column-n.column})}async function Me(t){let e=t.includeReferences!==!1,r=t.includeCallees===!0,n=t.includeSignatures===!0,i={timeoutMs:t.requestTimeoutMs},s=ke(t),o=Y(t),u=Q(t),c=K(t),f=He(t.projectRoot,s),R=Fe(t.projectRoot,f),O=je(f),y=new b(H(t.rustAnalyzerBinary,R),{requestTimeoutMs:t.requestTimeoutMs,configuration:O});try{let z=await y.initialize({processId:m.pid,rootUri:v(R,"."),capabilities:{textDocument:{references:{dynamicRegistration:!1},callHierarchy:{dynamicRegistration:!1},hover:{dynamicRegistration:!1}}},initializationOptions:O});if(e&&!z.capabilities.referencesProvider)return{available:!1,reason:"rust-analyzer initialized without textDocument/references support.",references:o.map(a=>[a.symbolId,[]]),...r?{callees:u.map(a=>[a.symbolId,[]])}:{}};if(r&&!z.capabilities.callHierarchyProvider)return{available:!1,reason:"rust-analyzer initialized without call hierarchy support.",references:o.map(a=>[a.symbolId,[]]),callees:u.map(a=>[a.symbolId,[]]),...n?{signatures:c.map(a=>[a.symbolId,null])}:{}};if(n&&!z.capabilities.hoverProvider)return{available:!1,reason:"rust-analyzer initialized without hover support.",references:o.map(a=>[a.symbolId,[]]),...r?{callees:u.map(a=>[a.symbolId,[]])}:{},signatures:c.map(a=>[a.symbolId,null])};let te=Ne(y,t.projectRoot,s);await _e(y,te,t.diagnosticsTimeoutMs??1e4),await ee(t.settleDelayMs??5e3);let B=e?await k(o,t.concurrency??8,async a=>{let W=await Z(y,P(t.projectRoot,a,!1),{requestTimeoutMs:t.requestTimeoutMs,retryTimeoutMs:t.referenceRetryTimeoutMs});return{symbolId:a.symbolId,references:J($(t.projectRoot,W.locations)),complete:W.complete}}):o.map(a=>({symbolId:a.symbolId,references:[],complete:!0})),re=r?await k(u,t.concurrency??8,async a=>({symbolId:a.symbolId,callees:await $e(y,t.projectRoot,a,i)})):[],ne=n?await k(c,t.concurrency??8,async a=>({symbolId:a.symbolId,signature:await Ie(y,t.projectRoot,a,i)})):[];return{available:!0,references:B.filter(a=>a.complete).map(a=>[a.symbolId,a.references]),incompleteReferenceSymbolIds:B.filter(a=>!a.complete).map(a=>a.symbolId),...r?{callees:re.map(a=>[a.symbolId,a.callees])}:{},...n?{signatures:ne.map(a=>[a.symbolId,a.signature])}:{}}}finally{await y.shutdown().catch(()=>{})}}function Y(t){return t.referenceDefinitions??t.definitions}function Q(t){return t.calleeDefinitions??t.definitions}function K(t){return t.signatureDefinitions??t.definitions}function ke(t){return[...t.includeReferences!==!1?Y(t):[],...t.includeCallees===!0?Q(t):[],...t.includeSignatures===!0?K(t):[]]}async function Ie(t,e,r,n={}){let i=P(e,r,!1),s=await Ee(t,{textDocument:i.textDocument,position:i.position},n);return Oe(s)}async function Ee(t,e,r={}){try{return await t.hover(e,r)}catch(n){if(h(n),!(n instanceof Error?n.message:String(n)).includes("content modified"))return null;await V(r.deadlineMs);try{return await t.hover(e,r)}catch(s){return h(s),null}}}function Oe(t){if(!t)return null;let e=Be(t.contents),r=/```(?:rust)?\s*([\s\S]*?)```/i.exec(e),n=r?r[1]:e;for(let i of n.split(/\r?\n/)){let s=i.replace(/^`+|`+$/g,"").trim();if(s&&qe(s))return s}return null}function Be(t){return typeof t=="string"?t:Array.isArray(t)?t.map(We).join(`
|
|
7
|
-
`):"value"in t?t.value:""}function We(t){return typeof t=="string"?t:t.value}function qe(t){return/^(?:pub(?:\([^)]*\))?\s+)?(?:async\s+)?(?:const\s+)?(?:unsafe\s+)?(?:extern\s+(?:"[^"]+"\s+)?)?(?:fn|struct|enum|trait|type|const|static|mod)\b/.test(t)}function je(t){return{...t.length>0?{linkedProjects:t}:{},references:{excludeImports:!1,excludeTests:!1}}}function Fe(t,e){return e.length===1?I(e[0]):x(t)}function He(t,e){let r=x(t),n=[],i=new Set;for(let s of e){let o=I(x(r,s.relativePath));for(;Ke(r,o);){let u=Te(o,"Cargo.toml");if(G(u)){i.has(u)||(i.add(u),n.push(u));break}let c=I(o);if(c===o)break;o=c}}return n}function Ne(t,e,r){let n=new Set,i=[];for(let s of r){if(n.has(s.relativePath))continue;n.add(s.relativePath);let o=x(e,s.relativePath);if(!G(o))continue;let u=v(e,s.relativePath);t.didOpenTextDocument({uri:u,languageId:"rust",version:1,text:Ae(o,"utf8")}),i.push(u)}return i}async function _e(t,e,r){await Promise.all(e.map(n=>t.waitForDiagnostics(n,r).catch(()=>!1)))}async function bt(t,e){return(await Z(t,e)).locations}async function Z(t,e,r={}){try{return{locations:await t.references(e,{timeoutMs:r.requestTimeoutMs,deadlineMs:r.deadlineMs}),complete:!0}}catch(n){h(n);let i=n instanceof Error?n.message:String(n);if(E(n))return Ue(t,e,r);if(!i.includes("content modified"))return{locations:[],complete:!0};await V(r.deadlineMs);try{return{locations:await t.references(e,X(r)),complete:!0}}catch(s){return h(s),{locations:[],complete:!E(s)}}}}async function Ue(t,e,r){if(!r.retryTimeoutMs||r.retryTimeoutMs<=0)return{locations:[],complete:!1};let n=X(r);try{return{locations:await t.references(e,n),complete:!0}}catch(i){return h(i),{locations:[],complete:!E(i)}}}function X(t){return{...t.retryTimeoutMs&&t.retryTimeoutMs>0?{timeoutMs:t.retryTimeoutMs}:{},...t.deadlineMs!==void 0?{deadlineMs:t.deadlineMs}:{}}}function E(t){let e=t instanceof Error?t.message:String(t);return e.includes("rust-analyzer LSP request")&&e.includes("timed out after")}async function $e(t,e,r,n={}){let i=P(e,r,!1),s=await Je(t,{textDocument:i.textDocument,position:i.position},n),o=(await Promise.all(s.map(u=>Ge(t,u,n)))).flat();return Qe(Ye(e,o))}async function Je(t,e,r={}){try{return await t.prepareCallHierarchy(e,r)}catch(n){return h(n),[]}}async function Ge(t,e,r={}){try{return await t.outgoingCalls(e,r)}catch(n){return h(n),[]}}async function V(t){if(t===void 0){await ee(1e3);return}await T(1e3,t)}function h(t){if(t instanceof l)throw t}function Ye(t,e){return e.map(r=>({symbol:r.to.name,file:M(t,r.to.uri),line:r.to.selectionRange.start.line}))}function Qe(t){let e=new Set,r=[];for(let n of t){let i=`${n.symbol}\0${n.file}\0${n.line}`;e.has(i)||(e.add(i),r.push(n))}return r.sort((n,i)=>n.file.localeCompare(i.file)||n.line-i.line||n.symbol.localeCompare(i.symbol))}function ee(t){return t<=0?Promise.resolve():new Promise(e=>setTimeout(e,t))}function Ke(t,e){return e===t||e.startsWith(`${t}${Ce}`)}async function k(t,e,r){let n=new Array(t.length),i=0,s=Math.max(1,Math.min(t.length,Math.floor(e)));return await Promise.all(Array.from({length:s},async()=>{for(;i<t.length;){let o=i++;n[o]=await r(t[o])}})),n}async function Ze(){return new Promise((t,e)=>{let r=[];m.stdin.on("data",n=>r.push(n)),m.stdin.on("error",e),m.stdin.on("end",()=>t(Buffer.concat(r).toString("utf8")))})}async function Xe(){try{let t=JSON.parse(await Ze()),e=await Me(t);m.stdout.write(JSON.stringify(e))}catch(t){let e={available:!1,reason:t instanceof Error?t.message:String(t),references:[]};m.stdout.write(JSON.stringify(e)),m.exitCode=1}}m.argv[1]&&De(import.meta.url)===m.argv[1]&&Xe();export{b as a,H as b,it as c,ge as d,st as e,ot as f,at as g,v as h,M as i,P as j,$ as k,J as l,Me as m,Y as n,Q as o,K as p,ke as q,Ie as r,Ee as s,Oe as t,je as u,Fe as v,He as w,Ne as x,_e as y,bt as z,Z as A,$e as B,ee as C,k as D};
|
|
8
|
-
//# sourceMappingURL=chunk-4RI4BJGT.js.map
|
package/dist/chunk-52HQTTPB.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l as I}from"./chunk-Z5QQPJ3U.js";import{a as y,e as g}from"./chunk-ZTTISZ7J.js";import{B as v}from"./chunk-DGMCFMPG.js";import{B as p,E,G as x,l as b,q as D,r as _,z as F}from"./chunk-B5MHCHP3.js";import{spawnSync as O}from"child_process";import{createHash as U}from"crypto";import{existsSync as k}from"fs";import{dirname as L,join as T}from"path";import{fileURLToPath as j}from"url";var N=b("definition-consumer-file-usage",{clearGroups:["whole-project","source-file"]}),M=E({kind:"consumer-file-usage",invalidation:x("consumer-file-usage"),serialize:Q,deserialize:W});function Le(e,n){return{forDefinitions(r,i){return V(e,n,r,i)}}}function Me(e){let n=new Map;for(let[r,i]of e)n.set(r,new Set(i.files.map(t=>t.file)));return n}function Re(e,n,r){return w(e,n,r).partition}function V(e,n,r,i){let t=h(r.length),s=F()?_(e):null,a=s?B(r,i,s):void 0,o=a?{workIdentity:a,workOutcome:"computed"}:{};return p("consumer-evidence.product",()=>{let l=p("consumer-evidence.provenance",()=>z(e,n,r,i),()=>({...o,definitions:r.length,semantic:i.semantic,sourceFallback:i.sourceFallback!==!1})),u=new Map;t={...t,...l.counters};let c=Y(r,l.sources);return p("consumer-evidence.classify",()=>{let f=q(e,r,l.sources,c);for(let d of r){let m=f.get(d.symbolId)??H();t.realFiles+=m.partition.realConsumers.length,t.reexportOnlyFiles+=m.partition.barrelConsumers,t.importOnlyFiles+=m.partition.importOnlyConsumers,u.set(d.symbolId,{definition:d,files:m.files,...m.partition})}},()=>({...o,...c,realFiles:t.realFiles,reexportOnlyFiles:t.reexportOnlyFiles,importOnlyFiles:t.importOnlyFiles})),u},()=>({...o,...t}))}function B(e,n,r){let i=U("sha256").update("consumer-evidence-v1\0").update(r).update("\0").update(n.semantic?"semantic\0":"indexed\0").update(n.sourceFallback===!1?"no-source-fallback":"source-fallback");for(let t of e.map(s=>s.symbol).sort())i.update("\0").update(t);return i.digest("hex").slice(0,24)}function h(e){return{definitions:e,indexedFiles:0,semanticFiles:0,fallbackFiles:0,totalFiles:0,realFiles:0,reexportOnlyFiles:0,importOnlyFiles:0}}function z(e,n,r,i){let t=h(r.length),s=new Map;return S(s,t,"indexed",n.crossFileCallerMap(r,{semantic:!1})),i.semantic&&S(s,t,"semantic",I(e,r)),i.sourceFallback!==!1&&S(s,t,"source-fallback",n.sourceFallbackCallerFiles(r)),t.totalFiles=[...s.values()].reduce((a,o)=>a+o.size,0),{sources:s,counters:t}}function Y(e,n){return{definitions:e.length,consumerFiles:[...n.values()].reduce((r,i)=>r+i.size,0),nativeAttempted:!1,nativeUsed:!1,nativeReason:"not-attempted"}}function S(e,n,r,i){let t=0;for(let[s,a]of i){let o=e.get(s);o||(o=new Map,e.set(s,o));for(let l of a){t++;let u=o.get(l)??new Set;u.add(r),o.set(l,u)}}r==="indexed"?n.indexedFiles+=t:r==="semantic"?n.semanticFiles+=t:n.fallbackFiles+=t}function q(e,n,r,i){let t=re(e,n,r,i);return t||$(e,n,r)}function $(e,n,r){let i=new Map;for(let t of n){let s=r.get(t.symbolId)??new Map;i.set(t.symbolId,w(e,t,[...s.keys()],s))}return i}function w(e,n,r,i=new Map){let t=[],s=0,a=0,o=g(n.symbol),l=[];for(let u of r){let c;X(e,u,n.relativePath,o)?(s++,c="reexport-only"):J(e,u,o)?(a++,c="import-only"):(t.push(u),c="real"),l.push({file:u,sources:[...i.get(u)??[]],classification:c})}return{partition:{realConsumers:t,barrelConsumers:s,importOnlyConsumers:a},files:l}}function H(){return{partition:{realConsumers:[],barrelConsumers:0,importOnlyConsumers:0},files:[]}}function J(e,n,r){if(!r)return!1;let i=v(n);if(!i)return!1;let t=N.get(e,n,()=>A(e,n,i));return t.importedLeaves.has(r)&&!t.usedLeaves.has(r)}function A(e,n,r){let i=y(e).forFile(n,{text:!0,ast:!0}),t=i.text;if(!t)return G();let s=D(e,n,t),a=M.read(e,n,s);if(a)return a;let o=K(i.ast,r);return M.write(e,n,s,o),o}function K(e,n){let r=new Set,i=new Set;if(!e)return{importedLeaves:r,usedLeaves:i};let t=n==="rust"?new Set(["use_declaration"]):n==="python"?new Set(["import_statement","import_from_statement"]):new Set(["import_statement"]),s=(a,o)=>{let l=o||t.has(a.type);(a.type==="identifier"||a.type==="type_identifier"||a.type==="property_identifier"||a.type==="field_identifier")&&(l?r.add(a.text):i.add(a.text));for(let u of a.children)s(u,l)};return s(e.rootNode,!1),{importedLeaves:r,usedLeaves:i}}function G(){return{importedLeaves:new Set,usedLeaves:new Set}}function Q(e){return JSON.stringify({importedLeaves:[...e.importedLeaves],usedLeaves:[...e.usedLeaves]})}function W(e){try{let n=JSON.parse(e);return!Array.isArray(n.importedLeaves)||!Array.isArray(n.usedLeaves)?null:{importedLeaves:new Set(n.importedLeaves.filter(r=>typeof r=="string")),usedLeaves:new Set(n.usedLeaves.filter(r=>typeof r=="string"))}}catch{return null}}function X(e,n,r,i){if(!i)return!1;let t=y(e).forFile(n,{lines:!0,reexports:!0}),s=t.lines??[];if(s.length===0)return!1;let a=t.reexports??[];return P(s,a,i)}function P(e,n,r){if(e.length===0||n.length===0)return!1;let i=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`\\b${i}\\b`),s=0;for(let a=0;a<e.length;a++){if(!t.test(e[a]??""))continue;if(s++,!n.find(l=>l.startLine<=a&&a<=l.endLine))return!1}return s>0}var Z="SCIP_QUERY_NATIVE_CONSUMER_CLASSIFY",ee="SCIP_QUERY_NATIVE_KERNELS_BIN",ne="SCIP_QUERY_NATIVE_CONSUMER_CLASSIFY_MIN_FILES",R=1e3,ie=5e3,te=64*1024*1024,C;function re(e,n,r,i){let t=process.env[Z]?.toLowerCase();if(t!=="1"&&t!=="true")return i.nativeReason=t==="0"||t==="false"?"disabled":"opt-in-required",null;if(i.consumerFiles<fe())return i.nativeReason="below-threshold",null;let s=me();if(!s)return i.nativeReason="binary-missing",null;i.nativeAttempted=!0;let a=se(e,n,r),o=O(s,["consumer-classify"],{input:JSON.stringify(a),encoding:"utf8",timeout:ie,maxBuffer:te});if(o.status!==0||o.error)return i.nativeReason=o.error?`spawn-error:${o.error.message}`:`exit-${o.status??"null"}`,null;try{let l=JSON.parse(o.stdout),u=ae(l,n);return u?(i.nativeUsed=!0,i.nativeReason="used",u):(i.nativeReason="invalid-response",null)}catch{return i.nativeReason="invalid-json",null}}function se(e,n,r){let i=new Map,t=[];for(let o of n){let l=g(o.symbol),c=[...(r.get(o.symbolId)??new Map).entries()].map(([f,d])=>{let m=i.get(f)??new Set;return l&&m.add(l),i.set(f,m),{file:f,sources:[...d]}});t.push({symbol_id:o.symbolId,leaf:l,consumer_files:c})}let s={},a={};for(let[o,l]of i){let u=v(o);if(u){let f=N.get(e,o,()=>A(e,o,u));s[o]={imported_leaves:[...f.importedLeaves],used_leaves:[...f.usedLeaves]}}let c=oe(e,o,l);c.length>0&&(a[o]=c)}return{definitions:t,file_usages:s,reexport_only_leaves:a}}function oe(e,n,r){if(r.size===0)return[];let i=y(e).forFile(n,{lines:!0,reexports:!0}),t=i.lines??[],s=i.reexports??[];return t.length===0||s.length===0?[]:[...r].filter(a=>P(t,s,a))}function ae(e,n){if(!Array.isArray(e.entries)||e.entries.length!==n.length)return null;let r=new Set(n.map(t=>t.symbolId)),i=new Map;for(let t of e.entries){let s=le(t);if(!s||!r.has(s.symbol_id))return null;i.set(s.symbol_id,{partition:{realConsumers:s.real_consumers,barrelConsumers:s.barrel_consumers,importOnlyConsumers:s.import_only_consumers},files:s.files})}for(let t of r)if(!i.has(t))return null;return i}function le(e){if(!e||typeof e!="object")return null;let n=e;if(typeof n.symbol_id!="number"||!Array.isArray(n.real_consumers)||typeof n.barrel_consumers!="number"||typeof n.import_only_consumers!="number"||!Array.isArray(n.files)||!n.real_consumers.every(i=>typeof i=="string"))return null;let r=[];for(let i of n.files){if(!i||typeof i!="object")return null;let t=i;if(typeof t.file!="string"||!Array.isArray(t.sources)||!t.sources.every(ue)||!ce(t.classification))return null;r.push({file:t.file,sources:t.sources,classification:t.classification})}return{symbol_id:n.symbol_id,real_consumers:n.real_consumers,barrel_consumers:n.barrel_consumers,import_only_consumers:n.import_only_consumers,files:r}}function ue(e){return e==="indexed"||e==="semantic"||e==="source-fallback"}function ce(e){return e==="real"||e==="reexport-only"||e==="import-only"}function fe(){let e=process.env[ne];if(!e)return R;let n=Number(e);return Number.isFinite(n)&&n>=0?n:R}function me(){if(C!==void 0)return C;let e=process.env[ee],n=process.platform==="win32"?"scip-query-kernels.exe":"scip-query-kernels";return C=[...e?[e]:[],...de().map(i=>T(i,"target","release",n))].find(i=>k(i))??null,C}function de(){let e=new Set,n=L(j(import.meta.url));for(let r=0;r<5;r++)e.add(n),n=L(n);return[...e]}export{Le as a,Me as b,Re as c,J as d};
|
|
2
|
-
//# sourceMappingURL=chunk-52HQTTPB.js.map
|
package/dist/chunk-A63U2W3P.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{execFileSync as x,spawnSync as fe}from"child_process";import{platform as v}from"os";var h=v()==="win32";function pe(t){let e=h?"where":"which";try{return x(e,[t],{stdio:"pipe",timeout:1e4,killSignal:"SIGKILL"}),!0}catch{return!1}}var D=/\.(?:c|m)?js$/i,C=/\.(?:exe|com)$/i;function ye(t,e){return D.test(t)?{binary:process.execPath,args:[t,...e]}:{binary:t,args:[...e]}}function G(t,e){return x(t,e,{stdio:["ignore","pipe","ignore"],encoding:"utf8",timeout:1e4,killSignal:"SIGKILL"})}function ge(t,e={}){let r=e.isWindows??h,i=e.lookup??G,n;try{n=i(r?"where":"which",[t])}catch{return null}let o=n.split(/\r?\n/).map(s=>s.trim()).filter(Boolean);return r?o.find(s=>C.test(s))??null:o[0]??null}function be(t){try{return process.kill(t,0),!0}catch(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EPERM"}}var T=new Set(["aix","android","darwin","freebsd","haiku","linux","openbsd","sunos","win32","cygwin","netbsd"]);function A(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t;return e.version!==1||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0||typeof e.platform!="string"||!T.has(e.platform)||typeof e.startToken!="string"||e.startToken.trim()===""?null:{version:1,pid:e.pid,platform:e.platform,startToken:e.startToken}}function P(t,e){return t.version===e.version&&t.pid===e.pid&&t.platform===e.platform&&t.startToken===e.startToken}import{execFileSync as N}from"child_process";import{readFileSync as O}from"fs";import{platform as W}from"os";var _=1e3,M=16*1024;function Ee(t,e=$){if(!Number.isSafeInteger(t)||t<=0)return null;try{let r=L(t,e);return r?{version:1,pid:t,platform:e.platform,startToken:r}:null}catch{return null}}function L(t,e){if(e.platform==="linux"||e.platform==="android")return B(e.readFile(`/proc/${t}/stat`));if(e.platform==="win32"){let r=`([DateTimeOffset](Get-Process -Id ${t} -ErrorAction Stop).StartTime).ToUnixTimeMilliseconds()`;return w(e.run("powershell.exe",["-NoProfile","-NonInteractive","-Command",r]))}return e.platform==="darwin"||e.platform==="freebsd"||e.platform==="openbsd"||e.platform==="netbsd"?w(e.run("ps",["-p",String(t),"-o","lstart="])):null}function B(t){let e=t.lastIndexOf(")");if(e<0)return null;let i=t.slice(e+1).trim().split(/\s+/)[19];return i&&/^\d+$/.test(i)?i:null}function w(t){let e=t.trim();return e===""?null:e}var $={platform:W(),readFile(t){return O(t,"utf8")},run(t,e){return N(t,[...e],{encoding:"utf8",timeout:_,maxBuffer:M,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}};function ve(){return performance.now()}import{spawnSync as U}from"child_process";import{createHash as J}from"crypto";import{existsSync as j,lstatSync as H,realpathSync as q}from"fs";import{dirname as z,isAbsolute as K,join as Y,resolve as f}from"path";var p={run(t,e){let r=I(t,e);return r.kind==="success"?r.output:void 0},runResult:I},X=["rev-parse","--show-toplevel","--absolute-git-dir","--git-common-dir","HEAD","HEAD^{tree}"],S=/^[0-9a-f]{40,64}$/;function Pe(t,e=p){let r=e.runResult(t,X);if(r.kind==="success"){let i=V(r.output);if(i)return Q(i,e)}return Z(t,e)}function V(t){let e=t.split(`
|
|
2
|
-
`).map(u=>u.trim());if(e.length!==5)return;let[r,i,n,o,s]=e;if(!r||!i||!n||!o||!s||!S.test(o)||!S.test(s))return;let c=a(r);return{root:c,gitDir:a(d(c,i)),commonDir:a(d(c,n)),headCommit:o,treeOid:s}}function Q(t,e){let r=e.run(t.root,["status","--porcelain=v1","-z","--untracked-files=all"]);return r===void 0?void 0:{...E(t.root,t.gitDir),commonDir:t.commonDir,repositoryId:y("repository",t.commonDir),headCommit:t.headCommit,treeOid:t.treeOid,clean:r.length===0}}function Z(t,e){let r=ee(t,e);if(r.kind!=="worktree")return;let i=r.identity,n=i.projectRoot,o=e.run(n,["rev-parse","--git-common-dir"])?.trim();if(!o)return;let s=a(d(n,o)),c=m(e.run(n,["rev-parse","--verify","HEAD"])),u=m(e.run(n,["rev-parse","--verify","HEAD^{tree}"])),l=e.run(n,["status","--porcelain=v1","-z","--untracked-files=all"]);if(l!==void 0)return{...i,commonDir:s,repositoryId:y("repository",s),headCommit:c,treeOid:u,clean:l.length===0}}function ee(t,e=p){let r=e.runResult(t,["rev-parse","--show-toplevel"]);if(r.kind==="not-repository")return{kind:"non-git"};if(r.kind==="error")return r;let i=r.output.trim();if(!i)return{kind:"error",message:"Git returned an empty worktree root."};let n=a(i),o=e.run(n,["rev-parse","--absolute-git-dir"])?.trim();if(!o)return{kind:"error",message:"Git did not return an absolute worktree directory."};let s=a(d(n,o));return{kind:"worktree",identity:E(n,s)}}function E(t,e){return{projectRoot:t,gitDir:e,worktreeId:y("worktree",`${t}\0${e}`)}}function Ne(t,e,r=p){return m(r.run(t,e))}function d(t,e){return K(e)?e:f(t,e)}function a(t){try{return q(t)}catch{return f(t)}}function y(t,e){return J("sha256").update(`${t}\0${e}`).digest("hex").slice(0,24)}function m(t){return t?.trim()||void 0}function I(t,e){let r=U("git",["-C",t,...e],{encoding:"utf-8",env:{...process.env,LC_ALL:"C"},maxBuffer:52428800,stdio:["ignore","pipe","pipe"],timeout:3e4,killSignal:"SIGKILL"});if(r.status===0)return{kind:"success",output:r.stdout.trimEnd()};let n=(typeof r.stderr=="string"?r.stderr.trim():"")||r.error?.message||`git exited with status ${r.status??"unknown"}`,o=r.error?.code;return(/not a git repository/i.test(n)||o==="ENOENT"&&j(f(t)))&&!te(t)?{kind:"not-repository"}:{kind:"error",message:n}}function te(t){if(process.env.GIT_DIR||process.env.GIT_COMMON_DIR)return!0;let e=f(t);for(;;){try{return H(Y(e,".git")),!0}catch(i){let n=i.code;if(n!=="ENOENT"&&n!=="ENOTDIR")return!0}let r=z(e);if(r===e)return!1;e=r}}function g(t,e,r,i){let n=0;for(;n<e.length;){let o=r.writeFile(t,e,n,e.length-n);if(!Number.isSafeInteger(o)||o<=0||o>e.length-n)throw new Error(`${i} write did not make valid forward progress`);n+=o}}function k(t,e){if(e!=="win32")return!1;let r=t.code;return r==="EACCES"||r==="EBADF"||r==="EINVAL"||r==="EISDIR"||r==="EPERM"}import{randomUUID as re}from"crypto";import{closeSync as ne,fsyncSync as ie,linkSync as oe,mkdirSync as se,openSync as ue,renameSync as le,unlinkSync as ce,writeSync as ae}from"fs";import{dirname as R}from"path";var b=Object.freeze({platform:process.platform,randomToken:()=>re(),makeDirectory:t=>se(t,{recursive:!0}),openFile:(t,e,r)=>ue(t,e,r),writeFile:(t,e,r,i)=>ae(t,e,r,i),syncFile:t=>ie(t),closeFile:t=>ne(t),renameFile:(t,e)=>le(t,e),linkFile:(t,e)=>oe(t,e),removeFile:t=>ce(t)});function $e(t,e,r={}){let i=r.durability??"visibility",n=r.runtime??b,o=R(t);n.makeDirectory(o);let s=`${t}.tmp-${n.randomToken()}`,c=typeof e=="string"?Buffer.from(e):e,u,l=!1;try{return u=n.openFile(s,"wx",r.mode??384),l=!0,g(u,c,n,"atomic file"),i==="durable"&&n.syncFile(u),n.closeFile(u),u=void 0,n.renameFile(s,t),l=!1,{durability:i,directorySync:i==="durable"?F(o,n):"not-requested"}}finally{if(u!==void 0)try{n.closeFile(u)}catch{}if(l)try{n.removeFile(s)}catch{}}}function Ue(t,e,r={}){let i=r.durability??"visibility",n=r.runtime??b;if(!n.linkFile)throw new Error("Exclusive atomic file publication requires hard-link support.");let o=R(t);n.makeDirectory(o);let s=`${t}.tmp-${n.randomToken()}`,c=typeof e=="string"?Buffer.from(e):e,u,l=!1;try{return u=n.openFile(s,"wx",r.mode??384),l=!0,g(u,c,n,"exclusive atomic file"),i==="durable"&&n.syncFile(u),n.closeFile(u),u=void 0,n.linkFile(s,t),n.removeFile(s),l=!1,{durability:i,directorySync:i==="durable"?F(o,n):"not-requested"}}finally{if(u!==void 0)try{n.closeFile(u)}catch{}if(l)try{n.removeFile(s)}catch{}}}function F(t,e=b){let r;try{r=e.openFile(t,"r")}catch(i){if(k(i,e.platform))return"unsupported";throw i}try{return e.syncFile(r),"synced"}catch(i){if(k(i,e.platform))return"unsupported";throw i}finally{e.closeFile(r)}}export{pe as a,ye as b,ge as c,be as d,A as e,P as f,Ee as g,ve as h,g as i,k as j,$e as k,Ue as l,F as m,Pe as n,Ne as o,d as p,a as q};
|
|
3
|
-
//# sourceMappingURL=chunk-A63U2W3P.js.map
|
package/dist/chunk-ADFSIJP2.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{c as d}from"./chunk-XVJ3V7LM.js";import{a as h}from"./chunk-2OXVAGGT.js";import{d as f}from"./chunk-ZTTISZ7J.js";import{b as u}from"./chunk-7LABSJSR.js";import{E as l}from"./chunk-DGMCFMPG.js";import{readFileSync as E}from"fs";import{join as B}from"path";function j(t,e,s={}){let n=h(t,e);if(!n)return null;let a=new d(t),o=N(t,n),r=n.endLine-n.startLine+1,m=a.calleeMap([n],{additive:!0,semantic:s.semantic}).get(n.symbolId)??[],c=new Set(m.map(x=>x.symbol));return{symbol:n.symbol,shortName:f(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:r,branches:o.branches,estimateBasis:o.estimateBasis,cyclomaticEstimate:o.branches+1,calleeCount:c.size,fanIn:P(t,n.symbolId),fanOut:w(m,n.relativePath)}}function N(t,e){let s=l(t,e.relativePath);if(s){let n=g(s.rootNode,e.startLine,e.endLine);if(n)return{branches:v(n),estimateBasis:"ast"}}return{branches:_(p(t,e.relativePath,e.startLine,e.endLine),y(t,e.relativePath)),estimateBasis:"regex-fallback"}}function H(t,e){let s=new Map,n=new Map;for(let a of e){let o=n.get(a.relativePath)??[];o.push(a),n.set(a.relativePath,o)}for(let[a,o]of n){let r=l(t,a),i=r===null?[]:o.filter(c=>r.rootNode.startPosition.row<=c.startLine&&r.rootNode.endPosition.row>=c.endLine),m=new Set(i.map(c=>c.symbolId));if(r&&i.length>0){for(let c of i)s.set(c.symbolId,{branches:0,estimateBasis:"ast"});C(r.rootNode,i,s)}for(let c of o)m.has(c.symbolId)||s.set(c.symbolId,L(t,c))}return s}function L(t,e){return{branches:_(p(t,e.relativePath,e.startLine,e.endLine),y(t,e.relativePath)),estimateBasis:"regex-fallback"}}function y(t,e){return t.get("SELECT language FROM documents WHERE relative_path = ?",e)?.language??"unknown"}function p(t,e,s,n){try{return E(B(t.config.projectRoot,e),"utf-8").split(`
|
|
2
|
-
`).slice(s,n+1).join(`
|
|
3
|
-
`)}catch{return""}}function P(t,e){return t.get(`SELECT COUNT(DISTINCT c.document_id) AS c
|
|
4
|
-
FROM mentions m
|
|
5
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
6
|
-
JOIN (
|
|
7
|
-
SELECT m2.symbol_id, c2.document_id
|
|
8
|
-
FROM mentions m2
|
|
9
|
-
JOIN chunks c2 ON m2.chunk_id = c2.id
|
|
10
|
-
WHERE m2.role = 1
|
|
11
|
-
GROUP BY m2.symbol_id
|
|
12
|
-
) sym_def ON sym_def.symbol_id = m.symbol_id
|
|
13
|
-
WHERE m.symbol_id = ?
|
|
14
|
-
AND m.role != 1
|
|
15
|
-
AND sym_def.document_id != c.document_id`,e)?.c??0}function w(t,e){return new Set(t.filter(s=>s.file!==e).map(s=>s.symbol)).size}function v(t){let e=0;return b(t,s=>{e+=S(s)}),e}function C(t,e,s){let n=[...e].sort((a,o)=>a.startLine-o.startLine||o.endLine-a.endLine);b(t,a=>{let o=S(a);if(o===0)return;let r=a.startPosition.row,i=a.endPosition.row;for(let m of n){if(m.startLine>r)break;if(m.endLine<i)continue;let c=s.get(m.symbolId);c&&(c.branches+=o)}})}function b(t,e){e(t);for(let s of t.namedChildren)b(s,e)}function g(t,e,s){if(t.startPosition.row>e||t.endPosition.row<s)return null;for(let n of t.namedChildren){let a=g(n,e,s);if(a)return a}return t}var D=new Set(["if_statement","conditional_expression","ternary_expression","for_statement","for_in_statement","for_of_statement","while_statement","do_statement","switch_case","case_statement","catch_clause","except_clause","elif_clause","match_arm"]);function S(t){return D.has(t.type)?1:t.type==="binary_expression"&&t.parent?.type!=="binary_expression"&&(t.text.includes("&&")||t.text.includes("||"))?I(t.text):0}function I(t){return(t.match(/&&|\|\|/g)??[]).length}function _(t,e){let s=u(t),n=0,a=[/\bif\b/g,/\belse\s+if\b/g,/\belse\b/g,/\bfor\b/g,/\bwhile\b/g,/\bswitch\b/g,/\bcase\b/g,/\bcatch\b/g,/\?\s*[^?]/g,/&&/g,/\|\|/g];for(let o of a){let r=s.match(o);r&&(n+=r.length)}if(e==="python"){let o=[/\belif\b/g,/\bexcept\b/g,/\bfinally\b/g];for(let r of o){let i=s.match(r);i&&(n+=i.length)}}else if(e==="rust"){let o=[/\bmatch\b/g,/=>/g,/\bloop\b/g];for(let r of o){let i=s.match(r);i&&(n+=i.length)}}else if(e==="ruby"){let o=[/\belsif\b/g,/\bunless\b/g,/\brescue\b/g,/\bwhen\b/g];for(let r of o){let i=s.match(r);i&&(n+=i.length)}}else if(e==="go"){let o=[/\bselect\b/g,/\bdefer\b/g];for(let r of o){let i=s.match(r);i&&(n+=i.length)}}return n}export{j as a,N as b,H as c,v as d};
|
|
16
|
-
//# sourceMappingURL=chunk-ADFSIJP2.js.map
|
package/dist/chunk-AOLE4DYM.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{Ae as C,Gc as M,K as N,Kd as G,P as y,Q as v,Rd as u,Sd as k,Td as B,Vd as d,Wa as j,fb as E,fe as R,ge as T,re as b,te as A,ue as F,ve as p,xe as V}from"./chunk-JJJCO4QC.js";var ie=G,W=(e=>parseInt(e,10)),q=(e=>{let t=parseInt(e,10);if(!Number.isFinite(t)||t<1)throw new Error(`Expected a positive integer, got ${e}`);return t}),ae=parseFloat,me=parseInt;function l(e,t,o,...n){return n.length>0?{flags:e,description:t,parser:o,defaultValue:n[0]}:{flags:e,description:t,parser:o}}function U(){return l("--json","Output as JSON for programmatic consumption")}function X(){return l("--compact","Emit minified one-line JSON (use with --json)")}function K(e=[]){let t=w(e);return t.some(o=>o.flags==="--compact")?t:[...t,X()]}function w(e=[]){return e.some(t=>t.flags==="--json")?e:[...e,U()]}function x(e,t=[]){return{category:e,examples:t}}function S(e,t,o,n,r){return{answers:typeof e=="string"?[e]:e,returns:typeof t=="string"?[t]:t,inputs:o,coverage:n,...r?{scope:r}:{}}}function Q(e){return e.generation.identity}function z(e){return Buffer.from(JSON.stringify({version:1,...e}),"utf8").toString("base64url")}function H(e,t){let o;try{o=JSON.parse(Buffer.from(e,"base64url").toString("utf8"))}catch{throw new Error("Invalid result cursor. Run the command again without --cursor.")}if(!Y(o))throw new Error("Invalid result cursor. Run the command again without --cursor.");if(o.command!==t.command||o.target!==t.target)throw new Error("This cursor belongs to a different command or target. Run again without --cursor.");if(o.indexGeneration!==t.indexGeneration)throw new Error("The index changed after this cursor was issued. Run again without --cursor.");return o}function Y(e){if(!e||typeof e!="object")return!1;let t=e;return t.version===1&&typeof t.command=="string"&&typeof t.target=="string"&&Number.isSafeInteger(t.offset)&&(t.offset??-1)>=0&&typeof t.indexGeneration=="string"&&t.indexGeneration.length>0}function P(e,t){let o=y(e,t),n=ee(o);for(let r of n)console.log(r)}function $(e,t,o="No results found for resolved symbol."){return y(e,t).match?o:_(t,v(e,t,5))}function O(e,t,o,n){return{...Z(e,t),[n]:o}}function Z(e,t){let o=y(e,t);return o.match?{matched:!0,resolved:{symbol:o.match.symbol,shortName:N(o.match.symbol),relativePath:o.match.relativePath},otherMatches:o.candidates.map(n=>({shortName:n.shortName,relativePath:n.relativePath,startLine:n.startLine})),totalMatches:o.total}:{matched:!1,suggestions:v(e,t,5)}}function _(e,t){let o=`No definition matched '${e}'.`;return t.length>0?`${o} Suggestions: ${t.join(", ")}`:o}function ee(e){if(!e.match||e.total<=1)return[];let t=e.match,o=Math.max(0,e.total-1),n=[`Resolved: ${N(t.symbol)} (${t.relativePath}) -- ${o} other definition(s) share this name; qualify as <dir/leaf> to target another.`],r=e.candidates.slice(0,3);return r.length>0&&n.push(`Alternates: ${r.map(s=>`${s.shortName} (${s.relativePath}:${u(s.startLine)})`).join("; ")}`),n.push(""),n}var te=R(({db:e,args:t,opts:o})=>{let n=b(t,0),r=p(o,"signatures"),s=E(e,n);if(p(o,"json")){C("outline",t,o,s);return}if(s.length===0)return d.empty(`No symbols found for "${n}".`);function i(D,f){for(let a of D){let c=" ".repeat(f),m=r&&a.signature?` - ${oe(a.signature)}`:"";console.log(`${c}${k(a.startLine,a.endLine)} ${a.shortName}${m}`),i(a.children,f+1)}}i(s,0)});function oe(e){return e.length>120?`${e.slice(0,117)}...`:e}var ne=T("refs",({db:e,args:t,opts:o,budget:n})=>{let r=b(t,0),s=j(e,r,{semantic:n.semantic}).sort((h,J)=>h.relativePath.localeCompare(J.relativePath)||h.line-J.line),i=A(o,"cursor"),f=F(o,"limit")??(i?50:s.length),a=Q(e),c=i?H(i,{command:"refs",target:r,indexGeneration:a}).offset:0;if(c>s.length)throw new Error("This cursor points past the current result set. Run again without --cursor.");let m=s.slice(c,c+f),L=c+m.length,g=L<s.length?{cursor:z({command:"refs",target:r,offset:L,indexGeneration:a}),indexGeneration:a}:void 0,I={complete:c===0&&m.length===s.length,totalKnown:!0,returned:m.length,total:s.length,omitted:s.length-m.length,...g?{continuation:g}:{}};if(p(o,"json")){C("refs",t,o,O(e,r,m,"references"),{analysisBudget:n.analysisBudget,coverage:I});return}if(m.length===0)return d.empty($(e,r,"No references found."));P(e,r),d.groupedByFile(m,h=>` line ${u(h.line)}`),g&&console.log(`
|
|
3
|
-
${I.omitted} omitted; continue with --cursor ${g.cursor}`)}),re=R(({db:e,args:t,opts:o})=>{let n=b(t,0),r=M(e,n,{context:V(o,"context",0)});if(p(o,"json")){C("code",t,o,O(e,n,r,"code"));return}if(!r)return d.empty($(e,n,"Symbol found, but source was unreadable."));P(e,n),console.log(`${B(r.relativePath,r.startLine,r.endLine)} ${r.shortName} [${r.language??"unknown"}]
|
|
4
|
-
`);let s=r.source.split(`
|
|
5
|
-
`);for(let i=0;i<s.length;i++)console.log(` ${String(u(r.startLine+i)).padStart(4)} ${s[i]}`)}),ve=[{id:"refs",command:"refs <symbol>",description:"Find all files referencing a symbol",options:K([l("--full","Run unbounded semantic analysis on large indexes"),l("-n, --limit <n>","Maximum reference sites to return",q),l("--cursor <cursor>","Continue a prior bounded result (implies --limit 50 when omitted)")]),budget:"semantic",agent:{answers:["Which files reference this symbol?","Is this symbol used anywhere, or only defined?"],returns:["referencing file paths","reference line numbers grouped by file"],inputs:["symbol"],coverage:"bounded",contrasts:[{command:"imported-by",distinction:"imported-by lists files importing the symbol; refs covers every reference site, imported or not."},{command:"affected",distinction:"refs is one hop out; affected is the transitive closure of what could break."}]},renderShape:"grouped-by-file",docs:x("Navigation",["scip-query refs login"]),handler:ne},{id:"outline",command:"outline <file>",description:"Tree view of symbols in a file, with line ranges",agent:S("What symbols and nesting exist in this file?","symbol names, nesting, and line ranges",["file"],"complete"),options:w([l("--signatures","Show trimmed symbol signatures")]),renderShape:"custom",docs:x("Navigation"),handler:te},{id:"code",command:"code <symbol>",description:"Read the source code for a symbol (bounded to its definition range)",agent:S("What is the compiler-resolved definition source for this symbol?","definition identity, source, and line range",["symbol"],"complete"),options:w([l("-C, --context <n>","Extra lines of context above/below",W,0)]),renderShape:"custom",docs:x("Navigation"),handler:re}];export{ie as a,W as b,q as c,ae as d,me as e,l as f,U as g,X as h,K as i,w as j,x as k,S as l,P as m,$ as n,O as o,Z as p,ve as q};
|
|
6
|
-
//# sourceMappingURL=chunk-AOLE4DYM.js.map
|
package/dist/chunk-B5MHCHP3.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import{a as f,b as M,d as V}from"./chunk-35SQLYCQ.js";function he(e,t){let n=e.split("/").at(-1)??e;if(W.has(n)||n===".scipquery.json"||/^tsconfig(?:\..+)?\.json$/.test(n))return"config";if(/\.d\.(?:ts|mts|cts)$/.test(e.toLowerCase()))return"ambient";let i=e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:"";return t.some(r=>(X[r]??[]).includes(i))?"source":"other"}function nt(e,t,n){let i=e.split("/").at(-1)??e;if(n?.includes(e)||n?.includes(i)||W.has(i))return!0;let r=e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:"";return(X[t]??[]).includes(r)}function rt(e){if(typeof e!="object"||e===null)return null;let t=e;return typeof t.version!="number"||!U(t.languages)||typeof t.pnpmWorkspaces!="boolean"||typeof t.typescriptProjectMode!="string"||!U(t.typescriptProjects)||t.clojureConfigPath!==void 0&&typeof t.clojureConfigPath!="string"||!Array.isArray(t.files)||!t.files.every(F)?null:t}function it(e,t){let n=new Map((e?.files??[]).map(s=>[s.path,s])),i=new Map(t.files.map(s=>[s.path,s])),r=new Set([...n.keys(),...i.keys()]),a=[];for(let s of[...r].sort()){let c=n.get(s),d=i.get(s),h=he(s,t.languages);!c&&d?a.push({kind:"added",path:s,inputKind:h,after:d}):c&&!d?a.push({kind:"deleted",path:s,inputKind:h,before:c}):c&&d&&(c.hash!==d.hash||c.size!==d.size)&&a.push({kind:"modified",path:s,inputKind:h,before:c,after:d})}let o=new Set;return e||o.add("prior-snapshot-unavailable"),e&&e.version!==t.version&&o.add("snapshot-version-changed"),(K(e?.files??[])||K(t.files))&&o.add("duplicate-input-path"),[...e?.files??[],...t.files].some(Ee)&&o.add("unreadable-input"),{version:1,changes:a,projectIdentityChanged:e?!ye(e,t):!0,uncertainty:[...o].sort()}}function U(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function K(e){return new Set(e.map(t=>t.path)).size!==e.length}function F(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.path=="string"&&typeof t.size=="number"&&Number.isFinite(t.size)&&typeof t.hash=="string"}function Ee(e){return e.hash==="unreadable"||e.size<0}function ye(e,t){return H(e.languages,t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&H(e.typescriptProjects,t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function H(e,t){if(e.length!==t.length)return!1;let n=[...e].sort(),i=[...t].sort();return n.every((r,a)=>r===i[a])}var W=new Set(["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lockb","tsconfig.json","tsconfig.base.json","pyproject.toml","setup.py","setup.cfg","Cargo.toml","Cargo.lock","go.mod","go.sum","pom.xml","build.gradle","build.gradle.kts","build.sbt","compile_commands.json","CMakeLists.txt","Makefile","Gemfile","Gemfile.lock","composer.json","composer.lock","pubspec.yaml","pubspec.lock","deps.edn","project.clj","bb.edn","shadow-cljs.edn"]),X={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".mjs",".cjs"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"],clojure:[".clj",".cljs",".cljc"]};var D=2,b=3;var N=new Set(V);function $(e){let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch(o){return{kind:"malformed",reason:`invalid JSON: ${Ce(o)}`}}if(!f(t))return{kind:"malformed",reason:"metadata must be a JSON object"};let n=t.version;if(!Number.isInteger(n))return{kind:"malformed",reason:"version must be an integer"};if(n!==D&&n!==b)return{kind:"unsupported",version:n,direction:n<D?"older":"future"};let i=_e(t,n);if(i)return{kind:"malformed",reason:i};let r=t,a={metadata:r,capabilities:ve(r)};return n===D?{kind:"legacy",...a,metadata:r}:{kind:"supported",...a,metadata:r}}function dt(e){return e.kind==="legacy"||e.kind==="supported"?e.metadata:null}function lt(e){if(e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.stableGenerationIdentity)return null;let t=e.metadata;return JSON.stringify({version:t.version,status:t.status,updatedAt:t.updatedAt,fingerprint:t.fingerprint,indexedLanguages:t.indexedLanguages,scipCompanion:t.scipCompanion})}function ve(e){let t=e.fingerprint!==void 0,n=f(e.fingerprint),i=e.indexedLanguages!==void 0,r=e.status==="complete",a=e.version===b?e:null;return{usableForQuery:i,usableForEvidenceCache:t,publishableGeneration:r&&n&&i,stableGenerationIdentity:r&&t&&typeof e.updatedAt=="string",languageShardReuse:!!a?.languageFingerprints,typescriptProjectShardReuse:!!a?.typescriptProjectShards}}function _e(e,t){if(e.status!=="complete"&&e.status!=="partial")return"status must be complete or partial";if(e.updatedAt!==void 0&&!M(e.updatedAt))return"updatedAt must be a valid timestamp";for(let n of["requestedLanguages","indexedLanguages"])if(e[n]!==void 0&&!Se(e[n]))return`${n} must contain unique supported languages`;return e.skipped!==void 0&&!be(e.skipped)?"skipped must contain supported language/reason pairs":e.scipCompanion!==void 0&&e.scipCompanion!=="current"&&e.scipCompanion!=="deferred"?"scipCompanion must be current or deferred":t===b&&e.languageFingerprints!==void 0&&!Re(e.languageFingerprints)?"languageFingerprints must map supported languages to fingerprint objects":t===b&&e.typescriptProjectShards!==void 0&&!Te(e.typescriptProjectShards)?"typescriptProjectShards must map project names to file fingerprints":null}function Se(e){return!Array.isArray(e)||!e.every(t=>typeof t=="string"&&N.has(t))?!1:new Set(e).size===e.length}function be(e){return Array.isArray(e)&&e.every(t=>f(t)&&typeof t.language=="string"&&N.has(t.language)&&typeof t.reason=="string")}function Re(e){return f(e)&&Object.entries(e).every(([t,n])=>N.has(t)&&f(n))}function Te(e){return f(e)&&Object.values(e).every(t=>f(t)&&Array.isArray(t.files)&&t.files.every(F))}function Ce(e){return e instanceof Error?e.message:String(e)}var B=[];function R(e){e.groups.length>0&&B.push(e)}function ut(e,t){let n=new Set(t.groups);for(let i of B)i.groups.some(r=>n.has(r))&&(t.file!==void 0&&i.clearFile?i.clearFile(e,t.file):i.clearAll(e))}function G(){let e=new WeakMap;return{cache:e,ensure(t){let n=e.get(t);return n||(n=new Map,e.set(t,n)),n}}}function E(e,t){let{cache:n,ensure:i}=G(),r={get(a,o,s){let c=i(a);if(c.has(o))return c.get(o);let d=s();return c.set(o,d),d},invalidate(a,o){n.get(a)?.delete(o)},invalidateAll(a){n.delete(a)},size(a){return n.get(a)?.size??0}};return R({name:e,groups:t.clearGroups,clearAll:a=>r.invalidateAll(a),clearFile:(a,o)=>r.invalidate(a,o)}),r}function mt(e,t){let n=new WeakMap,i={get(r,a){let o=n.get(r);if(o)return o.value;let s=a();return n.set(r,{value:s}),s},invalidate(r){n.delete(r)},has(r){return n.has(r)}};return R({name:e,groups:t.clearGroups,clearAll:r=>i.invalidate(r)}),i}var Pe={clearGroups:["whole-project","source-file"]};function ht(e){return Oe(e,Pe)}function Oe(e,t){let{cache:n,ensure:i}=G(),r={get(a,o,s,c){let d=i(a),h=d.get(o);if(h&&h.source===s)return h.value;let A=c();return d.set(o,{source:s,value:A}),A},invalidate(a,o){n.get(a)?.delete(o)},invalidateAll(a){n.delete(a)}};return R({name:e,groups:t.clearGroups,clearAll:a=>r.invalidateAll(a),clearFile:(a,o)=>r.invalidate(a,o)}),r}import{createHash as Fe}from"crypto";import{existsSync as _t,mkdirSync as De}from"fs";import{dirname as Y,join as Ne}from"path";import z from"better-sqlite3";var we="evidence.db";var Le=["source-facts","definition-exclusions","doc-path-tokens","react-component-behavior-profiles"],w=new Set(Le);var Ct=512*1024*1024;var T=new WeakMap,ke=E("evidence-content-hash",{clearGroups:["whole-project","source-file"]}),Ie=E("evidence-project-fingerprint",{clearGroups:["whole-project"]}),p="evidence-v1",y="version NOT LIKE 'evidence-%'";function Q(e){return Fe("sha256").update(e).digest("hex")}function Pt(e,t,n){return ke.get(e,t,()=>Q(n))}function J(e){return Ie.get(e,"current",()=>{try{if(!e.generation.metadataRaw)return null;let t=$(e.generation.metadataRaw);if(t.kind!=="legacy"&&t.kind!=="supported"||!t.capabilities.usableForEvidenceCache)return null;let n=t.metadata,i=[...n.indexedLanguages??[]].sort();return Q(JSON.stringify({fingerprint:n.fingerprint,indexedLanguages:i,status:n.status}))}catch(t){return _("project fingerprint unavailable",t),null}})}function _(e,t){process.env.SCIP_QUERY_DEBUG&&console.error(`evidence-cache: ${e}: ${t instanceof Error?t.message:String(t)}`)}function u(e){if(T.has(e))return T.get(e)??null;let t=null;try{let n=new z(Ne(Y(e.config.dbPath),we));n.pragma("journal_mode = WAL"),n.pragma("busy_timeout = 5000"),n.pragma("synchronous = NORMAL"),n.exec(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS file_evidence (
|
|
3
|
-
kind TEXT NOT NULL,
|
|
4
|
-
relative_path TEXT NOT NULL,
|
|
5
|
-
content_hash TEXT NOT NULL,
|
|
6
|
-
version TEXT NOT NULL,
|
|
7
|
-
payload TEXT NOT NULL,
|
|
8
|
-
PRIMARY KEY (kind, relative_path)
|
|
9
|
-
);
|
|
10
|
-
CREATE TABLE IF NOT EXISTS project_evidence (
|
|
11
|
-
kind TEXT NOT NULL,
|
|
12
|
-
cache_key TEXT NOT NULL,
|
|
13
|
-
project_fingerprint TEXT NOT NULL,
|
|
14
|
-
version TEXT NOT NULL,
|
|
15
|
-
payload TEXT NOT NULL,
|
|
16
|
-
PRIMARY KEY (kind, cache_key)
|
|
17
|
-
);
|
|
18
|
-
CREATE TABLE IF NOT EXISTS semantic_callees (
|
|
19
|
-
relative_path TEXT NOT NULL,
|
|
20
|
-
symbol TEXT NOT NULL,
|
|
21
|
-
content_hash TEXT NOT NULL,
|
|
22
|
-
deps_digest TEXT NOT NULL,
|
|
23
|
-
version TEXT NOT NULL,
|
|
24
|
-
payload TEXT NOT NULL,
|
|
25
|
-
PRIMARY KEY (relative_path, symbol)
|
|
26
|
-
);
|
|
27
|
-
CREATE TABLE IF NOT EXISTS semantic_references (
|
|
28
|
-
relative_path TEXT NOT NULL,
|
|
29
|
-
symbol TEXT NOT NULL,
|
|
30
|
-
project_fingerprint TEXT NOT NULL,
|
|
31
|
-
version TEXT NOT NULL,
|
|
32
|
-
payload TEXT NOT NULL,
|
|
33
|
-
PRIMARY KEY (relative_path, symbol)
|
|
34
|
-
);
|
|
35
|
-
CREATE TABLE IF NOT EXISTS finding_outcome_ledger (
|
|
36
|
-
check_name TEXT NOT NULL,
|
|
37
|
-
finding_id TEXT NOT NULL,
|
|
38
|
-
first_seen INTEGER NOT NULL,
|
|
39
|
-
last_seen INTEGER NOT NULL,
|
|
40
|
-
times_shown INTEGER NOT NULL,
|
|
41
|
-
outcome TEXT NOT NULL,
|
|
42
|
-
PRIMARY KEY (check_name, finding_id)
|
|
43
|
-
);
|
|
44
|
-
CREATE TABLE IF NOT EXISTS finding_outcome_observations (
|
|
45
|
-
observation_id TEXT PRIMARY KEY,
|
|
46
|
-
fingerprint TEXT NOT NULL,
|
|
47
|
-
observed_at INTEGER NOT NULL
|
|
48
|
-
);
|
|
49
|
-
`),t={evidence:n,shared:xe(e.config.sharedEvidenceDbPath),readFileEvidence:n.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),readLegacyFileEvidence:n.prepare(`SELECT payload FROM file_evidence
|
|
50
|
-
WHERE kind = ? AND relative_path = ? AND content_hash = ? AND ${y}
|
|
51
|
-
ORDER BY version DESC
|
|
52
|
-
LIMIT 1`),writeFileEvidence:n.prepare("INSERT OR REPLACE INTO file_evidence (kind, relative_path, content_hash, version, payload) VALUES (?, ?, ?, ?, ?)"),readProjectEvidence:n.prepare("SELECT payload FROM project_evidence WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND version = ?"),readLegacyProjectEvidence:n.prepare(`SELECT payload FROM project_evidence
|
|
53
|
-
WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND ${y}
|
|
54
|
-
ORDER BY version DESC
|
|
55
|
-
LIMIT 1`),writeProjectEvidence:n.prepare("INSERT OR REPLACE INTO project_evidence (kind, cache_key, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)"),readCallees:n.prepare(`SELECT payload FROM semantic_callees
|
|
56
|
-
WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCallees:n.prepare(`SELECT payload FROM semantic_callees
|
|
57
|
-
WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND ${y}
|
|
58
|
-
ORDER BY version DESC
|
|
59
|
-
LIMIT 1`),readCalleesForFile:n.prepare(`SELECT symbol, payload FROM semantic_callees
|
|
60
|
-
WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCalleesForFile:n.prepare(`SELECT symbol, payload FROM semantic_callees
|
|
61
|
-
WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND ${y}
|
|
62
|
-
ORDER BY symbol, version DESC`),writeCallees:n.prepare(`INSERT OR REPLACE INTO semantic_callees
|
|
63
|
-
(relative_path, symbol, content_hash, deps_digest, version, payload) VALUES (?, ?, ?, ?, ?, ?)`),dropStaleCallees:n.prepare("DELETE FROM semantic_callees WHERE relative_path = ? AND content_hash != ?"),readReferences:n.prepare(`SELECT payload FROM semantic_references
|
|
64
|
-
WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferences:n.prepare(`SELECT payload FROM semantic_references
|
|
65
|
-
WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND ${y}
|
|
66
|
-
ORDER BY version DESC
|
|
67
|
-
LIMIT 1`),readReferencesForFile:n.prepare(`SELECT symbol, payload FROM semantic_references
|
|
68
|
-
WHERE relative_path = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferencesForFile:n.prepare(`SELECT symbol, payload FROM semantic_references
|
|
69
|
-
WHERE relative_path = ? AND project_fingerprint = ? AND ${y}
|
|
70
|
-
ORDER BY symbol, version DESC`),writeReferences:n.prepare(`INSERT OR REPLACE INTO semantic_references
|
|
71
|
-
(relative_path, symbol, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)`),dropStaleReferences:n.prepare("DELETE FROM semantic_references WHERE relative_path = ? AND project_fingerprint != ?"),readFindingOutcomeLedger:n.prepare("SELECT check_name, finding_id, first_seen, last_seen, times_shown, outcome FROM finding_outcome_ledger"),claimFindingOutcomeObservation:n.prepare(`INSERT OR IGNORE INTO finding_outcome_observations
|
|
72
|
-
(observation_id, fingerprint, observed_at) VALUES (?, ?, ?)`),readFindingOutcomeObservation:n.prepare("SELECT fingerprint FROM finding_outcome_observations WHERE observation_id = ?"),upsertFindingOutcomeLedgerRow:n.prepare(`INSERT INTO finding_outcome_ledger
|
|
73
|
-
(check_name, finding_id, first_seen, last_seen, times_shown, outcome)
|
|
74
|
-
VALUES (?, ?, ?, ?, ?, ?)
|
|
75
|
-
ON CONFLICT(check_name, finding_id) DO UPDATE SET
|
|
76
|
-
first_seen = MIN(finding_outcome_ledger.first_seen, excluded.first_seen),
|
|
77
|
-
last_seen = MAX(finding_outcome_ledger.last_seen, excluded.last_seen),
|
|
78
|
-
times_shown = finding_outcome_ledger.times_shown + excluded.times_shown,
|
|
79
|
-
outcome = excluded.outcome`),updateFindingOutcomeLedgerRow:n.prepare(`UPDATE finding_outcome_ledger
|
|
80
|
-
SET first_seen = MIN(first_seen, ?),
|
|
81
|
-
last_seen = MAX(last_seen, ?),
|
|
82
|
-
outcome = ?
|
|
83
|
-
WHERE check_name = ? AND finding_id = ?`),trimFindingOutcomeLedgerCheck:n.prepare(`DELETE FROM finding_outcome_ledger
|
|
84
|
-
WHERE rowid IN (
|
|
85
|
-
SELECT rowid
|
|
86
|
-
FROM finding_outcome_ledger
|
|
87
|
-
WHERE check_name = ?
|
|
88
|
-
ORDER BY last_seen DESC, first_seen DESC, finding_id DESC
|
|
89
|
-
LIMIT -1 OFFSET ?
|
|
90
|
-
)`)}}catch(n){_("disabled (open failed)",n)}return T.set(e,t),t}function g(e,t,n){_(`disabled (${t})`,n),T.set(e,null)}function xe(e){if(!e)return null;try{De(Y(e),{recursive:!0});let t=new z(e);return t.pragma("journal_mode = WAL"),t.pragma("busy_timeout = 250"),t.pragma("synchronous = NORMAL"),t.exec(`
|
|
91
|
-
CREATE TABLE IF NOT EXISTS file_evidence (
|
|
92
|
-
kind TEXT NOT NULL,
|
|
93
|
-
relative_path TEXT NOT NULL,
|
|
94
|
-
content_hash TEXT NOT NULL,
|
|
95
|
-
version TEXT NOT NULL,
|
|
96
|
-
payload TEXT NOT NULL,
|
|
97
|
-
last_accessed_at INTEGER NOT NULL,
|
|
98
|
-
PRIMARY KEY (kind, relative_path, content_hash, version)
|
|
99
|
-
);
|
|
100
|
-
`),{evidence:t,readFileEvidence:t.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),writeFileEvidence:t.prepare(`INSERT INTO file_evidence (kind, relative_path, content_hash, version, payload, last_accessed_at)
|
|
101
|
-
VALUES (?, ?, ?, ?, ?, ?)
|
|
102
|
-
ON CONFLICT(kind, relative_path, content_hash, version)
|
|
103
|
-
DO UPDATE SET payload = excluded.payload, last_accessed_at = excluded.last_accessed_at`)}}catch(t){return _("shared cache disabled (open failed)",t),null}}function L(e,t,n){_(`shared cache disabled (${t})`,n);try{e.shared?.evidence.close()}catch{}e.shared=null}function q(e,t,n,i){let r=u(e);if(!r)return null;try{let a=r.readFileEvidence.get(t,n,i,p)??r.readLegacyFileEvidence.get(t,n,i);if(a?.payload!==void 0)return a.payload;if(!w.has(t)||!r.shared)return null;try{return r.shared.readFileEvidence.get(t,n,i,p)?.payload??null}catch(o){return L(r,"file_evidence read",o),null}}catch(a){return g(e,"file_evidence read",a),null}}function Z(e,t,n,i,r){let a=u(e);if(a)try{if(a.writeFileEvidence.run(t,n,i,p,r),w.has(t)&&a.shared)try{a.shared.writeFileEvidence.run(t,n,i,p,r,Date.now())}catch(o){L(a,"file_evidence write",o)}}catch(o){g(e,"file_evidence write",o)}}function ee(e,t){if(t.length===0)return;let n=u(e);if(n)try{n.evidence.transaction(()=>{for(let r of t)n.writeFileEvidence.run(r.kind,r.relativePath,r.contentHash,p,r.payload)})();let i=t.filter(r=>w.has(r.kind));if(i.length>0&&n.shared)try{n.shared.evidence.transaction(()=>{for(let r of i)n.shared.writeFileEvidence.run(r.kind,r.relativePath,r.contentHash,p,r.payload,Date.now())})()}catch(r){L(n,"file_evidence batch write",r)}}catch(i){g(e,"file_evidence batch write",i)}}function te(e,t,n,i){let r=u(e);if(!r)return null;try{return(r.readProjectEvidence.get(t,n,i,p)??r.readLegacyProjectEvidence.get(t,n,i))?.payload??null}catch(a){return g(e,"project_evidence read",a),null}}function ne(e,t,n,i,r){let a=u(e);if(a)try{a.writeProjectEvidence.run(t,n,i,p,r)}catch(o){g(e,"project_evidence write",o)}}function Ot(e,t,n,i){let r=u(e);if(!r)return new Map;try{let a=r.readCalleesForFile.all(t,n,i,p),o=r.readLegacyCalleesForFile.all(t,n,i);return re([...o,...a])}catch(a){return g(e,"semantic_callees bulk read",a),new Map}}function Ft(e,t,n){let i=u(e);if(!i)return new Map;try{let r=i.readReferencesForFile.all(t,n,p),a=i.readLegacyReferencesForFile.all(t,n);return re([...a,...r])}catch(r){return g(e,"semantic_references bulk read",r),new Map}}function re(e){let t=new Map;for(let n of e)t.set(n.symbol,n.payload);return t}function Dt(e,t){if(t.length===0)return;let n=u(e);if(n)try{n.evidence.transaction(()=>{let i=new Set;for(let r of t){let a=`${r.relativePath}\0${r.contentHash}`;i.has(a)||(i.add(a),n.dropStaleCallees.run(r.relativePath,r.contentHash)),n.writeCallees.run(r.relativePath,r.symbol,r.contentHash,r.depsDigest,p,r.payload)}})()}catch(i){g(e,"semantic_callees write",i)}}function Nt(e,t){if(t.length===0)return;let n=u(e);if(n)try{n.evidence.transaction(()=>{let i=new Set;for(let r of t){let a=`${r.relativePath}\0${r.projectFingerprint}`;i.has(a)||(i.add(a),n.dropStaleReferences.run(r.relativePath,r.projectFingerprint)),n.writeReferences.run(r.relativePath,r.symbol,r.projectFingerprint,p,r.payload)}})()}catch(i){g(e,"semantic_references write",i)}}function wt(e){let t=u(e);if(!t)return[];try{return je(t)}catch(n){return g(e,"finding_outcome_ledger read",n),[]}}function je(e){return e.readFindingOutcomeLedger.all().map(n=>({check:n.check_name,findingId:n.finding_id,firstSeen:n.first_seen,lastSeen:n.last_seen,timesShown:n.times_shown,outcome:n.outcome}))}function kt(e){return typeof e=="object"&&e!==null}function It(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")?e:null}import{appendFileSync as Ae,mkdirSync as Me}from"fs";import{createHash as Ve,randomUUID as Ue}from"crypto";import{dirname as Ke}from"path";import{performance as v}from"perf_hooks";var se="SCIP_QUERY_PROFILE",ce="SCIP_QUERY_PROFILE_OUT",de="SCIP_QUERY_PROFILE_COMMAND",le="SCIP_QUERY_PROFILE_CACHE_STATE",k="SCIP_QUERY_PROFILE_RUN_ID",I="SCIP_QUERY_PROFILE_WORKLOAD_IDENTITY",x="SCIP_QUERY_PROFILE_WORKLOAD_IDENTITY_KIND",pe=[se,ce,de,le,k,I,x],Ut=new Set(pe),ie=new Set,ae=new Map,oe=!1;function m(){let e=process.env[se];return e==="1"||e==="true"}function He(){return process.env[ce]}function ue(){return process.env[de]}function We(){return process.env[le]}function ge(){let e=process.env[k];if(e)return e;if(!m())return;let t=Ue();return process.env[k]=t,t}function fe(){return process.env[I]}function Xe(e){let t=fe();if(t)return t;if(!m())return;let n=ge();if(!n)return;let i=e.projectFingerprint?"published-project":"run-only",r=S(["profile-workload-v1",e.toolVersion,e.command,e.projectFingerprint??n]);return process.env[I]=r,process.env[x]=i,r}function S(e){return Ve("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function Kt(){return Object.fromEntries(pe.flatMap(e=>{let t=process.env[e];return t===void 0?[]:[[e,t]]}))}function j(e,t,n){if(!m())return t();let i=v.now();try{let r=t();return C({type:"span",name:e,durationMs:Math.round(v.now()-i),ok:!0,...P(n)??{}}),r}catch(r){throw C({type:"span",name:e,durationMs:Math.round(v.now()-i),ok:!1,error:r instanceof Error?r.message:String(r),...P(n)??{}}),r}}async function Ht(e,t,n){if(!m())return t();let i=v.now();try{let r=await t();return C({type:"span",name:e,durationMs:Math.round(v.now()-i),ok:!0,...P(n)??{}}),r}catch(r){throw C({type:"span",name:e,durationMs:Math.round(v.now()-i),ok:!1,error:r instanceof Error?r.message:String(r),...P(n)??{}}),r}}function C(e,t=He()){let n=$e(e),i={timestamp:new Date().toISOString(),pid:process.pid,runId:ge(),command:ue(),cacheState:We(),...n,...e},r=`${JSON.stringify(i)}
|
|
104
|
-
`;if(t)try{let a=Ke(t);ie.has(a)||(Me(a,{recursive:!0}),ie.add(a)),Ae(t,r);return}catch(a){oe||(oe=!0,process.stderr.write(`[profile] failed to write ${t}: ${a instanceof Error?a.message:String(a)}
|
|
105
|
-
`));return}m()&&process.stderr.write(r)}function $e(e){let t=fe()??Xe({command:ue()??"unknown",toolVersion:"unknown",projectFingerprint:null});if(!t)return{};let n=process.env[x],i=typeof e.name=="string"?e.name:void 0;if(!i)return{workloadIdentity:t,workloadIdentityKind:n};let r=i.split(/[.:]/,1)[0]??i,a=`${t}\0${i}`,o=ae.get(a);return o||(o=S(["profile-subsystem-v1",t,i]),ae.set(a,o)),{workloadIdentity:t,workloadIdentityKind:n,subsystem:r,subsystemWorkIdentity:o}}function P(e){return typeof e=="function"?e():e}var Be=[l("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),l("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),l("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),l("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),l("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),l("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),l("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),l("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),l("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),l("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),l("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),l("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),l("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),l("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),O("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),O("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),O("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),O("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"})];function Yt(e){let t=new Map;return{kind:e.kind,read(n,i,r){let a=!1,o=0,s;if(m()){let c=J(n);if(c){let d=`${c}\0${i}\0${r}`;s=t.get(d),s||(s=S(["evidence-product-file-read-v1",e.kind,c,i,r]),t.set(d,s))}}return j("evidence-product.file.read",()=>{let c=q(n,e.kind,i,r);if(c===null)return null;o=c.length;try{let d=e.deserialize(c);return a=d!==null,d}catch{return null}},()=>({...s?{workIdentity:s,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:a,payloadBytes:o}))},write(n,i,r,a){Z(n,e.kind,i,r,e.serialize(a))},writeBatch(n,i){ee(n,i.map(r=>({kind:e.kind,relativePath:r.relativePath,contentHash:r.contentHash,payload:e.serialize(r.value)})))}}}function zt(e){let t=new Map;return{kind:e.kind,read(n,i,r){let a=!1,o=0,s;if(m()){let c=`${r}\0${i}`;s=t.get(c),s||(s=S(["evidence-product-project-read-v1",e.kind,r,i]),t.set(c,s))}return j("evidence-product.project.read",()=>{let c=te(n,e.kind,i,r);if(c===null)return null;o=c.length;try{let d=e.deserialize(c);return a=d!==null,d}catch{return null}},()=>({...s?{workIdentity:s,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:a,payloadBytes:o}))},write(n,i,r,a){ne(n,e.kind,i,r,e.serialize(a))}}}function Qt(e){let t=Be.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function l(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function O(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}import{readFileSync as Ge}from"fs";import{join as Ye}from"path";var ze=E("source-text",{clearGroups:["whole-project","source-file"]}),Qe=E("source-lines",{clearGroups:["whole-project","source-file"]});function Je(e,t){let n=t.replace(/\\/g,"/");return ze.get(e,n,()=>{let i=Ye(e.config.projectRoot,n);try{return Ge(i,"utf-8")}catch(r){if(qe(r))return"";throw r}})}function qe(e){return typeof e=="object"&&e!==null&&"code"in e&&(e.code==="ENOENT"||e.code==="ENOTDIR")}function Ze(e,t){let n=t.replace(/\\/g,"/");return Qe.get(e,n,()=>{let i=Je(e,n);return i?i.split(`
|
|
106
|
-
`):[]})}var et=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function tt(e){let t=et.exec(e);return t?t[1]??"":null}function tn(e,t,n){return me(e,t,n).length>0}function nn(e,t,n,i){let r=i.toLowerCase();return me(e,t,n).some(a=>a.toLowerCase()===r)}function me(e,t,n){if(n<=0)return[];let i=Ze(e,t);if(i.length===0)return[];let r=[];for(let a=n-1;a>=0&&a>=n-5;a-=1){let o=(i[a]??"").trim();if(o==="")continue;let s=tt(o);if(s!==null){r.push(s);continue}if(!o.startsWith("//")&&!o.startsWith("*")&&!o.startsWith("/*")&&!o.startsWith("@")&&!o.startsWith("#"))return r}return r}export{he as a,nt as b,rt as c,it as d,b as e,$ as f,dt as g,lt as h,ve as i,R as j,ut as k,E as l,mt as m,ht as n,Oe as o,Q as p,Pt as q,J as r,Ot as s,Ft as t,Dt as u,Nt as v,wt as w,kt as x,It as y,m as z,Kt as A,j as B,Ht as C,C as D,Yt as E,zt as F,Qt as G,Je as H,Ze as I,tt as J,tn as K,nn as L};
|
|
107
|
-
//# sourceMappingURL=chunk-B5MHCHP3.js.map
|
package/dist/chunk-DGAGY7RJ.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import m from"ignore";import{readFileSync as p,existsSync as f,readdirSync as b}from"fs";import{dirname as d,isAbsolute as u,join as l,relative as v,resolve as $}from"path";function A(n){let t=m();return S(n,t)||t.add(_),{isIgnored:e=>g(t,n,e),filter:e=>e.filter(i=>!g(t,n,i))}}function S(n,t){let r=new Set,e=(s,a)=>{if(!(r.has(s)||!f(s)))try{let c=p(s,"utf-8");t.add(a?F(c,a):c),r.add(s)}catch{}},i=d(n),o=0;for(;i!==d(i)&&o<5&&(e(l(i,".gitignore"),""),!f(l(i,".git")));)i=d(i),o++;return y(n,"",t,e),r.size>0}function y(n,t,r,e){let i=t?l(n,t):n;e(l(i,".gitignore"),t);let o;try{o=b(i,{withFileTypes:!0})}catch{return}for(let s of o){if(!s.isDirectory()||s.name===".git")continue;let a=t?`${t}/${s.name}`:s.name;g(r,n,`${a}/`)||y(n,a,r,e)}}function F(n,t){let r=t.replaceAll("\\","/").replace(/\/+$/,"");return n.split(/\r?\n/).map(e=>T(e,r)).join(`
|
|
2
|
-
`)}function T(n,t){let r=n.trimStart();if(!r||r.startsWith("#"))return n;let e=n.slice(0,n.length-r.length),i=r.startsWith("!"),o=i?r.slice(1):r;if(!o||o.startsWith("#"))return n;let s=o.startsWith("/"),a=s?o.slice(1):o,h=(a.endsWith("/")?a.slice(0,-1):a).includes("/")||s?`${t}/${a}`:`${t}/**/${a}`;return`${e}${i?"!":""}${h}`}var _=`
|
|
3
|
-
# Dependencies
|
|
4
|
-
node_modules/
|
|
5
|
-
vendor/
|
|
6
|
-
.bundle/
|
|
7
|
-
|
|
8
|
-
# Build output
|
|
9
|
-
dist/
|
|
10
|
-
build/
|
|
11
|
-
out/
|
|
12
|
-
target/
|
|
13
|
-
bin/
|
|
14
|
-
obj/
|
|
15
|
-
|
|
16
|
-
# Python
|
|
17
|
-
__pycache__/
|
|
18
|
-
*.pyc
|
|
19
|
-
*.pyo
|
|
20
|
-
.venv/
|
|
21
|
-
venv/
|
|
22
|
-
.env/
|
|
23
|
-
env/
|
|
24
|
-
*.egg-info/
|
|
25
|
-
|
|
26
|
-
# Rust
|
|
27
|
-
target/
|
|
28
|
-
|
|
29
|
-
# Java / Kotlin / Scala
|
|
30
|
-
*.class
|
|
31
|
-
.gradle/
|
|
32
|
-
.mvn/
|
|
33
|
-
|
|
34
|
-
# C# / .NET
|
|
35
|
-
bin/
|
|
36
|
-
obj/
|
|
37
|
-
packages/
|
|
38
|
-
|
|
39
|
-
# Go
|
|
40
|
-
vendor/
|
|
41
|
-
|
|
42
|
-
# Dart
|
|
43
|
-
.dart_tool/
|
|
44
|
-
build/
|
|
45
|
-
|
|
46
|
-
# PHP
|
|
47
|
-
vendor/
|
|
48
|
-
|
|
49
|
-
# IDE / OS
|
|
50
|
-
.idea/
|
|
51
|
-
.vscode/
|
|
52
|
-
*.swp
|
|
53
|
-
*.swo
|
|
54
|
-
.DS_Store
|
|
55
|
-
Thumbs.db
|
|
56
|
-
|
|
57
|
-
# Type definitions (often noise in queries)
|
|
58
|
-
*.d.ts
|
|
59
|
-
`;function g(n,t,r){let e=G(t,r);if(!e)return!1;try{return n.ignores(e)}catch{return!1}}function G(n,t){if(!t||t===".")return null;if(!u(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let r=u(t)?t:$(n,t),e=v(n,r).replaceAll("\\","/");return!e||e==="."||e.startsWith("..")?null:e}export{A as a};
|
|
60
|
-
//# sourceMappingURL=chunk-DGAGY7RJ.js.map
|
package/dist/chunk-DGMCFMPG.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{E as Fe,G as Pe,H as g,I as Ee,l as B,m as M,n as L,o as ke,p as Te,q as _e,x as Le,y}from"./chunk-B5MHCHP3.js";import{a as q}from"./chunk-64MNV6AB.js";import{isAbsolute as jt,relative as Vt}from"path";function we(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function v(e){return e.replace(/\\/g,"/")}function Io(e,t){return we(e)===we(t)}function Bo(e,t){let n=Vt(e,t);return n===""||!n.startsWith("..")&&!jt(n)}import{existsSync as ce,readFileSync as le,readdirSync as It,statSync as Bt}from"fs";import{join as w,relative as $t}from"path";function Ae(e){let t=Ot(e)??zt(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let o of t)for(let s of Mt(e,o)){if(r.has(s))continue;r.add(s);let i=qt(e,s);i&&n.push(i)}return n}function Ot(e){let t=w(e,"pnpm-workspace.yaml");if(!ce(t))return null;try{return Dt(le(t,"utf8"))}catch{return null}}function Dt(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let o=Wt(r);if(!n){/^packages\s*:\s*$/.test(o.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(o);if(s){let i=Ut(s[1].trim());i&&t.push(i);continue}if(o.trim()!=="")break}return t}function Wt(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function Ut(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function zt(e){let t=w(e,"package.json");if(!ce(t))return null;try{let n=JSON.parse(le(t,"utf8"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function Mt(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let i=w(e,t);return ae(i)?[i]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),o=t.slice(n+1).replace(/^\//,""),s=w(e,r||".");return ae(s)?It(s).map(i=>w(s,i,o)).filter(ae):[]}function ae(e){try{return Bt(e).isDirectory()}catch{return!1}}function qt(e,t){let n=w(t,"package.json");if(!ce(n))return null;try{let r=JSON.parse(le(n,"utf8"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:$t(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}import{extname as Re}from"path";var Xt={".rs":"rust",".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyi":"python",".java":"java",".kt":"kotlin",".kts":"kotlin",".scala":"scala",".sc":"scala",".rb":"ruby",".c":"c",".h":"c",".cc":"cpp",".cpp":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".hxx":"cpp",".cs":"csharp",".php":"php",".vb":"vb",".clj":"clojure",".cljs":"clojure",".cljc":"clojure"};function X(e){return Xt[Re(e).toLowerCase()]??null}function je(e){return Re(e).toLowerCase()===".vue"}import{createRequire as Ht}from"module";var d=Ht(import.meta.url),H=null,Ve=!1;function Jt(){if(Ve)return null;if(H)return H;try{return H=d("tree-sitter"),H}catch{return Ve=!0,null}}var Ie=new Map,J=new Set;function Zt(e){if(J.has(e))return null;let t=Ie.get(e);if(t)return t;let n;try{switch(e){case"rust":n=d("tree-sitter-rust");break;case"typescript":n=d("tree-sitter-typescript").typescript;break;case"tsx":n=d("tree-sitter-typescript").tsx;break;case"javascript":n=d("tree-sitter-javascript");break;case"python":n=d("tree-sitter-python");break;case"java":n=d("tree-sitter-java");break;case"kotlin":n=d("tree-sitter-kotlin");break;case"scala":n=d("tree-sitter-scala");break;case"ruby":n=d("tree-sitter-ruby");break;case"c":n=d("tree-sitter-c");break;case"cpp":n=d("tree-sitter-cpp");break;case"csharp":n=d("tree-sitter-c-sharp");break;case"php":n=d("tree-sitter-php").php;break;case"vb":{let r=d("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return J.add(e),null}}catch{return J.add(e),null}return Ie.set(e,n),n}var Be=new Map;function Gt(e){let t=Be.get(e);if(t)return t;let n=Zt(e);if(!n)return null;let r=Jt();if(!r)return null;let o=new r;try{o.setLanguage(n)}catch{return J.add(e),null}return Be.set(e,o),o}function Kt(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}function $(e,t){let n=Gt(e);if(!n)return null;try{return Kt(n,t)}catch{return null}}import{posix as ue}from"path";import{parse as Qt}from"@vue/compiler-sfc";var Yt=L("vue-sfc-units");function A(e,t){let n=De(t),r=g(e,n);return Yt.get(e,n,r,()=>pe(e,n,r))}function De(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function en(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function F(e){return!e||e.body.length===0?0:e.body.split(`
|
|
2
|
-
`).length}function pe(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let o;try{o=Qt(n,{filename:t})}catch(i){return r.errors.push(Oe(i)),r}r.errors.push(...o.errors.map(Oe));let{descriptor:s}=o;return s.template&&(r.template=Z(e,t,"template",s.template)),s.script&&r.scripts.push($e(e,t,s.script,!1)),s.scriptSetup&&r.scripts.push($e(e,t,s.scriptSetup,!0)),r.styles=s.styles.map(i=>Z(e,t,"style",i)),r.customBlocks=s.customBlocks.map(i=>Z(e,t,"custom",i)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(i=>i?.errors??[])),r}function $e(e,t,n,r){let o=Z(e,t,"script",n);return{...o,kind:"script",setup:r,astLanguage:en(o.lang)}}function Z(e,t,n,r){let o=nn(r.attrs),s=typeof o.lang=="string"?o.lang:null,i=typeof o.src=="string"?o.src:typeof r.src=="string"?r.src:void 0;if(i){let c=tn(t,i);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:i,attrs:o,lang:s,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${i}`]};let l=g(e,c),f=l?Math.max(0,l.split(`
|
|
3
|
-
`).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:i,attrs:o,lang:s,body:l,startLine:0,endLine:f,errors:l?[]:[`Vue ${n} block source not found: ${c}`]}}let a=Math.max(0,r.loc.start.line-1);return{kind:n,ownerPath:t,sourcePath:t,external:!1,attrs:o,lang:s,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function tn(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=De(ue.normalize(ue.join(ue.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function nn(e){return{...e}}function Oe(e){return e instanceof Error?e.message:String(e)}function We(e,t,n){let o=pe(e,t,n).scripts.filter(i=>i.astLanguage&&i.body.length>0),s=o[0]?.astLanguage;return s?{body:o.map(i=>`${`
|
|
4
|
-
`.repeat(i.startLine)}${i.body}`).join(`
|
|
5
|
-
`),startLine:0,language:s}:null}var Ue=ke("ast-trees",{clearGroups:["whole-project","source-file"]});function ze(e,t){if(je(t))return rn(e,t);let n=X(t);if(!n)return null;let r=g(e,t);return r?Ue.get(e,t,r,()=>$(n,r)):null}function rn(e,t){let n=g(e,t);return n?Ue.get(e,t,n,()=>{let r=We(e,t,n);if(!r)return null;let o=`
|
|
6
|
-
`.repeat(r.startLine)+r.body;return $(r.language,o)}):null}import{readdirSync as on}from"fs";import{execFileSync as sn}from"child_process";import{extname as G,join as an}from"path";var cn=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".clj",".cljs",".cljc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],us=[".vue"],Me=[".tsx",".jsx"],qe=[".vue"],ln=[...Me,...qe],un=new Set(Me),pn=new Set(qe),Xe=new Set(cn.map(e=>e.toLowerCase())),fn=[...Xe].sort().join(","),He=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);function O(e,t={}){let n=t.includeIndexed??!0,r=t.includeAuxiliary??!0,o=t.extensions?.map(c=>c.toLowerCase()),s=o?new Set(o):Xe,i=o?[...s].sort().join(","):fn,a=`${n?"1":"0"}|${r?"1":"0"}|${i}`;return mn.get(e,a,()=>{let c=new Set;if(n)for(let l of q(e,{includeIgnored:!1}))s.has(G(l).toLowerCase())&&c.add(l);if(r)for(let l of dn(e.config.projectRoot,s))e.isIgnored(l)||n&&c.has(l)||c.add(l);return[...c].sort()})}function ps(e,t={}){let n=!1,r=!1;for(let o of O(e,{extensions:ln})){if(t.scope&&!o.includes(t.scope))continue;let s=G(o).toLowerCase();if(n||=un.has(s),r||=pn.has(s),n&&r)break}return{react:n,vue:r}}var mn=B("source-files",{clearGroups:[]});function dn(e,t){return gn(e,t)??Sn(e,t)}function gn(e,t){try{let n=sn("git",["ls-files","--cached","--others","--exclude-standard"],{cwd:e,encoding:"utf-8",timeout:1e4,killSignal:"SIGKILL",stdio:["ignore","pipe","ignore"]}),r=new Set;for(let o of n.split(`
|
|
7
|
-
`)){let s=o.trim();s&&(hn(s)||t.has(G(s).toLowerCase())&&r.add(s))}return r}catch{return null}}function hn(e){return e.split("/").some(t=>He.has(t))}function Sn(e,t){let n=new Set,r=o=>{let s=o?an(e,o):e,i;try{i=on(s,{withFileTypes:!0})}catch{return}for(let a of i)if(!He.has(a.name)){if(a.isDirectory()){r(o?`${o}/${a.name}`:a.name);continue}t.has(G(a.name).toLowerCase())&&n.add(o?`${o}/${a.name}`:a.name)}};return r(""),n}import{extname as Nn}from"path";function Q(e,t){let n=yn(e,t);if(!n)return null;let r=K(n);return r?{calleeLeaf:r,memberAccess:xn(n),line:e.startPosition.row}:null}function yn(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return e.childForFieldName("function")??e.namedChild(0);if(e.type==="new_expression")return e.childForFieldName("constructor")??e.namedChild(0)}return null}function xn(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function K(e){switch(e.type){case"identifier":case"type_identifier":case"field_identifier":case"property_identifier":case"shorthand_property_identifier":return e.text;case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?K(t):null}case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?K(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?K(t):null}case"super":case"self":case"this":return null;default:return null}}var vn=new Set(["children","className","data","e","err","error","ev","event","false","id","idx","index","item","key","null","props","res","result","state","style","true","undefined","val","value"]);function Y(e){return e.length<=2||vn.has(e)}var bn=[".tsx",".jsx"],Je=new Set(["useActionState","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useOptimistic","useReducer","useRef","useState","useSyncExternalStore","useTransition"]),Cn=new Set(["useEffect","useInsertionEffect","useLayoutEffect"]),kn=new Set(["useActionState","useOptimistic","useReducer","useRef","useState"]),Tn=new Set(["useLocation","useNavigate","useParams","useSearchParams","useTranslation"]),_n=new Set(["axios","fetch","gql","graphql","mutate","query","request","useMutation","useQuery","useSuspenseQuery"]),Ln=new Set(["add","apply","cancel","change","clear","close","create","delete","fetch","filter","handle","load","open","refresh","remove","render","reset","save","select","submit","toggle","update"]),Fn=new Set(["aria-hidden","className","clipRule","d","fill","fillRule","height","role","stroke","strokeLinecap","strokeLinejoin","strokeWidth","style","viewBox","width","xmlns"]),Pn=L("react-component-behavior-profiles"),Ze=Fe({kind:"react-component-behavior-profiles",invalidation:Pe("react-component-behavior-profiles"),serialize:Rn,deserialize:jn});function Ye(e,t={}){let n=O(e,{extensions:bn}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).flatMap(o=>me(e,o)).filter(o=>(t.minJsxTokens===void 0||o.jsxTokens.size>=t.minJsxTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function me(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return Pn.get(e,n,r,()=>En(e,n,r)).map(An)}function En(e,t,n){let r=_e(e,t,n),o=Ze.read(e,t,r);if(o)return o;let s=wn(e,t);return Ze.write(e,t,r,s),s}function wn(e,t){let n=In(t);if(!n)return[];let r=ze(e,t);if(!r)return[];let o=Ee(e,t).length;return Bn(r.rootNode,n).filter(i=>i.kind==="hook"||de(i.bodyNode)).map(i=>{let a=Mn(i.bodyNode),c=Zn(i.bodyNode,n);return{file:t,name:i.name,kind:i.kind,startLine:i.node.startPosition.row,endLine:i.node.endPosition.row,loc:Math.max(1,i.node.endPosition.row-i.node.startPosition.row+1),fileLines:o,jsxTokens:a.tokens,behaviorTokens:c.tokens,componentNames:C(a.componentNames),nativeTags:C(a.nativeTags),propNames:C(a.propNames),eventNames:C(a.eventNames),hookNames:C(c.hookNames),requestNames:C(c.requestNames),stateNames:C(c.stateNames),effectNames:C(c.effectNames),handlerNames:C(c.handlerNames)}})}function An(e){return{...e,jsxTokens:new Set(e.jsxTokens),behaviorTokens:new Set(e.behaviorTokens),componentNames:[...e.componentNames],nativeTags:[...e.nativeTags],propNames:[...e.propNames],eventNames:[...e.eventNames],hookNames:[...e.hookNames],requestNames:[...e.requestNames],stateNames:[...e.stateNames],effectNames:[...e.effectNames],handlerNames:[...e.handlerNames]}}function Rn(e){return JSON.stringify(e.map(t=>({...t,jsxTokens:[...t.jsxTokens],behaviorTokens:[...t.behaviorTokens]})))}function jn(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=[];for(let r of t){let o=Vn(r);if(!o)return null;n.push(o)}return n}catch{return null}}function Vn(e){if(!Le(e))return null;let{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:c,behaviorTokens:l,componentNames:f,nativeTags:u,propNames:N,eventNames:V,hookNames:se,requestNames:ie,stateNames:m,effectNames:b,handlerNames:I}=e;if(typeof t!="string"||typeof n!="string"||r!=="component"&&r!=="hook"||!ee(o)||!ee(s)||!ee(i)||!ee(a))return null;let S={jsxTokens:y(c),behaviorTokens:y(l),componentNames:y(f),nativeTags:y(u),propNames:y(N),eventNames:y(V),hookNames:y(se),requestNames:y(ie),stateNames:y(m),effectNames:y(b),handlerNames:y(I)};return Object.values(S).some(Rt=>Rt===null)?null:{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:new Set(S.jsxTokens),behaviorTokens:new Set(S.behaviorTokens),componentNames:S.componentNames,nativeTags:S.nativeTags,propNames:S.propNames,eventNames:S.eventNames,hookNames:S.hookNames,requestNames:S.requestNames,stateNames:S.stateNames,effectNames:S.effectNames,handlerNames:S.handlerNames}}function ee(e){return typeof e=="number"&&Number.isFinite(e)}function In(e){let t=Nn(e).toLowerCase();return t!==".tsx"&&t!==".jsx"?null:X(e)}function Bn(e,t){let n=[],r=new Set,o=s=>{let i=$n(s);if(i&&(!Un(s)||i.kind==="component")){let a=`${i.name}:${i.node.startIndex}:${i.node.endIndex}`;r.has(a)||(r.add(a),n.push(i))}for(let a of s.namedChildren)o(a)};return(t==="tsx"||t==="javascript")&&o(e),n}function $n(e){if(e.type==="class_declaration"){let s=fe(e);if(!s||!/^[A-Z]/.test(s))return null;let i=On(e);return!i||!Dn(e)&&!de(i)?null:{name:s,kind:"component",node:e,bodyNode:i}}if(e.type==="function_declaration"){let s=fe(e);return!s||!Ge(s)?null:{name:s,kind:Ke(s),node:e,bodyNode:e}}if(e.type!=="variable_declarator")return null;let t=e.childForFieldName("name")??e.namedChild(0),n=e.childForFieldName("value")??e.namedChild(1),r=D(t);if(!r||!n||!Ge(r))return null;let o=Wn(n);return o?{name:r,kind:Ke(r),node:e,bodyNode:o}:null}function On(e){for(let t of e.namedChildren)if(t.type==="class_body")for(let n of t.namedChildren){if(n.type!=="method_definition")continue;if((n.childForFieldName("name")??n.namedChild(0))?.text==="render")return n}return null}function Dn(e){return/\b(?:React\.)?(?:Pure)?Component\b/.test(e.text)}function Ge(e){return/^[A-Z]/.test(e)||/^use[A-Z0-9_]/.test(e)}function Ke(e){return/^use[A-Z0-9_]/.test(e)?"hook":"component"}function Wn(e){if(e.type==="arrow_function"||e.type==="function_expression")return e;if(e.type!=="call_expression")return null;let t=zn(e);return t!=="memo"&&t!=="forwardRef"?null:e.namedChildren.find(o=>o.type==="arguments")?.namedChildren.find(o=>o.type==="arrow_function"||o.type==="function_expression")??null}function Un(e){let t=e.parent;for(;t;){if(t.type==="function_declaration"||t.type==="function_expression"||t.type==="arrow_function"||t.type==="method_definition")return!0;t=t.parent}return!1}function fe(e){return D(e.childForFieldName("name")??e.namedChild(0))}function zn(e){let t=e.childForFieldName("function")??e.namedChild(0);return t?t.text.split(".").pop()??t.text:null}function de(e){return e.type.startsWith("jsx_")?!0:e.namedChildren.some(de)}function Mn(e){let t={tokens:new Set,componentNames:new Set,nativeTags:new Set,propNames:new Set,eventNames:new Set},n=r=>{r.type==="jsx_opening_element"||r.type==="jsx_self_closing_element"?qn(r,t):r.type==="jsx_element"&&r.text.trimStart().startsWith("<>")?t.tokens.add("jsx:fragment"):r.type==="jsx_expression"?Xn(r,t):r.type==="jsx_fragment"&&t.tokens.add("jsx:fragment");for(let o of r.children)n(o)};return n(e),t}function qn(e,t){let n=Hn(e),r=!1;if(n){let o=Qe(n),s=o==="Fragment"||o==="React.Fragment";r=er(o)&&!s,s?t.tokens.add("jsx:fragment"):r?(t.componentNames.add(o),t.tokens.add(`component:${o}`)):(t.nativeTags.add(o),t.tokens.add(`native:${o}`))}for(let o of e.namedChildren)if(o.type==="jsx_attribute"){let s=Jn(o);if(!s)continue;let i=Qe(s);if(i.startsWith("on")&&i.length>2){let a=i.slice(2).replace(/^[A-Z]/,c=>c.toLowerCase());t.eventNames.add(a),t.tokens.add(`event:${a}`)}else Fn.has(i)||(t.propNames.add(i),t.tokens.add(`${r?"prop":"native-prop"}:${i}`))}else o.type==="jsx_spread_attribute"&&t.tokens.add(et(o))}function Xn(e,t){let n=e.text;/^\{\s*\.\.\./.test(n)&&t.tokens.add(et(e)),tt(e)&&t.tokens.add("jsx:conditional"),(n.includes(".map(")||n.includes(".flatMap("))&&t.tokens.add("jsx:list");for(let r of tr(n))Y(r)||t.tokens.add(`binding:${r}`)}function et(e){let t=/^\{\s*\.\.\.\s*([^}]+)\s*\}$/.exec(e.text)?.[1],n=e.namedChildren.find(s=>s.type!=="comment"),r=t??n?.text??"",o=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.exec(r.trim())?.[0];return o?`prop:spread:${o}`:"prop:spread"}function tt(e){return e.type==="ternary_expression"||e.type==="conditional_expression"?!0:e.namedChildren.some(tt)}function Hn(e){for(let t of e.namedChildren)if(t.type==="identifier"||t.type==="jsx_identifier"||t.type==="property_identifier"||t.type==="member_expression"||t.type==="jsx_member_expression")return t.text;return/^<\s*([A-Za-z][\w$.]*)/.exec(e.text)?.[1]??null}function Jn(e){for(let t of e.namedChildren)if(t.type==="property_identifier"||t.type==="identifier"||t.type==="jsx_identifier")return t.text;return/^([A-Za-z_$][\w$:-]*)/.exec(e.text)?.[1]??null}function Zn(e,t){let n={tokens:new Set,hookNames:new Set,requestNames:new Set,stateNames:new Set,effectNames:new Set,handlerNames:new Set},r=o=>{if(o.type==="call_expression"){let s=Q(o,t);s&&Gn(s.calleeLeaf,n)}else if(o.type==="variable_declarator")Qn(o,n);else if(o.type==="function_declaration"){let s=fe(o);s&&nt(s,n)}for(let s of o.namedChildren)r(s)};return r(e),n}function Gn(e,t){/^use[A-Z0-9_]/.test(e)&&(t.hookNames.add(e),!Je.has(e)&&!Tn.has(e)&&t.tokens.add(`hook:${e}`)),Je.has(e)&&t.tokens.add(`react-hook:${e}`),Cn.has(e)&&(t.effectNames.add(e),t.tokens.add(`effect:${e}`)),kn.has(e)&&t.tokens.add(`state-hook:${e}`),Kn(e)&&(t.requestNames.add(e),t.tokens.add(`request:${e}`))}function Kn(e){if(_n.has(e))return!0;let t=/^use([A-Z0-9_].*)$/.exec(e)?.[1];return t?/(Query|Mutation|Fetch|Resource)$/.test(t):!1}function Qn(e,t){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(n?.type==="array_pattern"&&r?.text.includes("useState")){let s=n.namedChildren.find(a=>D(a)),i=D(s);i&&(t.stateNames.add(i),t.tokens.add(`state:${i}`))}let o=D(n);o&&nt(o,t)}function nt(e,t){let n=Yn(e);!n||!Ln.has(n)||(t.handlerNames.add(e),t.tokens.add(`handler:${e}`),t.tokens.add(`handler-verb:${n}`))}function Yn(e){let t=e.startsWith("handle")&&e.length>6?e.slice(6).replace(/^[A-Z]/,n=>n.toLowerCase()):e;return/^[a-z]+/.exec(t)?.[0]??null}function er(e){return/^[A-Z]/.test(e)||e.includes(".")}function Qe(e){return e.replace(/^this\./,"").replace(/\$/g,".")}function D(e){return e&&(e.type==="identifier"||e.type==="property_identifier"||e.type==="shorthand_property_identifier"||/^[A-Za-z_$][\w$]*$/.test(e.text))?e.text:null}function tr(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];t.includes(r)||t.push(r)}return t}function C(e){return[...e].sort()}function W(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var nr=new Set(["function_declaration","method_definition","method_signature","function_signature"]);function at(e,t){let n=or(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:st(n.functionNode),params:rt(n.functionNode),paramsEndLine:ot(n.functionNode),isLiteralPassthrough:it(n.functionNode,t)};if(!rr(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(o=>o.type==="identifier"||o.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:st(e),params:rt(e),paramsEndLine:ot(e),isLiteralPassthrough:it(e,t)}:null}function ct(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function rt(e){let t=ct(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(W(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let o=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),s=r.childForFieldName("pattern");if(!o&&s&&s.type==="identifier"){n.push({name:s.text,simple:!0});continue}let i=r.namedChildren.find(a=>a.type==="identifier");n.push({name:s?.type==="identifier"?s.text:i?.text??"",simple:!1})}return n}function ot(e){let t=ct(e);return t?t.endPosition.row:e.startPosition.row}function rr(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?nr.has(e):!1}function or(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")return null;if(e.type==="variable_declarator"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);return!n||!r||r.type!=="arrow_function"&&r.type!=="function_expression"?null:{name:n.text,definitionNode:e,functionNode:r}}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);return!n||!r||r.type!=="arrow_function"&&r.type!=="function_expression"?null:{name:n.text,definitionNode:e,functionNode:r}}return null}function st(e){let t=e.namedChildren.find(r=>r.type==="parameters"||r.type==="formal_parameters");if(!t)return 0;let n=0;for(let r of t.namedChildren)W(r)||(n+=1);return n}function it(e,t){let n=e.namedChildren.find(u=>u.type==="block"||u.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(u=>!W(u));if(r.length!==1)return!1;let o=r[0],s=null;if(o.type==="return_statement"||o.type==="expression_statement"?s=o.namedChild(0)??null:t==="rust"&&(o.type==="call_expression"||o.type==="macro_invocation")&&(s=o),!s)return!1;let i=t==="python"?"call":"call_expression";if(s.type!==i)return!1;let a=s.namedChildren.find(u=>u.type==="arguments"||u.type==="argument_list");if(!a)return!1;let c=a.namedChildren.filter(u=>!W(u)),l=e.namedChildren.find(u=>u.type==="parameters"||u.type==="formal_parameters");if(!l)return!1;let f=[];for(let u of l.namedChildren){if(u.type==="identifier"){f.push(u.text);continue}let N=u.namedChildren.find(V=>V.type==="identifier");N&&f.push(N.text)}if(c.length!==f.length)return!1;for(let u=0;u<f.length;u+=1){let N=c[u];if(N.type!=="identifier"||N.text!==f[u])return!1}return!0}var sr=new Set(["ref","shallowRef","reactive","computed","watch","watchEffect"]),ir=new Set(["onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","onActivated","onDeactivated","onErrorCaptured"]),ar=new Set(["axios","fetch","runRequest","useAsyncData","useFetch","useResource"]),cr=new Set(["defineEmits","defineExpose","defineModel","defineOptions","defineProps","withDefaults"]),lr=new Set(["catch","for","function","if","return","switch","while"]);function ne(e){let t={imports:[],functions:[],calls:[],composables:[],stores:[],reactivity:[],lifecycle:[],requests:[],macros:[],lineCount:0,externalLineCount:0,externalScriptPaths:[],unresolvedScripts:[]};for(let n of e.scripts){t.lineCount+=F(n),n.external&&(t.externalLineCount+=F(n),t.externalScriptPaths.push(n.sourcePath));for(let o of n.errors)t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:o});if(!n.body||!n.astLanguage){n.astLanguage||t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:`Unsupported Vue script language: ${n.lang??"unknown"}`});continue}t.imports.push(...mr(n));let r=$(n.astLanguage,n.body);r?pr(n,r.rootNode,t):fr(n,t)}return ur(t),t.externalScriptPaths=ut(t.externalScriptPaths),t}function ur(e){e.composables=R(e,"composable"),e.stores=R(e,"store"),e.reactivity=R(e,"reactivity"),e.lifecycle=R(e,"lifecycle"),e.requests=R(e,"request"),e.macros=R(e,"macro")}function R(e,t){return ut(e.calls.filter(n=>n.categories.includes(t)).map(n=>n.name))}function pr(e,t,n){let r=new Set,o=new Set,s=i=>{let a=at(i,e.astLanguage);if(a){let l=`${a.name}:${a.startLine}:${a.endLine}`;o.has(l)||(o.add(l),n.functions.push({name:a.name,sourcePath:e.sourcePath,startLine:e.startLine+a.startLine,endLine:e.startLine+a.endLine,setup:e.setup}))}let c=Q(i,e.astLanguage);if(c){let l=`${c.calleeLeaf}:${c.line}`;r.has(l)||(r.add(l),n.calls.push({name:c.calleeLeaf,sourcePath:e.sourcePath,line:e.startLine+c.line,categories:lt(c.calleeLeaf),setup:e.setup}))}for(let l of i.children)s(l)};s(t)}function fr(e,t){for(let n of e.body.matchAll(/\b([A-Za-z_$][\w$]*)\s*\(/g)){let r=n[1];!r||lr.has(r)||t.calls.push({name:r,sourcePath:e.sourcePath,line:e.startLine+te(e.body,n.index??0),categories:lt(r),setup:e.setup})}for(let n of e.body.matchAll(/\bfunction\s+([A-Za-z_$][\w$]*)\b/g)){let r=n[1];if(!r)continue;let o=e.startLine+te(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}for(let n of e.body.matchAll(/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function\b|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/g)){let r=n[1];if(!r)continue;let o=e.startLine+te(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}}function mr(e){let t=[];for(let n of e.body.matchAll(/\bimport\s+(?:type\s+)?([^'";]+?)\s+from\s+['"]([^'"]+)['"]/g)){let r=n[1]?.trim(),o=n[2];if(!r||!o)continue;let s=e.startLine+te(e.body,n.index??0);for(let i of dr(r))t.push({local:i,source:o,sourcePath:e.sourcePath,line:s,setup:e.setup})}return t}function dr(e){let t=[],r=e.split(",").map(i=>i.trim()).filter(Boolean)[0];r&&!r.startsWith("{")&&!r.startsWith("*")&&t.push(r);let o=/\{([^}]*)\}/.exec(e)?.[1];if(o)for(let i of o.split(",")){let a=i.trim();if(!a)continue;let c=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(a)?.[1];t.push(c??a.replace(/^type\s+/,"").trim())}let s=/\*\s+as\s+([A-Za-z_$][\w$]*)/.exec(e)?.[1];return s&&t.push(s),t.filter(i=>/^[A-Za-z_$][\w$]*$/.test(i))}function lt(e){let t=["call"];return/^use[A-Z0-9_]/.test(e)&&t.push("composable"),/^use[A-Z0-9_].*Store$/.test(e)&&t.push("store"),sr.has(e)&&t.push("reactivity"),ir.has(e)&&t.push("lifecycle"),ar.has(e)&&t.push("request"),cr.has(e)&&t.push("macro"),t}function te(e,t){let n=0;for(let r=0;r<t&&r<e.length;r+=1)e.charCodeAt(r)===10&&(n+=1);return n}function ut(e){return[...new Set(e)].sort()}import{ElementTypes as gr,NodeTypes as ge,parse as hr}from"@vue/compiler-dom";import{parse as $s}from"@vue/compiler-sfc";function pt(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}var Sr=L("vue-template-facts"),yr=new Set(["component","keep-alive","slot","suspense","teleport","template","transition","transition-group"]),xr=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),vr=new Set(["div","span","template"]),Nr=new Set(["as","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","if","import","in","instanceof","let","new","null","of","return","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);function re(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return Sr.get(e,n,r,()=>br(n,A(e,n).template))}function br(e,t){let n={relativePath:e,template:t?{startLine:t.startLine,endLine:t.endLine}:null,componentTags:[],nativeTags:[],builtinTags:[],props:[],events:[],directives:[],slots:[],expressionIdentifiers:[],structuralTokens:[]};if(!t)return n;let r;try{r=hr(t.body,{comments:!1})}catch{return n}let o=new Set,s=i=>{i.trim()&&o.add(i)};return mt(r.children,t.startLine,n,s),n.structuralTokens=[...o].sort(),n}function mt(e,t,n,r){for(let o of e)if(o.type===ge.ELEMENT)Cr(o,t,n,r),mt(o.children,t,n,r);else if(o.type===ge.INTERPOLATION){r("interpolation");let s=he(o.content);s&&dt(s,t,o.loc.start.line,n,r)}}function Cr(e,t,n,r){let o=Er(e.tag),s={tag:e.tag,normalized:o,kind:Pr(e),startLine:j(t,e.loc.start.line),endLine:j(t,e.loc.end.line)};s.kind==="component"?(n.componentTags.push(s),r(`component:${o}`)):s.kind==="builtin"?(n.builtinTags.push(s),r(`builtin:${o}`)):(n.nativeTags.push(s),vr.has(e.tag)||r(`native:${e.tag}`));for(let i of e.props)kr(i,t,n,r)}function kr(e,t,n,r){if(e.type===ge.ATTRIBUTE){let a=e.value?.content??null,c=ft("prop",e.name,a,t,e.loc.start.line,e.loc.end.line);n.props.push(c),r(`prop:${e.name}`);return}let o=_r(e),s=he(e.exp),i=ft(Tr(e.name),o,s,t,e.loc.start.line,e.loc.end.line);switch(i.kind){case"prop":n.props.push(i),r(`prop:${o}`);break;case"event":n.events.push(i),r(`event:${o}`);break;case"slot":n.slots.push(i),r(`slot:${o}`);break;case"directive":n.directives.push(i),r(`directive:${o}`);break}s&&dt(s,t,e.loc.start.line,n,r)}function ft(e,t,n,r,o,s){return{kind:e,name:t,value:n,startLine:j(r,o),endLine:j(r,s)}}function Tr(e){switch(e){case"bind":case"model":return"prop";case"on":return"event";case"slot":return"slot";default:return"directive"}}function _r(e){let t=he(e.arg);return t||e.name}function he(e){if(!e)return null;let t=("content"in e&&typeof e.content=="string"?e.content:e.loc.source).trim();return t||null}function dt(e,t,n,r,o){for(let s of Lr(e)){let i={name:s,startLine:j(t,n),endLine:j(t,n)};r.expressionIdentifiers.push(i),o(`id:${s}`)}}function Lr(e){let t=new Set,n=Fr(e),r=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,o;for(;o=r.exec(n);){let s=o[0];Nr.has(s)||Y(s)||/^[A-Z_]+$/.test(s)||t.add(s)}return[...t].sort()}function Fr(e){return e.replace(/\/\*[\s\S]*?\*\//g," ").replace(/\/\/.*$/gm," ").replace(/`(?:\\[\s\S]|\$\{([^}]*)\}|[^`\\])*`/g,(t,n)=>n??" ").replace(/'(?:\\[\s\S]|[^'\\])*'/g," ").replace(/"(?:\\[\s\S]|[^"\\])*"/g," ")}function Pr(e){let t=e.tag;return e.tagType===gr.COMPONENT?"component":yr.has(t)?"builtin":xr.has(t)?"native":/^[A-Z]/.test(t)||t.includes("-")?"component":"native"}function Er(e){return pt(e,/[-_:]/)}function j(e,t){return e+Math.max(0,t-1)}import{createRequire as wr}from"module";import{existsSync as E}from"fs";import{basename as gt,dirname as h,extname as k,join as x,relative as P,resolve as p,sep as Ar}from"path";var Rr=M("indexed-paths",{clearGroups:[]}),jr=M("indexed-path-digest",{clearGroups:[]}),Vr=B("tsconfig-alias-config",{clearGroups:["whole-project"]}),Ir=B("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),Br=wr(import.meta.url),U;function $r(){if(U!==void 0)return U;try{U=Br("typescript")}catch{U=null}return U}var Or=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],Dr=M("workspace-packages",{clearGroups:["whole-project"]}),z=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],ht=[".py",".pyi"],St=[".java",".scala",".kt",".kts"],yt=[".rs"],xt=[".rb"],vt=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],Nt=[".cs",".vb"],bt=[".dart"],Ct=[".php"],oe=[".clj",".cljs",".cljc"],Wr=new Set(z),Se=new Set(ht),kt=new Set(St),ye=new Set(yt),xe=new Set(xt),Tt=new Set(vt),_t=new Set(Nt),ve=new Set(bt),Lt=new Set(Ct),Ft=new Set(oe),Ur=[{extensions:z,lookup:Wr},{extensions:ht,lookup:Se},{extensions:St,lookup:kt},{extensions:yt,lookup:ye},{extensions:xt,lookup:xe},{extensions:vt,lookup:Tt},{extensions:Nt,lookup:_t},{extensions:bt,lookup:ve},{extensions:Ct,lookup:Lt},{extensions:oe,lookup:Ft}];function T(e,t){return t.has(k(e).toLowerCase())}function zr(e){return T(e,Se)}function Mr(e){return T(e,kt)}function qr(e){return T(e,ye)}function Xr(e){return T(e,xe)}function Hr(e){return T(e,Tt)}function Jr(e){return T(e,_t)}function Ys(e){return k(e).toLowerCase()===".vb"}function Zr(e){return T(e,ve)}function Gr(e){return T(e,Lt)}function Kr(e){return T(e,Ft)}function Qr(e){let t=k(e).toLowerCase();for(let n of Ur)if(n.lookup.has(t))return n.extensions;return z}function Yr(e){return Mr(e)||Jr(e)||Gr(e)}function Pt(e,t,n){return zr(t)?fo(e,t,n):qr(t)?mo(e,t,n):Xr(t)?go(e,t,n):Hr(t)?ho(e,t,n):Yr(t)?So(e,n.replace(/\\/g,"."),Qr(t)):Zr(t)?yo(e,t,n):Kr(t)?xo(e,n):eo(e,t,n)}function eo(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return to(e,t,n)??ro(e,n);let r=h(x(e.config.projectRoot,t)),o=p(r,n),s=_(e);for(let i of be(o)){let a=v(P(e.config.projectRoot,i));if(s.has(a)||E(i))return a}return v(P(e.config.projectRoot,o))}function to(e,t,n){let r=lo(e,t);if(!r)return null;let o=_(e);for(let s of no(r,n)){let i=p(r.baseUrl,s);for(let a of be(i)){let c=v(P(e.config.projectRoot,a));if(o.has(c)||E(a))return c}}return null}function no(e,t){let n=[];for(let[r,o]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...o);continue}let i=r.slice(0,s),a=r.slice(s+1);if(!t.startsWith(i)||!t.endsWith(a)||t.length<i.length+a.length)continue;let c=t.slice(i.length,t.length-a.length);for(let l of o)n.push(l.includes("*")?l.replace("*",c):l)}return n}function ro(e,t){let n=so(oo(e),t);if(!n)return null;let r=_(e);for(let o of io(n)){let s=p(e.config.projectRoot,n.pkg.relativeDir,o);for(let i of be(s)){let a=v(P(e.config.projectRoot,i));if(r.has(a)||E(i))return a}}return null}function oo(e){return Dr.get(e,()=>Ae(e.config.projectRoot))}function so(e,t){let n=null;for(let r of e){let o=null;t===r.name?o="":t.startsWith(`${r.name}/`)&&(o=t.slice(r.name.length+1)),o!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:o})}return n}function io(e){let t=[],n=ao(e.pkg.exports,e.subpath);if(n){let r=co(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function ao(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return Et(e[n])}function Et(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return null;let t=e;for(let n of["types","import","default","require","node"]){let r=Et(t[n]);if(r)return r}return null}function co(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function lo(e,t){let n=v(h(t));return Ir.get(e,n,()=>uo(e,n))}function uo(e,t){let n=$r();if(!n)return null;let r=p(e.config.projectRoot),o=p(r,t);for(;o===r||o.startsWith(r+Ar);){for(let i of Or){let a=x(o,i);if(!E(a))continue;let c=Vr.get(e,a,()=>po(n,a));if(c)return c}let s=h(o);if(s===o)break;o=s}return null}function po(e,t){try{let n=e.readConfigFile(t,e.sys.readFile);if(n.error||!n.config)return null;let r=e.parseJsonConfigFileContent(n.config,e.sys,h(t)),o=r.options.paths;return!o||Object.keys(o).length===0?null:{baseUrl:r.options.baseUrl?p(h(t),r.options.baseUrl):h(t),paths:o}}catch{return null}}function fo(e,t,n){let r=_(e),o;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let i=s[1].length,a=s[2].replace(/^\./,""),c=h(x(e.config.projectRoot,t));for(let l=1;l<i;l++)c=h(c);o=a?p(c,a.replace(/\./g,"/")):c}else o=p(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of vo(o)){let i=v(P(e.config.projectRoot,s));if(r.has(i)||E(s))return i}return null}function mo(e,t,n){if(!n)return null;let r=n.replace(/\s+as\s+.+$/,"").trim();if(!r.startsWith("crate::")&&!r.startsWith("self::")&&!r.startsWith("super::"))return null;let o=h(x(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=p(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=p(o,r.slice(6).replace(/::/g,"/")):s=p(h(o),r.slice(7).replace(/::/g,"/")),Ne(e,No(s))}function go(e,t,n){let r=h(x(e.config.projectRoot,t)),o=p(r,n);return Ne(e,bo(o))}function ho(e,t,n){let r=h(x(e.config.projectRoot,t)),o=[p(r,n),p(e.config.projectRoot,n),p(e.config.projectRoot,"include",n),p(e.config.projectRoot,"src",n)];return Ne(e,o)}function So(e,t,n){let r=_(e),o=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=o.replace(/\./g,"/"),i=o.split(".").pop()??o;for(let c of n){let l=`${s}${c}`,f=[...r].find(u=>u.endsWith(l));if(f)return f}for(let c of n){let l=[...r].find(f=>gt(f)===`${i}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(k(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${i}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function yo(e,t,n){let r=_(e);if(n.startsWith("package:")){let i=n.slice(8),a=i.indexOf("/");if(a<0)return null;let c=i.slice(a+1),l=v(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let o=h(x(e.config.projectRoot,t)),s=p(o,n);for(let i of Co(s)){let a=v(P(e.config.projectRoot,i));if(r.has(a)||E(i))return a}return null}function xo(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=_(e);for(let o of oe){let s=`${n}${o}`,i=[...r].find(a=>a.endsWith(s));if(i)return i}for(let o of oe){let s=[...r].find(i=>gt(i)===`${n.split("/").pop()}${o}`);if(s)return s}return null}function vo(e){let t=k(e);return Se.has(t)?[e]:[`${e}.py`,`${e}.pyi`,x(e,"__init__.py"),x(e,"__init__.pyi")]}function Ne(e,t){let n=_(e);for(let r of t){let o=v(P(e.config.projectRoot,r));if(n.has(o)||E(r))return o}return null}function No(e){let t=k(e);return ye.has(t)?[e]:[`${e}.rs`,x(e,"mod.rs")]}function bo(e){let t=k(e);return xe.has(t)?[e]:[`${e}.rb`,x(e,"index.rb")]}function Co(e){let t=k(e);return ve.has(t)?[e]:[`${e}.dart`,e]}function be(e){let t=k(e),n=new Set;if(t){n.add(e);for(let r of z)n.add(e.slice(0,-t.length)+r)}else for(let r of z)n.add(`${e}${r}`),n.add(x(e,`index${r}`));return[...n]}function _(e){return Rr.get(e,()=>new Set(q(e,{includeIgnored:!1}).map(v)))}function ei(e){return jr.get(e,()=>Te([..._(e)].sort().join(`
|
|
8
|
-
`)))}var ko=new Set(["in","key","of"]),To=new Set(["computed","defineEmits","defineProps","reactive","ref","watch","watchEffect"]),_o=L("vue-component-behavior-profiles");function wt(e,t={}){let n=O(e,{extensions:[".vue"]}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).map(o=>Ce(e,o)).filter(o=>(t.minTemplateTokens===void 0||o.templateTokens.size>=t.minTemplateTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function Ce(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n),o=_o.get(e,n,r,()=>Lo(e,n,r));return Po(o)}function Lo(e,t,n){let r=A(e,t),o=re(e,t),s=ne(r),i=Ao(o),a=o.expressionIdentifiers.map(m=>m.name).filter(m=>!i.includes(m)).filter((m,b,I)=>I.indexOf(m)===b).sort(),c=o.componentTags.map(m=>m.normalized).filter((m,b,I)=>I.indexOf(m)===b).sort(),l=n?n.split(`
|
|
9
|
-
`).length:0,f=F(r.template),u=s.lineCount,N=r.styles.reduce((m,b)=>m+F(b),0),V=r.customBlocks.reduce((m,b)=>m+F(b),0),{lines:se,paths:ie}=Fo(e,t,s);return{file:t,sfc:r,templateFacts:o,scriptFacts:s,templateTokens:new Set(o.structuralTokens),behaviorTokens:wo(o,s,a),templateBindingNames:a,templateLocalNames:i,componentNames:c,sfcLines:l,totalLines:l+s.externalLineCount,templateLines:f,scriptLines:u,styleLines:N,externalScriptLines:s.externalLineCount,externalScriptPaths:s.externalScriptPaths,customBlockLines:V,delegatedComposableLines:se,delegatedComposablePaths:ie}}function Fo(e,t,n){let r=new Set;for(let i of n.composables){let a=n.imports.find(l=>l.local===i);if(!a)continue;let c=Pt(e,a.sourcePath,a.source);!c||c===t||r.add(c)}let o=[...r].sort();return{lines:o.reduce((i,a)=>{let c=g(e,a);return i+(c?c.split(`
|
|
10
|
-
`).length:0)},0),paths:o}}function Po(e){let t=Eo(e.scriptFacts);return{...e,scriptFacts:t,templateTokens:new Set(e.templateTokens),behaviorTokens:new Set(e.behaviorTokens),templateBindingNames:[...e.templateBindingNames],templateLocalNames:[...e.templateLocalNames],componentNames:[...e.componentNames],externalScriptPaths:t.externalScriptPaths,delegatedComposablePaths:[...e.delegatedComposablePaths]}}function Eo(e){return{...e,imports:e.imports.map(t=>({...t})),functions:e.functions.map(t=>({...t})),calls:e.calls.map(t=>({...t,categories:[...t.categories]})),composables:[...e.composables],stores:[...e.stores],reactivity:[...e.reactivity],lifecycle:[...e.lifecycle],requests:[...e.requests],macros:[...e.macros],externalScriptPaths:[...e.externalScriptPaths],unresolvedScripts:e.unresolvedScripts.map(t=>({...t}))}}function wo(e,t,n){let r=new Set;for(let o of t.composables)r.add(`composable:${o}`);for(let o of t.stores)r.add(`store:${o}`);for(let o of t.reactivity)r.add(`reactivity:${o}`);for(let o of t.lifecycle)r.add(`lifecycle:${o}`);for(let o of t.requests)r.add(`request:${o}`);for(let o of t.macros)r.add(`macro:${o}`);for(let o of t.functions){if(To.has(o.name))continue;r.add(`function:${o.name}`);let s=/^[a-z]+/.exec(o.name)?.[0]??null;s&&s.length>2&&s!==o.name&&r.add(`function-verb:${s}`)}for(let o of e.events)r.add(`template-event:${o.name}`);for(let o of n)r.add(`template-binding:${o}`);return r}function Ao(e){let t=new Set;for(let n of e.directives)if(n.name==="for"&&n.value)for(let r of Ro(n.value))t.add(r);for(let n of e.slots)if(n.value)for(let r of At(n.value))t.add(r);return[...t].sort()}function Ro(e){let t=/^(.*?)\s+(?:in|of)\s+/.exec(e.trim());return t?At(t[1]??""):[]}function At(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];ko.has(r)||t.push(r)}return t}function gi(e){return{capability:(t,n)=>jo(t,n),reactProfiles:(t={})=>Ye(e,t),reactProfilesForFile:t=>me(e,t),vueProfiles:(t={})=>wt(e,t),vueProfileForFile:t=>Ce(e,t),vueTemplateFacts:t=>re(e,t),vueScriptFacts:t=>ne(A(e,t))}}function jo(e,t){let n=e.startsWith("react-")?"react":"vue";if(t===void 0)return{slot:e,available:!0,framework:n};let r=t.replace(/\\/g,"/").toLowerCase();return n==="react"&&!r.endsWith(".tsx")&&!r.endsWith(".jsx")?{slot:e,available:!1,framework:n,reason:"React behavior profiles are only available for .tsx and .jsx files"}:n==="vue"&&!r.endsWith(".vue")?{slot:e,available:!1,framework:n,reason:"Vue behavior facts are only available for .vue files"}:{slot:e,available:!0,framework:n}}export{we as a,v as b,Io as c,Bo as d,Ae as e,Mt as f,z as g,ht as h,St as i,yt as j,xt as k,vt as l,Nt as m,bt as n,Ct as o,oe as p,Ys as q,Qr as r,Pt as s,fo as t,mo as u,go as v,ho as w,So as x,yo as y,xo as z,ei as A,X as B,je as C,We as D,ze as E,Q as F,K as G,at as H,pt as I,us as J,He as K,O as L,ps as M,gi as N};
|
|
11
|
-
//# sourceMappingURL=chunk-DGMCFMPG.js.map
|