scip-query 0.21.0 → 0.22.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 +72 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-4IYG2SKW.js +2 -0
- package/dist/call-graph-WQNXMNNN.js +2 -0
- package/dist/{chunk-AQDWTCDC.js → chunk-25GWKRUZ.js} +2 -2
- package/dist/chunk-2BTJALUS.js +454 -0
- package/dist/chunk-2KVU55CW.js +11 -0
- package/dist/{chunk-BBWPOMGU.js → chunk-2OXVP5U5.js} +2 -2
- package/dist/{chunk-D5W4UZY5.js → chunk-2RE5OCHZ.js} +2 -2
- package/dist/{chunk-2I3RSUWX.js → chunk-2XCGSDIT.js} +2 -2
- package/dist/{chunk-V7LQZTTZ.js → chunk-2YC7YNKT.js} +2 -2
- package/dist/chunk-3QXC54FQ.js +3 -0
- package/dist/{chunk-32A42O5B.js → chunk-3TJY6M3B.js} +2 -2
- package/dist/chunk-42W3LFUK.js +13 -0
- package/dist/chunk-44T4DUAA.js +2 -0
- package/dist/chunk-4GAQ6FI4.js +43 -0
- package/dist/{chunk-4S4DF62J.js → chunk-4HE7MVWD.js} +2 -2
- package/dist/{chunk-TGWNNMPF.js → chunk-4TQU4TX2.js} +2 -2
- package/dist/{chunk-SKUMCCC5.js → chunk-56NQAEPJ.js} +2 -2
- package/dist/chunk-57N6LN2A.js +3 -0
- package/dist/{chunk-LPGDO2XA.js → chunk-5H5WTJSD.js} +2 -2
- package/dist/{chunk-EA4SH4U5.js → chunk-5YRQIE2B.js} +2 -2
- package/dist/{chunk-O2RM7E7L.js → chunk-5ZMBRQFC.js} +4 -4
- package/dist/{chunk-ICHBVITH.js → chunk-6HRZQLOI.js} +2 -2
- package/dist/{chunk-WULAPQUD.js → chunk-6NC3YSPY.js} +2 -2
- package/dist/{chunk-IDPLC3FI.js → chunk-6VEFRPTD.js} +2 -2
- package/dist/{chunk-IOKWFRFQ.js → chunk-7C26EKLZ.js} +2 -2
- package/dist/{chunk-S3RTPPLQ.js → chunk-7IQXARSQ.js} +2 -2
- package/dist/chunk-7JYHQAH2.js +22 -0
- package/dist/chunk-7KSO2OAP.js +2 -0
- package/dist/{chunk-2ZBMOQGG.js → chunk-7U2YQSDE.js} +2 -2
- package/dist/{chunk-EKZRF57O.js → chunk-7XA3OM44.js} +2 -2
- package/dist/{chunk-4EXFZP6H.js → chunk-7XZGZBSQ.js} +2 -2
- package/dist/chunk-7YQOCABQ.js +2 -0
- package/dist/chunk-A77SCPW2.js +3 -0
- package/dist/chunk-AK3PYTIK.js +5 -0
- package/dist/chunk-AMIMMNA4.js +11 -0
- package/dist/{chunk-MOBF2GH6.js → chunk-AQ2PORIO.js} +2 -2
- package/dist/{chunk-YUFWLWIC.js → chunk-ARVO6TTW.js} +2 -2
- package/dist/chunk-AUY5BL74.js +2 -0
- package/dist/{chunk-RGCJ4646.js → chunk-AYPDH2LU.js} +2 -2
- package/dist/{chunk-73Z33VFI.js → chunk-AZS7YPCB.js} +2 -2
- package/dist/{chunk-SYUNTKO2.js → chunk-BDGTPN27.js} +2 -2
- package/dist/{chunk-BATIVRU2.js → chunk-BDHFVH2M.js} +2 -2
- package/dist/chunk-BECZLYNU.js +8 -0
- package/dist/chunk-BJT7LSPK.js +3 -0
- package/dist/{chunk-6SWA6B24.js → chunk-BTVKZGWT.js} +2 -2
- package/dist/{chunk-QD7IFBCR.js → chunk-BUTEIZKP.js} +2 -2
- package/dist/{chunk-UZFCZ7SJ.js → chunk-BVFYEEBH.js} +2 -2
- package/dist/{chunk-ICUQONOG.js → chunk-BWVQP3LB.js} +2 -2
- package/dist/chunk-BYDAFMSR.js +57 -0
- package/dist/{chunk-BHE44MHT.js → chunk-C76O5MDS.js} +2 -2
- package/dist/chunk-C7IJMOFP.js +134 -0
- package/dist/{chunk-CN2WGM7D.js → chunk-CBBHFNLX.js} +2 -2
- package/dist/{chunk-COTMS5KM.js → chunk-CKRWA452.js} +2 -2
- package/dist/{chunk-ANWGXPPN.js → chunk-CLG6DWVS.js} +2 -2
- package/dist/chunk-D2MVJSP4.js +21 -0
- package/dist/chunk-D35XIZGN.js +2 -0
- package/dist/{chunk-U7DR7MJD.js → chunk-DEAB5TGT.js} +2 -2
- package/dist/{chunk-6GJAP4OE.js → chunk-DJAO2OZJ.js} +2 -2
- package/dist/chunk-DKM723YF.js +79 -0
- package/dist/{chunk-4IIMPWMR.js → chunk-DPWKKNKI.js} +2 -2
- package/dist/chunk-E44IVWIJ.js +367 -0
- package/dist/chunk-EDMB6SSO.js +7 -0
- package/dist/{chunk-KWARB5FZ.js → chunk-EELG7D3Q.js} +2 -2
- package/dist/chunk-EELPBR7E.js +3 -0
- package/dist/chunk-EETGXQY7.js +3 -0
- package/dist/chunk-ENWQWA2R.js +2 -0
- package/dist/{chunk-HUZNZ3H2.js → chunk-ERCYGVAM.js} +2 -2
- package/dist/{chunk-WSG3DK5H.js → chunk-EWWY2ZFL.js} +2 -2
- package/dist/chunk-F24G5NBE.js +3 -0
- package/dist/{chunk-XRXCANFQ.js → chunk-F24QUEQP.js} +2 -2
- package/dist/{chunk-KFK7GF5C.js → chunk-FBCVASUG.js} +2 -2
- package/dist/{chunk-35IW3P4H.js → chunk-FELGD32K.js} +2 -2
- package/dist/{chunk-UNORWZIJ.js → chunk-FFJQZG6J.js} +5 -5
- package/dist/{chunk-5SE323LF.js → chunk-FGNCOQUX.js} +2 -2
- package/dist/chunk-FKGQOTKD.js +2 -0
- package/dist/chunk-GDRJB3SB.js +3 -0
- package/dist/chunk-GH5YSGZL.js +5 -0
- package/dist/{chunk-X7PJJYKX.js → chunk-GIQ6CSL4.js} +2 -2
- package/dist/{chunk-2RP27XLR.js → chunk-GPGRZJ3R.js} +2 -2
- package/dist/{chunk-IYV2YBHM.js → chunk-GQIDEID3.js} +2 -2
- package/dist/chunk-GRX7JOXQ.js +2 -0
- package/dist/{chunk-H46QMB7E.js → chunk-GVOMSPGL.js} +2 -2
- package/dist/{chunk-KTRGJLY7.js → chunk-GY7CCCEZ.js} +2 -2
- package/dist/{chunk-VNKYRJKN.js → chunk-H7CG6LOE.js} +2 -2
- package/dist/chunk-HCVJR2V4.js +3 -0
- package/dist/chunk-HG722PO7.js +3 -0
- package/dist/{chunk-LHTT5C3Z.js → chunk-HISEUIL2.js} +2 -2
- package/dist/{chunk-K5MZYZV7.js → chunk-HXOU4XNH.js} +2 -2
- package/dist/chunk-I6UTXNHU.js +6 -0
- package/dist/{chunk-I7PFL5P3.js → chunk-IJMD6BRI.js} +2 -2
- package/dist/{chunk-XXJ7WL3F.js → chunk-IKVNEGTW.js} +2 -2
- package/dist/chunk-IMKZEXZG.js +2 -0
- package/dist/chunk-ISIQLPJ2.js +61 -0
- package/dist/{chunk-DEUGHURX.js → chunk-ISWFRGJ6.js} +2 -2
- package/dist/chunk-IW5XQG5G.js +2 -0
- package/dist/chunk-IXESDH3J.js +2 -0
- package/dist/{chunk-FGB567HK.js → chunk-JAT6C3VX.js} +2 -2
- package/dist/{chunk-7TWP3MCP.js → chunk-JFQBRL3J.js} +2 -2
- package/dist/{chunk-Q7HB7BFJ.js → chunk-JHH5SCZ3.js} +2 -2
- package/dist/{chunk-ZHSARYVS.js → chunk-JJ62MTQH.js} +2 -2
- package/dist/chunk-JT6XX7QY.js +8 -0
- package/dist/{chunk-5H7IWVXJ.js → chunk-JUN5DOAK.js} +2 -2
- package/dist/{chunk-DOPCR5BY.js → chunk-K3XFWJI2.js} +2 -2
- package/dist/{chunk-Y4XQ7LES.js → chunk-KFOYCQAJ.js} +1 -1
- package/dist/{chunk-N5C65OFK.js → chunk-KFVSJX25.js} +2 -2
- package/dist/chunk-KK7GPALL.js +28 -0
- package/dist/{chunk-DHKBIOXF.js → chunk-KQHJEU6V.js} +2 -2
- package/dist/{chunk-WB6LGCFB.js → chunk-KZYID5KV.js} +2 -2
- package/dist/{chunk-KW6B5OL4.js → chunk-LO5JSW2C.js} +2 -2
- package/dist/{chunk-ZW44MCJM.js → chunk-LRI5OMPE.js} +2 -2
- package/dist/{chunk-HG5YI7PV.js → chunk-LXQUF2RP.js} +2 -2
- package/dist/{chunk-TM5XEDDR.js → chunk-MHIEP7EG.js} +2 -2
- package/dist/{chunk-FHV7NMFU.js → chunk-MSR2QRUE.js} +2 -2
- package/dist/chunk-N7FP5H5U.js +57 -0
- package/dist/{chunk-3653GTR7.js → chunk-NEIQPFBI.js} +2 -2
- package/dist/chunk-NK3JMP22.js +2 -0
- package/dist/{chunk-7IOAZRVL.js → chunk-NRBNAECH.js} +2 -2
- package/dist/{chunk-HGKEAP7F.js → chunk-NVSZNESQ.js} +2 -2
- package/dist/{chunk-R2MOKIVO.js → chunk-OJNK5ALA.js} +2 -2
- package/dist/{chunk-RFWAUHVW.js → chunk-OPSAW5DT.js} +2 -2
- package/dist/chunk-OTSPRVNW.js +2 -0
- package/dist/chunk-OXYAWIEA.js +2 -0
- package/dist/chunk-OZETODHH.js +2 -0
- package/dist/chunk-PBUH2P5S.js +3 -0
- package/dist/{chunk-QBANU5BQ.js → chunk-PIFTZEEM.js} +2 -2
- package/dist/{chunk-CKDOY6JA.js → chunk-PLJUQFQN.js} +2 -2
- package/dist/{chunk-JVZNWJBH.js → chunk-PLYUVM4F.js} +2 -2
- package/dist/chunk-PXXYQK55.js +2 -0
- package/dist/{chunk-WZQFY5S7.js → chunk-Q55NF3ZG.js} +2 -2
- package/dist/{chunk-OVPS2ILI.js → chunk-Q5TA4OY4.js} +2 -2
- package/dist/{chunk-OUB4J26T.js → chunk-Q6T2CAJL.js} +2 -2
- package/dist/chunk-Q7GBK5T7.js +81 -0
- package/dist/chunk-QKT4UI2Y.js +2 -0
- package/dist/{chunk-PIZY2GX6.js → chunk-QLBSG7U5.js} +2 -2
- package/dist/chunk-QWKHW6VZ.js +2 -0
- package/dist/{chunk-E7BJXRNV.js → chunk-R6M456QG.js} +2 -2
- package/dist/{chunk-MJNV7OCG.js → chunk-RDULNRSJ.js} +2 -2
- package/dist/{chunk-SSSJO4RG.js → chunk-RHHCLWQ6.js} +2 -2
- package/dist/chunk-RNKPYYYE.js +4 -0
- package/dist/{chunk-IXJ26KJJ.js → chunk-RPL3ARU7.js} +2 -2
- package/dist/{chunk-3EX7DNBC.js → chunk-RYOYJMGF.js} +2 -2
- package/dist/chunk-SB25YMEQ.js +2 -0
- package/dist/chunk-SV2LEFVM.js +2 -0
- package/dist/{chunk-ZBNL3QCY.js → chunk-SVHTMVA4.js} +3 -3
- package/dist/{chunk-6IEVHGWG.js → chunk-SWK4XPUS.js} +2 -2
- package/dist/chunk-T6QD2ZQB.js +43 -0
- package/dist/{chunk-VETXXOYU.js → chunk-TAYD3AE7.js} +2 -2
- package/dist/chunk-TD7VKJ2Y.js +117 -0
- package/dist/{chunk-UQ7XPRWU.js → chunk-TH6IC56G.js} +2 -2
- package/dist/{chunk-XVDMJMES.js → chunk-TKDNDQA7.js} +2 -2
- package/dist/{chunk-CSDDOUA4.js → chunk-TNG2FYS5.js} +2 -2
- package/dist/chunk-TQZV7KV4.js +2 -0
- package/dist/{chunk-AJVMVE7X.js → chunk-TUQIPUDS.js} +2 -2
- package/dist/chunk-TUSPIVZ3.js +4 -0
- package/dist/{chunk-ORBKAUCH.js → chunk-U2N2KE7A.js} +2 -2
- package/dist/{chunk-3PII3JI5.js → chunk-UAQ4T73O.js} +2 -2
- package/dist/{chunk-OFY4HTMI.js → chunk-UDY7MIAW.js} +2 -2
- package/dist/{chunk-WKPZCQLI.js → chunk-URSGGIZX.js} +2 -2
- package/dist/{chunk-UL4VJUMD.js → chunk-UT7TADJX.js} +2 -2
- package/dist/chunk-V4NG5OMS.js +554 -0
- package/dist/{chunk-2H4IAJHO.js → chunk-VMWUV6WB.js} +2 -2
- package/dist/{chunk-46JLFIGA.js → chunk-VTCIYFEK.js} +2 -2
- package/dist/chunk-VU6LIWHT.js +2 -0
- package/dist/chunk-VUSKPCUB.js +2 -0
- package/dist/{chunk-URMZLV2N.js → chunk-VXJJTQYE.js} +2 -2
- package/dist/{chunk-IPAL6DP2.js → chunk-VZ7NXSHV.js} +2 -2
- package/dist/{chunk-FUG6RPYY.js → chunk-WHADK6OS.js} +2 -2
- package/dist/chunk-WN3TCGJ4.js +2 -0
- package/dist/{chunk-B7ECWJAZ.js → chunk-WOOAY3PA.js} +2 -2
- package/dist/chunk-WRQXLNYE.js +9 -0
- package/dist/chunk-WSLEJSFR.js +2 -0
- package/dist/chunk-WYZIHUPZ.js +16 -0
- package/dist/{chunk-ZYREOING.js → chunk-XE33FV5W.js} +2 -2
- package/dist/chunk-XFMVKFSF.js +2 -0
- package/dist/{chunk-BBEDPVPB.js → chunk-XGGBK66W.js} +2 -2
- package/dist/{chunk-OFUBXBYX.js → chunk-XJX6LGHL.js} +2 -2
- package/dist/{chunk-Z3GCK3PD.js → chunk-XN22RGSR.js} +2 -2
- package/dist/{chunk-HWLCBKFE.js → chunk-XSWYJCAK.js} +2 -2
- package/dist/{chunk-IGKKTHJR.js → chunk-XU75YQN4.js} +2 -2
- package/dist/{chunk-E4EJBGDZ.js → chunk-Y2VM4CJC.js} +2 -2
- package/dist/{chunk-U7LRSQG6.js → chunk-Y334QQU5.js} +2 -2
- package/dist/{chunk-APLKXICZ.js → chunk-YAGYMBEX.js} +2 -2
- package/dist/{chunk-XITQLISP.js → chunk-YIHNPKWD.js} +2 -2
- package/dist/chunk-YXPUP5G2.js +11 -0
- package/dist/{chunk-6BJ7SOY7.js → chunk-Z2AWCTN6.js} +2 -2
- package/dist/{chunk-PHSPBQM6.js → chunk-Z2PZVKPR.js} +2 -2
- package/dist/{chunk-QXR5QPSF.js → chunk-ZAZGGSM3.js} +2 -2
- package/dist/{chunk-5236NQV3.js → chunk-ZGW4HLPD.js} +2 -2
- package/dist/chunk-ZOXKSQQB.js +2 -0
- package/dist/{chunk-BD6CV7PN.js → chunk-ZPASRBLF.js} +2 -2
- package/dist/{chunk-DMUGTKMD.js → chunk-ZYM4HOFA.js} +2 -2
- package/dist/{chunk-4ILHWBYF.js → chunk-ZZ3Z7D56.js} +2 -2
- package/dist/cli-main.js +4 -4
- package/dist/{code-CczEvHui.d.ts → code-B17qEMbt.d.ts} +1 -1
- package/dist/code-EQJFDT6I.js +2 -0
- package/dist/code-result-json-7UWIWBOO.js +2 -0
- package/dist/command-descriptors-ORNTVNYV.js +342 -0
- package/dist/{config-types-Cm-VSEBb.d.ts → config-types-B9B60MiR.d.ts} +10 -0
- package/dist/dataflow-6VL54GX5.js +2 -0
- package/dist/{db-LKJXAlNS.d.ts → db-BwIVAYNB.d.ts} +1 -1
- package/dist/dependence-slice-DT2NUHD2.js +2 -0
- package/dist/deps-DB7H5IKC.js +2 -0
- package/dist/direct-navigation-O3LUAYWQ.js +3 -0
- package/dist/entry-map-6K62RV3D.js +2 -0
- package/dist/files-MSLD7MO6.js +2 -0
- package/dist/{graph-evidence-CbUPCSKV.d.ts → graph-evidence-Bjyky2V4.d.ts} +1 -1
- package/dist/{health-Wl5G_LRt.d.ts → health-CPp2Jf1Z.d.ts} +1 -1
- package/dist/hierarchy-IVBXAKFA.js +2 -0
- package/dist/imports-FRAVZ3Y2.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/members-KJOJDYGO.js +2 -0
- package/dist/methods-2AYABBT3.js +2 -0
- package/dist/output-continuation-command-JHMPH6NC.js +3 -0
- package/dist/{output-pagination-VAWOGX4R.js → output-pagination-3OFL2MJV.js} +2 -2
- package/dist/project-reindex-HYO4WD7Z.js +3 -0
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +2 -2
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +3 -3
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +13 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.d.ts +2 -2
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +2 -2
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.d.ts +3 -3
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.d.ts +2 -2
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +2 -2
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.d.ts +3 -3
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +5 -5
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +2 -2
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.d.ts +2 -2
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.d.ts +2 -2
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.d.ts +4 -4
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.d.ts +2 -2
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +2 -2
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +2 -2
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.d.ts +3 -3
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/query-service-fastpath.js +5 -5
- package/dist/query-service-server.js +2 -2
- package/dist/refs-ARMA6XUJ.js +2 -0
- package/dist/refs-pagination-VUGIWN6U.js +2 -0
- package/dist/reindex-worker.js +125 -66
- package/dist/reindex.d.ts +5 -3
- package/dist/reindex.js +135 -76
- package/dist/runtime.d.ts +5 -5
- 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-CppzF5MK.d.ts → scip-cli-H-n59izO.d.ts} +1 -1
- package/dist/slice-YOB5YFAM.js +2 -0
- package/dist/surface-VY5EFWTW.js +2 -0
- package/dist/symbol-resolution-DGQN4XIV.js +2 -0
- package/dist/system-2KQ3QD2P.js +2 -0
- package/dist/trace-HTIPTXAE.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-5FV3VQI7.js +2 -0
- package/dist/watch-server.js +3 -3
- package/docs/CLI_JSON_OUTPUT.md +2 -2
- package/docs/COMMAND_REFERENCE.md +2 -2
- package/docs/schemas/project-config.schema.json +11 -1
- package/package.json +6 -5
- package/skills/scip-explore/SKILL.md +73 -3
- package/skills/scip-explore/agents/openai.yaml +3 -3
- package/skills/scip-explore/references/delegated-exploration.md +51 -0
- package/skills/scip-explore/references/external-evidence.md +72 -0
- package/skills/scip-explore/references/information-model.md +51 -0
- package/skills/scip-explore/scripts/capture-evidence.mjs +666 -0
- package/skills/scip-query/SKILL.md +22 -1
- package/dist/by-kind-CI3O6PQG.js +0 -2
- package/dist/call-graph-6QTUTXH7.js +0 -2
- package/dist/chunk-2COFMIVK.js +0 -60
- package/dist/chunk-35ELD3RM.js +0 -2
- package/dist/chunk-3FQ3KMCD.js +0 -2
- package/dist/chunk-3VLJ2DCA.js +0 -2
- package/dist/chunk-4DCKBY6T.js +0 -5
- package/dist/chunk-4N6QSEMZ.js +0 -10
- package/dist/chunk-4OE2JO6I.js +0 -2
- package/dist/chunk-4UUCUASK.js +0 -554
- package/dist/chunk-54EOGFBR.js +0 -2
- package/dist/chunk-5IZTXSOL.js +0 -117
- package/dist/chunk-5ZJH6DDE.js +0 -2
- package/dist/chunk-63MBA7EG.js +0 -3
- package/dist/chunk-6T7H2AFY.js +0 -3
- package/dist/chunk-7COHFNJK.js +0 -38
- package/dist/chunk-7HU2IJ2T.js +0 -3
- package/dist/chunk-7PPYXENX.js +0 -2
- package/dist/chunk-AA7K3XLM.js +0 -21
- package/dist/chunk-AUP6YI5M.js +0 -2
- package/dist/chunk-CA5RE6H7.js +0 -2
- package/dist/chunk-CT5SI2I4.js +0 -2
- package/dist/chunk-D5EKVZPI.js +0 -2
- package/dist/chunk-DMQ7ZKJG.js +0 -81
- package/dist/chunk-ELNRLMC5.js +0 -29
- package/dist/chunk-F7WQ337U.js +0 -308
- package/dist/chunk-FEQIQ26E.js +0 -2
- package/dist/chunk-FN6EJM6Q.js +0 -2
- package/dist/chunk-FTSQNONX.js +0 -2
- package/dist/chunk-G2F6T5BV.js +0 -2
- package/dist/chunk-G6OGPXJW.js +0 -9
- package/dist/chunk-GFLTPNWV.js +0 -3
- package/dist/chunk-GTDP2SKQ.js +0 -2
- package/dist/chunk-HEOMG7IM.js +0 -8
- package/dist/chunk-I3U2FN2T.js +0 -13
- package/dist/chunk-IUJ3ZFEE.js +0 -7
- package/dist/chunk-LXLD46LH.js +0 -21
- package/dist/chunk-MEI3PTUK.js +0 -2
- package/dist/chunk-MO226P4Q.js +0 -4
- package/dist/chunk-MYUKI5VN.js +0 -4
- package/dist/chunk-OIRWZIYL.js +0 -38
- package/dist/chunk-OIVZ7PW6.js +0 -438
- package/dist/chunk-PNISDVYC.js +0 -3
- package/dist/chunk-PQOL42AW.js +0 -2
- package/dist/chunk-PUVZNFVY.js +0 -11
- package/dist/chunk-PZEI2TVL.js +0 -4
- package/dist/chunk-Q2J2VZZT.js +0 -2
- package/dist/chunk-QDCCHMVZ.js +0 -2
- package/dist/chunk-QLQBZOJH.js +0 -3
- package/dist/chunk-S73HBCGI.js +0 -11
- package/dist/chunk-SDPA5DKN.js +0 -210
- package/dist/chunk-SEUJVWT2.js +0 -3
- package/dist/chunk-SF7X6QNW.js +0 -2
- package/dist/chunk-SWFAFA4G.js +0 -49
- package/dist/chunk-T6FRID7Y.js +0 -3
- package/dist/chunk-TNOHGHZQ.js +0 -2
- package/dist/chunk-U2GPTA5U.js +0 -3
- package/dist/chunk-URTX2BEA.js +0 -6
- package/dist/chunk-VGRUM7JI.js +0 -3
- package/dist/chunk-VWLIOEEF.js +0 -11
- package/dist/chunk-WK4FD4PG.js +0 -2
- package/dist/chunk-X434XZAI.js +0 -2
- package/dist/chunk-YIEFEPG6.js +0 -16
- package/dist/chunk-YRVERHJR.js +0 -49
- package/dist/chunk-ZD3Z54IW.js +0 -2
- package/dist/chunk-ZDVDSDFG.js +0 -4
- package/dist/code-EQL6ZBLH.js +0 -2
- package/dist/code-result-json-6E4J6LGZ.js +0 -2
- package/dist/command-descriptors-QH3G2OVD.js +0 -346
- package/dist/dataflow-2BLMUZBP.js +0 -2
- package/dist/dependence-slice-MGAJDZXB.js +0 -2
- package/dist/deps-GQMUYVKW.js +0 -2
- package/dist/direct-navigation-6RUJKLAV.js +0 -3
- package/dist/entry-map-V2NQP5JU.js +0 -2
- package/dist/files-VM53I4IU.js +0 -2
- package/dist/hierarchy-D553WRSZ.js +0 -2
- package/dist/imports-DOZAJWLW.js +0 -2
- package/dist/members-HE67475K.js +0 -2
- package/dist/methods-K5JK4PPH.js +0 -2
- package/dist/output-continuation-command-LKBUTNRL.js +0 -3
- package/dist/project-reindex-4ARU6QCM.js +0 -3
- package/dist/refs-NBHKL4UQ.js +0 -2
- package/dist/refs-pagination-BBVTIHMH.js +0 -2
- package/dist/slice-U6S6LBSB.js +0 -2
- package/dist/surface-C7SS5CDQ.js +0 -2
- package/dist/symbol-resolution-3FVEKDTJ.js +0 -2
- package/dist/system-6K2NOO5C.js +0 -2
- package/dist/trace-II5K2TMH.js +0 -2
- package/dist/value-flow-MKFUUE5B.js +0 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{a as S}from"./chunk-ERCYGVAM.js";import{c as y}from"./chunk-PLYUVM4F.js";import{h as v}from"./chunk-PBUH2P5S.js";import{a as R,b as k,j as b}from"./chunk-BECZLYNU.js";import{b as C}from"./chunk-Q6T2CAJL.js";import{d as h}from"./chunk-TD7VKJ2Y.js";import{c as m,xa as f,ya as g}from"./chunk-GH5YSGZL.js";function _(e,a){let n=m(a),t=[],r="complete",o=C(n);o==="entry"&&s(t,"operational-root","structural entrypoint path"),o==="worker"&&s(t,"operational-root","worker launch convention"),b(n)&&s(t,"operational-root","framework-discovered entrypoint"),L(e,n)&&s(t,"operational-root","configured entry root");let l=!1;try{l=R(e,n),l&&s(t,"published-api","package manifest export");for(let i of k(e,n))s(t,"operational-root",i)}catch(i){r="partial",s(t,"metadata-unavailable",`package metadata unavailable: ${x(i)}`)}try{let i=f(e.config.projectRoot,n,{maxBytes:8388608,inputKind:"change-surface source"});w(i)&&s(t,"operational-root","module contains a direct-execution process guard")}catch(i){r="partial",s(t,"metadata-unavailable",g(i)?"indexed source file is unavailable on disk":`source metadata unavailable: ${x(i)}`)}return{operationalRoot:t.some(i=>i.kind==="operational-root"),publishedApi:l,coverage:r,reasons:t}}function L(e,a){let n=e.config.entryRoots;return n?n.files?.some(t=>m(t)===a)?!0:n.pathPrefixes?.some(t=>a.startsWith(m(t)))??!1:!1}function w(e){return e.includes("import.meta.url")&&/process\.argv\s*\[\s*1\s*\]/.test(e)||/require\.main\s*===\s*module/.test(e)||/__name__\s*==\s*['"]__main__['"]/.test(e)}function s(e,a,n){e.some(t=>t.kind===a&&t.detail===n)||e.push({kind:a,detail:n})}function x(e){return e instanceof Error?e.message:String(e)}function q(e,a,n={}){let t=S(e,a);if(!t)return null;let r=D(e,t);if(!r||e.isIgnored(r.relative_path))return null;let o=[],l=0,i=M(e,r.relative_path),p=_(e,r.relative_path),F=n.semantic===!1?new Map:v(e,i);for(let u of i){let c=I(e,r,u,F.get(u.symbolId)??new Set);l+=c;let d=N(c),E=[...p.reasons,...c>0?[{kind:"external-consumers",detail:`${c} external consumer${c===1?"":"s"}`}]:[]];o.push({symbol:u.symbol,shortName:h(u.symbol),startLine:u.startLine,endLine:u.endLine,externalConsumers:c,externalConsumerRiskLevel:d,riskLevel:P(d,p),riskReasons:E})}return{file:r.relative_path,symbols:o,totalExternalConsumers:l,fileRisk:p}}function D(e,a){return e.get(`SELECT id, relative_path FROM documents
|
|
2
|
+
WHERE relative_path = ?
|
|
3
|
+
${e.pathExclusionsFor("documents")}
|
|
4
|
+
LIMIT 1`,a)??null}function M(e,a){return new y(e).definitionsForFile(a).sort((n,t)=>n.startLine-t.startLine||n.endLine-t.endLine)}function I(e,a,n,t){let r=e.all(`SELECT DISTINCT consumer_d.relative_path
|
|
5
|
+
FROM mentions m
|
|
6
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
7
|
+
JOIN documents consumer_d ON consumer_d.id = c.document_id
|
|
8
|
+
WHERE m.symbol_id = ?
|
|
9
|
+
AND m.role != 1
|
|
10
|
+
AND c.document_id != ?`,n.symbolId,a.id);return new Set([...r.map(o=>o.relative_path),...[...t].filter(o=>o!==a.relative_path)]).size}function N(e){return e>10?"high":e>0?"medium":"low"}function P(e,a){return e==="high"?"high":e==="medium"||a.operationalRoot||a.publishedApi||a.coverage==="partial"?"medium":"low"}export{q as a};
|
|
11
|
+
//# sourceMappingURL=chunk-2KVU55CW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as T,b as $}from"./chunk-XDAUYDFT.js";import{b as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T,b as $}from"./chunk-XDAUYDFT.js";import{b as k}from"./chunk-WYZIHUPZ.js";import{d as f}from"./chunk-BOJ5SVE2.js";import{d as j}from"./chunk-TD7VKJ2Y.js";var y=["execution","runtime","dataflow","state","temporal","contract","identity","ownership","dependencies"];import{createHash as Y}from"crypto";var Ce=["causal","structure","complete"],Q={causal:["execution","runtime","dataflow","state","temporal"],structure:["contract","identity","ownership","dependencies"],complete:y},Z=2,ee=48,H=64,ne=5e4;function Fe(e,n,t={}){let a=f([...n.symbols??[],...n.locations??[]]),o=f(n.searches??[]);if(a.length===0&&o.length===0)throw new Error("evidence requires at least one positional symbol, --symbol, --at, or --search selector.");let r=t.view??"causal",i=te(t.families,r),s=t.direction??"both",g=f(t.subtypes??[]),l=t.connecting??!1,c=t.inventoryOnly??!1,p=f(t.foldIds??[]),u=t.maxDepth??Z,m=t.maxEdges??ee;if(!Number.isSafeInteger(u)||u<0)throw new RangeError(`Evidence depth must be a non-negative safe integer; received ${u}.`);if(!Number.isSafeInteger(m)||m<=0)throw new RangeError(`Evidence max edges must be a positive safe integer; received ${m}.`);if(!["incoming","outgoing","both"].includes(s))throw new Error(`Unsupported graph evidence direction: ${s}.`);if(c&&p.length>0)throw new Error("Evidence fold materialization cannot be combined with --inventory-only.");let h=k(e,{symbols:a,searches:o,maxDepth:u,maxTopologyCharacters:ne,relations:oe(i)}),w=new Map(h.nodes.map(d=>[d.id,d])),v=h.edges.filter(d=>d.disposition==="emitted"||d.disposition==="folded").flatMap(d=>re(d,w)),E=v.filter(d=>i.includes(d.family)).filter(d=>g.length===0||g.includes(d.subtype)),b=new Set(h.anchors.flatMap(d=>d.nodeIds));if(l&&b.size<2)throw new Error("Connecting evidence requires at least two resolved root nodes.");let S=new Set(E.map(d=>d.id)),P=F(v,b,"incoming").filter(d=>S.has(d.id)),_=F(v,b,"outgoing").filter(d=>S.has(d.id)),O=F(v,b,"both").filter(d=>S.has(d.id)),U=de(i,g,P,_,O),A=s==="incoming"?P:s==="outgoing"?_:O,N=l?Ee(A,[...b],s):A,K=ye(N,b,s),G=[...N].sort((d,X)=>ve(d,X,K)),D=le(G,m),z=ge(D,p),x=c?[]:p.length>0?G.filter(d=>z.has(d.id)):G,I=p.length>0?x:x.slice(0,m),B=p.length>0||c?[]:D,R=Math.max(0,x.length-I.length),J=h.frontiers.filter(d=>d.disposition==="unsupported").length,C=h.coverage.status==="incomplete"?"incomplete":R>0?"bounded":"accounted";return{kind:"graph",view:t.families&&t.families.length>0?"custom":r,families:i,selection:{direction:s,subtypes:g,connecting:l,inventoryOnly:c,foldIds:p},targets:h.anchors.map(d=>({kind:d.kind,query:d.query,status:d.status,nodeIds:[...d.nodeIds],omittedCandidates:d.omittedCandidates})),inventory:U,edges:I,folds:B,coverage:{status:C,topologyStatus:h.coverage.status,scope:h.coverage.scope,maxDepth:u,maxEdges:m,matchedEdges:G.length,eligibleEdges:x.length,returnedEdges:I.length,omittedEdges:R,frontierGroups:h.frontiers.length,unsupportedFrontiers:J,blindSpots:f([...h.coverage.blindSpots,...T(i)]),explanation:c?`${G.length} relationship(s) match the explicit projection; only exact inventory counts were requested.`:p.length>0?`Every relationship in ${p.length} explicitly selected recoverable fold(s) was emitted.`:C==="accounted"?"Every selected relationship in the bounded topology was emitted.":C==="bounded"?`${R} selected relationship(s) were withheld by the explicit edge budget.`:h.coverage.explanation}}}function te(e,n){let t=e&&e.length>0?e:Q[n],a=t.filter(o=>!y.includes(o));if(a.length>0)throw new Error(`Unsupported graph evidence family: ${a.join(", ")}.`);return f(t)}function oe(e){return["call","contract-symbol","import","reference","runtime-boundary"]}function re(e,n){let t=n.get(e.fromNodeId),a=n.get(e.toNodeId);return!t||!a?[]:(e.semantics??[]).flatMap((o,r)=>{let i=se(o);if(!i)return[];let s=$(i,o.subtype);if(!s)throw new Error(`No graph relation provider contract is registered for ${i}/${o.subtype}.`);let g=ce(e);return s.relation.evidenceStrengths.includes(g)?[{id:`${e.id}:${r}:${i}`,family:i,semanticFamily:o.family,subtype:o.subtype,from:V(t),to:V(a),sourceKind:e.kind,providerId:s.provider.id,supportCeiling:s.relation.supportCeiling,establishes:s.relation.establishes,nonClaims:[...s.relation.nonClaims],recoverWith:[...s.relation.recoverWith],evidenceStrength:g,evidenceMethods:f(e.evidence.map(l=>l.method)),evidenceConstituents:ie(e.evidence),context:o.context?{...o.context}:null,attributes:o.attributes?{...o.attributes}:null}]:[]})}function ie(e){let n=new Map;for(let t of e)n.set(`${t.method}\0${t.strength}`,t);return[...n.values()].map(({method:t,strength:a})=>({method:t,strength:a}))}function se(e){switch(e.family){case"control":return e.context?.crossesRuntimeBoundary===!0||e.subtype==="runtime-handoff"?"runtime":"execution";case"data":return"dataflow";case"state":return"state";case"temporal":return"temporal";case"contract":return"contract";case"identity":return e.subtype.startsWith("contains")||e.subtype.startsWith("owns-")?"ownership":e.subtype.startsWith("import")?"dependencies":"identity"}}function V(e){let n=ae(e);return{id:e.id,kind:e.kind,label:n?j(n):e.label,symbol:n,location:e.location?{...e.location}:null}}function ae(e){return e.kind!=="symbol"||!e.id.startsWith("symbol:")?null:decodeURIComponent(e.id.slice(7))}function ce(e){let n=f(e.evidence.map(t=>t.strength));return n.length===1?n[0]:n.includes("exact")&&n.every(t=>t==="exact"||t==="derived")?"mixed":n.includes("candidate")?"candidate":n.includes("unknown")||n.length===0?"unknown":"mixed"}function F(e,n,t){let a=M(e,t),o=new Map,r=new Map,i=[...n].sort();for(let s of i)r.set(s,0);for(let s=0;s<i.length;s+=1){let g=i[s],l=r.get(g);for(let c of a.get(g)??[])o.set(c.edge.id,c.edge),!r.has(c.next)&&(r.set(c.next,l+1),i.push(c.next))}return[...o.values()]}function M(e,n){let t=new Map,a=(o,r,i)=>{let s=t.get(o)??[];s.push({edge:i,next:r}),t.set(o,s)};for(let o of e)n!=="incoming"&&a(o.from.id,o.to.id,o),n!=="outgoing"&&a(o.to.id,o.from.id,o);for(let o of t.values())o.sort((r,i)=>r.edge.id.localeCompare(i.edge.id)||r.next.localeCompare(i.next));return t}function de(e,n,t,a,o){let r=new Set;for(let c of[...t,...a,...o])r.add(`${c.family}\0${c.subtype}`);if(n.length>0)for(let c of e)for(let p of n)r.add(`${c}\0${p}`);let i=c=>{let p=new Map;for(let u of c){let m=`${u.family}\0${u.subtype}`;p.set(m,(p.get(m)??0)+1)}return p},s=i(t),g=i(a),l=i(o);return[...r].map(c=>{let[p,u]=c.split("\0");return{family:p,subtype:u,incoming:s.get(c)??0,outgoing:g.get(c)??0,both:l.get(c)??0}}).sort((c,p)=>y.indexOf(c.family)-y.indexOf(p.family)||c.subtype.localeCompare(p.subtype))}function le(e,n){let t=e.slice(n),a=new Map;for(let i of t){let s=pe(i),g=`${i.family}\0${s}`,l=a.get(g)??[];l.push(i),a.set(g,l)}let o=new Map(e.map((i,s)=>[i.id,s+1])),r=[];for(let[i,s]of[...a].sort(([g],[l])=>g.localeCompare(l))){let[g,l]=i.split("\0"),c=[...s].sort((p,u)=>p.id.localeCompare(u.id));for(let p=0;p<c.length;p+=H){let u=c.slice(p,p+H),m=u.map(E=>E.id),h=f(u.map(E=>E.subtype)).sort(),w=h.length===1?h[0]:"mixed",v=[...new Set(u.flatMap(E=>[E.from.id,E.to.id]))].sort();r.push({id:me(g,h.join("\0"),m),mode:ue(u),family:g,subtype:w,subtypes:h,region:l,edgeCount:m.length,edgeIds:m,nodeIds:v,minimumMaxEdges:Math.max(...m.map(E=>o.get(E)??e.length))})}}return r.sort((i,s)=>y.indexOf(i.family)-y.indexOf(s.family)||(i.region??"").localeCompare(s.region??"")||i.id.localeCompare(s.id))}function pe(e){let n=e.from.location?.file??`kind:${e.from.kind}`,t=e.to.location?.file??`kind:${e.to.kind}`;return n===t?n:`${n} -> ${t}`}function ge(e,n){if(n.length===0)return new Set;let t=new Map(e.map(o=>[o.id,o])),a=n.filter(o=>!t.has(o));if(a.length>0){let o=e.map(r=>r.id).sort();throw new Error(`Unknown evidence fold ${a.join(", ")} for this projection. Available folds: ${o.join(", ")||"(none)"}.`)}return new Set(n.flatMap(o=>t.get(o).edgeIds))}function ue(e){let n=new Map,t=new Map,a=new Set;for(let r of e){a.add(r.from.id),a.add(r.to.id);let i=n.get(r.from.id)??new Set;i.add(r.to.id),n.set(r.from.id,i);let s=t.get(r.to.id)??new Set;s.add(r.from.id),t.set(r.to.id,s)}return he(a,n)?"scc":[...a].every(r=>(t.get(r)?.size??0)<=1&&(n.get(r)?.size??0)<=1)?"linear":"topology"}function he(e,n){let t=new Set,a=new Set,o=r=>{if(t.has(r))return!0;if(a.has(r))return!1;t.add(r);for(let i of n.get(r)??[])if(o(i))return!0;return t.delete(r),a.add(r),!1};return[...e].some(o)}function me(e,n,t){return`fold:${Y("sha256").update([e,n,...t].join("\0")).digest("hex").slice(0,16)}`}function Ee(e,n,t){let a=new Map,o=[...new Set(n)].sort();for(let r=0;r<o.length;r+=1)for(let i=r+1;i<o.length;i+=1)for(let s of fe(e,o[r],o[i],t))a.set(s.id,s);return[...a.values()]}function fe(e,n,t,a){let o=M(e,a),r=new Map([[n,0]]),i=new Map,s=[n];for(let l=0;l<s.length;l+=1){let c=s[l],p=r.get(c);if(c!==t)for(let u of o.get(c)??[])r.has(u.next)||(r.set(u.next,p+1),i.set(u.next,{node:c,edge:u.edge}),s.push(u.next))}if(!r.has(t))return[];let g=[];for(let l=t;l!==n;){let c=i.get(l);if(!c)return[];g.push(c.edge),l=c.node}return g.reverse()}function ye(e,n,t){let a=M(e,t),o=new Map,r=[...n];for(let i of n)o.set(i,0);for(let i=0;i<r.length;i+=1){let s=r[i],g=o.get(s);for(let{next:l}of a.get(s)??[])o.has(l)||(o.set(l,g+1),r.push(l))}return o}function ve(e,n,t){return L(e,t)-L(n,t)||q(e)-q(n)||W(e.evidenceStrength)-W(n.evidenceStrength)||y.indexOf(e.family)-y.indexOf(n.family)||e.from.label.localeCompare(n.from.label)||e.to.label.localeCompare(n.to.label)||e.subtype.localeCompare(n.subtype)||e.id.localeCompare(n.id)}function L(e,n){return Math.min(n.get(e.from.id)??Number.MAX_SAFE_INTEGER,n.get(e.to.id)??Number.MAX_SAFE_INTEGER)}function q(e){let n=[e.from,e.to].filter(t=>t.kind==="structural-region").length;return n===2?2:n}function W(e){switch(e){case"exact":return 0;case"mixed":return 1;case"derived":return 2;case"candidate":return 3;case"unknown":return 4}}export{y as a,Ce as b,Fe as c};
|
|
2
|
+
//# sourceMappingURL=chunk-2OXVP5U5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-PIFTZEEM.js";import{c as d}from"./chunk-PLYUVM4F.js";import{b as c}from"./chunk-AYPDH2LU.js";import{d as p}from"./chunk-TD7VKJ2Y.js";import{m as o}from"./chunk-42W3LFUK.js";import{z as u}from"./chunk-7JYHQAH2.js";function F(r,a={}){let{scope:l,limit:s=30,scanLimit:b}=a,f=new d(r);return g({candidates:()=>f.productionCallableDefinitions({scope:l,files:a.files,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}),filterCandidate:e=>y(e.relativePath),scanLimit:b,profile:{name:"unused-params"},evaluate:e=>{let n=o(r,e.relativePath)?.callables.find(t=>t.startLine===e.startLine&&t.endLine===e.endLine);if(!n||n.params.length===0||n.params.some(t=>!t.simple)||n.paramsEndLine>=n.endLine)return null;let L=c(r,e.relativePath),m=[];for(let t=n.params.length-1;t>=0;t--){let i=n.params[t];if(i.name===""||i.name.startsWith("_")||h(L.get(i.name),n.paramsEndLine,n.endLine))break;m.unshift(i.name)}return m.length===0?null:{symbol:e.symbol,shortName:p(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:n.paramCount,unusedTrailing:m}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:s})}function y(r){let a=u(r);return a==="typescript"||a==="tsx"||a==="javascript"}function h(r,a,l){return r?r.some(s=>s>a&&s<=l):!1}export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2RE5OCHZ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as z}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-WRQXLNYE.js";import{d as y}from"./chunk-EELPBR7E.js";import{c as v}from"./chunk-BJT7LSPK.js";import{B as L,I as R,R as O,Y as $,h as p,m as A,n as F,o as T}from"./chunk-C7IJMOFP.js";import{b as E,d as b}from"./chunk-DRENNWRG.js";import{c as h,d as k}from"./chunk-IW5XQG5G.js";import{B as P,D as g}from"./chunk-AK3PYTIK.js";function _e(e,n){let t=B(e);return t?n.filter(r=>B(r.file)===t):n}function xe(e,n,t,r,i){let o=R(e,n);if(r){let f=i?.match(/^[A-Za-z_$][\w$]*/u)?.[0];if(!f)return null;let d=new Set(o.filter(u=>u.localName===f||u.importedName===f).map(u=>u.sourcePath).filter(u=>!!u));for(let u of t)for(let S of d)if(g(S,u.file))return u;if(f==="this"||f==="self"||f==="cls"){let u=t.filter(S=>S.file===n&&E(S.symbol)!==null);if(u.length===1)return u[0]}let m=X(p(e,n)??"",f);if(m.size===0)return null;let V=new Set(o.filter(u=>m.has(u.localName??u.importedName)).map(u=>u.sourcePath).filter(u=>!!u)),D=t.filter(u=>m.has(E(u.symbol)??"")&&(u.file===n||[...V].some(S=>g(S,u.file))));return D.length===1?D[0]:null}let s=t.filter(f=>E(f.symbol)===null),c=s.find(f=>f.file===n);if(c)return c;let a=b(t[0].symbol),l=o.filter(f=>f.kind!=="namespace"&&f.kind!=="side-effect"&&(f.localName===a||f.localName===null&&f.importedName===a));if(l.length>0){let f=s.filter(d=>l.some(m=>m.sourcePath!==null&&g(m.sourcePath,d.file)));return f.length===1?f[0]:null}return s.length===1?s[0]:null}function X(e,n){let t=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),r=new Set,i=[new RegExp(`\\b${t}\\s*:\\s*([A-Za-z_$][\\w$]*)`,"gu"),new RegExp(`\\b${t}\\s*=\\s*(?:new\\s+)?([A-Za-z_$][\\w$]*)\\s*\\(`,"gu")];for(let o of i)for(let s of e.matchAll(o))r.add(s[1]);return r.size===1?r:new Set}function B(e){let n=T(e);return n?n==="typescript"||n==="tsx"||n==="javascript"?"javascript-family":n:null}var q=k("global-leaf-index",{clearGroups:["whole-project"]});function N(e){return q.get(e,()=>{let n=e.all(`SELECT gs.id, gs.symbol,
|
|
2
2
|
COALESCE(der_doc.relative_path, mention_doc.relative_path) AS relative_path
|
|
3
3
|
FROM global_symbols gs
|
|
4
4
|
LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
|
|
@@ -13,4 +13,4 @@ import{a as z}from"./chunk-4N6QSEMZ.js";import{d as y}from"./chunk-VGRUM7JI.js";
|
|
|
13
13
|
) mention_doc ON mention_doc.symbol_id = gs.id
|
|
14
14
|
WHERE 1 = 1
|
|
15
15
|
${e.symbolNoiseFor("gs")}`),t=new Map;for(let r of n){if(!r.relative_path||e.isIgnored(r.relative_path))continue;let i=b(r.symbol);if(!i)continue;let o=t.get(i);o||(o=[],t.set(i,o)),o.some(s=>s.symbolId===r.id)||o.push({symbol:r.symbol,symbolId:r.id,file:r.relative_path})}return t})}function _(e,n,t,r={}){if(!t)return[];let i=p(e,n);return i?i.indexOf(t)===-1?[]:(M(e,n).get(t)??[]).filter(s=>!K(s,r)):[]}function K(e,n){return typeof n.excludeStartLine=="number"&&typeof n.excludeEndLine=="number"&&e>=n.excludeStartLine&&e<=n.excludeEndLine}var Q=h("file-identifiers",{clearGroups:["whole-project","source-file"]});function j(e,n){let t=L(e,n);return t?t.fileIdentifiers:Q.get(e,n,()=>new Set(M(e,n).keys()))}var ee=h("file-ident-lines",{clearGroups:["whole-project","source-file"]});function M(e,n){let t=L(e,n);return t?t.identifierLineMap:ee.get(e,n,()=>ne(e,n))}var te=h("file-idents-by-line",{clearGroups:["whole-project","source-file"]});function De(e,n){let t=L(e,n);return t?t.identifiersByLine:te.get(e,n,()=>{let r=M(e,n),i=0;for(let s of r.values()){let c=s[s.length-1];c!==void 0&&c>i&&(i=c)}let o=new Array(i+1);for(let s=0;s<=i;s+=1)o[s]=new Set;for(let[s,c]of r)for(let a of c)o[a].add(s);return o})}function ne(e,n){let t=new Map,r=(c,a)=>{let l=t.get(c);if(!l){t.set(c,[a]);return}l[l.length-1]!==a&&l.push(a)},i=p(e,n);if(!i)return t;let o=F(i).split(/\r?\n/),s=/\b([A-Za-z_$][\w$]*)\b/g;for(let c=0;c<o.length;c+=1){let a=o[c]??"";for(let l of a.matchAll(s))l[1]&&r(l[1],c)}return t}var G=/[A-Za-z_$][A-Za-z0-9_$]*/g,Z=/^[A-Za-z_$][A-Za-z0-9_$]*$/,re=512;function C(e){let n=[],t=!1;for(let r of e)r&&(t=!0,Z.test(r)||n.push(r));return{candidateNames:e,hasUsableCandidate:t,nonIdentifierNames:n}}function H(e,n){let t=ie(n)?n:C(n);if(t.candidateNames.size===0||!t.hasUsableCandidate)return!0;if(t.candidateNames.size<=re){for(let i of t.candidateNames)if(i){if(Z.test(i)){if(oe(i).test(e))return!0;continue}if(e.includes(i))return!0}return!1}G.lastIndex=0;let r;for(;(r=G.exec(e))!==null;)if(t.candidateNames.has(r[0]))return!0;for(let i of t.nonIdentifierNames)if(e.includes(i))return!0;return!1}function ie(e){return"candidateNames"in e}function oe(e){return new RegExp(`(?<![A-Za-z_$0-9])${A(e)}(?![A-Za-z_$0-9])`)}var se=h("source-import-paths-by-local-name",{clearGroups:["whole-project","source-file"]});function J(e,n){let t=P(n);return se.get(e,t,()=>ae(e,t))}function ae(e,n){let t=new Map;for(let r of R(e,n)){if(!r.sourcePath)continue;let i=r.localName??r.importedName;if(i&&U(t,i,r.sourcePath),r.kind==="namespace")for(let o of r.usedMembers)U(t,o,r.sourcePath)}return t}function U(e,n,t){let r=e.get(n);r||(r=new Set,e.set(n,r)),r.add(t)}function w(e,n,t){let r=N(e).get(t);if(!r||r.length===0)return[];if(r.length===1)return[I(r[0])];let i=r.filter(a=>a.file===n);if(i.length>0)return i.map(I);let o=J(e,n),s=o.get(t);if(s)for(let a of s){let l=r.filter(f=>g(a,f.file));if(l.length>0)return l.map(I)}let c=new Set;for(let a of o.values())for(let l of a)c.add(l);for(let a of c){let l=r.filter(f=>g(a,f.file));if(l.length>0&&l.length===r.length)return l.map(I)}return[]}function Ve(e,n,t){let r=w(e,n,t);if(r.length>0)return r;let i=N(e).get(t);return!i||i.length===0?[]:i.map(I)}function Y(e,n,t={}){let r=ce(e,n);if(!r)return[];let i=y(e,n);if(t.semantic!==!1&&t.semanticEvidence){let s=t.semanticEvidence.references(e,{...i,leaf:r.identifier,parentTypeName:null,isFunctionLike:!1,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null});if(s.length>0){let c=new Map;for(let a of s){let l=c.get(a.file)??[];l.push(a.line),c.set(a.file,l)}return x(e,c)}}let o=new Map;for(let s of v(e)){let c=le(e,r,s);c.length>0&&o.set(s,c)}return x(e,o)}function ce(e,n){let t=y(e,n);if(!t)return null;let r=b(t.symbol);return r?{symbolId:t.symbolId,relativePath:t.relativePath,startLine:t.startLine,endLine:t.endLine,identifier:r}:null}function le(e,n,t){let r=p(e,t);return!r||r.indexOf(n.identifier)===-1?[]:t!==n.relativePath&&!w(e,t,n.identifier).some(o=>o.symbolId===n.symbolId)?[]:_(e,t,n.identifier,t===n.relativePath?{excludeStartLine:n.startLine,excludeEndLine:n.endLine}:{})}function Xe(e,n,t={}){let r=new Map;for(let a of n){if(!a.leaf)continue;let l=r.get(a.leaf)??[];l.push(a),r.set(a.leaf,l)}if(r.size===0)return new Map;let i=new Set(n.map(a=>a.symbolId)),o=new Set(r.keys()),s=C(o),c=new Map;for(let a of v(e)){if(t.skipPath?.(a)||!H(p(e,a),s))continue;let l=j(e,a);if(l.size!==0){for(let f of l)if(r.has(f))for(let d of w(e,a,f)){if(!i.has(d.symbolId)||a===d.relativePath)continue;let m=c.get(d.symbolId);m||(m=new Set,c.set(d.symbolId,m)),m.add(a)}}}return c}function I(e){return{symbolId:e.symbolId,symbol:e.symbol,relativePath:e.file}}function x(e,n){let t=[],r=new Set;for(let[i,o]of n){let s=O(e,i);for(let c of o){let a=$(s,c),l=`${i}|${c}|${a?.symbol??""}`;r.has(l)||(r.add(l),t.push({file:i,line:c,enclosingSymbol:a?.symbol??null}))}}return t}function fe(e,n){return ue(e,[n]).get(n.symbolId)??[]}function ue(e,n){let t=n.map(o=>({symbolId:o.symbolId,prelude:Se(e,o)})).filter(o=>o.prelude!==null),r=pe(e,t.map(o=>o.symbolId)),i=new Map;for(let{symbolId:o,prelude:s}of t){let c=de(e,r.get(o)??new Map,s.match,s.identifier);i.set(o,x(e,c))}return i}function rt(e,n,t={}){return me(e,n,t).map(r=>({file:r.file,line:r.line,enclosingSymbol:r.enclosingSymbol}))}function me(e,n,t={}){let r=Y(e,n,{semantic:t.semantic,semanticEvidence:t.semanticEvidence}),i=r.length>0?W(r,"source-attribution"):W(fe(e,n),"scip-reference-chunk");return t.includeIgnored===!0?i:i.filter(o=>!e.isIgnored(o.file))}function W(e,n){return e.map(t=>({...t,provenance:n}))}function de(e,n,t,r){let i=new Map;for(let[o,s]of n)i.set(o,ge(e,o,s,t,r));return i}function pe(e,n){let t=new Map;for(let r of z(e,n)){if(e.isIgnored(r.relative_path))continue;let i=t.get(r.symbol_id);i||(i=new Map,t.set(r.symbol_id,i));let o=i.get(r.relative_path);o||(o=[],i.set(r.relative_path,o)),o.push({start_line:r.chunk_start,end_line:r.chunk_end})}return t}function ge(e,n,t,r,i){let o=n===r.relativePath?{excludeStartLine:r.startLine,excludeEndLine:r.endLine}:{},s=i?_(e,n,i,o):[];return t.flatMap(c=>be(s,c))}function be(e,n){let t=e.filter(r=>r>=n.start_line&&r<=n.end_line);return t.length>0?t:[n.start_line]}function Se(e,n){let t=y(e,n);return t?{match:t,identifier:b(t.symbol)||null}:null}export{_ as a,M as b,De as c,_e as d,xe as e,N as f,C as g,H as h,w as i,Ve as j,ce as k,le as l,Xe as m,fe as n,ue as o,rt as p,me as q};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-2XCGSDIT.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as B,c as D,i as L,k as H}from"./chunk-
|
|
1
|
+
import{a as B,c as D,i as L,k as H}from"./chunk-BDHFVH2M.js";import{j as E,o as T}from"./chunk-6VEFRPTD.js";import{d as A}from"./chunk-KMVGRIO2.js";import{c as _}from"./chunk-PLYUVM4F.js";import{d as C,e as y}from"./chunk-TD7VKJ2Y.js";import{a as N}from"./chunk-42W3LFUK.js";var J=5;function se(e,n={}){let{base:i="HEAD",minContainment:r=.7,minCallees:s=3,minSiteCoverage:t=.4,maxHelpers:m=Number.POSITIVE_INFINITY,limit:c=20,scanLimit:d}=n,g=n.semantic!==!1,l=n.diffPlan??D(e,{base:i}),a={available:l.note!==B,base:i,changedFiles:l.changedFiles,helpersChecked:0,skipped:[],findings:[],...l.note?{note:l.note}:{}};if(!a.available||l.changedFiles.length===0)return a;let v=new _(e),x=new Set(l.changedFiles),j=new Map(l.renamedFiles.map(o=>[o.to,o.from]));if(n.baseContentAt&&n.baseContentResultAt)throw new Error("Specify only one of baseContentAt or baseContentResultAt.");let $=n.baseContentResultAt?n.baseContentResultAt:n.baseContentAt?Q(n.baseContentAt):L({projectRoot:e.config.projectRoot,base:i,preloadPaths:H(l)}),f=Z(v,x,j,$);if(f.unavailable)return a.available=!1,a.note=`Base content unavailable: ${f.unavailable.reason}`,a;if(f.definitions.length===0)return a;let k=f.definitions.slice(0,m);f.definitions.length>m&&(a.note=`helper scoring capped at ${m} of ${f.definitions.length} new symbols`);let z=v.calleeMap(k,{semantic:g}),q=k.map(o=>({def:o,callees:T((z.get(o.symbolId)??[]).map(p=>p.symbol))})),V=E(e),M,G=()=>(M??=V.calleeIndex({minCallees:Math.min(3,s),scanLimit:d,semantic:g}),M);for(let{def:o,callees:p}of q){let u=C(o.symbol);if(p.size<s){a.skipped.push({helperShortName:u,helperFile:o.relativePath,reason:`fewer than ${s} meaningful callees \u2014 too small to score`});continue}let P=G(),w=Y(p,P);if(w===0){a.skipped.push({helperShortName:u,helperFile:o.relativePath,reason:"helper callee pattern is all project-wide infrastructure \u2014 too generic to score"});continue}let S=ee(e,o.symbolId);if(S.length===0){a.skipped.push({helperShortName:u,helperFile:o.relativePath,reason:"no references yet \u2014 covered by the new-dead check"});continue}a.helpersChecked+=1;let I=K({candidateIndex:P,changed:x,helperCallees:p,helperFile:o.relativePath,helperSymbol:o.symbol,minContainment:r,minSiteCoverage:t,migratedFiles:S});I.length!==0&&(I.sort((h,b)=>O(b.migrationScope)-O(h.migrationScope)||b.containment-h.containment||b.siteCoverage-h.siteCoverage||h.file.localeCompare(b.file)),a.findings.push({helperSymbol:o.symbol,helperShortName:u,helperFile:o.relativePath,helperShape:"specific-callee-cluster",helperCalleeCount:p.size,specificHelperCalleeCount:w,migratedFiles:S.sort(),leftovers:I.slice(0,J)}))}return a.findings.sort((o,p)=>(p.leftovers[0]?.containment??0)-(o.leftovers[0]?.containment??0)||o.helperFile.localeCompare(p.helperFile)),a.findings=a.findings.slice(0,c),a}function K(e){let n=[],i=U(e.helperSymbol,e.helperFile,e.migratedFiles),r=new Set;for(let s of e.helperCallees)for(let t of e.candidateIndex.candidateIndexesByCallee.get(s)??[])r.add(t);for(let s of r){let t=e.candidateIndex.corpus[s];if(t.symbol===e.helperSymbol||e.changed.has(t.file)||t.callees.has(e.helperSymbol))continue;let m=A(e.helperCallees,t.callees);if(m<e.minContainment)continue;let c=[...e.helperCallees].filter(l=>t.callees.has(l)),d=t.callees.size===0?0:c.length/t.callees.size;if(d<e.minSiteCoverage||!c.some(l=>(e.candidateIndex.docFreq.get(l)??0)<=e.candidateIndex.ubiquityThreshold))continue;let g=W(i,t.symbol,t.file);n.push({symbol:t.symbol,shortName:C(t.symbol),file:t.file,...g,containment:m,siteCoverage:d,uniqueSiteCalleeCount:Math.max(0,t.callees.size-c.length),sharedCallees:c.map(C).sort()})}return n}function O(e){return e==="same-scope"?2:e==="unknown"?1:0}function U(e,n,i){let r=new Set([...F(n),...R(y(e))]);for(let s of i)for(let t of F(s))r.add(t);return r}function W(e,n,i){let r=new Set([...F(i),...R(y(n))]);if(e.size===0||r.size===0)return{migrationScope:"unknown",migrationScopeReasons:["insufficient path/name tokens to infer migration scope"]};let s=[...r].filter(t=>e.has(t)).sort();return s.length>0?{migrationScope:"same-scope",migrationScopeReasons:[`shares migration-scope token(s): ${s.slice(0,5).join(", ")}`]}:{migrationScope:"possible-subtype",migrationScopeReasons:["no path/name tokens shared with the helper or already migrated files"]}}var X=new Set(["app","apps","common","component","components","helper","helpers","index","lib","package","packages","page","pages","route","routes","service","services","shared","spec","src","test","tests","util","utils"]);function F(e){return R(e.replace(/\.[^.]+$/,""))}function R(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>1&&!X.has(n))}function Y(e,n){let i=0;for(let r of e)(n.docFreq.get(r)??0)<=n.ubiquityThreshold&&(i+=1);return i}function Z(e,n,i,r){let s=[];for(let t of e.productionCallableDefinitions({files:[...n],requireFunctionLikeSymbol:!0})){if(!n.has(t.relativePath))continue;let m=i.get(t.relativePath)??t.relativePath,c=r(m);if(c.state==="unavailable")return{definitions:[],unavailable:c};(c.state==="absent"||!new RegExp(`\\b${N(t.leaf)}\\b`).test(c.content))&&s.push(t)}return{definitions:s}}function Q(e){return n=>{let i=e(n);return i===null?{state:"absent"}:{state:"present",content:i}}}function ee(e,n){return e.all(`SELECT DISTINCT ref_d.relative_path
|
|
2
2
|
FROM mentions m
|
|
3
3
|
JOIN chunks c ON m.chunk_id = c.id
|
|
4
4
|
JOIN documents ref_d ON c.document_id = ref_d.id
|
|
5
5
|
WHERE m.symbol_id = ?
|
|
6
6
|
AND m.role != 1
|
|
7
7
|
${e.pathExclusionsFor("ref_d")}`,n).map(r=>r.relative_path)}export{se as a};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-2YC7YNKT.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as de}from"./chunk-VXJJTQYE.js";import{b as ue}from"./chunk-BOJ5SVE2.js";import{c as N}from"./chunk-PLYUVM4F.js";import{a as P}from"./chunk-Z2AWCTN6.js";import{i as le}from"./chunk-PBUH2P5S.js";import{b as ae,c as ce}from"./chunk-BWVQP3LB.js";import{i as oe}from"./chunk-AYPDH2LU.js";import{a as ie,b as re,c as se}from"./chunk-KK7GPALL.js";import{e as ee,f as te,h as ne}from"./chunk-BECZLYNU.js";import{b as Q}from"./chunk-Q6T2CAJL.js";import{C as E,d as Z,e as $,g as G,h as J,i as K,j as q,k as V,s as X,x as Y}from"./chunk-TD7VKJ2Y.js";import{x as H}from"./chunk-42W3LFUK.js";import{C as x,a as S,z}from"./chunk-7JYHQAH2.js";import{B as I,E as W,b as w,i as B,t as b,w as U,y as j}from"./chunk-Q7GBK5T7.js";import{d as L}from"./chunk-GH5YSGZL.js";var _=new WeakMap,me=U({kind:"definition-exclusions",invalidation:j("definition-exclusions"),serialize:e=>JSON.stringify(e),deserialize:Ne});function pe(e,t){let n=z(t);if(!(n==="rust"||n==="typescript"||n==="tsx"||n==="javascript"))return[];let i=I(e,t);if(!i)return[];let o=B(e,t,i),c=me.read(e,t,o);if(c)return c;let u=n==="rust"?Ue(e,t):Fe(e,t);return me.write(e,t,o,u),u}function Ne(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=t.map(Te);return n.some(r=>r===null)?null:n}catch{return null}}function Te(e){if(!e||typeof e!="object")return null;let t=e;if(typeof t.startLine!="number"||!Number.isFinite(t.startLine)||typeof t.endLine!="number"||!Number.isFinite(t.endLine)||typeof t.reason!="string"||t.containerName!==void 0&&typeof t.containerName!="string")return null;let n=t.disposition===void 0?Xe(t.reason):t.disposition;return n!=="exclude"&&n!=="implicit-usage"?null:{startLine:t.startLine,endLine:t.endLine,reason:t.reason,disposition:n,...t.containerName?{containerName:t.containerName}:{}}}var ye=new Set(["describe","it","test","fdescribe","fit","xdescribe","xit","beforeEach","afterEach","beforeAll","afterAll","before","after","suite","bench","benchmark"]),ke=/\b(?:describe|it|test|fdescribe|fit|xdescribe|xit|beforeEach|afterEach|beforeAll|afterAll|before|after|suite|bench|benchmark)\s*\(/,Ae=/\b(?:export\s+)?(?:async\s+)?function\s+use[A-Z][A-Za-z0-9_$]*\b|\b(?:const|let|var)\s+use[A-Z][A-Za-z0-9_$]*\s*(?::[^=;]+)?=\s*(?:async\s*)?(?:function\b|(?:<[^=;{]+>\s*)?(?:\([^)]*\)|[A-Za-z_$][\w$]*)\s*=>)/;function Fe(e,t){let n=I(e,t);if(!n||!Me(n))return[];let r=x(e,t);if(!r)return[];let i=_.get(r);if(i)return i;let o=!1,c=r.rootNode;for(let l of c.namedChildren){if(l.type!=="expression_statement")continue;let d=l.namedChild(0);if(!d||d.type!=="call_expression")continue;let s=d.namedChild(0);if(!s)continue;let a=s.type==="member_expression"?s.namedChild(s.namedChildCount-1)?.text:s.text;if(a&&ye.has(a)){o=!0;break}}let u=[];o&&u.push({startLine:0,endLine:c.endPosition.row,reason:"TS/JS test file (describe/it/test at top level)",disposition:"exclude"});for(let l of c.namedChildren){let d=null,s=null;if(l.type==="function_declaration")d=l.namedChild(0)?.text??null,s=l;else if(l.type==="export_statement"){let a=l.namedChild(0);a?.type==="function_declaration"&&(d=a.namedChild(0)?.text??null,s=a)}else if(l.type==="lexical_declaration"){let a=l.namedChild(0);if(a?.type==="variable_declarator"){let p=a.namedChild(0)?.text,f=a.namedChild(1);p&&(f?.type==="arrow_function"||f?.type==="function_expression")&&(d=p,s=a)}}d&&/^use[A-Z]/.test(d)&&s&&u.push({startLine:s.startPosition.row,endLine:s.endPosition.row,reason:"React custom hook (use*)",disposition:"exclude"})}return u.push(...be(r,new Set(["function_declaration","method_definition","class_declaration","interface_declaration","type_alias_declaration","enum_declaration","variable_declarator","export_statement"]),new Set(["comment"]))),_.set(r,u),u}function Me(e){if(e.includes("scip-query"))return!0;let t=!1;for(let n of ye)if(e.includes(n)){t=!0;break}return t&&ke.test(e)?!0:e.includes("use")&&Ae.test(e)}var Oe=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale)?/i;function Be(e){return Oe.test(e)}function be(e,t,n){let r=[],i=o=>{if(t.has(o.type)&&o.parent){let u=o.parent.children,l=-1;for(let d=0;d<u.length;d+=1)if(u[d].startIndex===o.startIndex&&u[d].type===o.type){l=d;break}if(l>0)for(let d=l-1;d>=0;d-=1){let s=u[d];if(n.has(s.type)){if(Be(s.text)){r.push({startLine:o.startPosition.row,endLine:o.endPosition.row,reason:"scip-query suppression comment",disposition:"exclude"});break}continue}if(!(s.type==="attribute_item"||s.type==="inner_attribute_item"))break}}for(let c of o.namedChildren)i(c)};return i(e.rootNode),r}function Ue(e,t){let n=x(e,t);if(!n)return[];let r=_.get(n);if(r)return r;let i=[],o=je(n);return o?(_.set(n,o),o):(ge(n.rootNode,i,!1,!1),i.push(...be(n,new Set(["function_item","function_signature_item","struct_item","enum_item","union_item","impl_item","mod_item","static_item","const_item"]),new Set(["line_comment","block_comment"]))),i.push(...qe(n.rootNode)),_.set(n,i),i)}function je(e){return Ye(e.rootNode)?[{startLine:0,endLine:e.rootNode.endPosition.row,reason:"generated file (@generated header)",disposition:"exclude"}]:null}function ge(e,t,n,r){let i=n,o=r;e.type==="trait_item"&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait declaration body (dynamic dispatch)",disposition:"implicit-usage"}),e.type==="impl_item"&&e.childForFieldName("trait")&&(o=!0,t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl block (dynamic dispatch)",disposition:"implicit-usage"})),e.type==="function_item"||e.type==="function_signature_item"?We(e,t,n,r):r&&Ke(e)?t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl associated item (dynamic dispatch)",disposition:"implicit-usage"}):e.type==="struct_item"||e.type==="enum_item"||e.type==="union_item"?ze(e,t,n):e.type==="mod_item"&&T(e).some(c=>/#\[\s*cfg\s*\(\s*test\s*\)/.test(c))&&(i=!0);for(let c of e.namedChildren)ge(c,t,i,o)}function We(e,t,n,r){let i=T(e),o=null;r?o={reason:"trait impl method (dynamic dispatch)",disposition:"implicit-usage"}:n&&(o={reason:"inside #[cfg(test)] mod",disposition:"exclude"});for(let c of i){if(he(c)){o={reason:"#[allow(dead_code)]",disposition:"exclude"};break}let u=Ge(c);if(u){o=u;break}}o&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:o.reason,disposition:o.disposition})}function ze(e,t,n){let r=T(e),i=e.namedChildren.find(o=>o.type==="type_identifier")?.text;r.some(Je)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[derive(...)] - generated impl may access fields",disposition:"implicit-usage",containerName:i}),r.some(he)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[allow(dead_code)]",disposition:"exclude",containerName:i}),n&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"inside #[cfg(test)] mod",disposition:"exclude",containerName:i})}function T(e){let t=e.parent;if(!t)return[];let n=t.children,r=-1;for(let o=0;o<n.length;o+=1)if(n[o].startIndex===e.startIndex&&n[o].type===e.type){r=o;break}if(r<=0)return[];let i=[];for(let o=r-1;o>=0;o-=1){let c=n[o];if(c.type==="attribute_item"||c.type==="inner_attribute_item")i.push(c.text);else{if(c.type==="line_comment"||c.type==="block_comment")continue;break}}return i}var He=new Set(["test","bench","tokio::test","async_std::test"]),Ze=new Set(["no_mangle","export_name","link_name","used","macro_export","proc_macro","proc_macro_derive","proc_macro_attribute"]),$e=new Set(["allow","warn","deny","forbid","cfg","cfg_attr","doc","inline","cold","must_use","deprecated","repr","derive","automatically_derived","non_exhaustive","path","link","link_section","global_allocator","panic_handler"]);function Ge(e){if(/#\[\s*cfg\s*\(\s*test\s*\)/.test(e))return{reason:"#[cfg(test)]",disposition:"exclude"};let t=Ve(e);return t?He.has(t)?{reason:`#[${t}]`,disposition:"exclude"}:Ze.has(t)?{reason:`Rust ABI/export attribute #[${t}]`,disposition:"implicit-usage"}:$e.has(t)?null:{reason:`Rust attribute macro #[${t}]`,disposition:"implicit-usage"}:null}function Je(e){return/#\[\s*derive\s*\(/.test(e)}function he(e){return/#\[\s*allow\s*\(\s*dead_code\s*\)/.test(e)}function Ke(e){return e.type==="const_item"||e.type==="type_item"||e.type==="static_item"||e.type==="associated_type"}function qe(e){let t=Qe(e);if(t.size===0)return[];let n=[];for(let r of e.descendantsOfType("mod_item")){let i=r.childForFieldName("name")?.text;i&&t.has(i)&&n.push({startLine:r.startPosition.row,endLine:r.endPosition.row,reason:'attribute `with = "..."` module - body may be invoked via reflection',disposition:"implicit-usage",containerName:i})}return n}function Ve(e){let t=/^#!?\[\s*([A-Za-z_][A-Za-z0-9_]*(?:\s*::\s*[A-Za-z_][A-Za-z0-9_]*)*)/.exec(e);return t?t[1].replace(/\s+/g,""):null}function Xe(e){return e==="#[tauri::command]"||e==="#[command]"||e==="#[wasm_bindgen]"||e==="#[no_mangle]"||e==="#[napi]"||e==="#[pyfunction]"||e==="#[pymethod]"||e==="#[pyo3]"||e==="#[doc(hidden)]"||e.startsWith("trait ")||e.startsWith("#[derive(<reflective>)]")||e.startsWith("#[derive(...)]")||e.startsWith('serde `with = "')||e.startsWith('attribute `with = "')||e.startsWith("Rust attribute macro #[")||e.startsWith("Rust ABI/export attribute #[")?"implicit-usage":"exclude"}function Ye(e){for(let t=0;t<Math.min(e.namedChildCount,12);t+=1){let n=e.namedChild(t);if(!n||n.type!=="line_comment"&&n.type!=="block_comment")break;if(/@generated\b/.test(n.text)||/This file is .*generated\b/i.test(n.text)||/Code generated by/i.test(n.text)||/Generated by:\s*https?:\/\/openapi-generator/i.test(n.text)||/openapi-generator/i.test(n.text)&&/Generated by/i.test(n.text))return!0}return!1}var fe=/\bwith\s*=\s*"([^"]+)"/g;function Qe(e){let t=new Set;for(let n of e.descendantsOfType("attribute_item")){fe.lastIndex=0;let r;for(;(r=fe.exec(n.text))!==null;){let i=r[1],o=i.split("::").pop()??i;o&&t.add(o)}}return t}function xe(e){let t=k(e);return(n,r,i,o)=>t(n,r,i,o)?.disposition==="exclude"}function k(e){let t=new Map,n=r=>{let i=t.get(r);if(i)return i;let o=pe(e,r),c=new Map;for(let u of o){if(!u.containerName)continue;let l=c.get(u.containerName)??[];l.push(u),c.set(u.containerName,l)}return i={ranges:o,containers:c},t.set(r,i),i};return(r,i,o,c)=>{let u=n(r),l=[];for(let s of u.ranges)i>=s.startLine&&i<=s.endLine&&l.push(s);let d=new Set;c&&d.add(c);for(let s of E(o))d.add(s);for(let s of d){let a=u.containers.get(s);a&&l.push(...a)}return et(l)}}function et(e){if(e.length===0)return null;let n=e.find(r=>r.disposition==="exclude")??e[0];return{disposition:n.disposition,reason:n.reason}}function Dt(e,t={}){w(e,{groups:t.semanticProvider===!0?["whole-project","semantic-provider"]:["whole-project"]})}function _e(e,t,n={}){w(e,{groups:n.definitions===!0?["source-file","definition-catalog"]:["source-file"],file:t.replace(/\\/g,"/")})}function Se(e,t){if(t.isIgnoredPath(e.relativePath))return y("ignored-file");if(K(e.symbol))return y("module-like-symbol");if(!R(e.symbol))return y("non-value-symbol");if(!e.isFunctionLike&&e.enclosingSymbol&&R(e.enclosingSymbol))return y("nested-non-callable-value");if(!t.includeTests&&!tt(e.relativePath))return y("test-file");if(!t.includeTests&&t.isExcludedRegion(e.relativePath,e.startLine,e.symbol,e.parentTypeName))return y("excluded-file-region");let n=$(e.symbol);if(n==="<constructor>")return y("implicit-constructor");if(e.symbol.startsWith("scip-python ")){if(n==="__all__")return y("python-runtime-metadata");if(/^__[^_].*__$/.test(n))return y("python-protocol-member")}return t.isDeclarationOnlyCallable()?y("declaration-only-callable"):t.isFrameworkContractCallable()?y("framework-contract-member"):q(e.symbol)?y("rust-trait-impl-member"):V(e.symbol)?y("rust-test-module"):!t.includeMembers&&!nt(e)?y("member"):e.endLine-e.startLine+1<t.minLoc?y("below-min-loc"):{accepted:!0}}function tt(e){return Q(e)!=="test"}function y(e){return{accepted:!1,rejectionReason:e}}function R(e){return J(e)||e.endsWith("().")||e.endsWith(".")}function nt(e){return G(e.symbol)||E(e.symbol).length===0}function Ee(){return new Map}function Re(e,t,n){let r=new Map;for(let i of ie(e,n))e.isIgnored(i.relative_path)||t.has(i.relative_path)||v(r,i.symbol_id,i.relative_path,i.ref_count,"scip-mention");return r}function Ce(e,t,n,r={}){let i=new Set;if(r.conservative||n.size===0){for(let o of se(e,t))i.add(o.symbol_id);return i}for(let o of re(e,t))e.isIgnored(o.relative_path)||n.has(o.relative_path)||i.add(o.symbol_id);return i}function A(e,t){let n=e.get(t);if(!n)return!1;for(let r of n.values())if(r.occurrences>0)return!0;return!1}function C(e,t,n){let r=e.get(t);if(!r)return!1;for(let[i,o]of r)if(i!==n&&o.occurrences>0)return!0;return!1}function ve(e){return e?.occurrences??0}function v(e,t,n,r,i="source-fallback"){if(r<=0)return;let o=Le(e,t,n);o.occurrences+=r,o.sources.add(i)}function De(e,t,n,r,i){if(r<=0)return;let o=Le(e,t,n);o.occurrences=Math.max(r,o.occurrences),o.sources.add(i)}function Le(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let i=r.get(n);return i||(i={occurrences:0,sources:new Set},r.set(n,i)),i}var it=64,rt=300;function en(e,t={}){let{scope:n,minLoc:r=1,includeTests:i=!1,skipBarrels:o=!1,includeMembers:c=!1,deadCodeOnly:u=!1,scanLimit:l,semantic:d=!0}=t,s=0,a=b("dead.candidates",()=>{let m=ue(st(e,{scope:n,minLoc:r,includeTests:i,includeMembers:c}),l);return s=m.length,m},()=>({definitions:s})),p=0,f=o?b("dead.inactive-barrels",()=>{let m=new Set(ee(e));return p=m.size,m},()=>({paths:p})):new Set,F=0,g=u?Ee():b("dead.mention-reference-counts",()=>{let m=Re(e,f,a.map(D=>D.symbolId));return F=m.size,m},()=>({definitions:a.length,symbolsWithReferences:F})),M=0,Ie=u?b("dead.mentioned-symbol-ids",()=>{let m=Ce(e,a.map(D=>D.symbolId),f,{conservative:f.size===0});return M=m.size,m},()=>({definitions:a.length,referencedSymbols:M})):new Set,h=u?a.filter(m=>!Ie.has(m.symbolId)):a.filter(m=>!C(g,m.symbolId,m.relativePath));u?b("dead.source-fallback.dead-code-only",()=>mt(e,h,g,{inactiveBarrelPaths:f}),()=>({definitions:h.length,testReferencesIncluded:!0})):b("dead.source-fallback.ast",()=>dt(e,h,g,{inactiveBarrelPaths:f}),()=>({definitions:h.length,testReferencesIncluded:!0}));let O=u?h.filter(m=>!A(g,m.symbolId)):h.filter(m=>!C(g,m.symbolId,m.relativePath));b("dead.caller-map-supplement",()=>bt(e,O,g,{inactiveBarrelPaths:f,includeSemantic:!u&&d}),()=>({definitions:O.length,semantic:!u&&d}));let Pe=u?h.filter(m=>!A(g,m.symbolId)):a;return ut(e,ct(Pe,g))}function st(e,t){let n=xe(e),r=[];for(let i of Y(e,{scope:t.scope,symbolMatches:R,sqlPrefilter:"function-like"}))Se(i,{minLoc:t.minLoc,includeTests:t.includeTests,includeMembers:t.includeMembers,isIgnoredPath:c=>e.isIgnored(c),isExcludedRegion:n,isDeclarationOnlyCallable:()=>at(e,i),isFrameworkContractCallable:()=>de(e,i)}).accepted&&r.push(i);return r}var ot=["method_signature","abstract_method_signature","call_signature","construct_signature"];function at(e,t){if(!t.parentTypeName||!/\.[cm]?[jt]sx?$/.test(t.relativePath))return!1;let n=x(e,t.relativePath);if(n)return n.rootNode.descendantsOfType([...ot]).some(i=>i.startPosition.row<=t.startLine&&i.endPosition.row>=t.endLine);let r=W(e,t.relativePath).slice(t.startLine,t.endLine+1).join(`
|
|
2
|
+
`).trim();return r.endsWith(";")&&!r.includes("=>")&&!r.includes("{")}function ct(e,t){return e.map(n=>lt(n,t)).filter(n=>n.cross_file_refs===0).sort((n,r)=>r.loc-n.loc||n.relative_path.localeCompare(r.relative_path)||n.start_line-r.start_line)}function lt(e,t){let n=t.get(e.symbolId)??new Map,r=ve(n.get(e.relativePath)),i=0;for(let[o,c]of n)o!==e.relativePath&&(i+=c.occurrences);return{relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine,loc:e.endLine-e.startLine+1,symbol:e.symbol,parent_type_name:e.parentTypeName,same_file_refs:r,cross_file_refs:i}}function ut(e,t){let n=k(e),r=[],i=0,o=0,c=0,u=0,l=0,d=0;for(let s of t){if(e.isIgnored(s.relative_path))continue;if(te(e,s.relative_path)){u++;continue}if(ne(e,s.symbol,s.relative_path)){l++;continue}let a=n(s.relative_path,s.start_line,s.symbol,s.parent_type_name),p=a?.disposition==="implicit-usage"?a.reason:void 0,f=p?"implicit-usage":s.same_file_refs===0?"dead-code":"file-internal";f==="dead-code"?i++:f==="file-internal"?o++:c++,d+=s.loc,r.push({relativePath:s.relative_path,startLine:s.start_line,endLine:s.end_line,loc:s.loc,symbol:s.symbol,shortName:Z(s.symbol),sameFileRefs:s.same_file_refs,kind:f,...p?{implicitUsageReason:p}:{}})}return{symbols:r,counts:{total:r.length,deadCode:i,fileInternal:o,implicitUsage:c,loc:d},applicability:{entrySurfaceExcluded:u,externalRootExcluded:l,implicitUsageSignals:c},totalCount:r.length,deadCodeCount:i,fileInternalCount:o,implicitUsageCount:c,totalLoc:d}}function dt(e,t,n,r){if(t.length===0)return;let i=new N(e),o=new Set(t.map(l=>l.symbolId)),c=new Set(t.map(l=>l.leaf).filter(Boolean)),u=new Set(i.sourceFiles());for(let l of S(e))u.add(l);i.scanSourceReferences({paths:u,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:c,skipPath:l=>r.inactiveBarrelPaths.has(l)},l=>{o.has(l.target.symbolId)&&(pt(e,l)||v(n,l.target.symbolId,l.sourceFile,yt(l),"source-fallback"))})}function mt(e,t,n,r){if(t.length===0)return;let i=new N(e),o=X(t),c=new Set(i.sourceFiles());for(let s of S(e))c.add(s);let u=new Set(o.keys()),l=new Map,d=s=>{let a=l.get(s);return a||(a=oe(e,s),l.set(s,a)),a};i.scanSourceReferences({paths:c,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:u,skipPath:s=>r.inactiveBarrelPaths.has(s),resolveTargets:({sourceFile:s,name:a,kind:p})=>{let f=o.get(a);return f?ft(s,a,f,()=>d(s),{permissive:p!=="cross-language-dispatch"}):[]},afterPath:s=>{l.delete(s),_e(e,s)}},s=>{let a=s.kind==="identifier"&&s.sourceFile===s.target.relativePath?Math.max(0,s.occurrences-1):s.occurrences;s.kind==="identifier"&&we(e,{sourceFile:s.sourceFile,name:s.name,target:s.target,occurrences:a})||v(n,s.target.symbolId,s.sourceFile,a,"source-fallback")})}function ft(e,t,n,r,i){let o=n.filter(d=>d.relativePath===e);if(o.length>0)return o;if(!i.permissive&&n.length===1)return[...n];let c=r(),u=c.get(t);if(u)for(let d of u){let s=n.filter(a=>L(d,a.relativePath));if(s.length>0)return s}let l=new Set;for(let d of c.values())for(let s of d)l.add(s);for(let d of l){let s=n.filter(a=>L(d,a.relativePath));if(s.length>0&&s.length===n.length)return s}return i.permissive?[...n]:[]}function pt(e,t){return t.kind==="cross-language-dispatch"&&t.target.relativePath===t.sourceFile?!0:t.kind==="identifier"&&we(e,t)}function yt(e){return e.kind==="identifier"&&e.target.relativePath===e.sourceFile?Math.max(0,e.occurrences-1):e.occurrences}function we(e,t){return t.occurrences>1?!1:H(e,t.sourceFile).some(n=>n.used||n.sourcePath!==t.target.relativePath?!1:n.importedName===t.name||n.localName===t.name)}function bt(e,t,n,r){let i=r.includeSemantic!==!1,o=i&&t.length>=it&&S(e).length>=rt,c=(s,a)=>{a===s.relativePath||e.isIgnored(a)||r.inactiveBarrelPaths.has(a)||De(n,s.symbolId,a,1,"caller-map")};if(o?b("dead.caller-map.per-symbol-non-semantic",()=>{let s=ce(e,t,{semantic:!1,semanticEvidence:P});for(let a of t){let p=s.get(a.symbolId)??[];for(let f of p)c(a,f.file)}},()=>({definitions:t.length,semantic:!1,batched:!0})):b("dead.caller-map.per-symbol",()=>{for(let s of t){let a=ae(e,s,{semantic:i,semanticEvidence:P});if(a.length!==0)for(let p of a)c(s,p.file)}},()=>({definitions:t.length,semantic:i})),!o)return;let u=0,l=b("dead.caller-map.semantic-candidates",()=>{let s=t.filter(a=>!C(n,a.symbolId,a.relativePath));return u=s.length,s},()=>({definitions:t.length,semanticCandidates:u}));if(l.length===0)return;let d=le(e,l);for(let s of l){let a=d.get(s.symbolId);if(a)for(let p of a)c(s,p)}}export{Dt as a,en as b};
|
|
3
|
+
//# sourceMappingURL=chunk-3QXC54FQ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-XE33FV5W.js";import{a as j,b as g,c as N}from"./chunk-ZOXKSQQB.js";import{a as _}from"./chunk-PIFTZEEM.js";import{a as E}from"./chunk-BOJ5SVE2.js";import{b as C,c as P}from"./chunk-PLYUVM4F.js";import{a as k}from"./chunk-BGBBVSH4.js";import{b as w}from"./chunk-AYPDH2LU.js";import{A as L,d,e as y,k as v}from"./chunk-TD7VKJ2Y.js";import{p as S}from"./chunk-42W3LFUK.js";import{t as x}from"./chunk-Q7GBK5T7.js";import{basename as m,extname as b}from"path";function ae(t,n){let{scope:e,maxLoc:i=15,limit:a=30,scanLimit:o}=n??{},r=new P(t),s=z(r.fileDependencyGraph(e));return _({candidates:()=>B(t,r,e,i),orderCandidates:E,scanLimit:o,profile:{name:"wrapper-candidates"},prepare:l=>({callerFileMap:A(t,r,l,{semantic:n?.semantic!==!1}),reverseFanIn:s}),evaluate:(l,u)=>O(t,r,l,u),orderResults:(l,u)=>u.callerFanIn-l.callerFanIn||u.loc-l.loc,limit:a})}function A(t,n,e,i){let a=j(t,n),o=g(a.forDefinitions(e,{semantic:!1,sourceFallback:!1})),r=[];i.semantic&&x("wrapper.semantic-candidates",()=>{r=e.filter(c=>F(t,n,c,o).length<=1)},()=>({symbols:e.length,semanticCandidates:r.length}));let s=r.length===0?new Map:g(a.forDefinitions(r,{semantic:!0,sourceFallback:!1})),l=s.size===0?o:C(o,s),u=new Map(e.map(c=>[c.symbolId,c])),f=new Map;for(let c of e){let I=F(t,n,c,l);if(I.length>1||(f.set(c.symbolId,c),I.length!==1))continue;let D=I[0],M=T(t,c.symbolId,D);if(!M)continue;let p=W(n,t,D,c.symbol,M);p?.isFunctionLike&&u.has(p.symbolId)&&f.set(p.symbolId,u.get(p.symbolId))}let h=[...f.values()];return h.length===0?l:C(l,g(a.forDefinitions(h,{semantic:!1,sourceFallback:!0})))}function O(t,n,e,i){let a=F(t,n,e,i.callerFileMap);if(a.length!==1)return null;let o=a[0],r=T(t,e.symbolId,o);if(!r)return null;let s=W(n,t,o,e.symbol,r);if(s&&v(s.symbol))return null;let{fanIn:l,source:u}=J(i.callerFileMap,i.reverseFanIn,o,s);if(u==="function"?l<=3:l<=5)return null;let f=H(t,e,o,s);return{symbol:e.symbol,shortName:d(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:k(e),singleCaller:s?.symbol??"",singleCallerShort:s?.isFunctionLike?d(s.symbol):m(o),callerFanIn:l,actionTier:f.length>0?"signal":"direct",boundaryEvidence:f}}function B(t,n,e,i){return n.productionCallableDefinitions({scope:e,minLoc:2,maxLoc:i,requireFunctionLikeSymbol:!0,excludeRootedSymbols:!0,excludeRustTraitImplMembers:!0}).filter(a=>!S(t,a))}function F(t,n,e,i){let a=m(e.relativePath,b(e.relativePath)),o=[...i.get(e.symbolId)??[]].filter(r=>r!==e.relativePath).filter(r=>m(r,b(r))!==a).filter(r=>{let s=n.fileKind(r);return s!=="barrel"&&s!=="entry"&&s!=="test"});return N(t,e,o).realConsumers}function T(t,n,e){return t.get(`SELECT c.start_line, c.end_line
|
|
2
2
|
FROM mentions m
|
|
3
3
|
JOIN chunks c ON m.chunk_id = c.id
|
|
4
4
|
JOIN documents d ON c.document_id = d.id
|
|
5
5
|
WHERE m.symbol_id = ? AND m.role != 1 AND d.relative_path = ?
|
|
6
6
|
LIMIT 1`,n,e)}function W(t,n,e,i,a){let o=t.definitionsForFile(e),r=q(n,e,i,a.start_line,a.end_line);return L(o,r)}function J(t,n,e,i){if(i?.isFunctionLike){let a=[...t.get(i.symbolId)??[]].filter(o=>o!==i.relativePath);if(a.length>0)return{fanIn:a.length,source:"function"}}return{fanIn:G(n,e),source:"file"}}function q(t,n,e,i,a){let o=y(e);if(!o)return i;let r=w(t,n).get(o);if(!r||r.length===0)return i;for(let s of r)if(s>=i&&s<=a)return s;return i}function z(t){let n=new Map;for(let[e,i]of t){n.has(e)||n.set(e,n.get(e)??0);for(let a of i)n.set(a,(n.get(a)??0)+1)}return n}function G(t,n){let e=t.get(n)??0;if(e>0)return e;let i=m(n,b(n)),a=0;for(let[o,r]of t)o!==n&&m(o,b(o))===i&&r>a&&(a=r);return a}function H(t,n,e,i){return R(t,n.relativePath,n.startLine,"wrapper","explicit ignore-wrapper comment",[{label:"wrapper name",value:d(n.symbol)},{label:"caller name",value:i?.symbol?d(i.symbol):m(e)},{label:"wrapper path",value:n.relativePath},{label:"caller path",value:e}])}export{ae as a};
|
|
7
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
//# sourceMappingURL=chunk-3TJY6M3B.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{A as Q,B as Qe,C as j,E as Z,F as Ze,G as be,H as et,I as ie,K as tt,e as qe,f as Ve,g as P,h as ze,i as We,j as He,k as q,l as Ke,m as K,n as Je,o as Xe,p as Ye,q as L,r as J,s as F,t as ge,u as Se,v as S,w as he,x as Ge,y as xe,z as G}from"./chunk-7JYHQAH2.js";import{B as A,a as Ue,c as U,f as oe,i as H,p as ye,w as X,y as Y}from"./chunk-Q7GBK5T7.js";import{c as W,xa as $e,ya as Be}from"./chunk-GH5YSGZL.js";function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ut(e){return e.replace(/'''[\s\S]*?'''/g,k).replace(/"""[\s\S]*?"""/g,k).replace(/#.*$/gm,k).replace(/\/\/.*$/gm,k).replace(/\/\*[\s\S]*?\*\//g,k).replace(/`(?:\\[\s\S]|[^`])*`/g,k).replace(/'(?:\\.|[^'\\\r\n])*'/g,k).replace(/"(?:\\.|[^"\\\r\n])*"/g,k)}function us(e){return rt(e,{maskStrings:!1})}function ms(e){return rt(e,{maskStrings:!0})}function rt(e,r){let t="",n=0,s=e.length;for(;n<s;){if(e[n]==="/"&&e[n+1]==="/"){let i=e.indexOf(`
|
|
2
|
+
`,n),a=i===-1?s:i;t+=Ne(e,n,a),n=a;continue}if(e[n]==="/"&&e[n+1]==="*"){let i=e.indexOf("*/",n+2),a=i===-1?s:i+2;t+=Ne(e,n,a),n=a;continue}let o=e[n];if(o==="`"||o==="'"||o==='"'){let i=o,a=n+1;for(;a<s;){if(e[a]==="\\"){a+=2;continue}if(e[a]===i){a+=1;break}if(i!=="`"&&e[a]===`
|
|
3
|
+
`)break;a+=1}t+=r.maskStrings?Ne(e,n,a):e.slice(n,a),n=a;continue}t+=o,n+=1}return t}function Ne(e,r,t){let n="";for(let s=r;s<t;s+=1)n+=e[s]===`
|
|
4
|
+
`?`
|
|
5
|
+
`:" ";return n}function k(e){return e.replace(/[^\r\n]/g," ")}var ds=oe("stripped-lines",{clearGroups:["whole-project","source-file"]});Ue({name:"stripped-source-singleton",groups:["whole-project","source-file"],clearAll:()=>{ae=null,ee=""},clearFile:()=>{ae=null,ee=""}});var ae=null,ee="";function qt(e){return ae===e||(ae=e,ee=Ut(e)),ee}function w(e,r,t){let n=qt(e);return`${n.slice(0,r)}${" ".repeat(t-r)}${n.slice(t)}`}function x(e,r){return new RegExp(`\\b${O(r)}\\b`,"m").test(e)}function V(e,r){let t=new Set,n=new RegExp(`\\b${O(r)}\\s*\\.\\s*([A-Za-z_$][\\w$]*)`,"g");for(let s of e.matchAll(n)){let o=s[1];o&&t.add(o)}return[...t]}function Ie(e){let r=0;for(let t of e)t==="("&&(r+=1),t===")"&&(r-=1);return r}var nt=new WeakMap,st=new Set(["call_expression","call","decorator","pair","string","string_literal","template_string","variable_declarator"]);function Vt(e,r){let t=Array.isArray(r)?r:[r];if(!t.every(o=>st.has(o)))return e.descendantsOfType(r);let n=zt(e);return t.length===1?n.get(t[0])??[]:t.flatMap(o=>n.get(o)??[]).sort((o,i)=>o.startIndex-i.startIndex)}function Ce(e,r){let t=e.walk(),n=0,s=!1;for(;!s;){if(r(t),t.gotoFirstChild()){n+=1;continue}for(;;){if(n===0){s=!0;break}if(t.gotoNextSibling())break;t.gotoParent(),n-=1}}}function zt(e){let r=nt.get(e);if(r)return r;let t=new Map;return Ce(e,n=>{let s=n.nodeType;if(!st.has(s))return;let o=t.get(s);o?o.push(n.currentNode):t.set(s,[n.currentNode])}),nt.set(e,t),t}function it(e,r){r(e);for(let t of e.namedChildren)it(t,r)}var Wt=/(?:function|method|lambda)/u,ot=new WeakMap;function Ht(e){let r=ot.get(e);if(r)return r;let t=[];return Ce(e,n=>{if(!n.nodeIsNamed)return;let s=n.nodeType;(s==="arrow_function"||Wt.test(s))&&t.push(n.currentNode)}),ot.set(e,t),t}function Kt(e,r,t){let n=null;for(let s of Ht(e))s.startPosition.row>r||s.endPosition.row<t||(!n||s.endIndex-s.startIndex<n.endIndex-n.startIndex)&&(n=s);return n}function at(e,r,t){if(e.startPosition.row>r||e.endPosition.row<t)return null;for(let n of e.namedChildren){let s=at(n,r,t);if(s)return s}return e}function Jt(e){let r=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(r.type)&&r.namedChildren.length>0;)r=r.namedChildren[0];return r}function _e(e){if(e.type==="identifier")return e.text;let r=e.childForFieldName("name")??e.childForFieldName("pattern");return r?_e(r):e.namedChildren.find(t=>t.type==="identifier")?.text??null}function Xt(e){return(e.childForFieldName("parameters")??e.namedChildren.find(t=>/parameters/u.test(t.type)))?.namedChildren.map(_e)??[]}var Yt=new Set(["identifier","type_identifier","field_identifier"]),Gt=new Set(["identifier"]),Qt=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),Zt=new Set(["rust","python"]),er=/\{([^{}]*)\}/g,tr=/\b([A-Za-z_][\w]*)\b/g;function ct(e,r){return rr(r).has(e.type)}function lt(e,r){return Zt.has(r)&&e.type==="string_content"}function Pe(e){let r=0;for(let n of e.values()){let s=n[n.length-1];s!==void 0&&s>r&&(r=s)}let t=new Array(r+1);for(let n=0;n<=r;n+=1)t[n]=new Set;for(let[n,s]of e)for(let o of s)t[o].add(n);return t}function rr(e){return e==="rust"?Yt:e==="python"?Gt:Qt}function pt(e,r){let t=e.startPosition.row;for(let n of e.text.matchAll(er)){let s=n[1]??"";for(let o of s.matchAll(tr))o[1]&&r(o[1],t)}}var nr=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],sr=/^#!?\[\s*serde\s*\(/,or=/^#!?\[\s*schemars\s*\(/,ir=/^#!?\[\s*validate\s*\(/,ar=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function ut(e,r,t){if(r!=="typescript"&&r!=="tsx"&&r!=="javascript"||e.type!=="call_expression")return;let n=e.childForFieldName("function")??e.namedChild(0);if(!n)return;let s=be(n);if(!s||!ar.has(s))return;let o=e.namedChildren.find(c=>c.type==="arguments");if(!o)return;let i=o.namedChild(0);if(!i||i.type!=="string")return;let a=i.namedChildren.find(c=>c.type==="string_fragment");a&&t.add(a.text)}function mt(e,r){let t=sr.test(e),n=or.test(e),s=ir.test(e);if(!(!t&&!n&&!s))for(let o of nr){o.lastIndex=0;let i;for(;(i=o.exec(e))!==null;){let a=i[1],c=a.split("::").pop()??a;c==="is_none"&&/\bOption\b/.test(a)||c==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(a)||c&&r.add(c)}}}function dt(e,r){let t=new Map,n=(i,a)=>{if(i===a)return;let c=t.get(i);c||(c=new Set,t.set(i,c)),c.add(a)},s=r==="python"?new Set(["identifier"]):new Set(["type_identifier"]),o=(i,a)=>{let c=l=>{s.has(l.type)&&l.text!==a&&n(l.text,a);for(let p of l.children)c(p)};for(let l of i.children)c(l)};if(r==="rust")for(let i of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let a=i.namedChildren.find(l=>l.type==="type_identifier")?.text;if(!a)continue;let c=i.namedChildren.find(l=>l.type==="field_declaration_list"||l.type==="enum_variant_list"||l.type==="ordered_field_declaration_list");c&&o(c,a),i.type==="type_item"&&o(i,a)}else if(r==="python")for(let i of e.rootNode.descendantsOfType("class_definition")){let a=i.namedChildren.find(p=>p.type==="identifier")?.text;if(!a)continue;let c=i.childForFieldName("superclasses");c&&o(c,a);let l=i.namedChildren.find(p=>p.type==="block");if(l)for(let p of l.descendantsOfType("type"))for(let u of p.descendantsOfType("identifier"))u.text!==a&&n(u.text,a)}else for(let i of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let a=i.namedChildren.find(c=>c.type==="type_identifier")?.text;a&&o(i,a)}return t}var cr=new Map([["defn","function"],["defn-","function"],["defmacro","macro"],["defmacro-","macro"],["defmethod","method"]]),Te=new Set(["catch","comment","def","defprotocol","defrecord","deftype","defmethod","defmacro","defmacro-","defn","defn-","do","doseq","dotimes","fn","for","if","let","loop","ns","quote","recur","throw","try","extend-protocol","extend-type","when","when-let","when-not"]);function ft(e){let r=[],t=[],n=[],s=new Map,o=[],i=0,a=0,c=(l,p)=>{let u=s.get(l);if(!u){s.set(l,[p]);return}u[u.length-1]!==p&&u.push(p)};for(;a<e.length;){let l=e[a];if(l===`
|
|
6
|
+
`){i+=1,a+=1;continue}if(/\s|,/.test(l)){a+=1;continue}if(l===";"){a=le(e,a);continue}if(l==='"'){let h=re(e,a,i);i=h.line,a=h.index;continue}if(l==="("||l==="["||l==="{"){o.push({kind:l,startLine:i,endLine:i,headTokens:[],tokens:[],children:[]}),a+=1;continue}if(l===")"||l==="]"||l==="}"){let h=o.pop();h&&(h.endLine=i,lr(h,{callables:r,callSites:t,clojureMembers:n,recordIdentifier:c}),o[o.length-1]?.children.push(h)),a+=1;continue}if(Ee(l)){a+=1;continue}let p=i,u=a;for(;a<e.length&&!Re(e[a]);)a+=1;let m=e.slice(u,a);if(!m)continue;let d={text:m,line:p};pr(o[o.length-1],d),c(N(m),p)}return{language:"clojure",callables:r,callSites:t,clojureMembers:n,typeContainerMap:new Map,identifierLineMap:s,identifiersByLine:gr(s),fileIdentifiers:new Set(s.keys()),rustAttrReferencedNames:new Set,crossLanguageDispatchNames:new Set}}function lr(e,r){if(e.kind!=="("||e.headTokens.length===0)return;let t=e.headTokens[0],n=N(t.text),s=cr.get(t.text);if(s){let i=e.headTokens[1];if(i){let a=N(i.text);r.recordIdentifier(a,i.line),r.callables.push({name:a,startLine:e.startLine,endLine:e.endLine,paramCount:0,params:[],paramsEndLine:i.line,isLiteralPassthrough:!1,clojureKind:s})}}if(ur(e,r),!n||Te.has(t.text)||Te.has(n)||n.startsWith(":"))return;let o=fr(t.text);r.callSites.push({calleeLeaf:o.leaf,calleeQualifier:o.qualifier,calleeText:o.text,memberAccess:!1,line:t.line})}function pr(e,r){e&&(e.headTokens.length<2&&e.headTokens.push(r),e.tokens.length<200&&e.tokens.push(r))}function ur(e,r){let t=N(e.tokens[0]?.text??"");if(t==="defprotocol"){let n=N(e.tokens[1]?.text??"");if(!n)return;for(let s of ce(e))te(r,n,"protocol",s,"protocol-method");return}if(t==="defrecord"||t==="deftype"){let n=N(e.tokens[1]?.text??"");if(!n)return;let s=t==="defrecord"?"record":"type",o=t==="defrecord"?"record-method":"type-method";for(let i of ce(e))te(r,n,s,i,o);return}if(t==="extend-type"){let n=N(e.tokens[1]?.text??"");if(!n)return;for(let s of ce(e))te(r,n,"extension",s,"extension-method");return}if(t==="extend-protocol"){let n=N(e.tokens[1]?.text??"");for(let s of ce(e)){n&&te(r,n,"extension",s,"extension-method");let o=dr(e,s.startLine);o&&o!==n&&te(r,o,"extension",s,"extension-method")}}}function ce(e){return e.children.filter(mr)}function mr(e){if(e.kind!=="(")return!1;let r=N(e.tokens[0]?.text??"");return!!(r&&!Te.has(r)&&!r.startsWith(":"))}function te(e,r,t,n,s){let o=n.tokens[0],i=N(o?.text??"");!o||!i||(e.recordIdentifier(i,o.line),e.clojureMembers.push({ownerName:r,ownerKind:t,memberName:i,memberKind:s,startLine:n.startLine,endLine:n.endLine}))}function dr(e,r){let t=null;for(let n=2;n<e.tokens.length;n+=1){let s=e.tokens[n];if(s.line>r)break;let o=N(s.text);o&&!o.startsWith(":")&&(t=o)}return t}function N(e){return e.replace(/^#?['`~@]+/,"").split("/").pop()?.replace(/^\./,"")??""}function fr(e){let r=e.replace(/^#?['`~@]+/,""),t=r.lastIndexOf("/"),n=N(r);if(t<=0)return{leaf:n,text:r};let s=r.slice(0,t);return{leaf:n,qualifier:s,text:r}}function le(e,r){let t=r;for(;t<e.length&&e[t]!==`
|
|
7
|
+
`;)t+=1;return t}function re(e,r,t){let n=r+1,s=t;for(;n<e.length;){let o=e[n];if(o==="\\"){n+=2;continue}if(o===`
|
|
8
|
+
`&&(s+=1),n+=1,o==='"')break}return{index:n,line:s}}function Ee(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function Re(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function gr(e){let r=[];for(let[t,n]of e)for(let s of n)r[s]??=new Set,r[s].add(t);return r}var gt=6,Sr=oe("source-facts",{clearGroups:["whole-project","source-file"]}),Le=X({kind:"source-facts",invalidation:Y("source-facts"),serialize:br,deserialize:Nr});function E(e,r){return hr(e,r).facts}function hr(e,r){let t=A(e,r);if(!t)return{facts:null};let n=xr(e,r,t);return n?Sr.get(e,r,t,()=>yr(e,r,n,t)):{facts:null}}function xr(e,r,t){return Q(r)?Qe(e,r,t)?.language??null:G(r)}function yr(e,r,t,n){let s=H(e,r,n),o=Le.read(e,r,s);if(o&&o.language===t)return{facts:o};if(t==="clojure"){let c=ft(n);return Le.write(e,r,s,c),{facts:c}}let i=j(e,r);if(!i)return{facts:null,unavailable:{language:t,reason:"parser-unavailable"}};let a=Pr(i,t);return Le.write(e,r,s,a),{facts:a}}function br(e){let r={version:gt,language:e.language,callables:e.callables,callSites:e.callSites,clojureMembers:e.clojureMembers,typeContainerMap:[...e.typeContainerMap.entries()].map(([t,n])=>[t,[...n]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(r)}function Nr(e){try{let r=JSON.parse(e);if(r.version!==gt||r.language==="clojure"&&(r.clojureMembers===void 0||r.callSites.some(n=>n.calleeText===void 0)))return null;let t=new Map(r.identifierLineMap);return{language:r.language,callables:r.callables,callSites:r.callSites,clojureMembers:r.clojureMembers??[],typeContainerMap:new Map(r.typeContainerMap.map(([n,s])=>[n,new Set(s)])),identifierLineMap:t,identifiersByLine:Pe(t),fileIdentifiers:new Set(t.keys()),rustAttrReferencedNames:new Set(r.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(r.crossLanguageDispatchNames)}}catch{return null}}function Ir(e,r,t,n){let s=E(e,r);return s?_r(s,t,n)?.isLiteralPassthrough??!0:!0}function Cr(e,r){return r.relativePath.includes(".clj-kondo/hooks/")?!0:E(e,r.relativePath)?.callables.find(n=>n.startLine===r.startLine&&n.endLine===r.endLine)?.clojureKind==="macro"}function _r(e,r,t){return e.callables.find(n=>n.startLine===r&&n.endLine===t)??null}function Pr(e,r){let t=[],n=[],s=new Set,o=new Set,i=new Map,a=(l,p)=>{let u=i.get(l);if(!u){i.set(l,[p]);return}u[u.length-1]!==p&&u.push(p)},c=l=>{let p=ie(l,r);p&&t.push(p);let u=Ze(l,r);u&&n.push(u),ut(l,r,o),r==="rust"&&(l.type==="attribute_item"||l.type==="inner_attribute_item")&&mt(l.text,s),ct(l,r)&&a(l.text,l.startPosition.row),lt(l,r)&&pt(l,a);for(let m of l.children)c(m)};return c(e.rootNode),{language:r,callables:t,callSites:n,clojureMembers:[],typeContainerMap:dt(e,r),identifierLineMap:i,identifiersByLine:Pe(i),fileIdentifiers:new Set(i.keys()),rustAttrReferencedNames:s,crossLanguageDispatchNames:o}}var St=new Set(["rust","typescript","tsx","javascript","python","clojure"]),Tr=new Set(["rust","typescript","tsx","javascript","python"]);function Er(e,r){let t=E(e,r);return!t||!St.has(t.language)?null:t.callables.map(n=>({name:n.name,startLine:n.startLine,endLine:n.endLine}))}function Rr(e,r){if(!Tr.has(r))return null;let t=[];for(let n of e.descendantsOfType([...et(r)])){let s=ie(n,r);s&&t.push({name:s.name,startLine:s.startLine,endLine:s.endLine})}return t}function Lr(e,r){let t=E(e,r);return!t||!St.has(t.language)?null:t.callSites}function Fr(e,r){return E(e,r)?.typeContainerMap??new Map}function Ar(e,r,t={}){let n=E(e,r);if(!n)return[];let s=[];if(t.includeCrossLanguageDispatchNames)for(let o of n.crossLanguageDispatchNames)s.push({name:o,kind:"cross-language-dispatch",occurrences:1});if(t.includeRustAttributeNames&&n.language==="rust")for(let o of n.rustAttrReferencedNames)s.push({name:o,kind:"rust-attribute",occurrences:1});return s}import{basename as ht}from"path";var kr=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function y(e){let r=[],t=0,n=0;for(let s=0;s<e.length;s++){let o=e[s];(o==="{"||o==="["||o==="(")&&t++,(o==="}"||o==="]"||o===")")&&t--,o===","&&t===0&&(r.push(e.slice(n,s)),n=s+1)}return r.push(e.slice(n)),r}function b(e,r){for(let t of e.namedChildren)if(t.type===r)return t;return null}function g(e,r){let t=new Set,n=(s,o)=>{let i=o||r.has(s.type);!i&&kr.has(s.type)&&t.add(s.text);for(let a of s.children)n(a,i)};return n(e.rootNode,!1),t}function T(e,r,t,n,s,o,i){return{importedName:s,localName:o,sourcePath:i??S(e,n,Ye(r)),kind:"named",used:x(t,o),usedMembers:[]}}function f(e,r,t,n,s="named",o={}){return{importedName:e,localName:r,sourcePath:t,kind:s,used:n.has(r),usedMembers:[],isTypeOnly:o.isTypeOnly}}function R(e,r,t,n,s="named",o=[],i={}){return{importedName:e,localName:r,sourcePath:t,kind:s,used:n,usedMembers:o,isTypeOnly:i.isTypeOnly}}function M(e,r){return{importedName:e,localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]}}function v(e,r,t={}){return{importedName:e,localName:t.localName??null,sourcePath:r,kind:"namespace",used:t.used??!0,usedMembers:t.usedMembers??[],isTypeOnly:t.isTypeOnly}}function I(e,r,t){let n=[];for(let s of e.matchAll(r)){let o=s[0];if(!o||typeof s.index!="number")continue;let i=w(e,s.index,s.index+o.length);for(let a of t(s,i))n.push(a)}return n}function C(e,r,t,n,s){let o=Z(e,r,s)?.tree??null;if(o){let i=t(o);if(i)return i}return n()}function pe(e,r,t,n,s){let o=Z(e,r,s)?.tree??null,i=G(r),a=i?t[i]:void 0;return o&&a?a(o):n()}function xt(e,r,t){return C(e,r,n=>Dr(e,r,n),()=>wr(e,r,t),t)}function wr(e,r,t){return I(t,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(n,s)=>{let o=n[1]?.trim();if(!o)return[];let i=ht(o).replace(/\.[^.]+$/,"");return[R(o,i,Se(e,r,o),x(s,i))]})}function Dr(e,r,t){let n=g(t,new Set(["preproc_include"])),s=[];for(let o of t.rootNode.descendantsOfType("preproc_include")){let i=null;for(let c of o.namedChildren){if(c.type==="system_lib_string"){i=c.text.replace(/^<|>$/g,"");break}if(c.type==="string_literal"){i=c.namedChildren.find(p=>p.type==="string_content")?.text??c.text.replace(/^"|"$/g,"");break}}if(!i)continue;let a=ht(i).replace(/\.[^.]+$/,"");s.push(f(i,a,Se(e,r,i),n))}return s}var jr=new Set([":require",":require-macros",":use"]),ke=String.raw`A-Za-z0-9_$*+!?.<>=-`;function bt(e,r,t){let n=Hr(t);if(!n)return[];let s=Wr(t,n.start,n.end),o=[];for(let i of n.children.slice(2)){if(i.type!=="list"||i.children.length===0)continue;let a=_(i.children[0]);if(a){if(jr.has(a)){for(let c of vr(i.children.slice(1)))o.push(...Mr(e,c,s));continue}if(a===":import")for(let c of Br(i.children.slice(1)))o.push(c)}}return o}function Or(e){return e.type==="list"&&_(e.children[0])==="ns"}function Mr(e,r,t){let n=Ge(e,r.namespace),s=r.alias??r.namespace,o=qr(t,s),i=[{importedName:r.namespace,localName:s,sourcePath:n,kind:"namespace",used:r.refers.length>0||r.referAll||o.length>0||Vr(t,r.namespace),usedMembers:o}];r.referAll&&i.push({importedName:"*",localName:null,sourcePath:n,kind:"side-effect",used:!0,usedMembers:[]});for(let a of r.refers)i.push({importedName:a,localName:a,sourcePath:n,kind:"named",used:zr(t,a),usedMembers:[]});return i}function vr(e){return e.flatMap(r=>ue(r,null))}function ue(e,r){if(e.type==="atom")return e.text.startsWith(":")?[]:[{namespace:Ae(r,e.text),alias:null,refers:[],referAll:!1}];if(e.type==="vector")return e.children.length>0&&_(e.children[0])===null?e.children.flatMap(t=>ue(t,r)):$r(e,r);if(e.type==="list"&&e.children.length>0){let t=_(e.children[0]);return t?!t||t.startsWith(":")?[]:e.children.slice(1).flatMap(n=>ue(n,Ae(r,t))):e.children.flatMap(n=>ue(n,r))}return[]}function $r(e,r){let t=_(e.children[0]);if(!t||t.startsWith(":"))return[];let n={namespace:Ae(r,t),alias:null,refers:[],referAll:!1};for(let s=1;s<e.children.length;s+=1){let o=_(e.children[s]);if(!o?.startsWith(":"))continue;let i=e.children[s+1];if((o===":as"||o===":as-alias")&&i){n.alias=_(i),s+=1;continue}o===":refer"&&i&&(_(i)===":all"?n.referAll=!0:(i.type==="vector"||i.type==="list")&&n.refers.push(...i.children.map(_).filter(Ur)),s+=1)}return[n]}function Br(e){let r=[];for(let t of e){if(t.type==="atom"){let s=t.text.split(".").pop()??t.text;r.push(R(s,s,null,!0));continue}if(t.type!=="vector")continue;let n=_(t.children[0]);if(n)for(let s of t.children.slice(1)){let o=_(s);o&&r.push(R(`${n}.${o}`,o,null,!0))}}return r}function Ae(e,r){return e?`${e}.${r}`:r}function _(e){return e?.type==="atom"?e.text:null}function Ur(e){return!!(e&&!e.startsWith(":"))}function qr(e,r){let t=new Set,n=new RegExp(`${we()}${O(r)}\\s*/\\s*([${ke}]+)`,"g");for(let s of e.matchAll(n)){let o=s[1];o&&t.add(o)}return[...t]}function Vr(e,r){return new RegExp(`${we()}${O(r)}\\s*/`,"m").test(e)}function zr(e,r){return new RegExp(`${we()}${O(r)}(?![${ke}])`,"m").test(e)}function we(){return`(?<![${ke}])`}function Wr(e,r,t){let n="",s=0;for(;s<e.length;){if(s>=r&&s<t){n+=e[s]===`
|
|
9
|
+
`?`
|
|
10
|
+
`:" ",s+=1;continue}let o=e[s];if(o===";"){let i=le(e,s);n+=yt(e.slice(s,i)),s=i;continue}if(o==='"'){let i=re(e,s,0).index;n+=yt(e.slice(s,i)),s=i;continue}n+=o,s+=1}return n}function Hr(e){let r=0;for(;r<e.length&&(r=De(e,r),!(r>=e.length));){let t=me(e,r);if(!t){r+=1;continue}if(Or(t.form))return t.form;r=t.index}return null}function me(e,r){let t=De(e,r);if(e.startsWith("#?@",t)||e.startsWith("#?",t))return Kr(e,t);if(e.startsWith("#_",t)){let s=me(e,t+2);return s?{form:{type:"atom",text:"",start:t,end:s.index},index:s.index}:null}for(;Ee(e[t]);)t+=1;let n=e[t];return n?n==="("?Fe(e,t,"list",")"):n==="["?Fe(e,t,"vector","]"):n==="{"?Fe(e,t,"map","}"):n==='"'?{form:{type:"atom",text:"",start:t,end:re(e,t,0).index},index:re(e,t,0).index}:Xr(e,t):null}function Kr(e,r){let t=e.startsWith("#?@",r)?3:2,n=me(e,r+t);return n?{form:{type:"list",children:n.form.type==="list"||n.form.type==="vector"||n.form.type==="map"?Jr(n.form.children):[],start:r,end:n.index},index:n.index}:null}function Jr(e){let r=[];for(let t=0;t<e.length;t+=2){let n=_(e[t]),s=e[t+1];n?.startsWith(":")&&s&&r.push(s)}return r}function Fe(e,r,t,n){let s=[],o=r+1;for(;o<e.length;){if(o=De(e,o),e[o]===n)return{form:{type:t,children:s,start:r,end:o+1},index:o+1};let i=me(e,o);if(!i){o+=1;continue}i.form.type==="atom"&&i.form.text===""||s.push(i.form),o=i.index}return{form:{type:t,children:s,start:r,end:e.length},index:e.length}}function Xr(e,r){let t=r;for(;t<e.length&&!Re(e[t]);)t+=1;return{form:{type:"atom",text:e.slice(r,t),start:r,end:t},index:t}}function De(e,r){let t=r;for(;t<e.length;){let n=e[t];if(/\s|,/.test(n)){t+=1;continue}if(n===";"){t=le(e,t);continue}break}return t}function yt(e){return e.replace(/[^\r\n]/g," ")}function Nt(e,r,t){let n=[];for(let s of t.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let o=s[1]?.trim(),i=s[2]?.trim()??null,a=s[0];if(!o||!a||typeof s.index!="number")continue;let c=w(t,s.index,s.index+a.length);n.push({importedName:o,localName:i,sourcePath:he(e,r,o),kind:i?"namespace":"side-effect",used:i?x(c,i):!0,usedMembers:i?V(c,i):[]})}return n}function It(e,r,t){let n=[];for(let s of t.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let o=s[1]?.trim();o&&n.push({specifier:o,sourcePath:he(e,r,o)})}return n}function Ct(e,r,t){return pe(e,r,{csharp:n=>Gr(e,r,n),vb:n=>Yr(e,r,n)},()=>{let n=Xe(r)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return I(t,n,(s,o)=>{let i=s[1]?.trim();if(!i)return[];let[a,c]=i.split(/\s*=\s*/),l=!!c,p=(l?c:a)?.trim()??i,u=p.split(".").pop()??p,m=l?a?.trim()??u:u;return[T(e,r,o,p,u,m,S(e,p,q))]})},t)}function Yr(e,r,t){let n=g(t,new Set(["imports_statement"])),s=[];for(let o of t.rootNode.descendantsOfType("imports_statement")){let i=o.namedChildren.filter(m=>m.type==="namespace_name");if(i.length===0)continue;let a=i[i.length-1],c=i.length>1?i[0]:null,l=a.text,p=l.split(".").pop()??l,u=c?.text??p;s.push(f(p,u,S(e,l,q),n,c?"namespace":"named"))}return s}function Gr(e,r,t){let n=g(t,new Set(["using_directive"])),s=[];for(let o of t.rootNode.descendantsOfType("using_directive")){let i=o.namedChildren;if(i.length===0)continue;let a=null,c;i.length>=2&&i[0].type==="identifier"&&(i[1].type==="qualified_name"||i[1].type==="identifier")?(a=i[0],c=i[1]):c=i[i.length-1];let l=c.text,p=l.split(".").pop()??l,u=a?.text??p;s.push(f(p,u,S(e,l,q),n,a?"namespace":"named"))}return s}var Qr=U("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function _t(e,r){return Qr.get(e,r,()=>{let t=new Set,n=A(e,r);if(!n)return t;let o=n.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g,i=>i.replace(/[^\r\n]/g," ")).replace(/<!--[\s\S]*?-->/g,i=>i.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,i=>i.replace(/[^\r\n]/g," "));for(let i of o.matchAll(/[A-Za-z_$][\w$]*/g))t.add(i[0]);return t})}function je(e,r,t){return C(e,r,n=>en(e,r,n),()=>Zr(e,r,t),t)}function Zr(e,r,t){return mn(t).flatMap(n=>dn(e,r,n.clause,n.specifier,n.start,n.end,t))}function en(e,r,t){let n=tn(e,r,t),s=[];for(let o of t.rootNode.descendantsOfType("import_statement"))s.push(...rn(e,r,t,o,n));return s}function tn(e,r,t){let n=g(t,new Set(["import_statement"]));if(Q(r))for(let s of _t(e,r))n.add(s);return n}function rn(e,r,t,n,s){let o=cn(n);if(!o)return[];let i=L(e,r,o),a=b(n,"import_clause");return a?nn(t,a,i,s,ln(n.text)):[M("*",i)]}function nn(e,r,t,n,s){let o=[];for(let i of r.namedChildren)if(i.type==="identifier")o.push(sn(i.text,t,n,s));else if(i.type==="namespace_import"){let a=on(e,i,t,n,s);a&&o.push(a)}else i.type==="named_imports"&&o.push(...an(i,t,n,s));return o}function sn(e,r,t,n){return f("default",e,r,t,"default",{isTypeOnly:n})}function on(e,r,t,n,s){let i=b(r,"identifier")?.text??"";if(!i)return null;let a=un(e,i);return v("*",t,{localName:i,usedMembers:a,isTypeOnly:s,used:a.length>0||n.has(i)})}function an(e,r,t,n){let s=[];for(let o of e.namedChildren){if(o.type!=="import_specifier")continue;let i=o.namedChild(0),a=o.namedChild(1);if(!i)continue;let c=i.text,l=a?.text??c;s.push(f(c,l,r,t,"named",{isTypeOnly:n||pn(o.text)}))}return s}function cn(e){let r=b(e,"string");if(!r)return null;let t=b(r,"string_fragment");return t?t.text:null}function ln(e){return/^\s*import\s+type\b/.test(e)}function pn(e){return/^\s*type\b/.test(e.trim())}function un(e,r){let t=new Set;for(let n of e.rootNode.descendantsOfType("member_expression")){let s=n.namedChild(0),o=n.namedChild(1);!s||!o||s.type!=="identifier"||s.text!==r||(o.type==="property_identifier"||o.type==="identifier")&&t.add(o.text)}return[...t]}function mn(e){let r=[],t=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(t)){let o=s[0],i=s[1],a=s[2];!o||!a||typeof s.index!="number"||r.push({clause:i,specifier:a,start:s.index,end:s.index+o.length})}let n=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(n)){let o=s[0],i=s[1];!o||!i||typeof s.index!="number"||r.push({clause:null,specifier:i,start:s.index,end:s.index+o.length})}return r.sort((s,o)=>s.start-o.start)}function dn(e,r,t,n,s,o,i){let a=L(e,r,n),c=w(i,s,o);return t?fn(t).map(p=>({...p,sourcePath:a})).map(p=>{if(p.kind==="namespace"){let u=V(c,p.localName);return v(p.importedName,p.sourcePath,{localName:p.localName,usedMembers:u,used:u.length>0||x(c,p.localName),isTypeOnly:p.isTypeOnly})}return p.kind==="side-effect"?M(p.importedName,p.sourcePath):R(p.importedName,p.localName??"",p.sourcePath,p.localName?x(c,p.localName):!1,p.kind,[],{isTypeOnly:p.isTypeOnly})}):[M("*",a)]}function fn(e){let r=e.trim(),t=/^type\b/.test(r),n=r.replace(/^type\s+/,""),[s,o]=gn(n),i=[];return s&&i.push(...Pt(s,t)),o&&i.push(...Pt(o,t)),i}function Pt(e,r){let t=e.trim();if(!t)return[];if(t.startsWith("{")){let n=t.slice(1,-1).trim();return n?y(n).map(s=>{let o=s.trim(),i=r||/^type\b/.test(o),a=o.replace(/^type\s+/,""),[c,l]=a.split(/\s+as\s+/);return{importedName:c.trim(),localName:(l??c).trim(),kind:"named",isTypeOnly:i}}):[]}return t.startsWith("* as ")?[{importedName:"*",localName:t.slice(5).trim(),kind:"namespace",isTypeOnly:r}]:[{importedName:"default",localName:t,kind:"default",isTypeOnly:r}]}function gn(e){let r=0;for(let t=0;t<e.length;t++){let n=e[t];if(n==="{"&&r++,n==="}"&&r--,n===","&&r===0)return[e.slice(0,t).trim(),e.slice(t+1).trim()]}return[e.trim(),null]}function Oe(e,r,t){let n=j(e,r);return n?Nn(e,r,n):Sn(e,r,t)}function Sn(e,r,t){return[...hn(e,r,t),...xn(e,r,t),...yn(e,r,t)]}function hn(e,r,t){let n=[],s=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of t.matchAll(s)){if(typeof o.index!="number")continue;let i=o[1]??"",a=o[2]??"",c=y(i).map(u=>bn(u.trim())).filter(u=>!!u),l=z(t,o.index),p=z(t,o.index+o[0].length-1);n.push({kind:"named",sourcePath:L(e,r,a),names:c,startLine:l,endLine:p})}return n}function xn(e,r,t){let n=[],s=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of t.matchAll(s)){if(typeof o.index!="number")continue;let i=o[2]??"",a=z(t,o.index),c=z(t,o.index+o[0].length-1);n.push({kind:"star-as",sourcePath:L(e,r,i),names:o[1]?[o[1]]:[],startLine:a,endLine:c})}return n}function yn(e,r,t){let n=[],s=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of t.matchAll(s)){if(typeof o.index!="number")continue;let i=o[1]??"",a=z(t,o.index),c=z(t,o.index+o[0].length-1);n.push({kind:"star",sourcePath:L(e,r,i),names:[],startLine:a,endLine:c})}return n}function bn(e){if(!e)return null;let r=e.replace(/^type\s+/,"").trim();if(!r)return null;let t=r.match(/^(\w+)\s+as\s+(\w+)$/);if(t)return t[2]??null;let n=r.match(/^(\w+)$/);return n?n[1]??null:null}function z(e,r){let t=0;for(let n=0;n<r&&n<e.length;n++)e.charCodeAt(n)===10&&t++;return t}function Nn(e,r,t){let n=[];for(let s of t.rootNode.descendantsOfType("export_statement")){let o=In(e,r,s);if(o===void 0)continue;let i=s.startPosition.row,a=s.endPosition.row,c=Cn(s,o,i,a);n.push(c)}return n}function In(e,r,t){let n=b(t,"string");if(!n)return;let s=b(n,"string_fragment");if(s)return L(e,r,s.text)}function Cn(e,r,t,n){let s=b(e,"export_clause");if(s){let i=[];for(let a of s.namedChildren){if(a.type!=="export_specifier")continue;let c=a.namedChild(0),l=a.namedChild(1);c&&i.push((l??c).text)}return{kind:"named",sourcePath:r,names:i,startLine:t,endLine:n}}let o=b(e,"namespace_export");if(o){let i=o.namedChildren.find(a=>a.type==="identifier"||a.type==="type_identifier")?.text;return{kind:"star-as",sourcePath:r,names:i?[i]:[],startLine:t,endLine:n}}return{kind:"star",sourcePath:r,names:[],startLine:t,endLine:n}}function Tt(e,r,t){return pe(e,r,{java:n=>_n(e,r,n),kotlin:n=>Pn(e,r,n),scala:n=>Tn(e,r,n)},()=>I(t,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(n,s)=>{let o=n[1]?.trim();return o?En(e,r,o,s):[]}),t)}function _n(e,r,t){let n=g(t,new Set(["import_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("import_declaration")){let i=o.children.some(u=>u.type==="asterisk"),c=o.namedChildren.find(u=>u.type==="scoped_identifier")??o.namedChildren.find(u=>u.type==="identifier");if(!c)continue;let l=c.text;if(i){s.push(v("*",S(e,l,P)));continue}let p=l.split(".").pop()??l;s.push(f(p,p,S(e,l,P),n))}return s}function Pn(e,r,t){let n=g(t,new Set(["import_header","import_list"])),s=[];for(let o of t.rootNode.descendantsOfType("import_header")){let i=o.namedChildren.find(d=>d.type==="identifier");if(!i)continue;let a=o.namedChildren.some(d=>d.type==="wildcard_import"),c=o.namedChildren.find(d=>d.type==="import_alias");if(a){s.push(v("*",S(e,i.text,P)));continue}let l=i.text,p=l.split(".").pop()??l,m=c?.namedChild(0)?.text??p;s.push(f(p,m,S(e,l,P),n))}return s}function Tn(e,r,t){let n=g(t,new Set(["import_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("import_declaration")){let i=o.namedChildren.find(u=>u.type==="namespace_selectors"||u.type==="namespace_wildcard"),a=o.namedChildren.filter(u=>u!==i&&(u.type==="identifier"||u.type==="stable_identifier")),c=a.map(u=>u.text).join(".");if(!c)continue;if(i?.type==="namespace_wildcard"){s.push(v("*",S(e,c,P)));continue}if(i?.type==="namespace_selectors"){for(let u of i.namedChildren)if(u.type==="arrow_renamed_identifier"){let[m,d]=u.namedChildren;if(!m)continue;let h=m.text,$=d?.text??h;if(h==="_")continue;s.push(f(h,$,S(e,`${c}.${h}`,P),n))}else if(u.type==="identifier"){let m=u.text;s.push(f(m,m,S(e,`${c}.${m}`,P),n))}continue}let l=a[a.length-1]?.text??c,p=a.slice(0,-1).map(u=>u.text).join(".")||c;s.push(f(l,l,S(e,p&&a.length>1?`${p}.${l}`:c,P),n))}return s}function En(e,r,t,n){if(t.includes("{")&&t.includes("}")){let s=t.slice(0,t.indexOf("{")).replace(/\.$/,"").trim(),o=t.slice(t.indexOf("{")+1,t.lastIndexOf("}")).trim();return y(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[c,l]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),p=c?.trim();if(!p||p==="_")return[];let u=(l??p.split(".").pop()??p).trim(),m=p==="_"?s:`${s}.${p}`.replace(/\.\./g,".");return[T(e,r,n,m,p,u)]})}return[T(e,r,n,t,t.split(".").pop()??t,t.split(".").pop()??t)]}function Rt(e,r,t){return C(e,r,n=>Rn(e,r,n),()=>I(t,/^[ \t]*use\s+(.+?)\s*;$/gm,(n,s)=>{let o=n[1]?.trim();return o?y(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[c,l]=a.split(/\s+as\s+/i),p=c?.trim()??a,u=p.split("\\").pop()??p,m=(l??u).trim();return[T(e,r,s,p,u,m,S(e,p.replace(/\\/g,"."),K))]}):[]}),t)}function Rn(e,r,t){let n=g(t,new Set(["namespace_use_declaration"])),s=[],o=(i,a,c)=>{s.push(f(a,c,S(e,i.replace(/\\/g,"."),K),n))};for(let i of t.rootNode.descendantsOfType("namespace_use_declaration")){let a=i.namedChildren.find(c=>c.type==="namespace_use_group");if(a){let c=i.namedChildren.find(l=>l.type==="namespace_name")?.text??"";for(let l of a.namedChildren){if(l.type!=="namespace_use_clause")continue;let{importedName:p,localName:u,qualified:m}=Et(l,c);p&&o(m,p,u)}continue}for(let c of i.namedChildren){if(c.type!=="namespace_use_clause")continue;let{importedName:l,localName:p,qualified:u}=Et(c,"");l&&o(u,l,p)}}return s}function Et(e,r){let t=e.namedChildren.find(l=>l.type==="qualified_name"),n=e.namedChildren.filter(l=>l.type==="name"),s="";t?s=t.text:n.length>=1&&(s=n[0].text);let o=t&&n.length>0?n[n.length-1]:null,i=s.split("\\").pop()??s,a=o?.text??i,c=r?`${r}\\${s}`:s;return{importedName:i,localName:a,qualified:c}}function Ft(e,r,t){return C(e,r,n=>Ln(e,r,n),()=>An(t).flatMap(n=>wn(e,r,n,t)),t)}function Ln(e,r,t){let n=g(t,new Set(["import_statement","import_from_statement"])),s=[];for(let o of t.rootNode.descendantsOfType("import_statement"))for(let i of o.namedChildren){let a=Lt(i);if(!a)continue;let c=J(e,r,a.qualifiedName);s.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:n.has(a.localName),usedMembers:[]})}for(let o of t.rootNode.descendantsOfType("import_from_statement")){let i=o.namedChild(0);if(!i)continue;let a=Fn(i);if(a===null)continue;let c=J(e,r,a);for(let l=1;l<o.namedChildCount;l+=1){let p=o.namedChild(l);if(p.type==="wildcard_import"){s.push({importedName:"*",localName:null,sourcePath:c,kind:"side-effect",used:!0,usedMembers:[]});continue}let u=Lt(p);u&&s.push({importedName:u.qualifiedName,localName:u.localName,sourcePath:c,kind:"named",used:n.has(u.localName),usedMembers:[]})}}return s}function Lt(e){if(e.type==="aliased_import"){let r=e.namedChild(0),t=e.namedChild(1);return!r||!t?null:{qualifiedName:r.text,localName:t.text}}if(e.type==="dotted_name"){let r=e.text;return{qualifiedName:r,localName:r.split(".")[0]??r}}return e.type==="identifier"?{qualifiedName:e.text,localName:e.text}:null}function Fn(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let r=b(e,"import_prefix")?.text??"",t=b(e,"dotted_name")?.text??"";return`${r}${t}`}return null}function An(e){let r=e.split(`
|
|
11
|
+
`),t=[],n=0;for(let s=0;s<r.length;s++){let o=r[s],i=o.trimStart(),a=n;if(n+=o.length+1,!i.startsWith("import ")&&!i.startsWith("from "))continue;let c=o,l=a+o.length,p=Ie(o);for(;s+1<r.length&&(p>0||c.trimEnd().endsWith("\\"));){s++;let m=r[s];c+=`
|
|
12
|
+
${m}`,l+=1+m.length,p+=Ie(m),n+=m.length+1}let u=kn(c);u&&t.push({...u,start:a,end:l})}return t}function kn(e){let r=e.replace(/\\\s*\n/g," ").trim();if(r.startsWith("import "))return{kind:"import",module:null,clause:r.slice(7).trim()};let t=r.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!t)return null;let n=t[2].trim();return n.startsWith("(")&&n.endsWith(")")&&(n=n.slice(1,-1).trim()),{kind:"from",module:t[1],clause:n}}function wn(e,r,t,n){let s=w(n,t.start,t.end),o=t.clause.replace(/\n/g," ").trim();if(t.kind==="import")return y(o).flatMap(c=>{let l=c.trim().replace(/,$/,"");if(!l)return[];let[p,u]=l.split(/\s+as\s+/),m=p.trim(),d=(u??m.split(".")[0]??m).trim(),h=J(e,r,m),$=V(s,d);return[{importedName:m,localName:d,sourcePath:h,kind:"namespace",used:x(s,d)||$.length>0,usedMembers:$}]});let i=t.module?J(e,r,t.module):null,a=[];for(let c of y(o)){let l=c.trim().replace(/,$/,"");if(!l)continue;if(l==="*"){a.push({importedName:"*",localName:null,sourcePath:i,kind:"side-effect",used:!0,usedMembers:[]});continue}let[p,u]=l.split(/\s+as\s+/),m=(u??p).trim();a.push({importedName:p.trim(),localName:m,sourcePath:i,kind:"named",used:x(s,m),usedMembers:[]})}return a}import{basename as Dn}from"path";function At(e,r,t){return C(e,r,n=>On(e,r,n),()=>jn(e,r,t),t)}function jn(e,r,t){return I(t,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(n,s)=>{let o=n[1],i=n[2];if(!o||!i)return[];let a=o==="require_relative"?ge(e,r,i):null;if(a){let c=kt(i);return[R(c,c,a,x(s,c))]}return[M(i,a)]})}function On(e,r,t){let n=g(t,new Set([])),s=[],o=new Set(["require","require_relative","load"]);for(let i of t.rootNode.descendantsOfType("call")){let a=i.namedChild(0);if(!a||a.type!=="identifier"||!o.has(a.text))continue;let l=i.namedChildren.find(d=>d.type==="argument_list")?.namedChild(0);if(!l||l.type!=="string")continue;let u=l.namedChildren.find(d=>d.type==="string_content")?.text;if(!u)continue;let m=a.text==="require_relative"?ge(e,r,u):null;if(m){let d=kt(u);s.push(f(d,d,m,n))}else s.push(M(u,m))}return s}function kt(e){return tt(Dn(e).replace(/\.[^.]+$/,""),/_/)}function wt(e,r,t){return C(e,r,n=>Mn(e,r,n),()=>I(t,/^[ \t]*use\s+(.+?)\s*;$/gm,(n,s)=>{let o=n[1]?.trim();return o?vn(e,r,o,s):[]}),t)}function Mn(e,r,t){let n=g(t,new Set(["use_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("use_declaration")){let i=o.namedChild(0);if(i)for(let a of ne(i,"")){if(!a.importedName||a.importedName==="*")continue;let c=F(e,r,a.qualifiedName)??F(e,r,a.qualifiedName.split("::").slice(0,-1).join("::"));s.push(f(a.importedName,a.localName,c,n))}}return s}function ne(e,r){switch(e.type){case"identifier":case"super":case"crate":{let t=e.text;return[{qualifiedName:de(r,t),importedName:t,localName:t}]}case"self":{let t=r.split("::").filter(Boolean).pop()??"self";return[{qualifiedName:r||"self",importedName:t,localName:t}]}case"scoped_identifier":{let t=e.text,n=t.split("::").pop()??t;return[{qualifiedName:de(r,t),importedName:n,localName:n}]}case"scoped_use_list":{let t=e.namedChild(0),n=e.namedChild(1);if(!t||!n)return[];let s=de(r,t.text),o=[];for(let i of n.namedChildren)o.push(...ne(i,s));return o}case"use_list":{let t=[];for(let n of e.namedChildren)t.push(...ne(n,r));return t}case"use_as_clause":{let t=e.namedChild(0),n=e.namedChild(1);if(!t||!n)return[];let s=ne(t,r),o=n.text;return s.map(i=>({...i,localName:o}))}case"use_wildcard":{let t=e.namedChild(0),n=t?t.text:"";return[{qualifiedName:de(r,`${n}::*`),importedName:"*",localName:"*"}]}default:return[]}}function de(e,r){return e?r?`${e}::${r}`:e:r}function vn(e,r,t,n){let s=t.trim();if(s.includes("{")&&s.includes("}")){let p=s.slice(0,s.indexOf("{")).replace(/::$/,"").trim(),u=s.slice(s.indexOf("{")+1,s.lastIndexOf("}")).trim();return y(u).flatMap(m=>{let d=m.trim();if(!d)return[];if(d==="self"){let fe=p.split("::").filter(Boolean).pop();return fe?[T(e,r,n,p,fe,fe)]:[]}let[h,$]=d.split(/\s+as\s+/),B=h?.trim();if(!B)return[];let $t=($??B.split("::").pop()??B).trim(),Bt=`${p}::${B}`.replace(/::::/g,"::");return[T(e,r,n,Bt,B.split("::").pop()??B,$t,F(e,r,p))]})}let[o,i]=s.split(/\s+as\s+/),a=o?.trim()??s,c=(i??a.split("::").pop()??a).trim(),l=F(e,r,a)??F(e,r,a.split("::").slice(0,-1).join("::"));return[T(e,r,n,a,a.split("::").pop()??a,c,l)]}function Dt(e,r,t){let n=j(e,r);if(n)return $n(e,r,n);let s=[];for(let o of t.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let i=o[1]?.trim();i&&s.push(...Un(e,r,i))}return s}function $n(e,r,t){let n=[];for(let s of t.rootNode.descendantsOfType("use_declaration")){if(!Bn(s))continue;let o=s.namedChildren.find(i=>i.type!=="visibility_modifier");if(o)for(let i of ne(o,""))i.importedName&&n.push(Me(e,r,i.qualifiedName))}return n}function Bn(e){for(let r of e.children)if(r.type==="visibility_modifier"&&r.text.startsWith("pub"))return!0;return!1}function Un(e,r,t){let n=t.trim();if(n.includes("{")&&n.includes("}")){let s=n.slice(0,n.indexOf("{")).replace(/::$/,"").trim(),o=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return y(o).flatMap(i=>{let a=i.trim();if(!a||a==="self")return[];let[c]=a.split(/\s+as\s+/),l=`${s}::${c?.trim()??a}`.replace(/::::/g,"::");return[Me(e,r,l)]})}return[Me(e,r,n)]}function Me(e,r,t){return{specifier:t,sourcePath:F(e,r,t)??F(e,r,t.split("::").slice(0,-1).join("::"))}}function D({language:e,extensions:r,imports:t,parseImports:n}){return{language:e,extensions:r,capabilities:{imports:t},parseImports:n}}function jt(e,r){let t=r.toLowerCase();for(let n of e)for(let s of n.extensions)if(t.endsWith(s))return n;return null}var qn={language:"javascript",extensions:qe,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:je,parseReExports:Oe},Vn=D({language:"python",extensions:Ve,imports:"ast-with-regex-fallback",parseImports:Ft}),zn=D({language:"jvm",extensions:P,imports:"ast-dispatch-with-regex-fallback",parseImports:Tt}),Wn={language:"rust",extensions:ze,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:wt,parseExports:Dt},Hn=D({language:"ruby",extensions:We,imports:"ast-with-regex-fallback",parseImports:At}),Kn=D({language:"c/cpp",extensions:He,imports:"ast-with-regex-fallback",parseImports:xt}),Jn=D({language:"dotnet",extensions:q,imports:"ast-dispatch-with-regex-fallback",parseImports:Ct}),Xn={language:"dart",extensions:Ke,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:Nt,parseExports:It},Yn=D({language:"php",extensions:K,imports:"ast-with-regex-fallback",parseImports:Rt}),Gn=D({language:"clojure",extensions:Je,imports:"regex-only",parseImports:bt}),Qn=[qn,Vn,zn,Wn,Hn,Kn,Jn,Xn,Yn,Gn];function se(e){return jt(Qn,e)}var ve={clearGroups:["whole-project","source-file"]},Zn=U("source-imports",ve),es=U("source-exports",ve),ts=U("source-reexports",ve),Ot=X({kind:"source-imports",invalidation:Y("source-imports"),serialize:ns,deserialize:ss}),Mt=X({kind:"source-reexports",invalidation:Y("source-reexports"),serialize:os,deserialize:is});function Pi(e,r){let t=W(r);return ts.get(e,t,()=>{let n=se(t);if(!n?.parseReExports)return[];let s=A(e,t);if(!s)return[];let o=H(e,t,s),i=xe(e),a=Mt.read(e,t,o);if(a?.resolutionFingerprint===i)return a.reExports;let c=n.parseReExports(e,t,s);return Mt.write(e,t,o,{resolutionFingerprint:i,reExports:c}),c})}function rs(e,r){let t=W(r);return Zn.get(e,t,()=>{let n=se(t);if(!n)return[];let s=A(e,t);return s?vt(e,t,s,n):[]})}function Ti(e,r){let t=W(r),n=se(t);if(!n)return[];let s;try{s=$e(e.config.projectRoot,t,{inputKind:"indexed source file"})}catch(o){if(Be(o))return[];throw o}return vt(e,t,s,n)}function vt(e,r,t,n){let s=H(e,r,t),o=xe(e),i=Ot.read(e,r,s);if(i?.resolutionFingerprint===o)return i.imports;let a=n.parseImports(e,r,t);return Ot.write(e,r,s,{parserVersion:2,resolutionFingerprint:o,imports:a}),a}function Ei(e,r,t){let n=rs(e,r).filter(s=>s.kind==="named"&&s.isTypeOnly!==!0&&s.localName===t&&s.sourcePath!==null);return n.length===1?n[0]:null}function Ri(e,r){let t=W(r);return es.get(e,t,()=>{let n=se(t);if(!n?.parseExports)return[];let s=A(e,t);return s?n.parseExports(e,t,s):[]})}function ns(e){return JSON.stringify(e)}function ss(e){try{let r=JSON.parse(e);return!ye(r)||r.parserVersion!==2||typeof r.resolutionFingerprint!="string"||!Array.isArray(r.imports)?null:{parserVersion:2,resolutionFingerprint:r.resolutionFingerprint,imports:r.imports}}catch{return null}}function os(e){return JSON.stringify(e)}function is(e){try{let r=JSON.parse(e);return!ye(r)||typeof r.resolutionFingerprint!="string"||!Array.isArray(r.reExports)?null:{resolutionFingerprint:r.resolutionFingerprint,reExports:r.reExports}}catch{return null}}export{O as a,Ut as b,us as c,ms as d,Ie as e,Vt as f,it as g,Kt as h,at as i,Jt as j,_e as k,Xt as l,E as m,hr as n,Ir as o,Cr as p,Er as q,Rr as r,Lr as s,Fr as t,Ar as u,de as v,Pi as w,rs as x,Ti as y,Ei as z,Ri as A};
|
|
13
|
+
//# sourceMappingURL=chunk-42W3LFUK.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as f}from"./chunk-PLYUVM4F.js";import{a as L}from"./chunk-5H5WTJSD.js";import{d as i,e as b,f as u,l as c}from"./chunk-TD7VKJ2Y.js";import{m as l}from"./chunk-42W3LFUK.js";import{z as a}from"./chunk-7JYHQAH2.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-44T4DUAA.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import{w as G,y as O}from"./chunk-42W3LFUK.js";import{a as F}from"./chunk-7JYHQAH2.js";import{c as I,h as P,j as E,t as g,x as R,y as x}from"./chunk-Q7GBK5T7.js";var _=R({kind:"file-dependency-graph",invalidation:x("file-dependency-graph"),serialize:e=>JSON.stringify(e),deserialize:K}),k=I("file-dep-graph",{clearGroups:["whole-project"]});function X(e,n,r){if(r.length===0)return[];let t=new Set(r),i=M(e),s=new Set;if(n==="forward")for(let o of t)for(let c of i.get(o)??[])t.has(c)||s.add(c);else for(let[o,c]of i)if(!t.has(o))for(let l of t)c.has(l)&&s.add(o);return[...s].sort()}function M(e,n,r={}){let t=r.scipEdges??"all-references",i=r.sourceEdges??"imports-only",s=m(n,t,i);return k.get(e,s,()=>{let o=new Set(F(e,{includeIgnored:!1})),c=E(e),l=0,f=0,a=null,p=!1,u=0,C=0,N=null;return g("file-dep-graph.product",()=>{if(c){let d=_.read(e,s,c);if(d){p=!0,N=d.construction;let S=w(d);return l=d.sourceFileCount,f=d.sourceEdgeCount,u=d.scipEdgeCount,C=S.size,a=d.sourceDependencyFingerprint,S}}let D=i==="none"?{files:[],edges:[],fingerprint:P("no-source-dependency-fallback")}:g("file-dep-graph.source-imports",()=>{let d=j(e,o,n,i);return l=d.files.length,f=d.edges.length,a=d.fingerprint,d},()=>({scope:n??null,sourceEdges:i,files:l,edges:f})),y=new Map,A=(d,S)=>h(e,y,o,d,S);g("file-dep-graph.scip-edges",()=>{for(let d of L(e,n,t))u=(u??0)+1,A(d.from_file,d.to_file)},()=>({scope:n??null,edges:u}));for(let d of D.edges)A(d.fromFile,d.toFile);return C=y.size,c&&(N="full",_.write(e,s,c,{version:2,construction:"full",sourceDependencyFingerprint:D.fingerprint,sourceFileCount:D.files.length,sourceEdgeCount:D.edges.length,scipEdgeCount:u,edgeCount:v(y),graph:b(y)})),y},()=>({scope:n??null,available:c!==null,hit:p,construction:N,files:l,sourceEdges:f,sourceEdgeMode:i,scipEdges:u,graphFiles:C,sourceDependencyFingerprint:a}))})}function Z(e){return J(e,"none")}function ee(e,n="imports-only"){let r=m(void 0,"all-references",n),t=E(e);if(!t)return null;let i=_.read(e,r,t);return i?{cacheKey:r,sourceEdges:n,graph:w(i)}:null}function J(e,n){let r=m(void 0,"all-references",n),t=M(e,void 0,{sourceEdges:n});return{cacheKey:r,sourceEdges:n,graph:t}}function ne(e,n,r,t){let i=n.sourceEdges??"imports-only",s=E(e);if(!s)return!1;let o=t??$(e,n,r);if(!o)return!1;let c=new Set(F(e,{includeIgnored:!1})),l=m(void 0,"all-references",i);return _.write(e,l,s,{version:2,construction:"carried",sourceDependencyFingerprint:null,sourceFileCount:c.size,sourceEdgeCount:null,scipEdgeCount:null,edgeCount:v(o),graph:b(o)}),!0}function $(e,n,r,t=[]){let i=n.sourceEdges??"imports-only",s=m(void 0,"all-references",i);if(n.cacheKey!==s)return null;let o=g("file-dep-graph.carry.indexed-files",()=>new Set(F(e,{includeIgnored:!1}))),c=new Set(r),l=new Map;g("file-dep-graph.carry.reuse",()=>{if(t.length===0)for(let[a,p]of n.graph)c.has(a)||l.set(a,p);else for(let[a,p]of n.graph)if(!(c.has(a)||!o.has(a)))for(let u of p)h(e,l,o,a,u)});let f=g("file-dep-graph.carry.scip-edges",()=>W(e,c,"all-references"));for(let a of f)h(e,l,o,a.from_file,a.to_file);return g("file-dep-graph.carry.source-edges",()=>{for(let a of c)if(o.has(a)){if(i!=="none")for(let p of O(e,a))p.sourcePath&&h(e,l,o,a,p.sourcePath);if(i==="imports-and-reexports")for(let p of G(e,a))p.sourcePath&&h(e,l,o,a,p.sourcePath)}}),l}function j(e,n,r,t){let i=[],s=[];for(let o of n)if(!(r&&!o.includes(r))){i.push(o);for(let c of O(e,o))c.sourcePath&&s.push({fromFile:o,toFile:c.sourcePath});if(t==="imports-and-reexports")for(let c of G(e,o))c.sourcePath&&s.push({fromFile:o,toFile:c.sourcePath})}return{files:i,edges:s,fingerprint:T(i,s)}}function T(e,n){let r=n.map(t=>`${t.fromFile}\0${t.toFile}`).sort();return P(JSON.stringify({files:e,edges:r}))}function m(e,n,r){return`edge-mode-v4:${n}:${r}:${e??"<all>"}`}function b(e){return[...e].map(([n,r])=>[n,[...r].sort()]).sort(([n],[r])=>n.localeCompare(r))}function w(e){return new Map(e.graph.map(([n,r])=>[n,new Set(r)]))}function K(e){let n=JSON.parse(e);return z(n)?n:null}function z(e){if(!e||typeof e!="object")return!1;let n=e;return n.version===2&&(n.construction==="full"||n.construction==="carried")&&(n.sourceDependencyFingerprint===null||typeof n.sourceDependencyFingerprint=="string")&&typeof n.sourceFileCount=="number"&&(n.sourceEdgeCount===null||typeof n.sourceEdgeCount=="number")&&(n.scipEdgeCount===null||typeof n.scipEdgeCount=="number")&&typeof n.edgeCount=="number"&&Array.isArray(n.graph)&&n.graph.every(H)}function v(e){let n=0;for(let r of e.values())n+=r.size;return n}function H(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&Array.isArray(e[1])&&e[1].every(n=>typeof n=="string")}function L(e,n,r){let t=n?"AND d1.relative_path LIKE ?":"",i=n?[`%${n}%`]:[],s=r==="imports-only"?"AND m.role = 2":"AND m.role != 1";return e.all(`SELECT DISTINCT
|
|
2
|
+
d1.relative_path AS from_file,
|
|
3
|
+
d2.relative_path AS to_file
|
|
4
|
+
FROM mentions m
|
|
5
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
6
|
+
JOIN documents d1 ON c.document_id = d1.id
|
|
7
|
+
JOIN global_symbols gs ON m.symbol_id = gs.id
|
|
8
|
+
JOIN (
|
|
9
|
+
SELECT m2.symbol_id, c2.document_id
|
|
10
|
+
FROM mentions m2
|
|
11
|
+
JOIN chunks c2 ON m2.chunk_id = c2.id
|
|
12
|
+
WHERE m2.role = 1
|
|
13
|
+
GROUP BY m2.symbol_id
|
|
14
|
+
) sym_def ON sym_def.symbol_id = gs.id
|
|
15
|
+
JOIN documents d2 ON sym_def.document_id = d2.id
|
|
16
|
+
WHERE d1.id != d2.id
|
|
17
|
+
${s}
|
|
18
|
+
${e.pathExclusionsFor("d1","d2")}
|
|
19
|
+
${t}`,...i)}function W(e,n,r){let t=[...n].sort();if(t.length===0)return[];let i=r==="imports-only"?"AND m.role = 2":"AND m.role != 1",s=[];for(let o=0;o<t.length;o+=500){let c=t.slice(o,o+500),l=c.map(()=>"?").join(", ");s.push(...e.all(`SELECT DISTINCT
|
|
20
|
+
d1.relative_path AS from_file,
|
|
21
|
+
d2.relative_path AS to_file
|
|
22
|
+
FROM documents d1
|
|
23
|
+
CROSS JOIN chunks c
|
|
24
|
+
CROSS JOIN mentions m
|
|
25
|
+
CROSS JOIN global_symbols gs
|
|
26
|
+
CROSS JOIN chunks c2
|
|
27
|
+
CROSS JOIN documents d2
|
|
28
|
+
WHERE d1.relative_path IN (${l})
|
|
29
|
+
AND c.document_id = d1.id
|
|
30
|
+
AND m.chunk_id = c.id
|
|
31
|
+
AND gs.id = m.symbol_id
|
|
32
|
+
AND c2.id = (
|
|
33
|
+
SELECT m2.chunk_id
|
|
34
|
+
FROM mentions m2
|
|
35
|
+
WHERE m2.symbol_id = gs.id AND m2.role = 1
|
|
36
|
+
ORDER BY m2.chunk_id
|
|
37
|
+
LIMIT 1
|
|
38
|
+
)
|
|
39
|
+
AND d2.id = c2.document_id
|
|
40
|
+
AND d1.id != d2.id
|
|
41
|
+
${i}
|
|
42
|
+
${e.pathExclusionsFor("d1","d2")}`,...c))}return s}function h(e,n,r,t,i){if(t===i||e.isIgnored(t)||e.isIgnored(i)||!r.has(i))return;let s=n.get(t);s||(s=new Set,n.set(t,s)),s.add(i)}export{X as a,M as b,Z as c,ee as d,ne as e,$ as f};
|
|
43
|
+
//# sourceMappingURL=chunk-4GAQ6FI4.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-ERCYGVAM.js";var _=`SELECT COUNT(*) AS shared
|
|
2
2
|
FROM (
|
|
3
3
|
SELECT definition_m.symbol_id
|
|
4
4
|
FROM documents definition_d
|
|
@@ -46,4 +46,4 @@ import{a as s}from"./chunk-HUZNZ3H2.js";var _=`SELECT COUNT(*) AS shared
|
|
|
46
46
|
GROUP BY file1, file2
|
|
47
47
|
ORDER BY shared DESC, file1, file2
|
|
48
48
|
LIMIT ?`,...o,n).filter(d=>!e.isIgnored(d.file1)&&!e.isIgnored(d.file2)).map(d=>c(d.file1,d.file2,d.shared))}function h(e,i={}){return f(e,i)}function c(e,i,n){return{file1:e,file2:i,sharedSymbols:n,actionTier:"signal",couplingKind:"shared-symbol-coupling",evidenceReasons:[`${n} symbol(s) are defined in one file and referenced by the other`],recommendation:"Review whether the shared symbol surface is an intentional boundary or hidden coordination pressure before moving code."}}export{l as a,N as b,f as c,h as d};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-4HE7MVWD.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-Z2AWCTN6.js";import{o as h}from"./chunk-AYPDH2LU.js";import{a as g}from"./chunk-5H5WTJSD.js";import{h as d}from"./chunk-TD7VKJ2Y.js";import{a as m}from"./chunk-7JYHQAH2.js";import{B as p}from"./chunk-Q7GBK5T7.js";function D(t,r,n={}){let e=g(t,r);if(!e)return[];let l=!d(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=h(t,e,{semantic:n.semantic,semanticEvidence:R}).map(s=>({relativePath:s.file,line:s.line})),o=b(t,e),f=new Set,a=[];for(let s of[...l,...c,...o]){let u=`${s.relativePath}:${s.line}`;f.has(u)||(f.add(u),a.push(s))}return a}function b(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=S(r.symbol);if(n.length===0)return[];let e=[];for(let i of m(t,{extensions:[".rb"],includeIgnored:!1})){let l=p(t,i);if(!l)continue;let c=l.split(`
|
|
2
2
|
`);for(let o=0;o<c.length;o++){let f=c[o]??"";n.some(a=>new RegExp(`@${a}\\b|\\b${a}:`).test(f))&&e.push({relativePath:i,line:o})}}return e}function S(t){let n=(t.split(":").pop()??t).replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^A-Za-z0-9_]+/g,"_").toLowerCase().replace(/^_+|_+$/g,""),e=n.split("_").filter(Boolean),i=new Set;return n&&i.add(n),e.length>=1&&i.add(e[e.length-1]),e.length>=2&&i.add(e.slice(-2).join("_")),[...i]}export{D as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-4TQU4TX2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-EELPBR7E.js";import{b as i}from"./chunk-YXPUP5G2.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 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};
|
|
2
|
+
//# sourceMappingURL=chunk-56NQAEPJ.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as S}from"./chunk-JT6XX7QY.js";import{a as v,b as f,c as O}from"./chunk-SB25YMEQ.js";import{h as I,u as R,v as p}from"./chunk-AK3PYTIK.js";import{randomUUID as N}from"crypto";import{closeSync as _,fsyncSync as T,linkSync as C,mkdirSync as q,openSync as M,statSync as h,unlinkSync as z,writeSync as G}from"fs";import{dirname as b}from"path";var F="scip-query-process-lock",L=1,y=Object.freeze({wallNow:()=>Date.now(),isProcessAlive:S,readProcessIdentity:O,randomToken:()=>N(),makeDirectory:r=>q(r,{recursive:!0}),openFile:(r,e,t)=>M(r,e,t),writeFile:(r,e,t,i)=>G(r,e,t,i),syncFile:r=>T(r),closeFile:r=>_(r),linkFile:(r,e)=>C(r,e),readFile:r=>I(r,"process lock record"),statFile:r=>{let e=h(r);return{dev:e.dev,ino:e.ino,size:e.size,mtimeMs:e.mtimeMs}},removeFile:r=>z(r)});function Z(r,e){let t=e.runtime??y;t.makeDirectory(b(r));let i;for(let o=0;o<2;o+=1)try{return{kind:"acquired",lock:D(r,e,t),...i?{reclaimed:i}:{}}}catch(n){if(n.code!=="EEXIST")throw n;let s=d(r,{parseLegacy:e.parseLegacy,runtime:t});if(o===0&&K(r,s,{creationGraceMs:e.creationGraceMs,parseLegacy:e.parseLegacy,runtime:t})){i=s;continue}return{kind:"contended",observation:s}}return{kind:"contended",observation:d(r,{parseLegacy:e.parseLegacy,runtime:t})}}function d(r,e={}){let t=e.runtime??y,i,o;try{i=t.statFile(r),o=t.readFile(r)}catch(l){return l.code==="ENOENT"?{state:"missing"}:{state:"malformed"}}let n;try{n=JSON.parse(o)}catch{return{state:"malformed",raw:o,identity:i}}let s=J(n);if(s)return{state:"valid",raw:o,identity:i,record:s,owner:j(s),parsed:n};let c=e.parseLegacy?.(n)??null;return c?{state:"legacy",raw:o,identity:i,owner:c,parsed:n}:{state:"malformed",raw:o,identity:i,parsed:n}}function J(r){if(!r||typeof r!="object"||Array.isArray(r))return null;let e=r;if(e.protocol!==F||e.version!==L||typeof e.kind!="string"||e.kind.trim()===""||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0||typeof e.token!="string"||e.token.trim()===""||typeof e.startedAt!="string"||!Number.isFinite(Date.parse(e.startedAt))||e.detail!==void 0&&(typeof e.detail!="object"||e.detail===null||Array.isArray(e.detail)))return null;let t=e.processIdentity===void 0?null:v(e.processIdentity);return e.processIdentity!==void 0&&(!t||t.pid!==e.pid)?null:{protocol:F,version:L,kind:e.kind,pid:e.pid,token:e.token,...t?{processIdentity:t}:{},startedAt:e.startedAt,...e.detail?{detail:e.detail}:{}}}function K(r,e,t={}){let i=t.runtime??y;if(!P(e,i))return!1;let o=$(`${r}.reclaim`,i);if(!o)return!1;try{let n=d(r,{parseLegacy:t.parseLegacy,runtime:i});return!x(e,n)||!P(n,i)?!1:g(r,i)}finally{o.release()}}function D(r,e,t){let i=e.directoryDurability??"durable",o=e.pid??process.pid,n=t.randomToken(),s=e.processIdentity===void 0?t.readProcessIdentity(o):e.processIdentity,c={protocol:F,version:L,kind:e.kind,pid:o,token:n,...s?{processIdentity:s}:{},startedAt:new Date(t.wallNow()).toISOString(),...e.detail?{detail:e.detail}:{}},l=`${r}.${n}.candidate`,k=t.openFile(l,"wx",384),u;try{R(k,Buffer.from(`${JSON.stringify(c)}
|
|
2
|
+
`),t,"process lock"),t.syncFile(k)}catch(a){u=a}try{t.closeFile(k)}catch(a){u??=a}if(u!==void 0)throw m(l,t),u;try{t.linkFile(l,r)}catch(a){throw m(l,t),a}if(m(l,t),i==="durable")try{A(b(r),t)}catch(a){throw U(r,c,t),a}let w=!1;return{path:r,record:c,release:()=>w?!1:(w=!0,E(r,c,t,i))}}function U(r,e,t=y){return E(r,e,t,"durable")}function E(r,e,t,i){let o=d(r,{runtime:t});return o.state!=="valid"||!o.record||o.record.pid!==e.pid||o.record.token!==e.token||e.processIdentity&&(!o.record.processIdentity||!f(e.processIdentity,o.record.processIdentity))?!1:g(r,t,i)}function $(r,e){for(let t=0;t<2;t+=1)try{return D(r,{kind:"reclaim-guard",runtime:e},e)}catch(i){if(i.code!=="EEXIST")return null;let o=d(r,{runtime:e});if(t>0||!P(o,e))return null;let n=d(r,{runtime:e});if(!x(o,n)||!g(r,e))return null}return null}function P(r,e){if(r.state==="missing")return!1;if(r.owner){if(!e.isProcessAlive(r.owner.pid))return!0;if(!r.owner.processIdentity)return!1;let t=e.readProcessIdentity(r.owner.pid);return t!==null&&!f(r.owner.processIdentity,t)}return!1}function x(r,e){return r.state===e.state&&r.raw===e.raw&&r.identity!==void 0&&e.identity!==void 0&&r.identity.dev===e.identity.dev&&r.identity.ino===e.identity.ino&&r.identity.size===e.identity.size&&r.identity.mtimeMs===e.identity.mtimeMs}function j(r){return{pid:r.pid,...r.processIdentity?{processIdentity:r.processIdentity}:{}}}function A(r,e){let t;try{t=e.openFile(r,"r")}catch(i){if(p(i,process.platform))return;throw i}try{e.syncFile(t)}catch(i){if(!p(i,process.platform))throw i}finally{e.closeFile(t)}}function g(r,e,t="durable"){try{return e.removeFile(r),t==="durable"&&A(b(r),e),!0}catch{return!1}}function m(r,e){try{e.removeFile(r)}catch{}}export{y as a,Z as b,d as c,K as d};
|
|
3
|
+
//# sourceMappingURL=chunk-57N6LN2A.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{B as M,c as N,d as _,e as w,g as k,h as A,i as z,n as f,o as S,r as R}from"./chunk-
|
|
1
|
+
import{B as M,c as N,d as _,e as w,g as k,h as A,i as z,n as f,o as S,r as R}from"./chunk-TD7VKJ2Y.js";import{b as B}from"./chunk-7JYHQAH2.js";import{c as O}from"./chunk-Q7GBK5T7.js";var T=O("symbol-resolution",{clearGroups:[]});function he(e,n){return G(e,n).match}function G(e,n){return T.get(e,n,()=>{let t=W(e,n.trim()).filter(i=>!e.isIgnored(i.relative_path));if(t.length>0)return L(e,t);let o=P(e,n);if(o&&!e.isIgnored(o.relative_path))return L(e,[o]);let r=H(e,n);if(r.length>0)return L(e,r);let s=U(e,n);return s.length>0?L(e,s):J(e,n)})}function H(e,n){let t=n.trim().replace(/\(\)$/u,""),o=t.lastIndexOf(":");if(o<=0||o===t.length-1||t.startsWith("local:"))return[];let r=t.slice(o+1);if(!/^[\p{L}_$][\p{L}\p{N}_$]*$/u.test(r))return[];let s=[`/${r}().`,`/${r}.`,`/${r}#`,`#${r}().`,`#${r}.`,`/${r}/`],i=`gs.display_name = ? OR ${s.map(()=>"instr(gs.symbol, ?) > 0").join(" OR ")}`,a=[r,...s],l=f(e,{where:i,params:a,orderBy:"d.relative_path, der.start_line",limit:200}),u=l.length>0?[]:S(e,{where:i,params:a,orderBy:"d.relative_path, start_line",limit:200}),p=R(l,u).filter(m=>!e.isIgnored(m.relative_path)).filter(m=>_(m.symbol).replace(/\(\)$/u,"")===t);return[...new Map(p.map(m=>[`${m.symbol}\0${m.relative_path}`,m])).values()]}function U(e,n){let t=Q(n),o=E(t);if(!o)return[];let r=`%${o.path}%`,s=o.leaf;return X(e,r,s,t)}function X(e,n,t,o){let r=R([],[...Y(e,n,t),...Z(e,n,t)]).filter(s=>!e.isIgnored(s.relative_path)).filter(s=>C(s,o)>1);return r.sort((s,i)=>C(i,o)-C(s,o)||s.end_line-s.start_line-(i.end_line-i.start_line)||s.start_line-i.start_line||s.symbol.localeCompare(i.symbol)),r}function Y(e,n,t){return f(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function Z(e,n,t){return S(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function J(e,n){let t=Q(n),o=ae(n),r=oe(e,o),s=se(r,n,t).filter(a=>!e.isIgnored(a.relative_path));if(s.length>0)return L(e,s);let i=[];for(let a of r){if(e.isIgnored(a.relative_path))continue;let l=re(a,n,t,o);l<=0||i.push({row:a,score:l})}return i.sort((a,l)=>l.score-a.score||a.row.end_line-a.row.start_line-(l.row.end_line-l.row.start_line)||a.row.relative_path.localeCompare(l.row.relative_path)||a.row.symbol.localeCompare(l.row.symbol)),L(e,i.map(a=>a.row))}function L(e,n){let t=n.map(r=>M(e,r)),o=t[0]??null;return{match:o,candidates:o?V(t,o):[],total:t.length}}function V(e,n){let t=new Set([`${n.symbolId}:${n.relativePath}:${n.startLine}`]),o=[];for(let r of e){let s=`${r.symbolId}:${r.relativePath}:${r.startLine}`;if(!t.has(s)&&(t.add(s),o.push({symbol:r.symbol,shortName:_(r.symbol),relativePath:r.relativePath,startLine:r.startLine}),o.length>=5))break}return o}function P(e,n){let t=n.match(/^(.+):(\d+)(?:-(\d+))?$/);if(!t)return;let[,o,r,s]=t,i=B(e,o,{allowMultiple:!1,requirePathMatch:!0})[0]?.relativePath;if(!i)return;let a=Math.max(0,parseInt(r,10)-1),l=s?Math.max(a,parseInt(s,10)-1):a;return ee(e,i,a,l)??te(e,i,a,l)}function ee(e,n,t,o){return f(e,{where:"d.relative_path = ? AND der.start_line <= ? AND der.end_line >= ?",params:[n,t,o],orderBy:"(der.end_line - der.start_line) ASC",limit:1})[0]}function te(e,n,t,o){return S(e,{where:"d.relative_path = ? AND c.start_line <= ? AND c.end_line >= ?",params:[n,t,o],orderBy:"(MAX(c.end_line) - MIN(c.start_line)) ASC",limit:1})[0]}function be(e,n){let t=W(e,n).find(o=>!e.isIgnored(o.relative_path));return t?M(e,t):null}function W(e,n){let t=f(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, der.start_line"}),o=t.length>0?[]:S(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, start_line"});return R(t,o)}function Se(e,n){if("symbol"in n&&"relativePath"in n)return n;let t=ne(e,n.symbolId)[0];return t?M(e,t):null}function ne(e,n){let t=f(e,{where:"gs.id = ?",params:[n],orderBy:"der.start_line, der.end_line"}),o=S(e,{where:"gs.id = ?",params:[n],orderBy:"start_line, end_line"});return R(t,o)}function oe(e,n){let t=n.map(()=>"(gs.symbol LIKE ? OR d.relative_path LIKE ? OR COALESCE(gs.display_name, '') LIKE ?)"),o=n.flatMap(a=>{let l=`%${a}%`;return[l,l,l]}),r=t.join(`
|
|
2
2
|
AND `),s=f(e,{where:r,params:o,limit:200}),i=S(e,{where:r,params:o,limit:200});return R(s,i)}function re(e,n,t,o){let r=n.trim(),s=t,i=s.replace(/\(\)$/,""),a=n.toLowerCase(),l=t.toLowerCase(),u=l.replace(/\(\)$/,""),p=e.symbol,m=_(e.symbol),y=w(e.symbol),g=e.display_name??"",$=e.symbol.toLowerCase(),d=m.toLowerCase(),h=y.toLowerCase(),x=g.toLowerCase(),b=e.relative_path.toLowerCase(),j=/[/:.]/.test(t),I=E(t),v=I?.leaf.toLowerCase(),c=0;return(p===r||p===s)&&(c+=1150),(m===r||m===s)&&(c+=1100),g===i&&(c+=1180),y===i&&(c+=1160),(`${y}()`===r||`${y}()`===s)&&(c+=955),($===a||$===l)&&(c+=1e3),(d===a||d===l)&&(c+=950),(b===a||b===l)&&(c+=925),(b.endsWith(`/${l}`)||b.endsWith(`/${a}`))&&(c+=875),x===u&&(c+=850),h===u&&(c+=825),(`${h}()`===a||`${h}()`===l)&&(c+=820),(d.endsWith(`:${l}`)||d.endsWith(`:${u}`)||d.endsWith(`:${u}()`))&&(c+=800),$.includes(l)&&(c+=120),d.includes(l)&&(c+=140),b.includes(l)&&(c+=140),x.includes(l)&&(c+=110),o.every(q=>{let D=q.toLowerCase();return $.includes(D)||d.includes(D)||b.includes(D)||x.includes(D)})&&(c+=100+o.length*15),I&&b.includes(I.path.toLowerCase())&&(c+=360,v&&(h===v||`${h}()`===v||`${h}()`==`${v}()`)&&(c+=700),k(e.symbol)&&(c+=180)),A(e.symbol)&&h===u&&(c+=60),!j&&z(e.symbol)&&(c-=160),c-=Math.min(50,Math.max(0,e.end_line-e.start_line)),c}function E(e){let n=e.trim().replace(/\\/g,"/"),t=n.lastIndexOf("/");if(t<=0||t===n.length-1)return null;let o=n.slice(t+1).replace(/\(\)$/,"");return!o||o.includes(".")?null:{path:n.slice(0,t),leaf:o}}function Q(e){return e.trim().replace(/\(\)$/,"").replace(/\(.*$/,"")}function ae(e){let n=Q(e),t=n.split(/[^A-Za-z0-9_]+/).map(o=>o.trim()).filter(o=>o.length>0);return t.length>0?[...new Set(t)]:[n]}function se(e,n,t){let o=n.trim(),r=e.filter(a=>{let l=_(a.symbol),u=w(a.symbol),p=(a.display_name??"").trim();return a.symbol===o||l===o||l===t||u===o||u===t||`${u}()`===o||p===o||p===t||`${p}()`===o||C(a,t)>1||a.relative_path===o});if(r.length===0)return[];let s=t.replace(/\(\)$/u,""),i=r.filter(a=>w(a.symbol)===s);if(i.length>0){i.sort((l,u)=>F(l,u,t));let a=i.filter(l=>A(l.symbol));return a.length>0?a:i}return r.sort((a,l)=>F(a,l,t)),r}function F(e,n,t){return C(n,t)-C(e,t)||e.end_line-e.start_line-(n.end_line-n.start_line)||e.relative_path.localeCompare(n.relative_path)||e.symbol.localeCompare(n.symbol)}function C(e,n){let t=E(n);if(!t)return 0;let o=e.relative_path.toLowerCase(),r=w(e.symbol).toLowerCase(),s=t.path.toLowerCase(),i=t.leaf.toLowerCase();return o.includes(s)?r!==i?1:k(e.symbol)?N(e.symbol)===null?5:4:N(e.symbol)===null?3:2:0}function ge(e,n,t=5){let o=K(n);if(!o)return[];let r=f(e,{where:"1 = 1",orderBy:"d.relative_path, der.start_line",limit:5e3}),s=new Map;for(let i of r){if(e.isIgnored(i.relative_path))continue;let a=_(i.symbol),l=w(i.symbol),u=i.display_name??l,p=[a,l,u].filter(g=>g.trim().length>0),m=Math.min(...p.map(g=>ie(K(g),o))),y=s.get(a);(!y||m<y.distance)&&s.set(a,{shortName:a,distance:m})}return[...s.values()].sort((i,a)=>i.distance-a.distance||i.shortName.localeCompare(a.shortName)).slice(0,t).map(i=>i.shortName)}function K(e){return Q(e).toLowerCase().replace(/[^a-z0-9_]+/g,"")}function ie(e,n){if(e===n)return 0;if(e.length===0)return n.length;if(n.length===0)return e.length;let t=Array.from({length:n.length+1},(o,r)=>r);for(let o=0;o<e.length;o++){let r=[o+1];for(let s=0;s<n.length;s++){let i=e[o]===n[s]?0:1;r[s+1]=Math.min(r[s]+1,t[s+1]+1,t[s]+i)}t=r}return t[n.length]}export{he as a,G as b,be as c,Se as d,ge as e};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-5H5WTJSD.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{g as x}from"./chunk-
|
|
1
|
+
import{g as x}from"./chunk-RNKPYYYE.js";import{k as m,x as b}from"./chunk-C7IJMOFP.js";var y=new Set(["call","call_expression","command","command_call","function_call_expression","invocation_expression","macro_invocation","method_call","method_invocation","new_expression","object_creation_expression"]);function h(n,e,t,r){if(!Number.isSafeInteger(t)||t<0)return null;if(!Number.isSafeInteger(r)||r<0)throw new RangeError(`contextLines must be a non-negative safe integer; received ${r}`);let i=m(n,e);if(i.length===0||t>=i.length)return null;let o=Math.max(0,t-r),c=Math.min(i.length-1,t+r);return{relativePath:e,startLine:o,endLine:c,focusLine:t,source:i.slice(o,c+1).join(`
|
|
2
2
|
`)}}function F(n,e,t,r,i){let o=h(n,e,t,r);if(!o)return null;let c=b(n,e)?.rootNode??null;if(!c)return{...o,kind:"bounded-context"};let s=_(c,t,i);if(s.length!==1)return{...o,kind:s.length===0?"non-call-reference":"bounded-context"};let l=s[0],a=m(n,e),u=Math.max(0,l.startPosition.row),S=l.endPosition.column===0?l.endPosition.row-1:l.endPosition.row,p=Math.min(a.length-1,Math.max(u,S));return{relativePath:e,startLine:u,endLine:p,focusLine:t,source:a.slice(u,p+1).join(`
|
|
3
3
|
`),kind:"complete-call-expression"}}function L(n,e,t,r,i=6){if(!Number.isSafeInteger(r)||r<=0)throw new RangeError(`maxLines must be a positive safe integer; received ${r}`);let o=m(n,e);if(o.length===0||t<0||t>=o.length)return null;let c=x(n,e,t);if(!c){let d=h(n,e,t,i);return d?{...d,unitType:null,unitStartLine:d.startLine,unitEndLine:d.endLine,omittedLines:0}:null}let s=c.startLine,l=c.endLine,a=l-s+1,u=Math.min(a,r),S=t-s-Math.floor(u/2),p=Math.max(0,Math.min(a-u,S)),f=s+p,g=f+u-1;return{relativePath:e,startLine:f,endLine:g,focusLine:t,source:o.slice(f,g+1).join(`
|
|
4
4
|
`),unitType:c.type,unitStartLine:s,unitEndLine:l,omittedLines:a-u}}function _(n,e,t){let r=[];return N(n,e,t,r),r.filter(i=>!r.some(o=>o!==i&&o.startIndex>=i.startIndex&&o.endIndex<=i.endIndex))}function N(n,e,t,r){if(M(n,e)){y.has(n.type)&&w(n)===t&&r.push(n);for(let i of n.namedChildren)N(i,e,t,r)}}function w(n){let e=n.childForFieldName("function")??n.childForFieldName("constructor")??n.childForFieldName("method")??n.childForFieldName("name")??n.namedChild(0);return e?e.text.match(/[\p{L}_$][\p{L}\p{N}_$!?-]*/gu)?.at(-1)??null:null}function M(n,e){return n.startPosition.row<=e&&n.endPosition.row>=e}export{F as a,L as b};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-5YRQIE2B.js.map
|