scip-query 0.22.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +500 -0
- package/README.md +13 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-H3P6BR5G.js +2 -0
- package/dist/call-graph-VTG2CUOQ.js +2 -0
- package/dist/call-graph-evidence-BociKRpF.d.ts +19 -0
- package/dist/chunk-2BMSSRBH.js +2 -0
- package/dist/{chunk-TAYD3AE7.js → chunk-2GJSD5GY.js} +2 -2
- package/dist/{chunk-TUQIPUDS.js → chunk-2M2LSIMY.js} +3 -3
- package/dist/{chunk-GIQ6CSL4.js → chunk-2N6WBNDC.js} +2 -2
- package/dist/{chunk-JHH5SCZ3.js → chunk-2OOY75BW.js} +2 -2
- package/dist/{chunk-EELPBR7E.js → chunk-2USA3S3P.js} +2 -2
- package/dist/chunk-2VAHDDLM.js +133 -0
- package/dist/chunk-2XWIUW5Z.js +455 -0
- package/dist/{chunk-57N6LN2A.js → chunk-3AF4TUFK.js} +2 -2
- package/dist/chunk-3D4BOXW6.js +20 -0
- package/dist/{chunk-FFJQZG6J.js → chunk-3LO4FST5.js} +2 -2
- package/dist/{chunk-HXOU4XNH.js → chunk-3WTY4LP2.js} +2 -2
- package/dist/{chunk-DPWKKNKI.js → chunk-3Z5AMSK6.js} +2 -2
- package/dist/{chunk-F24G5NBE.js → chunk-44IETFOU.js} +2 -2
- package/dist/chunk-4FR6GQIT.js +2 -0
- package/dist/chunk-4KBTHJLP.js +2 -0
- package/dist/chunk-5BIKR67W.js +2 -0
- package/dist/{chunk-DJAO2OZJ.js → chunk-5PROPLHI.js} +2 -2
- package/dist/chunk-5V7EPTII.js +2 -0
- package/dist/{chunk-VZ7NXSHV.js → chunk-62LPZCBQ.js} +2 -2
- package/dist/{chunk-LXQUF2RP.js → chunk-64O2JHQA.js} +2 -2
- package/dist/chunk-6D4F5VWG.js +10 -0
- package/dist/{chunk-NEIQPFBI.js → chunk-6ERFBC3X.js} +2 -2
- package/dist/{chunk-4HE7MVWD.js → chunk-6ILKOOGH.js} +2 -2
- package/dist/chunk-6MFXCMZC.js +2 -0
- package/dist/chunk-6O7FACKB.js +2 -0
- package/dist/{chunk-R6M456QG.js → chunk-6TS3KOXR.js} +2 -2
- package/dist/{chunk-7U2YQSDE.js → chunk-76QOU4PK.js} +2 -2
- package/dist/{chunk-25GWKRUZ.js → chunk-7DUI77BN.js} +2 -2
- package/dist/chunk-7F45LJKI.js +2 -0
- package/dist/{chunk-DEAB5TGT.js → chunk-7F7T6DCR.js} +2 -2
- package/dist/chunk-7H6VHWWJ.js +2 -0
- package/dist/chunk-7HXT6YLU.js +5 -0
- package/dist/{chunk-KZYID5KV.js → chunk-7R4V5ES6.js} +4 -4
- package/dist/chunk-7RIRIADH.js +7 -0
- package/dist/chunk-7ZLWLOGT.js +2 -0
- package/dist/{chunk-WHADK6OS.js → chunk-A4WEAK35.js} +2 -2
- package/dist/chunk-AADQLOQ4.js +38 -0
- package/dist/{chunk-XFMVKFSF.js → chunk-AN76MGUE.js} +2 -2
- package/dist/chunk-ANLNLY66.js +2 -0
- package/dist/chunk-ATXPTSEI.js +81 -0
- package/dist/{chunk-EELG7D3Q.js → chunk-AX7IDVFT.js} +2 -2
- package/dist/chunk-B3PYOSCX.js +2 -0
- package/dist/chunk-B7MPDEAK.js +3 -0
- package/dist/chunk-BBB5FBX4.js +2 -0
- package/dist/{chunk-Y2VM4CJC.js → chunk-BHKK5RJY.js} +2 -2
- package/dist/chunk-BJWFVAA5.js +2 -0
- package/dist/chunk-BKVWUP7Y.js +2 -0
- package/dist/{chunk-7XA3OM44.js → chunk-BKZYTLGE.js} +2 -2
- package/dist/chunk-BL6DCHQP.js +2 -0
- package/dist/chunk-BOW7SSQH.js +43 -0
- package/dist/{chunk-KQHJEU6V.js → chunk-C4RHHCKL.js} +2 -2
- package/dist/chunk-C7C6AKAT.js +117 -0
- package/dist/chunk-CD6M6LS2.js +16 -0
- package/dist/chunk-CFE6PSG6.js +2 -0
- package/dist/{chunk-GPGRZJ3R.js → chunk-CFNIGQMT.js} +2 -2
- package/dist/{chunk-K3XFWJI2.js → chunk-CKBUBRYD.js} +2 -2
- package/dist/chunk-CZW5MZ5B.js +2 -0
- package/dist/chunk-DBBZ63ZX.js +2 -0
- package/dist/chunk-DBN7DMJB.js +18 -0
- package/dist/{chunk-CKRWA452.js → chunk-DUULLZHZ.js} +2 -2
- package/dist/{chunk-6HRZQLOI.js → chunk-DV5Y5NOS.js} +2 -2
- package/dist/chunk-DZOIKCTM.js +3 -0
- package/dist/chunk-E4PKTOL3.js +2 -0
- package/dist/{chunk-GVOMSPGL.js → chunk-E65ELFKU.js} +2 -2
- package/dist/{chunk-VXJJTQYE.js → chunk-E7QR35ST.js} +2 -2
- package/dist/{chunk-2RE5OCHZ.js → chunk-EFSXAINW.js} +2 -2
- package/dist/{chunk-GY7CCCEZ.js → chunk-EHVEIEQN.js} +2 -2
- package/dist/{chunk-BVFYEEBH.js → chunk-EHYDXE3Z.js} +2 -2
- package/dist/{chunk-HISEUIL2.js → chunk-EP63Y6LD.js} +2 -2
- package/dist/chunk-EPX6NQN6.js +4 -0
- package/dist/chunk-ETC674NS.js +5 -0
- package/dist/{chunk-5H5WTJSD.js → chunk-F5GSBHC6.js} +2 -2
- package/dist/chunk-FH3DGXC6.js +2 -0
- package/dist/{chunk-2XCGSDIT.js → chunk-FI7VGOR4.js} +2 -2
- package/dist/chunk-FJF6VO2P.js +2 -0
- package/dist/{chunk-FELGD32K.js → chunk-FLMTCX5R.js} +2 -2
- package/dist/chunk-FVFDOIM3.js +2 -0
- package/dist/{chunk-AQ2PORIO.js → chunk-G2HU5WRN.js} +2 -2
- package/dist/{chunk-7YQOCABQ.js → chunk-G4ALYS4J.js} +2 -2
- package/dist/{chunk-SWK4XPUS.js → chunk-G56I7K4W.js} +2 -2
- package/dist/{chunk-JFQBRL3J.js → chunk-GC4DG2V5.js} +2 -2
- package/dist/chunk-GG45PK4S.js +4 -0
- package/dist/{chunk-XN22RGSR.js → chunk-GHNPACNP.js} +2 -2
- package/dist/{chunk-XU75YQN4.js → chunk-GINH3YQU.js} +2 -2
- package/dist/chunk-GTZZVLKJ.js +2 -0
- package/dist/chunk-GXXW5ZHH.js +2 -0
- package/dist/{chunk-RNKPYYYE.js → chunk-HAXXKRTD.js} +2 -2
- package/dist/chunk-HEZWBAZY.js +2 -0
- package/dist/chunk-HMEWLMML.js +2 -0
- package/dist/{chunk-2KVU55CW.js → chunk-HOBOVYPO.js} +2 -2
- package/dist/{chunk-2YC7YNKT.js → chunk-HRFQ6GW5.js} +2 -2
- package/dist/{chunk-RYOYJMGF.js → chunk-HX4X7KG3.js} +2 -2
- package/dist/{chunk-AZS7YPCB.js → chunk-HYT2R7LX.js} +2 -2
- package/dist/chunk-IKQVBVQL.js +40 -0
- package/dist/chunk-J6GLBBRK.js +4 -0
- package/dist/{chunk-TNG2FYS5.js → chunk-J7A4PWFX.js} +2 -2
- package/dist/chunk-JCSAZ35V.js +2 -0
- package/dist/{chunk-EWWY2ZFL.js → chunk-JDU2IV3A.js} +2 -2
- package/dist/{chunk-SB25YMEQ.js → chunk-JFMEXGFE.js} +2 -2
- package/dist/chunk-JFMI5SGB.js +4 -0
- package/dist/chunk-JJP37RGX.js +57 -0
- package/dist/chunk-JZ2A7LDM.js +5 -0
- package/dist/chunk-KNLQGXVH.js +80 -0
- package/dist/chunk-KVQCECPR.js +2 -0
- package/dist/{chunk-F24QUEQP.js → chunk-KXXORBZ2.js} +2 -2
- package/dist/{chunk-IKVNEGTW.js → chunk-L5KYH6U3.js} +2 -2
- package/dist/chunk-L6XHYJPZ.js +21 -0
- package/dist/chunk-L7KTFEAV.js +43 -0
- package/dist/{chunk-UAQ4T73O.js → chunk-LDXHR5EL.js} +2 -2
- package/dist/chunk-LEECKFCJ.js +2 -0
- package/dist/{chunk-LO5JSW2C.js → chunk-MHGDSBFX.js} +2 -2
- package/dist/{chunk-JUN5DOAK.js → chunk-MLQVVDG3.js} +2 -2
- package/dist/chunk-MOKUWRHO.js +3 -0
- package/dist/{chunk-44T4DUAA.js → chunk-MPYAPMNE.js} +2 -2
- package/dist/{chunk-ARVO6TTW.js → chunk-MV6SPXCR.js} +2 -2
- package/dist/{chunk-NRBNAECH.js → chunk-MWN53KRN.js} +2 -2
- package/dist/{chunk-TH6IC56G.js → chunk-MZPXPSUJ.js} +2 -2
- package/dist/{chunk-FBCVASUG.js → chunk-N55KIE46.js} +2 -2
- package/dist/{chunk-VMWUV6WB.js → chunk-NB4D3BNM.js} +2 -2
- package/dist/{chunk-JAT6C3VX.js → chunk-NGKBOT6G.js} +2 -2
- package/dist/{chunk-Q6T2CAJL.js → chunk-NJGKXKQF.js} +2 -2
- package/dist/chunk-NJQISBL4.js +8 -0
- package/dist/chunk-NJT3ZEKY.js +16 -0
- package/dist/{chunk-KFVSJX25.js → chunk-NKMKZP6A.js} +2 -2
- package/dist/chunk-NODFZ6ED.js +2 -0
- package/dist/{chunk-ERCYGVAM.js → chunk-NSM5IEVW.js} +2 -2
- package/dist/{chunk-YAGYMBEX.js → chunk-NTGUVNR2.js} +2 -2
- package/dist/{chunk-N7FP5H5U.js → chunk-NU3KFF2O.js} +8 -8
- package/dist/chunk-NWLVNU66.js +557 -0
- package/dist/{chunk-Q55NF3ZG.js → chunk-NYKZMCRC.js} +2 -2
- package/dist/{chunk-I6UTXNHU.js → chunk-O6BUXZEH.js} +2 -2
- package/dist/chunk-ODPDP7A4.js +3 -0
- package/dist/{chunk-ZAZGGSM3.js → chunk-OHIV323X.js} +2 -2
- package/dist/chunk-OIAPEKMT.js +3 -0
- package/dist/chunk-OIOC5EHF.js +3 -0
- package/dist/{chunk-YIHNPKWD.js → chunk-ONPPQM4G.js} +2 -2
- package/dist/{chunk-RHHCLWQ6.js → chunk-OUHEZBYI.js} +2 -2
- package/dist/{chunk-MSR2QRUE.js → chunk-OVGYW7UD.js} +2 -2
- package/dist/{chunk-OPSAW5DT.js → chunk-OYKU4B3Y.js} +2 -2
- package/dist/{chunk-5YRQIE2B.js → chunk-POBJ6FR2.js} +2 -2
- package/dist/{chunk-ZGW4HLPD.js → chunk-PSZPMMWN.js} +2 -2
- package/dist/chunk-PXTRBKRK.js +3 -0
- package/dist/{chunk-U2N2KE7A.js → chunk-Q5JRIHT3.js} +2 -2
- package/dist/{chunk-GRX7JOXQ.js → chunk-Q7ATHARX.js} +2 -2
- package/dist/{chunk-5ZMBRQFC.js → chunk-Q7CSKIDM.js} +2 -2
- package/dist/{chunk-HG722PO7.js → chunk-QBQE7ZJ5.js} +2 -2
- package/dist/{chunk-Z2PZVKPR.js → chunk-QH22UIXP.js} +2 -2
- package/dist/chunk-QXCKQTKR.js +60 -0
- package/dist/chunk-RBAD4GJ2.js +13 -0
- package/dist/chunk-RMDPFPNW.js +2 -0
- package/dist/chunk-ROPJDEJZ.js +4 -0
- package/dist/{chunk-56NQAEPJ.js → chunk-RVZC6TJE.js} +2 -2
- package/dist/{chunk-XJX6LGHL.js → chunk-S4QZBKSR.js} +2 -2
- package/dist/chunk-SCPMZ73U.js +2 -0
- package/dist/{chunk-7IQXARSQ.js → chunk-SIAP5RGI.js} +2 -2
- package/dist/{chunk-4TQU4TX2.js → chunk-SIX4RFR3.js} +2 -2
- package/dist/{chunk-AYPDH2LU.js → chunk-SKKXTABJ.js} +2 -2
- package/dist/{chunk-ZYM4HOFA.js → chunk-SSRFUQBD.js} +2 -2
- package/dist/chunk-SYVJEEUJ.js +3 -0
- package/dist/chunk-T3CZAZSI.js +8 -0
- package/dist/chunk-T3I6NHBH.js +2 -0
- package/dist/{chunk-GDRJB3SB.js → chunk-T6DWDI5E.js} +2 -2
- package/dist/chunk-T6HRIROJ.js +7 -0
- package/dist/{chunk-OTSPRVNW.js → chunk-TAA7HXHE.js} +2 -2
- package/dist/{chunk-IJMD6BRI.js → chunk-TJ2JQYT3.js} +2 -2
- package/dist/chunk-TULNMD5T.js +368 -0
- package/dist/chunk-U2FPY5XA.js +3 -0
- package/dist/chunk-U3SXIMII.js +38 -0
- package/dist/{chunk-ENWQWA2R.js → chunk-U6KCHXJ4.js} +2 -2
- package/dist/chunk-UH3XSKS5.js +9 -0
- package/dist/{chunk-UDY7MIAW.js → chunk-UIFUZVCC.js} +2 -2
- package/dist/{chunk-BDGTPN27.js → chunk-UXKURIVI.js} +2 -2
- package/dist/{chunk-FGNCOQUX.js → chunk-V2RBODHL.js} +2 -2
- package/dist/chunk-VBKUWB6N.js +2 -0
- package/dist/{chunk-PIFTZEEM.js → chunk-VBV6ALJE.js} +2 -2
- package/dist/{chunk-2OXVP5U5.js → chunk-VDGFWCQV.js} +2 -2
- package/dist/chunk-VDSDOEWF.js +2 -0
- package/dist/{chunk-C76O5MDS.js → chunk-VZPWVCLN.js} +2 -2
- package/dist/chunk-WDSFQDPN.js +2 -0
- package/dist/{chunk-BTVKZGWT.js → chunk-WFA35BGR.js} +2 -2
- package/dist/{chunk-H7CG6LOE.js → chunk-WLMP3OCW.js} +2 -2
- package/dist/{chunk-WOOAY3PA.js → chunk-WSA52GOR.js} +2 -2
- package/dist/chunk-WYPL7GF7.js +2 -0
- package/dist/{chunk-RDULNRSJ.js → chunk-X3YVZAKZ.js} +2 -2
- package/dist/chunk-X6OGVFIT.js +2 -0
- package/dist/{chunk-ISWFRGJ6.js → chunk-XKXTR6ZI.js} +2 -2
- package/dist/chunk-Y5DFAW5W.js +4 -0
- package/dist/chunk-YSYPDRD5.js +3 -0
- package/dist/chunk-ZFVPWH62.js +5 -0
- package/dist/chunk-ZGIHTH27.js +2 -0
- package/dist/{chunk-QKT4UI2Y.js → chunk-ZGIQN2SX.js} +2 -2
- package/dist/chunk-ZHG4WAHR.js +12 -0
- package/dist/{chunk-CLG6DWVS.js → chunk-ZKB2XUEN.js} +2 -2
- package/dist/chunk-ZLMXIQLC.js +21 -0
- package/dist/chunk-ZMCQIHI4.js +2 -0
- package/dist/cli-main.js +2 -2
- package/dist/code-TAVIKWJI.js +2 -0
- package/dist/code-result-json-5FEFQCAQ.js +2 -0
- package/dist/command-descriptors-7BKH53Y3.js +343 -0
- package/dist/dataflow-GFBTVDH3.js +2 -0
- package/dist/dependence-slice-GWGQCODG.js +2 -0
- package/dist/deps-4QHVDPYA.js +2 -0
- package/dist/direct-navigation-4UBC6HNW.js +3 -0
- package/dist/entry-map-QCTF4RVY.js +2 -0
- package/dist/files-M2UBF5HJ.js +2 -0
- package/dist/frontend-profile-roles-D7eCum8P.d.ts +10 -0
- package/dist/{health-CPp2Jf1Z.d.ts → health-BI2a9WPy.d.ts} +60 -2
- package/dist/hierarchy-2UIHRLW4.js +2 -0
- package/dist/imports-WIE3YZOB.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/members-YKD636DA.js +2 -0
- package/dist/methods-VDF4IMYG.js +2 -0
- package/dist/output-continuation-command-4UMDOOLO.js +3 -0
- package/dist/output-pagination-2GME6OPY.js +19 -0
- package/dist/postinstall.js +1 -1
- package/dist/project-reindex-XEQTRCV5.js +3 -0
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +1 -1
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -0
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +20 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -0
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +9 -0
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +28 -1
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +1 -1
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.d.ts +50 -23
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +1 -1
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +4 -3
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +9 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +19 -3
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +22 -3
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +17 -3
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +7 -1
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +1 -1
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +22 -6
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +16 -1
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/query-service-fastpath.js +5 -5
- package/dist/query-service-server.js +3 -3
- package/dist/refs-JNK5CLM7.js +2 -0
- package/dist/refs-pagination-6BLRYGMV.js +2 -0
- package/dist/reindex-worker.js +25 -25
- package/dist/reindex.d.ts +3 -2
- package/dist/reindex.js +35 -35
- package/dist/runtime.d.ts +34 -2
- package/dist/runtime.js +4 -4
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-H-n59izO.d.ts → scip-cli-DOerTq-R.d.ts} +42 -4
- package/dist/slice-PHPVNCWX.js +2 -0
- package/dist/surface-MQX5MPIV.js +2 -0
- package/dist/symbol-resolution-DBLVXLBC.js +2 -0
- package/dist/system-JOPKV4OG.js +2 -0
- package/dist/trace-I2P2YFH4.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-JJVMF7NP.js +2 -0
- package/dist/watch-server.js +3 -3
- package/docs/COMMAND_REFERENCE.md +2 -2
- package/docs/DETECTOR_GUIDE.md +51 -12
- package/docs/accuracy-audit-checklist.md +36 -13
- package/docs/locality-analyzer-design.md +9 -9
- package/package.json +2 -2
- package/skills/conductor/SKILL.md +110 -0
- package/skills/conductor/agents/openai.yaml +4 -0
- package/skills/principal-maintainability-review/SKILL.md +273 -0
- package/skills/principal-maintainability-review/agents/openai.yaml +4 -0
- package/skills/scip-calibrate/SKILL.md +102 -0
- package/skills/scip-calibrate/agents/openai.yaml +4 -0
- package/skills/scip-claim-audit/SKILL.md +113 -0
- package/skills/scip-claim-audit/agents/openai.yaml +4 -0
- package/skills/scip-probe-reachability/SKILL.md +93 -0
- package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
- package/skills/scip-root-cause/SKILL.md +160 -0
- package/skills/scip-root-cause/agents/openai.yaml +4 -0
- package/skills/scip-system-compression/SKILL.md +252 -0
- package/skills/scip-system-compression/agents/openai.yaml +4 -0
- package/skills/scip-system-compression/references/compression-atlas.md +116 -0
- package/skills/scip-system-compression/references/compression-patterns.md +87 -0
- package/skills/scip-twin-drift/SKILL.md +109 -0
- package/skills/scip-twin-drift/agents/openai.yaml +4 -0
- package/dist/by-kind-4IYG2SKW.js +0 -2
- package/dist/call-graph-WQNXMNNN.js +0 -2
- package/dist/call-graph-evidence-lZa2dwQA.d.ts +0 -11
- package/dist/chunk-2BTJALUS.js +0 -454
- package/dist/chunk-3QXC54FQ.js +0 -3
- package/dist/chunk-3TJY6M3B.js +0 -7
- package/dist/chunk-42W3LFUK.js +0 -13
- package/dist/chunk-4GAQ6FI4.js +0 -43
- package/dist/chunk-6NC3YSPY.js +0 -38
- package/dist/chunk-6VEFRPTD.js +0 -5
- package/dist/chunk-7C26EKLZ.js +0 -4
- package/dist/chunk-7JYHQAH2.js +0 -22
- package/dist/chunk-7KSO2OAP.js +0 -2
- package/dist/chunk-7XZGZBSQ.js +0 -2
- package/dist/chunk-A77SCPW2.js +0 -3
- package/dist/chunk-AK3PYTIK.js +0 -5
- package/dist/chunk-AMIMMNA4.js +0 -11
- package/dist/chunk-AUY5BL74.js +0 -2
- package/dist/chunk-BDHFVH2M.js +0 -18
- package/dist/chunk-BECZLYNU.js +0 -8
- package/dist/chunk-BUTEIZKP.js +0 -10
- package/dist/chunk-BWVQP3LB.js +0 -38
- package/dist/chunk-BYDAFMSR.js +0 -57
- package/dist/chunk-BZYSGZRK.js +0 -2
- package/dist/chunk-C7IJMOFP.js +0 -134
- package/dist/chunk-CBBHFNLX.js +0 -2
- package/dist/chunk-D2MVJSP4.js +0 -21
- package/dist/chunk-D35XIZGN.js +0 -2
- package/dist/chunk-DKM723YF.js +0 -79
- package/dist/chunk-DRENNWRG.js +0 -2
- package/dist/chunk-E44IVWIJ.js +0 -367
- package/dist/chunk-EDMB6SSO.js +0 -7
- package/dist/chunk-EETGXQY7.js +0 -3
- package/dist/chunk-FKGQOTKD.js +0 -2
- package/dist/chunk-GH5YSGZL.js +0 -5
- package/dist/chunk-GQIDEID3.js +0 -2
- package/dist/chunk-HCVJR2V4.js +0 -3
- package/dist/chunk-IMKZEXZG.js +0 -2
- package/dist/chunk-ISIQLPJ2.js +0 -61
- package/dist/chunk-IXESDH3J.js +0 -2
- package/dist/chunk-JJ62MTQH.js +0 -40
- package/dist/chunk-JT6XX7QY.js +0 -8
- package/dist/chunk-KFOYCQAJ.js +0 -9
- package/dist/chunk-LRI5OMPE.js +0 -2
- package/dist/chunk-MHIEP7EG.js +0 -4
- package/dist/chunk-NK3JMP22.js +0 -2
- package/dist/chunk-NVSZNESQ.js +0 -2
- package/dist/chunk-OJNK5ALA.js +0 -2
- package/dist/chunk-OXYAWIEA.js +0 -2
- package/dist/chunk-OZETODHH.js +0 -2
- package/dist/chunk-PBUH2P5S.js +0 -3
- package/dist/chunk-PLJUQFQN.js +0 -2
- package/dist/chunk-PLYUVM4F.js +0 -2
- package/dist/chunk-PXXYQK55.js +0 -2
- package/dist/chunk-Q5TA4OY4.js +0 -20
- package/dist/chunk-Q7GBK5T7.js +0 -81
- package/dist/chunk-QLBSG7U5.js +0 -3
- package/dist/chunk-QWKHW6VZ.js +0 -2
- package/dist/chunk-RPL3ARU7.js +0 -16
- package/dist/chunk-SVHTMVA4.js +0 -4
- package/dist/chunk-T6QD2ZQB.js +0 -43
- package/dist/chunk-TD7VKJ2Y.js +0 -117
- package/dist/chunk-TKDNDQA7.js +0 -3
- package/dist/chunk-TQZV7KV4.js +0 -2
- package/dist/chunk-TUSPIVZ3.js +0 -4
- package/dist/chunk-URSGGIZX.js +0 -2
- package/dist/chunk-UT7TADJX.js +0 -2
- package/dist/chunk-V4NG5OMS.js +0 -554
- package/dist/chunk-VTCIYFEK.js +0 -2
- package/dist/chunk-VU6LIWHT.js +0 -2
- package/dist/chunk-VUSKPCUB.js +0 -2
- package/dist/chunk-WN3TCGJ4.js +0 -2
- package/dist/chunk-WSLEJSFR.js +0 -2
- package/dist/chunk-WYZIHUPZ.js +0 -16
- package/dist/chunk-XE33FV5W.js +0 -2
- package/dist/chunk-XGGBK66W.js +0 -4
- package/dist/chunk-XSWYJCAK.js +0 -2
- package/dist/chunk-Y334QQU5.js +0 -3
- package/dist/chunk-Z2AWCTN6.js +0 -2
- package/dist/chunk-ZOXKSQQB.js +0 -2
- package/dist/chunk-ZPASRBLF.js +0 -2
- package/dist/chunk-ZZ3Z7D56.js +0 -2
- package/dist/code-EQJFDT6I.js +0 -2
- package/dist/code-result-json-7UWIWBOO.js +0 -2
- package/dist/command-descriptors-ORNTVNYV.js +0 -342
- package/dist/dataflow-6VL54GX5.js +0 -2
- package/dist/dependence-slice-DT2NUHD2.js +0 -2
- package/dist/deps-DB7H5IKC.js +0 -2
- package/dist/direct-navigation-O3LUAYWQ.js +0 -3
- package/dist/entry-map-6K62RV3D.js +0 -2
- package/dist/files-MSLD7MO6.js +0 -2
- package/dist/hierarchy-IVBXAKFA.js +0 -2
- package/dist/imports-FRAVZ3Y2.js +0 -2
- package/dist/members-KJOJDYGO.js +0 -2
- package/dist/methods-2AYABBT3.js +0 -2
- package/dist/output-continuation-command-JHMPH6NC.js +0 -3
- package/dist/output-pagination-3OFL2MJV.js +0 -19
- package/dist/project-reindex-HYO4WD7Z.js +0 -3
- package/dist/refs-ARMA6XUJ.js +0 -2
- package/dist/refs-pagination-VUGIWN6U.js +0 -2
- package/dist/slice-YOB5YFAM.js +0 -2
- package/dist/surface-VY5EFWTW.js +0 -2
- package/dist/symbol-resolution-DGQN4XIV.js +0 -2
- package/dist/system-2KQ3QD2P.js +0 -2
- package/dist/trace-HTIPTXAE.js +0 -2
- package/dist/value-flow-5FV3VQI7.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as b,b as y,c as m}from"./chunk-MTDBHTSF.js";import{b as f,d as g,
|
|
1
|
+
import{a as b,b as y,c as m}from"./chunk-MTDBHTSF.js";import{b as f,d as g,h as d,w as p}from"./chunk-C7C6AKAT.js";import{a as c}from"./chunk-ZLMXIQLC.js";import{SymbolInformation_Kind as o}from"@c4312/scip";var _=500;function K(n){let s=parseInt(n,10);if(!isNaN(s))return s;let t=n.toLowerCase(),e=y.get(t);if(e!==void 0)return e;for(let[i,l]of b)if(l.toLowerCase().includes(t))return i;return null}function v(n,s,t={}){let{scope:e,limit:i=100}=t,l=K(s);return l===null?[]:h(n,e).map(r=>({row:r,resolvedKind:k(r)})).filter(r=>r.resolvedKind===l).slice(0,i).map(({row:r,resolvedKind:a})=>({symbol:r.symbol,shortName:g(r.symbol),kind:a,kindName:m(a),relativePath:r.relative_path,startLine:r.start_line,endLine:r.end_line}))}function T(n,s={}){let t=I(n,s.scope);for(let e of S(n,s.scope)){let i=k(e);i===null||i===0||t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((e,i)=>i[1]-e[1]||e[0]-i[0]).map(([e,i])=>({kind:e,kindName:m(e),count:i}))}function h(n,s){return p(n,{scope:s}).map(R)}function I(n,s){let t=new Map;for(let e of N(c(n,{scope:s,includeIgnored:!1}))){let i=e.map(()=>"?").join(", "),l=n.all(`SELECT gs.kind AS kind, COUNT(*) AS count
|
|
2
2
|
FROM defn_enclosing_ranges der
|
|
3
3
|
JOIN global_symbols gs ON der.symbol_id = gs.id
|
|
4
4
|
JOIN documents d ON der.document_id = d.id
|
|
@@ -20,4 +20,4 @@ import{a as b,b as y,c as m}from"./chunk-MTDBHTSF.js";import{b as f,d as g,f as
|
|
|
20
20
|
${n.symbolNoiseFor("gs")}
|
|
21
21
|
AND d.relative_path IN (${i})
|
|
22
22
|
ORDER BY d.relative_path, der.start_line, der.end_line, gs.symbol`,...e))}return t}function N(n){let s=[];for(let t=0;t<n.length;t+=_)s.push(n.slice(t,t+_));return s}function R(n){return{symbol:n.symbol,kind:n.kind,documentation:n.documentation,enclosing_symbol:n.enclosingSymbol,relative_path:n.relativePath,start_line:n.startLine,end_line:n.endLine}}function k(n){return n.kind!==null&&n.kind!==0?D(n.kind,n.symbol,n.documentation):C(n.symbol,n.documentation,n.enclosing_symbol)}function D(n,s,t){let e=(t??"").toLowerCase();if(d(s)==="type"){if(e.includes("type "))return o.TypeAlias;if(e.includes("interface "))return o.Interface;if(e.includes("struct "))return o.Struct;if(e.includes("trait "))return o.Trait;if(e.includes("class "))return o.Class}return n}function C(n,s,t){let e=f(n);if("kind"in e)return null;let i=e.descriptors,l=i[i.length-2]??null,u=d(n),r=(s??"").toLowerCase();return u==="type"?r.includes("type ")?o.TypeAlias:r.includes("interface ")?o.Interface:r.includes("struct ")?o.Struct:r.includes("trait ")?o.Trait:r.includes("class ")?o.Class:o.Class:u==="method"?l?.suffix==="type"?o.Method:o.Function:u==="namespace"?o.Module:u!=="term"?null:r.includes("async def ")||r.includes("def ")?o.Function:(t?d(t):l?.suffix??null)==="type"?o.Field:o.Variable}export{v as a,T as b};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-LDXHR5EL.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as y,c as _}from"./chunk-F4FNK44D.js";import{e as k}from"./chunk-WYPL7GF7.js";import{n as C,o as $}from"./chunk-7F45LJKI.js";import{execFileSync as w}from"child_process";import{createRequire as ce}from"module";import{chmodSync as le,existsSync as O}from"fs";import{platform as g,arch as S}from"os";import{dirname as de,join as q}from"path";import{createHash as N,randomUUID as G}from"crypto";import{closeSync as b,createReadStream as U,existsSync as z,fsyncSync as W,mkdirSync as K,openSync as I,renameSync as Q,unlinkSync as Y,writeSync as j}from"fs";import{homedir as X}from"os";import{dirname as D,join as E}from"path";var Z=3e5,ee=256*1024*1024;function F(e,r=process.env){let t=r.SCIP_QUERY_CACHE_DIR??(r.XDG_CACHE_HOME?E(r.XDG_CACHE_HOME,"scip-query"):E(X(),".cache","scip-query"));return E(t,e)}var s=class extends Error{constructor(t,n,i={}){super(n,i.cause===void 0?void 0:{cause:i.cause});this.kind=t;this.name="VerifiedBinaryFetchError"}kind};async function V(e){let{cachePath:r,url:t,expectedSha256:n}=e,i=e.timeoutMs??Z,o=e.maxBytes??ee,d=e.lockWaitMs??i;re(i,o,d);let a=te(t,i,e.signal);try{let c=await A(r,n,o,a.controller.signal);if(c)return{status:"cached",path:r,sha256:c};K(D(r),{recursive:!0});let l=await k(`${r}.fetch.lock`,{waitMs:d,pollMs:25,signal:a.controller.signal});if(!l)throw new s("lock-timeout",`timed out waiting ${d}ms for verified binary cache ownership at ${r}`);try{let p=await A(r,n,o,a.controller.signal);return p?{status:"cached",path:r,sha256:p}:await ne(e,a.controller,o)}finally{l.release()}}catch(c){throw a.controller.signal.aborted?f(a.controller.signal,t):c instanceof s?c:new s("stream",`failed to download ${t}: ${T(c)}`,{cause:c})}finally{clearTimeout(a.timeout),a.detachExternalAbort(),a.controller.signal.aborted||a.controller.abort()}}function re(e,r,t){if(!Number.isFinite(e)||e<=0)throw new TypeError("timeoutMs must be a positive finite number.");if(!Number.isSafeInteger(r)||r<=0)throw new TypeError("maxBytes must be a positive safe integer.");if(!Number.isFinite(t)||t<0)throw new TypeError("lockWaitMs must be a non-negative finite number.")}function te(e,r,t){let n=new AbortController,i=()=>{n.abort(new s("aborted",`download of ${e} was aborted`,{cause:t?.reason}))};t?.addEventListener("abort",i,{once:!0}),t?.aborted&&i();let o=setTimeout(()=>{n.abort(new s("timeout",`download of ${e} timed out after ${r}ms`))},r);return o.unref(),{controller:n,timeout:o,detachExternalAbort:()=>t?.removeEventListener("abort",i)}}async function A(e,r,t,n){if(!z(e))return null;let i=N("sha256"),o=0;try{for await(let a of U(e,{signal:n})){let c=Buffer.isBuffer(a)?a:Buffer.from(a);if(o+=c.length,o>t)return null;i.update(c)}}catch{if(n.aborted)throw f(n,e);return null}let d=i.digest("hex");return d===r?d:null}async function ne(e,r,t){let n=e.fetchImpl??fetch,i;try{i=await L(n(e.url,{signal:r.signal}),r.signal)}catch(l){throw r.signal.aborted?f(r.signal,e.url):new s("stream",`failed to download ${e.url}: ${T(l)}`,{cause:l})}if(!i.ok){let l=new s("http",`failed to download ${e.url}: HTTP ${i.status}`);throw r.abort(l),l}let o=ie(i,t,e.url);if(!i.body)throw new s("stream",`downloaded ${e.url} response has no readable body`);let d=`${e.cachePath}.tmp-${process.pid}-${G()}`,a,c=!1;try{a=I(d,"wx",384),c=!0;let l=i.body.getReader(),p=N("sha256"),h=0;for(;;){let{done:x,value:m}=await L(l.read(),r.signal);if(x)break;if(!(m instanceof Uint8Array))throw new s("stream",`downloaded ${e.url} produced a non-byte stream chunk`);if(h+=m.byteLength,h>t||o!==void 0&&h>o){let R=new s("length",`downloaded ${e.url} exceeded its ${o??t} byte limit`);throw r.abort(R),R}let B=Buffer.from(m.buffer,m.byteOffset,m.byteLength);p.update(B),C(a,B,{writeFile:e.writeImpl??j},"verified binary staging")}if(o!==void 0&&h!==o)throw new s("length",`downloaded ${e.url} length mismatch: declared ${o} bytes, received ${h}`);let v=p.digest("hex");if(v!==e.expectedSha256)throw new s("checksum",`downloaded ${e.url} checksum mismatch: expected ${e.expectedSha256}, got ${v}`);b(a),a=void 0;try{oe(d,e.cachePath,e.renameImpl??Q,e.syncImpl??W)}catch(x){throw new s("install",`failed to install verified binary at ${e.cachePath}`,{cause:x})}return c=!1,{status:"downloaded",path:e.cachePath,sha256:v}}catch(l){throw r.signal.aborted?f(r.signal,e.url):l instanceof s?l:new s("install",`failed to stage verified binary at ${e.cachePath}`,{cause:l})}finally{if(a!==void 0)try{b(a)}catch{}if(c)try{Y(d)}catch{}}}function ie(e,r,t){let n=e.headers?.get("content-length");if(n==null)return;if(!/^\d+$/.test(n))throw new s("length",`downloaded ${t} has an invalid Content-Length header`);let i=Number(n);if(!Number.isSafeInteger(i)||i<0)throw new s("length",`downloaded ${t} has an invalid Content-Length header`);if(i>r)throw new s("length",`downloaded ${t} declares ${i} bytes, above the ${r} byte limit`);return i}function oe(e,r,t,n){ae(e,n),t(e,r),se(D(r),n)}function ae(e,r){let t=I(e,"r");try{r(t)}finally{b(t)}}function se(e,r){let t;try{t=I(e,"r")}catch(n){if($(n,process.platform))return;throw n}try{r(t)}catch(n){if(!$(n,process.platform))throw n}finally{b(t)}}function L(e,r){return r.aborted?Promise.reject(f(r,"operation")):new Promise((t,n)=>{let i=()=>{r.removeEventListener("abort",i),n(f(r,"operation"))};r.addEventListener("abort",i,{once:!0}),e.then(o=>{r.removeEventListener("abort",i),t(o)},o=>{r.removeEventListener("abort",i),n(o)})})}function f(e,r){return e.reason instanceof Error?e.reason:new s("aborted",`verified binary operation for ${r} was aborted`)}function T(e){return e instanceof Error?e.message:String(e)}var u="v0.8.1",J="https://github.com/sourcegraph/scip",P=`github.com/sourcegraph/scip/cmd/scip@${u}`,ue=ce(import.meta.url),fe={"scip-darwin-amd64.tar.gz":"39f18be957d350bcd9ed5cb12d7781b0e237a5cb2429a107feaf9ce2d1dcd5d5","scip-darwin-arm64.tar.gz":"5b3f4a2fb1dc10c599cb3422ed0406a739060e4ac0b1222c0f43630dd0dd8221","scip-linux-amd64.tar.gz":"16b79ed98f893abd530cfa63f333527f1351008b4a23e02b9e522e34d1da6596","scip-linux-arm64.tar.gz":"876dfb680119dd6e5713077c49b27701102d598bdeba94c809173276d399c7e2"},pe="SCIP_QUERY_SCIP_BIN";function Oe(e=process.env){return e.SCIP_QUERY_SQLITE_CONVERTER==="scip-cli"}function he(e){let r=e.env[pe];if(r&&e.fileExists(r))return{source:"env",path:r};let t=e.resolveCached?.()??null;if(t)return{source:"cache",path:t};if(e.isOnPath("scip"))return{source:"path",path:"scip"};if(e.platform==="win32"){let n=e.resolveSidecar(e.arch);if(n&&e.fileExists(n))return{source:"sidecar",path:n}}return null}function me(e){for(let r of e==="arm64"?["arm64","x64"]:[e])try{return ue.resolve(`scip-query-scip-windows/scip-win32-${r}.exe`)}catch{}return null}function M(e=process.env){return ge(e)?.path??null}function ge(e=process.env){let r=he({platform:g(),arch:S(),env:e,isOnPath:y,fileExists:O,resolveSidecar:me,resolveCached:()=>ye(e)});return r?.source==="path"?{source:"path",path:_("scip")??r.path}:r}function H(e=process.env){return F(q("scip",u,"scip"),e)}function ye(e){let r=H(e);return O(r)?r:null}function be(e){return e!==null&&e.includes(u.replace(/^v/,""))}function we(){let e=M();if(!e)return null;try{return w(e,["--version"],{stdio:"pipe",timeout:1e4,killSignal:"SIGKILL"}).toString().trim()}catch{return null}}function Se(e=g(),r=S()){let t=ve(e,r);if(!t)return null;let n=fe[t.filename];return n?{...t,sha256:n}:null}function ve(e=g(),r=S()){let t,n,i;switch(e){case"darwin":t="darwin",i="tar.gz";break;case"linux":t="linux",i="tar.gz";break;default:return null}switch(r){case"arm64":n="arm64";break;case"x64":n="amd64";break;default:return null}let o=`scip-${t}-${n}.${i}`;return{url:`${J}/releases/download/${u}/${o}`,filename:o}}var xe={fetch:V,extract:(e,r)=>{w("tar",["-xzf",e,"-C",r,"scip"],{stdio:"pipe",timeout:12e4,killSignal:"SIGKILL"})},markExecutable:e=>le(e,493),probeVersion:e=>Ee(e),env:process.env};async function $e(e,r={}){let t={...xe,...r},n=Se();if(!n)return e(`No reviewed scip ${u} release archive is published for ${g()}/${S()}.`),null;let i=H(t.env),o=de(i),d=q(o,n.filename);e(`Downloading reviewed scip ${u} (${n.filename}, sha256 ${n.sha256.slice(0,12)}\u2026).`);try{let c=await t.fetch({cachePath:d,url:n.url,expectedSha256:n.sha256});t.extract(c.path,o),t.markExecutable(i)}catch(c){return e(`Could not install scip ${u}: ${c instanceof Error?c.message:String(c)}`),null}let a=t.probeVersion(i);return be(a)?(e(`Installed reviewed scip ${u} at ${i}.`),i):(e(`Installed scip at ${i} did not report ${u} (reported: ${a??"unavailable"}).`),null)}function Ee(e){try{return w(e,["--version"],{stdio:"pipe",timeout:1e4,killSignal:"SIGKILL"}).toString().trim()}catch{return null}}async function qe(e,r={}){if(g()!=="win32"&&await $e(e,r)!==null)return!0;if(y("go")){e(`Installing immutable ${P} via go install into the Go bin directory (GOBIN or GOPATH/bin); expected executable: scip.`);try{if(w("go",["install",P],{stdio:"inherit",timeout:3e5,env:process.env}),y("scip")){let t=M(),n=we();if(t&&n&&n.includes(u))return e(`Successfully installed ${P}; resolved executable: ${t}; reported version: ${n}.`),!0;e(`go install completed, but the resolved scip executable did not report ${u} (executable: ${t??"unresolved"}; version: ${n??"unavailable"}).`)}}catch(t){let n=t instanceof Error?t.message:String(t);e(`go install failed: ${n}`)}}return e("Could not auto-install scip CLI."),e(`Install manually from: ${J}/releases/tag/${u}`),!1}export{u as a,Oe as b,M as c,ge as d,be as e,we as f,$e as g,qe as h};
|
|
2
|
+
//# sourceMappingURL=chunk-LEECKFCJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as L}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as L}from"./chunk-NSM5IEVW.js";import{A as p,o as h}from"./chunk-C7C6AKAT.js";import{h as f,j as g}from"./chunk-ETC674NS.js";function z(o,b){let s=L(o,b);if(!s)return[];let i=p(o,[s],{sort:!0});if(i.length===0)return[];let y=Math.max(0,g(f(o,s)).length-1),r=i.map(e=>({symbol:e.symbol,shortName:e.shortName,startLine:e.startLine,endLine:Math.min(e.endLine,y),signature:e.signature,children:[]})),l=new Map;for(let e of r)l.set(e.symbol,e);let m=[];for(let e=0;e<i.length;e++){let a=i[e],n=r[e];if(a.enclosingSymbol&&l.has(a.enclosingSymbol)){l.get(a.enclosingSymbol).children.push(n);continue}let c=null,u=1/0;for(let t of r)if(t!==n&&t.startLine<=n.startLine&&t.endLine>=n.endLine){if(t.startLine===n.startLine&&t.endLine===n.endLine&&!h(t.symbol,n.symbol))continue;let d=t.endLine-t.startLine;d<u&&(u=d,c=t)}c?c.children.push(n):m.push(n)}return m}export{z as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MHGDSBFX.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as f}from"./chunk-
|
|
1
|
+
import{c as f}from"./chunk-2BMSSRBH.js";import{a as b,d as g}from"./chunk-NJQISBL4.js";import{d as m}from"./chunk-C7C6AKAT.js";import{B as a,x as u,y as _}from"./chunk-RBAD4GJ2.js";import{a as l}from"./chunk-ZLMXIQLC.js";import{h as p}from"./chunk-ETC674NS.js";function B(e,t={}){let{scope:o,limit:r}=t,i=new f(e),s=T([...x(e,o),...y(e,i,o)]);return F(s),r?s.slice(0,r):s}function x(e,t){let o=[];for(let r of N(e,t)){if(e.isIgnored(r.barrel_path)||e.isIgnored(r.original_path)||g(e,r.barrel_path)||p(e,r.barrel_path)&&a(e,r.barrel_path).length===0)continue;let i=I(e,r),s=i?.barrel_consumers??0,n=i?.direct_consumers??0;s!==0||n!==0||o.push({barrelFile:r.barrel_path,symbol:r.symbol,shortName:m(r.symbol),originalFile:r.original_path,barrelConsumers:s,directConsumers:n,...h(e,r.barrel_path)})}return o}function N(e,t){let o=t?"AND barrel_d.relative_path LIKE ?":"",r=t?[`%${t}%`]:[];return e.all(`WITH barrel_refs AS MATERIALIZED (
|
|
2
2
|
SELECT DISTINCT
|
|
3
3
|
barrel_d.id AS barrel_doc_id,
|
|
4
4
|
barrel_d.relative_path AS barrel_path,
|
|
@@ -71,4 +71,4 @@ import{c as f}from"./chunk-PLYUVM4F.js";import{a as b,d as g}from"./chunk-BECZLY
|
|
|
71
71
|
${e.pathExclusionsFor("consumer_d")}
|
|
72
72
|
GROUP BY consumer_d.id
|
|
73
73
|
)`,t.barrel_doc_id,t.symbol_id,t.barrel_doc_id,t.original_doc_id)}function y(e,t,o){let r=[],i=C(e);for(let s of O(e,o))E(i,s,s)>0||r.push(...D(e,t,s,i));return r}function O(e,t){return l(e,{scope:t,includeIgnored:!1}).filter(o=>a(e,o).length>0||u(e,o).length>0)}function D(e,t,o,r){let i=a(e,o).filter(n=>n.sourcePath&&!e.isIgnored(n.sourcePath)).flatMap(n=>R(e,t,o,n.sourcePath,r,[A(n.specifier)])),s=u(e,o).filter(n=>n.sourcePath&&!e.isIgnored(n.sourcePath)).flatMap(n=>R(e,t,o,n.sourcePath,r,n.kind==="named"&&n.names.length>0?n.names:[n.kind==="star"?`* from ${n.sourcePath}`:`* namespace from ${n.sourcePath}`]));return[...i,...s]}function R(e,t,o,r,i,s){let n=t.definitionsForFile(r);return s.map(c=>{let d=n.find(S=>S.leaf===c);return{barrelFile:o,symbol:d?.symbol??`source-reexport:${o}:${c}`,shortName:d?m(d.symbol):c,originalFile:r,barrelConsumers:0,directConsumers:E(i,r,o),...h(e,o)}})}function A(e){return e.split("::").at(-1)?.split("/").at(-1)?.replace(/\.[^.]+$/,"")??e}function h(e,t){return b(e,t)?{actionTier:"signal",surfaceEvidence:["barrel file is declared on the package public surface"],recommendation:"Review the package API before removing this re-export; local consumers are zero, but external consumers may import through the public barrel."}:{actionTier:"direct",surfaceEvidence:[],recommendation:"Remove this unused re-export when the barrel is not part of an external API surface."}}function C(e){let t=new Map;for(let o of l(e,{includeIgnored:!1}))for(let r of _(e,o)){if(!r.sourcePath)continue;let i=t.get(r.sourcePath)??new Set;i.add(o),t.set(r.sourcePath,i)}return t}function E(e,t,o){let r=e.get(t);return r?r.size-(r.has(o)?1:0):0}function T(e){let t=new Set,o=[];for(let r of e){let i=`${r.barrelFile}|${r.symbol}|${r.originalFile}`;t.has(i)||(t.add(i),o.push(r))}return o}function F(e){e.sort((t,o)=>o.directConsumers-t.directConsumers||t.barrelFile.localeCompare(o.barrelFile)||t.shortName.localeCompare(o.shortName))}export{B as a};
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-MLQVVDG3.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as H,b as U,c as pe,e as de,f as ue,g as B,h as _,l as me}from"./chunk-FVFDOIM3.js";import{T as R,U as he,c as se,d as ae,e as ce,f as le,g as K,n as fe}from"./chunk-2VAHDDLM.js";import{a as O}from"./chunk-YXPUP5G2.js";import{d as L,e as ye}from"./chunk-BL6DCHQP.js";import{d as oe}from"./chunk-ATXPTSEI.js";import{c as ie}from"./chunk-IW5XQG5G.js";import{a as A,e as x}from"./chunk-HGFDYOVB.js";import{X as re,aa as $}from"./chunk-7HXT6YLU.js";import{h as ne}from"./chunk-7F45LJKI.js";import{existsSync as E}from"fs";import b from"path";var J=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"];function z(o,e){let t=e?b.dirname(b.join(o,e)):o,r=b.resolve(o);for(;t.startsWith(r);){for(let s of J){let a=b.join(t,s);if(E(a))return a}let i=b.dirname(t);if(i===t)break;t=i}for(let i of J){let s=b.join(o,i);if(E(s))return s}return null}function ge(o){let e=o.config.projectRoot,n=new Set(Be(e,o.config.semantic?.typescript?.tsconfigs)),t=O(o,{includeIgnored:!1,extensions:H});for(let r of t){let i=z(e,r);i&&n.add(b.resolve(i))}if(n.size===0){let r=z(e);r&&n.add(b.resolve(r))}return[...n].filter(r=>!Se(e,r)).sort((r,i)=>r.localeCompare(i))}function Be(o,e=[]){let n=new Set;for(let t of e){let r=b.isAbsolute(t)?t:b.join(o,t);E(r)&&n.add(b.resolve(r))}for(let t of _e(o))for(let r of J){let i=b.join(t,r);E(i)&&n.add(b.resolve(i))}if(n.size===0){let t=z(o);t&&n.add(b.resolve(t))}return[...n].filter(t=>!Se(o,t)).sort((t,r)=>t.localeCompare(r))}function _e(o){let e=b.join(o,"package.json");if(!E(e))return[];let n;try{n=JSON.parse(ne(e,"project package manifest"))}catch{return[]}return(Array.isArray(n.workspaces)?n.workspaces:n.workspaces?.packages??[]).flatMap(r=>le(o,r))}function Se(o,e){let n=b.relative(o,e).replace(/\\/g,"/");return n.startsWith("..")||n.includes("/node_modules/")||n.startsWith("node_modules/")||n.includes("/dist/")||n.startsWith("dist/")}import{performance as g}from"perf_hooks";function I(o,e,n){if(o.has(e))return o.get(e);let t=n();return o.set(e,t),t}import Ie from"path";import{realpathSync as be}from"fs";function We(o,e){return o.getReferences().map(n=>{let t=n.getNode();return W(t,e)})}function $e(o){let e=o;return typeof e.findReferences=="function"?e.findReferences():[]}function xe(o,e,n,t){let r=[];for(let i of $e(o))for(let s of We(i,t))s.file===e.relativePath&&s.line>=e.startLine&&s.line<=e.endLine||r.push(s);for(let i of n)r.push(i);return P(r)}function Fe(o,e,n,t){let r=[],i=n?.getStart();for(let s of o.getReferences()){let a=s.getNode();w(t,a.getSourceFile().getFilePath())===e&&(i!==void 0&&a.getStart()===i||r.push({location:W(a,t),node:a}))}return r}function W(o,e){let n=o.getSourceFile(),t=n.getLineAndColumnAtPos(o.getStart());return{file:w(e,n.getFilePath())??n.getBaseName(),line:t.line-1,column:t.column-1}}function Te(o,e,n){let t=o.getSourceFile(),r=q(t,o),i=o.getText(),s=new RegExp(`\\b${fe(i)}\\b`,"g"),a=t.getFullText().split(`
|
|
2
|
+
`),c=[];for(let f=0;f<a.length;f++){if(f===r)continue;let l=a[f]??"";s.lastIndex=0;let p;for(;(p=s.exec(l))!==null;)c.push({file:e,line:f,column:p.index})}return P(c.filter(f=>w(n,Ie.join(n,f.file))===e))}function V(o){for(let e=o;e;e=e.getParent()){let n=e.getKindName();if(n.includes("Type")||n==="InterfaceDeclaration"||n==="TypeAliasDeclaration")return!0;if(n==="CallExpression"||n==="NewExpression"||n==="ExpressionStatement")return!1}return!1}function q(o,e){return o.getLineAndColumnAtPos(e.getStart()).line-1}function P(o){let e=new Set,n=[];for(let t of o){let r=`${t.file}:${t.line}:${t.column}`;e.has(r)||(e.add(r),n.push(t))}return n}function w(o,e){let n=o||process.cwd(),t=Me(n,e);if(t)return t;try{return Me(be(n),be(e))}catch{return null}}function Me(o,e){let n=Ie.relative(o,e).replace(/\\/g,"/");return!n||n===".."||n.startsWith("../")?null:n}function ke(o,e,n,t){let r=Ke(e,t);return r.size===0?new Map:Je(o,n,r)}function Ke(o,e){let n=new Map;for(let t of R(o,e)){let r=L(t.symbol)??t.leaf;if(!r)continue;let i=n.get(r);i||(i=[],n.set(r,i)),i.push(t)}return n}function Je(o,e,n){let t=new Map,r=new Map;return e.forEachDescendant(i=>{for(let s of ze(o,i)){let a=n.get(s);if(!a)continue;let c=q(e,i);for(let f of a){if(c<f.startLine-1||c>f.endLine+1)continue;let l=Math.abs(c-f.startLine),p=r.get(f.symbolId);p!==void 0&&p<=l||(r.set(f.symbolId,l),t.set(f.symbolId,i))}}}),t}function ze(o,e){let n=[],t=r=>{r&&!n.includes(r)&&n.push(r)};if("getNameNode"in e&&typeof e.getNameNode=="function"){let r=e.getNameNode();t(r?.getText())}if("getName"in e&&typeof e.getName=="function"){let r=e.getName();t(r)}return o.Node.isIdentifier(e)&&t(e.getText()),n}var Ve=ie("ts-definition-leaf-candidates",{clearGroups:["definition-catalog"]});function De(o,e,n,t){let r=X(o,e),i=Y(r.get(t)??[],n);if(i)return i;let s=[];for(let a of r.values())for(let c of a)((c.leaf||L(c.symbol)||"").includes(t)||c.symbol.includes(t))&&s.push(c);return Y(s,n)}function G(o,e,n,t){return Y(X(o,e).get(t)??[],n)}function Ce(o,e){let n=new Map;for(let[t,r]of X(o,e)){let i=r[0];i&&n.set(t,i)}return n}function X(o,e){return Ve.get(o,e,()=>{let n=new Map;for(let t of R(o,e)){let r=t.leaf||L(t.symbol);if(!r)continue;let i=n.get(r);i||(i=[],n.set(r,i)),i.push({...t,leaf:r})}for(let t of n.values())t.sort((r,i)=>r.startLine-i.startLine||r.endLine-i.endLine||r.symbolId-i.symbolId);return n})}function Y(o,e){let n=null,t=Number.POSITIVE_INFINITY;for(let r of o){let i=Math.abs(r.startLine-e);(i<t||i===t&&n&&r.startLine<n.startLine)&&(n=r,t=i)}return n}import qe from"path";import{realpathSync as Ye}from"fs";function Ne(o,e){let n=new Map,t=new Map,r=null,i=()=>(r??=O(o,{extensions:H}),r),s=f=>I(t,f,()=>x("typescript.source-file-index",()=>{let l=new Map;for(let p of f.project.getSourceFiles())ve(l,p);return{project:f.project,sourceFiles:l}},()=>({tsconfigPath:f.tsconfigPath,indexedDocuments:i().length}))),a=(f,l)=>{let p=s(f),d=p.sourceFiles.get(l)??null;return d||(d=f.project.addSourceFileAtPathIfExists(l)??null,d&&ve(p.sourceFiles,d)),d?{project:p.project,sourceFile:d}:null},c=f=>U(f)?I(n,f,()=>{let l=Ge(o.config.projectRoot,f);if(!l)return null;for(let m of e){if(!m.loaded)continue;let u=s(m).sourceFiles.get(l);if(u)return{project:m.project,sourceFile:u}}let p=e.find(m=>m.fileNames?.has(l));if(p)return a(p,l);for(let m of e){if(!m.loaded)continue;let u=a(m,l);if(u)return u}let d=e[0];return d?a(d,l):null}):null;return{sourceFile:f=>c(f)?.sourceFile??null,sourceFileMatch:c,indexedTypeScriptLikeDocuments:i}}function ve(o,e){let n=Z(e.getFilePath());o.set(n,e);try{o.set(Z(Ye(n)),e)}catch(t){if(!$(t))throw t}}function Ge(o,e){try{return Z(re(o,e,{inputKind:"indexed TypeScript source file"}).absolutePath)}catch(n){if(!$(n))throw n;return null}}function Z(o){return qe.resolve(o)}function Q(o,e){for(let n of o)if(e===n.name||e.startsWith(`${n.name}/`))return n.name;return null}function Re(o){let e=`${o.relativeDir}/src`;return[`${e}/index.ts`,`${e}/index.tsx`,`${e}/index.mts`,`${e}/index.cts`]}var Xe=32;function rn(o,e){let n=x("typescript.provider.load",()=>pe());if(!n)return _("ts-morph is not installed");let t=x("typescript.provider.tsconfig-discovery",()=>ge(o));if(t.length===0)return _("no tsconfig found");try{let r=x("typescript.provider.project-bundles",()=>de(n,t),()=>({tsconfigs:t.length}));return Ze(o,n,r)}catch(r){return _(r instanceof Error?r.message:String(r),t[0],t)}}function Ze(o,e,n,t={}){return x("typescript.provider.construct",()=>new ee(o,e,n),()=>({tsconfigs:n.length,reusedProjects:t.reusedProjects===!0}))}var ee=class{constructor(e,n,t){this.db=e;this.tsMorph=n;this.projects=t;this.workspacePackages=ce(e.config.projectRoot),this.sourceFiles=Ne(e,t)}db;tsMorph;projects;language="typescript";importUsageCache=new Map;referencesCache=new Map;calleesCache=new Map;fileCalleesCache=new Map;signatureCache=new Map;definitionNodeCache=new Map;fileDefinitionNodeCache=new Map;indexedDefinitionLeafCache=new Map;compilerCheckerCache=new WeakMap;packageImportReferenceIndex=null;packageExportIndex=null;workspacePackages;sourceFiles;availability(){let e=B(this.projects);return{available:!0,tsconfigPath:this.projects[0]?.tsconfigPath,tsconfigPaths:this.projects.map(n=>n.tsconfigPath),projectScope:e?"file-closure":"project",...e?{note:"compiler projects are file-scoped: callees, signatures, and import usage are served per file; references and hierarchies are unavailable"}:{}}}attachBatchFiles(e){if(B(this.projects))for(let n of new Set(e.map(t=>t.relativePath)))this.sourceFiles.sourceFile(n)}assertProjectWide(){if(B(this.projects))throw new Error(ue)}importUsage(e){return I(this.importUsageCache,e,()=>{let n=this.sourceFiles.sourceFile(e);if(!n)return[];let t=et();return x("typescript.import-usage.file",()=>this.importUsageForSourceFile(e,n,t),()=>({file:e,...t}))})}referencesFor(e){return I(this.referencesCache,e.symbolId,()=>{let n=this.nodeForDefinition(e);return this.referencesForDefinitionNode(e,n)})}referencesForDefinitions(e,n={}){this.assertProjectWide();let t=new Map,r=A(),i=[];for(let l of e){let p=this.referencesCache.get(l.symbolId);p?t.set(l.symbolId,p):i.push(l)}if(i.length===0)return t;let s=i,a=n.exact?[]:i.filter(l=>!Le(l));if(a.length>=Xe){let l=this.referencesForDefinitionsBySymbolScan(a);for(let p of a){let d=l.get(p.symbolId)??[];this.referencesCache.set(p.symbolId,d),t.set(p.symbolId,d)}if(s=i.filter(p=>Le(p)),s.length===0)return t}let c=new Map;for(let l of s){let p=c.get(l.relativePath);p?p.push(l):c.set(l.relativePath,[l])}let f=[];for(let[l,p]of c){let d=Ee();x("typescript.references-map.file",()=>{let m=this.definitionNodesForFile(l);for(let u of p){r&&(d.cacheMisses+=1);let S=m.get(u.symbolId)??null;r&&(S?d.nodeHits+=1:d.nodeMisses+=1);try{let y=this.referencesForDefinitionNode(u,S,r?d:void 0);this.referencesCache.set(u.symbolId,y),t.set(u.symbolId,y)}catch{d.preciseSearchFailures+=1,f.push(u)}}},()=>({relativePath:l,definitions:p.length,...Ae(d)}))}if(f.length>0){let l=this.referencesForDefinitionsBySymbolScan(f);for(let p of f){let d=l.get(p.symbolId)??[];this.referencesCache.set(p.symbolId,d),t.set(p.symbolId,d)}}return t}referenceFragmentsForFiles(e){this.assertProjectWide();let n=he(this.db).filter(i=>U(i.relativePath)),t=e.filter(i=>this.sourceFiles.sourceFile(i)!==null),r=this.referencesForDefinitionsBySymbolScan(n,t);return me(n,r,t)}referencesForDefinitionsBySymbolScan(e,n){let t=A(),r=Ee(),i=new Map,s=new Set(e.map(c=>c.symbolId)),a=new Map(e.map(c=>[c.symbolId,c]));for(let c of e)i.set(c.symbolId,[]);return x("typescript.references-map.inverted-scan",()=>{let c=t?g.now():0,f=n?this.packageImportReferencesForFiles(n):this.packageImportReferences();for(let y of e){let h=f.get(y.symbolId)??[];if(h.length>0){let T=i.get(y.symbolId)??[];T.push(...h),i.set(y.symbolId,T)}t&&(r.packageReferenceCount+=h.length)}t&&(r.packageRefsMs+=g.now()-c);let l=new Map,p=new Map,d=this.hierarchyTargetsForDefinitions(e),m=new Set(e.map(y=>y.leaf).filter(Boolean)),u=t?g.now():0;for(let y of n??this.sourceFiles.indexedTypeScriptLikeDocuments()){if(this.db.isIgnored(y))continue;let h=this.sourceFiles.sourceFile(y);h&&(t&&(r.scanFiles+=1),this.addReferencesFromSourceFileScan(h,y,s,a,d,m,l,p,i,t?r:void 0))}t&&(r.scanMs+=g.now()-u);let S=t?g.now():0;this.addHierarchyMemberReferences(e,i,t?r:void 0),t&&(r.hierarchyMs+=g.now()-S);for(let[y,h]of i){let T=P(h);i.set(y,T),t&&(r.referenceCount+=T.length)}},()=>({definitions:e.length,...Ae(r)})),i}addReferencesFromSourceFileScan(e,n,t,r,i,s,a,c,f,l){let p=this.compilerCheckerForSourceFile(e),d=e.compilerNode,m=rt(e),u=S=>{if(this.tsMorph.ts.isIdentifier(S)){if(l&&(l.identifiers+=1),!s.has(S.text)&&!m.has(S.text)){this.tsMorph.ts.forEachChild(S,u);return}let y=this.compilerReferenceSymbol(p,S,l);if(y){let h;a.has(y)?h=a.get(y)??null:(h=this.referenceDefinitionFromCompilerSymbol(y),a.set(y,h)),l&&(h?l.targetHits+=1:l.targetMisses+=1);let T=I(c,y,()=>this.compilerSymbolKeys(y)),v=null,k=null,N=h&&t.has(h.symbolId)?r.get(h.symbolId):void 0;if(N&&(v=j(d,S),!we(N,n,v))){let C=d.getLineAndCharacterOfPosition(S.getStart(d));k={file:n,line:C.line,column:C.character};let D=f.get(N.symbolId)??[];D.push(k),f.set(N.symbolId,D),l&&(l.requestedHits+=1)}for(let C of T)for(let D of i.get(C)?.values()??[]){if(v??=j(d,S),we(D,n,v))continue;if(!k){let F=d.getLineAndCharacterOfPosition(S.getStart(d));k={file:n,line:F.line,column:F.character}}let M=f.get(D.symbolId)??[];M.push(k),f.set(D.symbolId,M),l&&(l.requestedHits+=1)}}}this.tsMorph.ts.forEachChild(S,u)};u(d)}hierarchyTargetsMemo=null;hierarchyTargetsForDefinitions(e){let n=at(e);if(this.hierarchyTargetsMemo?.key===n)return this.hierarchyTargetsMemo.targets;let t=oe(this.db),r=`definitions:${n}`,i=!1,s=x("typescript.references-map.hierarchy-targets",()=>{if(t){let c=je.read(this.db,r,t);if(c&&c.projectRoot===this.db.config.projectRoot)return i=!0,st(c,e)}let a=this.computeHierarchyTargets(e);return t&&je.write(this.db,r,t,{version:Ue,projectRoot:this.db.config.projectRoot,entries:[...a].map(([c,f])=>[c,[...f.values()].map(l=>l.symbol)])}),a},()=>({definitions:e.length,hit:i}));return this.hierarchyTargetsMemo={key:n,targets:s},s}computeHierarchyTargets(e){let n=new Map;for(let t of e){let r=this.nodeForDefinition(t),i=r?.compilerNode;if(!i||!this.isHierarchyMethod(i))continue;let s=i.parent;if(!this.isHierarchyContainer(s))continue;let a=this.compilerCheckerForSourceFile(r.getSourceFile()),c=a.getSymbolAtLocation(i.name);if(c)for(let f of this.hierarchyMemberSymbols(a,s,c))for(let l of this.compilerSymbolKeys(f)){let p=n.get(l)??new Map;p.set(t.symbolId,t),n.set(l,p)}}return n}hierarchyMemberSymbols(e,n,t){let r=new Set,i=new Set,s=(a,c,f)=>{if(!i.has(a)){i.add(a),r.add(c);for(let l of f){let p=l.getProperty(t.name);p&&s(l,p,this.hierarchyAncestorTypesForType(e,l))}}};return s(e.getTypeAtLocation(n),t,this.hierarchyAncestorTypes(e,n)),r}addHierarchyMemberReferences(e,n,t){let r=new Map;for(let i of e){let s=this.nodeForDefinition(i),a=s?.compilerNode;if(!a||!this.isHierarchyMethod(a))continue;let c=a.parent;if(!this.isHierarchyContainer(c))continue;let f=this.compilerCheckerForSourceFile(s.getSourceFile()),l=f.getSymbolAtLocation(a.name);if(!l)continue;let p=a.getSourceFile(),d=p.getLineAndCharacterOfPosition(a.name.getStart(p)),m={definition:i,location:{file:i.relativePath,line:d.line,column:d.character}},u=n.get(i.symbolId)??[];for(let y of this.hierarchyMemberSymbols(f,c,l))if(y!==l)for(let h of this.compilerSymbolLocations(y))u.push(h),t&&(t.hierarchyReferences+=1);n.set(i.symbolId,u);let S=this.hierarchyRootMemberSymbols(f,c,l);for(let y of S){let h=r.get(y)??new Map;h.set(i.symbolId,m),r.set(y,h)}t&&(t.hierarchyDefinitions+=1)}for(let i of r.values())if(!(i.size<2)){t&&(t.hierarchyFamilies+=1);for(let{definition:s}of i.values()){let a=n.get(s.symbolId)??[];for(let c of i.values())c.definition.symbolId!==s.symbolId&&(a.push(c.location),t&&(t.hierarchyReferences+=1));n.set(s.symbolId,a)}}}hierarchyRootMemberSymbols(e,n,t){let r=new Set,i=new Set,s=(a,c,f)=>{if(i.has(a))return;i.add(a);let l=!1;for(let p of f){let d=p.getProperty(t.name);d&&(l=!0,s(p,d,this.hierarchyAncestorTypesForType(e,p)))}if(!l)for(let p of this.compilerSymbolKeys(c))r.add(p)};return s(e.getTypeAtLocation(n),t,this.hierarchyAncestorTypes(e,n)),r}compilerSymbolKeys(e){return(e.declarations??[]).map(n=>{let t=n.getSourceFile();return`${t.fileName}\0${n.getStart(t)}\0${e.name}`})}compilerSymbolLocations(e){let n=[];for(let t of e.declarations??[]){let r=t.getSourceFile(),i=w(this.db.config.projectRoot,r.fileName);if(!i)continue;let s=t.name,a=r.getLineAndCharacterOfPosition((s??t).getStart(r));n.push({file:i,line:a.line,column:a.character})}return n}baseTypes(e,n){try{return e.getBaseTypes(n)??[]}catch{return[]}}hierarchyAncestorTypes(e,n){let t=new Set(this.hierarchyAncestorTypesForType(e,e.getTypeAtLocation(n)));for(let r of n.heritageClauses??[])for(let i of r.types)t.add(e.getTypeAtLocation(i));return[...t]}hierarchyAncestorTypesForType(e,n){let t=new Set(this.baseTypes(e,n));for(let r of n.getSymbol()?.declarations??[])if(this.isHierarchyContainer(r))for(let i of r.heritageClauses??[])for(let s of i.types)t.add(e.getTypeAtLocation(s));return[...t]}isHierarchyMethod(e){return this.tsMorph.ts.isMethodDeclaration(e)||this.tsMorph.ts.isMethodSignature(e)}isHierarchyContainer(e){return this.tsMorph.ts.isClassDeclaration(e)||this.tsMorph.ts.isClassExpression(e)||this.tsMorph.ts.isInterfaceDeclaration(e)}compilerReferenceSymbol(e,n,t){t&&(t.symbolLookups+=1);let r=e.getSymbolAtLocation(n);if(r){if((r.flags&this.tsMorph.ts.SymbolFlags.Alias)===0)return r;try{return t&&(t.aliasResolutions+=1),e.getAliasedSymbol(r)}catch{return r}}}calleesFor(e){return I(this.calleesCache,e.symbolId,()=>I(this.fileCalleesCache,e.relativePath,()=>this.calleeMapForFile(e.relativePath)).get(e.symbolId)??[])}calleesForDefinitions(e){let n=new Map;this.attachBatchFiles(e);let t=new Map;for(let r of e){let i=t.get(r.relativePath);i?i.push(r):t.set(r.relativePath,[r])}for(let[r,i]of t){let s=this.fileCalleesCache.get(r),a=new Set(i.map(f=>f.symbolId)),c=s??this.calleeMapForFile(r,a);for(let f of i){let l=c.get(f.symbolId)??[];this.calleesCache.set(f.symbolId,l),n.set(f.symbolId,l)}}return n}calleeCoverageForDefinitions(e){this.attachBatchFiles(e);let n=new Map,t=new Map;for(let r of e){let i=t.get(r.relativePath);i?i.push(r):t.set(r.relativePath,[r]),n.set(r.symbolId,{callSites:0,resolvedInRepository:0,resolvedExternal:0,unresolved:0})}for(let[r,i]of t){let s=this.sourceFiles.sourceFile(r);if(!s)continue;let a=this.compilerCheckerForSourceFile(s),c=s.compilerNode,f=new Map,l=p=>{if(this.tsMorph.ts.isCallExpression(p)||this.tsMorph.ts.isNewExpression(p)||Oe(this.tsMorph.ts,p)){let d=Pe(i,j(c,p)),m=d?n.get(d.symbolId):void 0;if(m){m.callSites+=1;let u=this.tsMorph.ts.isJsxOpeningElement(p)||this.tsMorph.ts.isJsxSelfClosingElement(p),S=u&&!this.tsMorph.ts.isJsxNamespacedName(p.tagName)?p.tagName:u?null:p.expression,y=S?this.compilerSymbolForExpression(a,S):void 0;if(!y)m.unresolved+=1;else{let h=f.get(y);h===void 0&&(h=this.definitionFromCompilerSymbol(y),f.set(y,h)),h?m.resolvedInRepository+=1:m.resolvedExternal+=1}}}this.tsMorph.ts.forEachChild(p,l)};l(c)}return n}referencesForDefinitionNode(e,n,t){let r=t?g.now():0,i=this.packageImportReferencesForDefinition(e);if(t&&(t.packageRefsMs+=g.now()-r,t.packageReferenceCount+=i.length),!n)return i;let s=t?g.now():0,a=xe(n,e,i,this.db.config.projectRoot);return t&&(t.semanticRefsMs+=g.now()-s,t.referenceCount+=a.length),a}signatureFor(e){return I(this.signatureCache,e.symbolId,()=>{let n=this.nodeForDefinition(e);if(!n||!this.tsMorph.Node.isFunctionDeclaration(n)&&!this.tsMorph.Node.isMethodDeclaration(n)&&!this.tsMorph.Node.isArrowFunction(n)&&!this.tsMorph.Node.isFunctionExpression(n)&&!this.tsMorph.Node.isConstructorDeclaration(n))return null;let t=n.getType().getCallSignatures()[0];if(!t)return null;let r=t.getParameters().map(s=>{let a=s.getDeclarations()[0],c=a?s.getTypeAtLocation(a).getText(a):s.getValueDeclaration()?.getType().getText()??"unknown";return He(c)}),i=t.getReturnType().getText(n);return`(${r.join(",")})=>${He(i)}`})}importUsageForSourceFile(e,n,t){let r=[],i=new Map;for(let s of n.getImportDeclarations()){t.declarations+=1;let a=K(this.db,e,s.getModuleSpecifierValue()),c=s.getImportClause()?.isTypeOnly()??!1;for(let f of te(s)){t.entries+=1;let l=c?null:f.identifier?.getSymbol()?.compilerSymbol??null;!c&&f.identifier&&(l?t.bindingSymbols+=1:t.missingBindingSymbols+=1);let p={sourcePath:a,entry:f,typeOnlyDeclaration:c,bindingSymbol:l,references:[]};if(r.push(p),c||!f.localName||!l)continue;let d=i.get(f.localName);d?d.push(p):i.set(f.localName,[p])}}return i.size>0&&n.forEachDescendant(s=>{if(s.getKindName()!=="Identifier")return;let a=i.get(s.getText());if(!a||tt(s))return;t.scannedIdentifiers+=1;let c=s.getSymbol()?.compilerSymbol;if(t.symbolLookups+=1,!!c){for(let f of a)if(f.bindingSymbol===c){f.references.push({location:W(s,this.db.config.projectRoot),node:s}),t.matchedReferences+=1;break}}}),r.map(s=>s.typeOnlyDeclaration?Qe(e,s.sourcePath,s.entry):s.entry.identifier&&!s.bindingSymbol?(t.fallbackEntries+=1,this.valueImportUsageForEntry(e,s.sourcePath,s.entry)):this.valueImportUsageFromLocations(e,s.sourcePath,s.entry,s.references))}valueImportUsageForEntry(e,n,t){let r=t.identifier?t.identifier.findReferences():[],i=[];for(let s of r)for(let a of Fe(s,e,t.identifier,this.db.config.projectRoot))i.push(a);return this.valueImportUsageFromLocations(e,n,t,i)}valueImportUsageFromLocations(e,n,t,r){let i=r.some(c=>!V(c.node)),s=r.some(c=>V(c.node)),a=t.isTypeOnly;return{importer:e,sourcePath:n,importedName:t.importedName,localName:t.localName,kind:t.kind,isTypeOnly:a,isUsed:a||r.length>0,isTypeUsed:a||s,isValueUsed:i,references:r.map(c=>c.location)}}packageImportReferencesForDefinition(e){return this.packageImportReferences().get(e.symbolId)??[]}packageImportReferencesForFiles(e){let n=new Map,t=new Set;for(let i of e){let s=this.sourceFiles.sourceFile(i);if(s)for(let a of s.getImportDeclarations()){let c=Q(this.workspacePackages,a.getModuleSpecifierValue());c&&t.add(c)}}if(t.size===0)return n;let r=this.packageExportsForNames(t);for(let i of e)this.addPackageImportReferencesForDocument(n,r,i);for(let[i,s]of n)n.set(i,P(s));return n}packageImportReferences(){if(this.packageImportReferenceIndex)return this.packageImportReferenceIndex;let e=new Map,n=this.packageExports();for(let t of this.sourceFiles.indexedTypeScriptLikeDocuments())this.addPackageImportReferencesForDocument(e,n,t);for(let[t,r]of e)e.set(t,P(r));return this.packageImportReferenceIndex=e,e}addPackageImportReferencesForDocument(e,n,t){if(this.db.isIgnored(t))return;let r=this.sourceFiles.sourceFileMatch(t);if(r)for(let i of r.sourceFile.getImportDeclarations())this.addPackageImportReferencesForDeclaration(e,n,t,i)}addPackageImportReferencesForDeclaration(e,n,t,r){let i=Q(this.workspacePackages,r.getModuleSpecifierValue());if(!i)return;let s=n.get(i);if(s)for(let a of te(r)){if(a.kind!=="named"||!a.identifier)continue;let c=s.get(a.importedName);if(!c||c.size===0)continue;let f=Te(a.identifier,t,this.db.config.projectRoot);f.length>0&&ct(e,c,f)}}packageExports(){return this.packageExportIndex?this.packageExportIndex:(this.packageExportIndex=this.packageExportsForNames(new Set(this.workspacePackages.map(e=>e.name))),this.packageExportIndex)}packageExportsForNames(e){let n=new Map;for(let t of this.workspacePackages){if(!e.has(t.name))continue;let r=new Map;for(let i of Re(t))this.collectPackageExports(t,i,r,new Set);r.size>0&&n.set(t.name,r)}return n}collectPackageExports(e,n,t,r){if(r.has(n))return;r.add(n);let i=this.sourceFiles.sourceFile(n);if(i)for(let s of i.getExportDeclarations()){let a=s.getModuleSpecifierValue(),c=a?K(this.db,n,a):n;if(!c||!c.startsWith(`${e.relativeDir}/src/`))continue;let f=s.getNamedExports();if(f.length===0){if(s.isNamespaceExport())continue;this.collectPackageExports(e,c,t,r);continue}for(let l of f){let p=l.getNameNode().getText(),d=l.getAliasNode()?.getText()??p,m=this.indexedDefinitionByLeaf(c,p);if(!m)continue;let u=t.get(d);u||(u=new Set,t.set(d,u)),u.add(m.symbolId)}}}indexedDefinitionByLeaf(e,n){return I(this.indexedDefinitionLeafCache,e,()=>Ce(this.db,e)).get(n)??null}nodeForDefinition(e){return I(this.definitionNodeCache,e.symbolId,()=>this.definitionNodesForFile(e.relativePath).get(e.symbolId)??null)}definitionNodesForFile(e){return I(this.fileDefinitionNodeCache,e,()=>{let n=this.sourceFiles.sourceFile(e);return n?ke(this.tsMorph,this.db,n,e):new Map})}referenceDefinitionFromCompilerSymbol(e){return this.definitionFromCompilerSymbol(e,void 0,!0)}definitionFromCompilerSymbol(e,n,t=!1){let r=e.name,i=n?g.now():0,s=e.declarations??[];n&&(n.declarationsMs+=g.now()-i,n.declarationChecks+=s.length);for(let a of s){let c=n?g.now():0,f=a.getSourceFile(),l=w(this.db.config.projectRoot,f.fileName),p=f.getLineAndCharacterOfPosition(a.getStart(f)).line;if(n&&(n.declarationLocationMs+=g.now()-c),!l||this.db.isIgnored(l))continue;let d=n?g.now():0,m=this.compilerDeclarationName(a),u=t?G(this.db,l,p,r)??(m&&m!==r?G(this.db,l,p,m):null):De(this.db,l,p,r);if(n&&(n.indexedLookupMs+=g.now()-d),u)return{symbolId:u.symbolId,symbol:u.symbol,file:u.relativePath,line:u.startLine}}return null}compilerDeclarationName(e){let n=e.name;return n&&this.tsMorph.ts.isIdentifier(n)?n.text:null}calleeMapForFile(e,n){let t=A(),r=0,i=0,s=0,a=0,c=0,f=0,l=0,p=0,d=t?it():void 0;return x("typescript.callee-map.file",()=>{let m=t?g.now():0,u=this.sourceFiles.sourceFile(e);if(t&&(c=Math.round(g.now()-m)),!u)return new Map;let S=t?g.now():0,y=R(this.db,e).sort((M,F)=>M.startLine-F.startLine||F.endLine-M.endLine);if(t&&(f=Math.round(g.now()-S)),r=y.length,y.length===0)return new Map;let h=new Map,T=t?g.now():0,v=this.compilerCheckerForSourceFile(u),k=u.compilerNode;t&&(l=Math.round(g.now()-T));let N=new Map,C=M=>{if(this.tsMorph.ts.isCallExpression(M)||this.tsMorph.ts.isNewExpression(M)||Oe(this.tsMorph.ts,M)){t&&(i+=1);let F=this.semanticCalleeForCallNode(v,k,y,M,N,n,d);F&&(t&&(s+=1),nt(h,F.callerId,F.target))}this.tsMorph.ts.forEachChild(M,C)},D=t?g.now():0;C(k),t&&(p=Math.round(g.now()-D));for(let[M,F]of h)h.set(M,lt(F));return a=h.size,h},()=>({relativePath:e,definitions:r,callNodes:i,resolvedCallees:s,outputRows:a,requestedDefinitions:n?.size??r,sourceFileLookupMs:c,definitionsLoadMs:f,checkerLookupMs:l,traversalMs:p,...d?ot(d):{}}))}semanticCalleeForCallNode(e,n,t,r,i,s,a){let c=a?g.now():0,f=Pe(t,j(n,r));if(a&&(a.callerLookupMs+=g.now()-c),!f)return null;if(s&&!s.has(f.symbolId))return a&&(a.skippedUnrequestedCallers+=1),null;let l=this.tsMorph.ts.isJsxOpeningElement(r)||this.tsMorph.ts.isJsxSelfClosingElement(r);if(l&&this.tsMorph.ts.isJsxNamespacedName(r.tagName))return null;let p=l?r.tagName:r.expression,d=this.compilerSymbolForExpression(e,p,a),m=null;if(d)if(a&&(a.targetSymbolHits+=1),i.has(d))a&&(a.compilerSymbolCacheHits+=1),m=i.get(d)??null;else{a&&(a.compilerSymbolCacheMisses+=1);let u=a?g.now():0;m=this.definitionFromCompilerSymbol(d,a),a&&(a.targetLookupMs+=g.now()-u),i.set(d,m)}else a&&(a.targetMisses+=1);return m?{callerId:f.symbolId,target:{symbol:m.symbol,file:m.file,line:m.line,callsiteLine:j(n,r),...l?{kind:"jsx-render"}:{}}}:null}compilerSymbolForExpression(e,n,t){let r=t?g.now():0,i=e.getSymbolAtLocation(n);if(t&&(t.expressionSymbolMs+=g.now()-r),i){if((i.flags&this.tsMorph.ts.SymbolFlags.Alias)===0)return i;try{return e.getAliasedSymbol(i)}catch{return i}}t&&(t.typeFallbacks+=1);let s=t?g.now():0,a=e.getTypeAtLocation(n).getSymbol();return t&&(t.typeSymbolMs+=g.now()-s),a}compilerCheckerForSourceFile(e){let n=e.getProject(),t=this.compilerCheckerCache.get(n);return t||(t=n.getTypeChecker().compilerObject,this.compilerCheckerCache.set(n,t)),t}};function te(o){let e=[],n=o.getDefaultImport();n&&e.push({identifier:n,importedName:"default",localName:n.getText(),kind:"default",isTypeOnly:o.getImportClause()?.isTypeOnly()??!1});let t=o.getNamespaceImport();t&&e.push({identifier:t,importedName:"*",localName:t.getText(),kind:"namespace",isTypeOnly:o.getImportClause()?.isTypeOnly()??!1});for(let r of o.getNamedImports()){let i=r.getNameNode(),a=r.getAliasNode()??(i.getKindName()==="Identifier"?i:null);e.push({identifier:a,importedName:i.getText(),localName:a?.getText()??i.getText(),kind:"named",isTypeOnly:r.isTypeOnly()||(o.getImportClause()?.isTypeOnly()??!1)})}return e.length===0&&e.push({identifier:null,importedName:"*",localName:null,kind:"side-effect",isTypeOnly:!1}),e}function Qe(o,e,n){return{importer:o,sourcePath:e,importedName:n.importedName,localName:n.localName,kind:n.kind,isTypeOnly:!0,isUsed:!0,isTypeUsed:!0,isValueUsed:!1,references:[]}}function et(){return{declarations:0,entries:0,bindingSymbols:0,missingBindingSymbols:0,scannedIdentifiers:0,symbolLookups:0,matchedReferences:0,fallbackEntries:0}}function tt(o){for(let e=o;e;e=e.getParent())if(e.getKindName()==="ImportDeclaration")return!0;return!1}function nt(o,e,n){let t=o.get(e);t||(t=[],o.set(e,t)),t.push(n)}function rt(o){let e=new Set;for(let n of o.getImportDeclarations())for(let t of te(n))t.localName&&e.add(t.localName);return e}function Pe(o,e){let n=null;for(let t of o)e<t.startLine||e>t.endLine||(!n||t.startLine>=n.startLine)&&(n=t);return n}function j(o,e){return o.getLineAndCharacterOfPosition(e.getStart(o)).line}function we(o,e,n){return e===o.relativePath&&n>=o.startLine&&n<=o.endLine}function Le(o){return o.symbol.includes("#")?ye(o.symbol)==="type"&&o.relativePath.endsWith(".d.ts"):!1}function it(){return{callerLookupMs:0,expressionSymbolMs:0,typeSymbolMs:0,targetLookupMs:0,declarationsMs:0,declarationLocationMs:0,indexedLookupMs:0,compilerSymbolCacheHits:0,compilerSymbolCacheMisses:0,targetSymbolHits:0,targetMisses:0,typeFallbacks:0,declarationChecks:0,skippedUnrequestedCallers:0}}function ot(o){return{...o,callerLookupMs:Math.round(o.callerLookupMs),expressionSymbolMs:Math.round(o.expressionSymbolMs),typeSymbolMs:Math.round(o.typeSymbolMs),targetLookupMs:Math.round(o.targetLookupMs),declarationsMs:Math.round(o.declarationsMs),declarationLocationMs:Math.round(o.declarationLocationMs),indexedLookupMs:Math.round(o.indexedLookupMs)}}function Ee(){return{cacheHits:0,cacheMisses:0,nodeHits:0,nodeMisses:0,scanFiles:0,identifiers:0,symbolLookups:0,aliasResolutions:0,targetHits:0,targetMisses:0,requestedHits:0,scanMs:0,packageRefsMs:0,semanticRefsMs:0,packageReferenceCount:0,referenceCount:0,preciseSearchFailures:0,hierarchyDefinitions:0,hierarchyFamilies:0,hierarchyReferences:0,hierarchyMs:0}}var Ue=1,je=se({kind:"typescript-hierarchy-targets",invalidation:ae("typescript-hierarchy-targets"),serialize:o=>JSON.stringify(o),deserialize:o=>{try{let e=JSON.parse(o);return e.version!==Ue||typeof e.projectRoot!="string"||!Array.isArray(e.entries)?null:e}catch{return null}}});function st(o,e){let n=new Map(e.map(r=>[r.symbol,r])),t=new Map;for(let[r,i]of o.entries){let s=new Map;for(let a of i){let c=n.get(a);c&&s.set(c.symbolId,c)}s.size>0&&t.set(r,s)}return t}function at(o){let e=2166136261;for(let n of o)e^=n.symbolId,e=Math.imul(e,16777619)>>>0;return`${o.length}:${e.toString(16)}`}function Ae(o){return{...o,scanMs:Math.round(o.scanMs),packageRefsMs:Math.round(o.packageRefsMs),semanticRefsMs:Math.round(o.semanticRefsMs),hierarchyMs:Math.round(o.hierarchyMs)}}function ct(o,e,n){for(let t of e){let r=o.get(t)??[];r.push(...n),o.set(t,r)}}function Oe(o,e){if(!o.isJsxOpeningElement(e)&&!o.isJsxSelfClosingElement(e))return!1;let n=e.tagName;return o.isPropertyAccessExpression(n)?!0:o.isIdentifier(n)?/^[A-Z]/.test(n.text):!1}function lt(o){let e=new Set,n=[];for(let t of o){let r=`${t.symbol}|${t.file}|${t.line}|${t.callsiteLine??""}`;e.has(r)||(e.add(r),n.push(t))}return n}function He(o){return o.replace(/\s+/g," ").replace(/\bimport\("[^"]+"\)\./g,"").trim()}export{ge as a,rn as b,Ze as c};
|
|
3
|
+
//# sourceMappingURL=chunk-MOKUWRHO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as f}from"./chunk-2BMSSRBH.js";import{a as L}from"./chunk-F5GSBHC6.js";import{d as i,e as b,h as u,n as c}from"./chunk-C7C6AKAT.js";import{n as l}from"./chunk-RBAD4GJ2.js";import{A as a}from"./chunk-ZLMXIQLC.js";function S(o,s){let t=L(o,s);if(!t)return[];let e=new f(o).definitionsForFile(t.relativePath).filter(r=>r.symbol!==t.symbol).filter(r=>c(t.symbol,r.symbol)).sort((r,m)=>r.startLine-m.startLine||r.endLine-m.endLine).map(r=>({symbol:r.symbol,shortName:i(r.symbol),startLine:r.startLine,endLine:r.endLine,kind:u(r.symbol)??"unknown"}));return a(t.relativePath)!=="clojure"?e:d(e,y(o,t))}function y(o,s){let t=b(s.symbol);if(!t)return[];let n=i(s.symbol);return(l(o,s.relativePath)?.clojureMembers??[]).filter(e=>e.ownerName===t).map(e=>({symbol:`${s.symbol}${e.memberName}().`,shortName:`${n}:${e.memberName}()`,startLine:e.startLine,endLine:e.endLine,kind:e.memberKind}))}function d(o,s){let t=new Map;for(let n of[...o,...s])t.set(`${n.shortName}:${n.startLine}:${n.endLine}`,n);return[...t.values()].sort((n,e)=>n.startLine-e.startLine||n.endLine-e.endLine)}export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MPYAPMNE.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{b as k}from"./chunk-
|
|
1
|
+
import{b as k}from"./chunk-OIAPEKMT.js";import{c as D}from"./chunk-2BMSSRBH.js";import{m as S}from"./chunk-SKKXTABJ.js";import{f as v,h as L}from"./chunk-NJQISBL4.js";import{d as h,v as y}from"./chunk-C7C6AKAT.js";function z(e,n={}){let{scope:s,minLoc:c=1,maxDepth:a=5,scanLimit:f}=n,t=new D(e),i=_(e,s,c,f),o=new P;for(let r of i)o.add(r);let m=[],I=[];i.length>0&&m.push(C(e,0,i,o));let b=i.map(r=>r.definition).filter(r=>r!==null),x=new Set(i.map(r=>r.symbol));for(let r=1;r<=a&&b.length>0;r++){let u=t.calleeMap(b,{semantic:!1}),E=new Set;for(let d of b)for(let l of u.get(d.symbolId)??[])x.has(l.symbol)||E.add(l.symbol);let p=[];for(let d of E){x.add(d);let l=F(e,d);if(!l||e.isIgnored(l.relativePath)||v(e,l.relativePath)||L(e,l.symbol,l.relativePath)||t.fileKind(l.relativePath)==="test"||t.hasSuppressionComment(l))continue;let g=B(e,l,o);g.removable?p.push(w(l,"cascade")):g.blockingFiles.length>0&&I.push({shortName:h(l.symbol),file:l.relativePath,blockingFiles:g.blockingFiles.slice(0,3)})}if(p.length===0)break;for(let d of p)o.add(d);m.push(C(e,r,p,o)),b=p.map(d=>d.definition).filter(d=>d!==null)}let N=m.reduce((r,u)=>r+u.loc,0),R=m.reduce((r,u)=>r+u.entries.length,0);return{batches:m,totalSymbols:R,totalLoc:N,blocked:I}}function _(e,n,s,c){let a=k(e,{scope:n,minLoc:s,skipBarrels:!0,deadCodeOnly:!0,scanLimit:c,semantic:!1}),f=[];for(let t of a.symbols)t.kind==="dead-code"&&(v(e,t.relativePath)||L(e,t.symbol,t.relativePath)||f.push({symbol:t.symbol,shortName:t.shortName,file:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:t.loc,evidence:"graph-fact",definition:F(e,t.symbol)}));return f}function w(e,n){return{symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:e.endLine-e.startLine+1,evidence:n,definition:e}}function F(e,n){let s=e.get(`SELECT d.relative_path
|
|
2
2
|
FROM global_symbols gs
|
|
3
3
|
JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
|
|
4
4
|
JOIN documents d ON d.id = der.document_id
|
|
5
5
|
WHERE gs.symbol = ?
|
|
6
6
|
LIMIT 1`,n);return s?y(e,s.relative_path).find(c=>c.symbol===n)??null:null}function B(e,n,s){let c=S(e,n);if(c.length===0)return{removable:!1,blockingFiles:[]};let a=new Set;for(let f of c)f.file===n.relativePath&&f.line>=n.startLine&&f.line<=n.endLine||s.contains(f.file,f.line)||a.add(f.file);return{removable:a.size===0,blockingFiles:[...a]}}function C(e,n,s,c){let a=[...s].sort((i,o)=>i.file.localeCompare(o.file)||i.startLine-o.startLine),f=new Set(a.map(i=>i.file)),t=[];for(let i of f){let o=y(e,i);o.length>0&&o.every(m=>c.contains(i,m.startLine))&&t.push(i)}return{depth:n,entries:a.map(({definition:i,...o})=>o),loc:a.reduce((i,o)=>i+o.loc,0),filesEmptied:t.sort()}}var P=class{ranges=new Map;add(n){let s=this.ranges.get(n.file)??[];s.push({start:n.startLine,end:n.endLine}),this.ranges.set(n.file,s)}contains(n,s){let c=this.ranges.get(n);return c?c.some(a=>s>=a.start&&s<=a.end):!1}};export{z as a,P as b};
|
|
7
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
//# sourceMappingURL=chunk-MV6SPXCR.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as f,g as u}from"./chunk-
|
|
1
|
+
import{a as f,g as u}from"./chunk-7F45LJKI.js";import b from"ignore";import{existsSync as y,readdirSync as v}from"fs";import{dirname as d,isAbsolute as m,join as l,relative as T,resolve as S}from"path";function E(n){let t=b();return _(n,t)||t.add(F),{isIgnored:e=>g(t,n,e),filter:e=>e.filter(i=>!g(t,n,i))}}function _(n,t){let r=new Set,e=(s,a)=>{if(!(r.has(s)||!y(s)))try{let c=u(s,{maxBytes:f,inputKind:"gitignore file"});t.add(a?$(c,a):c),r.add(s)}catch{}},i=d(n),o=0;for(;i!==d(i)&&o<5&&(e(l(i,".gitignore"),""),!y(l(i,".git")));)i=d(i),o++;return h(n,"",t,e),r.size>0}function h(n,t,r,e){let i=t?l(n,t):n;e(l(i,".gitignore"),t);let o;try{o=v(i,{withFileTypes:!0})}catch{return}for(let s of o){if(!s.isDirectory()||s.name===".git")continue;let a=t?`${t}/${s.name}`:s.name;g(r,n,`${a}/`)||h(n,a,r,e)}}function $(n,t){let r=t.replaceAll("\\","/").replace(/\/+$/,"");return n.split(/\r?\n/).map(e=>A(e,r)).join(`
|
|
2
2
|
`)}function A(n,t){let r=n.trimStart();if(!r||r.startsWith("#"))return n;let e=n.slice(0,n.length-r.length),i=r.startsWith("!"),o=i?r.slice(1):r;if(!o||o.startsWith("#"))return n;let s=o.startsWith("/"),a=s?o.slice(1):o,p=(a.endsWith("/")?a.slice(0,-1):a).includes("/")||s?`${t}/${a}`:`${t}/**/${a}`;return`${e}${i?"!":""}${p}`}var F=`
|
|
3
3
|
# Dependencies
|
|
4
4
|
node_modules/
|
|
@@ -57,4 +57,4 @@ Thumbs.db
|
|
|
57
57
|
# Type definitions (often noise in queries)
|
|
58
58
|
*.d.ts
|
|
59
59
|
`;function g(n,t,r){let e=x(t,r);if(!e)return!1;try{return n.ignores(e)}catch{return!1}}function x(n,t){if(!t||t===".")return null;if(!m(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let r=m(t)?t:S(n,t),e=T(n,r).replaceAll("\\","/");return!e||e==="."||e.startsWith("..")?null:e}export{E as a};
|
|
60
|
-
//# sourceMappingURL=chunk-
|
|
60
|
+
//# sourceMappingURL=chunk-MWN53KRN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-RVZC6TJE.js";import{a as t}from"./chunk-L7KTFEAV.js";function a(e,o){let r=i(e,o);return r?t(e,"forward",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}function p(e,o){let r=i(e,o);return r?t(e,"reverse",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}export{a,p as b};
|
|
2
|
+
//# sourceMappingURL=chunk-MZPXPSUJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R}from"./chunk-WLMP3OCW.js";import{a as D}from"./chunk-SSRFUQBD.js";import{a as g}from"./chunk-7ZLWLOGT.js";import{a as F}from"./chunk-6O7FACKB.js";import{a as y}from"./chunk-XKXTR6ZI.js";import{e as f}from"./chunk-ZFVPWH62.js";import{l as d}from"./chunk-C7C6AKAT.js";import{P as h}from"./chunk-ZLMXIQLC.js";var A=.7,S=.62,C=.45;function J(i,t={}){let{windowCommits:e=100,limit:n=30,scope:a,scanLimit:o}=t,s=y(i,{historyMode:t.historyMode}).fileAddRecords();if(!s)return{available:!1,windowCommits:e,findings:[]};if(n<=0)return{available:!0,windowCommits:e,findings:[]};let r=P(s,e);if(r.size===0)return{available:!0,windowCommits:e,findings:[]};let b=B(i,{limit:n,minSimilarity:t.minSimilarity,scanLimit:o,scope:a,semantic:t.semantic,focusFiles:Number.isFinite(n)?void 0:r}).map(l=>O(l,s,e)).filter(l=>l!==null);b.sort((l,c)=>(l.kind===c.kind?0:l.kind==="echo"?-1:1)||c.similarity-l.similarity||l.echoFile.localeCompare(c.echoFile)||l.echoSymbol.localeCompare(c.echoSymbol)||l.domain.localeCompare(c.domain));let p=b.slice(0,n).map(M);return{available:!0,windowCommits:e,findings:p,rootCauseGroups:N(p)}}function B(i,t){let e=K(t.limit),n=[...k(i,{scope:t.scope,minSimilarity:t.minSimilarity??A,limit:e,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles})],a=h(i,{scope:t.scope});return a.react&&n.push(...E(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...L(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),a.vue&&n.push(...x(i,{scope:t.scope,minSimilarity:t.minSimilarity??S,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles}),...T(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit,focusFiles:t.focusFiles})),n}function k(i,t){return f(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,crossFileOnly:!0,scanLimit:t.scanLimit,semantic:t.semantic,focusFiles:t.focusFiles}).filter(e=>!d(e.symbolA)&&!d(e.symbolB)).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 E(i,t){return u(i,t,{query:g,domain:"react-component",basis:"jsx-structure",symbolA:e=>e.componentA,symbolB:e=>e.componentB,evidenceBuckets:e=>[["component",e.sharedComponents],["tag",e.sharedNativeTags],["prop",e.sharedProps],["event",e.sharedEvents],["binding",e.sharedBindings]]})}function u(i,t,e){return e.query(i,t).filter(n=>n.fileA!==n.fileB).filter(n=>e.acceptPair?.(n)??!0).map(n=>({domain:e.domain,basis:e.basis,symbolA:e.symbolA(n),fileA:n.fileA,symbolB:e.symbolB(n),fileB:n.fileB,similarity:n.similarity,sharedEvidence:G(...e.evidenceBuckets(n)),sharedCallees:[]}))}function L(i,t){return u(i,t,{query:F,domain:"react-hook",basis:"react-behavior",symbolA:e=>e.componentA,symbolB:e=>e.componentB,acceptPair:w,evidenceBuckets:e=>[["hook",e.sharedHooks],["react-hook",e.sharedReactHooks],["effect",e.sharedEffects],["state",e.sharedState],["request",e.sharedRequests],["handler",e.sharedHandlers],["action",e.sharedHandlerVerbs]]})}var I=new Set(["useCallback","useEffect","useLayoutEffect","useMemo","useMutation","useQueries","useQuery","useQueryClient","useReducer","useRef","useState"]);function w(i){return i.sharedHooks.some(t=>!I.has(t))||i.sharedState.length>0||i.sharedHandlers.length>0||i.sharedHandlerVerbs.length>=2}function x(i,t){return u(i,t,{query:D,domain:"vue-component",basis:"vue-template",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["component",e.sharedComponents],["prop",e.sharedProps],["event",e.sharedEvents],["directive",e.sharedDirectives],["slot",e.sharedSlots],["identifier",e.sharedIdentifiers]]})}function T(i,t){return u(i,t,{query:R,domain:"vue-composable",basis:"vue-behavior",symbolA:e=>m(e.fileA),symbolB:e=>m(e.fileB),evidenceBuckets:e=>[["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]]})}function P(i,t){let e=new Set;for(let[n,a]of i)a.commitsAgo<=t&&e.add(n);return e}function O(i,t,e){let n=t.get(i.fileA)?.commitsAgo??null,a=t.get(i.fileB)?.commitsAgo??null,o=n!==null&&n<=e,s=a!==null&&a<=e;if(!o&&!s)return null;if(o&&s){let r=(n??0)<=(a??0);return{kind:"twin",domain:i.domain,basis:i.basis,echoSymbol:r?i.symbolA:i.symbolB,echoFile:r?i.fileA:i.fileB,echoAgeCommits:(r?n:a)??0,establishedSymbol:r?i.symbolB:i.symbolA,establishedFile:r?i.fileB:i.fileA,establishedAgeCommits:r?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}return{kind:"echo",domain:i.domain,basis:i.basis,echoSymbol:o?i.symbolA:i.symbolB,echoFile:o?i.fileA:i.fileB,echoAgeCommits:(o?n:a)??0,establishedSymbol:o?i.symbolB:i.symbolA,establishedFile:o?i.fileB:i.fileA,establishedAgeCommits:o?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}function M(i){let t=v(i);return{...i,rootCauseKey:t,groupKey:`recent-duplicate:${t}`}}function v(i){if(i.kind==="echo")return["echo",i.domain,i.basis,i.establishedSymbol].join(":");let t=i.sharedEvidence.slice().sort().join("|"),e=[i.echoSymbol,i.establishedSymbol].sort().join("|");return["twin",i.domain,i.basis,t||e].join(":")}function N(i){let t=new Map;for(let[e,n]of i.entries()){let a=n.rootCauseKey??v(n),o=n.groupKey??`recent-duplicate:${a}`,s=t.get(o);s||(s={groupKey:o,rootCauseKey:a,kind:n.kind,domain:n.domain,basis:n.basis,count:0,maxSimilarity:n.similarity,findingIndexes:[],echoFiles:new Set,establishedFile:n.kind==="echo"?n.establishedFile:void 0,establishedSymbol:n.kind==="echo"?n.establishedSymbol:void 0,relatedFiles:new Set,sharedEvidence:new Set,recommendation:H(n)},t.set(o,s)),s.count+=1,s.maxSimilarity=Math.max(s.maxSimilarity,n.similarity),s.findingIndexes.push(e),s.echoFiles.add(n.echoFile),s.relatedFiles.add(n.echoFile),s.relatedFiles.add(n.establishedFile);for(let r of n.sharedEvidence)s.sharedEvidence.add(r)}return[...t.values()].map(e=>({...e,echoFiles:[...e.echoFiles].sort(),relatedFiles:[...e.relatedFiles].sort(),sharedEvidence:[...e.sharedEvidence].sort().slice(0,16)})).sort((e,n)=>n.count-e.count||n.maxSimilarity-e.maxSimilarity||e.groupKey.localeCompare(n.groupKey))}function H(i){return i.kind==="echo"?"Review the established side once, then migrate or delete every echo in this group.":"Pick one owner for the new twins and consolidate the group before the copies diverge."}function K(i){return Number.isFinite(i)?i*5:Number.POSITIVE_INFINITY}function G(...i){let t=[],e=new Set;for(let[n,a]of i)for(let o of a){let s=`${n}:${o}`;e.has(s)||(e.add(s),t.push(s))}return t}function m(i){return(i.split("/").pop()??i).replace(/\.[^.]+$/,"")}export{J as a};
|
|
2
|
+
//# sourceMappingURL=chunk-N55KIE46.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-L6XHYJPZ.js";var v=/:\d+(?:-\d+)?$/u;function D(d,t,c={}){let p=c.direction??"backward",n=c.maxDepth??3;if(!Number.isSafeInteger(n)||n<0)throw new RangeError(`Dependence-slice depth must be a non-negative safe integer; received ${n}.`);let r=v.test(t),o=m(d,r?{locations:[t]}:{symbols:[t]},{families:["execution","runtime","dataflow","ownership"],maxDepth:n+1,maxEdges:c.maxEdges??200}),f=new Set(o.targets.flatMap(e=>e.nodeIds)),a=new Set(f),l=new Map;u(o.edges,a,l,0);for(let e=1;e<=n;e+=1){let s=[];for(let i of o.edges)if(p==="backward"?a.has(i.to.id):a.has(i.from.id)){let g=p==="backward"?i.from.id:i.to.id;if(a.has(g))continue;s.push(g),l.set(i.id,e)}if(s.length===0)break;for(let i of s)a.add(i);u(o.edges,a,l,e)}let h=o.edges.filter(e=>a.has(e.from.id)&&a.has(e.to.id)).filter(e=>l.has(e.id)||e.family==="ownership").map(e=>({...e,traversalDepth:l.get(e.id)??0,supporting:e.family!=="dataflow"&&!y(e)})).sort((e,s)=>e.traversalDepth-s.traversalDepth||e.family.localeCompare(s.family)||e.from.label.localeCompare(s.from.label)||e.to.label.localeCompare(s.to.label));return{kind:"dependence-slice",direction:p,criterion:t,targets:o.targets,nodeIds:[...a].sort(),edges:h,coverage:{status:o.coverage.status,criterionKind:r?"source-location-summary":"symbol-summary",basis:"partial-system-dependence-graph",analysisBasis:"typescript-cfg-reaching-definitions-plus-system-edges",providers:["typescript-local-dependence","bounded-static-value-flow"],graph:o.coverage,unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","unresolved dynamic dispatch"]}}}function u(d,t,c,p){let n=!0;for(;n;){n=!1;for(let r of d)r.family!=="ownership"||!t.has(r.from.id)||t.has(r.to.id)||(t.add(r.to.id),c.set(r.id,p),n=!0)}}function y(d){return d.semanticFamily==="control"&&d.sourceKind==="control-dependence"}export{D as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NB4D3BNM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as b,b as y,c as m}from"./chunk-MTDBHTSF.js";import{
|
|
1
|
+
import{a as b,b as y,c as m}from"./chunk-MTDBHTSF.js";import{U as p}from"./chunk-2VAHDDLM.js";import{a as c}from"./chunk-YXPUP5G2.js";import{a as f,c as g,e as d}from"./chunk-BL6DCHQP.js";import{SymbolInformation_Kind as o}from"@c4312/scip";var _=500;function K(n){let s=parseInt(n,10);if(!isNaN(s))return s;let t=n.toLowerCase(),e=y.get(t);if(e!==void 0)return e;for(let[i,l]of b)if(l.toLowerCase().includes(t))return i;return null}function v(n,s,t={}){let{scope:e,limit:i=100}=t,l=K(s);return l===null?[]:h(n,e).map(r=>({row:r,resolvedKind:k(r)})).filter(r=>r.resolvedKind===l).slice(0,i).map(({row:r,resolvedKind:a})=>({symbol:r.symbol,shortName:g(r.symbol),kind:a,kindName:m(a),relativePath:r.relative_path,startLine:r.start_line,endLine:r.end_line}))}function T(n,s={}){let t=I(n,s.scope);for(let e of S(n,s.scope)){let i=k(e);i===null||i===0||t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((e,i)=>i[1]-e[1]||e[0]-i[0]).map(([e,i])=>({kind:e,kindName:m(e),count:i}))}function h(n,s){return p(n,{scope:s}).map(R)}function I(n,s){let t=new Map;for(let e of N(c(n,{scope:s,includeIgnored:!1}))){let i=e.map(()=>"?").join(", "),l=n.all(`SELECT gs.kind AS kind, COUNT(*) AS count
|
|
2
2
|
FROM defn_enclosing_ranges der
|
|
3
3
|
JOIN global_symbols gs ON der.symbol_id = gs.id
|
|
4
4
|
JOIN documents d ON der.document_id = d.id
|
|
@@ -20,4 +20,4 @@ import{a as b,b as y,c as m}from"./chunk-MTDBHTSF.js";import{S as p}from"./chunk
|
|
|
20
20
|
${n.symbolNoiseFor("gs")}
|
|
21
21
|
AND d.relative_path IN (${i})
|
|
22
22
|
ORDER BY d.relative_path, der.start_line, der.end_line, gs.symbol`,...e))}return t}function N(n){let s=[];for(let t=0;t<n.length;t+=_)s.push(n.slice(t,t+_));return s}function R(n){return{symbol:n.symbol,kind:n.kind,documentation:n.documentation,enclosing_symbol:n.enclosingSymbol,relative_path:n.relativePath,start_line:n.startLine,end_line:n.endLine}}function k(n){return n.kind!==null&&n.kind!==0?D(n.kind,n.symbol,n.documentation):C(n.symbol,n.documentation,n.enclosing_symbol)}function D(n,s,t){let e=(t??"").toLowerCase();if(d(s)==="type"){if(e.includes("type "))return o.TypeAlias;if(e.includes("interface "))return o.Interface;if(e.includes("struct "))return o.Struct;if(e.includes("trait "))return o.Trait;if(e.includes("class "))return o.Class}return n}function C(n,s,t){let e=f(n);if("kind"in e)return null;let i=e.descriptors,l=i[i.length-2]??null,u=d(n),r=(s??"").toLowerCase();return u==="type"?r.includes("type ")?o.TypeAlias:r.includes("interface ")?o.Interface:r.includes("struct ")?o.Struct:r.includes("trait ")?o.Trait:r.includes("class ")?o.Class:o.Class:u==="method"?l?.suffix==="type"?o.Method:o.Function:u==="namespace"?o.Module:u!=="term"?null:r.includes("async def ")||r.includes("def ")?o.Function:(t?d(t):l?.suffix??null)==="type"?o.Field:o.Variable}export{v as a,T as b};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-NGKBOT6G.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{o as r}from"./chunk-7HXT6YLU.js";function _(t){switch(t){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}function a(t){let s=r(t);return i(s)?"test":n(s)?"worker":u(s)?"entry":f(s)?"barrel":"source"}function i(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 n(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function u(t){let s=t.split("/"),e=s[s.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:s.length<=2:!1}function f(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}export{_ as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-NJGKXKQF.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as S}from"./chunk-FLMTCX5R.js";import{a as _}from"./chunk-DHEQMPLW.js";import{b as A}from"./chunk-BOW7SSQH.js";import{a as N,e as b,v}from"./chunk-C7C6AKAT.js";import{x as O}from"./chunk-RBAD4GJ2.js";import{a as m}from"./chunk-ZLMXIQLC.js";import{k as D}from"./chunk-ETC674NS.js";import{d as u}from"./chunk-KNLQGXVH.js";import{Ba as p,Ca as d,Da as F,c as f}from"./chunk-JZ2A7LDM.js";import{existsSync as y,readdirSync as M}from"fs";import{join as h}from"path";var ft={files:new Set,pathPrefixes:[]},ut={reasonsByFile:new Map},k=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,gt=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,$=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],lt=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),pt=4,dt=u("package-surface",{clearGroups:["whole-project"]}),mt=u("package-operational-surface",{clearGroups:["whole-project"]});function L(t){return dt.get(t,()=>ht(t.config.projectRoot))}function E(t,e){let r=L(t);return r.files.has(e)?!0:r.pathPrefixes.some(n=>e.startsWith(n))}function G(t,e){return L(t).files.has(e)}function St(t){return mt.get(t,()=>bt(t.config.projectRoot))}function Oe(t,e){return St(t).reasonsByFile.get(e)??[]}function ht(t){let e=new Set,r=[];for(let{manifest:n,packageRoot:s}of V(t))for(let i of yt(n))W(t,s,i,e,r);return e.size===0&&r.length===0?ft:{files:e,pathPrefixes:r}}function bt(t){let e=new Map;for(let{manifest:r,packageRoot:n}of V(t)){let s=Pt(r);for(let o of s)C(t,n,o,"package binary",e);let i=r.scripts;if(!(!i||typeof i!="object")){for(let[o,a]of Object.entries(i))if(typeof a=="string")for(let c of xt(a))C(t,n,c,`package script "${o}"`,e)}}return e.size===0?ut:{reasonsByFile:e}}function V(t){let e=[],r=U(t,"");return r&&e.push({manifest:r,packageRoot:""}),X(t,"",e,0),e}function X(t,e,r,n){if(n>=pt)return;let s=h(t,e);if(y(s))for(let i of M(s,{withFileTypes:!0})){if(!i.isDirectory()||lt.has(i.name))continue;let o=e?`${e}/${i.name}`:i.name,a=U(t,o);a&&r.push({manifest:a,packageRoot:o}),X(t,o,r,n+1)}}function U(t,e){let r;try{r=p(t,h(e,"package.json"),{maxBytes:8*1024*1024,inputKind:"package manifest"})}catch(n){if(!d(n))throw n;return null}try{let n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}}function yt(t){let e=[];for(let n of["main","module","types","browser"])typeof t[n]=="string"&&e.push(t[n]);let r=t.bin;if(typeof r=="string")e.push(r);else if(r&&typeof r=="object")for(let n of Object.values(r))typeof n=="string"&&e.push(n);return B(t.exports,e),e}function Pt(t){let e=t.bin;return typeof e=="string"?[e]:!e||typeof e!="object"?[]:Object.values(e).filter(r=>typeof r=="string")}function xt(t){let e=[],r=/(?:^|&&|\|\||;)\s*(?:(?:cross-env|env)(?:\s+[A-Za-z_][A-Za-z0-9_]*=\S+)*\s+)?(?:node|bun|tsx|ts-node|vite-node|python3?|deno\s+run)\s+(?:(?:--?[A-Za-z0-9-]+(?:=\S+)?)\s+)*["']?([^"'`\s]+\.(?:ts|tsx|mts|cts|js|jsx|mjs|cjs|py))["']?/g;for(let n of t.matchAll(r)){let s=n[1];s&&!s.startsWith("node_modules/")&&!s.startsWith("./node_modules/")&&e.push(s)}return e}function C(t,e,r,n,s){let i=new Set;W(t,e,r,i,[]);for(let o of i){let a=s.get(o)??[];a.includes(n)||a.push(n),s.set(o,a)}}function B(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let r of Object.values(t))B(r,e)}function W(t,e,r,n,s){let i=r.replace(/\\/g,"/").replace(/^\.\//,"");if(i===""||i.startsWith(".."))return;let o=i.indexOf("*");if(o>=0){let c=i.slice(0,o);for(let g of I(c))g!==""&&s.push(l(e,g));return}let a=i.replace(gt,"");for(let c of I(a)){c===a&&c===i&&n.add(l(e,i));for(let g of $)kt(t,n,e,c+g)}n.add(l(e,i))}function I(t){let e=[t];return k.test(t)&&(e.push(t.replace(k,"src/")),e.push(t.replace(k,""))),e}function kt(t,e,r,n){let s=l(r,n);if(e.add(s),!n.startsWith("src/")||y(h(t,s)))return;let i=$.find(x=>n.endsWith(x));if(!i)return;let o=n.slice(0,-i.length);Et(t,e,r,o,i);let a=o.lastIndexOf("/");if(a<=4)return;let c=o.slice(0,a),g=o.slice(a+1);for(let x of K(t,r,c,`${g}${i}`))e.add(x)}function Et(t,e,r,n,s){let i=l(r,`${n}/index${s}`);y(h(t,i))&&e.add(i)}function K(t,e,r,n){let s=h(t,e,r);if(!y(s))return[];let i=[];for(let o of M(s,{withFileTypes:!0})){let a=`${r}/${o.name}`;o.isDirectory()?i.push(...K(t,e,a,n)):o.isFile()&&o.name===n&&i.push(l(e,a))}return i}function l(t,e){return t?`${t}/${e}`:e}import{existsSync as T,readdirSync as Tt}from"fs";import{dirname as Rt,join as R}from"path";var wt={rootFiles:new Set,sourcePrefixes:[]},jt=new Set([".git",".scipquery","node_modules","target"]),_t=6,Ft=u("rust-library-surface",{clearGroups:["whole-project"]});function H(t,e,r){if(!r.endsWith(".rs")||!At(Dt(t),r))return!1;let n=v(t,r).find(s=>s.symbol===e);return n?Nt(D(t,r)[n.startLine]??""):!1}function Dt(t){return Ft.get(t,()=>Ot(t.config.projectRoot))}function Ot(t){let e=new Set,r=new Set;for(let n of vt(t)){let s=p(t,R(n,"Cargo.toml"),{maxBytes:8388608,inputKind:"Cargo manifest"}),i=Ct(s),o=l(n,"src/lib.rs"),a=i?l(n,i):!It(s)&&F(t,o)?o:null;if(!a)continue;e.add(a);let c=Rt(a).replaceAll("\\","/");r.add(c==="."?"":`${c}/`)}return e.size===0?wt:{rootFiles:e,sourcePrefixes:[...r].sort()}}function At(t,e){return e.endsWith(".rs")?t.rootFiles.has(e)?!0:Mt(e)?!1:t.sourcePrefixes.some(r=>e.startsWith(r)):!1}function Nt(t){return/^\s*pub\s+(?!\()/.test(t)}function vt(t){if(!T(t))return[];let e=[];return q(t,"",e,0),e}function q(t,e,r,n){let s=R(t,e);if(T(s)&&(T(R(s,"Cargo.toml"))&&r.push(e),!(n>=_t)))for(let i of Tt(s,{withFileTypes:!0})){if(!i.isDirectory()||jt.has(i.name))continue;let o=e?`${e}/${i.name}`:i.name;q(t,o,r,n+1)}}function Ct(t){let e=!1;for(let r of t.split(`
|
|
2
|
+
`)){let n=r.replace(/\s+#.*$/,"").trim(),s=/^\[([^\]]+)\]$/.exec(n);if(s){e=s[1]==="lib";continue}if(!e)continue;let i=/^path\s*=\s*["']([^"']+)["']/.exec(n)?.[1];if(i)return i.replaceAll("\\","/").replace(/^\.\//,"")}return null}function It(t){let e=!1;for(let r of t.split(`
|
|
3
|
+
`)){let n=r.replace(/\s+#.*$/,"").trim(),s=/^\[([^\]]+)\]$/.exec(n);if(s){e=s[1]==="package";continue}if(e&&/^autolib\s*=\s*false\b/.test(n))return!0}return!1}function Mt(t){return/(?:^|\/)src\/main\.rs$/.test(t)||/(?:^|\/)src\/bin\//.test(t)||/(?:^|\/)(?:examples|tests|benches)\//.test(t)}import{existsSync as $t,readdirSync as Lt}from"fs";import{join as Gt}from"path";var Vt=/^(?:[\w.-]+\.config\.[cm]?[jt]s|package\.json)$/,Xt=/(?:\.{1,2}\/)?[\w@./-]+\.(?:[cm]?[jt]sx?)\b/g,Ut=u("config-referenced-files",{clearGroups:["whole-project"]});function Bt(t){return Ut.get(t,()=>Wt(t))}function Y(t,e){return Bt(t).has(f(e))}function Wt(t){let e=new Set,r=t.config.projectRoot,n;try{n=Lt(r)}catch{return e}let s=n.filter(o=>Vt.test(o)&&$t(Gt(r,o)));if(s.length===0)return e;let i=new Set(m(t,{includeIgnored:!1}).map(o=>f(o)));for(let o of s){let a;try{a=p(r,o,{inputKind:"root configuration file"})}catch(c){if(d(c))continue;continue}for(let c of a.matchAll(Xt)){let g=f(c[0]).replace(/^\.\//,"");g.startsWith("..")||g.startsWith("/")||i.has(g)&&e.add(g)}}return e}import{existsSync as w,readdirSync as Kt}from"fs";import{join as P}from"path";var Ht=["trigger.config.ts","trigger.config.mts","trigger.config.js","trigger.config.mjs"],qt=["./src/trigger","./trigger"],Yt=/\bdirs\s*:\s*\[([^\]]*)\]/,Zt=/["'`]([^"'`]+)["'`]/g,Jt=["","apps","packages","services"],Qt=u("framework-task-surface",{clearGroups:["whole-project"]});function zt(t){return Qt.get(t,()=>te(t))}function Z(t,e){let r=f(e);return zt(t).directories.some(n=>r===n.directory||r.startsWith(`${n.directory}/`))}function te(t){let e=new Map;for(let r of ee(t.config.projectRoot))for(let n of re(t,r))e.has(n)||e.set(n,{directory:n,framework:"trigger.dev",config:r});return{directories:[...e.values()].sort((r,n)=>r.directory.localeCompare(n.directory))}}function ee(t){let e=[],r=n=>{for(let s of Ht){let i=n?`${n}/${s}`:s;w(P(t,i))&&e.push(i)}};r("");for(let n of Jt.slice(1)){let s=P(t,n);if(!w(s))continue;let i;try{i=Kt(s)}catch{continue}for(let o of i)r(`${n}/${o}`)}return e}function re(t,e){let r;try{r=p(t.config.projectRoot,e,{inputKind:"framework task config"})}catch(a){return d(a)?[]:[]}let n=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",s=Yt.exec(r)?.[1],i=s?[...s.matchAll(Zt)].map(a=>a[1]):qt,o=[];for(let a of i){let c=f(P(n,a)).replace(/\/+$/,"");c===""||c.startsWith("..")||w(P(t.config.projectRoot,c))&&o.push(c)}return o}function ne(t){return S(t)==="barrel"}function Q(t){return se.get(t,()=>{let r=m(t,{includeIgnored:!1}).filter(o=>{let a=S(o);return a==="entry"||a==="worker"});if(r.length===0)return new Set;let n=A(t),s=new Set,i=new Set;for(;r.length>0;){let o=r.shift();if(!s.has(o)){s.add(o),S(o)==="barrel"&&i.add(o);for(let a of n.get(o)??[])s.has(a)||r.push(a)}}return i})}var se=u("live-barrels",{clearGroups:["whole-project"]});function ie(t,e){return Q(t).has(f(e))}function dr(t){let e=Q(t);return m(t,{includeIgnored:!1}).filter(r=>ne(r)&&!e.has(r)&&!oe(t,r))}function oe(t,e){let r=f(e),n=N(t).forFile(r,{facts:!0}).facts?.callables;return n&&n.length>0?!0:(t.get(`SELECT COUNT(*) AS n
|
|
4
|
+
FROM defn_enclosing_ranges der
|
|
5
|
+
JOIN documents d ON d.id = der.document_id
|
|
6
|
+
WHERE d.relative_path = ?
|
|
7
|
+
AND der.end_line - der.start_line >= 2`,r)?.n??0)>0}function mr(t,e){let r=f(e),n=S(e);return n==="entry"||n==="worker"||Te(r)||Z(t,r)||Y(t,r)||ie(t,r)}function ae(t,e,r){let n=f(r),s=[];E(t,n)&&s.push("package-surface-file"),ue(t,e,n)&&s.push("transitive-package-surface"),H(t,e,n)&&s.push("rust-public-library"),Ee(e,n)&&s.push("framework-entrypoint");let i=t.config.entryRoots;return i&&(i.files?.some(o=>f(o)===n)&&s.push("configured-file"),i.pathPrefixes?.some(o=>n.startsWith(f(o)))&&s.push("configured-path-prefix"),i.qualifiedVars?.some(o=>we(e,o))&&s.push("configured-qualified-var"),i.symbolPatterns?.some(o=>{try{return _(o,"entryRoots.symbolPatterns entry").test(e)}catch{return!1}})&&s.push("configured-symbol-pattern")),s}function Sr(t,e,r){return ae(t,e,r).length>0}var ce=u("package-surface-reachability",{clearGroups:["whole-project"]}),fe=u("explicit-package-surface-reachability",{clearGroups:["whole-project"]});function ue(t,e,r){let n=ge(t).get(r);return n===void 0?!1:n===null||n.has(b(e))}function hr(t,e,r){let n=le(t).get(r);return n===void 0?!1:n===null||n.has(b(e))}function ge(t){return ce.get(t,()=>z(t,e=>E(t,e)))}function le(t){return fe.get(t,()=>z(t,e=>G(t,e)))}function z(t,e){let r=new Map,n=[];for(let s of m(t,{includeIgnored:!1}))e(s)&&(r.set(s,null),n.push(s));for(;n.length>0;){let s=n.shift(),i=r.get(s);if(i!==void 0)for(let o of O(t,s)){if(!o.sourcePath||t.isIgnored(o.sourcePath))continue;let a=pe(i,o);a!==void 0&&de(r,o.sourcePath,a)&&n.push(o.sourcePath)}}return r}function pe(t,e){if(t===null)return e.kind==="named"?new Set(e.names):null;if(e.kind==="star")return new Set(t);if(e.kind==="star-as")return e.names.some(n=>t.has(n))?null:void 0;let r=e.names.filter(n=>t.has(n));return r.length>0?new Set(r):void 0}function de(t,e,r){if(!t.has(e))return t.set(e,r),!0;let n=t.get(e);if(n===void 0)return!1;if(n===null||r===null)return n===null?!1:(t.set(e,null),!0);let s=!1;for(let i of r)n.has(i)||(n.add(i),s=!0);return s}var tt=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),me=new Set(["default","generateMetadata","generateStaticParams"]),Se=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),he=new Set(["default","middleware","config"]),be=new Set(["register","onRequestError"]),ye=new Set(["onRouterTransitionStart"]),Pe=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),xe=new Set(["load","actions","entries",...tt]),ke=new Set(["default"]);function Ee(t,e){let r=b(t);return r===""?!1:et(e)?tt.has(r):rt(e)?me.has(r):nt(e)?Se.has(r):st(e)?he.has(r):it(e)?be.has(r):ot(e)?ye.has(r):at(e)?Pe.has(r):ct(e)?xe.has(r):Re(e)?ke.has(r):!1}function Te(t){return et(t)||rt(t)||nt(t)||st(t)||it(t)||ot(t)||at(t)||ct(t)}function et(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function rt(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function nt(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function st(t){return j(t,"(?:middleware|proxy)\\.(?:ts|js|mts|mjs)")}function it(t){return j(t,"instrumentation\\.(?:ts|js|mts|mjs)")}function ot(t){return j(t,"instrumentation-client\\.(?:ts|js|mts|mjs)")}function j(t,e){return new RegExp(`^(?:src/)?${e}$`).test(t)||new RegExp(`(?:^|/)src/${e}$`).test(t)||new RegExp(`(?:^|/)(?:apps|services|packages)/[^/]+/(?:src/)?${e}$`).test(t)}function at(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function ct(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function Re(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function we(t,e){let r=e.lastIndexOf("/");if(r<0)return!1;let n=e.slice(0,r),s=e.slice(r+1);return t.includes(J(n)+"/")&&t.includes(J(s)+".")}function J(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{E as a,Oe as b,ne as c,ie as d,dr as e,mr as f,ae as g,Sr as h,hr as i,Te as j};
|
|
8
|
+
//# sourceMappingURL=chunk-NJQISBL4.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{c as P}from"./chunk-2BMSSRBH.js";import{a as B}from"./chunk-F5GSBHC6.js";import{d as E}from"./chunk-C7C6AKAT.js";import{b as p,g as f,i as S,m as h,n as L}from"./chunk-RBAD4GJ2.js";import{E as u}from"./chunk-ZLMXIQLC.js";import{Ba as g,Ca as y}from"./chunk-JZ2A7LDM.js";function $(n,t,s={}){let e=B(n,t);if(!e)return null;let a=new P(n),o=I(n,e),c=e.endLine-e.startLine+1,m=a.calleeMap([e],{additive:!0,semantic:s.semantic}).get(e.symbolId)??[],l=new Set(m.map(b=>b.symbol));return{symbol:e.symbol,shortName:E(e.symbol),relativePath:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:c,branches:o.branches,estimateBasis:o.estimateBasis,cyclomaticEstimate:o.branches+1,calleeCount:l.size,fanIn:w(n,e.symbolId),fanOut:F(m,e.relativePath)}}function I(n,t){let s=u(n,t.relativePath);if(s){let e=S(s.rootNode,t.startLine,t.endLine);if(e)return{branches:D(e),estimateBasis:"ast"}}return{branches:M(N(n,t.relativePath,t.startLine,t.endLine),x(n,t.relativePath)),estimateBasis:"regex-fallback"}}function H(n,t){let s=new Map,e=new Map;for(let a of t){let o=e.get(a.relativePath)??[];o.push(a),e.set(a.relativePath,o)}for(let[a,o]of e){let c=new Map;for(let i of L(n,a)?.callables??[])i.branches!==void 0&&c.set(`${i.startLine}:${i.endLine}`,i.branches);let r=[];for(let i of o){let d=c.get(`${i.startLine}:${i.endLine}`);d===void 0?r.push(i):s.set(i.symbolId,{branches:d,estimateBasis:"ast"})}if(r.length===0)continue;let m=u(n,a),l=m===null?[]:r.filter(i=>m.rootNode.startPosition.row<=i.startLine&&m.rootNode.endPosition.row>=i.endLine),b=new Set(l.map(i=>i.symbolId));if(m&&l.length>0){for(let i of l)s.set(i.symbolId,{branches:0,estimateBasis:"ast"});_(m.rootNode,l,s)}for(let i of r)b.has(i.symbolId)||s.set(i.symbolId,v(n,i))}return s}function v(n,t){return{branches:M(N(n,t.relativePath,t.startLine,t.endLine),x(n,t.relativePath)),estimateBasis:"regex-fallback"}}function x(n,t){return n.get("SELECT language FROM documents WHERE relative_path = ?",t)?.language??"unknown"}function N(n,t,s,e){try{return g(n.config.projectRoot,t,{inputKind:"indexed source file"}).split(`
|
|
2
|
+
`).slice(s,e+1).join(`
|
|
3
|
+
`)}catch(a){if(!y(a))throw a;return""}}function w(n,t){return n.get(`SELECT COUNT(DISTINCT c.document_id) AS c
|
|
4
|
+
FROM mentions m
|
|
5
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
6
|
+
JOIN (
|
|
7
|
+
SELECT m2.symbol_id, c2.document_id
|
|
8
|
+
FROM mentions m2
|
|
9
|
+
JOIN chunks c2 ON m2.chunk_id = c2.id
|
|
10
|
+
WHERE m2.role = 1
|
|
11
|
+
GROUP BY m2.symbol_id
|
|
12
|
+
) sym_def ON sym_def.symbol_id = m.symbol_id
|
|
13
|
+
WHERE m.symbol_id = ?
|
|
14
|
+
AND m.role != 1
|
|
15
|
+
AND sym_def.document_id != c.document_id`,t)?.c??0}function F(n,t){return new Set(n.filter(s=>s.file!==t).map(s=>s.symbol)).size}function D(n){let t=0;return f(n,s=>{t+=h(s)}),t}function _(n,t,s){let e=[...t].sort((a,o)=>a.startLine-o.startLine||o.endLine-a.endLine);f(n,a=>{let o=h(a);if(o===0)return;let c=a.startPosition.row,r=a.endPosition.row;for(let m of e){if(m.startLine>c)break;if(m.endLine<r)continue;let l=s.get(m.symbolId);l&&(l.branches+=o)}})}function M(n,t){let s=p(n),e=0,a=[/\bif\b/g,/\belse\s+if\b/g,/\belse\b/g,/\bfor\b/g,/\bwhile\b/g,/\bswitch\b/g,/\bcase\b/g,/\bcatch\b/g,/\?\s*[^?]/g,/&&/g,/\|\|/g];for(let o of a){let c=s.match(o);c&&(e+=c.length)}if(t==="python"){let o=[/\belif\b/g,/\bexcept\b/g,/\bfinally\b/g];for(let c of o){let r=s.match(c);r&&(e+=r.length)}}else if(t==="rust"){let o=[/\bmatch\b/g,/=>/g,/\bloop\b/g];for(let c of o){let r=s.match(c);r&&(e+=r.length)}}else if(t==="ruby"){let o=[/\belsif\b/g,/\bunless\b/g,/\brescue\b/g,/\bwhen\b/g];for(let c of o){let r=s.match(c);r&&(e+=r.length)}}else if(t==="go"){let o=[/\bselect\b/g,/\bdefer\b/g];for(let c of o){let r=s.match(c);r&&(e+=r.length)}}return e}export{$ as a,I as b,H as c,D as d};
|
|
16
|
+
//# sourceMappingURL=chunk-NJT3ZEKY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as M}from"./chunk-OIOC5EHF.js";import{b as $}from"./chunk-BOJ5SVE2.js";import{a as p}from"./chunk-BGBBVSH4.js";import{o as I}from"./chunk-YSYPDRD5.js";import{d as D}from"./chunk-MTDBHTSF.js";import{d as b,l as h,r as x,s as y,w as L}from"./chunk-C7C6AKAT.js";import{a as g,e as S}from"./chunk-RBAD4GJ2.js";import{h as d}from"./chunk-ETC674NS.js";var B=new Set(D());function X(e,n={}){let{scope:s,minLoc:i=1,limit:r,scanLimit:c,maxShapeFrequency:a=12}=n,o=n.semantic!==!1,t=w(e,F(e,{scope:s,minLoc:i,scanLimit:c}),{semantic:o,maxShapeFrequency:a}),m=P(t);return r?m.slice(0,r):m}function F(e,n){let s=L(e,{scope:n.scope}).filter(i=>v(i)&&!e.isIgnored(i.relativePath)).filter(i=>p(i)>=n.minLoc);return typeof n.scanLimit=="number"&&n.scanLimit>0&&s.sort((i,r)=>p(r)-p(i)||i.relativePath.localeCompare(r.relativePath)),$(s,n.scanLimit)}function v(e){return!e.isFunctionLike||h(e.symbol)?!1:e.kind===null||B.has(e.kind)}function w(e,n,s){let i=[];for(let a of n){let o=G(e,a,s);o&&i.push({signature:o,definition:a,fn:z(a)})}let r=new Map;for(let a of i)r.set(a.signature,(r.get(a.signature)??0)+1);let c=new Map;for(let a of i){let o=C(a.fn.loc),t=(r.get(a.signature)??0)>s.maxShapeFrequency,m=t?M(e,a.definition):null;if(t&&!m)continue;let u=t?`${a.signature}\0body\0${m}`:`${a.signature}\0band\0${o}`,l=c.get(u)??{signature:a.signature,locBand:o,exactBody:t,functions:[]};l.functions.push(a.fn),c.set(u,l)}return[...c.values()]}function z(e){return{symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:p(e)}}function P(e){let n=[];for(let s of e)s.functions.length>=2&&n.push(s);return n.sort((s,i)=>{let r=i.functions.length-s.functions.length;if(r!==0)return r;let c=s.functions.reduce((o,t)=>o+t.loc,0);return i.functions.reduce((o,t)=>o+t.loc,0)-c}),n}function C(e){return e<=5?"<=5":e<=20?"6-20":">20"}function G(e,n,s){if(s.semantic){let c=I(e,n);if(c)return c}let i=k(n.documentation),r=i?A(i):null;return r||E(N(e,n.relativePath,n.startLine,n.endLine,n.leaf),n.leaf)}function k(e){return x(y(e))}function N(e,n,s,i,r){let c=d(e,n);if(!c)return null;let a=c.split(/\r?\n/),o=O(a,s,i,r);for(let t of o){let m=Math.min(a.length-1,Math.max(t,t+4)),u="";for(let l=t;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,q(u)))return u}if(u&&u.includes("("))return u}return null}function q(e){let n=e.replace(/\s+/g," ").trim();return!n.includes("(")||S(n)>0?!1:/[;{]$/.test(n)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(n)||/\)\s*As\s+.+$/i.test(n)}function A(e){if(!e||!e.trim())return null;let n=e.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=n.indexOf("(");return s===-1||(n=n.slice(s),n=n.replace(/\s+/g,"").toLowerCase(),n.length<3)?null:n}function E(e,n){if(!e||!e.trim())return null;let s=e.replace(/\s+/g," ").trim(),i=s.indexOf("(");if(i===-1)return null;let r=s.slice(0,i),a=new RegExp(`\\b${g(n)}\\b`,"i").exec(r);a&&typeof a.index=="number"&&(r=r.slice(0,a.index)),r=r.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 o=R(s.slice(i)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!o.startsWith("("))return null;let t=`${r?`${r} `:""}${o}`.replace(/\s+/g,"").toLowerCase();return t.length>=3?t:null}function R(e){let n=0,s=0,i=0,r=0,c=null,a=!1;for(let o=0;o<e.length;o+=1){let t=e[o];if(c){if(a){a=!1;continue}if(t==="\\"){a=!0;continue}t===c&&(c=null);continue}if(t==='"'||t==="'"||t==="`"){c=t;continue}if(t==="(")n+=1;else if(t===")")n=Math.max(0,n-1);else if(t==="[")i+=1;else if(t==="]")i=Math.max(0,i-1);else if(t==="<")r+=1;else if(t===">")r=Math.max(0,r-1);else if(t==="{"){if(n===0&&i===0&&r===0)return e.slice(0,o);s+=1}else if(t==="}")s=Math.max(0,s-1);else if(t==="="&&e[o+1]===">"&&n===0&&s===0&&i===0&&r===0)return e.slice(0,o)}return e}function O(e,n,s,i){let r=g(i),c=new RegExp(`\\b${r}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${r}\\b`,"i"),o=[],t=new Set,m=Math.max(0,Math.min(n,e.length-1)),u=Math.max(m,Math.min(e.length-1,Math.max(s,n+4)));for(let l=m;l<=u;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}for(let l=0;l<e.length;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}return o}export{X as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NKMKZP6A.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as S}from"./chunk-CFE6PSG6.js";import{a as g}from"./chunk-2GJSD5GY.js";import{a as L}from"./chunk-VBV6ALJE.js";import{a as x}from"./chunk-BOJ5SVE2.js";import{c as P}from"./chunk-2BMSSRBH.js";import{a as w}from"./chunk-BGBBVSH4.js";import{a as v,h as y}from"./chunk-NJQISBL4.js";import{d as f,f as d,g as u,j as m}from"./chunk-C7C6AKAT.js";import{p as h,q as b}from"./chunk-RBAD4GJ2.js";import{basename as F,extname as T}from"path";function Q(n,e){let{scope:r,maxLoc:i=15,limit:o=30,scanLimit:t}=e??{},s=new P(n),a=L({candidates:()=>j(n,s,r,i),orderCandidates:x,scanLimit:t,profile:{name:"passthrough-candidates"},prepare:l=>s.calleeMap(l,{semantic:e?.semantic!==!1}),evaluate:(l,c)=>C(n,l,c.get(l.symbolId)??[]),orderResults:(l,c)=>l.loc-c.loc||l.file.localeCompare(c.file)});return I(a).slice(0,o===void 0?a.length:o)}var p=3;function I(n){let e=new Map,r=new Map;for(let i of n){if(i.file===i.forwardsToFile)continue;let o=`${i.file}\0${i.forwardsToFile}`;e.set(o,(e.get(o)??0)+1);let t=u(i.symbol),s=u(i.forwardsTo);if(!t||!s||t===s)continue;let a=`${i.file}\0${t}`;r.set(a,(r.get(a)??0)+1)}return n.map(i=>{let o=e.get(`${i.file}\0${i.forwardsToFile}`)??0,t=u(i.symbol),s=t?r.get(`${i.file}\0${t}`)??0:0;if(o<p&&s<p)return i;let a=o>=p?`facade: ${o} sibling forwards from this file to ${i.forwardsToFile}`:`facade: ${s} methods of ${t} forward to members of its collaborators`,l=[...i.boundaryEvidence,a];return{...i,boundaryEvidence:l,actionTier:"signal",recommendation:D("signal",l,i.publicFacadeEvidence)}})}function C(n,e,r){let i=R(r);if(i.size!==1||!h(n,e.relativePath,e.startLine,e.endLine))return null;let[,o]=[...i.entries()][0],t=E(n,e,o),s=$(n,e),a=t.length>0||s.length>0?"signal":"direct";return{symbol:e.symbol,shortName:f(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:w(e),forwardsTo:o.symbol,forwardsToShort:f(o.symbol),forwardsToFile:o.file,actionTier:a,boundaryEvidence:t,publicFacadeEvidence:s,recommendation:D(a,t,s)}}function E(n,e,r){return S(n,e.relativePath,e.startLine,"passthrough","explicit ignore-passthrough comment",[{label:"passthrough name",value:d(e.symbol),side:"self"},{label:"callee name",value:d(r.symbol),side:"other"},{label:"passthrough module",value:F(e.relativePath,T(e.relativePath)),side:"self"},{label:"callee module",value:F(r.file,T(r.file)),side:"other"}])}function D(n,e,r){if(n==="signal"){if(r.length>0)return`Review the public API before inlining; public-facade evidence: ${r.slice(0,2).join("; ")}.`;let i=e.filter(A);return i.length>0?`Review the public API before inlining; public-surface evidence: ${i.slice(0,2).join("; ")}.`:`Review the boundary before inlining; boundary evidence: ${e.slice(0,2).join("; ")}.`}return"Inline or remove this passthrough unless an external API or runtime registration depends on the forwarding name."}function $(n,e){return g(n,e)?v(n,e.relativePath)?["exported passthrough is declared on the package public surface"]:y(n,e.symbol,e.relativePath)?["exported passthrough matches configured or framework public entry surface"]:[]:[]}function A(n){return n.includes("public surface")}function R(n){let e=n.some(i=>m(i.symbol))?n.filter(i=>m(i.symbol)):n,r=new Map;for(let i of e)r.has(i.symbol)||r.set(i.symbol,i);return r}function j(n,e,r,i){return e.productionCallableDefinitions({scope:r,minLoc:3,maxLoc:i,requireFunctionLikeSymbol:!0,excludeRustTraitImplMembers:!0}).filter(o=>!b(n,o))}export{Q as a,I as b};
|
|
2
|
+
//# sourceMappingURL=chunk-NODFZ6ED.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-F5GSBHC6.js";import{b as i}from"./chunk-ZLMXIQLC.js";import{existsSync as h}from"fs";import{isAbsolute as p,join as g}from"path";function D(e,n){let t=l(e,n,{allowMultiple:!1})[0]?.relativePath;return t||d(e,n)}function P(e,n){return l(e,n,{allowMultiple:!0}).map(t=>t.relativePath)}function S(e,n){let t=l(e,n,{allowMultiple:!0});return t.length===1?t[0].relativePath:null}function I(e,n){let t=i(e,n,{allowMultiple:!0,requirePathMatch:!0});return t.length===1?t[0].relativePath:null}function d(e,n){if(!n)return null;let t=n.replace(/\\/g,"/").replace(/^\.\//,""),r=p(t)&&t.startsWith(e.config.projectRoot)?t.slice(e.config.projectRoot.length).replace(/^\/+/,""):t,o=g(e.config.projectRoot,r);return h(o)?r:null}function l(e,n,t){let r=d(e,n);if(r)return i(e,r,t).filter(a=>a.relativePath===r);let o=n.replace(/\\/g,"/").replace(/^\.\//,""),s=p(o)||o.includes("/"),c=i(e,n,{...t,requirePathMatch:s});if(c.length===0){if(s)return[];let a=u(e,n);return!a||e.isIgnored(a.relativePath)?[]:[{relativePath:a.relativePath,score:700}]}return c}export{D as a,P as b,S as c,I as d};
|
|
2
|
+
//# sourceMappingURL=chunk-NSM5IEVW.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as S}from"./chunk-
|
|
1
|
+
import{c as S}from"./chunk-ROPJDEJZ.js";import{a as y,b as h}from"./chunk-E65ELFKU.js";import{a as f}from"./chunk-VDSDOEWF.js";import{d as v}from"./chunk-WFA35BGR.js";import{c as p}from"./chunk-A4WEAK35.js";import{b as d}from"./chunk-F5GSBHC6.js";import{d as l,v as m}from"./chunk-C7C6AKAT.js";import{k as u}from"./chunk-ETC674NS.js";function B(i,r,c={}){let t=g(i,r,c);if(t.kind!=="matched")return t;let{referenceEvidence:n,claimSupport:e,...s}=t;return s}function g(i,r,c={}){let t=d(i,r);if(!t.match)return{kind:"missing",query:r};if(t.total>1)return{kind:"ambiguous",query:r,total:t.total,candidates:[{symbol:t.match.symbol,shortName:l(t.match.symbol),relativePath:t.match.relativePath,startLine:t.match.startLine},...t.candidates]};let n=t.match,e=R(c.parts),s=e.includes("definition")||e.includes("references")?S(i,n.symbol,{semantic:c.semantic,referenceContext:c.referenceContext}):{definitions:[],referencedBy:[],referenceEvidence:[],claimSupport:null},o=e.includes("callers")||e.includes("callees")?f(i,n.symbol,{semantic:c.semantic}):null,a=c.relatedSourceLines??80;return{kind:"matched",query:r,symbol:n.symbol,shortName:l(n.symbol),file:n.relativePath,parts:e,definition:e.includes("definition")?v(i,n.symbol):null,referenceWindows:e.includes("references")?L(i,s.referencedBy):[],callers:e.includes("callers")?E(i,o?.callers??[],a):[],callees:e.includes("callees")?E(i,o?.callees??[],a):[],dependencies:e.includes("dependencies")?y(i,n.relativePath):[],consumers:e.includes("consumers")?h(i,n.relativePath):[],referenceEvidence:s.referenceEvidence,claimSupport:s.claimSupport}}function L(i,r){let c=r.filter(n=>n.sourceStartLine!==null&&n.sourceEndLine!==null&&n.source!==null).sort((n,e)=>n.relativePath.localeCompare(e.relativePath)||n.sourceStartLine-e.sourceStartLine||n.line-e.line),t=[];for(let n of c){let e=t[t.length-1];if(e&&e.relativePath===n.relativePath&&n.sourceStartLine<=e.endLine+1){e.endLine=Math.max(e.endLine,n.sourceEndLine),e.references.push(b(n)),e.source=u(i,e.relativePath).slice(e.startLine,e.endLine+1).join(`
|
|
2
2
|
`);continue}t.push({relativePath:n.relativePath,startLine:n.sourceStartLine,endLine:n.sourceEndLine,source:n.source,references:[b(n)]})}return t}function b(i){return{line:i.line,enclosingSymbol:i.enclosingSymbol,enclosingShort:i.enclosingShort}}function R(i){let r=i&&i.length>0?i:["definition","references"];return[...new Set(r)]}function E(i,r,c){let t=[],n=new Set;for(let e of r){if(n.has(e.symbol))continue;n.add(e.symbol);let s=(e.file?m(i,e.file).find(a=>a.symbol===e.symbol):void 0)??d(i,e.symbol).match;if(!s)continue;let o=p(i,s.relativePath,s.startLine,s.endLine,c);o&&t.push({...o,symbol:e.symbol,shortName:e.shortName,omittedLines:Math.max(0,s.endLine-o.endLine)})}return t}export{B as a,g as b};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-NTGUVNR2.js.map
|