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,2 @@
|
|
|
1
|
+
import{B as I,i as Q,q as X,z as P}from"./chunk-WN3TCGJ4.js";import{a as L,b as G,d as R}from"./chunk-K3XFWJI2.js";import{a as d,f as w,g as B,h as p}from"./chunk-H5EXS3HM.js";import{F as U,U as H,V as W,a as V,fa as Y,g as F,h as S,o as O,pa as J,q,ra as K,ua as z}from"./chunk-AK3PYTIK.js";import{existsSync as Re}from"fs";import{randomUUID as ze}from"crypto";import{isAbsolute as Xe,join as Pe,relative as Ze,resolve as et}from"path";var f=1,m=2,ue="./node_modules/scip-query/docs/schemas/project-config.schema.json";function Z(e){let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch(c){return{kind:"malformed",reason:`invalid JSON: ${c instanceof Error?c.message:String(c)}`}}if(!d(t))return{kind:"malformed",reason:"project config must be a JSON object"};let n=t.schemaVersion;if(n!==void 0&&!Number.isInteger(n))return{kind:"malformed",reason:"schemaVersion must be an integer"};let r=n===void 0?f:n;if(r!==f&&r!==m)return{kind:"unsupported",schemaVersion:r,direction:r<f?"older":"future"};let s=t.$schema;if(s!==void 0&&(typeof s!="string"||s.trim()===""))return{kind:"malformed",reason:"$schema must be a non-empty string when present"};let i=ee(t),a=r!==m||typeof t.$schema!="string";return r===f?{kind:"legacy",sourceVersion:f,config:i,needsMigration:a}:{kind:"supported",sourceVersion:m,config:i,needsMigration:a}}function ee(e){let t=e,{$schema:n,schemaVersion:r,...s}=t;return{$schema:typeof n=="string"&&n.trim()!==""?n:ue,schemaVersion:m,...s}}import{createHash as pe}from"crypto";var k=1,te=2,ne=1,_=1,E="sha256";function Be(e,t,n){if(!p(e)||!w(t))throw new Error("Observation identity requires a bounded projection name and positive projection version.");return{schemaVersion:ne,canonicalizationVersion:_,hashAlgorithm:E,projection:{name:e,version:t},digest:pe(E).update(le(e,t,n)).digest("hex")}}function le(e,t,n){return`{"canonicalizationVersion":${_},"projection":${JSON.stringify(e)},"projectionVersion":${t},"value":${JSON.stringify(n)}}`}function fe(e){if(!d(e))return{kind:"malformed",reason:"observation receipt must be an object"};let t=e.schemaVersion;if(!Number.isInteger(t))return{kind:"malformed",reason:"observation receipt schemaVersion must be an integer"};if(t===k)return ge(e)?{kind:"legacy",schemaVersion:k,receipt:e}:{kind:"malformed",reason:"observation receipt v1 fields are malformed or contradictory"};if(t===te)return he(e)?{kind:"supported",schemaVersion:te,receipt:e}:{kind:"malformed",reason:"observation receipt v2 facts are malformed or contradictory"};let n=t;return{kind:"unsupported",schemaVersion:n,direction:n<k?"older":"future"}}function re(e){let t=fe(e);return t.kind==="legacy"||t.kind==="supported"}function me(e,t){return e.schemaVersion===t.schemaVersion&&e.canonicalizationVersion===t.canonicalizationVersion&&e.hashAlgorithm===t.hashAlgorithm&&e.projection.name===t.projection.name&&e.projection.version===t.projection.version}function ge(e){if(!d(e))return!1;let t=e.index,n=e.worktree;return oe(e.observedAt)&&p(e.projectIdentity)&&Oe(e.authorityKind)&&(t===void 0||d(t)&&p(t.generationIdentity)&&(t.source==="immutable"||t.source==="legacy")&&(t.alignment==="not-certified"||t.alignment==="leased"))&&(n===void 0||d(n)&&p(n.identity)&&typeof n.clean=="boolean"&&(n.headCommit===void 0||p(n.headCommit))&&(n.treeOid===void 0||p(n.treeOid)))&&Se(e.authorityKind,t,n)}function he(e){if(!d(e))return!1;let t=e.facts,n=e.observedSources,r=e.stabilityProofs;if(!oe(e.observedAt)||!d(t)||!Array.isArray(n)||n.length===0||!n.every(be)||!A(n,o=>o.kind)||!Array.isArray(r)||!r.every(ve)||!A(r,o=>o.source)||r.some(o=>!n.some(u=>u.kind===o.source))||!r.every(o=>xe(o,t))||["collaborationDomain","repositoryLineage","workspaceInstance","wholeContent"].some(o=>t[o]!==void 0&&!l(t[o])))return!1;let i=t.relevantInputs;if(i!==void 0&&(!Array.isArray(i)||!i.every(ye)||!A(i,o=>`${o.subject}\0${o.identity.projection.name}`)))return!1;let a=t.index;if(a!==void 0&&(!d(a)||!l(a.generation)||a.inputs!==void 0&&!l(a.inputs)||a.source!=="immutable"&&a.source!=="legacy"))return!1;let c=e.diagnostics;return(c===void 0||d(c)&&(c.clean===void 0||typeof c.clean=="boolean")&&(c.headCommit===void 0||p(c.headCommit))&&(c.treeOid===void 0||p(c.treeOid)))&&Ce(t,n)}function l(e){return!d(e)||!d(e.projection)?!1:e.schemaVersion===ne&&e.canonicalizationVersion===_&&e.hashAlgorithm===E&&p(e.projection.name)&&w(e.projection.version)&&B(e.digest)}function ye(e){return d(e)&&p(e.subject)&&l(e.identity)}function be(e){return d(e)&&ie(e.kind)&&(e.identity===void 0||l(e.identity))}function ve(e){return d(e)&&ie(e.source)&&(e.kind==="immutable"||e.kind==="fixed-snapshot"||e.kind==="bracketed"||e.kind==="not-established"||e.kind==="invalidated")}function Ce(e,t){let n=e.index,r=t.find(o=>o.kind==="index-generation");if(r){if(!d(n)||!l(n.generation)||r.identity&&!j(r.identity,n.generation))return!1}else if(n!==void 0)return!1;let s=e.workspaceInstance,i=t.find(o=>o.kind==="live-workspace");if(i?.identity&&(!l(s)||!j(i.identity,s)))return!1;let a=e.wholeContent,c=t.find(o=>o.kind==="repository-snapshot");return!(c?.identity&&(!l(a)||!j(c.identity,a)))}function xe(e,t){return e.kind==="not-established"||e.kind==="invalidated"?!0:e.source==="index-generation"?e.kind==="immutable"&&d(t.index)&&t.index.source==="immutable":e.source==="repository-snapshot"?e.kind==="fixed-snapshot":e.source==="live-workspace"?e.kind==="bracketed":!1}function j(e,t){return me(e,t)&&e.digest===t.digest}function Se(e,t,n){return e==="index-worktree"?t!==void 0&&n!==void 0:e==="index-only"?t!==void 0&&n===void 0:e==="worktree-only"?t===void 0&&n!==void 0:e==="process-local"&&t===void 0&&n===void 0}function Oe(e){return e==="index-worktree"||e==="index-only"||e==="worktree-only"||e==="process-local"}function ie(e){return e==="index-generation"||e==="repository-snapshot"||e==="live-workspace"||e==="process"}function oe(e){return typeof e=="string"&&!Number.isNaN(Date.parse(e))}function A(e,t){return new Set(e.map(t)).size===e.length}function He(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e;return t.kind==="automated-adjudication"&&t.policyVersion===1&&(t.decidedBy==="agent"||t.decidedBy==="human")&&G.includes(t.reasonCode)&&Array.isArray(t.evidence)&&t.evidence.length>0&&t.evidence.every(we)&&(t.observation===void 0||re(t.observation))&&!!t.invalidateOn&&typeof t.invalidateOn=="object"&&typeof t.invalidateOn.targetContentChange=="boolean"&&typeof t.invalidateOn.detectorMajorChange=="boolean"}function we(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e;return(t.kind==="source"||t.kind==="config"||t.kind==="test"||t.kind==="graph")&&typeof t.referent=="string"&&t.referent.trim()!==""&&typeof t.claim=="string"&&t.claim.trim()!==""&&(t.contentHash===void 0||/^[a-f0-9]{64}$/u.test(t.contentHash))&&(t.generation===void 0||typeof t.generation=="string"&&t.generation.length>0)}var h=".scipquery.json",Ie=2e3,se=5e3,ae=se,ke=15*6e4,ce={enabled:!0,windowMs:15*6e4,maxRebuilds:2,maxEstimatedWriteBytes:1024*1024*1024},je={enabled:!1,autoStart:!1,allowExpensiveRebuild:!1,debounceMs:Ie,cooldownMs:ae,gitPollMs:2e3,idleTimeoutMs:ke,autoRefresh:!0,ignore:[],resourceBudget:ce};var it=new Set(L);function ot(e){let t=Pe(e,h);if(!Re(t))return{};let n;try{n=F(t,{maxBytes:V,inputKind:"scip-query project config"})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`unable to read ${h} at ${t}: ${s}`,{cause:r})}return Ae(Z(n),t,"read").config}function st(e){return{...je,...e.watch,cooldownMs:Math.max(se,e.watch?.cooldownMs??ae),resourceBudget:{...ce,...e.watch?.resourceBudget}}}function Ae(e,t,n){if(e.kind==="legacy"||e.kind==="supported")return e;if(e.kind==="malformed"){let s=n==="read"?`invalid ${h} at ${t}: ${e.reason}`:`Cannot update ${t}: the latest project config is ${e.reason}.`;throw new Error(`${s} The file was left untouched.`)}let r=n==="read"?`invalid ${h} at ${t}`:`Cannot update ${t}: the latest project config is invalid`;throw new Error(`${r} (unsupported ${e.direction} schemaVersion ${e.schemaVersion}; this scip-query reads legacy v${f} and current v${m}). Upgrade scip-query before retrying; the file was left untouched.`)}import{existsSync as y,lstatSync as Ee}from"fs";import{resolve as _e}from"path";function xt(e,t,n,r={}){let s=new Date().toISOString();if(!y(n.dbPath))return{state:"missing",checkedAt:s,metaPath:n.metaPath,reason:"No SQLite index database exists.",remedy:"Run: scip-query reindex"};if(!y(n.metaPath))return{state:"unknown",checkedAt:s,metaPath:n.metaPath,reason:"No reindex metadata file exists next to the SQLite index.",remedy:"Run: scip-query reindex"};try{let i=R(S(n.metaPath,"reindex metadata"));if(i.kind==="unsupported")return{state:"unknown",checkedAt:s,metaPath:n.metaPath,reason:`Reindex metadata version ${i.version} is unsupported by this scip-query build.`,remedy:"Upgrade scip-query or run: scip-query reindex"};if(i.kind==="malformed")return{state:"unknown",checkedAt:s,metaPath:n.metaPath,reason:`Could not decode reindex metadata: ${i.reason}`,remedy:"Run: scip-query reindex"};let a=i.metadata,c=t.languages??Q(e),o=a.fingerprint,u=n.cacheDir&&r.gitContext&&I(r.gitContext,n.cacheDir,o)?o:void 0,g=n.cacheDir&&r.gitContext&&u&&Ne(u,c,t)&&Te(e,u,t)?r.gitObservation?.context===r.gitContext?r.gitContext:H(r.gitContext):void 0,de=r.gitObservation&&r.gitObservation.context===r.gitContext?r.gitObservation.projectFileInventorySequence:void 0,M=g?.clean&&W(e,void 0,{cachedInventoryAfterSequence:de})?g:void 0,b=n.cacheDir&&M&&u&&I(M,n.cacheDir,u)?u:Me(e,c,t),N=[...a.indexedLanguages??[]].sort(),v=i.capabilities.publishableGeneration&&q(O(a.fingerprint),b)&&JSON.stringify(N)===JSON.stringify(b.languages),C=P(n.dbPath,n.metaPath),T=C.state==="invalid"||C.state==="drifted",x=v?X(n.dbPath,b,N):void 0,$=x?.state==="incomplete",D=v&&!T&&!$;return{state:D?"fresh":"stale",checkedAt:s,metaPath:n.metaPath,updatedAt:a.updatedAt,lastRefresh:a.lastRefresh,reason:T?`SQLite generation requires repair: ${C.reason}`:$?`SQLite generation is missing ${x.missingDocumentCount} indexed source document(s): ${x.missingPaths.join(", ")}`:v?"Index metadata fingerprint matches current source files.":"Index metadata fingerprint differs from current source files.",remedy:D?void 0:"Run: scip-query reindex"}}catch(i){return{state:"unknown",checkedAt:s,metaPath:n.metaPath,reason:`Could not read reindex metadata: ${i instanceof Error?i.message:String(i)}`,remedy:"Run: scip-query reindex"}}}function St(e){let t=new Date().toISOString();if(!y(e.dbPath))return{state:"missing",checkedAt:t,metaPath:e.metaPath,reason:"No SQLite index database exists.",remedy:"Run: scip-query reindex"};if(!y(e.metaPath))return{state:"unknown",checkedAt:t,metaPath:e.metaPath,reason:"No reindex metadata file exists next to the SQLite index.",remedy:"Run: scip-query reindex"};try{let n=R(S(e.metaPath,"reindex metadata"));if(n.kind==="unsupported")return{state:"unknown",checkedAt:t,metaPath:e.metaPath,reason:`Reindex metadata version ${n.version} is unsupported by this scip-query build.`,remedy:"Upgrade scip-query or run: scip-query reindex"};if(n.kind==="malformed")return{state:"unknown",checkedAt:t,metaPath:e.metaPath,reason:`Could not decode reindex metadata: ${n.reason}`,remedy:"Run: scip-query reindex"};let r=n.metadata,s=[...r.indexedLanguages??[]].sort(),i=O(r.fingerprint),a=[...i?.languages??[]].sort(),c=n.capabilities.publishableGeneration&&i!==null&&JSON.stringify(s)===JSON.stringify(a),o=P(e.dbPath,e.metaPath),u=o.state==="invalid"||o.state==="drifted",g=c&&!u;return{state:g?"fresh":"stale",checkedAt:t,metaPath:e.metaPath,updatedAt:r.updatedAt,lastRefresh:r.lastRefresh,reason:u?`SQLite generation requires repair: ${o.reason}`:c?"Watcher accepted the newly published index generation with no later changes pending.":"Published index metadata is not a complete queryable generation.",remedy:g?void 0:"Run: scip-query reindex"}}catch(n){return{state:"unknown",checkedAt:t,metaPath:e.metaPath,reason:`Could not read reindex metadata: ${n instanceof Error?n.message:String(n)}`,remedy:"Run: scip-query reindex"}}}function Me(e,t,n){return K(e,t,{pnpmWorkspaces:n.indexer?.typescript?.pnpmWorkspaces,typescriptProjectMode:n.indexer?.typescript?.projectMode,typescriptProjects:n.indexer?.typescript?.projects,clojureConfigPath:n.indexer?.clojure?.configPath})}function Ne(e,t,n){let r=$e(t,n);return e.version===r.version&&JSON.stringify([...e.languages].sort())===JSON.stringify(r.languages)&&e.pnpmWorkspaces===r.pnpmWorkspaces&&e.typescriptProjectMode===r.typescriptProjectMode&&JSON.stringify([...e.typescriptProjects].sort())===JSON.stringify(r.typescriptProjects)&&e.clojureConfigPath===r.clojureConfigPath}function Te(e,t,n){if(!(t.languages.includes("typescript")||!!t.clojureConfigPath))return!0;let s=J(e);if(t.clojureConfigPath){let i=U(t.clojureConfigPath);if(!s.includes(i))return!1;try{if(!Ee(_e(e,i)).isFile())return!1}catch{return!1}}return!t.languages.includes("typescript")||Y(e,n.indexer?.typescript?.projectMode,n.indexer?.typescript?.projects??[],s)}function $e(e,t){return z(e,{pnpmWorkspaces:t.indexer?.typescript?.pnpmWorkspaces,typescriptProjectMode:t.indexer?.typescript?.projectMode,typescriptProjects:t.indexer?.typescript?.projects,clojureConfigPath:t.indexer?.clojure?.configPath})}export{te as a,Be as b,He as c,ot as d,st as e,xt as f,St as g};
|
|
2
|
+
//# sourceMappingURL=chunk-QWKHW6VZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-7KSO2OAP.js";import{F as o}from"./chunk-AK3PYTIK.js";function g(e,r){return s(e).filter(t=>c({pattern:r,relativePath:t})).map(t=>({relativePath:t}))}function c(e,r){let t=typeof e=="string"?{pattern:e,relativePath:r}:e;if(typeof t.pattern!="string"||typeof t.relativePath!="string")throw new TypeError("pathMatchesGlob requires pattern and relativePath.");let n=o(t.pattern),a=o(t.relativePath);if(!/[*?]/.test(n))return a.includes(n);let l=n.includes("/")?n:`**/${n}`;return i(l.split("/"),a.split("/"))}function i(e,r){if(e.length===0)return r.length===0;let[t,...n]=e;return t==="**"?i(n,r)||r.length>0&&i(e,r.slice(1)):r.length===0||!f(t??"",r[0]??"")?!1:i(n,r.slice(1))}function f(e,r){let t="^";for(let n of e)n==="*"?t+="[^/]*":n==="?"?t+="[^/]":t+=p(n);return t+="$",new RegExp(t).test(r)}function p(e){return/[\\^$.*+?()[\]{}|]/.test(e)?`\\${e}`:e}export{g as a,c as b};
|
|
2
|
+
//# sourceMappingURL=chunk-R6M456QG.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{b as L}from"./chunk-
|
|
1
|
+
import{b as L}from"./chunk-WOOAY3PA.js";import{d as S}from"./chunk-QKT4UI2Y.js";import{a as h,b as T}from"./chunk-Q6T2CAJL.js";import{a as C}from"./chunk-DHEQMPLW.js";import{A as I,d as f,i as w,t as F}from"./chunk-TD7VKJ2Y.js";import{m as v}from"./chunk-42W3LFUK.js";import{J as x}from"./chunk-7JYHQAH2.js";import{D as g}from"./chunk-Q7GBK5T7.js";function z(e,t,n){let r=[],o=[],s=new Map;for(let i of[...e].sort(n)){let l=i.channel??"default",d=t[l]??Number.MAX_SAFE_INTEGER,a=s.get(l)??0;if(a>=d){o.push(i);continue}r.push(i),s.set(l,a+1)}return{selected:r,omitted:o}}function k(e,t,n,r,o=!1){let s=[...e],i=[],l=new Set,d=0;for(;s.length>0&&i.length<t;){let a=s.filter(u=>d+u.evidenceCharacters<=n||o&&i.length===0);if(a.length===0)break;let c=a.filter(u=>u.roles.includes("location")||u.roles.includes("definition")).sort(r);a.sort((u,p)=>R(p,l)-R(u,l)||r(u,p));let m=c[0]??a[0];i.push(m),d+=m.evidenceCharacters;for(let u of P(m))l.add(u.key);s.splice(s.indexOf(m),1)}return{selected:i,omitted:s.sort(r)}}function R(e,t){let n=P(e).reduce((s,i)=>s+(t.has(i.key)?0:i.weight),0),r=Math.max(0,8-e.priority)*20,o=Math.min(500,Math.ceil(e.evidenceCharacters/160));return n+r-o}function P(e){return[...e.reasons.map(K),...e.roles.map(t=>({key:`role:${t}`,weight:$(t)})),{key:`file:${e.relativePath}`,weight:180},{key:`scope:${A(e.relativePath)}`,weight:120},{key:`kind:${e.fileKind}`,weight:40},...e.symbols.map(t=>({key:`symbol:${t}`,weight:100})),...e.behaviorSignals.map(t=>({key:`behavior:${t}`,weight:70}))]}function K(e){let t=e.indexOf(":"),n=t<0?e:e.slice(0,t);return n==="dependency"||n==="consumer"?{key:`reason:${n}`,weight:220}:{key:`reason:${e}`,weight:n==="location"||n==="definition"?1400:800}}function $(e){switch(e){case"location":return 1200;case"definition":return 1100;case"reference":return 600;case"caller":case"callee":return 550;case"dependency":case"consumer":return 500;case"search":return 400;default:return 300}}function A(e){let t=e.lastIndexOf("/");return t<0?e:e.slice(0,t)}var E=64,M=12;function te(e,t,n={}){if(t.length===0)return[];let r=n.context??6;if(!Number.isSafeInteger(r)||r<0)throw new RangeError(`context must be a non-negative safe integer; received ${r}`);let o=n.limit??12;if(!Number.isSafeInteger(o)||o<=0)throw new RangeError(`limit must be a positive safe integer; received ${o}`);let s=t.map(i=>{if(i.length===0)throw new Error("The source search pattern must not be empty.");return{pattern:i,regexp:n.regexp?C(i,"source search pattern",n.ignoreCase?"iu":"u"):null,literal:n.ignoreCase?i.toLocaleLowerCase():i,identities:[],fileCoverage:[],textByPath:new Map}});if(!n.regexp&&!n.ignoreCase){let i=s.map(d=>Buffer.from(d.pattern,"utf8")),l=S(e,{scope:n.scope,literalBytes:i.length===1?i[0]:i},(d,a)=>{let c=g(d.text);if(c.length!==0)for(let m of a){let u=s[m];u&&_(e,u,d,c,n)}});return s.map(d=>B(d,l,r,o,n))}return s.map(i=>{let l=S(e,{scope:n.scope},d=>{let a=g(d.text);a.length>0&&_(e,i,d,a,n)});return B(i,l,r,o,n)})}function _(e,t,n,r,o){let s=[];for(let a=0;a<r.length;a+=1){let c=r[a]??"",m=c.endsWith("\r")?c.slice(0,-1):c;(t.regexp?t.regexp.test(m):(o.ignoreCase?m.toLocaleLowerCase():m).includes(t.literal))&&s.push(a)}if(s.length===0)return;let i=n.relativePath;t.textByPath.set(i,n.text);let l=n.freshness.semantic.state!=="stale"&&n.freshness.semantic.basis!=="no-compiler-document"?F(e,i):[],d=v(e,i)?.callables??[];for(let a of s){let c=I(l,a),m=x(d,a),u=c&&!w(c.symbol)?c:null,p=u?.startLine??m?.startLine??c?.startLine??a,y=u?.endLine??m?.endLine??c?.endLine??a,b=L(e,i,a,p,y);t.identities.push({relativePath:i,focusLine:a,ownerSymbol:u?.symbol??null,ownerShort:u?f(u.symbol):m?.name??(c?f(c.symbol):null),ownerStartLine:b.startLine,ownerEndLine:b.endLine,fileKind:T(i),freshness:n.freshness})}t.fileCoverage.push({relativePath:i,matchingLines:s.length,returnedMatches:0,freshness:n.freshness})}function B(e,t,n,r,o){e.identities.sort(N);let s=e.identities.length>E?O(e.identities,E):e.identities,l=(r===Number.MAX_SAFE_INTEGER?e.identities:o.ranking?O(e.identities,r):e.identities.slice(0,r)).flatMap(c=>{let m=e.textByPath.get(c.relativePath),u=m===void 0?null:D(c.relativePath,m,c.focusLine,n);return u?[{...u,...c}]:[]}),d=new Map;for(let c of l)d.set(c.relativePath,(d.get(c.relativePath)??0)+1);for(let c of e.fileCoverage)c.returnedMatches=d.get(c.relativePath)??0;let a=H(e.fileCoverage);return{pattern:e.pattern,mode:o.regexp?"regexp":"literal",identities:e.identities,...s.length<e.identities.length?{identityManifest:s}:{},identityCoverage:{mode:s.length===e.identities.length?"complete":"bounded",returned:s.length,total:e.identities.length,omitted:e.identities.length-s.length},matches:l,matchingLines:e.identities.length,matchingFiles:e.fileCoverage.length,omittedMatches:Math.max(0,e.identities.length-l.length),fileCoverage:e.fileCoverage,scopeHints:a.slice(0,M),omittedScopeHints:Math.max(0,a.length-M),scannedFiles:t.scannedTextFiles,textCoverage:{basis:"current-project-text-files",candidateFiles:t.candidateFiles,scannedTextFiles:t.scannedTextFiles,scannedBytes:t.scannedBytes,skippedBinaryPaths:t.skippedBinaryPaths,skippedUnreadablePaths:t.skippedUnreadablePaths,skippedOversizedPaths:t.skippedOversizedPaths,semanticFiles:t.semanticFiles}}}function D(e,t,n,r){let o=t.split(`
|
|
2
2
|
`),s=t.endsWith(`
|
|
3
3
|
`)?o.length-1:o.length;if(n<0||n>=s)return null;let i=Math.max(0,n-r),l=Math.min(s-1,n+r);return{relativePath:e,startLine:i,endLine:l,focusLine:n,source:o.slice(i,l+1).join(`
|
|
4
4
|
`)}}function H(e){let t=new Map;for(let n of e){let r=j(n.relativePath),o=t.get(r)??{matchingLines:0,matchingFiles:0};o.matchingLines+=n.matchingLines,o.matchingFiles+=1,t.set(r,o)}return[...t.entries()].map(([n,r])=>({scope:n,...r})).sort((n,r)=>r.matchingLines-n.matchingLines||r.matchingFiles-n.matchingFiles||n.scope.localeCompare(r.scope))}function j(e){let t=e.lastIndexOf("/");return t<0?e:e.slice(0,t)}function O(e,t){let n=e.map((o,s)=>({...o,priority:h(o.fileKind),sequence:s,evidenceCharacters:1,roles:["search"],reasons:["search"],symbols:o.ownerSymbol?[o.ownerSymbol]:[],behaviorSignals:[]})),r=[];for(let o of[0,1,2]){let s=t-r.length;if(s===0)break;let i=n.filter(l=>h(l.fileKind)===o);r.push(...k(i,s,Number.MAX_SAFE_INTEGER,N).selected)}return r.map(({priority:o,sequence:s,evidenceCharacters:i,roles:l,reasons:d,symbols:a,behaviorSignals:c,...m})=>m)}function N(e,t){return h(e.fileKind)-h(t.fileKind)||+(t.ownerSymbol!==null)-+(e.ownerSymbol!==null)||e.relativePath.localeCompare(t.relativePath)||e.focusLine-t.focusLine}export{z as a,k as b,te as c};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-RDULNRSJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as f}from"./chunk-SVHTMVA4.js";import{a as L}from"./chunk-EELPBR7E.js";import{B as l,o as a}from"./chunk-C7IJMOFP.js";import{c as i,d as b,e as u,k as c}from"./chunk-DRENNWRG.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-RHHCLWQ6.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{b as be}from"./chunk-FELGD32K.js";import{B as G,h as ye,k as O,t as M,x as P}from"./chunk-C7IJMOFP.js";import{e as pe}from"./chunk-IW5XQG5G.js";var Oe=12,De=20,oe=200,ie=800,Ie=.9,Me=64,ke=pe("behavior-construct-ranges"),ge={if_statement:"branch",conditional_expression:"branch",ternary_expression:"branch",switch_statement:"branch",switch_expression:"branch",switch_case:"branch",case_statement:"branch",match_statement:"branch",match_expression:"branch",match_arm:"branch",for_statement:"loop",for_in_statement:"loop",for_of_statement:"loop",while_statement:"loop",do_statement:"loop",await_expression:"await",return_statement:"return",throw_statement:"throw",raise_statement:"throw",assignment_expression:"mutation",augmented_assignment_expression:"mutation",assignment:"mutation",pair:"shape",field_initializer:"shape",spread_element:"spread",dictionary_splat:"spread",catch_clause:"catch",except_clause:"catch",finally_clause:"finally"},Z=["anchor","signature","binding","branch","loop","call","await","return","throw","mutation","shape","spread","catch","finally"],Ce=[...Z,"lifecycle"],_e=["loop","await","throw","mutation","spread","catch","finally","lifecycle"],Ye=new Set(["onBeforeMount","onBeforeUnmount","onMounted","onUnmounted","useEffect","useInsertionEffect","useLayoutEffect"]);var Ne=new Set(["object","object_pattern","dictionary","field_declaration_list","struct_expression","struct_pattern"]);function Ct(e,n,t,o,r=[],a={}){let s=P(e,n);if(!s)return null;let l=O(e,n),c=ee(e,n,t,o,r),u=ne(e,n,c.startLine,c.endLine),d=u?.startLine??t,p=u?.endLine??o,N=(u?I(s.rootNode,c.startLine,c.endLine):null)??M(s.rootNode,d,p);if(!N)return null;let b=Le(N,l,d,p,r);if(!b||b.lines.length===0||b.lines.some(S=>S.text.length>ie))return null;let h=ot(l,d,p),C=it(b);if((a.requireSavings??!0)&&C>=h*Ie)return null;let x=Z.filter(S=>b.lines.some(v=>v.signals.includes(S)));return{...u?{callable:{name:u.name,startLine:u.startLine,endLine:u.endLine}}:{},representation:"outline",constructKind:b.constructKind,signature:b.signature,lines:b.lines,signals:x,testCases:be(n)==="test"?ut(l,d,p):[],coverage:{sourceStatements:b.sourceStatements,representedStatements:b.sourceStatements,copiedStatements:b.copiedStatements,omittedStatements:0},rawCharacters:h,outlineCharacters:C,candidateLines:b.sourceStatements,omittedLines:0}}function _t(e,n,t,o,r){if(r.length===0)return[];let a=P(e,n);if(!a)return[];let s=O(e,n),l=ee(e,n,t,o,r),c=ne(e,n,l.startLine,l.endLine),u=c?.startLine??t,d=c?.endLine??o,p=(c?I(a.rootNode,l.startLine,l.endLine):null)??M(a.rootNode,u,d);if(!p)return[];let N=Le(p,s,u,d,r);return N?N.lines.filter(b=>b.text.length<=ie&&b.signals.some(h=>["branch","loop","catch","finally"].includes(h))&&r.some(h=>h>=b.line&&h<=b.endLine)):[]}function Nt(e,n,t,o){let r=P(e,n);if(!r)return null;let a=I(r.rootNode,t,o)??M(r.rootNode,t,o);if(!a)return null;let s=[],l=se(a),c=[];return ce(a,a,u=>{if(Y.has(u.type)||je.has(u.type)){ze(s,c,u);return}if(te.has(u.type)){He(s,c,u);return}if(z.has(u.type)){Ue(s,c,u);return}H.has(u.type)&&Ke(s,u)}),{facts:Je(s),terminals:we(l),unsupported:c}}function ee(e,n,t,o,r=[]){let a=r.filter(d=>d>=t&&d<=o),s=ke.get(e,n,ye(e,n)??"",()=>new Map),l=`${t}:${o}:${a.join(",")}`,c=s.get(l);if(c)return s.delete(l),s.set(l,c),{startLine:c[0],endLine:c[1]};let u=$e(e,n,t,o,a);if(s.set(l,[u.startLine,u.endLine]),s.size>Me){let d=s.keys().next().value;d!==void 0&&s.delete(d)}return u}function $e(e,n,t,o,r){let a=P(e,n),s=[];if(r.length>0&&a){let d=[],p=r[0],N=p;for(let h of r)p=Math.min(p,h),N=Math.max(N,h);Ee(a.rootNode,p,N,h=>{Qe(h)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&d.push(h),T.has(h.type)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&s.push(h)});let b=d.sort((h,C)=>h.endPosition.row-h.startPosition.row-(C.endPosition.row-C.startPosition.row)||h.startPosition.row-C.startPosition.row)[0];if(b)return{startLine:b.startPosition.row,endLine:b.endPosition.row}}let l=ne(e,n,t,o);if(l)return{startLine:l.startLine,endLine:l.endLine};if(r.length===0)return{startLine:t,endLine:o};let c=(G(e,n)?.callables??[]).filter(d=>d.startLine>=t&&d.endLine<=o&&r.every(p=>d.startLine<=p&&d.endLine>=p)).sort((d,p)=>d.endLine-d.startLine-(p.endLine-p.startLine)||d.startLine-p.startLine)[0];if(!a)return c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o};let u=s.sort((d,p)=>d.endPosition.row-d.startPosition.row-(p.endPosition.row-p.startPosition.row)||d.startPosition.row-p.startPosition.row)[0];return u?{startLine:u.startPosition.row,endLine:u.endPosition.row}:c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o}}function xt(e,n,t,o,r={}){if(o-t+1<(r.minimumBodyLines??De))return null;let s=Re(e,n,t,o,[],!1);if(!s)return null;let l=s.candidates.map(S=>({...S,signals:S.signals.filter(v=>v!=="anchor"&&v!=="signature")})).filter(S=>S.signals.length>0);if(l.length===0)return null;let c=ct(l),u=l.filter(S=>S.text.length<=oe);if(u.length===0)return null;let d=_e.filter(S=>(c[S]??0)>0),p=d.filter(S=>S!=="await"),N=s.shapes.reduce((S,v)=>S+v.fields.length,0);if(p.length===0&&!((c.await??0)>0&&N>0)&&N<3)return null;let b=lt(u,c),h=new Map;for(let S of d){let v=b.find(m=>m.signals.includes(S));v&&h.set(v.line,v)}if(h.size===0){let S=b.find(v=>v.signals.includes("branch"));S&&h.set(S.line,S)}let C=Math.min(10,Math.max(1,r.maxLines??h.size)),x=new Map;for(let S of h.values()){if(x.size>=C)break;x.set(S.line,S)}return x.size>=l.length&&s.shapes.length===0?null:{owner:s.callable?.name??null,startLine:t,endLine:o,lines:[...x.values()].sort((S,v)=>S.line-v.line),shapes:s.shapes,signalCounts:c,candidateLines:l.length,omittedLines:l.length-x.size}}function vt(e,n,t,o){let r=Re(e,n,t,o,[],!1);return r?new Map(r.candidates.map(a=>[a.line,a.signals.filter(s=>s!=="lifecycle")])):new Map}var T=new Set(["arrow_function","constructor_declaration","function_declaration","function_definition","function_expression","generator_function","generator_function_declaration","function_item","lambda","lambda_expression","method","method_declaration","method_definition"]),B=new Set(["block","body","compound_statement","declaration_list","statement_block"]),Y=new Set(["if_expression","if_statement","unless","unless_statement"]),je=new Set(["conditional_expression","ternary_expression"]),te=new Set(["do_statement","enhanced_for_statement","for_expression","for_in_statement","for_of_statement","for_statement","loop_expression","while_statement"]),z=new Set(["match_expression","match_statement","switch_expression","switch_statement"]),xe=new Set(["case_statement","match_arm","switch_case","switch_default"]),H=new Set(["try_expression","try_statement"]),X=new Set(["catch_clause","except_clause","rescue"]),j=new Set(["ensure","finally_clause"]),$=new Set(["else","else_clause"]),ve=new Set(["raise_statement","return_statement","throw_statement"]),qe=new Set(["block_comment","comment","line_comment"]);function ze(e,n,t){let o=t.childForFieldName("condition")??ue(t),r=t.childForFieldName("consequence")??t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),a=t.childForFieldName("alternative")??t.namedChildren.find(c=>$.has(c.type));if(!o||!r){n.push(le(t,"conditional-fields-unresolved"));return}let s=F(o,"predicate",o.text),l=F(r,Se(r),"consequence");if(E(e,s,l,"predicate-consequence",{branchRole:"consequence"}),J(e,s,r,"consequence"),a){let c=F(a,Se(a),"alternative");E(e,s,c,"predicate-alternative",{branchRole:"alternative"}),J(e,s,a,"alternative");return}E(e,s,ae(s,"otherwise continue"),"predicate-fallthrough",{branchRole:"fallthrough"})}function He(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(s=>B.has(s.type));if(!o){n.push(le(t,"loop-body-unresolved"));return}let r=t.childForFieldName("condition"),a=F(r??t,"predicate",r?.text??R(t,o));E(e,a,F(o,"outcome","iteration"),"loop-iteration",{branchRole:"iteration"}),J(e,a,o,"iteration"),E(e,a,ae(a,"loop exits"),"loop-exit",{branchRole:"exit"})}function Ue(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),r=t.childForFieldName("value")??t.childForFieldName("condition")??t.childForFieldName("subject")??ue(t),a=We(o??t);if(!r||a.length===0){n.push(le(t,"switch-cases-unresolved"));return}let s=F(r,"predicate",r.text),l=!1;for(let c of a){let u=Xe(c);l||=u;let d=R(c,c.namedChildren.find(p=>Q(p)));E(e,s,F(c,"outcome",d||(u?"default":"case")),u?"predicate-default":"predicate-case",{branchRole:u?"default":"case"}),J(e,s,c,u?"default":"case")}l||E(e,s,ae(s,"no case matched"),"predicate-fallthrough",{branchRole:"fallthrough"})}function Ke(e,n){let t=F(n,"scope","try");for(let o of Ve(n)){let r=j.has(o.type),a=F(o,"handler",r?"finally":R(o,W(o)));E(e,t,a,r?"finally-cleanup":"exception-handler",{branchRole:r?"finally":"catch"}),Ge(e,a,o,r?"finally":"catch")}}function Ge(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"handler-throw":"handler-return",{branchRole:o,terminalKind:a})}}function J(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"predicate-throw":"predicate-return",{branchRole:o,terminalKind:a})}}function E(e,n,t,o,r){e.push({controller:n,outcome:t,subtype:o,attributes:r})}function F(e,n,t){return{kind:n,label:q(t).slice(0,ie),startLine:e.startPosition.row,endLine:e.endPosition.row,implicit:!1}}function ae(e,n){return{...e,kind:"outcome",label:n,implicit:!0}}function Se(e){return ve.has(e.type)?"terminal":"outcome"}function se(e){let n=[];return ce(e,e,t=>{ve.has(t.type)&&n.push(F(t,"terminal",t.text))}),we(n)}function ce(e,n,t){t(n);for(let o of n.namedChildren)o!==e&&T.has(o.type)||ce(e,o,t)}function We(e){let n=[],t=o=>{for(let r of o.namedChildren)z.has(r.type)||(xe.has(r.type)?n.push(r):t(r))};return t(e),n}function Ve(e){let n=[],t=o=>{for(let r of o.namedChildren)H.has(r.type)||(X.has(r.type)||j.has(r.type)?n.push(r):T.has(r.type)||t(r))};return t(e),n}function Xe(e){let n=R(e,e.namedChildren.find(t=>Q(t))).trim();return e.type==="switch_default"||/^(?:default\b|_\s*=>)/u.test(n)}function le(e,n){return{startLine:e.startPosition.row,endLine:e.endPosition.row,reason:n}}function Je(e){let n=new Map;for(let t of e)n.set(`${t.controller.startLine}\0${t.controller.endLine}\0${t.outcome.startLine}\0${t.outcome.endLine}\0${t.subtype}\0${t.outcome.label}`,t);return[...n.values()]}function we(e){let n=new Map;for(let t of e)n.set(`${t.startLine}\0${t.endLine}\0${t.kind}\0${t.label}`,t);return[...n.values()]}function Qe(e){return T.has(e.type)||te.has(e.type)||z.has(e.type)||H.has(e.type)||X.has(e.type)||j.has(e.type)}function Le(e,n,t,o,r){let s=I(e,t,o)??e,l=W(s),c=[],u=0,d=0,p=(i,f,y,g,w=!1,D=!0)=>{let K=w?y.trim():q(y);if(!K)return;let A=Math.max(t,i.startPosition.row),fe=Math.min(o,i.endPosition.row);c.push({line:A,endLine:Math.max(A,fe),depth:f,signals:Z.filter(me=>g.includes(me)||me==="anchor"&&r.some(he=>he>=A&&he<=fe)),text:K,copied:w}),D&&(u+=1,w&&(d+=1))},N=(i,f)=>{for(let y of i.namedChildren)_(y,f)},b=(i,f)=>{if(Y.has(i.type)){h(i,f,"else if");return}if($.has(i.type)){let y=i.namedChildren.find(w=>Y.has(w.type));if(y){h(y,f,"else if");return}p(i,f,"else",["branch"],!1,!1);let g=W(i)??i.namedChildren.find(w=>B.has(w.type));if(g)_(g,f+1);else for(let w of i.namedChildren)_(w,f+1);return}p(i,f,"else",["branch"],!1,!1),_(i,f+1)},h=(i,f,y=i.type.startsWith("unless")?"unless":"if")=>{let g=i.childForFieldName("condition")??ue(i),w=i.childForFieldName("consequence")??i.childForFieldName("body")??i.namedChildren.find(A=>B.has(A.type)),D=i.childForFieldName("alternative")??i.namedChildren.find(A=>$.has(A.type)),K=g?g.text:R(i,w);p(i,f,`${y} ${nt(K)}`,k(g,["branch"])),w&&_(w,f+1),D&&b(D,f)},C=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["loop"])),y&&_(y,f+1)},x=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["branch"])),y&&_(y,f+1)},S=(i,f)=>{let y=i.namedChildren.find(g=>Q(g));p(i,f,R(i,y),["branch"],!1,!1);for(let g of i.namedChildren)(g===y||Q(g))&&_(g,f+1)},v=(i,f)=>{p(i,f,"try",[],!1);for(let y of i.namedChildren)B.has(y.type)?_(y,f+1):(X.has(y.type)||j.has(y.type))&&_(y,f)},m=(i,f,y)=>{let g=i.childForFieldName("body")??i.namedChildren.find(D=>B.has(D.type)),w=y==="finally"?"finally":R(i,g);p(i,f,w,[y],!1,!1),g&&_(g,f+1)},L=(i,f)=>{let y=W(i);p(i,f,R(i,y),k(i,["binding"])),y&&_(y,f+1)},_=(i,f)=>{if(i.startPosition.row>o||i.endPosition.row<t||qe.has(i.type)||i.type==="empty_statement")return;if(B.has(i.type)){N(i,f);return}if(Y.has(i.type)){h(i,f);return}if(te.has(i.type)){C(i,f);return}if(z.has(i.type)){x(i,f);return}if(xe.has(i.type)){S(i,f);return}if(H.has(i.type)){v(i,f);return}if(X.has(i.type)){m(i,f,"catch");return}if(j.has(i.type)){m(i,f,"finally");return}if($.has(i.type)){b(i,f);return}if(T.has(i.type)){L(i,f);return}let g=!Be(i)||rt(i);p(i,f,i.text,k(i),g)};return _(l&&l!==s?l:s,0),u===0?null:{constructKind:tt(s),signature:et(s,l,n,t),lines:c,sourceStatements:u,copiedStatements:d}}function I(e,n,t){let o=e.namedChildren.filter(r=>r.startPosition.row<=n&&r.endPosition.row>=t);for(let r of o.sort(Ze)){let a=I(r,n,t);if(a)return a}return T.has(e.type)&&e.startPosition.row<=n&&e.endPosition.row>=t?e:null}function Ze(e,n){return e.endPosition.row-e.startPosition.row-(n.endPosition.row-n.startPosition.row)||e.startPosition.row-n.startPosition.row}function W(e){return e.childForFieldName("body")??e.childForFieldName("consequence")??e.namedChildren.find(n=>B.has(n.type))??null}function et(e,n,t,o){let r=R(e,n);return r||(t[o]??e.text).trim()}function tt(e){return e.type.includes("constructor")?"constructor":e.type.includes("method")||e.type==="method"?re(e,new Set(["class_body","class_declaration","class_definition"]))?"class method":"object method":e.type==="arrow_function"||e.type==="function_expression"||e.type==="lambda"?re(e,new Set(["object","pair"]))?"object member":"function value":e.type.includes("function")?re(e,T)?"nested function":"module function":"source construct"}function re(e,n){let t=e.parent;for(;t;){if(n.has(t.type))return!0;t=t.parent}return!1}function ue(e){return e.namedChildren.find(n=>!B.has(n.type)&&!$.has(n.type))??null}function R(e,n){if(!n)return q(e.text);let t=Math.max(0,n.startIndex-e.startIndex);return q(e.text.slice(0,t)).replace(/[:{]\s*$/u,"").trim()}function nt(e){let n=q(e);return n.startsWith("(")&&n.endsWith(")")?n.slice(1,-1).trim():n}function q(e){return e.trim().replace(/\r?\n[\t ]*/gu," ")}function k(e,n=[]){let t=new Set(n);return e&&U(e,o=>{let r=ge[o.type];r&&t.add(r),o.type==="call_expression"&&(t.add("call"),Fe(o)&&t.add("shape")),de.has(o.type)&&t.add("binding")}),Z.filter(o=>t.has(o))}function rt(e){let n=!1;return U(e,t=>{n||!t.text.includes(`
|
|
2
|
+
`)||/(?:string|template|heredoc|raw_string)/u.test(t.type)&&(n=!0)}),n}function Q(e){return B.has(e.type)||Y.has(e.type)||te.has(e.type)||z.has(e.type)||H.has(e.type)||T.has(e.type)||Be(e)}function Be(e){return/(?:statement|declaration|expression|assignment|return|throw|raise|break|continue|yield|with_item)$/u.test(e.type)||de.has(e.type)}function ot(e,n,t){let o=0;for(let r=n;r<=t;r+=1)o+=(e[r]?.length??0)+10;return o}function it(e){return e.constructKind.length+e.signature.length+80+e.lines.reduce((n,t)=>n+t.text.length+t.depth*2+10,0)}function Re(e,n,t,o,r,a){let s=P(e,n);if(!s)return null;let l=O(e,n),c=ne(e,n,t,o),u=a?c?.startLine??t:t,d=a?c?.endLine??o:o,N=(c?.startLine===u&&c.endLine===d?I(s.rootNode,u,d):null)??M(s.rootNode,u,d);if(!N)return null;let b=new Map,h=new Map,C=new Map,x=(m,L)=>{if(m<u||m>d)return;let _=b.get(m)??new Set;_.add(L),b.set(m,_)};c&&x(c.startLine,"signature");for(let m of r)x(m,"anchor");U(N,m=>{let L=ge[m.type];if(L&&x(m.startPosition.row,L),L==="shape"&&at(h,m,N,u,d),m.type==="call_expression"){let i=(m.childForFieldName("function")??m.namedChild(0))?.text.split(".").at(-1);if(Fe(m)){x(m.startPosition.row,"shape");let f=V(m.text);f.length<=oe&&C.set(m.startPosition.row,f)}if(i&&Ye.has(i)){x(m.startPosition.row,"lifecycle");let f=V(m.text);f.length<=oe&&C.set(m.startPosition.row,f)}}de.has(m.type)&&x(m.startPosition.row,"binding")});let S=G(e,n);for(let m of S?.callSites??[])m.line<u||m.line>d||(x(m.line,"call"),m.calleeLeaf==="catch"&&x(m.line,"catch"));let v=[...b.entries()].sort(([m],[L])=>m-L).map(([m,L])=>({line:m,signals:Ce.filter(_=>L.has(_)),text:C.get(m)??V(l[m]??"")})).filter(m=>m.text.length>0||m.signals.includes("anchor"));return{...c?{callable:c}:{},rangeStart:u,rangeEnd:d,sourceLines:l,candidates:v,shapes:[...h.values()].sort((m,L)=>m.startLine-L.startLine)}}function at(e,n,t,o,r){if(n.startPosition.row<o||n.endPosition.row>r)return;let a=n.childForFieldName("key")??n.childForFieldName("name")??n.namedChild(0),s=V(a?.text??"");if(!s||s.includes(`
|
|
3
|
+
`)||s.length>60)return;let l=st(n,t);if(l.startPosition.row<o||l.endPosition.row>r)return;let c=`${l.startPosition.row}:${l.endPosition.row}`,u=e.get(c)??{startLine:l.startPosition.row,endLine:l.endPosition.row,fields:[]};u.fields.some(d=>d.name===s&&d.line===n.startPosition.row)||u.fields.push({name:s,line:n.startPosition.row}),e.set(c,u)}function st(e,n){let t=e.parent;for(;t&&t!==n.parent;){if(Ne.has(t.type))return t;if(t===n)break;t=t.parent}return e.parent??e}function ne(e,n,t,o){return G(e,n)?.callables.filter(r=>r.startLine<=t&&r.endLine>=o).sort((r,a)=>r.endLine-r.startLine-(a.endLine-a.startLine)||r.startLine-a.startLine)[0]}function U(e,n){n(e);for(let t of e.namedChildren)U(t,n)}function Ee(e,n,t,o){o(e);for(let r of e.namedChildren)r.startPosition.row>n||r.endPosition.row<t||Ee(r,n,t,o)}function V(e){return e.trim().replace(/\s+/gu," ")}function Fe(e){if(e.type!=="call_expression")return!1;let n=e.childForFieldName("arguments")??e.namedChildren.find(o=>o.type==="arguments"||o.type==="argument_list");if(!n)return!1;let t=!1;return U(n,o=>{Ne.has(o.type)&&(t=!0)}),t}function ct(e){let n={};for(let t of Ce){let o=e.filter(r=>r.signals.includes(t)).length;o>0&&(n[t]=o)}return n}function lt(e,n){let t=new Map;for(let a of e){let s=a.signals.join(",");t.set(s,(t.get(s)??0)+1)}let o=new Set(_e),r=a=>{let s=t.get(a.signals.join(","))??1,l=Math.min(...a.signals.map(d=>n[d]??1)),c=a.signals.some(d=>o.has(d))?3:1,u=Math.max(0,a.signals.length-1)*1e3;return c*(1e3/s+1e3/l)+u};return[...e].sort((a,s)=>r(s)-r(a)||s.line-a.line)}var de=new Set(["lexical_declaration","variable_declarator","const_item","static_item","let_declaration","assignment"]);function ut(e,n,t){let o=[],r=/\b(?:describe|it|test)(?:\.(?:only|skip|todo))?\s*\(\s*(['"`])([^'"`]+)\1/u;for(let a=n;a<=t;a+=1){let s=r.exec(e[a]??"")?.[2];if(!(!s||o.includes(s))&&(o.push(s),o.length>=Oe))break}return o}var dt=new Set(["arrow_function","class_declaration","constructor_declaration","field_definition","function_declaration","function_definition","function_expression","function_item","generator_function_declaration","generator_function","lexical_declaration","method","method_declaration","method_definition","object_method","variable_declaration"]);function ft(e,n,t){let o=P(e,n)?.rootNode??null,r=mt(o,t);if(!r)return null;let a=O(e,n);if(a.length===0)return null;let s=Math.max(0,r.startPosition.row),l=r.endPosition.column===0?r.endPosition.row-1:r.endPosition.row;return{type:r.type,startLine:s,endLine:Math.min(a.length-1,Math.max(s,l))}}function Et(e,n,t,o,r){let a=ee(e,n,o,r,[t]),s=a.startLine===a.endLine&&/(?:=>|\(|\{|\[|,)\s*$/u.test(O(e,n)[a.startLine]??"");if(!s&&(a.startLine>o||a.endLine<r))return a;let l=ft(e,n,t);return s&&l?{startLine:l.startLine,endLine:l.endLine}:l&&l.startLine>=o&&l.endLine<=r?{startLine:l.startLine,endLine:l.endLine}:{startLine:o,endLine:r}}function mt(e,n){if(!e||!Ae(e,n))return null;let t=Te(e,n);for(;t;){if(dt.has(t.type))return t;t=t.parent}return null}function Te(e,n){let t=e.namedChildren.filter(o=>Ae(o,n)).sort((o,r)=>Pe(o)-Pe(r));return t.length>0?Te(t[0],n):e}function Ae(e,n){return e.startPosition.row<=n&&e.endPosition.row>=n}function Pe(e){return e.endIndex-e.startIndex}export{Ct as a,_t as b,Nt as c,ee as d,xt as e,vt as f,ft as g,Et as h};
|
|
4
|
+
//# sourceMappingURL=chunk-RNKPYYYE.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as g}from"./chunk-
|
|
1
|
+
import{c as g}from"./chunk-PLYUVM4F.js";import{a as y}from"./chunk-5H5WTJSD.js";import{d as p}from"./chunk-TD7VKJ2Y.js";import{b as h,g as l,i as d}from"./chunk-42W3LFUK.js";import{C as b}from"./chunk-7JYHQAH2.js";import{xa as u,ya as f}from"./chunk-GH5YSGZL.js";function T(t,e,s={}){let n=y(t,e);if(!n)return null;let o=new g(t),a=L(t,n),r=n.endLine-n.startLine+1,m=o.calleeMap([n],{additive:!0,semantic:s.semantic}).get(n.symbolId)??[],c=new Set(m.map(B=>B.symbol));return{symbol:n.symbol,shortName:p(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:r,branches:a.branches,estimateBasis:a.estimateBasis,cyclomaticEstimate:a.branches+1,calleeCount:c.size,fanIn:N(t,n.symbolId),fanOut:w(m,n.relativePath)}}function L(t,e){let s=b(t,e.relativePath);if(s){let n=d(s.rootNode,e.startLine,e.endLine);if(n)return{branches:M(n),estimateBasis:"ast"}}return{branches:E(_(t,e.relativePath,e.startLine,e.endLine),S(t,e.relativePath)),estimateBasis:"regex-fallback"}}function j(t,e){let s=new Map,n=new Map;for(let o of e){let a=n.get(o.relativePath)??[];a.push(o),n.set(o.relativePath,a)}for(let[o,a]of n){let r=b(t,o),i=r===null?[]:a.filter(c=>r.rootNode.startPosition.row<=c.startLine&&r.rootNode.endPosition.row>=c.endLine),m=new Set(i.map(c=>c.symbolId));if(r&&i.length>0){for(let c of i)s.set(c.symbolId,{branches:0,estimateBasis:"ast"});v(r.rootNode,i,s)}for(let c of a)m.has(c.symbolId)||s.set(c.symbolId,P(t,c))}return s}function P(t,e){return{branches:E(_(t,e.relativePath,e.startLine,e.endLine),S(t,e.relativePath)),estimateBasis:"regex-fallback"}}function S(t,e){return t.get("SELECT language FROM documents WHERE relative_path = ?",e)?.language??"unknown"}function _(t,e,s,n){try{return u(t.config.projectRoot,e,{inputKind:"indexed source file"}).split(`
|
|
2
2
|
`).slice(s,n+1).join(`
|
|
3
3
|
`)}catch(o){if(!f(o))throw o;return""}}function N(t,e){return t.get(`SELECT COUNT(DISTINCT c.document_id) AS c
|
|
4
4
|
FROM mentions m
|
|
@@ -13,4 +13,4 @@ import{c as g}from"./chunk-JVZNWJBH.js";import{a as y}from"./chunk-LPGDO2XA.js";
|
|
|
13
13
|
WHERE m.symbol_id = ?
|
|
14
14
|
AND m.role != 1
|
|
15
15
|
AND sym_def.document_id != c.document_id`,e)?.c??0}function w(t,e){return new Set(t.filter(s=>s.file!==e).map(s=>s.symbol)).size}function M(t){let e=0;return l(t,s=>{e+=x(s)}),e}function v(t,e,s){let n=[...e].sort((o,a)=>o.startLine-a.startLine||a.endLine-o.endLine);l(t,o=>{let a=x(o);if(a===0)return;let r=o.startPosition.row,i=o.endPosition.row;for(let m of n){if(m.startLine>r)break;if(m.endLine<i)continue;let c=s.get(m.symbolId);c&&(c.branches+=a)}})}var D=new Set(["if_statement","conditional_expression","ternary_expression","for_statement","for_in_statement","for_of_statement","while_statement","do_statement","switch_case","case_statement","catch_clause","except_clause","elif_clause","match_arm"]);function x(t){return D.has(t.type)?1:t.type==="binary_expression"&&t.parent?.type!=="binary_expression"&&(t.text.includes("&&")||t.text.includes("||"))?I(t.text):0}function I(t){return(t.match(/&&|\|\|/g)??[]).length}function E(t,e){let s=h(t),n=0,o=[/\bif\b/g,/\belse\s+if\b/g,/\belse\b/g,/\bfor\b/g,/\bwhile\b/g,/\bswitch\b/g,/\bcase\b/g,/\bcatch\b/g,/\?\s*[^?]/g,/&&/g,/\|\|/g];for(let a of o){let r=s.match(a);r&&(n+=r.length)}if(e==="python"){let a=[/\belif\b/g,/\bexcept\b/g,/\bfinally\b/g];for(let r of a){let i=s.match(r);i&&(n+=i.length)}}else if(e==="rust"){let a=[/\bmatch\b/g,/=>/g,/\bloop\b/g];for(let r of a){let i=s.match(r);i&&(n+=i.length)}}else if(e==="ruby"){let a=[/\belsif\b/g,/\bunless\b/g,/\brescue\b/g,/\bwhen\b/g];for(let r of a){let i=s.match(r);i&&(n+=i.length)}}else if(e==="go"){let a=[/\bselect\b/g,/\bdefer\b/g];for(let r of a){let i=s.match(r);i&&(n+=i.length)}}return n}export{T as a,L as b,j as c,M as d};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-RPL3ARU7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{H as a,R as c}from"./chunk-C7IJMOFP.js";var D=4;function m(e,i,t,r={}){return p(e,i,t,r.maxReexportDepth??D,0,new Set)}function p(e,i,t,r,s,o){let f=`${i}\0${t}`;if(o.has(f)||s>r)return[];o.add(f);let u=c(e,i).filter(n=>n.leaf===t);return u.length>0?u:a(e,i).flatMap(n=>n.sourcePath?n.kind==="named"&&!n.names.includes(t)?[]:p(e,n.sourcePath,t,r,s+1,new Set(o)):[])}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RYOYJMGF.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as i}from"./chunk-AK3PYTIK.js";var c=new Set(["aix","android","darwin","freebsd","haiku","linux","openbsd","sunos","win32","cygwin","netbsd"]);function d(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=n;return t.version!==1||typeof t.pid!="number"||!Number.isSafeInteger(t.pid)||t.pid<=0||typeof t.platform!="string"||!c.has(t.platform)||typeof t.startToken!="string"||t.startToken.trim()===""?null:{version:1,pid:t.pid,platform:t.platform,startToken:t.startToken}}function p(n,t){return n.version===t.version&&n.pid===t.pid&&n.platform===t.platform&&n.startToken===t.startToken}import{execFileSync as y}from"child_process";import{platform as P}from"os";var I=1e3,a=16*1024,s;function N(n,t=u){if(!Number.isSafeInteger(n)||n<=0)return null;let e=n===process.pid&&t===u;if(e&&s)return{...s};try{let r=b(n,t);if(!r)return null;let o={version:1,pid:n,platform:t.platform,startToken:r};return e&&(s=o),{...o}}catch{return null}}function b(n,t){if(t.platform==="linux"||t.platform==="android")return T(t.readFile(`/proc/${n}/stat`));if(t.platform==="win32"){let e=`([DateTimeOffset](Get-Process -Id ${n} -ErrorAction Stop).StartTime).ToUnixTimeMilliseconds()`;return m(t.run("powershell.exe",["-NoProfile","-NonInteractive","-Command",e]))}return t.platform==="darwin"||t.platform==="freebsd"||t.platform==="openbsd"||t.platform==="netbsd"?m(t.run("ps",["-p",String(n),"-o","lstart="])):null}function T(n){let t=n.lastIndexOf(")");if(t<0)return null;let r=n.slice(t+1).trim().split(/\s+/)[19];return r&&/^\d+$/.test(r)?r:null}function m(n){let t=n.trim();return t===""?null:t}var u={platform:P(),readFile(n){return i(n,{maxBytes:a,inputKind:"process identity pseudo-file"})},run(n,t){return y(n,[...t],{encoding:"utf8",timeout:I,maxBuffer:a,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}};function h(){return performance.now()}function _(n,t,e,r,o,l){if(n>0)return e;let f=Math.max(0,Math.min(l,t-1));return Math.min(o,r*2**f)}export{d as a,p as b,N as c,h as d,_ as e};
|
|
2
|
+
//# sourceMappingURL=chunk-SB25YMEQ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function a(r,l){let t=s(r),e=s(l);if(t.endsWith("/**")){let n=t.slice(0,-3);return e===n||e.startsWith(`${n}/`)}if(t.endsWith("/*")){let n=t.slice(0,-2);if(!e.startsWith(`${n}/`))return!1;let i=e.slice(n.length+1);return i.length>0&&!i.includes("/")}return t==="**"?!0:t==="*"?e.length>0&&!e.includes("/"):t===e}function s(r){return r.replace(/\\/g,"/").replace(/^\.\//,"").replace(/\/+$/,"")}export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-SV2LEFVM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as L}from"./chunk-BGBBVSH4.js";import{d as Pe}from"./chunk-
|
|
1
|
+
import{a as L}from"./chunk-BGBBVSH4.js";import{d as Pe}from"./chunk-6NC3YSPY.js";import{a as I}from"./chunk-IXESDH3J.js";import{b}from"./chunk-FELGD32K.js";import{b as pe,d as me,e as ge,f as be,g as Se,h as ye,i as K,j as he,m as Re}from"./chunk-2XCGSDIT.js";import{a as de}from"./chunk-WRQXLNYE.js";import{b as F}from"./chunk-T6QD2ZQB.js";import{c as ie}from"./chunk-BJT7LSPK.js";import{E as re,F as P,H as se,L as oe,R as E,S as le,T as ue,U as fe,V as B,h as ee,k as te,l as w,o as R,p as ne}from"./chunk-C7IJMOFP.js";import{a as h}from"./chunk-YXPUP5G2.js";import{d as k,f as $,g as V,i as ae,j as ce}from"./chunk-DRENNWRG.js";import{a as xe}from"./chunk-DHEQMPLW.js";import{d as g}from"./chunk-IW5XQG5G.js";import{e as J}from"./chunk-HGFDYOVB.js";import{C as x,ma as T,na as Q,oa as z}from"./chunk-AK3PYTIK.js";import{existsSync as A,readdirSync as Ee}from"fs";import{join as M}from"path";var ze={files:new Set,pathPrefixes:[]};var X=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,et=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,De=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],tt=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),nt=4,rt=g("package-surface",{clearGroups:["whole-project"]}),fn=g("package-operational-surface",{clearGroups:["whole-project"]});function Me(t){return rt.get(t,()=>it(t.config.projectRoot))}function G(t,e){let n=Me(t);return n.files.has(e)?!0:n.pathPrefixes.some(r=>e.startsWith(r))}function ve(t,e){return Me(t).files.has(e)}function it(t){let e=new Set,n=[];for(let{manifest:r,packageRoot:s}of st(t))for(let i of ot(r))at(t,s,i,e,n);return e.size===0&&n.length===0?ze:{files:e,pathPrefixes:n}}function st(t){let e=[],n=Te(t,"");return n&&e.push({manifest:n,packageRoot:""}),Ce(t,"",e,0),e}function Ce(t,e,n,r){if(r>=nt)return;let s=M(t,e);if(A(s))for(let i of Ee(s,{withFileTypes:!0})){if(!i.isDirectory()||tt.has(i.name))continue;let o=e?`${e}/${i.name}`:i.name,a=Te(t,o);a&&n.push({manifest:a,packageRoot:o}),Ce(t,o,n,r+1)}}function Te(t,e){let n;try{n=T(t,M(e,"package.json"),{maxBytes:8*1024*1024,inputKind:"package manifest"})}catch(r){if(!Q(r))throw r;return null}try{let r=JSON.parse(n);return r&&typeof r=="object"?r:null}catch{return null}}function ot(t){let e=[];for(let r of["main","module","types","browser"])typeof t[r]=="string"&&e.push(t[r]);let n=t.bin;if(typeof n=="string")e.push(n);else if(n&&typeof n=="object")for(let r of Object.values(n))typeof r=="string"&&e.push(r);return we(t.exports,e),e}function we(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let n of Object.values(t))we(n,e)}function at(t,e,n,r,s){let i=n.replace(/\\/g,"/").replace(/^\.\//,"");if(i===""||i.startsWith(".."))return;let o=i.indexOf("*");if(o>=0){let l=i.slice(0,o);for(let u of ke(l))u!==""&&s.push(S(e,u));return}let a=i.replace(et,"");for(let l of ke(a)){l===a&&l===i&&r.add(S(e,i));for(let u of De)ct(t,r,e,l+u)}r.add(S(e,i))}function ke(t){let e=[t];return X.test(t)&&(e.push(t.replace(X,"src/")),e.push(t.replace(X,""))),e}function ct(t,e,n,r){let s=S(n,r);if(e.add(s),!r.startsWith("src/")||A(M(t,s)))return;let i=De.find(c=>r.endsWith(c));if(!i)return;let o=r.slice(0,-i.length);lt(t,e,n,o,i);let a=o.lastIndexOf("/");if(a<=4)return;let l=o.slice(0,a),u=o.slice(a+1);for(let c of Fe(t,n,l,`${u}${i}`))e.add(c)}function lt(t,e,n,r,s){let i=S(n,`${r}/index${s}`);A(M(t,i))&&e.add(i)}function Fe(t,e,n,r){let s=M(t,e,n);if(!A(s))return[];let i=[];for(let o of Ee(s,{withFileTypes:!0})){let a=`${n}/${o.name}`;o.isDirectory()?i.push(...Fe(t,e,a,r)):o.isFile()&&o.name===r&&i.push(S(e,a))}return i}function S(t,e){return t?`${t}/${e}`:e}import{existsSync as q,readdirSync as ut}from"fs";import{dirname as ft,join as U}from"path";var dt={rootFiles:new Set,sourcePrefixes:[]},pt=new Set([".git",".scipquery","node_modules","target"]),mt=6,gt=g("rust-library-surface",{clearGroups:["whole-project"]});function Ie(t,e,n){if(!n.endsWith(".rs")||!yt(bt(t),n))return!1;let r=E(t,n).find(s=>s.symbol===e);return r?ht(te(t,n)[r.startLine]??""):!1}function bt(t){return gt.get(t,()=>St(t.config.projectRoot))}function St(t){let e=new Set,n=new Set;for(let r of Rt(t)){let s=T(t,U(r,"Cargo.toml"),{maxBytes:8388608,inputKind:"Cargo manifest"}),i=xt(s),o=S(r,"src/lib.rs"),a=i?S(r,i):!Pt(s)&&z(t,o)?o:null;if(!a)continue;e.add(a);let l=ft(a).replaceAll("\\","/");n.add(l==="."?"":`${l}/`)}return e.size===0?dt:{rootFiles:e,sourcePrefixes:[...n].sort()}}function yt(t,e){return e.endsWith(".rs")?t.rootFiles.has(e)?!0:kt(e)?!1:t.sourcePrefixes.some(n=>e.startsWith(n)):!1}function ht(t){return/^\s*pub\s+(?!\()/.test(t)}function Rt(t){if(!q(t))return[];let e=[];return Le(t,"",e,0),e}function Le(t,e,n,r){let s=U(t,e);if(q(s)&&(q(U(s,"Cargo.toml"))&&n.push(e),!(r>=mt)))for(let i of ut(s,{withFileTypes:!0})){if(!i.isDirectory()||pt.has(i.name))continue;let o=e?`${e}/${i.name}`:i.name;Le(t,o,n,r+1)}}function xt(t){let e=!1;for(let n of t.split(`
|
|
2
2
|
`)){let r=n.replace(/\s+#.*$/,"").trim(),s=/^\[([^\]]+)\]$/.exec(r);if(s){e=s[1]==="lib";continue}if(!e)continue;let i=/^path\s*=\s*["']([^"']+)["']/.exec(r)?.[1];if(i)return i.replaceAll("\\","/").replace(/^\.\//,"")}return null}function Pt(t){let e=!1;for(let n of t.split(`
|
|
3
|
-
`)){let r=n.replace(/\s+#.*$/,"").trim(),s=/^\[([^\]]+)\]$/.exec(r);if(s){e=s[1]==="package";continue}if(e&&/^autolib\s*=\s*false\b/.test(r))return!0}return!1}function kt(t){return/(?:^|\/)src\/main\.rs$/.test(t)||/(?:^|\/)src\/bin\//.test(t)||/(?:^|\/)(?:examples|tests|benches)\//.test(t)}function Et(t){return Dt.get(t,()=>{let n=h(t,{includeIgnored:!1}).filter(o=>{let a=b(o);return a==="entry"||a==="worker"});if(n.length===0)return new Set;let r=F(t),s=new Set,i=new Set;for(;n.length>0;){let o=n.shift();if(!s.has(o)){s.add(o),b(o)==="barrel"&&i.add(o);for(let a of r.get(o)??[])s.has(a)||n.push(a)}}return i})}var Dt=g("live-barrels",{clearGroups:["whole-project"]});function Mt(t,e){return Et(t).has(x(e))}function Ne(t,e){let n=x(e),r=b(e);return r==="entry"||r==="worker"||Gt(n)||Mt(t,n)}function vt(t,e,n){let r=x(n),s=[];G(t,r)&&s.push("package-surface-file"),wt(t,e,r)&&s.push("transitive-package-surface"),Ie(t,e,r)&&s.push("rust-public-library"),Xt(e,r)&&s.push("framework-entrypoint");let i=t.config.entryRoots;return i&&(i.files?.some(o=>x(o)===r)&&s.push("configured-file"),i.pathPrefixes?.some(o=>r.startsWith(x(o)))&&s.push("configured-path-prefix"),i.qualifiedVars?.some(o=>Ut(e,o))&&s.push("configured-qualified-var"),i.symbolPatterns?.some(o=>{try{return xe(o,"entryRoots.symbolPatterns entry").test(e)}catch{return!1}})&&s.push("configured-symbol-pattern")),s}function _e(t,e,n){return vt(t,e,n).length>0}var Ct=g("package-surface-reachability",{clearGroups:["whole-project"]}),Tt=g("explicit-package-surface-reachability",{clearGroups:["whole-project"]});function wt(t,e,n){let r=Ft(t).get(n);return r===void 0?!1:r===null||r.has(k(e))}function In(t,e,n){let r=It(t).get(n);return r===void 0?!1:r===null||r.has(k(e))}function Ft(t){return Ct.get(t,()=>je(t,e=>G(t,e)))}function It(t){return Tt.get(t,()=>je(t,e=>ve(t,e)))}function je(t,e){let n=new Map,r=[];for(let s of h(t,{includeIgnored:!1}))e(s)&&(n.set(s,null),r.push(s));for(;r.length>0;){let s=r.shift(),i=n.get(s);if(i!==void 0)for(let o of se(t,s)){if(!o.sourcePath||t.isIgnored(o.sourcePath))continue;let a=Lt(i,o);a!==void 0&&At(n,o.sourcePath,a)&&r.push(o.sourcePath)}}return n}function Lt(t,e){if(t===null)return e.kind==="named"?new Set(e.names):null;if(e.kind==="star")return new Set(t);if(e.kind==="star-as")return e.names.some(r=>t.has(r))?null:void 0;let n=e.names.filter(r=>t.has(r));return n.length>0?new Set(n):void 0}function At(t,e,n){if(!t.has(e))return t.set(e,n),!0;let r=t.get(e);if(r===void 0)return!1;if(r===null||n===null)return r===null?!1:(t.set(e,null),!0);let s=!1;for(let i of n)r.has(i)||(r.add(i),s=!0);return s}var Oe=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),Nt=new Set(["default","generateMetadata","generateStaticParams"]),_t=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),jt=new Set(["default","middleware","config"]),Ot=new Set(["register","onRequestError"]),$t=new Set(["onRouterTransitionStart"]),Vt=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),Bt=new Set(["load","actions","entries",...Oe]),Kt=new Set(["default"]);function Xt(t,e){let n=k(t);return n===""?!1:$e(e)?Oe.has(n):Ve(e)?Nt.has(n):Be(e)?_t.has(n):Ke(e)?jt.has(n):Xe(e)?Ot.has(n):Ge(e)?$t.has(n):qe(e)?Vt.has(n):Ue(e)?Bt.has(n):qt(e)?Kt.has(n):!1}function Gt(t){return $e(t)||Ve(t)||Be(t)||Ke(t)||Xe(t)||Ge(t)||qe(t)||Ue(t)}function $e(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Ve(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Be(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Ke(t){return W(t,"(?:middleware|proxy)\\.(?:ts|js|mts|mjs)")}function Xe(t){return W(t,"instrumentation\\.(?:ts|js|mts|mjs)")}function Ge(t){return W(t,"instrumentation-client\\.(?:ts|js|mts|mjs)")}function W(t,e){return new RegExp(`^(?:src/)?${e}$`).test(t)||new RegExp(`(?:^|/)src/${e}$`).test(t)||new RegExp(`(?:^|/)(?:apps|services|packages)/[^/]+/(?:src/)?${e}$`).test(t)}function qe(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Ue(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function qt(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function Ut(t,e){let n=e.lastIndexOf("/");if(n<0)return!1;let r=e.slice(0,n),s=e.slice(n+1);return t.includes(Ae(r)+"/")&&t.includes(Ae(s)+".")}function Ae(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}function We(t,e,n={}){let r=new Map;if(e&&e.length===0)return r;let s=h(t,{includeIgnored:!1}),i=be(t),o=e??le(t),a=new Set(o.map(u=>u.symbolId)),l=zt(o);return Wt(t,r,s,i,a,l),Ht(t,r,o,a),Qt(t,r,s,i,a,l),n.semantic!==!1&&n.semanticEvidence&&tn(r,n.semanticEvidence.callerMap(t,en(o))),r}function Wt(t,e,n,r,s,i){for(let o of n){if(!R(o))continue;let a=re(t,o);if(a)for(let l of a){if(i&&!i.has(l.calleeLeaf))continue;let u=me(o,r.get(l.calleeLeaf)??[]);if(!u||u.length===0)continue;let c=ge(t,o,u,l.memberAccess,l.calleeQualifier);c&&s.has(c.symbolId)&&c.file!==o&&H(e,c.symbolId,o)}}}function Ht(t,e,n,r){let s=Zt(n);for(let i of Yt(t,r))t.isIgnored(i.relative_path)||Jt(i,s.get(i.symbol_id))||H(e,i.symbol_id,i.relative_path)}function Yt(t,e){return pe(t,e?[...e]:void 0)}function Zt(t){let e=new Map;for(let n of t)e.set(n.symbolId,{docId:n.documentId,startLine:n.startLine,endLine:n.endLine});return e}function Jt(t,e){return!!e&&e.docId===t.document_id&&t.chunk_start>=e.startLine&&t.chunk_end<=e.endLine}function Qt(t,e,n,r,s,i){for(let o of n){if(R(o)!=="rust")continue;let a=P(t,o,{includeRustAttributeNames:!0});if(a.length!==0)for(let{name:l}of a){if(i&&!i.has(l))continue;let u=r.get(l);if(u)for(let c of u)s.has(c.symbolId)&&c.file!==o&&H(e,c.symbolId,o)}}}function H(t,e,n){let r=t.get(e);r||(r=new Set,t.set(e,r)),r.add(n)}function zt(t){let e=new Set;for(let n of t){let r="leaf"in n&&typeof n.leaf=="string"?n.leaf:"symbol"in n&&typeof n.symbol=="string"?k(n.symbol):"";r&&e.add(r)}return e.size>0?e:null}function en(t){return t.filter(e=>"relativePath"in e&&"symbol"in e&&"leaf"in e)}function tn(t,e){for(let[n,r]of e){let s=t.get(n);s||(s=new Set,t.set(n,s));for(let i of r)s.add(i)}}function Y(t,e,n={}){return We(t,e,n)}function Z(t,e,n={}){return Re(t,e,n)}function He(t,e,n={}){let r=Y(t,e,{semantic:n.semantic,semanticEvidence:n.semanticEvidence});return n.sourceFallback===!1?r:nn(r,Z(t,e))}function nn(t,e){let n=new Map;for(let[r,s]of t)n.set(r,new Set(s));for(let[r,s]of e){let i=n.get(r)??new Set;for(let o of s)i.add(o);n.set(r,i)}return n}function Ye(t,e,n){let r=e.identifierResolution==="strict"?K:he,s=e.candidateNames?Se(e.candidateNames):null,i=0,o=0,a=0,l=0,u="";for(let c of e.paths)if(i+=1,u=c,!(!R(c)&&!(e.includeVueSfc&&ne(c)))&&!t.isIgnored(c)&&!e.skipPath?.(c))try{if(s&&!ye(ee(t,c),s))continue;o+=1;let v=(d,m,j,D)=>{if(e.candidateNames&&!e.candidateNames.has(d))return;a+=1;let C=e.resolveTargets?e.resolveTargets({sourceFile:c,name:d,kind:m,defaultTargets:D}):D();for(let O of C)l+=1,n({sourceFile:c,name:d,target:O,occurrences:j,kind:m})},_=de(t,c);for(let[d,m]of _)v(d,"identifier",m.length,()=>r(t,c,d));for(let d of P(t,c,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let m=d.kind==="cross-language-dispatch"?()=>K(t,c,d.name):()=>r(t,c,d.name);v(d.name,d.kind,d.occurrences,m)}}finally{e.afterPath?.(c),i%10===0&&J("source-reference-scan.progress",()=>{},()=>({scannedPaths:i,currentPath:u,candidateMatchedPaths:o,visitedNames:a,visitedHits:l}))}}function Ze(t,e={}){let{scope:n,files:r,minLoc:s=1,maxLoc:i=Number.POSITIVE_INFINITY,excludeSymbol:o,excludeEntrySurfaces:a=!1,excludeTypesFiles:l=!1,excludeRootedSymbols:u=!1,requireFunctionLikeSymbol:c=!1,requireCallableSymbol:N=!1,excludeRustTraitImplMembers:v=!1,includeSuppressed:_=!1,sortByLocDesc:d=!1}=e,m=[],j=rn(t,{scope:n,files:r,requireFunctionLikeSymbol:c,requireCallableSymbol:N}),D=new Map,C=new Map,O=f=>{let p=D.get(f);if(p!==void 0)return p;let y=Ne(t,f);return D.set(f,y),y},Qe=f=>{let p=C.get(f);if(p!==void 0)return p;let y=b(f);return C.set(f,y),y};for(let f of j){let p=f.relativePath;if(t.isIgnored(p)||a&&O(p)||!sn(f,{requireFunctionLikeSymbol:c,requireCallableSymbol:N})||o!==void 0&&f.symbol===o)continue;let y=L(f);y<s||y>i||l&&on(p)||u&&_e(t,f.symbol,p)||v&&ae(f.symbol)||Qe(p)!=="test"&&(ce(f.symbol)||!_&&w(t,p,f.startLine)||m.push(f))}return d?m.sort((f,p)=>L(p)-L(f)):m}function rn(t,e){return e.files!==void 0?[...new Set(e.files.map(r=>r.replace(/\\/g,"/")))].sort().filter(r=>!e.scope||r.includes(e.scope)).flatMap(r=>E(t,r)):e.requireCallableSymbol?B(t,{scope:e.scope,symbolMatches:$,sqlPrefilter:"callable"}):e.requireFunctionLikeSymbol?B(t,{scope:e.scope,symbolMatches:V,sqlPrefilter:"function-like"}):fe(t,e.scope)}function sn(t,e){return e.requireCallableSymbol?$(t.symbol):e.requireFunctionLikeSymbol?V(t.symbol):t.isFunctionLike}function on(t){return(t.split("/").pop()??"").includes("types")}var Je=class{constructor(e){this.db=e}db;scopedDefinitions(e){return ue(this.db,e)}definitionsForFile(e){return E(this.db,e)}productionCallableDefinitions(e={}){return Ze(this.db,e)}calleeMap(e,n={}){return Pe(this.db,e,{...n,semanticEvidence:I})}crossFileCallerMap(e,n={}){return Y(this.db,e,{...n,semanticEvidence:I})}sourceFallbackCallerFiles(e,n={}){return Z(this.db,e,n)}callerFileMap(e,n={}){return He(this.db,e,{...n,semanticEvidence:I})}frameworkReferencedSymbolIds(e){let n=new Map;for(let s of e){if(!s.leaf)continue;let i=n.get(s.leaf)??[];i.push(s.symbolId),n.set(s.leaf,i)}let r=new Set;for(let s of h(this.db,{includeIgnored:!1}))if(R(s)==="rust")for(let{name:i}of P(this.db,s,{includeRustAttributeNames:!0}))for(let o of n.get(i)??[])r.add(o);return r}symbolsWithNonSelfCallees(e,n={}){if(e.length===0)return new Set;let r=new Map(e.map(i=>[i.symbolId,i.symbol])),s=this.calleeMap(e,n);return new Set([...s.entries()].filter(([i,o])=>{let a=r.get(i);return o.some(l=>l.symbol!==a)}).map(([i])=>i))}fileDependencyGraph(e){return F(this.db,e)}fileKind(e){return b(e)}hasSuppressionComment(e){return w(this.db,e.relativePath,e.startLine)}sourceFiles(){return ie(this.db)}scanSourceReferences(e,n){Ye(this.db,e,n)}callableSignature(e){let n=oe(this.db).forFile(e.relativePath,{facts:!0}).facts?.callables.find(r=>r.startLine===e.startLine&&r.endLine===e.endLine);return n?{paramCount:n.paramCount}:null}};export{Ne as a,vt as b,In as c,Je as d};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
`)){let r=n.replace(/\s+#.*$/,"").trim(),s=/^\[([^\]]+)\]$/.exec(r);if(s){e=s[1]==="package";continue}if(e&&/^autolib\s*=\s*false\b/.test(r))return!0}return!1}function kt(t){return/(?:^|\/)src\/main\.rs$/.test(t)||/(?:^|\/)src\/bin\//.test(t)||/(?:^|\/)(?:examples|tests|benches)\//.test(t)}function Et(t){return Dt.get(t,()=>{let n=h(t,{includeIgnored:!1}).filter(o=>{let a=b(o);return a==="entry"||a==="worker"});if(n.length===0)return new Set;let r=F(t),s=new Set,i=new Set;for(;n.length>0;){let o=n.shift();if(!s.has(o)){s.add(o),b(o)==="barrel"&&i.add(o);for(let a of r.get(o)??[])s.has(a)||n.push(a)}}return i})}var Dt=g("live-barrels",{clearGroups:["whole-project"]});function Mt(t,e){return Et(t).has(x(e))}function Ne(t,e){let n=x(e),r=b(e);return r==="entry"||r==="worker"||Gt(n)||Mt(t,n)}function vt(t,e,n){let r=x(n),s=[];G(t,r)&&s.push("package-surface-file"),wt(t,e,r)&&s.push("transitive-package-surface"),Ie(t,e,r)&&s.push("rust-public-library"),Xt(e,r)&&s.push("framework-entrypoint");let i=t.config.entryRoots;return i&&(i.files?.some(o=>x(o)===r)&&s.push("configured-file"),i.pathPrefixes?.some(o=>r.startsWith(x(o)))&&s.push("configured-path-prefix"),i.qualifiedVars?.some(o=>Ut(e,o))&&s.push("configured-qualified-var"),i.symbolPatterns?.some(o=>{try{return xe(o,"entryRoots.symbolPatterns entry").test(e)}catch{return!1}})&&s.push("configured-symbol-pattern")),s}function _e(t,e,n){return vt(t,e,n).length>0}var Ct=g("package-surface-reachability",{clearGroups:["whole-project"]}),Tt=g("explicit-package-surface-reachability",{clearGroups:["whole-project"]});function wt(t,e,n){let r=Ft(t).get(n);return r===void 0?!1:r===null||r.has(k(e))}function In(t,e,n){let r=It(t).get(n);return r===void 0?!1:r===null||r.has(k(e))}function Ft(t){return Ct.get(t,()=>je(t,e=>G(t,e)))}function It(t){return Tt.get(t,()=>je(t,e=>ve(t,e)))}function je(t,e){let n=new Map,r=[];for(let s of h(t,{includeIgnored:!1}))e(s)&&(n.set(s,null),r.push(s));for(;r.length>0;){let s=r.shift(),i=n.get(s);if(i!==void 0)for(let o of se(t,s)){if(!o.sourcePath||t.isIgnored(o.sourcePath))continue;let a=Lt(i,o);a!==void 0&&At(n,o.sourcePath,a)&&r.push(o.sourcePath)}}return n}function Lt(t,e){if(t===null)return e.kind==="named"?new Set(e.names):null;if(e.kind==="star")return new Set(t);if(e.kind==="star-as")return e.names.some(r=>t.has(r))?null:void 0;let n=e.names.filter(r=>t.has(r));return n.length>0?new Set(n):void 0}function At(t,e,n){if(!t.has(e))return t.set(e,n),!0;let r=t.get(e);if(r===void 0)return!1;if(r===null||n===null)return r===null?!1:(t.set(e,null),!0);let s=!1;for(let i of n)r.has(i)||(r.add(i),s=!0);return s}var Oe=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),Nt=new Set(["default","generateMetadata","generateStaticParams"]),_t=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),jt=new Set(["default","middleware","config"]),Ot=new Set(["register","onRequestError"]),$t=new Set(["onRouterTransitionStart"]),Vt=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),Bt=new Set(["load","actions","entries",...Oe]),Kt=new Set(["default"]);function Xt(t,e){let n=k(t);return n===""?!1:$e(e)?Oe.has(n):Ve(e)?Nt.has(n):Be(e)?_t.has(n):Ke(e)?jt.has(n):Xe(e)?Ot.has(n):Ge(e)?$t.has(n):qe(e)?Vt.has(n):Ue(e)?Bt.has(n):qt(e)?Kt.has(n):!1}function Gt(t){return $e(t)||Ve(t)||Be(t)||Ke(t)||Xe(t)||Ge(t)||qe(t)||Ue(t)}function $e(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Ve(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Be(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Ke(t){return W(t,"(?:middleware|proxy)\\.(?:ts|js|mts|mjs)")}function Xe(t){return W(t,"instrumentation\\.(?:ts|js|mts|mjs)")}function Ge(t){return W(t,"instrumentation-client\\.(?:ts|js|mts|mjs)")}function W(t,e){return new RegExp(`^(?:src/)?${e}$`).test(t)||new RegExp(`(?:^|/)src/${e}$`).test(t)||new RegExp(`(?:^|/)(?:apps|services|packages)/[^/]+/(?:src/)?${e}$`).test(t)}function qe(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Ue(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function qt(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function Ut(t,e){let n=e.lastIndexOf("/");if(n<0)return!1;let r=e.slice(0,n),s=e.slice(n+1);return t.includes(Ae(r)+"/")&&t.includes(Ae(s)+".")}function Ae(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}function We(t,e,n={}){let r=new Map;if(e&&e.length===0)return r;let s=h(t,{includeIgnored:!1}),i=be(t),o=e??le(t),a=new Set(o.map(u=>u.symbolId)),l=zt(o);return Wt(t,r,s,i,a,l),Ht(t,r,o,a),Qt(t,r,s,i,a,l),n.semantic!==!1&&n.semanticEvidence&&tn(r,n.semanticEvidence.callerMap(t,en(o))),r}function Wt(t,e,n,r,s,i){for(let o of n){if(!R(o))continue;let a=re(t,o);if(a)for(let l of a){if(i&&!i.has(l.calleeLeaf))continue;let u=me(o,r.get(l.calleeLeaf)??[]);if(!u||u.length===0)continue;let c=ge(t,o,u,l.memberAccess,l.calleeQualifier);c&&s.has(c.symbolId)&&c.file!==o&&H(e,c.symbolId,o)}}}function Ht(t,e,n,r){let s=Zt(n);for(let i of Yt(t,r))t.isIgnored(i.relative_path)||Jt(i,s.get(i.symbol_id))||H(e,i.symbol_id,i.relative_path)}function Yt(t,e){return de(t,e?[...e]:void 0)}function Zt(t){let e=new Map;for(let n of t)e.set(n.symbolId,{docId:n.documentId,startLine:n.startLine,endLine:n.endLine});return e}function Jt(t,e){return!!e&&e.docId===t.document_id&&t.chunk_start>=e.startLine&&t.chunk_end<=e.endLine}function Qt(t,e,n,r,s,i){for(let o of n){if(R(o)!=="rust")continue;let a=P(t,o,{includeRustAttributeNames:!0});if(a.length!==0)for(let{name:l}of a){if(i&&!i.has(l))continue;let u=r.get(l);if(u)for(let c of u)s.has(c.symbolId)&&c.file!==o&&H(e,c.symbolId,o)}}}function H(t,e,n){let r=t.get(e);r||(r=new Set,t.set(e,r)),r.add(n)}function zt(t){let e=new Set;for(let n of t){let r="leaf"in n&&typeof n.leaf=="string"?n.leaf:"symbol"in n&&typeof n.symbol=="string"?k(n.symbol):"";r&&e.add(r)}return e.size>0?e:null}function en(t){return t.filter(e=>"relativePath"in e&&"symbol"in e&&"leaf"in e)}function tn(t,e){for(let[n,r]of e){let s=t.get(n);s||(s=new Set,t.set(n,s));for(let i of r)s.add(i)}}function Y(t,e,n={}){return We(t,e,n)}function Z(t,e,n={}){return Re(t,e,n)}function He(t,e,n={}){let r=Y(t,e,{semantic:n.semantic,semanticEvidence:n.semanticEvidence});return n.sourceFallback===!1?r:nn(r,Z(t,e))}function nn(t,e){let n=new Map;for(let[r,s]of t)n.set(r,new Set(s));for(let[r,s]of e){let i=n.get(r)??new Set;for(let o of s)i.add(o);n.set(r,i)}return n}function Ye(t,e,n){let r=e.identifierResolution==="strict"?K:he,s=e.candidateNames?Se(e.candidateNames):null,i=0,o=0,a=0,l=0,u="";for(let c of e.paths)if(i+=1,u=c,!(!R(c)&&!(e.includeVueSfc&&ne(c)))&&!t.isIgnored(c)&&!e.skipPath?.(c))try{if(s&&!ye(ee(t,c),s))continue;o+=1;let v=(d,m,j,D)=>{if(e.candidateNames&&!e.candidateNames.has(d))return;a+=1;let C=e.resolveTargets?e.resolveTargets({sourceFile:c,name:d,kind:m,defaultTargets:D}):D();for(let O of C)l+=1,n({sourceFile:c,name:d,target:O,occurrences:j,kind:m})},_=pe(t,c);for(let[d,m]of _)v(d,"identifier",m.length,()=>r(t,c,d));for(let d of P(t,c,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let m=d.kind==="cross-language-dispatch"?()=>K(t,c,d.name):()=>r(t,c,d.name);v(d.name,d.kind,d.occurrences,m)}}finally{e.afterPath?.(c),i%10===0&&J("source-reference-scan.progress",()=>{},()=>({scannedPaths:i,currentPath:u,candidateMatchedPaths:o,visitedNames:a,visitedHits:l}))}}function Ze(t,e={}){let{scope:n,files:r,minLoc:s=1,maxLoc:i=Number.POSITIVE_INFINITY,excludeSymbol:o,excludeEntrySurfaces:a=!1,excludeTypesFiles:l=!1,excludeRootedSymbols:u=!1,requireFunctionLikeSymbol:c=!1,requireCallableSymbol:N=!1,excludeRustTraitImplMembers:v=!1,includeSuppressed:_=!1,sortByLocDesc:d=!1}=e,m=[],j=rn(t,{scope:n,files:r,requireFunctionLikeSymbol:c,requireCallableSymbol:N}),D=new Map,C=new Map,O=f=>{let p=D.get(f);if(p!==void 0)return p;let y=Ne(t,f);return D.set(f,y),y},Qe=f=>{let p=C.get(f);if(p!==void 0)return p;let y=b(f);return C.set(f,y),y};for(let f of j){let p=f.relativePath;if(t.isIgnored(p)||a&&O(p)||!sn(f,{requireFunctionLikeSymbol:c,requireCallableSymbol:N})||o!==void 0&&f.symbol===o)continue;let y=L(f);y<s||y>i||l&&on(p)||u&&_e(t,f.symbol,p)||v&&ae(f.symbol)||Qe(p)!=="test"&&(ce(f.symbol)||!_&&w(t,p,f.startLine)||m.push(f))}return d?m.sort((f,p)=>L(p)-L(f)):m}function rn(t,e){return e.files!==void 0?[...new Set(e.files.map(r=>r.replace(/\\/g,"/")))].sort().filter(r=>!e.scope||r.includes(e.scope)).flatMap(r=>E(t,r)):e.requireCallableSymbol?B(t,{scope:e.scope,symbolMatches:$,sqlPrefilter:"callable"}):e.requireFunctionLikeSymbol?B(t,{scope:e.scope,symbolMatches:V,sqlPrefilter:"function-like"}):fe(t,e.scope)}function sn(t,e){return e.requireCallableSymbol?$(t.symbol):e.requireFunctionLikeSymbol?V(t.symbol):t.isFunctionLike}function on(t){return(t.split("/").pop()??"").includes("types")}var Je=class{constructor(e){this.db=e}db;scopedDefinitions(e){return ue(this.db,e)}definitionsForFile(e){return E(this.db,e)}productionCallableDefinitions(e={}){return Ze(this.db,e)}calleeMap(e,n={}){return Pe(this.db,e,{...n,semanticEvidence:I})}crossFileCallerMap(e,n={}){return Y(this.db,e,{...n,semanticEvidence:I})}sourceFallbackCallerFiles(e,n={}){return Z(this.db,e,n)}callerFileMap(e,n={}){return He(this.db,e,{...n,semanticEvidence:I})}frameworkReferencedSymbolIds(e){let n=new Map;for(let s of e){if(!s.leaf)continue;let i=n.get(s.leaf)??[];i.push(s.symbolId),n.set(s.leaf,i)}let r=new Set;for(let s of h(this.db,{includeIgnored:!1}))if(R(s)==="rust")for(let{name:i}of P(this.db,s,{includeRustAttributeNames:!0}))for(let o of n.get(i)??[])r.add(o);return r}symbolsWithNonSelfCallees(e,n={}){if(e.length===0)return new Set;let r=new Map(e.map(i=>[i.symbolId,i.symbol])),s=this.calleeMap(e,n);return new Set([...s.entries()].filter(([i,o])=>{let a=r.get(i);return o.some(l=>l.symbol!==a)}).map(([i])=>i))}fileDependencyGraph(e){return F(this.db,e)}fileKind(e){return b(e)}hasSuppressionComment(e){return w(this.db,e.relativePath,e.startLine)}sourceFiles(){return ie(this.db)}scanSourceReferences(e,n){Ye(this.db,e,n)}callableSignature(e){let n=oe(this.db).forFile(e.relativePath,{facts:!0}).facts?.callables.find(r=>r.startLine===e.startLine&&r.endLine===e.endLine);return n?{paramCount:n.paramCount}:null}};export{Ne as a,vt as b,In as c,Je as d};
|
|
4
|
+
//# sourceMappingURL=chunk-SVHTMVA4.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
1
|
+
import{a as d}from"./chunk-Z2AWCTN6.js";import{b as l}from"./chunk-BWVQP3LB.js";import{d as r,u as m}from"./chunk-TD7VKJ2Y.js";function u(o,t={}){let{limit:i=30,scope:e}=t,n=e?"AND def_d.relative_path LIKE ?":"",f=e?[`%${e}%`]:[],c=o.all(`SELECT
|
|
2
2
|
gs.symbol,
|
|
3
3
|
COUNT(*) AS ref_count,
|
|
4
4
|
COUNT(DISTINCT ref_d.id) AS file_count,
|
|
@@ -23,4 +23,4 @@ import{a as d}from"./chunk-6BJ7SOY7.js";import{b as l}from"./chunk-ICUQONOG.js";
|
|
|
23
23
|
GROUP BY gs.id
|
|
24
24
|
ORDER BY ref_count DESC
|
|
25
25
|
LIMIT ?`,...f,i).filter(s=>!o.isIgnored(s.defined_in)).map(s=>({symbol:s.symbol,shortName:r(s.symbol),refCount:s.ref_count,fileCount:s.file_count,definedIn:s.defined_in,basis:"scip-cross-file-mentions",countUnit:"reference-occurrences"}));return c.length>0?c:a(o,e,i)}function C(o,t={}){return u(o,t)}function a(o,t,i){return m(o,{scope:t}).filter(e=>!o.isIgnored(e.relativePath)).map(e=>p(o,e)).filter(e=>e.refCount>0).sort((e,n)=>n.refCount-e.refCount||n.fileCount-e.fileCount).slice(0,i)}function p(o,t){let e=l(o,t,{limit:500,semanticEvidence:d}).filter(n=>n.file!==t.relativePath);return{symbol:t.symbol,shortName:r(t.symbol),refCount:e.length,fileCount:new Set(e.map(n=>n.file)).size,definedIn:t.relativePath,basis:"source-backed-incoming-evidence",countUnit:"distinct-incoming-evidence-rows"}}export{u as a,C as b};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-SWK4XPUS.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import{H as G,J as O,b as R,c as x}from"./chunk-C7IJMOFP.js";import{a as F}from"./chunk-YXPUP5G2.js";import{b as P,d as E}from"./chunk-DKM723YF.js";import{c as I}from"./chunk-IW5XQG5G.js";import{e as g}from"./chunk-HGFDYOVB.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-T6QD2ZQB.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{e as i}from"./chunk-
|
|
1
|
+
import{e as i}from"./chunk-TD7VKJ2Y.js";import{a as o}from"./chunk-42W3LFUK.js";import{E as s}from"./chunk-Q7GBK5T7.js";function u(r,e){let t=s(r,e.relativePath);if(t.length===0)return!1;let n=i(e.symbol);if(!n)return!1;let c=t.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
|
|
2
2
|
`),a=o(n);return new RegExp(`^\\s*export\\s+(?:default\\s+)?(?:(?:async\\s+)?function\\s+${a}\\b|(?:abstract\\s+)?class\\s+${a}\\b|(?:interface|type|enum|namespace|module)\\s+${a}\\b|(?:const|let|var)\\s+${a}\\b)`,"m").test(c)?!0:p(t,n)}function p(r,e){if(!e)return!1;let t=new RegExp(`^\\s*export\\s*\\{[^}\\n]*\\b${o(e)}\\b`);return r.some(n=>t.test(n))}export{u as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-TAYD3AE7.js.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import{a as I,n as v,q as P,w as Q,x as j}from"./chunk-42W3LFUK.js";import{C as A,a as D}from"./chunk-7JYHQAH2.js";import{B as $,E as w,c as S,d as N,i as h,j as x,p as _,w as C,y as O,z as T}from"./chunk-Q7GBK5T7.js";var ie={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function u(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let n=e.split(" ");if(n.length<4)return{scheme:n[0]??"",manager:n[1]??"",packageName:n[2]??"",version:"",descriptors:[],raw:e};let t=n[0],i=n[1],r=e.slice(t.length+1+i.length+1),s;if(r.startsWith("`")){let l=r.indexOf("`",1);l===-1?(s=r.slice(1),r=""):(s=r.slice(1,l),r=r.slice(l+2))}else{let l=r.indexOf(" ");l===-1?(s=r,r=""):(s=r.slice(0,l),r=r.slice(l+1))}let o,a=r.indexOf(" ");a===-1?(o=r,r=""):(o=r.slice(0,a),r=r.slice(a+1));let c=re(r);return{scheme:t,manager:i,packageName:s,version:o,descriptors:c,raw:e}}function p(e){let n=u(e);if("kind"in n)return null;for(let t=n.descriptors.length-2;t>=0;t--){let i=n.descriptors[t];if(i?.suffix==="type")return i.name}return null}function re(e){let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let s=e.indexOf("]",t+1);if(s===-1){n.push({name:e.slice(t+1),suffix:"type-param"});break}n.push({name:e.slice(t+1,s),suffix:"type-param"}),t=s+1;continue}if(e[t]==="("&&(n.length===0||t===0||B(e[t-1]))){let s=e.indexOf(")",t+1);if(s!==-1&&e[s+1]!=="."){n.push({name:e.slice(t+1,s),suffix:"parameter"}),t=s+1;continue}}let i;if(e[t]==="`"){let s=e.indexOf("`",t+1);if(s===-1){i=e.slice(t+1),n.push({name:i,suffix:"term"});break}i=e.slice(t+1,s),t=s+1}else{let s=t;for(;t<e.length&&!B(e[t]);)t++;i=e.slice(s,t)}if(t>=e.length){i&&n.push({name:i,suffix:"term"});break}let r=e[t];if(r==="("){let s=e.indexOf(")",t+1);s!==-1&&e[s+1]==="."?(n.push({name:i,suffix:"method"}),t=s+2):s!==-1?(n.push({name:i,suffix:"method"}),t=s+1):(n.push({name:i,suffix:"term"}),t++)}else{let s=ie[r];s&&n.push({name:i,suffix:s}),t+=1}}return n}function B(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function W(e){let n=u(e);if("kind"in n&&n.kind==="local")return`local:${n.id}`;let t=n;if(t.descriptors.length===0)return t.raw;let i=[];for(let r of t.descriptors){let s=se(r);s&&i.push(s)}return i.join(":")}function se(e){let n=e.suffix==="namespace"?oe(e.name):e.name;return n?e.suffix==="method"?`${n}()`:n:""}function oe(e){return e.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/,"").replace(/\.(py|pyi)$/,"").replace(/\.(rs)$/,"").replace(/\.(java|scala|kt|kts)$/,"").replace(/\.(rb)$/,"").replace(/\.(go)$/,"").replace(/\.(cs|vb)$/,"").replace(/\.(dart)$/,"").replace(/\.(php)$/,"").replace(/\.(c|cc|cpp|cxx|h|hpp)$/,"")}function J(e){let n=u(e);if("kind"in n&&n.kind==="local")return n.id;let t=n;return t.descriptors.length===0?"":t.descriptors[t.descriptors.length-1].name}function g(e){let n=u(e);if("kind"in n&&n.kind==="local")return null;let t=n;return t.descriptors[t.descriptors.length-1]?.suffix??null}function Be(e){return e.endsWith("().")||g(e)==="method"}function L(e){let n=g(e);return n==="method"?!0:n!=="term"?!1:e.endsWith("().")?!0:e.startsWith("rust-analyzer ")&&e.includes("#")?!1:e.startsWith("scip-typescript ")?!/#[A-Za-z0-9_$]+\.$/.test(e):!0}function We(e){return g(e)==="namespace"}var ae=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function Je(e){return ae.test(e)}var le=new Set(["test","tests","_tests"]);function ze(e){let n=u(e);if("kind"in n)return!1;for(let t=0;t<n.descriptors.length-1;t+=1){let i=n.descriptors[t];if(i?.suffix==="namespace"&&i.name&&le.has(i.name))return!0}return!1}function He(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length!==r.length+1)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Ge(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length<=r.length)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Ke(e,n){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.start_char, der.end_line, der.end_char, d.relative_path, gs.display_name, gs.documentation
|
|
2
|
+
FROM global_symbols gs
|
|
3
|
+
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
4
|
+
JOIN documents d ON der.document_id = d.id
|
|
5
|
+
WHERE ${n.where}
|
|
6
|
+
${e.pathExclusionsFor("d")}
|
|
7
|
+
${H(n.orderBy)}
|
|
8
|
+
${G(n.limit)}`,...n.params??[])}function Ye(e,n){return e.all(`SELECT
|
|
9
|
+
gs.id,
|
|
10
|
+
gs.symbol,
|
|
11
|
+
c.document_id,
|
|
12
|
+
MIN(c.start_line) AS start_line,
|
|
13
|
+
0 AS start_char,
|
|
14
|
+
MAX(c.end_line) AS end_line,
|
|
15
|
+
0 AS end_char,
|
|
16
|
+
d.relative_path,
|
|
17
|
+
gs.display_name,
|
|
18
|
+
gs.documentation
|
|
19
|
+
FROM global_symbols gs
|
|
20
|
+
JOIN mentions m ON m.symbol_id = gs.id
|
|
21
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
22
|
+
JOIN documents d ON c.document_id = d.id
|
|
23
|
+
WHERE m.role = 1
|
|
24
|
+
AND ${n.where}
|
|
25
|
+
${e.pathExclusionsFor("d")}
|
|
26
|
+
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
|
|
27
|
+
${H(n.orderBy)}
|
|
28
|
+
${G(n.limit)}`,...n.params??[])}function H(e){return e?`ORDER BY ${e}`:""}function G(e){return typeof e=="number"?`LIMIT ${e}`:""}function U(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function K(e){if(!e)return null;let n=z(e);if(n)return n.replace(/\n/g," ");let t=e.indexOf("|");if(t===-1)return e.replace(/\n/g," ");let i=e.slice(t+1);return(z(i)??i).replace(/\n/g," ")}function z(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function b(e){return{forFile(n,t){return Y(e,n,t)},forFiles(n,t){let i=new Map;for(let r of n)i.set(r,Y(e,r,t));return i}}}function Y(e,n,t){let i={file:n},r=t.facts||t.identifiers;if(t.text&&(i.text=$(e,n)),t.lines&&(i.lines=w(e,n)),t.ast&&(i.ast=A(e,n)),t.imports&&(i.imports=j(e,n)),t.reexports&&(i.reexports=Q(e,n)),r){let s=v(e,n),o=s.facts;t.facts&&(i.facts=o),s.unavailable&&(i.sourceFactsUnavailable=s.unavailable),t.identifiers&&o&&(i.identifiers=o.fileIdentifiers,i.identifierLineMap=o.identifierLineMap)}return i}function ce(e,n={}){if(p(e.symbol)!==null)return n.includeClassMemberFallbacks===!0;let r=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(r)}function F(e,n,t={}){let i=new Map;for(let s of n)e.length>0&&!ce(s,{includeClassMemberFallbacks:t.includeClassMemberFallbacks})||i.set(s.id,s);for(let s of e)i.set(s.id,s);let r=[...i.values()];return t.sort?r.sort((s,o)=>s.start_line-o.start_line||s.end_line-o.end_line||s.symbol.localeCompare(o.symbol)):r}function yn(e){let n=new Map;for(let t of e){if(!t.leaf)continue;let i=n.get(t.leaf)??[];i.push(t),n.set(t.leaf,i)}return n}var de=S("file-definitions",{clearGroups:["definition-catalog"]}),ue=N("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),fe=S("file-function-like-definitions",{clearGroups:["definition-catalog"]}),X=new WeakMap;function E(e,n,t={},i){return T(n),t.includeClassMemberFallbacks?R(e,n,void 0,{includeClassMemberFallbacks:!0},i):de.get(e,n,()=>{let r=m(i,"evidence-read",()=>ee(e,n));if(r)return r;let s=R(e,n,void 0,t,i);return m(i,"evidence-write",()=>{let o=x(e),a=b(e).forFile(n,{text:!0}).text;o&&a&&V.write(e,n,h(e,n,a),{projectFingerprint:o,definitions:s.map(c=>({...c}))})}),s})}function me(e,n){return fe.get(e,n,()=>{let t=ee(e,n);return t?t.filter(i=>i.isFunctionLike):R(e,n,i=>i.isFunctionLike)})}var V=C({kind:"file-definitions",invalidation:O("file-definitions"),serialize:pe,deserialize:ge});function ee(e,n){let t=x(e);if(!t)return null;let i=b(e).forFile(n,{text:!0}).text;if(!i)return null;let r=V.read(e,n,h(e,n,i));return r?be(r,t,n):null}function pe(e){return JSON.stringify(e)}function ge(e){try{let n=JSON.parse(e);return!_(n)||typeof n.projectFingerprint!="string"||!Array.isArray(n.definitions)?null:{projectFingerprint:n.projectFingerprint,definitions:n.definitions}}catch{return null}}function be(e,n,t){if(e.projectFingerprint!==n)return null;let i=[];for(let r of e.definitions){let s=ye(r,t);if(!s)return null;i.push(s)}return i}function ye(e,n){return!_(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.startChar!="number"&&e.startChar!==void 0||typeof e.endLine!="number"||typeof e.endChar!="number"&&e.endChar!==void 0||e.relativePath!==n||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,startChar:e.startChar,endLine:e.endLine,endChar:e.endChar,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function R(e,n,t,i={},r){let s=m(r,"primary-rows",()=>Se(e,n)),o=m(r,"fallback-rows",()=>he(e,n)),a=m(r,"merge-rows",()=>F(s,o,{sort:!0,includeClassMemberFallbacks:i.includeClassMemberFallbacks}).map(k));return t&&(a=a.filter(t)),m(r,"range-correction",()=>M(e,n,a,r,i.rangeCorrectionEvidence))}function m(e,n,t){return e?e(n,t):t()}function Se(e,n){return e.all(`SELECT
|
|
29
|
+
gs.id,
|
|
30
|
+
gs.symbol,
|
|
31
|
+
der.document_id,
|
|
32
|
+
der.start_line,
|
|
33
|
+
der.start_char,
|
|
34
|
+
der.end_line,
|
|
35
|
+
der.end_char,
|
|
36
|
+
d.relative_path,
|
|
37
|
+
gs.display_name,
|
|
38
|
+
gs.kind,
|
|
39
|
+
gs.documentation,
|
|
40
|
+
gs.enclosing_symbol
|
|
41
|
+
FROM global_symbols gs
|
|
42
|
+
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
43
|
+
JOIN documents d ON der.document_id = d.id
|
|
44
|
+
WHERE d.relative_path = ?
|
|
45
|
+
${e.symbolNoiseFor("gs")}
|
|
46
|
+
ORDER BY der.start_line, der.end_line`,n)}function he(e,n){return e.all(`SELECT
|
|
47
|
+
gs.id,
|
|
48
|
+
gs.symbol,
|
|
49
|
+
c.document_id,
|
|
50
|
+
MIN(c.start_line) AS start_line,
|
|
51
|
+
0 AS start_char,
|
|
52
|
+
MAX(c.end_line) AS end_line,
|
|
53
|
+
0 AS end_char,
|
|
54
|
+
d.relative_path,
|
|
55
|
+
gs.display_name,
|
|
56
|
+
gs.kind,
|
|
57
|
+
gs.documentation,
|
|
58
|
+
gs.enclosing_symbol
|
|
59
|
+
FROM global_symbols gs
|
|
60
|
+
JOIN mentions m ON m.symbol_id = gs.id
|
|
61
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
62
|
+
JOIN documents d ON c.document_id = d.id
|
|
63
|
+
WHERE d.relative_path = ?
|
|
64
|
+
AND m.role = 1
|
|
65
|
+
${e.symbolNoiseFor("gs")}
|
|
66
|
+
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
|
|
67
|
+
ORDER BY start_line, end_line`,n)}function k(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,startChar:e.start_char??0,endLine:e.end_line,endChar:e.end_char??0,relativePath:e.relative_path,leaf:J(e.symbol),parentTypeName:p(e.symbol),isFunctionLike:L(e.symbol),isTypeLike:g(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function Sn(e,n={}){return xe(e,n.scope)}function xe(e,n){return D(e,{scope:n,includeIgnored:!1}).flatMap(t=>E(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function hn(e,n){return D(e,{scope:n,includeIgnored:!1}).flatMap(t=>me(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function xn(e,n){let t=ue.get(e,()=>new WeakMap),i=t.get(n.symbolMatches);i||(i=new Map,t.set(n.symbolMatches,i));let r=JSON.stringify({scope:n.scope??null,sqlPrefilter:n.sqlPrefilter??null}),s=i.get(r);if(s)return[...s];let o=Z(De(e,n.scope,n.sqlPrefilter)),a=Z(_e(e,n.scope,n.sqlPrefilter)),c=new Set([...o.keys(),...a.keys()]),l=[];for(let d of[...c].sort()){if(e.isIgnored(d))continue;let f=F(o.get(d)??[],a.get(d)??[],{sort:!0}).filter(te=>n.symbolMatches(te.symbol));f.length!==0&&l.push(...M(e,d,f.map(k)))}return i.set(r,l),[...l]}function De(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${ne("gs",t)}`:"",s=n?[`%${n}%`]:[];return e.all(`SELECT
|
|
68
|
+
gs.id,
|
|
69
|
+
gs.symbol,
|
|
70
|
+
der.document_id,
|
|
71
|
+
der.start_line,
|
|
72
|
+
der.start_char,
|
|
73
|
+
der.end_line,
|
|
74
|
+
der.end_char,
|
|
75
|
+
d.relative_path,
|
|
76
|
+
gs.display_name,
|
|
77
|
+
gs.kind,
|
|
78
|
+
gs.documentation,
|
|
79
|
+
gs.enclosing_symbol
|
|
80
|
+
FROM global_symbols gs
|
|
81
|
+
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
82
|
+
JOIN documents d ON der.document_id = d.id
|
|
83
|
+
WHERE 1 = 1
|
|
84
|
+
${e.pathExclusionsFor("d")}
|
|
85
|
+
${i}
|
|
86
|
+
${r}
|
|
87
|
+
${e.symbolNoiseFor("gs")}
|
|
88
|
+
ORDER BY d.relative_path, der.start_line, der.end_line`,...s)}function _e(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${ne("gs",t)}`:"",s=n?[`%${n}%`]:[];return e.all(`SELECT
|
|
89
|
+
gs.id,
|
|
90
|
+
gs.symbol,
|
|
91
|
+
c.document_id,
|
|
92
|
+
MIN(c.start_line) AS start_line,
|
|
93
|
+
0 AS start_char,
|
|
94
|
+
MAX(c.end_line) AS end_line,
|
|
95
|
+
0 AS end_char,
|
|
96
|
+
d.relative_path,
|
|
97
|
+
gs.display_name,
|
|
98
|
+
gs.kind,
|
|
99
|
+
gs.documentation,
|
|
100
|
+
gs.enclosing_symbol
|
|
101
|
+
FROM global_symbols gs
|
|
102
|
+
JOIN mentions m ON m.symbol_id = gs.id
|
|
103
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
104
|
+
JOIN documents d ON c.document_id = d.id
|
|
105
|
+
WHERE m.role = 1
|
|
106
|
+
AND NOT EXISTS (
|
|
107
|
+
SELECT 1
|
|
108
|
+
FROM defn_enclosing_ranges existing_der
|
|
109
|
+
WHERE existing_der.symbol_id = gs.id
|
|
110
|
+
)
|
|
111
|
+
${e.pathExclusionsFor("d")}
|
|
112
|
+
${i}
|
|
113
|
+
${r}
|
|
114
|
+
${e.symbolNoiseFor("gs")}
|
|
115
|
+
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
|
|
116
|
+
ORDER BY d.relative_path, start_line, end_line`,...s)}function Ie(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function ne(e,n){return n==="callable"?Ie(e):Le(e)}function Le(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function Z(e){let n=new Map;for(let t of e){let i=n.get(t.relative_path);i?i.push(t):n.set(t.relative_path,[t])}return n}function Dn(e,n,t={}){if(n.length===0)return[];let i=n.flatMap(r=>E(e,r)).filter(r=>!e.isIgnored(r.relativePath));return t.onlyDocumented&&(i=i.filter(r=>r.documentation!==null&&r.documentation!=="")),t.sort&&(i=i.sort((r,s)=>r.relativePath.localeCompare(s.relativePath)||r.startLine-s.startLine||r.endLine-s.endLine)),i.map(r=>({startLine:r.startLine,endLine:r.endLine,symbol:r.symbol,shortName:W(r.symbol),signature:U(K(r.documentation)),relativePath:r.relativePath,enclosingSymbol:r.enclosingSymbol}))}function Fe(e){let n=new Map,t=e.map((i,r)=>({definition:i,index:r,span:i.endLine-i.startLine})).sort((i,r)=>i.span-r.span||i.index-r.index);for(let{definition:i}of t)for(let r=i.startLine;r<=i.endLine;r+=1)n.has(r)||n.set(r,i);return n}function _n(e,n){let t=X.get(e);return t||(t=Fe(e),X.set(e,t)),t.get(n)??null}function In(e,n){let t=E(e,n.relative_path).find(i=>i.symbolId===n.id)??(p(n.symbol)===null||!L(n.symbol)?void 0:M(e,n.relative_path,[k(n)])[0]);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,startChar:t.startChar,endLine:t.endLine,endChar:t.endChar,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,startChar:n.start_char??0,endLine:n.end_line,endChar:n.end_char??0,relativePath:n.relative_path}}function M(e,n,t,i,r){let s=m(i,"range-correction.source-text",()=>r?r.source:b(e).forFile(n,{text:!0}).text),o=m(i,"range-correction.callable-sites",()=>r?r.callables:P(e,n));return o?m(i,"range-correction.ast-correction",()=>Ce(t,o,s)):s?m(i,"range-correction.regex-fallback",()=>Re(t,s)):t}function Re(e,n){let t=n.split(/\r?\n/),i=Ee(e,t),r=ke(e,i),s=Me(r,t);return Ne(e,s)}function Ee(e,n){let t=e.some(r=>y(r.symbol))?Pe(n):null,i=new Map;for(let r of e)i.set(r.symbolId,ve(n,t,r));return i}function ke(e,n){return e.filter(t=>y(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,i)=>t.startLine-i.startLine||t.definition.startLine-i.definition.startLine||t.definition.symbol.localeCompare(i.definition.symbol))}function Me(e,n){let t=new Map;for(let i=0;i<e.length;i+=1){let r=e[i],s=e[i+1],o=s?Math.max(r.startLine,s.startLine-1):n.length-1;t.set(r.definition.symbolId,{startLine:r.startLine,endLine:Qe(n,r.definition,r.startLine,o)})}return t}function Ne(e,n){return e.map(t=>{let i=n.get(t.symbolId);return i?{...t,startLine:i.startLine,endLine:i.endLine}:t})}function Ce(e,n,t=null){let i=new Map;for(let r of n){let s=i.get(r.name);s?s.push(r):i.set(r.name,[r])}return e.map(r=>{if(!Ae(r)||!r.leaf)return q(r,t);let s=i.get(r.leaf);if(!s||s.length===0)return q(r,t);let o=t?Oe(r,s,t):null;if(o)return{...r,startLine:o.startLine,endLine:o.endLine};let a=s[0],c=Math.abs(a.startLine-r.startLine);for(let l=1;l<s.length;l+=1){let d=s[l],f=Math.abs(d.startLine-r.startLine);f<c&&(a=d,c=f)}return{...r,startLine:a.startLine,endLine:a.endLine}})}function Oe(e,n,t){let i=Te(e.symbol);if(!i)return null;let r=t.split(/\r?\n/),s=new RegExp(`\\b${I(i)}\\b`);for(let o of n){let a=$e(r,o.startLine);if(a&&s.test(a))return o}return null}function Te(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function $e(e,n){for(let t=n;t>=0;t-=1){let i=e[t]?.trim()??"";if(i){if(/^impl\b/.test(i))return we(e,t,n);if(/^(?:struct|enum|trait|mod)\b/.test(i))return null}}return null}function we(e,n,t){let i=[];for(let r=n;r<=t;r+=1){let s=e[r]??"";if(i.push(s),s.includes("{"))break}return i.join(" ")}function Ae(e){return y(e.symbol)?!0:g(e.symbol)==="term"&&p(e.symbol)===null}function q(e,n){if(!n||!e.leaf||g(e.symbol)!=="term"||p(e.symbol)!==null)return e;let t=I(e.leaf),i=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),s=n.split(/\r?\n/).findIndex(o=>i.test(o));return s>=0?{...e,startLine:s,endLine:s}:e}function ve(e,n,t){if(!y(t.symbol))return t.startLine;let i=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return i;let r=n.get(t.leaf);if(!r||r.length===0)return i;let s=null;for(let o of r){let a=Math.abs(o-t.startLine);(!s||a<s.distance)&&(s={line:o,distance:a})}return s?.line??i}function Pe(e){let n=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,t=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,i=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,r=/\b([A-Za-z_$][\w$]*)\s*\(/g,s=new Map,o=(a,c)=>{let l=s.get(a);if(!l){s.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let d of c.matchAll(n))d[1]&&o(d[1],a);for(let d of c.matchAll(t))d[1]&&o(d[1],a);let l=c.match(i);l?.[1]&&o(l[1],a);for(let d of c.matchAll(r))d[1]&&o(d[1],a)}return s}function Qe(e,n,t,i){let r=Math.max(t,Math.min(e.length-1,i)),s=Math.max(t,Math.min(r,n.endLine)),o=0,a=0,c=!1;for(let l=t;l<=r;l+=1){let d=je(e[l]??"");for(let f of d)f==="{"?(o+=1,c=!0):f==="}"?o=Math.max(0,o-1):f==="("?a+=1:f===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=s)return l}return s}function je(e){let n="",t=null,i=!1;for(let r=0;r<e.length;r+=1){let s=e[r],o=e[r+1];if(!t&&s==="/"&&o==="/"){n+=" ".repeat(e.length-r);break}if(t){if(i){i=!1,n+=" ";continue}if(s==="\\"){i=!0,n+=" ";continue}s===t&&(t=null),n+=" ";continue}if(s==='"'||s==="'"||s==="`"){t=s,n+=" ";continue}n+=s}return n}function y(e){return e.includes("().")}function Ln(e){let n=u(e);if("kind"in n)return[];let t=[];for(let i=n.descriptors.length-2;i>=0;i-=1){let r=n.descriptors[i];r?.suffix==="type"&&r.name&&t.push(r.name)}return t}export{b as a,u as b,p as c,W as d,J as e,g as f,Be as g,L as h,We as i,Je as j,ze as k,He as l,Ge as m,Ke as n,Ye as o,U as p,K as q,F as r,yn as s,E as t,Sn as u,xe as v,hn as w,xn as x,Dn as y,Fe as z,_n as A,In as B,Ln as C};
|
|
117
|
+
//# sourceMappingURL=chunk-TD7VKJ2Y.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-56NQAEPJ.js";import{a as t}from"./chunk-T6QD2ZQB.js";function a(e,o){let r=i(e,o);return r?t(e,"forward",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}function p(e,o){let r=i(e,o);return r?t(e,"reverse",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}export{a,p as b};
|
|
2
|
+
//# sourceMappingURL=chunk-TH6IC56G.js.map
|