scip-query 0.10.1 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/augment-vue-worker.js +1 -1
- package/dist/{chunk-24PFLKFK.js → chunk-3KLLFNT4.js} +2 -2
- package/dist/{chunk-UIWAZ2NT.js → chunk-3UVJJ6Z7.js} +1 -1
- package/dist/chunk-3UW7VM4H.js +62 -0
- package/dist/chunk-3ZYF3ELZ.js +2 -0
- package/dist/{chunk-6YKJSETN.js → chunk-47UA45TU.js} +2 -2
- package/dist/chunk-4HOMAEDD.js +2 -0
- package/dist/{chunk-5VB3WU7K.js → chunk-4ZUJJRWT.js} +2 -2
- package/dist/{chunk-LWPEZ4FP.js → chunk-5FOPAXWY.js} +2 -2
- package/dist/{chunk-CCB45WDY.js → chunk-5M4TYWVI.js} +2 -2
- package/dist/{chunk-PV4CEDIL.js → chunk-5QJXH6ZL.js} +5 -5
- package/dist/{chunk-NN3O7TPH.js → chunk-64MNV6AB.js} +1 -1
- package/dist/{chunk-LWWZBABT.js → chunk-77YBOOYT.js} +2 -2
- package/dist/chunk-7ADUXFRZ.js +2 -0
- package/dist/chunk-7KCSELEV.js +2 -0
- package/dist/{chunk-GZXXBDJA.js → chunk-7OHWPJ5N.js} +2 -2
- package/dist/{chunk-BJ7OHKB5.js → chunk-7S5E7KWT.js} +1 -1
- package/dist/chunk-A3VNUGKJ.js +2 -0
- package/dist/{chunk-CMGOXDVP.js → chunk-A4L36SZS.js} +2 -2
- package/dist/{chunk-5D3BT4B4.js → chunk-AUVBR62P.js} +2 -2
- package/dist/chunk-AW4N6MGC.js +18 -0
- package/dist/{chunk-65UWNXEH.js → chunk-B6MJ5VQV.js} +2 -2
- package/dist/chunk-BKDXBJDQ.js +2 -0
- package/dist/{chunk-WZVTADY7.js → chunk-C2QSK7E7.js} +1 -1
- package/dist/chunk-C3MZZ2ZN.js +2 -0
- package/dist/{chunk-GTNPPGZJ.js → chunk-CAWSSEVM.js} +2 -2
- package/dist/chunk-CFL2CNIF.js +10 -0
- package/dist/{chunk-E55WCTLH.js → chunk-CJJP64OC.js} +2 -2
- package/dist/{chunk-ADKQX2OY.js → chunk-CRU42NJU.js} +2 -2
- package/dist/chunk-CSWZFD46.js +2 -0
- package/dist/{chunk-QOFKVNFE.js → chunk-CTCAF3YA.js} +2 -2
- package/dist/{chunk-YVQUQIBM.js → chunk-D322LMSA.js} +2 -2
- package/dist/{chunk-IJYWCB57.js → chunk-DAI74TJU.js} +2 -2
- package/dist/chunk-DE7MA6OD.js +3 -0
- package/dist/chunk-DJMK4DBL.js +2 -0
- package/dist/{chunk-FVX4GEAC.js → chunk-E44ZMVNA.js} +2 -2
- package/dist/{chunk-MESUJJVQ.js → chunk-E7KERP7E.js} +2 -2
- package/dist/{chunk-YIE5FZAF.js → chunk-EOZIZWW4.js} +2 -2
- package/dist/{chunk-XGGTESMN.js → chunk-ERHOS6AW.js} +2 -2
- package/dist/{chunk-5HDYAOSF.js → chunk-ESG4HBEF.js} +2 -2
- package/dist/{chunk-HCQ7J2N5.js → chunk-EWC3UK4V.js} +3 -3
- package/dist/chunk-EYLXU575.js +2 -0
- package/dist/chunk-FIB4JPEX.js +2 -0
- package/dist/chunk-FNRPGGVI.js +2 -0
- package/dist/{chunk-QUKZ77A6.js → chunk-FOQHUKNZ.js} +2 -2
- package/dist/{chunk-QH5GTVVB.js → chunk-FUPDW5AC.js} +2 -2
- package/dist/{chunk-B3HMRQDA.js → chunk-G3WGZU5Q.js} +2 -2
- package/dist/chunk-GLJAAKDW.js +4 -0
- package/dist/{chunk-TUAPDKBI.js → chunk-GS33KGAY.js} +2 -2
- package/dist/{chunk-623UQCVG.js → chunk-GZCQTZLK.js} +2 -2
- package/dist/{chunk-SA6B3EGD.js → chunk-HVTYSC26.js} +2 -2
- package/dist/chunk-I7TSQZ3J.js +4 -0
- package/dist/{chunk-R7S3UCDR.js → chunk-ICXVNWMI.js} +2 -2
- package/dist/chunk-JM72FNGA.js +2 -0
- package/dist/{chunk-DRU74YUM.js → chunk-KPHKX4LP.js} +1 -1
- package/dist/chunk-KRGBLZT2.js +7 -0
- package/dist/{chunk-YYCQQBMG.js → chunk-LPLGJ4HO.js} +2 -2
- package/dist/chunk-MUULWXSJ.js +2 -0
- package/dist/chunk-MZ7APUFN.js +3 -0
- package/dist/{chunk-LYS4SMAQ.js → chunk-NNDYO2DX.js} +2 -2
- package/dist/{chunk-ATGRITZP.js → chunk-NP5HYVLX.js} +4 -4
- package/dist/{chunk-MHAQXOZY.js → chunk-NVFERV4U.js} +2 -2
- package/dist/{chunk-LWYIGRHR.js → chunk-NXIAHE7F.js} +1 -1
- package/dist/chunk-O3OKSF6O.js +2 -0
- package/dist/chunk-O4L4AB3T.js +2 -0
- package/dist/{chunk-TMS4JPWY.js → chunk-OBBDKQAG.js} +2 -2
- package/dist/chunk-OLD6PBU6.js +7 -0
- package/dist/{chunk-5BZOSICN.js → chunk-PFOCOG57.js} +1 -1
- package/dist/{chunk-CFLYMEUS.js → chunk-PVZMPG5I.js} +1 -1
- package/dist/{chunk-T67R7V5I.js → chunk-QLNGUWR7.js} +2 -2
- package/dist/chunk-QSXQT3NE.js +2 -0
- package/dist/{chunk-6TWFT4Y5.js → chunk-QVCCLDZI.js} +2 -2
- package/dist/{chunk-PNN3D4BE.js → chunk-RHTJBYZ5.js} +2 -2
- package/dist/chunk-SPE4YCOT.js +7 -0
- package/dist/{chunk-4N7LFYSD.js → chunk-TM6GVHA6.js} +2 -2
- package/dist/chunk-TO54DY4O.js +2 -0
- package/dist/{chunk-HQHFMPLJ.js → chunk-UMNENNTX.js} +2 -2
- package/dist/chunk-UQJGTVHV.js +5 -0
- package/dist/{chunk-TKDJQ2WD.js → chunk-UUBMFL3F.js} +1 -1
- package/dist/chunk-VAA5FFIW.js +2 -0
- package/dist/chunk-X474LKJX.js +2 -0
- package/dist/chunk-X7ZY6FFF.js +4 -0
- package/dist/{chunk-RNLUCQJB.js → chunk-YQH353VA.js} +2 -2
- package/dist/{chunk-44JOJLMO.js → chunk-YTR4CO5S.js} +2 -2
- package/dist/chunk-YUOAAR24.js +2 -0
- package/dist/chunk-YVLHL6KQ.js +8 -0
- package/dist/{chunk-ADTG377O.js → chunk-YYD245WG.js} +2 -2
- package/dist/{chunk-I6PTB2CM.js → chunk-Z4VHYJ5U.js} +2 -2
- package/dist/chunk-ZFMPHDAT.js +4 -0
- package/dist/chunk-ZQLO2SCU.js +6 -0
- package/dist/chunk-ZSLT7NWQ.js +61 -0
- package/dist/cli.js +242 -225
- package/dist/{config-types-Bok4jrO3.d.ts → config-types-Bj4sh28g.d.ts} +8 -0
- package/dist/{db-BkFlkzI3.d.ts → db-CTarohbZ.d.ts} +1 -1
- package/dist/git-history-Dao3_Pu9.d.ts +12 -0
- package/dist/{health-CbGMdRPg.d.ts → health-Bx0x1HAG.d.ts} +23 -2
- package/dist/index.d.ts +3 -3
- 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/bottlenecks.d.ts +6 -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 +37 -3
- 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 +6 -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 +10 -3
- package/dist/queries/dead.js +1 -1
- package/dist/queries/deep-chains.d.ts +6 -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 +53 -3
- 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 +20 -3
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +10 -3
- package/dist/queries/drift.js +1 -1
- package/dist/queries/extract-candidates.d.ts +11 -3
- 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/files.js +1 -1
- 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 +14 -3
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +17 -15
- 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 +51 -0
- package/dist/queries/locality-candidates.js +2 -0
- 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/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +8 -3
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +4 -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 +9 -3
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +9 -3
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +25 -3
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +7 -3
- 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 +24 -3
- 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 +10 -3
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/stats.js +1 -1
- 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/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/unused-imports.d.ts +4 -0
- package/dist/queries/unused-imports.js +2 -0
- 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 +9 -3
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +9 -3
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +6 -3
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +1 -1
- package/dist/reindex.d.ts +1 -1
- package/dist/reindex.js +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -2
- package/docs/COMMAND_REFERENCE.md +3 -2
- package/docs/analyzer-inventory.md +162 -0
- package/docs/analyzer-validation-ledger.md +262 -0
- package/docs/analyzer-validation-protocol.md +192 -0
- package/docs/locality-analyzer-design.md +193 -0
- package/package.json +14 -3
- package/skills/scip-directory-architecture/SKILL.md +178 -0
- package/skills/scip-maintainability/SKILL.md +1 -1
- package/skills/scip-query/SKILL.md +2 -1
- package/skills/scip-query-setup/SKILL.md +118 -0
- package/skills/scip-react-maintainability/SKILL.md +1 -1
- package/skills/scip-vue-maintainability/SKILL.md +1 -1
- package/dist/chunk-23FVN4Y5.js +0 -2
- package/dist/chunk-27KPKLRJ.js +0 -7
- package/dist/chunk-2NLK4INB.js +0 -2
- package/dist/chunk-2XKAMW6B.js +0 -61
- package/dist/chunk-332L7SRO.js +0 -2
- package/dist/chunk-4EAANIWC.js +0 -2
- package/dist/chunk-5ALI77D7.js +0 -3
- package/dist/chunk-5IDEQEM4.js +0 -4
- package/dist/chunk-62NMBOA5.js +0 -2
- package/dist/chunk-64LH2QUP.js +0 -62
- package/dist/chunk-6U4EODW3.js +0 -2
- package/dist/chunk-A2GVUCZR.js +0 -8
- package/dist/chunk-DBIG4QAJ.js +0 -2
- package/dist/chunk-DMLPJ75B.js +0 -2
- package/dist/chunk-DTERBKUE.js +0 -7
- package/dist/chunk-F4PKYBQB.js +0 -2
- package/dist/chunk-JTRY2YRJ.js +0 -2
- package/dist/chunk-L77GXANO.js +0 -6
- package/dist/chunk-LT6GJ27X.js +0 -10
- package/dist/chunk-LUBKUISI.js +0 -2
- package/dist/chunk-LVYXX7ZW.js +0 -2
- package/dist/chunk-LXM7AHQG.js +0 -4
- package/dist/chunk-LY6NRJPJ.js +0 -2
- package/dist/chunk-N2T2GPYQ.js +0 -2
- package/dist/chunk-OB6PEVI3.js +0 -2
- package/dist/chunk-R42LZMLX.js +0 -2
- package/dist/chunk-RGDUIMNE.js +0 -3
- package/dist/chunk-RYBMW2EN.js +0 -2
- package/dist/chunk-TTGWDUJ4.js +0 -5
- package/dist/chunk-UVK3SL4Z.js +0 -2
- package/dist/chunk-W3PQRAI4.js +0 -2
- package/dist/chunk-WWFBDM5Y.js +0 -2
- package/dist/chunk-Y33GRQK6.js +0 -18
- package/dist/chunk-YISMWW66.js +0 -7
package/dist/chunk-DBIG4QAJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-62NMBOA5.js";import{a as Q}from"./chunk-JTRY2YRJ.js";import{a as K}from"./chunk-N2T2GPYQ.js";import{a as J}from"./chunk-TUAPDKBI.js";import{a as X}from"./chunk-LY6NRJPJ.js";import{a as ee}from"./chunk-24PFLKFK.js";import{a as Y}from"./chunk-HQHFMPLJ.js";import{a as l}from"./chunk-B32FX5KB.js";import{a as j}from"./chunk-DTERBKUE.js";import{a as G}from"./chunk-LXM7AHQG.js";import{a as W}from"./chunk-WZVTADY7.js";import{a as O}from"./chunk-B3HMRQDA.js";import{a as q}from"./chunk-R42LZMLX.js";import{a as N}from"./chunk-4EAANIWC.js";import{b as U}from"./chunk-TTGWDUJ4.js";import{a as z}from"./chunk-Y33GRQK6.js";import{a as A,b as B}from"./chunk-6U4EODW3.js";import{b as _}from"./chunk-RYBMW2EN.js";import{b as V,c as $}from"./chunk-YISMWW66.js";import{a as F}from"./chunk-IJYWCB57.js";import{a as I}from"./chunk-E55WCTLH.js";import{e as D,f as E}from"./chunk-L77GXANO.js";function f(e){return e.scoreCount??e.count}function M(e){let r=Me(e),{breakdown:t,pressure:i}=ke(e),o=oe(t,"risk"),n=oe(t,"hygiene");return{score:Math.min(o,n),riskScore:o,hygieneScore:n,scoreBreakdown:t,overview:{documents:e.statsResult.documents,symbols:e.statsResult.symbols,indexSizeBytes:e.statsResult.indexSizeBytes},findings:{deadSymbols:e.dead.count,deadLoc:e.dead.loc,isolatedSymbols:e.isolated.count,isolatedLoc:e.isolated.loc,cycles:e.realCycleCount,similarPairs:e.similarCount,reactComponentDuplicatePairs:e.reactComponentDuplicates.count,reactHookCandidatePairs:e.reactHookCandidates.count,reactHookCandidateScoreCount:f(e.reactHookCandidates),reactLargeComponentPressureFiles:e.reactLargeComponentPressure.count,vueComponentDuplicatePairs:e.vueComponentDuplicates.count,vueComposableCandidatePairs:e.vueComposableCandidates.count,vueComposableCandidateScoreCount:f(e.vueComposableCandidates),vueLargeViewPressureFiles:e.vueLargeViewPressure.count,extractionCandidates:e.extractCount,wrappers:e.wrappers.count,passthroughs:e.passthroughs.count,staleTypes:e.stale.count,driftedFiles:e.drift.count,complexityHotspotCount:e.complexity.extremeCount,hiddenCouplingPairs:e.gitEvidence?.hiddenCoupling.pairCount??null},axes:De(e),validation:Ae(e),suppressions:e.suppressions,actions:r,pressure:i,topComplexity:e.complexity.top,warnings:e.warnings.length>0?e.warnings:void 0}}function De(e){return{deletable:{loc:e.dead.loc+e.isolated.loc,symbols:e.dead.count+e.isolated.count},cycles:{count:e.realCycleCount},changeAmplification:e.gitEvidence?.amplification??null,hiddenCoupling:e.gitEvidence?.hiddenCoupling??null,churnWeightedComplexity:Ee(e),evidenceQuality:{graphFindings:e.dead.count+e.isolated.count+e.realCycleCount,heuristicFindings:e.similarCount+e.reactComponentDuplicates.count+e.reactHookCandidates.count+e.reactLargeComponentPressure.count+e.vueComponentDuplicates.count+e.vueComposableCandidates.count+e.vueLargeViewPressure.count+e.extractCount+e.wrappers.count+e.passthroughs.count+e.stale.count+e.drift.count,userSuppressed:e.suppressions?.total??0}}}function Ee(e){let r=e.gitEvidence?.fileStats;return r?e.complexity.top.map(t=>{let i=t.file?r[t.file]?.changes??0:0;return{...t,changes:i,weighted:u(t.score*Math.log2(1+i))}}).sort((t,i)=>i.weighted-t.weighted):null}function Ae(e){let r=e.gitEvidence?.fileStats;if(!r)return null;let t={dead:e.dead.files??[],isolated:e.isolated.files??[],wrappers:e.wrappers.files??[],passthroughs:e.passthroughs.files??[],stale:e.stale.files??[],reactComponents:e.reactComponentDuplicates.files??[],reactHooks:e.reactHookCandidates.files??[],reactLargeComponents:e.reactLargeComponentPressure.files??[],vueComponents:e.vueComponentDuplicates.files??[],vueComposables:e.vueComposableCandidates.files??[],vueLargeViews:e.vueLargeViewPressure.files??[]},i=new Set(Object.values(t).flat()),o=0,n=0,a=0;for(let[b,p]of Object.entries(r))i.has(b)?o+=p.fixChanges:(n+=p.fixChanges,a+=1);let C=i.size>0?u(o/i.size):0,d=a>0?u(n/a):0,v={};for(let[b,p]of Object.entries(t)){let m=new Set(p);if(m.size===0)continue;let S=0;for(let x of m)S+=r[x]?.fixChanges??0;let H=u(S/m.size);v[b]={flaggedFiles:m.size,fixDensity:H,lift:d>0?u(H/d):null}}return{flaggedFiles:i.size,flaggedFixDensity:C,baselineFixDensity:d,ratio:i.size>0&&d>0?u(C/d):null,byCategory:v}}function u(e){return Math.round(e*100)/100}function ne(e){return Number.isInteger(e)?String(e):e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}function te(e){let r=f(e);return Math.abs(r-e.count)<.01?"":` (${ne(r)} score-weighted after existing shared infrastructure discount)`}function re(e,r){let t=f(e),i=`${e.count} ${r}`;return Math.abs(t-e.count)<.01?i:`${i} (${ne(t)} score-weighted)`}function Me(e){let r=[];if(e.dead.count>0&&r.push({category:"Dead code",evidence:"graph-fact",description:`${e.dead.count} symbols with zero references anywhere \u2014 safe to delete`,effort:"low",impact:"high",count:e.dead.count,locRecoverable:e.dead.loc}),e.isolated.count>0&&r.push({category:"Isolated symbols",evidence:"graph-fact",description:`${e.isolated.count} symbols completely disconnected from the codebase graph`,effort:"low",impact:"medium",count:e.isolated.count,locRecoverable:e.isolated.loc}),e.realCycleCount>0&&r.push({category:"Circular dependencies",evidence:"graph-fact",description:`${e.realCycleCount} cycle(s) \u2014 break with dependency inversion or module restructuring`,effort:"medium",impact:"high",count:e.realCycleCount,locRecoverable:0}),e.similarCount>0&&r.push({category:"Similar functions",evidence:"heuristic",description:`${e.similarCount} pairs with real logic overlap (beyond shared imports) \u2014 consolidation candidates`,effort:"medium",impact:"medium",count:e.similarCount,locRecoverable:0}),e.reactComponentDuplicates.count>0&&r.push({category:"Duplicated React components",evidence:"heuristic",description:`${e.reactComponentDuplicates.count} React component pair(s) share JSX structure \u2014 extract or reuse the shared UI concept`,effort:"medium",impact:"medium",count:e.reactComponentDuplicates.count,locRecoverable:e.reactComponentDuplicates.loc}),e.reactHookCandidates.count>0&&r.push({category:"Duplicated React hook behavior",evidence:"heuristic",description:`${e.reactHookCandidates.count} React component pair(s) share state/effect/request behavior${te(e.reactHookCandidates)} \u2014 extract or reuse a hook`,effort:"medium",impact:"medium",count:e.reactHookCandidates.count,locRecoverable:e.reactHookCandidates.loc}),e.reactLargeComponentPressure.count>0&&r.push({category:"Large React components",evidence:"heuristic",description:`${e.reactLargeComponentPressure.count} React component(s) concentrate JSX/behavior pressure \u2014 split by reason to change`,effort:"medium",impact:"medium",count:e.reactLargeComponentPressure.count,locRecoverable:0}),e.vueComponentDuplicates.count>0&&r.push({category:"Duplicated Vue components",evidence:"heuristic",description:`${e.vueComponentDuplicates.count} Vue component pair(s) share template structure \u2014 extract or reuse the shared UI concept`,effort:"medium",impact:"medium",count:e.vueComponentDuplicates.count,locRecoverable:e.vueComponentDuplicates.loc}),e.vueComposableCandidates.count>0&&r.push({category:"Duplicated Vue behavior",evidence:"heuristic",description:`${e.vueComposableCandidates.count} Vue component pair(s) share state/effect/request behavior${te(e.vueComposableCandidates)} \u2014 extract or reuse a composable`,effort:"medium",impact:"medium",count:e.vueComposableCandidates.count,locRecoverable:e.vueComposableCandidates.loc}),e.vueLargeViewPressure.count>0&&r.push({category:"Large Vue views",evidence:"heuristic",description:`${e.vueLargeViewPressure.count} Vue file(s) concentrate template/script/style pressure \u2014 split by reason to change`,effort:"medium",impact:"medium",count:e.vueLargeViewPressure.count,locRecoverable:0}),e.extractCount>0&&r.push({category:"Extraction candidates",evidence:"heuristic",description:`${e.extractCount} large functions with isolated callee clusters \u2014 extract method opportunities`,effort:"medium",impact:"medium",count:e.extractCount,locRecoverable:0}),e.wrappers.count>0&&r.push({category:"Wrapper functions",evidence:"heuristic",description:`${e.wrappers.count} single-consumer symbols that could be inlined`,effort:"low",impact:"low",count:e.wrappers.count,locRecoverable:e.wrappers.loc}),e.passthroughs.count>0&&r.push({category:"Passthrough functions",evidence:"heuristic",description:`${e.passthroughs.count} functions that just forward to one callee \u2014 unnecessary indirection`,effort:"low",impact:"low",count:e.passthroughs.count,locRecoverable:e.passthroughs.loc}),e.stale.count>0){let o=[];e.stale.unused>0&&o.push(`${e.stale.unused} unused`),e.stale.singleUse>0&&o.push(`${e.stale.singleUse} single-consumer (not in types file)`),r.push({category:"Stale abstractions",evidence:"heuristic",description:`${o.join(", ")} \u2014 premature abstraction`,effort:"low",impact:"medium",count:e.stale.count,locRecoverable:e.stale.loc})}if(e.drift.count>0){let o=[];e.drift.unusedImports>0&&o.push(`${e.drift.unusedImports} unused imports`),e.drift.layerViolations>0&&o.push(`${e.drift.layerViolations} layer violations`),r.push({category:"Structural drift",evidence:"heuristic",description:o.join(", "),effort:e.drift.layerViolations>0?"medium":"low",impact:e.drift.layerViolations>0?"medium":"low",count:e.drift.count,locRecoverable:0})}if(e.gitEvidence&&e.gitEvidence.hiddenCoupling.pairCount>0){let o=e.gitEvidence.hiddenCoupling.top[0];r.push({category:"Hidden coupling",evidence:"change-graph",description:`${e.gitEvidence.hiddenCoupling.pairCount} file pair(s) co-change without a structural link`+(o?` (e.g. ${o.fileA} \u2194 ${o.fileB})`:"")+" \u2014 name the shared concept or enforce the sync",effort:"medium",impact:"high",count:e.gitEvidence.hiddenCoupling.pairCount,locRecoverable:0})}let t={high:3,medium:2,low:1},i={low:3,medium:2,high:1};return r.sort((o,n)=>{let a=t[o.impact]*i[o.effort];return t[n.impact]*i[n.effort]-a}),r}var ie={"dead-code":"risk",isolated:"risk",cycles:"risk",complexity:"risk","hidden-coupling":"risk","cycles-pressure":"risk","complexity-pressure":"risk","hidden-coupling-pressure":"risk",similar:"hygiene","react-component-duplicates":"hygiene","react-hook-candidates":"hygiene","react-large-component-pressure":"hygiene","vue-component-duplicates":"hygiene","vue-composable-candidates":"hygiene","vue-large-view-pressure":"hygiene",extract:"hygiene",wrappers:"hygiene",passthroughs:"hygiene","stale-abstractions":"hygiene",drift:"hygiene","similar-pressure":"hygiene","react-component-duplicates-pressure":"hygiene","react-hook-candidates-pressure":"hygiene","react-large-component-pressure-pressure":"hygiene","vue-component-duplicates-pressure":"hygiene","vue-composable-candidates-pressure":"hygiene","vue-large-view-pressure-pressure":"hygiene","extract-pressure":"hygiene","wrappers-pressure":"hygiene","passthroughs-pressure":"hygiene","stale-abstractions-pressure":"hygiene","drift-pressure":"hygiene"};function oe(e,r){let t=e.filter(i=>i.kind===r).reduce((i,o)=>i+o.points,0);return Math.max(0,Math.min(100,100-t))}function ke(e){let r=Math.max(e.statsResult.documents,1),t=Math.max(e.statsResult.symbols,1),i=[],o=[],n=(h,L,g)=>{L>0&&i.push({axis:h,points:L,detail:g,kind:ie[h]??"hygiene"})},a=(h,L,g,Le,ye,we,Pe)=>{let y=Math.max(Le,1);if(g<=y)return;let P=g/y,R=Math.min(ye,Math.ceil(Math.log2(P)*we));if(R<=0)return;let Re=ie[h]??"hygiene";o.push({axis:h,category:L,kind:Re,count:g,threshold:u(y),ratio:u(P),extraPenalty:R}),n(h,R,`${g} ${Pe} exceed pressure threshold ${u(y)} (${u(P)}x)`)},C=e.dead.count/t;n("dead-code",Math.min(20,Math.round(C*200)),`${e.dead.count} dead symbols (${e.dead.loc} LOC deletable)`);let d=e.isolated.count/t;n("isolated",Math.min(10,Math.round(d*200)),`${e.isolated.count} isolated symbols (${e.isolated.loc} LOC deletable)`),n("cycles",Math.min(15,e.realCycleCount*5),`${e.realCycleCount} real dependency cycle(s)`);let v=e.similarCount/t*1e3;n("similar",Math.min(10,Math.round(v)),`${e.similarCount} similar function pair(s)`);let b=e.reactComponentDuplicates.count/r*1e3;n("react-component-duplicates",Math.min(10,Math.round(b)),`${e.reactComponentDuplicates.count} duplicated React component pair(s)`);let p=f(e.reactHookCandidates),m=p/r*1e3;n("react-hook-candidates",Math.min(10,Math.round(m)),re(e.reactHookCandidates,"duplicated React behavior pair(s)"));let S=e.reactLargeComponentPressure.count/r*1e3;n("react-large-component-pressure",Math.min(5,Math.round(S/2)),`${e.reactLargeComponentPressure.count} large React component pressure file(s)`);let H=e.vueComponentDuplicates.count/r*1e3;n("vue-component-duplicates",Math.min(10,Math.round(H)),`${e.vueComponentDuplicates.count} duplicated Vue component pair(s)`);let x=f(e.vueComposableCandidates),be=x/r*1e3;n("vue-composable-candidates",Math.min(10,Math.round(be)),re(e.vueComposableCandidates,"duplicated Vue behavior pair(s)"));let ve=e.vueLargeViewPressure.count/r*1e3;n("vue-large-view-pressure",Math.min(5,Math.round(ve/2)),`${e.vueLargeViewPressure.count} large Vue view pressure file(s)`);let Se=e.extractCount/t*1e3;n("extract",Math.min(5,Math.round(Se/2)),`${e.extractCount} extraction candidate(s)`),n("wrappers",Math.min(3,e.wrappers.count),`${e.wrappers.count} wrapper candidate(s)`),n("passthroughs",Math.min(3,e.passthroughs.count),`${e.passthroughs.count} passthrough candidate(s)`);let He=e.stale.count/Math.max(t*.1,1);n("stale-abstractions",Math.min(8,Math.round(He*10)),`${e.stale.count} stale abstraction(s)`);let xe=e.drift.count/r;return n("drift",Math.min(5,Math.round(xe*50)),`${e.drift.count} drift finding(s)`),n("complexity",Math.min(5,e.complexity.extremeCount*2),`${e.complexity.extremeCount} extreme complexity hotspot(s)`),e.gitEvidence&&n("hidden-coupling",Math.min(5,e.gitEvidence.hiddenCoupling.pairCount),`${e.gitEvidence.hiddenCoupling.pairCount} co-changing pair(s) without a structural link`),a("cycles-pressure","Circular dependencies",e.realCycleCount,3,10,3,"cycle(s)"),a("complexity-pressure","Extreme complexity",e.complexity.extremeCount,3,5,2,"extreme complexity hotspot(s)"),e.gitEvidence&&a("hidden-coupling-pressure","Hidden coupling",e.gitEvidence.hiddenCoupling.pairCount,50,10,4,"co-changing pair(s)"),a("similar-pressure","Similar functions",e.similarCount,Math.max(50,t*.01),8,4,"similar function pair(s)"),a("react-component-duplicates-pressure","Duplicated React components",e.reactComponentDuplicates.count,Math.max(10,r*.01),8,4,"duplicated React component pair(s)"),a("react-hook-candidates-pressure","Duplicated React hook behavior",p,Math.max(10,r*.01),8,4,"duplicated React behavior pair(s)"),a("react-large-component-pressure-pressure","Large React components",e.reactLargeComponentPressure.count,Math.max(10,r*.01),4,2,"large React component pressure file(s)"),a("vue-component-duplicates-pressure","Duplicated Vue components",e.vueComponentDuplicates.count,Math.max(10,r*.01),8,4,"duplicated Vue component pair(s)"),a("vue-composable-candidates-pressure","Duplicated Vue behavior",x,Math.max(10,r*.01),8,4,"duplicated Vue behavior pair(s)"),a("vue-large-view-pressure-pressure","Large Vue views",e.vueLargeViewPressure.count,Math.max(10,r*.01),4,2,"large Vue view pressure file(s)"),a("extract-pressure","Extraction candidates",e.extractCount,Math.max(50,t*.01),4,2,"extraction candidate(s)"),a("wrappers-pressure","Wrapper functions",e.wrappers.count,50,4,2,"wrapper candidate(s)"),a("passthroughs-pressure","Passthrough functions",e.passthroughs.count,50,4,2,"passthrough candidate(s)"),a("stale-abstractions-pressure","Stale abstractions",e.stale.count,Math.max(50,t*.02),4,2,"stale abstraction(s)"),a("drift-pressure","Structural drift",e.drift.count,Math.max(10,r*.1),4,2,"drift finding(s)"),{breakdown:i,pressure:o}}import{getHeapStatistics as Te}from"v8";var Be=64*1024*1024;function k(){let e=globalThis.gc;if(!e)return;let r=Te();r.heap_size_limit-r.used_heap_size<Be||e()}var Ve=50,$e=75e3,_e=5e3,ae=2500,se=50,Fe=10,Ie=["overview","dead","isolated","cycles","similar","react-component-duplicates","react-hook-candidates","react-large-component-pressure","vue-component-duplicates","vue-composable-candidates","vue-large-view-pressure","extract-candidates","wrapper-candidates","passthrough-candidates","stale-abstractions","drift","complexity-hotspots","git-evidence","suppressions"],ue={overview:(e,r,t,i)=>({phase:"overview",statsResult:i,warnings:t.warnings}),dead:(e,r,t)=>({phase:"dead",dead:Ne(e,r,t)}),isolated:(e,r,t)=>({phase:"isolated",isolated:Oe(e,r,t)}),cycles:(e,r,t)=>({phase:"cycles",realCycleCount:qe(e,r,t)}),similar:(e,r,t)=>({phase:"similar",similarCount:Ue(e,r,t)}),"react-component-duplicates":(e,r,t)=>({phase:"react-component-duplicates",reactComponentDuplicates:We(e,r,t)}),"react-hook-candidates":(e,r,t)=>({phase:"react-hook-candidates",reactHookCandidates:je(e,r,t)}),"react-large-component-pressure":(e,r,t)=>({phase:"react-large-component-pressure",reactLargeComponentPressure:Ye(e,r,t)}),"vue-component-duplicates":(e,r,t)=>({phase:"vue-component-duplicates",vueComponentDuplicates:Xe(e,r,t)}),"vue-composable-candidates":(e,r,t)=>({phase:"vue-composable-candidates",vueComposableCandidates:Qe(e,r,t)}),"vue-large-view-pressure":(e,r,t)=>({phase:"vue-large-view-pressure",vueLargeViewPressure:Je(e,r,t)}),"extract-candidates":(e,r,t)=>({phase:"extract-candidates",extractCount:Ge(e,r,t)}),"wrapper-candidates":(e,r,t)=>({phase:"wrapper-candidates",wrappers:Ke(e,r,t)}),"passthrough-candidates":(e,r,t)=>({phase:"passthrough-candidates",passthroughs:Ze(e,r,t)}),"stale-abstractions":(e,r,t)=>({phase:"stale-abstractions",stale:et(e,r,t)}),drift:(e,r,t)=>({phase:"drift",drift:it(e,r,t)}),"complexity-hotspots":(e,r,t)=>({phase:"complexity-hotspots",complexity:ot(e,r,t)}),"git-evidence":(e,r,t)=>({phase:"git-evidence",gitEvidence:tt(e,t)}),suppressions:(e,r,t)=>({phase:"suppressions",suppressions:rt(e,t)})};function Ot(e,r={}){return le(e,r.full===!0,(t,i)=>{let o=ze(e,r.scope,t,i);return M(o)})}function qt(e,r,t={}){return le(e,t.full===!0,(i,o)=>ue[r](e,t.scope,o,i))}function le(e,r,t){let i=W(e),o=nt(i,r);try{return t(i,o)}finally{A(e,{semanticProvider:!0}),k()}}function Ut(e){return M(de(e))}function de(e){let r=s(e,"overview");return{statsResult:r.statsResult,warnings:r.warnings,dead:s(e,"dead").dead,isolated:s(e,"isolated").isolated,realCycleCount:s(e,"cycles").realCycleCount,similarCount:s(e,"similar").similarCount,reactComponentDuplicates:s(e,"react-component-duplicates").reactComponentDuplicates,reactHookCandidates:s(e,"react-hook-candidates").reactHookCandidates,reactLargeComponentPressure:s(e,"react-large-component-pressure").reactLargeComponentPressure,vueComponentDuplicates:s(e,"vue-component-duplicates").vueComponentDuplicates,vueComposableCandidates:s(e,"vue-composable-candidates").vueComposableCandidates,vueLargeViewPressure:s(e,"vue-large-view-pressure").vueLargeViewPressure,extractCount:s(e,"extract-candidates").extractCount,wrappers:s(e,"wrapper-candidates").wrappers,passthroughs:s(e,"passthrough-candidates").passthroughs,stale:s(e,"stale-abstractions").stale,drift:s(e,"drift").drift,complexity:s(e,"complexity-hotspots").complexity,gitEvidence:ce(e,"git-evidence")?.gitEvidence??null,suppressions:ce(e,"suppressions")?.suppressions??null}}function ce(e,r){return e.find(t=>t.phase===r)}function s(e,r){let t=e.find(i=>i.phase===r);if(!t)throw new Error(`Missing health phase result: ${r}`);return t}function ze(e,r,t,i){return de(Ie.map(o=>ue[o](e,r,i,t)))}function Ne(e,r,t){return c(e,t,"dead",()=>{let i=B(e,{scope:r,...l.dead,scanLimit:t.candidateScanLimit});return w(ct(e,i.symbols))})}function Oe(e,r,t){return c(e,t,"isolated",()=>{let i=O(e,{scope:r,...l.isolated,scanLimit:t.candidateScanLimit});return w(ut(e,i))})}function qe(e,r,t){return c(e,t,"cycles",()=>I(e,{scope:r}).filter(o=>o.kind==="real").length)}function Ue(e,r,t){return c(e,t,"similar",()=>U(e,{scope:r,...l.similar,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit}).length)}function Ge(e,r,t){return c(e,t,"extract-candidates",()=>N(e,{scope:r,...l.extract,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit}).length)}function We(e,r,t){return c(e,t,"react-component-duplicates",()=>{let i=Y(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return T(i)})}function je(e,r,t){return c(e,t,"react-hook-candidates",()=>{let i=X(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return me(i,dt)})}function Ye(e,r,t){return c(e,t,"react-large-component-pressure",()=>{let i=Q(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return lt(i)})}function Xe(e,r,t){return c(e,t,"vue-component-duplicates",()=>{let i=J(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return T(i)})}function Qe(e,r,t){return c(e,t,"vue-composable-candidates",()=>{let i=K(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return me(i,pt)})}function Je(e,r,t){return c(e,t,"vue-large-view-pressure",()=>{let i=Z(e,{scope:r,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit});return w(i)})}function Ke(e,r,t){return pe(e,t,"wrapper-candidates",()=>j(e,{scope:r,...l.wrappers,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit}))}function Ze(e,r,t){return pe(e,t,"passthrough-candidates",()=>q(e,{scope:r,...l.passthroughs,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit}))}function et(e,r,t){return c(e,t,"stale-abstractions",()=>{let i=G(e,{scope:r,...l.stale,limit:t.candidateResultLimit,scanLimit:t.candidateScanLimit}),o=i.filter(n=>n.consumers===0).length;return{count:i.length,loc:i.reduce((n,a)=>n+a.loc,0),files:[...new Set(i.map(n=>n.file))],unused:o,singleUse:i.length-o}})}function tt(e,r){return c(e,r,"git-evidence",()=>{let t=V(e);if(!t)return null;let i=_(e,void 0,{limit:r.candidateResultLimit}),o={};for(let[n,a]of t)o[n]={changes:a.changes,fixChanges:a.fixChanges};return{amplification:$(e),hiddenCoupling:{pairCount:i.findings.length,top:i.findings.slice(0,5).map(n=>({fileA:n.fileA,fileB:n.fileB,together:n.together,confidence:n.confidence}))},fileStats:o}})}function rt(e,r){return c(e,r,"suppressions",()=>{let t=ee(e);return{total:t.total,byCategory:{...t.byCategory}}})}function it(e,r,t){return c(e,t,"drift",()=>{let i=z(e,{scope:r,...l.drift});return{count:i.unusedImports+i.layerViolations,unusedImports:i.unusedImports,layerViolations:i.layerViolations}})}function ot(e,r,t){return c(e,t,"complexity-hotspots",()=>{let i=F(e,{scope:r,minLoc:10,limit:t.complexityResultLimit,scanLimit:t.candidateScanLimit,semantic:!1});return{top:i.slice(0,5).map(o=>({symbol:o.shortName,score:o.score,file:o.file})),extremeCount:i.filter(o=>o.score>Ve).length}})}function nt(e,r){let t=e.symbols>=$e||e.documents>=_e,i=r?Number.POSITIVE_INFINITY:se,o=r?Number.POSITIVE_INFINITY:Fe;return!t||r?{candidateScanLimit:void 0,candidateResultLimit:i,complexityResultLimit:o,releaseCachesBetweenPhases:!0,warnings:r&&t?["Large index detected; running health without candidate scan or result caps because --full was supplied."]:[]}:{candidateScanLimit:ae,candidateResultLimit:i,complexityResultLimit:o,releaseCachesBetweenPhases:!0,warnings:[`Large index detected; candidate-style health checks scanned their highest-priority ${ae} symbols and reported their top ${se} findings. Run "scip-query health --full" for unbounded candidate counts.`]}}function at(e,r){r.releaseCachesBetweenPhases&&(A(e),k())}function c(e,r,t,i){st(t);try{return i()}finally{at(e,r)}}function pe(e,r,t,i){return c(e,r,t,()=>w(i()))}function st(e){process.env.SCIP_QUERY_HEALTH_TRACE==="1"&&console.error(`[health] ${e}`)}function ct(e,r){return r.filter(t=>!D(e,t.relativePath)&&!E(e,t.symbol,t.relativePath)&&t.kind==="dead-code")}function ut(e,r){return r.filter(t=>!D(e,t.relativePath)&&!E(e,t.symbol,t.relativePath))}function w(e){let r=new Set;for(let t of e){let i=t.relativePath??t.file;i&&r.add(i)}return{count:e.length,loc:e.reduce((t,i)=>t+i.loc,0),files:[...r]}}function lt(e){let r=new Map;for(let t of e)r.set(t.file,Math.max(r.get(t.file)??0,t.loc));return{count:r.size,loc:[...r.values()].reduce((t,i)=>t+i,0),files:[...r.keys()]}}function T(e){let r=new Map;for(let t of e)r.set(t.fileA,Math.max(r.get(t.fileA)??0,t.locA)),r.set(t.fileB,Math.max(r.get(t.fileB)??0,t.locB));return{count:e.length,loc:[...r.values()].reduce((t,i)=>t+i,0),files:[...r.keys()]}}function me(e,r){return{...T(e),scoreCount:mt(e.reduce((i,o)=>i+r(o),0))}}function dt(e){let r=e.sharedHooks.length>0,t=he({namedState:e.sharedState,requests:e.sharedRequests,lifecycle:e.sharedEffects,functions:e.sharedHandlers});return r&&t<=2?0:r?.5:ge(e.sharedState,e.sharedHandlers,e.sharedHandlerVerbs)?.25:t>=2?1:.5}function pt(e){let r=e.sharedComposables.length+e.sharedStores.length>0,t=he({namedState:e.sharedBindings,requests:e.sharedRequests,lifecycle:e.sharedLifecycle,functions:e.sharedFunctions});return r&&t<=2?0:r?.5:ge(e.sharedBindings,e.sharedFunctions,e.sharedFunctionVerbs)?.25:t>=2?1:.5}function he(e){return e.requests.length*2+e.lifecycle.length+e.namedState.filter(r=>!Ce.has(fe(r))).length+Math.min(e.functions.length,3)}function ge(e,r,t){let i=[...e,...r,...t].map(fe);return i.length>0&&i.every(o=>Ce.has(o))}function fe(e){return e.replace(/^handle/,"").replace(/^is/,"").replace(/^has/,"").toLowerCase()}function mt(e){return Math.round(e*100)/100}var Ce=new Set(["add","apply","cancel","change","clear","close","create","delete","draft","edit","error","filter","form","load","loading","name","open","refresh","remove","reset","save","saving","search","select","selected","submit","toggle","update","value"]);export{Ie as a,Ot as b,qt as c,Ut as d};
|
|
2
|
-
//# sourceMappingURL=chunk-DBIG4QAJ.js.map
|
package/dist/chunk-DMLPJ75B.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as d,c as f,e as u,s as p}from"./chunk-64LH2QUP.js";var m={0:"UnspecifiedKind",1:"AbstractMethod",2:"Accessor",3:"Array",4:"Assertion",5:"AssociatedType",6:"Attribute",7:"Axiom",8:"Boolean",9:"Class",10:"Constant",11:"Constructor",12:"Contract",13:"DataFamily",14:"DefinitionMacro",15:"Delegate",16:"Enum",17:"EnumMember",18:"Error",19:"Event",20:"Fact",21:"Field",22:"File",23:"Function",24:"Getter",25:"Grammar",26:"Instance",27:"Interface",28:"Key",29:"Lang",30:"Lemma",31:"Library",32:"Macro",33:"Method",34:"MethodAlias",35:"MethodReceiver",36:"MethodSpecification",37:"Message",38:"Modifier",39:"Module",40:"Namespace",41:"Null",42:"Number",43:"Object",44:"Operator",45:"Package",46:"PackageObject",47:"Parameter",48:"ParameterLabel",49:"Pattern",50:"Predicate",51:"Property",52:"Protocol",53:"ProtocolMethod",54:"PureVirtualMethod",55:"Quasiquoter",56:"SelfParameter",57:"Setter",58:"Signature",59:"SingletonClass",60:"SingletonMethod",61:"StaticDataMember",62:"StaticEvent",63:"StaticField",64:"StaticMethod",65:"StaticProperty",66:"StaticVariable",67:"String",68:"Struct",69:"Subscript",70:"Tactic",71:"Theorem",72:"ThisParameter",73:"Trait",74:"TraitMethod",75:"Type",76:"TypeAlias",77:"TypeClass",78:"TypeClassMethod",79:"TypeFamily",80:"TypeParameter",81:"Union",82:"Value",83:"Variable"},c=new Map;for(let[e,i]of Object.entries(m))c.set(i.toLowerCase(),Number(e));function y(e){let i=parseInt(e,10);if(!isNaN(i))return i;let s=e.toLowerCase(),n=c.get(s);if(n!==void 0)return n;for(let[r,o]of c)if(r.includes(s))return o;return null}function K(e,i,s={}){let{scope:n,limit:r=100}=s,o=y(i);return o===null?[]:b(e,n).map(t=>({row:t,resolvedKind:g(t)})).filter(t=>t.resolvedKind===o).slice(0,r).map(({row:t,resolvedKind:l})=>({symbol:t.symbol,shortName:f(t.symbol),kind:l,kindName:m[l]??"Unknown",relativePath:t.relative_path,startLine:t.start_line,endLine:t.end_line}))}function P(e,i={}){let s=new Map;for(let n of b(e,i.scope)){let r=g(n);r===null||r===0||s.set(r,(s.get(r)??0)+1)}return[...s.entries()].sort((n,r)=>r[1]-n[1]||n[0]-r[0]).map(([n,r])=>({kind:n,kindName:m[n]??"Unknown",count:r}))}function b(e,i){return p(e,{scope:i}).map(S)}function S(e){return{symbol:e.symbol,kind:e.kind,documentation:e.documentation,enclosing_symbol:e.enclosingSymbol,relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine}}function g(e){return e.kind!==null&&e.kind!==0?h(e.kind,e.symbol,e.documentation):k(e.symbol,e.documentation,e.enclosing_symbol)}function h(e,i,s){let n=(s??"").toLowerCase();if(u(i)==="type"){if(n.includes("type "))return 76;if(n.includes("interface "))return 27;if(n.includes("struct "))return 68;if(n.includes("trait "))return 73;if(n.includes("class "))return 9}return e}function k(e,i,s){let n=d(e);if("kind"in n)return null;let r=n.descriptors,o=r[r.length-2]??null,a=u(e),t=(i??"").toLowerCase();return a==="type"?t.includes("type ")?76:t.includes("interface ")?27:t.includes("struct ")?68:t.includes("trait ")?73:(t.includes("class "),9):a==="method"?o?.suffix==="type"?33:23:a==="namespace"?39:a!=="term"?null:t.includes("async def ")||t.includes("def ")?23:(s?u(s):o?.suffix??null)==="type"?21:83}export{K as a,P as b};
|
|
2
|
-
//# sourceMappingURL=chunk-DMLPJ75B.js.map
|
package/dist/chunk-DTERBKUE.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a as D,b as L}from"./chunk-PNN3D4BE.js";import{a as M}from"./chunk-5BZOSICN.js";import{a as F}from"./chunk-B75HZHUP.js";import{a as C}from"./chunk-W3PQRAI4.js";import{a as I}from"./chunk-BGBBVSH4.js";import{a as b}from"./chunk-SA6B3EGD.js";import{c as m,d,j as p,w as g}from"./chunk-64LH2QUP.js";import{basename as u,extname as f}from"path";function q(t,n){let{scope:e,maxLoc:r=15,limit:o=30,scanLimit:a}=n??{},i=new C(t),s=k(i.fileDependencyGraph(e));return M({candidates:()=>x(i,e,r),orderCandidates:F,scanLimit:a,prepare:l=>({callerFileMap:D(i,l,{semantic:n?.semantic!==!1}),reverseFanIn:s}),evaluate:(l,c)=>h(t,i,l,c),orderResults:(l,c)=>c.callerFanIn-l.callerFanIn||c.loc-l.loc,limit:o})}function h(t,n,e,r){let o=S(t,n,e,r.callerFileMap);if(o.length!==1)return null;let a=o[0],i=y(t,e.symbolId,a);if(!i)return null;let s=v(n,t,a,e.symbol,i);if(s&&p(s.symbol))return null;let{fanIn:l,source:c}=P(r.callerFileMap,r.reverseFanIn,a,s);return(c==="function"?l<=3:l<=5)?null:{symbol:e.symbol,shortName:m(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:I(e),singleCaller:s?.symbol??"",singleCallerShort:s?.isFunctionLike?m(s.symbol):u(a),callerFanIn:l}}function x(t,n,e){return t.productionCallableDefinitions({scope:n,minLoc:2,maxLoc:e,requireFunctionLikeSymbol:!0,excludeRootedSymbols:!0})}function S(t,n,e,r){let o=u(e.relativePath,f(e.relativePath)),a=[...r.get(e.symbolId)??[]].filter(i=>i!==e.relativePath).filter(i=>u(i,f(i))!==o).filter(i=>{let s=n.fileKind(i);return s!=="barrel"&&s!=="entry"&&s!=="test"});return L(t,e,a).realConsumers}function y(t,n,e){return t.get(`SELECT c.start_line, c.end_line
|
|
2
|
-
FROM mentions m
|
|
3
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
4
|
-
JOIN documents d ON c.document_id = d.id
|
|
5
|
-
WHERE m.symbol_id = ? AND m.role != 1 AND d.relative_path = ?
|
|
6
|
-
LIMIT 1`,n,e)}function v(t,n,e,r,o){let a=t.definitionsForFile(e),i=_(n,e,r,o.start_line,o.end_line);return g(a,i)}function P(t,n,e,r){if(r?.isFunctionLike){let o=[...t.get(r.symbolId)??[]].filter(a=>a!==r.relativePath);if(o.length>0)return{fanIn:o.length,source:"function"}}return{fanIn:N(n,e),source:"file"}}function _(t,n,e,r,o){let a=d(e);if(!a)return r;let i=b(t,n).get(a);if(!i||i.length===0)return r;for(let s of i)if(s>=r&&s<=o)return s;return r}function k(t){let n=new Map;for(let[e,r]of t){n.has(e)||n.set(e,n.get(e)??0);for(let o of r)n.set(o,(n.get(o)??0)+1)}return n}function N(t,n){let e=t.get(n)??0;if(e>0)return e;let r=u(n,f(n)),o=0;for(let[a,i]of t)a!==n&&u(a,f(a))===r&&i>o&&(o=i);return o}export{q as a};
|
|
7
|
-
//# sourceMappingURL=chunk-DTERBKUE.js.map
|
package/dist/chunk-F4PKYBQB.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b}from"./chunk-QOFKVNFE.js";import{l as d,u as f}from"./chunk-64LH2QUP.js";function S(a,g){let p=b(a,g),i=f(a,p,{sort:!0});if(i.length===0)return[];let o=i.map(e=>({symbol:e.symbol,shortName:e.shortName,startLine:e.startLine,endLine:e.endLine,signature:e.signature,children:[]})),s=new Map;for(let e of o)s.set(e.symbol,e);let c=[];for(let e=0;e<i.length;e++){let r=i[e],n=o[e];if(r.enclosingSymbol&&s.has(r.enclosingSymbol)){s.get(r.enclosingSymbol).children.push(n);continue}let l=null,m=1/0;for(let t of o)if(t!==n&&t.startLine<=n.startLine&&t.endLine>=n.endLine){if(t.startLine===n.startLine&&t.endLine===n.endLine&&!d(t.symbol,n.symbol))continue;let u=t.endLine-t.startLine;u<m&&(m=u,l=t)}l?l.children.push(n):c.push(n)}return c}export{S as a};
|
|
2
|
-
//# sourceMappingURL=chunk-F4PKYBQB.js.map
|
package/dist/chunk-JTRY2YRJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e as m}from"./chunk-HCQ7J2N5.js";function v(e,s={}){let{minComponentLines:i=300,minFileLines:o=800,minJsxTokens:a=80,minBehaviorTokens:u=40,limit:c=20,scope:l,scanLimit:L,filePattern:t}=s;return m(e,{scope:l,scanLimit:L}).filter(n=>n.kind==="component").filter(n=>!t||n.file.includes(t)||n.name.includes(t)).map(n=>p(n,{minComponentLines:i,minFileLines:o,minJsxTokens:a,minBehaviorTokens:u})).filter(n=>n!==null).sort((n,r)=>r.componentLines-n.componentLines||r.fileLines-n.fileLines||n.file.localeCompare(r.file)).slice(0,c)}function p(e,s){let i=[];e.loc>=s.minComponentLines&&i.push(`${e.loc} component line(s)`);let o=Math.max(80,Math.floor(s.minComponentLines/2));return e.fileLines>=s.minFileLines&&e.loc>=o&&i.push(`${e.fileLines} file line(s)`),e.jsxTokens.size>=s.minJsxTokens&&i.push(`${e.jsxTokens.size} JSX structure token(s)`),e.behaviorTokens.size>=s.minBehaviorTokens&&i.push(`${e.behaviorTokens.size} behavior token(s)`),i.length===0?null:{file:e.file,component:e.name,componentLines:e.loc,fileLines:e.fileLines,jsxTokens:e.jsxTokens.size,behaviorTokens:e.behaviorTokens.size,dominantPressure:b(e),reasons:i,loc:e.loc}}function b(e){let s=[{axis:"component",value:e.loc},{axis:"file",value:e.fileLines},{axis:"jsx-structure",value:e.jsxTokens.size*3},{axis:"hook-behavior",value:e.behaviorTokens.size*4}];return s.sort((i,o)=>o.value-i.value),s[0]?.axis??"component"}export{v as a};
|
|
2
|
-
//# sourceMappingURL=chunk-JTRY2YRJ.js.map
|
package/dist/chunk-L77GXANO.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./chunk-5D3BT4B4.js";import{a as S}from"./chunk-T67R7V5I.js";import{c as g}from"./chunk-TMS4JPWY.js";import{d as f}from"./chunk-BJ7OHKB5.js";import{existsSync as x,readFileSync as w,readdirSync as E}from"fs";import{join as h}from"path";var $={files:new Set,pathPrefixes:[]},p=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,v=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,_=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],D=f("package-surface",{clearGroups:["whole-project"]});function T(t){return D.get(t,()=>F(t.config.projectRoot))}function m(t,r){let e=T(t);return e.files.has(r)?!0:e.pathPrefixes.some(s=>r.startsWith(s))}function F(t){let r=O(t);if(!r)return $;let e=new Set,s=[];for(let n of N(r))R(t,n,e,s);return{files:e,pathPrefixes:s}}function O(t){try{let r=w(h(t,"package.json"),"utf-8"),e=JSON.parse(r);return e&&typeof e=="object"?e:null}catch{return null}}function N(t){let r=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&r.push(t[s]);let e=t.bin;if(typeof e=="string")r.push(e);else if(e&&typeof e=="object")for(let s of Object.values(e))typeof s=="string"&&r.push(s);return y(t.exports,r),r}function y(t,r){if(typeof t=="string"){r.push(t);return}if(!(!t||typeof t!="object"))for(let e of Object.values(t))y(e,r)}function R(t,r,e,s){let n=r.replace(/\\/g,"/").replace(/^\.\//,"");if(n===""||n.startsWith(".."))return;let i=n.indexOf("*");if(i>=0){let u=n.slice(0,i);for(let c of d(u))c!==""&&s.push(c);return}let o=n.replace(v,"");for(let u of d(o)){u===o&&u===n&&e.add(n);for(let c of _)W(t,e,u+c)}e.add(n)}function d(t){let r=[t];return p.test(t)&&(r.push(t.replace(p,"src/")),r.push(t.replace(p,""))),r}function W(t,r,e){if(r.add(e),!e.startsWith("src/")||x(h(t,e)))return;let s=_.find(c=>e.endsWith(c));if(!s)return;let n=e.slice(0,-s.length),i=n.lastIndexOf("/");if(i<=4)return;let o=n.slice(0,i),u=n.slice(i+1);for(let c of j(t,o,`${u}${s}`))r.add(c)}function j(t,r,e){let s=h(t,r);if(!x(s))return[];let n=[];for(let i of E(s,{withFileTypes:!0})){let o=`${r}/${i.name}`;i.isDirectory()?n.push(...j(t,o,e)):i.isFile()&&i.name===e&&n.push(o)}return n}function l(t){let r=a(t);return L(r)?"test":V(r)?"worker":G(r)?"entry":M(r)?"barrel":"source"}function B(t){return l(t)==="barrel"}function k(t){return C.get(t,()=>{let r=b(t),e=g(t).filter(i=>{let o=l(i);return o==="entry"||o==="worker"}),s=new Set,n=new Set;for(;e.length>0;){let i=e.shift();if(!s.has(i)){s.add(i),l(i)==="barrel"&&n.add(i);for(let o of r.get(i)??[])s.has(o)||e.push(o)}}return n})}var C=f("live-barrels",{clearGroups:["whole-project"]});function I(t,r){return k(t).has(a(r))}function tt(t){let r=k(t);return g(t).filter(e=>B(e)&&!r.has(e)&&!A(t,e))}function A(t,r){let e=a(r),s=S(t,e)?.callables;return s&&s.length>0?!0:(t.get(`SELECT COUNT(*) AS n
|
|
2
|
-
FROM defn_enclosing_ranges der
|
|
3
|
-
JOIN documents d ON d.id = der.document_id
|
|
4
|
-
WHERE d.relative_path = ?
|
|
5
|
-
AND der.end_line - der.start_line >= 2`,e)?.n??0)>0}function et(t,r){let e=l(r);return e==="entry"||e==="worker"||I(t,r)}function rt(t,r,e){let s=a(e);if(m(t,s))return!0;let n=t.config.entryRoots;return n?!!(n.files?.some(i=>a(i)===s)||n.pathPrefixes?.some(i=>s.startsWith(a(i)))||n.qualifiedVars?.some(i=>U(r,i))||n.symbolPatterns?.some(i=>{try{return new RegExp(i).test(r)}catch{return!1}})):!1}function L(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function V(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function G(t){let r=t.split("/"),e=r[r.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:r.length<=2:!1}function M(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}function a(t){return t.replace(/\\/g,"/")}function U(t,r){let e=r.lastIndexOf("/");if(e<0)return!1;let s=r.slice(0,e),n=r.slice(e+1);return t.includes(P(s)+"/")&&t.includes(P(n)+".")}function P(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{l as a,B as b,I as c,tt as d,et as e,rt as f};
|
|
6
|
-
//# sourceMappingURL=chunk-L77GXANO.js.map
|
package/dist/chunk-LT6GJ27X.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{a as N}from"./chunk-623UQCVG.js";import{a as I,b as S}from"./chunk-5ALI77D7.js";import{c as h,e as b,r as p,w as g}from"./chunk-64LH2QUP.js";function x(o,s,r={}){let{maxDepth:c=5,scope:a}=r,l=I(o,s);if(!l)return[];let u=[],f=new Set([l.symbolId]),m=new Set,t=[l];for(let e=1;e<=c&&t.length!==0;e++){let i=[];for(let y of t)for(let n of D(o,y,a)){let d=`${n.file}|${n.shortName}`;if(n.symbolId!==null){if(f.has(n.symbolId))continue;f.add(n.symbolId)}else if(m.has(d))continue;m.add(d),u.push({symbol:n.symbol,shortName:n.shortName,file:n.file,depth:e}),n.symbolId!==null&&n.symbolMatch&&i.push(n.symbolMatch)}t=i}return u.sort((e,i)=>e.depth-i.depth||e.file.localeCompare(i.file)),u}function D(o,s,r){let c=N(o,s,{limit:500}).filter(t=>!o.isIgnored(t.file)).filter(t=>!r||t.file.includes(r)),a=new Set(c.map(t=>t.file)),l=[];for(let t of M(o,s,r)){if(a.has(t))continue;let e=p(o,t),i=e.length>0?g(e,e[0].startLine):null;l.push({symbol:i?.symbol??t,file:t})}let u=[...c,...l],f=[],m=new Set;for(let t of u){let e=S(o,t.symbol);if(!e){let y=`${t.file}|${t.symbol}`;if(m.has(y))continue;m.add(y),f.push({symbolId:null,symbol:t.symbol,shortName:h(t.symbol),file:t.file,symbolMatch:null});continue}if(e.symbolId===s.symbolId||o.isIgnored(e.relativePath)||!_(e.symbol))continue;let i=`${e.symbolId}|${e.relativePath}`;m.has(i)||(m.add(i),f.push({symbolId:e.symbolId,symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,symbolMatch:e}))}return f}function M(o,s,r){let c=r?"AND consumer_d.relative_path LIKE ?":"",a=[s.symbolId,s.documentId];return r&&a.push(`%${r}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
|
|
2
|
-
FROM mentions m
|
|
3
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
4
|
-
JOIN documents consumer_d ON consumer_d.id = c.document_id
|
|
5
|
-
WHERE m.symbol_id = ?
|
|
6
|
-
AND m.role != 1
|
|
7
|
-
AND c.document_id != ?
|
|
8
|
-
${o.pathExclusionsFor("consumer_d")}
|
|
9
|
-
${c}`,...a).map(l=>l.relative_path).filter(l=>!o.isIgnored(l)))}function _(o){let s=b(o);return s==="method"||s==="type"||o.endsWith("().")}export{x as a};
|
|
10
|
-
//# sourceMappingURL=chunk-LT6GJ27X.js.map
|
package/dist/chunk-LUBKUISI.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b}from"./chunk-B75HZHUP.js";import{a as u}from"./chunk-W3PQRAI4.js";import{a as f}from"./chunk-623UQCVG.js";import{a as c}from"./chunk-44JOJLMO.js";import{c as l}from"./chunk-64LH2QUP.js";function R(o,e={}){let{limit:r=20,scope:s,minFanIn:i=2,minFanOut:n=2,scanLimit:m}=e,p=new u(o);return b(p.productionCallableDefinitions({scope:s,requireCallableSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof m=="number"&&m>0}),m).map(t=>y(o,t,e.semantic!==!1)).filter(t=>t.fanIn>=i&&t.fanOut>=n).sort((t,a)=>a.score-t.score||a.fanIn-t.fanIn).slice(0,r)}function y(o,e,r){let s=new Set(f(o,e,{limit:500,semantic:r}).map(n=>n.file)).size,i=new Set(c(o,e,{limit:500,semantic:r}).filter(n=>n.file!==e.relativePath).map(n=>`${n.symbol}|${n.file}`)).size;return{symbol:e.symbol,shortName:l(e.symbol),fanIn:s,fanOut:i,score:s*i,definedIn:e.relativePath}}export{R as a};
|
|
2
|
-
//# sourceMappingURL=chunk-LUBKUISI.js.map
|
package/dist/chunk-LVYXX7ZW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as I}from"./chunk-5IDEQEM4.js";import{a as p}from"./chunk-WWFBDM5Y.js";import{a as B}from"./chunk-RNLUCQJB.js";import{a as T}from"./chunk-R7S3UCDR.js";import{a as H}from"./chunk-24PFLKFK.js";import{a as v}from"./chunk-YIE5FZAF.js";import{a as F,b as G}from"./chunk-5VB3WU7K.js";import{b as A}from"./chunk-RYBMW2EN.js";import{b as P}from"./chunk-YISMWW66.js";import{a as k}from"./chunk-5HDYAOSF.js";import{a as b}from"./chunk-LT6GJ27X.js";import{a as D}from"./chunk-I6PTB2CM.js";import{a as w}from"./chunk-4N7LFYSD.js";function X(t,e,n={}){let o=n.impactDepth??3,r=n.sliceDepth??3,l=n.semantic,s=!z(e),a=s?I(t,e,{semantic:l}):{definitions:[],referencedBy:[]},m=s?D(t,e,{semantic:l}):null,f=s?k(t,e,{semantic:l}):null,h=s?v(t,e,{semantic:l}):null,y=s?p(t,e,{direction:"backward",maxDepth:r,semantic:l}):null,R=s?p(t,e,{direction:"forward",maxDepth:r,semantic:l}):null,d=s?b(t,e,{maxDepth:o,scope:n.scope}):[],i=w(t,e,{semantic:l}),g=F(t,e),x=G(t,e),u=T(t,e),C=B(t,e),c={symbol:a.definitions.length>0||a.referencedBy.length>0||m!==null||f!==null||h!==null||y!==null||R!==null||d.length>0,file:i!==null||g.length>0||x.length>0,module:u.files.length>0||u.symbols.length>0||C.length>0},S=[];!c.symbol&&!c.file&&!c.module&&S.push("No symbol, file, or module matched target.");let O=i?.file??a.definitions[0]?.relativePath??null;return{target:e,matched:c,history:j(t,O),trace:a,callGraph:m,complexity:f,dataflow:h,backwardSlice:y,forwardSlice:R,affected:d,changeSurface:i,deps:g,rdeps:x,system:u,surface:C,warnings:S}}function j(t,e){let n={available:!1,file:e,churn:null,coChangePartners:[],suppressionsInFile:0};if(!e)return n;let o=P(t);if(!o)return n;let r=A(t,e,{limit:5});return{available:!0,file:e,churn:o.get(e)??{changes:0,fixChanges:0,lastChangedAt:0},coChangePartners:r.findings.map(l=>({file:l.fileA===e?l.fileB:l.fileA,together:l.together,confidence:l.confidence})),suppressionsInFile:H(t).byFile.get(e)??0}}function z(t){return t.includes("/")||t.includes("\\")||/\.[A-Za-z0-9]+(?::\d+(?:-\d+)?)?$/.test(t)}export{X as a};
|
|
2
|
-
//# sourceMappingURL=chunk-LVYXX7ZW.js.map
|
package/dist/chunk-LXM7AHQG.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as h,b as F,c as w}from"./chunk-PNN3D4BE.js";import{a as M}from"./chunk-5BZOSICN.js";import{a as P}from"./chunk-W3PQRAI4.js";import{a as S,f as D}from"./chunk-L77GXANO.js";import{a as b}from"./chunk-BGBBVSH4.js";import{a as L,c as v,d as p}from"./chunk-64LH2QUP.js";import{e as I}from"./chunk-T67R7V5I.js";import{a as y}from"./chunk-YVQUQIBM.js";function ie(t,e){let{scope:n,minLoc:i=3,maxLoc:s=80,limit:r=30,includeLowConfidence:l=!1,scanLimit:a}=e??{},f=e?.semantic!==!1,o=new P(t),d=o.scopedDefinitions(n),g=V(o,n),x={high:0,medium:1,low:2};return M({candidates:()=>$(t,o,d,{minLoc:i,maxLoc:s}),orderCandidates:(c,u)=>b(u)-b(c)||c.relativePath.localeCompare(u.relativePath),scanLimit:a,prepare:c=>({consumerFileMap:A(o,c,{semantic:f}),singletonBackedClassIds:O(t,o,d,c,{semantic:f}),candidateIndex:B(c)}),evaluate:(c,u)=>{if(u.singletonBackedClassIds.has(c.symbolId))return null;let m=N(t,c,u.consumerFileMap,u.candidateIndex);if(m.transitivelyReachable||m.realConsumers.length>1||m.realConsumers.length===0&&m.barrelConsumers>0||!Z(m.definition,m.realConsumers.length,g))return null;let C=j(t,m);return!l&&C.confidence==="low"?null:C},orderResults:(c,u)=>x[c.confidence]-x[u.confidence]||u.loc-c.loc||c.file.localeCompare(u.file)||c.startLine-u.startLine,limit:r})}function $(t,e,n,i){return n.filter(s=>s.isTypeLike&&b(s)>=i.minLoc).filter(s=>b(s)<=i.maxLoc).filter(s=>!t.isIgnored(s.relativePath)).filter(s=>S(s.relativePath)!=="test").filter(s=>!D(t,s.symbol,s.relativePath)).filter(s=>!H(s.symbol)).filter(s=>!e.hasSuppressionComment(s))}function A(t,e,n){return h(t,e,{semantic:n.semantic})}function B(t){let e=new Map;for(let n of t){let i=e.get(n.relativePath);i||(i=new Map,e.set(n.relativePath,i));let s=p(n.symbol);s&&i.set(s,n)}return e}function N(t,e,n,i){let r=[...n.get(e.symbolId)??new Set].filter(d=>d!==e.relativePath&&!t.isIgnored(d)),{realConsumers:l,barrelConsumers:a,importOnlyConsumers:f}=F(t,e,r),o=_(t,e,n,i);return{definition:e,realConsumers:l,barrelConsumers:a+f,transitivelyReachable:o}}function j(t,e){let n=k(t,e.definition.relativePath,e.definition.startLine),i=T(e.definition.relativePath)?!0:q(t,e.definition),{confidence:s,reason:r}=G(e.realConsumers.length,n,i);return{symbol:e.definition.symbol,shortName:v(e.definition.symbol),file:e.definition.relativePath,startLine:e.definition.startLine,endLine:e.definition.endLine,loc:b(e.definition),consumers:e.realConsumers.length,barrelConsumers:e.barrelConsumers,kind:n,definerUsesType:i,confidence:s,reason:r}}function O(t,e,n,i,s){let r=W(t,U(n),i),l=r.map(o=>o.singleton);if(r.length===0)return new Set;let a=h(e,l,{semantic:s.semantic}),f=new Set;for(let{singleton:o,classId:d}of r)E(t,o,a)&&f.add(d);return f}function U(t){let e=new Map;for(let n of t){let i=p(n.symbol);i&&e.set(R(n.relativePath,i),n)}return e}function W(t,e,n){let i=[];for(let s of n){let r=z(t,e,s);r&&i.push({singleton:r,classId:s.symbolId})}return i}function z(t,e,n){if(k(t,n.relativePath,n.startLine)!=="class")return null;let i=p(n.symbol);if(!i)return null;let s=K(t,n.relativePath,i);return s?e.get(R(n.relativePath,s))??null:null}function E(t,e,n){let i=p(e.symbol),s=n.get(e.symbolId);return!i||!s?!1:[...s].some(r=>r!==e.relativePath&&!t.isIgnored(r)&&!w(t,r,i))}function R(t,e){return`${t}\0${e}`}function K(t,e,n){let i=y(t,e);if(!i)return null;let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\bexport\\s+const\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*new\\s+${s}\\s*\\(`);return i.match(r)?.[1]??null}function V(t,e){return new Set(t.scopedDefinitions(e).filter(n=>n.isFunctionLike).map(n=>n.relativePath))}function H(t){let e=L(t);if("kind"in e)return!1;let n=e.descriptors;if(n.length<2)return!1;let i=n[n.length-1],s=n[n.length-2];return i?.suffix==="type"&&s?.suffix==="type"}function T(t){let n=(t.split("/").pop()??"").replace(/\.[^.]+$/,"");return!!(n==="types"||n.endsWith("-types")||n==="models"||n==="schema"||n==="common"||n==="protocol"||n==="proto"||n==="dto"||n==="mod"||n==="contracts"||/(^|\/)types(\/|\.)/.test(t)||/(^|\/)models?(\/|\.)/.test(t)||/(^|\/)proto(?:col)?(\/|\.)/.test(t)||/(^|\/)schema(\/|\.)/.test(t)||/(^|\/)contracts?(\/|\.)/.test(t))}function Z(t,e,n){return!(T(t.relativePath)&&e>0||e===0&&n.has(t.relativePath))}function _(t,e,n,i){let s=I(t,e.relativePath),r=p(e.symbol);if(!r)return!1;let l=s.get(r);if(!l||l.size===0)return!1;let a=i.get(e.relativePath);if(!a)return!1;for(let f of l){let o=a.get(f);if(!o)continue;let d=n.get(o.symbolId);if(d){for(let g of d)if(g!==e.relativePath&&!t.isIgnored(g))return!0}}return!1}function k(t,e,n){let i=y(t,e);if(!i)return"other";let s=i.split(`
|
|
2
|
-
`),r=Math.max(0,n-2),l=Math.min(s.length-1,n+2);for(let a=r;a<=l;a++){let o=(s[a]??"").replace(/^\s*\/\/.*$/g,"");if(/\b(?:export\s+)?(?:abstract\s+)?class\s+\w/.test(o))return"class";if(/\b(?:export\s+)?interface\s+\w/.test(o))return"interface";if(/\b(?:export\s+)?type\s+\w/.test(o))return"type";if(/\b(?:export\s+)?(?:const\s+)?enum\s+\w/.test(o))return"enum"}return"other"}function q(t,e){let n=y(t,e.relativePath);if(!n)return!1;let i=p(e.symbol);if(!i)return!1;let s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\b${s}\\b`),l=n.split(`
|
|
3
|
-
`);for(let a=0;a<l.length;a++)if(!(a>=e.startLine&&a<=e.endLine)&&r.test(l[a]??""))return!0;return!1}function G(t,e,n){return t===0?{confidence:"high",reason:"unused \u2014 no consumers and defining file has no real usage"}:t===1&&e==="class"?{confidence:"low",reason:"1 consumer + class kind \u2014 likely 1:1 encapsulation, not over-abstraction"}:t===1&&!n?{confidence:"high",reason:"1 consumer + defining file never uses it \u2014 type belongs with its consumer"}:{confidence:"medium",reason:"1 consumer \u2014 single-use abstraction"}}export{ie as a};
|
|
4
|
-
//# sourceMappingURL=chunk-LXM7AHQG.js.map
|
package/dist/chunk-LY6NRJPJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as H}from"./chunk-CFLYMEUS.js";import{a as f,b as m,c as R}from"./chunk-UIWAZ2NT.js";import{e as p}from"./chunk-HCQ7J2N5.js";function A(e,s={}){let{minSimilarity:o=.45,minSharedBehaviors:i=6,limit:n=20,scope:a,scanLimit:l,filePattern:h}=s,d=p(e,{scope:a,minBehaviorTokens:Math.max(3,i),scanLimit:l}).map(t=>({file:t.file,component:t.name,tokens:t.behaviorTokens,profile:t}));return H({profiles:d,limit:n,filePattern:h,compare:(t,r)=>B(t,r,o,i),sort:(t,r)=>r.similarity-t.similarity||t.fileA.localeCompare(r.fileA)||t.componentA.localeCompare(r.componentA)||t.fileB.localeCompare(r.fileB)||t.componentB.localeCompare(r.componentB)})}function B(e,s,o,i){let n=f(e.tokens,s.tokens);if(n.size<i||!y(n))return null;let a=v(e.tokens,s.tokens);if(a<o)return null;let l=c(n,"hook:"),h=c(n,"react-hook:"),d=c(n,"effect:"),t=c(n,"state:"),r=c(n,"request:"),g=c(n,"handler:"),k=c(n,"handler-verb:");return{fileA:e.file,componentA:e.component,fileB:s.file,componentB:s.component,similarity:a,sharedTokens:u(n),sharedHooks:l,sharedReactHooks:h,sharedEffects:d,sharedState:t,sharedRequests:r,sharedHandlers:g,sharedHandlerVerbs:k,uniqueToA:u(m(e.tokens,s.tokens)).slice(0,25),uniqueToB:u(m(s.tokens,e.tokens)).slice(0,25),reason:S({sharedHooks:l,sharedReactHooks:h,sharedEffects:d,sharedState:t,sharedRequests:r,sharedHandlers:g,sharedHandlerVerbs:k}),locA:e.profile.loc,locB:s.profile.loc}}function v(e,s){if(e.size===0||s.size===0)return 0;let i=f(e,s).size/Math.min(e.size,s.size);return Math.max(R(e,s),i)}function y(e){let s=0,o=0,i=0,n=0,a=0,l=0,h=0;for(let r of e)r.startsWith("hook:")?s+=1:r.startsWith("react-hook:")?o+=1:r.startsWith("effect:")?i+=1:r.startsWith("request:")?n+=1:r.startsWith("handler:")||r.startsWith("handler-verb:")?a+=1:r.startsWith("state:")?l+=1:r.startsWith("state-hook:")&&(h+=1);let d=l+h,t=s+o+i+n+a+d;return n>=1&&t>=4||s>=1&&(n>=1||l>=1||a>=2)&&t>=5||l>=1&&a>=2&&(i>=1||o>=2)&&t>=5}function S(e){let s=[];return e.sharedHooks.length&&s.push(`shared hooks: ${e.sharedHooks.join(", ")}`),e.sharedReactHooks.length&&s.push(`shared React hooks: ${e.sharedReactHooks.join(", ")}`),e.sharedEffects.length&&s.push(`shared effects: ${e.sharedEffects.join(", ")}`),e.sharedState.length&&s.push(`shared state: ${e.sharedState.join(", ")}`),e.sharedRequests.length&&s.push(`shared requests: ${e.sharedRequests.join(", ")}`),e.sharedHandlers.length&&s.push(`shared handlers: ${e.sharedHandlers.slice(0,6).join(", ")}`),e.sharedHandlerVerbs.length&&s.push(`shared action verbs: ${e.sharedHandlerVerbs.slice(0,6).join(", ")}`),s.join("; ")||"shared React behavior profile"}function c(e,s){return[...e].filter(o=>o.startsWith(s)).map(o=>o.slice(s.length)).sort()}function u(e){return[...e].sort()}export{A as a};
|
|
2
|
-
//# sourceMappingURL=chunk-LY6NRJPJ.js.map
|
package/dist/chunk-N2T2GPYQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as B}from"./chunk-CFLYMEUS.js";import{a as d,b as f,c as y}from"./chunk-UIWAZ2NT.js";import{c as b}from"./chunk-XGGTESMN.js";function T(e,i={}){let{minSimilarity:n=.45,minSharedBehaviors:o=6,limit:s=20,scope:a,scanLimit:h,filePattern:c}=i,u=b(e,{scope:a,minBehaviorTokens:Math.max(3,o),scanLimit:h}).map(r=>({file:r.file,tokens:r.behaviorTokens,profile:r}));return B({profiles:u,limit:s,filePattern:c,compare:(r,t)=>C(r,t,n,o),sort:(r,t)=>t.similarity-r.similarity||r.fileA.localeCompare(t.fileA)||r.fileB.localeCompare(t.fileB)})}function C(e,i,n,o){let s=d(e.tokens,i.tokens);if(s.size<o||!S(s))return null;let a=P(e.tokens,i.tokens);if(a<n)return null;let h=l(s,"composable:"),c=l(s,"store:"),u=l(s,"reactivity:"),r=l(s,"lifecycle:"),t=l(s,"request:"),g=l(s,"function:"),p=l(s,"function-verb:"),v=l(s,"template-binding:"),k=l(s,"template-event:");return{fileA:e.file,fileB:i.file,similarity:a,sharedTokens:m(s),sharedComposables:h,sharedStores:c,sharedReactivity:u,sharedLifecycle:r,sharedRequests:t,sharedFunctions:g,sharedFunctionVerbs:p,sharedBindings:v,sharedTemplateEvents:k,uniqueToA:m(f(e.tokens,i.tokens)).slice(0,25),uniqueToB:m(f(i.tokens,e.tokens)).slice(0,25),reason:V({sharedComposables:h,sharedStores:c,sharedRequests:t,sharedLifecycle:r,sharedFunctions:g,sharedFunctionVerbs:p,sharedBindings:v}),locA:e.profile.totalLines,locB:i.profile.totalLines}}function P(e,i){if(e.size===0||i.size===0)return 0;let o=d(e,i).size/Math.min(e.size,i.size);return Math.max(y(e,i),o)}function S(e){let i=0,n=0,o=0,s=0,a=0,h=0,c=0;for(let t of e)t.startsWith("composable:")?i+=1:t.startsWith("store:")?n+=1:t.startsWith("request:")?o+=1:t.startsWith("lifecycle:")?s+=1:t.startsWith("function:")?a+=1:t.startsWith("reactivity:")?h+=1:(t.startsWith("function-verb:")||t.startsWith("template-binding:")||t.startsWith("template-event:"))&&(c+=1);let u=i+n,r=u+o+s+a+c;return o>=1&&r>=4||s>=1&&a>=2&&r>=4||u>=2&&(o>=1||a>=2)&&r>=5||a>=2&&h>=1&&r>=4}function V(e){let i=[];return e.sharedComposables.length&&i.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&i.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&i.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&i.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&i.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&i.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&i.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),i.join("; ")||"shared Vue behavior profile"}function l(e,i){return[...e].filter(n=>n.startsWith(i)).map(n=>n.slice(i.length)).sort()}function m(e){return[...e].sort()}export{T as a};
|
|
2
|
-
//# sourceMappingURL=chunk-N2T2GPYQ.js.map
|
package/dist/chunk-OB6PEVI3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./chunk-N2T2GPYQ.js";import{a as A}from"./chunk-TUAPDKBI.js";import{a as h}from"./chunk-LY6NRJPJ.js";import{a as y}from"./chunk-HQHFMPLJ.js";import{b as f}from"./chunk-TTGWDUJ4.js";import{e as b}from"./chunk-YISMWW66.js";var p=.7,C=.62,g=.45;function H(i,n={}){let{windowCommits:e=100,limit:t=30,scope:l,scanLimit:s}=n,a=b(i);if(!a)return{available:!1,windowCommits:e,findings:[]};if(t<=0)return{available:!0,windowCommits:e,findings:[]};let d=v(i,{limit:t,minSimilarity:n.minSimilarity,scanLimit:s,scope:l,semantic:n.semantic}).map(m=>E(m,a,e)).filter(m=>m!==null);return d.sort((m,o)=>(m.kind===o.kind?0:m.kind==="echo"?-1:1)||o.similarity-m.similarity||m.echoFile.localeCompare(o.echoFile)||m.echoSymbol.localeCompare(o.echoSymbol)||m.domain.localeCompare(o.domain)),{available:!0,windowCommits:e,findings:d.slice(0,t)}}function v(i,n){let e=I(n.limit);return[...B(i,{scope:n.scope,minSimilarity:n.minSimilarity??p,limit:e,scanLimit:n.scanLimit,semantic:n.semantic}),...D(i,{scope:n.scope,minSimilarity:n.minSimilarity??C,limit:e,scanLimit:n.scanLimit}),...R(i,{scope:n.scope,minSimilarity:n.minSimilarity??g,limit:e,scanLimit:n.scanLimit}),...L(i,{scope:n.scope,minSimilarity:n.minSimilarity??C,limit:e,scanLimit:n.scanLimit}),...F(i,{scope:n.scope,minSimilarity:n.minSimilarity??g,limit:e,scanLimit:n.scanLimit})]}function B(i,n){return f(i,{scope:n.scope,minSimilarity:n.minSimilarity,limit:n.limit,crossFileOnly:!0,scanLimit:n.scanLimit,semantic:n.semantic}).map(e=>({domain:"callable",basis:e.similarityBasis??"callees",symbolA:e.shortNameA,fileA:e.fileA,symbolB:e.shortNameB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:e.sharedCallees,sharedCallees:e.sharedCallees}))}function D(i,n){return y(i,{scope:n.scope,minSimilarity:n.minSimilarity,limit:n.limit,scanLimit:n.scanLimit}).filter(e=>e.fileA!==e.fileB).map(e=>({domain:"react-component",basis:"jsx-structure",symbolA:e.componentA,fileA:e.fileA,symbolB:e.componentB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:u(["component",e.sharedComponents],["tag",e.sharedNativeTags],["prop",e.sharedProps],["event",e.sharedEvents],["binding",e.sharedBindings]),sharedCallees:[]}))}function R(i,n){return h(i,{scope:n.scope,minSimilarity:n.minSimilarity,limit:n.limit,scanLimit:n.scanLimit}).filter(e=>e.fileA!==e.fileB).map(e=>({domain:"react-hook",basis:"react-behavior",symbolA:e.componentA,fileA:e.fileA,symbolB:e.componentB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:u(["hook",e.sharedHooks],["react-hook",e.sharedReactHooks],["effect",e.sharedEffects],["state",e.sharedState],["request",e.sharedRequests],["handler",e.sharedHandlers],["action",e.sharedHandlerVerbs]),sharedCallees:[]}))}function L(i,n){return A(i,{scope:n.scope,minSimilarity:n.minSimilarity,limit:n.limit,scanLimit:n.scanLimit}).filter(e=>e.fileA!==e.fileB).map(e=>({domain:"vue-component",basis:"vue-template",symbolA:r(e.fileA),fileA:e.fileA,symbolB:r(e.fileB),fileB:e.fileB,similarity:e.similarity,sharedEvidence:u(["component",e.sharedComponents],["prop",e.sharedProps],["event",e.sharedEvents],["directive",e.sharedDirectives],["slot",e.sharedSlots],["identifier",e.sharedIdentifiers]),sharedCallees:[]}))}function F(i,n){return S(i,{scope:n.scope,minSimilarity:n.minSimilarity,limit:n.limit,scanLimit:n.scanLimit}).filter(e=>e.fileA!==e.fileB).map(e=>({domain:"vue-composable",basis:"vue-behavior",symbolA:r(e.fileA),fileA:e.fileA,symbolB:r(e.fileB),fileB:e.fileB,similarity:e.similarity,sharedEvidence:u(["composable",e.sharedComposables],["store",e.sharedStores],["reactivity",e.sharedReactivity],["lifecycle",e.sharedLifecycle],["request",e.sharedRequests],["function",e.sharedFunctions],["action",e.sharedFunctionVerbs],["binding",e.sharedBindings],["template-event",e.sharedTemplateEvents]),sharedCallees:[]}))}function E(i,n,e){let t=n.get(i.fileA)?.commitsAgo??null,l=n.get(i.fileB)?.commitsAgo??null,s=t!==null&&t<=e,a=l!==null&&l<=e;if(!s&&!a)return null;if(s&&a){let c=(t??0)<=(l??0);return{kind:"twin",domain:i.domain,basis:i.basis,echoSymbol:c?i.symbolA:i.symbolB,echoFile:c?i.fileA:i.fileB,echoAgeCommits:(c?t:l)??0,establishedSymbol:c?i.symbolB:i.symbolA,establishedFile:c?i.fileB:i.fileA,establishedAgeCommits:c?l:t,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}return{kind:"echo",domain:i.domain,basis:i.basis,echoSymbol:s?i.symbolA:i.symbolB,echoFile:s?i.fileA:i.fileB,echoAgeCommits:(s?t:l)??0,establishedSymbol:s?i.symbolB:i.symbolA,establishedFile:s?i.fileB:i.fileA,establishedAgeCommits:s?l:t,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}function I(i){return Number.isFinite(i)?i*5:Number.POSITIVE_INFINITY}function u(...i){let n=[],e=new Set;for(let[t,l]of i)for(let s of l){let a=`${t}:${s}`;e.has(a)||(e.add(a),n.push(a))}return n}function r(i){return(i.split("/").pop()??i).replace(/\.[^.]+$/,"")}export{H as a};
|
|
2
|
-
//# sourceMappingURL=chunk-OB6PEVI3.js.map
|
package/dist/chunk-R42LZMLX.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./chunk-5BZOSICN.js";import{a as f}from"./chunk-B75HZHUP.js";import{a as c}from"./chunk-W3PQRAI4.js";import{a as u}from"./chunk-BGBBVSH4.js";import{c as a,g as l}from"./chunk-64LH2QUP.js";import{b as d}from"./chunk-T67R7V5I.js";function D(i,e){let{scope:n,maxLoc:t=15,limit:r=30,scanLimit:g}=e??{},m=new c(i);return b({candidates:()=>y(m,n,t),orderCandidates:f,scanLimit:g,prepare:o=>m.calleeMap(o,{semantic:e?.semantic!==!1}),evaluate:(o,s)=>p(i,o,s.get(o.symbolId)??[]),orderResults:(o,s)=>o.loc-s.loc||o.file.localeCompare(s.file),limit:r})}function p(i,e,n){let t=h(n);if(t.size!==1||!d(i,e.relativePath,e.startLine,e.endLine))return null;let[,r]=[...t.entries()][0];return{symbol:e.symbol,shortName:a(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:u(e),forwardsTo:r.symbol,forwardsToShort:a(r.symbol),forwardsToFile:r.file}}function h(i){let e=i.some(t=>l(t.symbol))?i.filter(t=>l(t.symbol)):i,n=new Map;for(let t of e)n.has(t.symbol)||n.set(t.symbol,t);return n}function y(i,e,n){return i.productionCallableDefinitions({scope:e,minLoc:3,maxLoc:n,requireFunctionLikeSymbol:!0,excludeRootedSymbols:!0,excludeRustTraitImplMembers:!0})}export{D as a};
|
|
2
|
-
//# sourceMappingURL=chunk-R42LZMLX.js.map
|
package/dist/chunk-RGDUIMNE.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as q}from"./chunk-LYS4SMAQ.js";import{a as g}from"./chunk-B32FX5KB.js";import{a as _}from"./chunk-DTERBKUE.js";import{a as j}from"./chunk-LXM7AHQG.js";import{a as T}from"./chunk-WZVTADY7.js";import{a as I}from"./chunk-B3HMRQDA.js";import{a as P}from"./chunk-R42LZMLX.js";import{a as B}from"./chunk-4EAANIWC.js";import{a as M}from"./chunk-A2GVUCZR.js";import{a as L,b as H}from"./chunk-TTGWDUJ4.js";import{b as x,c as N,f as A}from"./chunk-ATGRITZP.js";import{c as E}from"./chunk-2NLK4INB.js";import{a as G}from"./chunk-Y33GRQK6.js";import{b as C}from"./chunk-6U4EODW3.js";import{a as k}from"./chunk-RYBMW2EN.js";import{f as F}from"./chunk-YISMWW66.js";import{a as R}from"./chunk-E55WCTLH.js";import{a as v}from"./chunk-W3PQRAI4.js";import{e as b,f as $}from"./chunk-L77GXANO.js";import{d as D}from"./chunk-64LH2QUP.js";import{createHash as se}from"crypto";import{existsSync as z}from"fs";import{existsSync as Y,readFileSync as J,writeFileSync as V}from"fs";import{isAbsolute as Q,join as W}from"path";var X=75e3,Z=5e3,ee=2500;function ie(e){let n=T(e);return n.symbols>=X||n.documents>=Z?ee:void 0}var ne=".scipquery-baseline.json";function S(e,n){return n&&Q(n)?n:W(e.config.projectRoot,n??ne)}function O(e,n={}){let{scope:s}=n,t=ie(e),o=[],r=C(e,{scope:s,...g.dead,scanLimit:t});for(let i of r.symbols)b(e,i.relativePath)||$(e,i.symbol,i.relativePath)||i.kind==="dead-code"&&o.push(`dead:${i.relativePath}:${i.shortName}`);for(let i of I(e,{scope:s,...g.isolated,scanLimit:t}))b(e,i.relativePath)||$(e,i.symbol,i.relativePath)||o.push(`isolated:${i.relativePath}:${i.shortName}`);for(let i of R(e,{scope:s}))i.kind==="real"&&o.push(`cycle:${te(i.path)}`);for(let i of H(e,{scope:s,...g.similar,scanLimit:t}))o.push(`similar:${[i.symbolA,i.symbolB].sort().join("|")}`);for(let i of B(e,{scope:s,...g.extract,scanLimit:t}))o.push(`extract:${i.relativePath}:${i.shortName}`);for(let i of _(e,{scope:s,...g.wrappers,scanLimit:t}))o.push(`wrapper:${i.file}:${i.shortName}`);for(let i of P(e,{scope:s,...g.passthroughs,scanLimit:t}))o.push(`passthrough:${i.file}:${i.shortName}`);for(let i of j(e,{scope:s,...g.stale,scanLimit:t}))o.push(`stale:${i.file}:${i.shortName}`);for(let i of G(e,{scope:s,...g.drift}).results)i.kind!=="pattern-deviation"&&o.push(`drift:${i.kind}:${i.file}:${i.dep}`);return[...new Set(o)].sort()}function te(e){if(e.length===0)return"";let n=0;for(let s=1;s<e.length;s++)e[s]<e[n]&&(n=s);return[...e.slice(n),...e.slice(0,n)].join(">")}function Ee(e,n={}){let s=O(e,{scope:n.scope}),t=S(e,n.path);return V(t,JSON.stringify({version:1,findings:s},null,2)+`
|
|
2
|
-
`),{path:t,findingCount:s.length}}function U(e,n={}){let s=S(e,n.path);if(!Y(s))throw new Error(`No baseline found at ${s}. Create one with: scip-query health --write-baseline`);let t=JSON.parse(J(s,"utf-8")),o=new Set(t.findings??[]),r=O(e,{scope:n.scope}),i=new Set(r);return{baselinePath:s,baselineCount:o.size,current:r,newFindings:r.filter(a=>!o.has(a)),fixedFindings:[...o].filter(a=>!i.has(a))}}var Ke=["echo","incomplete-migration","co-change-partner","doc-reference","unused-params","new-dead","baseline"];function Ye(e,n={}){let s=n.base??"HEAD",{minTogether:t=6,minConfidence:o=.6,maxEchoChecks:r=Number.POSITIVE_INFINITY,maxHelpers:i=Number.POSITIVE_INFINITY,minSimilarity:a=.8}=n,d=new Set(n.skip??[]),f=N(e,{base:s}),l=x(e,{base:s,plan:f}),c=l.changedFiles,u=new Set(c),m=me(e.config.projectRoot,s,f),h={base:s,changedFiles:c,changedSymbols:l.changedSymbols.length,checksRun:[],skipped:[],suppressed:[],findings:[],note:l.summary.note};if(c.length===0)return h;let p=(w,K)=>{if(d.has(w)){h.skipped.push({check:w,reason:"skipped via --skip"});return}K()};return p("echo",()=>ae(e,l.changedSymbols,u,m,r,a,h)),p("incomplete-migration",()=>ce(e,s,f,i,h)),p("co-change-partner",()=>fe(e,u,t,o,h)),p("doc-reference",()=>le(e,u,h)),p("unused-params",()=>de(e,c,h)),p("new-dead",()=>he(e,l.changedSymbols,m,h)),p("baseline",()=>ue(e,h)),oe(h,e.config.suppressions??[]),h}function oe(e,n){if(n.length===0||e.findings.length===0)return;let s=[];for(let t of e.findings){let o=n.find(r=>re(r,t));o?e.suppressed.push({finding:t,suppression:o}):s.push(t)}e.findings=s}function re(e,n){return!e.reason||e.reason.trim()===""||e.expiresAt&&Date.parse(e.expiresAt)<=Date.now()||e.id&&e.id!==n.id||e.check&&e.check!==n.check||e.file&&e.file!==n.file?!1:!!(e.id||e.check)}function ae(e,n,s,t,o,r,i){i.checksRun.push("echo");for(let a of n.slice(0,o)){if(t(a))continue;let d=L(e,a.symbol,{minSimilarity:r,limit:3});for(let f of d){let l=f.fileA===a.file?f.fileB:f.fileA,c=f.fileA===a.file?f.shortNameB:f.shortNameA,u=f.fileA===a.file?f.symbolB:f.symbolA;if(s.has(l))continue;let m=y("echo",a.symbol,a.file,u,l);i.findings.push({id:m,check:"echo",severity:"warning",evidence:"heuristic",confidence:f.similarity,file:a.file,symbol:a.symbol,relatedFiles:[l],message:`${a.shortName} (${a.file}) is ${Math.round(f.similarity*100)}% similar to established ${c} (${l})`,why:[`${a.shortName} was changed in this diff.`,`${c} is outside this diff and scored ${Math.round(f.similarity*100)}% similar by ${f.similarityBasis??"callee"} evidence.`,`Shared evidence: ${f.sharedCallees.slice(0,5).join(", ")||"(none listed)"}.`],remediation:`Extend or reuse ${c} instead of keeping the re-implementation.`,suppressionHint:`scip-query: ignore echo ${m} -- <reason>`})}}n.length>o&&i.skipped.push({check:"echo",reason:`echo check capped at ${o} of ${n.length} changed symbols`})}function ce(e,n,s,t,o){let r=M(e,{base:n,maxHelpers:t,diffPlan:s});if(!r.available){o.skipped.push({check:"incomplete-migration",reason:"no git history"});return}o.checksRun.push("incomplete-migration"),r.note&&o.skipped.push({check:"incomplete-migration",reason:r.note});for(let i of r.findings){let a=i.leftovers.map(c=>`${c.shortName} (${c.file}, ${Math.round(c.containment*100)}%)`).join(", "),d=[...i.migratedFiles,...i.leftovers.map(c=>c.file)],f=i.leftovers.length===0?void 0:Math.max(...i.leftovers.map(c=>c.containment)),l=y("incomplete-migration",i.helperSymbol,i.helperFile,d.join("|"));o.findings.push({id:l,check:"incomplete-migration",severity:"warning",evidence:"heuristic",confidence:f,file:i.helperFile,symbol:i.helperSymbol,relatedFiles:d,message:`new helper ${i.helperShortName} (${i.helperFile}) is wired into ${i.migratedFiles.length} file(s), but ${i.leftovers.length} similar un-migrated site(s) remain: ${a}`,why:[`${i.helperShortName} is new in this diff and already referenced by ${i.migratedFiles.join(", ")}.`,`Unchanged site(s) still contain the helper's callee pattern: ${a}.`],remediation:`Migrate the remaining sites to ${i.helperShortName}, or confirm they are intentionally different.`,suppressionHint:`scip-query: ignore incomplete-migration ${l} -- <reason>`})}}function fe(e,n,s,t,o){let r=F(e,{minTogether:s,minConfidence:0,maxFilesPerCommit:20});if(!r){o.skipped.push({check:"co-change-partner",reason:"no git history"});return}o.checksRun.push("co-change-partner");let i=new Set;for(let a of r){let d=n.has(a.fileA),f=n.has(a.fileB);if(d===f)continue;let l=d?a.fileA:a.fileB,c=d?a.fileB:a.fileA,u=d?a.changesA:a.changesB,m=u>0?a.together/u:0;if(m<t||k(c)||k(l)||!z(`${e.config.projectRoot}/${c}`))continue;let h=`${l}|${c}`;if(i.has(h))continue;i.add(h);let p=y("co-change-partner",l,c,String(a.together));o.findings.push({id:p,check:"co-change-partner",severity:"warning",evidence:"change-graph",confidence:m,file:l,relatedFiles:[c],message:`${l} changed, but ${c} did not \u2014 they change together ${a.together}x (${Math.round(m*100)}% of the time)`,why:[`${l} is in this diff and ${c} is not.`,`Git history shows ${a.together} co-change(s), which is ${Math.round(m*100)}% of changes to the edited side.`],remediation:`Update ${c} alongside this change, or confirm the coupling no longer holds.`,suppressionHint:`scip-query: ignore co-change-partner ${p} -- <reason>`})}}function le(e,n,s){s.checksRun.push("doc-reference");for(let t of E(e,n)){if(n.has(t.doc))continue;let o=y("doc-reference",t.doc,t.cited.join("|"));s.findings.push({id:o,check:"doc-reference",severity:"warning",evidence:"change-graph",confidence:1,file:t.doc,relatedFiles:t.cited,message:`${t.doc} cites ${t.cited.join(", ")} \u2014 changed in this diff, doc untouched`,why:[`${t.cited.join(", ")} changed in this diff.`,`${t.doc} cites the changed file(s) but was not updated in the same diff.`],remediation:`Re-read ${t.doc} and update its claims, or update its citations.`,suppressionHint:`scip-query: ignore doc-reference ${o} -- <reason>`})}}function de(e,n,s){s.checksRun.push("unused-params");for(let t of q(e,{files:n,limit:50})){let o=y("unused-params",t.symbol,t.file,t.unusedTrailing.join("|"));s.findings.push({id:o,check:"unused-params",severity:"warning",evidence:"heuristic",confidence:.85,file:t.file,startLine:t.startLine,endLine:t.endLine,symbol:t.symbol,message:`${t.shortName} (${t.file}) has trailing unused parameter(s): ${t.unusedTrailing.join(", ")}`,why:[`${t.shortName} is in a changed file.`,`The trailing parameter(s) ${t.unusedTrailing.join(", ")} are not referenced in the function body.`],remediation:"Drop the unused trailing parameters and their call-site arguments.",suppressionHint:`scip-query: ignore unused-params ${o} -- <reason>`})}}function he(e,n,s,t){t.checksRun.push("new-dead");let o=new v(e);for(let r of n){if(s(r)||r.fanIn>0||o.fileKind(r.file)==="test"||b(e,r.file)||$(e,r.symbol,r.file))continue;let i=y("new-dead",r.symbol,r.file);t.findings.push({id:i,check:"new-dead",severity:"warning",evidence:"graph-fact",confidence:.9,file:r.file,symbol:r.symbol,message:`${r.shortName} (${r.file}) was changed but has zero indexed consumers`,why:[`${r.shortName} is a changed production symbol.`,"The index reports zero consumers for this symbol.","The symbol is not in a detected entry surface or configured live root."],remediation:"Wire it up, or remove it before it becomes permanent dead code.",suppressionHint:`scip-query: ignore new-dead ${i} -- <reason>`})}}function me(e,n,s){let t=new Map(s.renamedFiles.map(r=>[r.to,r.from])),o=new Map;return r=>{let i=t.get(r.file);if(!i)return!1;let a=D(r.symbol);if(!a)return!1;let d=o.get(i);return d===void 0&&(d=A(e,n,i),o.set(i,d)),d!==null&&pe(d,a)}}function pe(e,n){return new RegExp(`\\b${ge(n)}\\b`).test(e)}function ge(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ue(e,n){if(!z(S(e))){n.skipped.push({check:"baseline",reason:"no .scipquery-baseline.json \u2014 run health --write-baseline to enable"});return}n.checksRun.push("baseline");let s=U(e);for(let t of s.newFindings){let o=y("baseline",t);n.findings.push({id:o,check:"baseline",severity:"error",evidence:"baseline",confidence:1,message:`new finding vs committed baseline: ${t}`,why:["A committed health baseline exists.","The current health result contains a finding not present in that baseline."],remediation:"Fix the finding, or knowingly accept it via health --write-baseline.",suppressionHint:`scip-query: ignore baseline ${o} -- <reason>`})}}function y(e,...n){return`SQ${se("sha256").update([e,...n].join("\0")).digest("hex").slice(0,12).toUpperCase()}`}export{O as a,Ee as b,U as c,Ke as d,Ye as e};
|
|
3
|
-
//# sourceMappingURL=chunk-RGDUIMNE.js.map
|
package/dist/chunk-RYBMW2EN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as p,f as h}from"./chunk-YISMWW66.js";import{a as c}from"./chunk-L77GXANO.js";import{a as d}from"./chunk-5D3BT4B4.js";import{existsSync as k}from"fs";import{join as x}from"path";function z(e){return m.test(e)}var m=/(?:^|\/)(?:package-lock\.json|pnpm-lock\.yaml|yarn\.lock|Cargo\.lock|CHANGELOG(?:\.[a-z]+)?|.*\.map)$|(?:^|\/)(?:dist|build|out|node_modules|docs\/plans)\//i;function I(e,n,t={}){let{minTogether:o=4,minConfidence:s=.6,limit:a=30,maxFilesPerCommit:b=20}=t,u=p(e),r=n!==void 0,f=h(e,{minTogether:r?Math.min(o,2):o,minConfidence:r?0:s,maxFilesPerCommit:b});if(!u||!f)return{available:!1,commitsAnalyzed:0,findings:[]};let y=d(e),S=L(e),A=t.includeLinked===!0||r,l=[];for(let i of f){if(m.test(i.fileA)||m.test(i.fileB)||!C(e,i.fileA)||!C(e,i.fileB)||r&&!i.fileA.includes(n)&&!i.fileB.includes(n)||!r&&(c(i.fileA)==="test"||c(i.fileB)==="test"||F(i.fileA,i.fileB)))continue;let g=B(y,S,i.fileA,i.fileB);if(!(!A&&g)&&(l.push({...i,structurallyLinked:g}),l.length>=a))break}return{available:!0,commitsAnalyzed:u.commits.length,findings:l}}function C(e,n){return k(x(e.config.projectRoot,n))}function F(e,n){let t=e.lastIndexOf("/"),o=n.lastIndexOf("/");if(e.slice(0,t)!==n.slice(0,o))return!1;let s=e.slice(t+1).split(".")[0],a=n.slice(o+1).split(".")[0];return s!==""&&s===a}function L(e){return(e.config.declaredCouplings??[]).filter(n=>Array.isArray(n.files)&&n.files.length>=2).map(n=>new Set(n.files))}function B(e,n,t,o){return e.get(t)?.has(o)===!0||e.get(o)?.has(t)===!0?!0:n.some(s=>s.has(t)&&s.has(o))}export{z as a,I as b};
|
|
2
|
-
//# sourceMappingURL=chunk-RYBMW2EN.js.map
|
package/dist/chunk-TTGWDUJ4.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as F,b as y,e as L,f as E}from"./chunk-UIWAZ2NT.js";import{b as q}from"./chunk-B75HZHUP.js";import{a as k}from"./chunk-W3PQRAI4.js";import{a as N}from"./chunk-44JOJLMO.js";import{a as A}from"./chunk-5ALI77D7.js";import{c as b,d as I,g as w}from"./chunk-64LH2QUP.js";import{b as z}from"./chunk-YVQUQIBM.js";import{d as D}from"./chunk-BJ7OHKB5.js";function be(e,i,t={}){let{minSimilarity:n=.4,limit:s=20}=t,o=W(e,i,{semantic:t.semantic!==!1});if(!o)return[];if(!w(o.symbol))return[];let a=G(e,o,n,{scanLimit:t.scanLimit,semantic:t.semantic!==!1});return a.length>0?a.slice(0,s):Q(e,i,{minSimilarity:n,limit:s})}function G(e,i,t,n){let s=T(e,{minCallees:3,excludeSymbol:i.symbol,scanLimit:n.scanLimit,semantic:n.semantic}),o=L([i,...s].map(c=>c.callees)),a=[];for(let c of s){if(c.callees.size<3)continue;let r=$(i,c,o,{minSimilarity:t,requireSignificantShared:1,requireSharedCount:0});r&&a.push(r)}return a.sort((c,r)=>r.similarity-c.similarity),a}function $(e,i,t,n){let{similarity:s,significantShared:o}=E(e.callees,i.callees,t);if(s<n.minSimilarity)return null;let a=F(e.callees,i.callees).size;if(o.length<n.requireSignificantShared&&a<n.requireSharedCount)return null;let c=o.length>0?o:[...F(e.callees,i.callees)];return{symbolA:e.symbol,shortNameA:b(e.symbol),fileA:e.file,symbolB:i.symbol,shortNameB:b(i.symbol),fileB:i.file,similarity:s,similarityBasis:"callees",sharedCallees:c.map(b),uniqueToA:[...y(e.callees,i.callees)].map(b),uniqueToB:[...y(i.callees,e.callees)].map(b)}}function ge(e,i={}){let{minSimilarity:t=.5,limit:n=20,scope:s,minCallees:o=4,crossFileOnly:a=!1,scanLimit:c}=i,r=T(e,{minCallees:o,scope:s,scanLimit:c,semantic:i.semantic!==!1}),l=L(r.map(m=>m.callees)),f=new Map;for(let m of r)for(let u of m.callees)f.set(u,(f.get(u)??0)+1);let h=Math.max(8,Math.ceil(Math.sqrt(r.length))),R=new Map;for(let m=0;m<r.length;m+=1)for(let u of r[m].callees){if((f.get(u)??0)>h)continue;let g=R.get(u);g||(g=[],R.set(u,g)),g.push(m)}let x=[],P=0,B=new Set;for(let m=0;m<r.length;m+=1){let u=r[m],g=new Set;for(let C of u.callees){let S=R.get(C);if(S)for(let p of S)p>m&&g.add(p)}for(let C of g){let S=`${m}|${C}`;if(B.has(S))continue;B.add(S);let p=r[C];if(a&&u.file===p.file)continue;if(u.paramCount>=0&&p.paramCount>=0){let O=Math.abs(u.paramCount-p.paramCount),U=Math.max(2,Math.ceil(Math.max(u.paramCount,p.paramCount)*.5));if(O>U)continue}let M=$(u,p,l,{minSimilarity:t,requireSignificantShared:2,requireSharedCount:4});M&&(V(x,M,n,P),P+=1)}}return x.sort((m,u)=>u.result.similarity-m.result.similarity||m.order-u.order),x.map(m=>m.result)}function V(e,i,t,n){if(t<=0)return;if(e.length<t){e.push({result:i,order:n});return}let s=0;for(let a=1;a<e.length;a+=1){let c=e[a],r=e[s];(c.result.similarity<r.result.similarity||c.result.similarity===r.result.similarity&&c.order>r.order)&&(s=a)}let o=e[s];i.similarity<=o.result.similarity||(e[s]={result:i,order:n})}var Z=["ScipDatabase#all","ScipDatabase#get","ScipDatabase#prepare","ScipDatabase#pathExclusionsFor","ScipDatabase#isIgnored","ScipDatabase#symbolNoiseFor","PerDbValue#get","PerDbValue#has",":storage:db:ScipDatabase:all",":storage:db:ScipDatabase:get",":storage:db:ScipDatabase:prepare",":storage:db:ScipDatabase:pathExclusionsFor",":storage:db:ScipDatabase:isIgnored",":storage:db:ScipDatabase:symbolNoiseFor",":storage:per-db-cache:PerDbValue:get",":storage:per-db-cache:PerDbValue:has"];function W(e,i,t){let n=A(e,i),s=new k(e);if(!n)return null;let o=N(e,n,{semantic:t.semantic});return{symbol:n.symbol,file:n.relativePath,callees:v(o.map(a=>a.symbol)),paramCount:s.callableSignature(n)?.paramCount??-1}}var K=D("callee-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]});function T(e,i){let{minCallees:t,scope:n,excludeSymbol:s,scanLimit:o}=i,a=i.semantic!==!1,c=K.get(e,()=>new Map),r=`${t}|${n??""}|${o??""}|${a}`,l=c.get(r);return l||(l=H(e,{minCallees:t,scope:n,scanLimit:o,semantic:a}),c.set(r,l)),s===void 0?l:l.filter(f=>f.symbol!==s)}function H(e,i){let{minCallees:t,scope:n,scanLimit:s,semantic:o}=i,a=new k(e),c=q(a.productionCallableDefinitions({scope:n,minLoc:5,sortByLocDesc:typeof s=="number"&&s>0}),s),r=a.calleeMap(c,{semantic:o});return c.map(l=>({symbol:l.symbol,file:l.relativePath,callees:v((r.get(l.symbolId)??[]).map(f=>f.symbol)),paramCount:a.callableSignature(l)?.paramCount??-1})).filter(l=>l.callees.size>=t)}function v(e){return new Set([...e].filter(i=>!J(i)))}function J(e){return Z.some(i=>e.includes(i))}function Q(e,i,t){let n=X(e,i);if(!n||n.tokens.size<3)return[];let s=t.minSimilarity>=.5?t.minSimilarity:.3,o=[],a=new Set,c=te(ie(e));for(let r of n.tokens)for(let l of c.get(r)??[])a.add(l);for(let r of a){if(r.symbol===n.symbol||r.tokens.size<3)continue;let l=F(n.tokens,r.tokens);if(l.size<2)continue;let f=new Set([...n.tokens,...r.tokens]),h=f.size>0?l.size/f.size:0;h<s||o.push({symbolA:n.symbol,shortNameA:b(n.symbol),fileA:n.file,symbolB:r.symbol,shortNameB:b(r.symbol),fileB:r.file,similarity:h,similarityBasis:"source-tokens",sharedCallees:[...l].sort(),uniqueToA:[...y(n.tokens,r.tokens)].sort(),uniqueToB:[...y(r.tokens,n.tokens)].sort()})}return o.sort((r,l)=>l.similarity-r.similarity||r.shortNameB.localeCompare(l.shortNameB)),o.slice(0,t.limit)}function X(e,i){let t=A(e,i);if(!t||!w(t.symbol))return null;let n=Y(e,t);return n?{symbol:t.symbol,file:t.relativePath,tokens:n}:null}function Y(e,i){let t=I(i.symbol),n=j(e,i.relativePath,i.startLine,i.endLine,t),s=_(n,t);return s.size>0?s:null}var ee=D("source-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]});function ie(e){return ee.get(e,()=>ne(e))}function te(e){let i=new Map;for(let t of e)for(let n of t.tokens){let s=i.get(n);s||(s=[],i.set(n,s)),s.push(t)}return i}function ne(e){return new k(e).productionCallableDefinitions().map(t=>({symbol:t.symbol,file:t.relativePath,tokens:_(j(e,t.relativePath,t.startLine,t.endLine,t.leaf),t.leaf)})).filter(t=>t.tokens.size>0)}function j(e,i,t,n,s){let o=z(e,i);if(o.length===0)return"";if(n>=t&&n-t<=12)return o.slice(t,n+1).join(`
|
|
2
|
-
`);let a=[new RegExp(`\\bdef\\s+${d(s)}\\b`),new RegExp(`\\bfun\\s+${d(s)}\\b`),new RegExp(`\\bfn\\s+${d(s)}\\b`),new RegExp(`\\bfunction\\s+${d(s)}\\b`),new RegExp(`\\b${d(s)}\\s*\\(`)],c=o.findIndex(r=>a.some(l=>l.test(r)));if(c>=0){let r=c;for(let l=c+1;l<o.length&&l<=c+8;l++){let f=o[l]??"";if(l>c&&se(f)||(r=l,f.trim()===""&&l>c+1))break}return o.slice(c,r+1).join(`
|
|
3
|
-
`)}return o.slice(t,Math.min(o.length,t+8)).join(`
|
|
4
|
-
`)}function _(e,i){if(!e)return new Set;let t=new Set(["public","private","protected","final","static","class","def","fun","fn","function","return","string","bool","boolean","void","unit","self","this","new","const","let","var","end","pub"]),n=re(i),o=e.replace(/["'`]/g," ").replace(/\b\d+\b/g," NUM ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[^A-Za-z0-9_]+/g," ").replace(/_/g," ").toLowerCase().split(/\s+/).map(a=>a.trim()).filter(a=>a.length>1).filter(a=>!t.has(a)).filter(a=>!n.has(a));return new Set(o)}function re(e){return new Set(e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9_]+|_/).map(i=>i.toLowerCase()).filter(i=>i.length>1))}function se(e){return/^\s*(?:def|fun|fn|function|class|trait|module|object|enum|interface|public|private|protected)\b/.test(e)}function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{be as a,ge as b,V as c,T as d,v as e};
|
|
5
|
-
//# sourceMappingURL=chunk-TTGWDUJ4.js.map
|
package/dist/chunk-UVK3SL4Z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as y}from"./chunk-B75HZHUP.js";import{a as f}from"./chunk-BGBBVSH4.js";import{g as L}from"./chunk-QH5GTVVB.js";import{x as d}from"./chunk-ADKQX2OY.js";import{c as b,o as h,p as S,s as x}from"./chunk-64LH2QUP.js";import{a as g}from"./chunk-YVQUQIBM.js";function F(n,e={}){let{scope:s,minLoc:t=1,limit:i,scanLimit:a}=e,o=e.semantic!==!1,l=M(n,$(n,{scope:s,minLoc:t,scanLimit:a}),{semantic:o}),r=I(l);return i?r.slice(0,i):r}function $(n,e){let s=x(n,{scope:e.scope}).filter(t=>t.isFunctionLike&&!n.isIgnored(t.relativePath)).filter(t=>f(t)>=e.minLoc);return typeof e.scanLimit=="number"&&e.scanLimit>0&&s.sort((t,i)=>f(i)-f(t)||t.relativePath.localeCompare(i.relativePath)),y(s,e.scanLimit)}function M(n,e,s){let t=new Map;for(let i of e){let a=w(n,i,s);if(!a)continue;let o=t.get(a)??[];o.push(v(i)),t.set(a,o)}return t}function v(n){return{symbol:n.symbol,shortName:b(n.symbol),file:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:f(n)}}function I(n){let e=[];for(let[s,t]of n)t.length>=2&&e.push({signature:s,functions:t});return e.sort((s,t)=>{let i=t.functions.length-s.functions.length;if(i!==0)return i;let a=s.functions.reduce((l,r)=>l+r.loc,0);return t.functions.reduce((l,r)=>l+r.loc,0)-a}),e}function w(n,e,s){if(s.semantic){let a=L(n,e);if(a)return a}let t=G(e.documentation),i=t?A(t):null;return i||R(P(n,e.relativePath,e.startLine,e.endLine,e.leaf),e.leaf)}function G(n){return h(S(n))}function P(n,e,s,t,i){let a=g(n,e);if(!a)return null;let o=a.split(/\r?\n/),l=E(o,s,t,i);for(let r of l){let p=Math.min(o.length-1,Math.max(r,r+4)),u="";for(let c=r;c<=p;c+=1){let m=o[c]?.trim();if(m&&(u=u?`${u} ${m}`:m,z(u)))return u}if(u&&u.includes("("))return u}return null}function z(n){let e=n.replace(/\s+/g," ").trim();return!e.includes("(")||d(e)>0?!1:/[;{]$/.test(e)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(e)||/\)\s*As\s+.+$/i.test(e)}function A(n){if(!n||!n.trim())return null;let e=n.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim(),s=e.indexOf("(");return s===-1||(e=e.slice(s),e=e.replace(/\s+/g,"").toLowerCase(),e.length<3)?null:e}function R(n,e){if(!n||!n.trim())return null;let s=n.replace(/\s+/g," ").trim(),t=s.indexOf("(");if(t===-1)return null;let i=s.slice(0,t),o=new RegExp(`\\b${D(e)}\\b`,"i").exec(i);o&&typeof o.index=="number"&&(i=i.slice(0,o.index)),i=i.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let l=C(s.slice(t)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!l.startsWith("("))return null;let r=`${i?`${i} `:""}${l}`.replace(/\s+/g,"").toLowerCase();return r.length>=3?r:null}function C(n){let e=0,s=0,t=0,i=0,a=null,o=!1;for(let l=0;l<n.length;l+=1){let r=n[l];if(a){if(o){o=!1;continue}if(r==="\\"){o=!0;continue}r===a&&(a=null);continue}if(r==='"'||r==="'"||r==="`"){a=r;continue}if(r==="(")e+=1;else if(r===")")e=Math.max(0,e-1);else if(r==="[")t+=1;else if(r==="]")t=Math.max(0,t-1);else if(r==="<")i+=1;else if(r===">")i=Math.max(0,i-1);else if(r==="{"){if(e===0&&t===0&&i===0)return n.slice(0,l);s+=1}else if(r==="}")s=Math.max(0,s-1);else if(r==="="&&n[l+1]===">"&&e===0&&s===0&&t===0&&i===0)return n.slice(0,l)}return n}function E(n,e,s,t){let i=D(t),a=new RegExp(`\\b${i}\\b\\s*\\(`,"i"),o=new RegExp(`\\bdef\\s+${i}\\b`,"i"),l=[],r=new Set,p=Math.max(0,Math.min(e,n.length-1)),u=Math.max(p,Math.min(n.length-1,Math.max(s,e+4)));for(let c=p;c<=u;c+=1){let m=n[c]??"";(a.test(m)||o.test(m))&&!r.has(c)&&(r.add(c),l.push(c))}for(let c=0;c<n.length;c+=1){let m=n[c]??"";(a.test(m)||o.test(m))&&!r.has(c)&&(r.add(c),l.push(c))}return l}function D(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{F as a};
|
|
2
|
-
//# sourceMappingURL=chunk-UVK3SL4Z.js.map
|
package/dist/chunk-W3PQRAI4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as y,e as k,f as P}from"./chunk-L77GXANO.js";import{a as g}from"./chunk-BGBBVSH4.js";import{b as V,c as G,d as O}from"./chunk-623UQCVG.js";import{c as B}from"./chunk-44JOJLMO.js";import{a as K,k as F,l as j}from"./chunk-SA6B3EGD.js";import{a as T}from"./chunk-5D3BT4B4.js";import{f as N,g as A,i as w,j as E,r as q,t as S}from"./chunk-64LH2QUP.js";import{a as C,f as p}from"./chunk-T67R7V5I.js";import{a as b,b as L}from"./chunk-HCQ7J2N5.js";import{d}from"./chunk-YVQUQIBM.js";import{c as M}from"./chunk-TMS4JPWY.js";import{a as v}from"./chunk-NN3O7TPH.js";function H(r,e,t){let a=e.identifierResolution==="strict"?F:j;for(let n of e.paths)if(!(!b(n)&&!(e.includeVueSfc&&L(n)))&&!r.isIgnored(n)&&!e.skipPath?.(n))try{let l=(i,c,R,m)=>{if(e.candidateNames&&!e.candidateNames.has(i))return;let h=e.resolveTargets?e.resolveTargets({sourceFile:n,name:i,kind:c,defaultTargets:m}):m();for(let D of h)t({sourceFile:n,name:i,target:D,occurrences:R,kind:c})},f=K(r,n);for(let[i,c]of f)l(i,"identifier",c.length,()=>a(r,n,i));for(let i of p(r,n,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let c=i.kind==="cross-language-dispatch"?()=>F(r,n,i.name):()=>a(r,n,i.name);l(i.name,i.kind,i.occurrences,c)}}finally{e.afterPath?.(n)}}function W(r,e={}){let{scope:t,minLoc:a=1,maxLoc:n=Number.POSITIVE_INFINITY,excludeSymbol:o,excludeEntrySurfaces:l=!1,excludeTypesFiles:f=!1,excludeRootedSymbols:i=!1,requireFunctionLikeSymbol:c=!1,requireCallableSymbol:R=!1,excludeRustTraitImplMembers:m=!1,includeSuppressed:h=!1,sortByLocDesc:D=!1}=e,I=[];for(let s of S(r,t)){let u=s.relativePath;if(r.isIgnored(u)||l&&k(r,u)||!_(s,{requireFunctionLikeSymbol:c,requireCallableSymbol:R})||o!==void 0&&s.symbol===o)continue;let x=g(s);x<a||x>n||f&&z(u)||i&&P(r,s.symbol,u)||m&&w(s.symbol)||y(u)!=="test"&&(E(s.symbol)||!h&&d(r,u,s.startLine)||I.push(s))}return D?I.sort((s,u)=>g(u)-g(s)):I}function _(r,e){return e.requireCallableSymbol?N(r.symbol):e.requireFunctionLikeSymbol?A(r.symbol):r.isFunctionLike}function z(r){return(r.split("/").pop()??"").includes("types")}var Y=class{constructor(e){this.db=e}db;scopedDefinitions(e){return S(this.db,e)}definitionsForFile(e){return q(this.db,e)}productionCallableDefinitions(e={}){return W(this.db,e)}calleeMap(e,t={}){return B(this.db,e,t)}crossFileCallerMap(e,t={}){return V(this.db,e,t)}sourceFallbackCallerFiles(e){return G(this.db,e)}callerFileMap(e,t={}){return O(this.db,e,t)}frameworkReferencedSymbolIds(e){let t=new Map;for(let n of e){if(!n.leaf)continue;let o=t.get(n.leaf)??[];o.push(n.symbolId),t.set(n.leaf,o)}let a=new Set;for(let n of v(this.db,{includeIgnored:!1}))if(b(n)==="rust")for(let{name:o}of p(this.db,n,{includeRustAttributeNames:!0}))for(let l of t.get(o)??[])a.add(l);return a}symbolsWithNonSelfCallees(e,t={}){if(e.length===0)return new Set;let a=new Map(e.map(o=>[o.symbolId,o.symbol])),n=this.calleeMap(e,t);return new Set([...n.entries()].filter(([o,l])=>{let f=a.get(o);return l.some(i=>i.symbol!==f)}).map(([o])=>o))}fileDependencyGraph(e){return T(this.db,e)}fileKind(e){return y(e)}hasSuppressionComment(e){return d(this.db,e.relativePath,e.startLine)}sourceFiles(){return M(this.db)}scanSourceReferences(e,t){H(this.db,e,t)}callableSignature(e){let t=C(this.db,e.relativePath)?.callables.find(a=>a.startLine===e.startLine&&a.endLine===e.endLine);return t?{paramCount:t.paramCount}:null}};export{Y as a};
|
|
2
|
-
//# sourceMappingURL=chunk-W3PQRAI4.js.map
|
package/dist/chunk-WWFBDM5Y.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunk-W3PQRAI4.js";import{a as h}from"./chunk-44JOJLMO.js";import{o as S}from"./chunk-SA6B3EGD.js";import{a as d,b}from"./chunk-5ALI77D7.js";import{c as m,w as y}from"./chunk-64LH2QUP.js";function v(e,o,l={}){let{direction:c="backward",maxDepth:s=3}=l,r=d(e,o);return r?c==="backward"?w(e,r,s,{semantic:l.semantic!==!1}):M(e,r,{semantic:l.semantic!==!1}):null}function w(e,o,l,c){let s=[],r=new Set([o.symbol]),t=[o];for(let n=1;n<=l&&t.length!==0;n++){let i=[];for(let p of t){let g=h(e,p,{semantic:c.semantic});for(let a of g){if(r.has(a.symbol))continue;r.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function M(e,o,l){let c=new Set,s=[],r=new u(e);for(let t of S(e,o,{semantic:l.semantic})){if(s.length>=30)break;let n=t.enclosingSymbol??y(r.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{v as a};
|
|
2
|
-
//# sourceMappingURL=chunk-WWFBDM5Y.js.map
|
package/dist/chunk-Y33GRQK6.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-W3PQRAI4.js";import{a as S}from"./chunk-L77GXANO.js";import{c as h}from"./chunk-QH5GTVVB.js";import{b as d}from"./chunk-QUKZ77A6.js";import{a as y}from"./chunk-NN3O7TPH.js";import f from"path";function l(e){let n=e.replace(/\\/g,"/").split("/").filter(Boolean);return n.length<=1?"(root)":n.length>=3&&["src","lib","app","server","client"].includes(n[0])?`${n[0]}/${n[1]}`:n[0]}function p(e,t){if(e===t)return"ok";let n=g(e),i=g(t);return n&&i?v(n,i)?"ok":"violation":w(e,t)}function D(e,t){let n=g(l(e)),i=g(l(t));return!!n&&!!i}function g(e){return/^src\/([^/]+)$/.exec(e)?.[1]??null}function v(e,t){return t==="domain"?!0:e==="domain"?!1:{analysis:new Set(["domain","source","storage","symbols"]),core:new Set(["analysis","domain","resolution","source","storage","symbols"]),"language-parsers":new Set(["domain","resolution","source","storage"]),queries:new Set(["analysis","core","domain","language-parsers","resolution","semantic","source","storage","symbols"]),reindex:new Set(["domain","language-parsers","resolution","runtime","semantic","source","storage","symbols"]),resolution:new Set(["domain","source","storage","symbols"]),runtime:new Set(["domain","queries","reindex","resolution","semantic","source","storage","symbols"]),semantic:new Set(["domain","resolution","storage","symbols"]),source:new Set(["domain","storage"]),storage:new Set(["domain","source"]),symbols:new Set(["analysis","domain","language-parsers","resolution","semantic","source","storage"])}[e]?.has(t)??!1}function w(e,t){if(t==="shared")return"ok";let n={app:new Set(["core","shared","ui"]),core:new Set(["shared"]),infra:new Set(["core","shared"]),ui:new Set(["core","shared"])};return n[e]?n[e].has(t)?"ok":"violation":null}function G(e,t){let{scope:n,minDeviation:i=5}=t??{},r=t?.semantic!==!1,c=new m(e).fileDependencyGraph(n),a=O(e,n);return _([...R(e,c,a,{semantic:r}),...k(c),...I(c,i)])}function R(e,t,n,i){let r=[];for(let[s,c]of t){if(u(s))continue;let a=n.get(s)??new Set;for(let o of c)if(!u(o)&&!a.has(o)){if(i.semantic&&L(e,s,o)||A(e,s,o)||T(e,s,o)||F(o)||j(e,s,o)||V(o))continue;r.push({file:s,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o})}}return r}function k(e){let t=[],n=$(e);for(let[i,r]of e){if(u(i))continue;let s=l(i);for(let c of r){if(u(c))continue;let a=l(c);if(s===a)continue;(p(s,a)??n.get(`${s}->${a}`))==="violation"&&t.push({file:i,kind:"layer-violation",description:`Imports from ${a}/ (${c}) \u2014 may cross architectural boundary`,dep:c,detail:`${s}/ should not depend on ${a}/`})}}return t}function I(e,t){let n=[];for(let[i,r]of M(e)){let s=r.filter(a=>!u(a));if(s.length<t)continue;let c=x(e,s);for(let a of s)for(let o of e.get(a)??[])u(o)||(c.get(o)??0)===1&&f.dirname(o)!==i&&f.dirname(o)!==f.dirname(i)&&(D(a,o)||n.push({file:a,kind:"pattern-deviation",description:`Only file in ${i}/ that depends on ${o}`,dep:o}))}return n}function _(e){return{results:e,unusedImports:e.filter(t=>t.kind==="unused-import").length,layerViolations:e.filter(t=>t.kind==="layer-violation").length,patternDeviations:e.filter(t=>t.kind==="pattern-deviation").length}}function M(e){let t=new Map;for(let n of e.keys()){let i=f.dirname(n),r=t.get(i);r||(r=[],t.set(i,r)),r.push(n)}return t}function x(e,t){let n=new Map;for(let i of t)for(let r of e.get(i)??[])u(r)||n.set(r,(n.get(r)??0)+1);return n}function O(e,t){let n=new Map;return E(e,n,t),P(e,n),n}function E(e,t,n){for(let i of N(e,n))b(e,t,i.from_file,i.to_file)}function N(e,t){let n=t?`AND d1.relative_path LIKE '%${t}%'`:"";return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
|
|
2
|
-
FROM mentions m
|
|
3
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
4
|
-
JOIN documents d1 ON c.document_id = d1.id
|
|
5
|
-
JOIN global_symbols gs ON m.symbol_id = gs.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 = gs.id
|
|
13
|
-
JOIN documents d2 ON sym_def.document_id = d2.id
|
|
14
|
-
WHERE d1.id != d2.id
|
|
15
|
-
AND m.role != 1
|
|
16
|
-
${e.pathExclusionsFor("d1","d2")}
|
|
17
|
-
${n}`)}function P(e,t){new m(e).scanSourceReferences({paths:y(e,{includeIgnored:!1}),includeRustAttributeNames:!0,identifierResolution:"permissive"},i=>{i.target.relativePath!==i.sourceFile&&(e.isIgnored(i.target.relativePath)||b(e,t,i.sourceFile,i.target.relativePath))})}function b(e,t,n,i){if(e.isIgnored(n)||e.isIgnored(i))return;let r=t.get(n);r||(r=new Set,t.set(n,r)),r.add(i)}function $(e){let t=new Map;for(let[i,r]of e){if(u(i))continue;let s=l(i);for(let c of r){if(u(c))continue;let a=l(c);if(s===a||p(s,a))continue;let o=`${s}->${a}`;t.set(o,(t.get(o)??0)+1)}}let n=new Map;for(let[i,r]of t)n.set(i,r<=2?"violation":"ok");return n}function F(e){return e.includes("types")||e.endsWith(".d.ts")}function L(e,t,n){let i=h(e,t).filter(r=>r.sourcePath===n);return i.length>0&&i.some(r=>r.isUsed)}function A(e,t,n){let i=d(e,t).filter(r=>r.sourcePath===n);return i.length>0&&i.some(r=>r.used)}function T(e,t,n){let i=d(e,t).filter(r=>r.sourcePath===n);return i.length>0&&i.every(r=>r.isTypeOnly===!0)}function V(e){return e.endsWith(".vue")}function j(e,t,n){let i=d(e,t).filter(r=>r.sourcePath===n);return i.length===0?!1:i.every(r=>r.kind==="side-effect"||r.kind==="namespace"&&r.usedMembers.length===0&&!r.used)}function u(e){let t=S(e);return!!(t==="entry"||t==="barrel"||t==="test"||t==="worker"||J(f.basename(e)))}function J(e){return!!(e==="index.ts"||e==="index.js"||e==="cli.ts"||e==="main.ts"||e==="main.rs"||e.includes("worker.")||e.includes("postinstall.")||e==="health.ts"||e==="health.js")}export{G as a};
|
|
18
|
-
//# sourceMappingURL=chunk-Y33GRQK6.js.map
|
package/dist/chunk-YISMWW66.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{d as x}from"./chunk-BJ7OHKB5.js";import{execFileSync as R}from"child_process";var y=2e3,F=50,S=/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i;function h(e){let n=x(e,{clearGroups:["whole-project"]});return(t,i)=>{let s=w(t.config.projectRoot);if(!s)return null;let o=n.has(t)?n.get(t,()=>({head:"",value:null})):null;return o&&o.head===s?o.value:(n.invalidate(t),n.get(t,()=>({head:s,value:i(t.config.projectRoot,s)})).value)}}var M=h("git-commit-history");function p(e){return M(e,P)}function w(e){try{return d(e,["rev-parse","HEAD"]).trim()||null}catch{return null}}function d(e,n){return R("git",["-C",e,...n],{encoding:"utf-8",maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"]})}function P(e,n){let t;try{t=d(e,["log","--no-merges","--name-only","-n",String(y),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}let i=[],s=0;for(let o of t.split("")){if(o.trim()==="")continue;let c=o.indexOf(`
|
|
2
|
-
`),f=c>=0?o.slice(0,c):o,[u,a,r]=f.split("\0");if(!u||!a)continue;let l=c>=0?o.slice(c+1).split(`
|
|
3
|
-
`).map(m=>m.trim()).filter(m=>m!==""):[];if(l.length>F){s+=1;continue}i.push({hash:u,timestamp:Number(a)||0,subject:r??"",files:l})}return{head:n,commits:i,skippedBulkCommits:s}}function k(e){return S.test(e.subject)}function v(e){let n=p(e);if(!n)return null;let t=new Map;for(let i of n.commits){let s=k(i);for(let o of i.files){let c=t.get(o)??{changes:0,fixChanges:0,lastChangedAt:0};c.changes+=1,s&&(c.fixChanges+=1),i.timestamp>c.lastChangedAt&&(c.lastChangedAt=i.timestamp),t.set(o,c)}}return t}function _(e){let n=p(e);if(!n||n.commits.length===0)return null;let t=n.commits.map(i=>i.files.length).filter(i=>i>0).sort((i,s)=>i-s);return t.length===0?null:{medianFilesPerCommit:A(t,.5),p90FilesPerCommit:A(t,.9),commitsAnalyzed:t.length}}function A(e,n){let t=Math.min(e.length-1,Math.floor(e.length*n));return e[t]}var T=h("git-tracked-files");function E(e){return T(e,n=>{try{let t=d(n,["ls-files"]);return new Set(t.split(`
|
|
4
|
-
`).map(i=>i.trim()).filter(i=>i!==""))}catch{return null}})}var j=h("git-file-adds");function I(e){return j(e,n=>H(n))}function H(e){let n;try{n=d(e,["log","--no-merges","--diff-filter=A","--name-only","-n",String(y),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}let t=new Map,i=-1;for(let s of n.split("")){if(s.trim()==="")continue;i+=1;let o=s.indexOf(`
|
|
5
|
-
`),c=o>=0?s.slice(0,o):s,[,f]=c.split("\0"),u=Number(f)||0;if(!(o<0))for(let a of s.slice(o+1).split(`
|
|
6
|
-
`)){let r=a.trim();r!==""&&t.set(r,{commitsAgo:i,addedAt:u})}}return t}function O(e,n={}){let{minTogether:t=4,minConfidence:i=.6,maxFilesPerCommit:s=F}=n,o=p(e);if(!o)return null;let c=new Map,f=new Map;for(let a of o.commits){let r=[...new Set(a.files)].sort();if(!(r.length>s)){for(let l of r)c.set(l,(c.get(l)??0)+1);for(let l=0;l<r.length;l++)for(let m=l+1;m<r.length;m++){let g=`${r[l]}\0${r[m]}`;f.set(g,(f.get(g)??0)+1)}}}let u=[];for(let[a,r]of f){if(r<t)continue;let[l,m]=a.split("\0"),g=c.get(l)??r,C=c.get(m)??r,b=Math.max(r/g,r/C);b<i||u.push({fileA:l,fileB:m,together:r,confidence:b,changesA:g,changesB:C})}return u.sort((a,r)=>r.together-a.together||r.confidence-a.confidence||a.fileA.localeCompare(r.fileA)),u}export{p as a,v as b,_ as c,E as d,I as e,O as f};
|
|
7
|
-
//# sourceMappingURL=chunk-YISMWW66.js.map
|