scip-query 0.21.1 → 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 +60 -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-5QM7QT5B.js → chunk-25GWKRUZ.js} +2 -2
- package/dist/chunk-2BTJALUS.js +454 -0
- package/dist/{chunk-4ZCLDH6T.js → chunk-2KVU55CW.js} +2 -2
- package/dist/{chunk-CQVDALWQ.js → chunk-2OXVP5U5.js} +2 -2
- package/dist/{chunk-I2LY3KN7.js → chunk-2RE5OCHZ.js} +2 -2
- package/dist/{chunk-5J3A6RBZ.js → chunk-2XCGSDIT.js} +2 -2
- package/dist/{chunk-4KIPF45P.js → chunk-2YC7YNKT.js} +2 -2
- package/dist/{chunk-ZNW5A5VX.js → chunk-3QXC54FQ.js} +2 -2
- package/dist/{chunk-SGSPCEFC.js → chunk-3TJY6M3B.js} +2 -2
- package/dist/chunk-42W3LFUK.js +13 -0
- package/dist/chunk-44T4DUAA.js +2 -0
- package/dist/{chunk-YBWE6J32.js → chunk-4GAQ6FI4.js} +2 -2
- package/dist/{chunk-OU6SDWAM.js → chunk-4HE7MVWD.js} +2 -2
- package/dist/{chunk-QN2AI3D2.js → chunk-4TQU4TX2.js} +2 -2
- package/dist/{chunk-OMVNRPST.js → chunk-56NQAEPJ.js} +2 -2
- package/dist/{chunk-O4PZFAXA.js → chunk-57N6LN2A.js} +2 -2
- package/dist/{chunk-7MUHSZGN.js → chunk-5H5WTJSD.js} +2 -2
- package/dist/{chunk-J4HUBIVF.js → chunk-5YRQIE2B.js} +2 -2
- package/dist/{chunk-3XQLJG7V.js → chunk-5ZMBRQFC.js} +2 -2
- package/dist/{chunk-H2RBDP5S.js → chunk-6HRZQLOI.js} +2 -2
- package/dist/{chunk-PJBYDCBQ.js → chunk-6NC3YSPY.js} +2 -2
- package/dist/{chunk-MLTSTKXD.js → chunk-6VEFRPTD.js} +2 -2
- package/dist/{chunk-JLZWYDCZ.js → chunk-7C26EKLZ.js} +2 -2
- package/dist/{chunk-LXMW6ZAX.js → chunk-7IQXARSQ.js} +2 -2
- package/dist/chunk-7JYHQAH2.js +22 -0
- package/dist/{chunk-YA72ZUKO.js → chunk-7KSO2OAP.js} +2 -2
- package/dist/{chunk-YT4IQBET.js → chunk-7U2YQSDE.js} +2 -2
- package/dist/{chunk-XDOEHEET.js → chunk-7XA3OM44.js} +2 -2
- package/dist/{chunk-BCTCADNB.js → chunk-7XZGZBSQ.js} +2 -2
- package/dist/{chunk-3KXFB2FM.js → chunk-7YQOCABQ.js} +2 -2
- package/dist/chunk-A77SCPW2.js +3 -0
- package/dist/chunk-AK3PYTIK.js +5 -0
- package/dist/{chunk-6X4KO5A7.js → chunk-AMIMMNA4.js} +2 -2
- package/dist/{chunk-PWEQ6CZZ.js → chunk-AQ2PORIO.js} +2 -2
- package/dist/{chunk-E6N6YTVM.js → chunk-ARVO6TTW.js} +2 -2
- package/dist/{chunk-U7DOYZDH.js → chunk-AUY5BL74.js} +2 -2
- package/dist/{chunk-B3AREUQK.js → chunk-AYPDH2LU.js} +2 -2
- package/dist/{chunk-HR5JYLVV.js → chunk-AZS7YPCB.js} +2 -2
- package/dist/{chunk-ZQUNCTEZ.js → chunk-BDGTPN27.js} +2 -2
- package/dist/{chunk-DZNWXJN2.js → chunk-BDHFVH2M.js} +2 -2
- package/dist/{chunk-743MEVFJ.js → chunk-BECZLYNU.js} +2 -2
- package/dist/{chunk-4IASLUOP.js → chunk-BJT7LSPK.js} +2 -2
- package/dist/{chunk-X5MWO4DM.js → chunk-BTVKZGWT.js} +2 -2
- package/dist/{chunk-HYU4W353.js → chunk-BUTEIZKP.js} +2 -2
- package/dist/{chunk-UXNXOMXJ.js → chunk-BVFYEEBH.js} +2 -2
- package/dist/{chunk-UM56ZET4.js → chunk-BWVQP3LB.js} +2 -2
- package/dist/chunk-BYDAFMSR.js +57 -0
- package/dist/{chunk-P3UFF22M.js → chunk-C76O5MDS.js} +2 -2
- package/dist/chunk-C7IJMOFP.js +134 -0
- package/dist/{chunk-IM23CSG5.js → chunk-CBBHFNLX.js} +2 -2
- package/dist/{chunk-IZKJQQCQ.js → chunk-CKRWA452.js} +2 -2
- package/dist/{chunk-YLNCTPOI.js → chunk-CLG6DWVS.js} +2 -2
- package/dist/{chunk-DXEJ4FLZ.js → chunk-D2MVJSP4.js} +8 -8
- package/dist/chunk-D35XIZGN.js +2 -0
- package/dist/{chunk-AQF35NGT.js → chunk-DEAB5TGT.js} +2 -2
- package/dist/{chunk-7G2WIVIX.js → chunk-DJAO2OZJ.js} +2 -2
- package/dist/{chunk-PRLU3I7G.js → chunk-DKM723YF.js} +4 -4
- package/dist/{chunk-RSUH7G5T.js → chunk-DPWKKNKI.js} +2 -2
- package/dist/chunk-E44IVWIJ.js +367 -0
- package/dist/{chunk-W7HN6V4E.js → chunk-EDMB6SSO.js} +2 -2
- package/dist/{chunk-YCXQQ3YB.js → chunk-EELG7D3Q.js} +2 -2
- package/dist/{chunk-T2PBOVDI.js → chunk-EELPBR7E.js} +2 -2
- package/dist/{chunk-PAZSBPJR.js → chunk-EETGXQY7.js} +2 -2
- package/dist/{chunk-DUDUIT5P.js → chunk-ENWQWA2R.js} +2 -2
- package/dist/{chunk-QH5Q6M5C.js → chunk-ERCYGVAM.js} +2 -2
- package/dist/{chunk-ZGDHC5AT.js → chunk-EWWY2ZFL.js} +2 -2
- package/dist/{chunk-LJMWILX6.js → chunk-F24G5NBE.js} +2 -2
- package/dist/{chunk-XNF5T4T2.js → chunk-F24QUEQP.js} +2 -2
- package/dist/{chunk-IH3K5J6K.js → chunk-FBCVASUG.js} +2 -2
- package/dist/{chunk-EPLE5O5O.js → chunk-FELGD32K.js} +2 -2
- package/dist/{chunk-PU6XDQ2X.js → chunk-FFJQZG6J.js} +5 -5
- package/dist/{chunk-JGMD6JGB.js → chunk-FGNCOQUX.js} +2 -2
- package/dist/chunk-FKGQOTKD.js +2 -0
- package/dist/{chunk-27OUNZW5.js → chunk-GDRJB3SB.js} +2 -2
- package/dist/chunk-GH5YSGZL.js +5 -0
- package/dist/{chunk-IHGK3SZ7.js → chunk-GIQ6CSL4.js} +2 -2
- package/dist/{chunk-ITF3CWS5.js → chunk-GPGRZJ3R.js} +2 -2
- package/dist/{chunk-EJHNTAEE.js → chunk-GQIDEID3.js} +2 -2
- package/dist/{chunk-UEQORB2A.js → chunk-GRX7JOXQ.js} +2 -2
- package/dist/{chunk-6QN4FYQW.js → chunk-GVOMSPGL.js} +2 -2
- package/dist/{chunk-NT4NVEHU.js → chunk-GY7CCCEZ.js} +2 -2
- package/dist/{chunk-BVR44XXB.js → chunk-H7CG6LOE.js} +2 -2
- package/dist/{chunk-67FK5KGV.js → chunk-HCVJR2V4.js} +2 -2
- package/dist/{chunk-FOP7HD6H.js → chunk-HG722PO7.js} +2 -2
- package/dist/{chunk-YR7VRWNX.js → chunk-HISEUIL2.js} +2 -2
- package/dist/{chunk-Y2S4YNLH.js → chunk-HXOU4XNH.js} +2 -2
- package/dist/{chunk-DZA7MQMU.js → chunk-I6UTXNHU.js} +2 -2
- package/dist/{chunk-QZCACNV5.js → chunk-IJMD6BRI.js} +2 -2
- package/dist/{chunk-QGVUPYBC.js → chunk-IKVNEGTW.js} +2 -2
- package/dist/chunk-IMKZEXZG.js +2 -0
- package/dist/{chunk-LGVTIZPV.js → chunk-ISIQLPJ2.js} +2 -2
- package/dist/{chunk-BYXWXLKM.js → chunk-ISWFRGJ6.js} +2 -2
- package/dist/chunk-IW5XQG5G.js +2 -0
- package/dist/{chunk-ZMS4YCY7.js → chunk-IXESDH3J.js} +2 -2
- package/dist/{chunk-K63CAPS2.js → chunk-JAT6C3VX.js} +2 -2
- package/dist/{chunk-U2MNECDU.js → chunk-JFQBRL3J.js} +2 -2
- package/dist/{chunk-4SZJF4GK.js → chunk-JHH5SCZ3.js} +2 -2
- package/dist/{chunk-AAOEROT3.js → chunk-JJ62MTQH.js} +2 -2
- package/dist/chunk-JT6XX7QY.js +8 -0
- package/dist/{chunk-OY7PCALC.js → chunk-JUN5DOAK.js} +2 -2
- package/dist/{chunk-DXYMTQZ4.js → chunk-K3XFWJI2.js} +2 -2
- package/dist/{chunk-ZP2WUVZ5.js → chunk-KFVSJX25.js} +2 -2
- package/dist/{chunk-ND3BWIVN.js → chunk-KQHJEU6V.js} +2 -2
- package/dist/{chunk-KGKCJFWZ.js → chunk-KZYID5KV.js} +2 -2
- package/dist/{chunk-2LJLEM5B.js → chunk-LO5JSW2C.js} +2 -2
- package/dist/{chunk-CNT4ND5O.js → chunk-LRI5OMPE.js} +2 -2
- package/dist/{chunk-FCGMQETU.js → chunk-LXQUF2RP.js} +2 -2
- package/dist/{chunk-FSPENGSU.js → chunk-MHIEP7EG.js} +2 -2
- package/dist/{chunk-LIWIV26I.js → chunk-MSR2QRUE.js} +2 -2
- package/dist/chunk-N7FP5H5U.js +57 -0
- package/dist/{chunk-527HV7JY.js → chunk-NEIQPFBI.js} +2 -2
- package/dist/chunk-NK3JMP22.js +2 -0
- package/dist/{chunk-DK6MB565.js → chunk-NRBNAECH.js} +2 -2
- package/dist/{chunk-4HQYNZ3P.js → chunk-NVSZNESQ.js} +2 -2
- package/dist/{chunk-QLWZUFDT.js → chunk-OJNK5ALA.js} +2 -2
- package/dist/{chunk-MRXBLYRE.js → chunk-OPSAW5DT.js} +2 -2
- package/dist/{chunk-4TOU7HHQ.js → chunk-OTSPRVNW.js} +2 -2
- package/dist/{chunk-IQMGNIGY.js → chunk-OXYAWIEA.js} +2 -2
- package/dist/chunk-OZETODHH.js +2 -0
- package/dist/chunk-PBUH2P5S.js +3 -0
- package/dist/{chunk-5BJPJUXF.js → chunk-PIFTZEEM.js} +2 -2
- package/dist/{chunk-C52Q3JEQ.js → chunk-PLJUQFQN.js} +2 -2
- package/dist/{chunk-NODZYYGC.js → chunk-PLYUVM4F.js} +2 -2
- package/dist/{chunk-47WX6UC4.js → chunk-PXXYQK55.js} +2 -2
- package/dist/{chunk-SBFDPHKH.js → chunk-Q55NF3ZG.js} +2 -2
- package/dist/{chunk-N4EFQIRX.js → chunk-Q5TA4OY4.js} +2 -2
- package/dist/{chunk-HW7FASEL.js → chunk-Q6T2CAJL.js} +2 -2
- package/dist/chunk-Q7GBK5T7.js +81 -0
- package/dist/{chunk-CXT3GZSQ.js → chunk-QKT4UI2Y.js} +2 -2
- package/dist/{chunk-DGM2RJ3I.js → chunk-QLBSG7U5.js} +2 -2
- package/dist/chunk-QWKHW6VZ.js +2 -0
- package/dist/{chunk-3T5U2EQ2.js → chunk-R6M456QG.js} +2 -2
- package/dist/{chunk-RZWBTKXO.js → chunk-RDULNRSJ.js} +2 -2
- package/dist/{chunk-YKHL4J3G.js → chunk-RHHCLWQ6.js} +2 -2
- package/dist/{chunk-YF25RQER.js → chunk-RNKPYYYE.js} +2 -2
- package/dist/{chunk-XKM5D2XS.js → chunk-RPL3ARU7.js} +2 -2
- package/dist/{chunk-XFRHBAIT.js → chunk-RYOYJMGF.js} +2 -2
- package/dist/chunk-SB25YMEQ.js +2 -0
- package/dist/{chunk-SRIZDEWX.js → chunk-SVHTMVA4.js} +2 -2
- package/dist/{chunk-AFRS7WJU.js → chunk-SWK4XPUS.js} +2 -2
- package/dist/{chunk-YDTK77JP.js → chunk-T6QD2ZQB.js} +2 -2
- package/dist/{chunk-Z2QB75BS.js → chunk-TAYD3AE7.js} +2 -2
- package/dist/chunk-TD7VKJ2Y.js +117 -0
- package/dist/{chunk-K2DZCH2K.js → chunk-TH6IC56G.js} +2 -2
- package/dist/{chunk-FIO44MVK.js → chunk-TKDNDQA7.js} +2 -2
- package/dist/{chunk-Q4MRRB3C.js → chunk-TNG2FYS5.js} +2 -2
- package/dist/chunk-TQZV7KV4.js +2 -0
- package/dist/{chunk-NSDPPUDY.js → chunk-TUQIPUDS.js} +2 -2
- package/dist/chunk-TUSPIVZ3.js +4 -0
- package/dist/{chunk-RNKRYK6B.js → chunk-U2N2KE7A.js} +2 -2
- package/dist/{chunk-G47MFF47.js → chunk-UAQ4T73O.js} +2 -2
- package/dist/{chunk-5KIJMEPC.js → chunk-UDY7MIAW.js} +2 -2
- package/dist/{chunk-MLTKGHD2.js → chunk-URSGGIZX.js} +2 -2
- package/dist/{chunk-IGBQVEHE.js → chunk-UT7TADJX.js} +2 -2
- package/dist/{chunk-Z67JOKRE.js → chunk-V4NG5OMS.js} +105 -105
- package/dist/{chunk-OA2BO4DR.js → chunk-VMWUV6WB.js} +2 -2
- package/dist/{chunk-PX6QNUYF.js → chunk-VTCIYFEK.js} +2 -2
- package/dist/{chunk-6DO3VBLV.js → chunk-VU6LIWHT.js} +2 -2
- package/dist/{chunk-CTO3TRX7.js → chunk-VUSKPCUB.js} +2 -2
- package/dist/{chunk-V6XENWOF.js → chunk-VXJJTQYE.js} +2 -2
- package/dist/{chunk-BM4OTGSY.js → chunk-VZ7NXSHV.js} +2 -2
- package/dist/{chunk-ARGPDW2Y.js → chunk-WHADK6OS.js} +2 -2
- package/dist/chunk-WN3TCGJ4.js +2 -0
- package/dist/{chunk-GBZCVYWA.js → chunk-WOOAY3PA.js} +2 -2
- package/dist/{chunk-FLSVYEPL.js → chunk-WSLEJSFR.js} +2 -2
- package/dist/{chunk-BMKTDJI6.js → chunk-WYZIHUPZ.js} +2 -2
- package/dist/{chunk-WZ7V4BQV.js → chunk-XE33FV5W.js} +2 -2
- package/dist/{chunk-JO6FK3Q5.js → chunk-XFMVKFSF.js} +2 -2
- package/dist/{chunk-3YETOKNO.js → chunk-XGGBK66W.js} +2 -2
- package/dist/{chunk-BZCRHP46.js → chunk-XJX6LGHL.js} +2 -2
- package/dist/{chunk-OFZVFIDF.js → chunk-XN22RGSR.js} +2 -2
- package/dist/{chunk-VJAD5WX5.js → chunk-XSWYJCAK.js} +2 -2
- package/dist/{chunk-WV6R37XV.js → chunk-XU75YQN4.js} +2 -2
- package/dist/{chunk-UBETC3Q2.js → chunk-Y2VM4CJC.js} +2 -2
- package/dist/{chunk-7YZGSLW6.js → chunk-Y334QQU5.js} +2 -2
- package/dist/{chunk-TP2X2C2Y.js → chunk-YAGYMBEX.js} +2 -2
- package/dist/{chunk-KBIC6JHJ.js → chunk-YIHNPKWD.js} +2 -2
- package/dist/{chunk-5Z2H76VD.js → chunk-YXPUP5G2.js} +2 -2
- package/dist/{chunk-G6VV7ROY.js → chunk-Z2AWCTN6.js} +2 -2
- package/dist/{chunk-O3EX5STE.js → chunk-Z2PZVKPR.js} +2 -2
- package/dist/{chunk-OG5UK2K7.js → chunk-ZAZGGSM3.js} +2 -2
- package/dist/{chunk-GTZFKDP3.js → chunk-ZGW4HLPD.js} +2 -2
- package/dist/chunk-ZOXKSQQB.js +2 -0
- package/dist/{chunk-KFFQURUZ.js → chunk-ZPASRBLF.js} +2 -2
- package/dist/{chunk-WZRNEVYC.js → chunk-ZYM4HOFA.js} +2 -2
- package/dist/{chunk-FUUDUAKM.js → chunk-ZZ3Z7D56.js} +2 -2
- package/dist/cli-main.js +2 -2
- package/dist/code-EQJFDT6I.js +2 -0
- package/dist/code-result-json-7UWIWBOO.js +2 -0
- package/dist/{command-descriptors-6INSCKLW.js → command-descriptors-ORNTVNYV.js} +89 -89
- package/dist/dataflow-6VL54GX5.js +2 -0
- 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/hierarchy-IVBXAKFA.js +2 -0
- package/dist/imports-FRAVZ3Y2.js +2 -0
- 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/project-reindex-HYO4WD7Z.js +3 -0
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +11 -0
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.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-SRCUOYRD.js → refs-pagination-VUGIWN6U.js} +2 -2
- package/dist/reindex-worker.js +64 -22
- package/dist/reindex.js +74 -32
- package/dist/runtime.js +1 -1
- 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/slice-YOB5YFAM.js +2 -0
- package/dist/surface-VY5EFWTW.js +2 -0
- package/dist/{symbol-resolution-SVSMX4RN.js → symbol-resolution-DGQN4XIV.js} +2 -2
- 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/package.json +1 -1
- package/dist/by-kind-XXGZGNZ6.js +0 -2
- package/dist/call-graph-VGY3R4L3.js +0 -2
- package/dist/chunk-3XZELASU.js +0 -2
- package/dist/chunk-63TFRBMB.js +0 -2
- package/dist/chunk-6LS3IG2I.js +0 -13
- package/dist/chunk-7Z4GMCHM.js +0 -117
- package/dist/chunk-ANCHW2R4.js +0 -57
- package/dist/chunk-C7WSQA6A.js +0 -21
- package/dist/chunk-DNPETNXT.js +0 -2
- package/dist/chunk-E7CJ6O72.js +0 -2
- package/dist/chunk-FYCH2EYQ.js +0 -2
- package/dist/chunk-GSHTVE56.js +0 -3
- package/dist/chunk-JSHDCVUM.js +0 -81
- package/dist/chunk-L7WRUNKJ.js +0 -2
- package/dist/chunk-LFWB7TOJ.js +0 -2
- package/dist/chunk-MFBVUQJZ.js +0 -2
- package/dist/chunk-MR4ZKWO6.js +0 -57
- package/dist/chunk-NP4JFCLE.js +0 -133
- package/dist/chunk-NQXWWE6S.js +0 -8
- package/dist/chunk-O2VY47Y5.js +0 -325
- package/dist/chunk-SIGVQT43.js +0 -2
- package/dist/chunk-UAQQR55F.js +0 -2
- package/dist/chunk-VRJG7N3I.js +0 -453
- package/dist/chunk-WCIKJ2E3.js +0 -3
- package/dist/chunk-WEXQYJY3.js +0 -5
- package/dist/chunk-WOPZX5GM.js +0 -2
- package/dist/chunk-XDQX6LDT.js +0 -4
- package/dist/chunk-XIPGCT3D.js +0 -5
- package/dist/chunk-Z2KGMIL4.js +0 -2
- package/dist/code-AXLJBZ6T.js +0 -2
- package/dist/code-result-json-CTZHAQXJ.js +0 -2
- package/dist/dataflow-AFXY423Q.js +0 -2
- package/dist/dependence-slice-2G4X6VSJ.js +0 -2
- package/dist/deps-LMCAV5DO.js +0 -2
- package/dist/direct-navigation-2ONV22Y2.js +0 -3
- package/dist/entry-map-ZOC3VXO5.js +0 -2
- package/dist/files-WJQJLHMH.js +0 -2
- package/dist/hierarchy-ASNIHAX4.js +0 -2
- package/dist/imports-JICEKDKK.js +0 -2
- package/dist/members-C5H2K3MS.js +0 -2
- package/dist/methods-KZOZHSD4.js +0 -2
- package/dist/output-continuation-command-NX3RH3TP.js +0 -3
- package/dist/project-reindex-A2SXUH2H.js +0 -3
- package/dist/refs-ZOORVRQC.js +0 -2
- package/dist/slice-NOTBWA7S.js +0 -2
- package/dist/surface-BTBCLKNA.js +0 -2
- package/dist/system-2EIUFP6B.js +0 -2
- package/dist/trace-BB2GHQPG.js +0 -2
- package/dist/value-flow-OA7AHSUG.js +0 -2
package/dist/chunk-SIGVQT43.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as A}from"./chunk-PRLU3I7G.js";import{d as fe,f as vt}from"./chunk-DXYMTQZ4.js";import{b as ye}from"./chunk-O4PZFAXA.js";import{a as ge,b as he,c as H,d as E}from"./chunk-NQXWWE6S.js";import{e as K}from"./chunk-HGFDYOVB.js";import{a as St,b as It,c as le,d as pe}from"./chunk-Z2KGMIL4.js";import{A as ke,E as Rt,F as Pt,H as Et,I as Gt,J as Ae,K as Le,N as Ce,P as Tt,Q as Dt,S as kt,a as v,b as Q,c as x,f as S,g as R,h as I,j as ht,k as W,l as bt,n as xt,o as wt,p as ue,ra as Oe,w as me,x as L,y as J}from"./chunk-XIPGCT3D.js";import{createHash as Br,randomUUID as zr}from"crypto";import{existsSync as V,mkdirSync as Wr,readdirSync as Hr,rmSync as Ct,statSync as Ot}from"fs";import{basename as Vr,dirname as Se,join as w}from"path";import{join as Fr}from"path";function jr(e,t){return e.reason instanceof Error?e.reason:new Error(t)}function Fi(e,t){if(e?.aborted)throw jr(e,t)}var _r=e=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e.pid;return typeof t=="number"&&Number.isSafeInteger(t)&&t>0?{pid:t}:null};function At(e,t={}){return C(Fr(e,"gc.lock"),t)}function C(e,t={}){let r=t.waitMs??0,n=t.pollMs??10,i=t.now??pe,o=i()+r;do{let a=qr(e,t.directoryDurability);if(a)return Nr(a);let s=o-i();if(s<=0)return null;$r(Math.min(n,s))}while(i()<=o);return null}function qr(e,t){let r=ye(e,{kind:"generic",parseLegacy:_r,...t?{directoryDurability:t}:{}});return r.kind==="acquired"?r.lock:null}function Nr(e){return{release:()=>{e.release()}}}function $r(e){let t=new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));Atomics.wait(t,0,0,e)}var F=1,_e=1,Z=".scipquery-generations",Ie="manifest.json",Mt="readers",Ur="gc.lock",Yr=128,X=new Map,jt={pid:process.pid,now:()=>new Date,randomToken:()=>zr(),isProcessAlive:ge,readProcessIdentity:le};function h(e){return w(Se(e),Z)}function qe(e){return w(h(e),Ur)}function Zi(e,t=jt){let r=C(qe(e.dbPath),{waitMs:5e3,directoryDurability:"recoverable"});if(!r)throw new Error("SQLite generation retention is busy; retry opening the index.");let n;try{let i=Jr(e);if(i.source!=="immutable")return{generation:i,release(){}};let o=t.randomToken();if(!/^[A-Za-z0-9._-]+$/.test(o))throw new Error("SQLite generation reader token is unsafe.");let a=w(h(e.dbPath),Mt);Wr(a,{recursive:!0}),n=w(a,`${t.pid}-${o}.json`);let s=t.readProcessIdentity(t.pid);H(n,{version:1,token:o,generationIdentity:i.identity,pid:t.pid,...s?{processIdentity:s}:{},acquiredAt:t.now().toISOString()},{spacing:2,trailingNewline:!0});let c=!1;return{generation:i,release(){c||!n||(c=!0,Ct(n,{force:!0}))}}}finally{r.release()}}function Ft(e,t,r=jt,n={}){let i=w(h(e),Mt);if(!V(i))return{protectedGenerations:new Set,activeLeases:0,staleLeasesRemoved:0,malformedLeases:0};let o=new Set,a=0,s=0,c=0;for(let d of Hr(i,{withFileTypes:!0})){if(!d.isFile()||!d.name.endsWith(".json"))continue;let u=w(i,d.name),f;try{f=Qr(JSON.parse(I(u,"SQLite generation reader lease")))}catch{f=null}if(!f){c+=1;for(let m of t)o.add(m);continue}if(!Kr(f,r)){n.removeStale!==!1&&(Ct(u,{force:!0}),s+=1);continue}a+=1,o.add(f.generationIdentity)}return{protectedGenerations:o,activeLeases:a,staleLeasesRemoved:s,malformedLeases:c}}function Qr(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e,r=t.processIdentity===void 0?null:St(t.processIdentity);return t.version!==1||typeof t.token!="string"||t.token.trim()===""||typeof t.generationIdentity!="string"||!/^[a-f0-9]{64}$/.test(t.generationIdentity)||typeof t.pid!="number"||!Number.isSafeInteger(t.pid)||t.pid<=0||typeof t.acquiredAt!="string"||!Number.isFinite(Date.parse(t.acquiredAt))||t.processIdentity!==void 0&&(!r||r.pid!==t.pid)?null:{version:1,token:t.token,generationIdentity:t.generationIdentity,pid:t.pid,...r?{processIdentity:r}:{},acquiredAt:t.acquiredAt}}function Kr(e,t){if(!t.isProcessAlive(e.pid))return!1;if(!e.processIdentity)return!0;let r=t.readProcessIdentity(e.pid);return r===null||It(e.processIdentity,r)}function _(e){try{let t=JSON.parse(I(w(h(e),"state.json"),"SQLite generation state"));return tn(t)?t:null}catch{return null}}function ee(e,t){return te(h(e),t)}function te(e,t){try{let r=JSON.parse(I(w(e,t,Ie),"SQLite generation manifest"));return en(r,t)?r:null}catch{return null}}function Jr(e){let t=_(e.dbPath);if(t){let r=Xr(e,t.currentGeneration);if(r)return r;if(t.artifactSet==="immutable-v1")throw new Error(`Published SQLite generation ${t.currentGeneration} is missing or invalid.`)}if(V(w(Se(e.dbPath),"index.lock")))throw new Error("Legacy SQLite publication is in progress; retry after the reindex lock is released.");return Zr(e,t?.currentGeneration)}function eo(e){let t=_(e);if(t)return t.currentGeneration;try{let r=w(Se(e),"meta.json"),n=V(r)?I(r,"reindex metadata"):void 0;return _t(e,n)}catch{return null}}function O(e){return vt(fe(e))??e}function Xr(e,t){try{let r=w(h(e.dbPath),t),n=ee(e.dbPath,t);if(!n)return null;let i=Me(r,n.database),o=n.index?Me(r,n.index):void 0,a=n.metadata?Me(r,n.metadata):void 0;return!je(i,n.database)||n.index&&(!o||!je(o,n.index))||n.metadata&&(!a||!je(a,n.metadata))?null:{identity:t,databasePath:i,...o?{indexPath:o}:{},...a?{metadataPath:a,metadataRaw:I(a,"reindex metadata")}:{},source:"immutable"}}catch{return null}}function Zr(e,t){let r=q(e.dbPath),n=w(Se(e.dbPath),"meta.json"),i=V(n)?I(n,"reindex metadata"):void 0,o=V(e.indexPath)?e.indexPath:void 0;return{identity:t??_t(e.dbPath,i),databasePath:e.dbPath,...o?{indexPath:o}:{},...i===void 0?{}:{metadataPath:n,metadataRaw:i},source:"legacy",databaseFileIdentity:r}}function _t(e,t){let r=Br("sha256").update("sqlite-generation-legacy-v1\0");return t!==void 0&&r.update(O(t)),r.update(`\0${q(e)}`),r.digest("hex")}function q(e){let t=Ot(e);return`${t.dev}:${t.ino}:${t.size}:${t.mtimeMs}`}function Me(e,t){if(Vr(t.file)!==t.file||t.file==="."||t.file==="..")throw new Error("SQLite generation manifest contains an unsafe artifact path");return w(e,t.file)}function je(e,t){if(!V(e))return!1;let r=Lt(e);if(!r||r.size!==t.size)return!1;let n=`${e}\0${t.sha256}\0${r.identity}`;if(X.has(n))return!0;let i=W(e,{inputKind:"immutable SQLite generation artifact",maxBytes:t.size}),o=Lt(e);if(!o||o.identity!==r.identity||i!==t.sha256)return!1;for(X.set(n,!0);X.size>Yr;){let a=X.keys().next().value;if(a===void 0)break;X.delete(a)}return!0}function Lt(e){let t=Ot(e,{bigint:!0});return t.isFile()?{identity:`${t.dev}:${t.ino}:${t.size}:${t.mtimeNs}:${t.ctimeNs}`,size:Number(t.size)}:null}function en(e,t){return e.version===_e&&e.identity===t&&Fe(e.database)&&(e.index===void 0||Fe(e.index))&&(e.metadata===void 0||Fe(e.metadata))}function Fe(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.file=="string"&&!!t.file&&Number.isSafeInteger(t.size)&&(t.size??-1)>=0&&typeof t.sha256=="string"&&/^[a-f0-9]{64}$/.test(t.sha256)}function tn(e){return e.version===F&&typeof e.currentGeneration=="string"&&!!e.currentGeneration&&typeof e.publishedAt=="string"&&Number.isFinite(Date.parse(e.publishedAt))&&(e.artifactSet===void 0||e.artifactSet==="immutable-v1")&&rn(e.stableMirrors)&&nn(e.previousGeneration)&&on(e.publication)}function rn(e){if(e===void 0)return!0;if(!e||typeof e!="object")return!1;let t=e;return typeof t.databaseFileIdentity=="string"&&!!t.databaseFileIdentity&&(t.indexFileIdentity===void 0||typeof t.indexFileIdentity=="string"&&!!t.indexFileIdentity)}function nn(e){if(e===void 0)return!0;if(!e||typeof e!="object")return!1;let t=e;return typeof t.generationIdentity=="string"&&!!t.generationIdentity&&typeof t.databasePath=="string"&&!!t.databasePath&&(t.metadataPath===void 0||typeof t.metadataPath=="string"&&!!t.metadataPath)}function on(e){if(e===void 0)return!0;if(!e||typeof e!="object")return!1;let t=e,r=[t.converterDurationMs,t.affectedDocumentCount,t.changedDocumentCount,t.producerDurationMs,t.materializationDurationMs,t.patchDurationMs].filter(n=>n!==void 0);return(t.mode==="incremental"||t.mode==="full")&&t.validation==="passed"&&t.converterDurationMs!==void 0&&r.every(n=>typeof n=="number"&&Number.isFinite(n)&&n>=0)&&(t.scipCompanion===void 0||t.scipCompanion==="current"||t.scipCompanion==="deferred")&&(t.typescriptOverlayGeneration===void 0||typeof t.typescriptOverlayGeneration=="string"&&!!t.typescriptOverlayGeneration)&&(t.scipCompanion!=="deferred"||!!t.typescriptOverlayGeneration)&&(t.fallbackReason===void 0||typeof t.fallbackReason=="string")}import{execFileSync as an}from"child_process";import{existsSync as sn,readdirSync as qt}from"fs";import{extname as Nt,join as $t}from"path";var Bt=new Set([".git",".hg",".svn",".idea",".vscode","node_modules","vendor","dist","build","target","bin","obj",".dart_tool",".gradle",".next",".venv","venv","__pycache__"]),cn=[{language:"typescript",files:["tsconfig.json","tsconfig.base.json"],extensions:[".ts",".tsx",".mts",".cts"]},{language:"rust",files:["Cargo.toml"],extensions:[".rs"]},{language:"go",files:["go.mod"],extensions:[".go"]},{language:"java",files:["pom.xml","build.gradle","build.gradle.kts"],extensions:[".java"]},{language:"kotlin",files:["build.gradle.kts"],extensions:[".kt",".kts"]},{language:"scala",files:["build.sbt"],extensions:[".scala"]},{language:"clojure",files:["deps.edn","project.clj","bb.edn","shadow-cljs.edn"],extensions:[".clj",".cljs",".cljc"]},{language:"python",files:["pyproject.toml","setup.py","setup.cfg","Pipfile"],extensions:[".py",".pyi"]},{language:"ruby",files:["Gemfile"],extensions:[".rb"]},{language:"cpp",files:["compile_commands.json","CMakeLists.txt","Makefile"],extensions:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"]},{language:"c",files:["compile_commands.json","CMakeLists.txt","Makefile"],extensions:[".c",".h"]},{language:"csharp",globs:["*.csproj","*.sln"],extensions:[".cs"]},{language:"vb",globs:["*.vbproj"],extensions:[".vb"]},{language:"dart",files:["pubspec.yaml"],extensions:[".dart"]},{language:"php",files:["composer.json"],extensions:[".php"]},{language:"javascript",files:["package.json"],extensions:[".js",".jsx",".mjs",".cjs"]}];function ao(e){let t=[],r=dn(e),n=pn(e);for(let i of cn){if(ln(e,i.files)){t.push(i.language);continue}if(un(r,i.globs)){t.push(i.language);continue}gn(n,i.extensions)&&t.push(i.language)}if(t.includes("typescript")&&Ne(t,"javascript"),t.includes("cpp")&&t.includes("c")){let i=n.has(".c"),o=[".cc",".cpp",".cxx"].some(a=>n.has(a));i&&!o?Ne(t,"cpp"):i||Ne(t,"c")}return t}function dn(e){try{return qt(e)}catch{return[]}}function ln(e,t){return t?.length?t.some(r=>sn($t(e,r))):!1}function un(e,t){return t?.length?e.some(r=>t.some(n=>fn(r,n))):!1}function fn(e,t){if(t==="*")return!0;if(!t.includes("*"))return e===t;let[r,n]=t.split("*");return e.startsWith(r??"")&&e.endsWith(n??"")}function pn(e){let t=mn(e);if(t)return t;let r=new Set,n=[e];for(;n.length>0;){let i=n.pop();if(!i)continue;let o;try{o=qt(i,{withFileTypes:!0})}catch{continue}for(let a of o){if(a.name.startsWith(".")&&!a.name.endsWith("proj")&&!a.name.endsWith("sln")&&a.isDirectory())continue;let s=$t(i,a.name);if(a.isDirectory()){Bt.has(a.name)||n.push(s);continue}let c=Nt(a.name).toLowerCase();c&&r.add(c)}}return r}function mn(e){try{let t=Tt(e,26214400,()=>an("git",["-C",e,"ls-files","-co","-v","-z","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:52428800,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"})),r=new Set;for(let n of Dt(t)){if(n.split("/").some(o=>Bt.has(o)))continue;let i=Nt(n).toLowerCase();i&&r.add(i)}return r}catch{return null}}function gn(e,t){return t?.length?t.some(r=>e.has(r)):!1}function Ne(e,t){let r=e.indexOf(t);r!==-1&&e.splice(r,1)}import{writeFileSync as yn}from"fs";import{create as zt}from"@bufbuild/protobuf";import{deserializeSCIP as hn,DocumentSchema as Sn,IndexSchema as In,serializeSCIP as bn,SymbolRole as xn}from"@c4312/scip";function mo(e){let t;try{t=hn(S(e,{inputKind:"SCIP sanitization input",maxBytes:x}))}catch{return{removedDefinitionOccurrences:0,touchedDocuments:0}}let r=$e(t);return r.removedDefinitionOccurrences>0&&yn(e,bn(r.index)),{removedDefinitionOccurrences:r.removedDefinitionOccurrences,touchedDocuments:r.touchedDocuments}}function $e(e){let t=new Set;for(let o of e.documents){Rt(o.relativePath);for(let a of o.symbols)a.symbol&&t.add(a.symbol)}for(let o of e.externalSymbols)o.symbol&&t.add(o.symbol);let r=0,n=0,i=[];for(let o of e.documents){let a=o.occurrences.filter(s=>(s.symbolRoles&xn.Definition)===0||t.has(s.symbol)?!0:(r+=1,!1));if(a.length===o.occurrences.length){i.push(o);continue}n+=1,i.push(zt(Sn,{language:o.language,relativePath:o.relativePath,occurrences:a,symbols:o.symbols,text:o.text,positionEncoding:o.positionEncoding}))}return{index:r===0?e:zt(In,{metadata:e.metadata,documents:i,externalSymbols:e.externalSymbols}),removedDefinitionOccurrences:r,touchedDocuments:n}}import{writeFileSync as Be}from"fs";import{create as re}from"@bufbuild/protobuf";import{deserializeSCIP as ze,serializeSCIP as We,DocumentSchema as wn,IndexSchema as Wt,MetadataSchema as vn,SymbolInformationSchema as Rn}from"@c4312/scip";function Ht(e){if(e.length===0)throw new Error("Cannot merge zero SCIP indexes");if(e.length===1)return e[0];let t=En(e),r=Gn(e.flatMap(i=>i.documents??[])),n=Ut(e.flatMap(i=>i.externalSymbols??[]));return re(Wt,{metadata:t,documents:r,externalSymbols:n})}function wo(e,t){if(e.length===0)throw new Error("Cannot merge zero SCIP files");let r=e.map(i=>ze(S(i,{inputKind:"SCIP merge input",maxBytes:x}))),n=Ht(r);return Be(t,We(n)),{documentCount:n.documents.length,externalSymbolCount:n.externalSymbols.length,inputCount:e.length}}function vo(e,t){if(e.length===0)throw new Error("Cannot merge zero SCIP files");let r=K("reindex.publish.scip-output.deserialize",()=>e.map(o=>ze(S(o,{inputKind:"SCIP merge input",maxBytes:x})))),n=K("reindex.publish.scip-output.merge",()=>Ht(r)),i=K("reindex.publish.scip-output.sanitize",()=>$e(n));return K("reindex.publish.scip-output.serialize",()=>Be(t,We(i.index))),{documentCount:i.index.documents.length,externalSymbolCount:i.index.externalSymbols.length,inputCount:e.length,removedDefinitionOccurrences:i.removedDefinitionOccurrences,touchedDocuments:i.touchedDocuments}}function Pn(e,t,r){let n=e.metadata;if(!n)throw new Error("Cannot rebase a SCIP index without metadata");if(n.projectRoot!==t)throw new Error(`Cannot rebase SCIP project root: expected ${t}, got ${n.projectRoot}`);return re(Wt,{metadata:re(vn,{...n,projectRoot:r}),documents:e.documents,externalSymbols:e.externalSymbols})}function Vt(e,t,r){let n=ze(S(e,{inputKind:"SCIP normalization input",maxBytes:x})),i=Pn(n,t,r);Be(e,We(i))}function En(e){let t=e[0]?.metadata;if(!t)return;let r=t.projectRoot;for(let n of e.slice(1)){let i=n.metadata?.projectRoot;if(r&&i&&i!==r)throw new Error(`Cannot merge SCIP indexes with different project roots: ${r} vs ${i}`)}return t}function Gn(e){let t=new Map;for(let r of e){let n=t.get(r.relativePath);if(!n){t.set(r.relativePath,r);continue}t.set(r.relativePath,re(wn,{language:n.language||r.language,relativePath:n.relativePath||r.relativePath,occurrences:Tn([...n.occurrences,...r.occurrences]),symbols:Ut([...n.symbols,...r.symbols]),text:kn(n.text,r.text),positionEncoding:n.positionEncoding||r.positionEncoding}))}return[...t.values()]}function Tn(e){let t=new Set,r=[];for(let n of e){let i=JSON.stringify(n);t.has(i)||(t.add(i),r.push(n))}return r}function Ut(e){let t=new Map;for(let r of e){let n=t.get(r.symbol);if(!n){t.set(r.symbol,r);continue}t.set(r.symbol,re(Rn,{symbol:n.symbol,documentation:An([...n.documentation,...r.documentation]),relationships:Dn([...n.relationships,...r.relationships]),kind:n.kind||r.kind,displayName:n.displayName||r.displayName,enclosingSymbol:n.enclosingSymbol||r.enclosingSymbol,signatureDocumentation:n.signatureDocumentation??r.signatureDocumentation}))}return[...t.values()]}function Dn(e){let t=new Set,r=[];for(let n of e){let i=[n.symbol,n.isReference?"1":"0",n.isImplementation?"1":"0",n.isTypeDefinition?"1":"0",n.isDefinition?"1":"0"].join("|");t.has(i)||(t.add(i),r.push(n))}return r}function kn(e,t){return e?t?e.length>=t.length?e:t:e:t}function An(e){return[...new Set(e)]}import Ln from"better-sqlite3";var Cn=25,On=new Set(["typescript","javascript"]);function To(e,t,r){let n=null;try{n=new Ln(e,{readonly:!0,fileMustExist:!0});let i=new Set(n.prepare("SELECT relative_path FROM documents").pluck().all().map(ke)),o=Mn(t,r),a=new Set([...o.values()].flatMap(u=>[...u])),s=[...a].filter(u=>!i.has(u)).sort();if(s.length===0)return{state:"complete",expectedDocumentCount:a.size,actualDocumentCount:i.size};let c=new Set(s),d=r.filter(u=>[...o.get(u)??[]].some(f=>c.has(f)));return{state:"incomplete",expectedDocumentCount:a.size,actualDocumentCount:i.size,missingDocumentCount:s.length,missingPaths:s.slice(0,Cn),affectedLanguages:d}}catch(i){return{state:"unavailable",reason:i instanceof Error?i.message:String(i)}}finally{n?.close()}}function Mn(e,t){let r=new Map,n=t.filter(i=>On.has(i));for(let i of n)r.set(i,new Set);for(let i of e.files){let o=ke(i.path);for(let a of n)bt(o,[a])==="source"&&r.get(a).add(o)}return r}import{existsSync as Qt,readdirSync as Kt,rmSync as Jt}from"fs";import{join as U}from"path";import{create as Zt,fromBinary as er,toBinary as _o}from"@bufbuild/protobuf";import{deserializeSCIP as He,DocumentSchema as tr,IndexSchema as rr,serializeSCIP as nr}from"@c4312/scip";import{existsSync as jn,mkdirSync as Fn,renameSync as _n,writeFileSync as qn}from"fs";import{join as Nn}from"path";function Yt(e){Fn(e.blobDir,{recursive:!0});let t=Nn(e.blobDir,`${e.blobHash}.scipdoc`);if(jn(t)){let n=S(t,{maxBytes:Q,inputKind:e.inputKind});if(n.byteLength!==e.bytes.byteLength||A(n)!==e.blobHash)throw new Error(`existing ${e.inputKind} is corrupt: ${e.relativePath}`);return}let r=`${t}.${process.pid}.${Date.now()}.tmp`;qn(r,e.bytes),_n(r,t)}var Ve=1,ne="typescript-scip-fragments";function Bo(e){let t=new Set,r=[];for(let o of e){let a=be(o.relativePath);if(t.has(a))throw new Error(`duplicate TypeScript fragment replacement: ${a}`);if(t.add(a),o.bytes===null)throw new Error(`affected TypeScript mini index cannot contain a deleted document: ${a}`);let s=er(tr,o.bytes);if(s.relativePath!==a)throw new Error(`TypeScript fragment path mismatch: expected ${a}, got ${s.relativePath}`);r.push(s)}let n=nr(Zt(rr,{documents:r,externalSymbols:[]})),i=He(n);if(i.documents.length!==r.length||i.externalSymbols.length!==0)throw new Error("affected TypeScript SCIP index failed structural verification");return n}function $n(e){let t=U(e,ne);return{rootDir:t,blobDir:U(t,"blobs"),generationDir:U(t,"generations")}}function ir(e){let t=Bn(e);return zn(t.baseIndex,t.completeDocuments,"assembled")}function Bn(e){let t=He(e.baseIndexBytes);Un(t.metadata,Yn(e)),Vn(t.externalSymbols);let r=new Map;for(let s of e.fragments){let c=be(s.relativePath);if(r.has(c))throw new Error(`duplicate TypeScript fragment replacement: ${c}`);r.set(c,s)}if(r.size===0)throw new Error("TypeScript index assembly requires at least one replacement");let n=new Set,i=[],o=[],a=[];for(let s of t.documents){let c=be(s.relativePath);if(n.has(c))throw new Error(`duplicate TypeScript SCIP document path: ${c}`);n.add(c);let d=r.get(c);if(!d){i.push(s);continue}if(r.delete(c),d.bytes===null){a.push(c);continue}let u=Xt(c,d.bytes);i.push(u),o.push(u)}for(let s of[...r.keys()].sort()){let c=r.get(s);if(c.bytes===null)continue;if(n.has(s))throw new Error(`duplicate TypeScript SCIP document path: ${s}`);n.add(s);let d=Xt(s,c.bytes);i.push(d),o.push(d)}return{baseIndex:t,completeDocuments:i,affectedDocuments:o,deletedAffectedPaths:a}}function Xt(e,t){let r=er(tr,t);if(r.relativePath!==e)throw new Error(`TypeScript fragment path mismatch: expected ${e}, got ${r.relativePath}`);return r}function zn(e,t,r){let n=nr(Zt(rr,{metadata:e.metadata,documents:t,externalSymbols:[]})),i=He(n);if(i.documents.length!==t.length||i.externalSymbols.length!==0)throw new Error(`${r} TypeScript SCIP index failed structural verification`);return n}function zo(e,t){let r=$n(e);if(!Qt(r.generationDir))return;let n=new Set(t.map(a=>Hn(a))),i=Kt(r.generationDir).filter(a=>a.endsWith(".json")),o=new Set;for(let a of i.filter(s=>n.has(s))){let s=Wn(R(U(r.generationDir,a),{maxBytes:v,inputKind:"TypeScript fragment manifest"}));for(let c of s.documents)o.add(`${c.blobHash}.scipdoc`)}for(let a of i)n.has(a)||Jt(U(r.generationDir,a),{force:!0});if(Qt(r.blobDir))for(let a of Kt(r.blobDir))o.has(a)||Jt(U(r.blobDir,a),{force:!0})}function Wn(e){let t=JSON.parse(e);if(t.version!==Ve||typeof t.producerIdentity!="string"||typeof t.projectIdentity!="string"||typeof t.generationIdentity!="string"||typeof t.createdAt!="string"||!Number.isFinite(Date.parse(t.createdAt))||!Array.isArray(t.documents))throw new Error("invalid TypeScript fragment generation manifest");let r=new Set;for(let n of t.documents){if(!n||typeof n.relativePath!="string"||typeof n.blobHash!="string"||!/^[a-f0-9]{64}$/.test(n.blobHash)||typeof n.byteLength!="number"||!Number.isInteger(n.byteLength)||n.byteLength<0||typeof n.documentIdentity!="string"||!n.documentIdentity)throw new Error("invalid TypeScript fragment record");if(be(n.relativePath),r.has(n.relativePath))throw new Error("duplicate TypeScript fragment record");r.add(n.relativePath)}return t}function Hn(e){if(!e)throw new Error("TypeScript fragment generation identity must be non-empty");return`${A(e)}.json`}function Vn(e){if(e.length>0)throw new Error("scip-typescript emitted external symbols; incremental document assembly is unsupported")}function Un(e,t){if(!e||typeof e!="object")throw new Error("TypeScript SCIP shard has no producer metadata");let r=e,n=r.toolInfo??r.tool_info;if(!n||typeof n!="object")throw new Error("TypeScript SCIP shard has no producer tool identity");let i=n;if(i.name!=="scip-typescript"||i.version!==t)throw new Error("TypeScript SCIP shard producer identity changed")}function Yn(e){let t=e.packageVersion??e.runtime?.packageVersion;if(!t)throw new Error("scip-typescript package version is unavailable");return t}function be(e){if(!e||e.startsWith("/")||e.startsWith("\\")||e.includes("\\"))throw new Error(`invalid TypeScript SCIP document path: ${e}`);let t=e.split("/");if(t.includes("")||t.includes(".")||t.includes(".."))throw new Error(`invalid TypeScript SCIP document path: ${e}`);return e}import{existsSync as xe,readdirSync as Ue,rmSync as or}from"fs";import{join as G}from"path";var we=1,ie="typescript-scip-overlays",ar="typescript-project-v3:";function Xo(e){let t=cr(e.cacheDir,e.previousGenerationIdentity);if(!t&&!e.baseShardCurrent)throw new Error("deferred TypeScript SCIP base has no matching overlay generation");if(t?.producerIdentity!==void 0&&t.producerIdentity!==e.producerIdentity)throw new Error("TypeScript overlay producer identity changed");let r=e.allowLegacyProjectIdentityMigration===!0&&t!==null&&!t.projectIdentity.startsWith(ar)&&e.projectIdentity.startsWith(ar);if(t&&t.projectIdentity!==e.projectIdentity&&!e.allowProjectIdentityChange&&!r)throw new Error("TypeScript overlay project identity changed");let n=new Map((t?.overlays??[]).map(a=>[a.relativePath,a])),i=new Set;for(let a of e.fragments){let s=Ke(a.relativePath);if(i.has(s))throw new Error(`duplicate TypeScript overlay: ${s}`);i.add(s),n.set(s,Qn(e.cacheDir,a))}if(i.size===0)throw new Error("TypeScript overlay generation requires affected documents");let o={version:we,producerIdentity:e.producerIdentity,projectIdentity:e.projectIdentity,baseGenerationIdentity:t?.baseGenerationIdentity??e.previousGenerationIdentity,generationIdentity:e.nextGenerationIdentity,createdAt:(e.now??(()=>new Date))().toISOString(),overlays:[...n.values()].sort((a,s)=>a.relativePath.localeCompare(s.relativePath))};return Kn(e.cacheDir,o),o}function Zo(e){let t=cr(e.cacheDir,e.generationIdentity);if(!t)throw new Error("TypeScript overlay generation is unavailable");let r=t.overlays.map(n=>{if(n.blobHash===null)return{relativePath:n.relativePath,bytes:null,occurrences:0,symbols:0,referenceFragments:[]};let i=S(G(oe(e.cacheDir),"blobs",`${n.blobHash}.scipdoc`),{maxBytes:Q,inputKind:"TypeScript overlay blob"});if(i.byteLength!==n.byteLength||A(i)!==n.blobHash)throw new Error(`TypeScript overlay blob is corrupt: ${n.relativePath}`);return{relativePath:n.relativePath,bytes:i,occurrences:0,symbols:0,referenceFragments:[]}});return ir({packageVersion:e.packageVersion,baseIndexBytes:e.baseIndexBytes,fragments:r})}function ea(e,t){let r=oe(e),n=G(r,"generations");if(!xe(n))return;let i=new Set(t.map(Qe)),o=new Set;for(let s of Ue(n).filter(c=>i.has(c))){let c=Ye(R(G(n,s),{maxBytes:v,inputKind:"TypeScript overlay manifest"}));for(let d of c.overlays)d.blobHash&&o.add(`${d.blobHash}.scipdoc`)}for(let s of Ue(n))i.has(s)||or(G(n,s),{force:!0});let a=G(r,"blobs");if(xe(a))for(let s of Ue(a))o.has(s)||or(G(a,s),{force:!0})}function cr(e,t){let r=G(oe(e),"generations",Qe(t));if(!xe(r))return null;let n=Ye(R(r,{maxBytes:v,inputKind:"TypeScript overlay manifest"}));if(n.generationIdentity!==t)throw new Error("TypeScript overlay generation identity does not match its path");return n}function Qn(e,t){let r=Ke(t.relativePath);if(t.bytes===null)return{relativePath:r,blobHash:null,byteLength:0};let n=Buffer.from(t.bytes),i=A(n);return Yt({blobDir:G(oe(e),"blobs"),blobHash:i,bytes:n,relativePath:r,inputKind:"TypeScript overlay blob"}),{relativePath:r,blobHash:i,byteLength:n.byteLength}}function Kn(e,t){let r=G(oe(e),"generations",Qe(t.generationIdentity));if(xe(r)){let n=Ye(R(r,{maxBytes:v,inputKind:"TypeScript overlay manifest"}));if(sr(n)!==sr(t))throw new Error(`TypeScript overlay generation is immutable: ${t.generationIdentity}`);return}H(r,t,{spacing:2,trailingNewline:!0})}function Ye(e){let t=JSON.parse(e);if(t.version!==we||typeof t.producerIdentity!="string"||!t.producerIdentity||typeof t.projectIdentity!="string"||!t.projectIdentity||typeof t.baseGenerationIdentity!="string"||!t.baseGenerationIdentity||typeof t.generationIdentity!="string"||!t.generationIdentity||typeof t.createdAt!="string"||!Number.isFinite(Date.parse(t.createdAt))||!Array.isArray(t.overlays))throw new Error("invalid TypeScript overlay manifest");let r=new Set;for(let n of t.overlays){if(!n||typeof n.relativePath!="string"||n.blobHash!==null&&(typeof n.blobHash!="string"||!/^[a-f0-9]{64}$/.test(n.blobHash))||!Number.isInteger(n.byteLength)||n.byteLength<0||n.blobHash===null&&n.byteLength!==0)throw new Error("invalid TypeScript overlay record");if(Ke(n.relativePath),r.has(n.relativePath))throw new Error("duplicate TypeScript overlay record");r.add(n.relativePath)}return t}function oe(e){return G(e,ie)}function Qe(e){if(!e)throw new Error("TypeScript overlay generation identity must be non-empty");return`${A(e)}.json`}function sr(e){return A(JSON.stringify({version:e.version,producerIdentity:e.producerIdentity,projectIdentity:e.projectIdentity,baseGenerationIdentity:e.baseGenerationIdentity,generationIdentity:e.generationIdentity,overlays:e.overlays}))}function Ke(e){if(!e||e.startsWith("/")||e.includes("\\")||e.split("/").some(t=>!t||t==="."))throw new Error(`invalid TypeScript overlay path: ${e}`);if(e.split("/").includes(".."))throw new Error(`invalid TypeScript overlay path: ${e}`);return e}import{createHash as rt}from"crypto";import{closeSync as Jn,existsSync as g,mkdirSync as Xn,openSync as Zn,readSync as ei,readdirSync as nt,renameSync as et,rmSync as ae,statSync as N}from"fs";import{basename as it,dirname as T,join as p,relative as dr}from"path";var ti=Object.freeze({maxGenerations:2,maxLogicalBytes:2*1024*1024*1024});function ur(e){let t=h(e.outputDb),r=ai(e);e.onStage?.("after-recovery-retained");let n=e.preserveOutputScip?e.outputScip:e.tempOutputScip,i=si(e,r),o=at({generationRoot:t,databasePath:e.tempOutputDb,indexPath:g(n)?n:void 0,verifiedIndexArtifact:i,metadataPath:g(e.tempMetaPath)?e.tempMetaPath:void 0}),a=(e.now??(()=>new Date))().toISOString(),s={version:F,currentGeneration:o.identity,artifactSet:"immutable-v1",...r?{previousGeneration:r}:{},...e.publication?{publication:e.publication}:{},publishedAt:a},c=E(p(t,"state.json"),s,{spacing:2,trailingNewline:!0});e.onStage?.("after-pointer-handoff"),e.preserveOutputScip||Ze(e.tempOutputScip,e.outputScip),e.onStage?.("after-scip-handoff"),Ze(e.tempOutputDb,e.outputDb),e.onStage?.("after-database-handoff"),Ze(e.tempMetaPath,e.metaPath),e.onStage?.("after-metadata-handoff");let d=o.identity,u={...s,stableMirrors:ot(e.outputDb,e.outputScip)};E(p(t,"state.json"),u,{spacing:2,trailingNewline:!0});let f=fr(e.outputDb,{now:e.now}),m=J(o.directorySync,c.directorySync);return{currentGeneration:d,...r?{previousGeneration:r}:{},retention:f,achievedDurability:m==="synced"?"directory-durable":"file-flushed",directorySync:m}}function ri(e,t,r,n=()=>new Date){if(!g(e))return null;let i=_(e),o=p(h(e),"state.json");if(i?.artifactSet==="immutable-v1"&&ee(e,i.currentGeneration))return i;let a=h(e),s=!i&&g(o)?di(r,e,t):void 0;if(s&&!te(a,s))return null;let c=at({generationRoot:a,databasePath:e,indexPath:g(t)?t:void 0,metadataPath:g(r)?r:void 0,forcedIdentity:i?.currentGeneration??s}),d={version:F,currentGeneration:c.identity,artifactSet:"immutable-v1",stableMirrors:ot(e,t),...i?.previousGeneration?{previousGeneration:i.previousGeneration}:{},...i?.publication?{publication:i.publication}:{},publishedAt:i?.publishedAt??n().toISOString()};return E(p(a,"state.json"),d,{spacing:2,trailingNewline:!0}),d}function fa(e,t,r=()=>new Date){if(!g(e)||!g(t))throw new Error("metadata-only generation refresh requires stable database and metadata files");let n=_(e),i=h(e),o=at({generationRoot:i,databasePath:e,indexPath:g(p(T(e),"index.scip"))?p(T(e),"index.scip"):void 0,metadataPath:t}),a=n&&n.currentGeneration!==o.identity?mr(e,n.currentGeneration):void 0,s={version:F,currentGeneration:o.identity,artifactSet:"immutable-v1",stableMirrors:ot(e,p(T(e),"index.scip")),...a?{previousGeneration:a}:{},...n?.publication?{publication:n.publication}:{},publishedAt:r().toISOString()};return E(p(h(e),"state.json"),s,{spacing:2,trailingNewline:!0}),fr(e,{now:r}),s}function fr(e,t={}){let r=ni(t.limits),i=(t.now??(()=>new Date))().toISOString(),o=C(qe(e),{waitMs:0});if(!o)return{state:"deferred",generationCount:0,logicalBytes:0,protectedGenerations:0,activeReaderLeases:0,staleReaderLeasesRemoved:0,malformedReaderLeases:0,removedGenerations:0,removedLogicalBytes:0,limits:r,at:i,reason:"another process owns local generation retention"};try{let a=_(e),s=ii(e),c=Ft(e,s.map(b=>b.identity),{isProcessAlive:t.isProcessAlive??ge,readProcessIdentity:t.readProcessIdentity??le}),d=new Set(c.protectedGenerations);a?.currentGeneration&&d.add(a.currentGeneration),a?.previousGeneration?.generationIdentity&&d.add(a.previousGeneration.generationIdentity);let u=s.length,f=s.reduce((b,De)=>b+De.logicalBytes,0),m=0,P=0;for(let b of s){if(u<=r.maxGenerations&&f<=r.maxLogicalBytes)break;d.has(b.identity)||(t.onBeforeRemove?.(b.identity),ae(b.path,{recursive:!0,force:!0}),u-=1,f-=b.logicalBytes,m+=1,P+=b.logicalBytes)}let y=u>r.maxGenerations||f>r.maxLogicalBytes,k={state:y?"protected":m>0?"collected":"within-bounds",generationCount:u,logicalBytes:f,protectedGenerations:d.size,activeReaderLeases:c.activeLeases,staleReaderLeasesRemoved:c.staleLeasesRemoved,malformedReaderLeases:c.malformedLeases,removedGenerations:m,removedLogicalBytes:P,limits:r,at:i,...y?{reason:c.malformedLeases>0?"malformed reader ownership evidence fails closed":"retention bounds cannot be met without deleting a protected generation"}:{}};return lr(e,k),k}catch(a){let s={state:"error",generationCount:0,logicalBytes:0,protectedGenerations:0,activeReaderLeases:0,staleReaderLeasesRemoved:0,malformedReaderLeases:0,removedGenerations:0,removedLogicalBytes:0,limits:r,at:i,reason:a instanceof Error?a.message:String(a)};try{lr(e,s)}catch{}return s}finally{o.release()}}function ni(e={}){let t={...ti,...e};if(!Number.isSafeInteger(t.maxGenerations)||t.maxGenerations<2)throw new Error("Local SQLite generation retention must keep at least current and previous generations.");if(!Number.isSafeInteger(t.maxLogicalBytes)||t.maxLogicalBytes<=0)throw new Error("Local SQLite generation byte retention must be a positive safe integer.");return t}function ii(e){let t=h(e);return g(t)?nt(t,{withFileTypes:!0}).filter(r=>r.isDirectory()&&/^[a-f0-9]{64}$/.test(r.name)).map(r=>{let n=p(t,r.name),i=te(t,r.name),o=i?i.database.size+(i.index?.size??0)+(i.metadata?.size??0):pr(n);return{identity:r.name,path:n,logicalBytes:o,modifiedAtMs:N(n).mtimeMs}}).sort((r,n)=>r.modifiedAtMs-n.modifiedAtMs||r.identity.localeCompare(n.identity)):[]}function pr(e){let t=0;for(let r of nt(e,{withFileTypes:!0})){let n=p(e,r.name);r.isDirectory()?t+=pr(n):r.isFile()&&(t+=N(n).size)}return t}function lr(e,t){H(p(h(e),"gc.json"),t,{spacing:2,trailingNewline:!0})}function Re(e,t=p(T(e),"meta.json")){let r=p(h(e),"state.json");if(!g(r))return{state:"legacy",statePath:r};let n=_(e);if(!n)return{state:"invalid",statePath:r,reason:"generation state is malformed"};try{let i=ee(e,n.currentGeneration),o=i!==null,a=i?oi(e,t,i,n):!1,s=n.previousGeneration?g(p(T(e),n.previousGeneration.databasePath)):!0;return!a||!o||!s?{state:"drifted",statePath:r,currentMatches:a,recoveryExists:s,generation:n,reason:o?a?"retained recovery database is missing":"stable database or metadata no longer matches the published generation":"published immutable generation is missing"}:{state:"current",statePath:r,currentMatches:a,recoveryExists:s,generation:n}}catch(i){return{state:"drifted",statePath:r,currentMatches:!1,recoveryExists:!1,generation:n,reason:i instanceof Error?i.message:String(i)}}}function oi(e,t,r,n){if(n.stableMirrors&&(n.stableMirrors.databaseFileIdentity!==q(e)||n.stableMirrors.indexFileIdentity!==void 0&&n.stableMirrors.indexFileIdentity!==q(p(T(e),"index.scip")))||!tt(e,r.database))return!1;let i=p(T(e),"index.scip");if(r.index&&!tt(i,r.index))return!1;if(!r.metadata)return!g(t);if(!g(t))return!1;let o=p(h(e),r.identity,r.metadata.file);return g(o)&&O(I(t,"reindex metadata"))===O(I(o,"immutable reindex metadata"))}function tt(e,t){return g(e)&&N(e).isFile()&&N(e).size===t.size}function ai(e){let t=ri(e.outputDb,e.outputScip,e.metaPath);return t?mr(e.outputDb,t.currentGeneration):void 0}function si(e,t){if(!e.preserveOutputScip)return;if(!t)throw new Error("deferred SCIP publication requires an accepted immutable generation");let r=Re(e.outputDb,e.metaPath);if(r.state!=="current"||r.generation.currentGeneration!==t.generationIdentity){let i=r.state==="current"?"generation identity changed":"reason"in r?r.reason:`generation state is ${r.state}`;throw new Error(`deferred SCIP publication requires a verified accepted companion: ${i}`)}let n=ee(e.outputDb,t.generationIdentity);if(!n?.index||!tt(e.outputScip,n.index))throw new Error("deferred SCIP publication requires the verified accepted index artifact");return n.index}function ot(e,t){return{databaseFileIdentity:q(e),...g(t)?{indexFileIdentity:q(t)}:{}}}function mr(e,t){let r=p(h(e),t),n=p(r,it(e)),i=p(r,"meta.json");return{generationIdentity:t,databasePath:dr(T(e),n),...g(i)?{metadataPath:dr(T(e),i)}:{}}}function ci(e){if(g(e))for(let t of nt(e,{withFileTypes:!0}))t.isDirectory()&&t.name.endsWith(".tmp")&&ae(p(e,t.name),{recursive:!0,force:!0})}function di(e,t,r=p(T(t),"index.scip")){let n=rt("sha256").update("sqlite-generation-artifacts-v1\0");return n.update(ve(t)),g(r)&&n.update(`\0${ve(r)}`),g(e)&&n.update(`\0${O(I(e,"reindex metadata"))}`),n.digest("hex")}function at(e){let t=Je(e.databasePath),r=e.indexPath?e.verifiedIndexArtifact?ui(e.indexPath,e.verifiedIndexArtifact):Je(e.indexPath):void 0,n=e.metadataPath?Je(e.metadataPath):void 0,i=e.forcedIdentity??li(t,r,e.metadataPath),o=p(e.generationRoot,i),a=p(o,Ie);if(g(a)){let d=te(e.generationRoot,i);if(d&&gr(o,d.database,t)&&pi(o,d.index,r)&&mi(o,d.metadata,e.metadataPath))return{identity:i,directorySync:L(e.generationRoot)};throw new Error(`SQLite generation ${i} already exists with different or corrupt artifacts.`)}let s=[me(e.generationRoot)];ci(e.generationRoot);let c=`${o}.${process.pid}.${Date.now()}.tmp`;ae(c,{recursive:!0,force:!0}),Xn(c,{recursive:!0});try{s.push(Xe(e.databasePath,p(c,t.file))),r&&e.indexPath&&s.push(Xe(e.indexPath,p(c,r.file))),n&&e.metadataPath&&s.push(Xe(e.metadataPath,p(c,n.file)));let d=E(p(c,Ie),{version:_e,identity:i,database:t,...r?{index:r}:{},...n?{metadata:n}:{}},{spacing:2,trailingNewline:!0});d.directorySync!=="not-requested"&&s.push(d.directorySync),s.push(L(c)),et(c,o),s.push(L(e.generationRoot))}finally{ae(c,{recursive:!0,force:!0})}return{identity:i,directorySync:J(...s)}}function li(e,t,r){let n=rt("sha256").update("sqlite-generation-artifacts-v1\0");return n.update(e.sha256),t&&n.update(`\0${t.sha256}`),r&&n.update(`\0${O(I(r,"reindex metadata"))}`),n.digest("hex")}function Je(e){return{file:it(e),size:N(e).size,sha256:ve(e)}}function ui(e,t){if(t.file!==it(e)||N(e).size!==t.size)throw new Error(`verified SQLite generation artifact changed before publication: ${e}`);return t}function ve(e){let t=rt("sha256"),r=Zn(e,"r"),n=Buffer.allocUnsafe(1024*1024);try{for(;;){let i=fi(r,n);if(i===0)break;t.update(n.subarray(0,i))}}finally{Jn(r)}return t.digest("hex")}function fi(e,t){let r=0;for(;r<t.length;){let n=ei(e,t,r,t.length-r,null);if(r+=n,n===0)break}return r}function Xe(e,t){return he(e,t,{mode:292})}function gr(e,t,r){let n=p(e,t.file);return t.file===r.file&&t.size===r.size&&t.sha256===r.sha256&&g(n)&&N(n).size===t.size&&ve(n)===t.sha256}function pi(e,t,r){return!t||!r?t===r:gr(e,t,r)}function mi(e,t,r){if(!t||!r)return t===void 0&&r===void 0;let n=p(e,t.file);return g(n)&&O(I(n,"stored reindex metadata"))===O(I(r,"candidate reindex metadata"))}function Ze(e,t){ae(`${t}.tmp-replace`,{force:!0}),et(e,`${t}.tmp-replace`),et(`${t}.tmp-replace`,t)}import{createHash as Rr,randomUUID as xi}from"crypto";import{existsSync as j,lstatSync as dt,mkdirSync as Y,mkdtempSync as Pr,readdirSync as Er,realpathSync as Gr,renameSync as B,rmSync as M,statSync as Te}from"fs";import{dirname as lt,join as l,resolve as $}from"path";import{setTimeout as wi}from"timers/promises";import{pathToFileURL as Ir}from"url";import{deserializeSCIP as Tr}from"@c4312/scip";import vi from"better-sqlite3";import{lstatSync as gi,readdirSync as yi}from"fs";import{join as hi,relative as Si,resolve as st,sep as Ii}from"path";var se=1,ct="language-indexes",yr=["index.db","index.scip","meta.json"],hr=[ct,ne,ie];function Pe(e){let t=[];for(let r of yr)bi(e,r),t.push(r);for(let r of hr)Sr(e,r,t);return{version:se,files:t.sort()}}function Ee(e){if(!e||e.includes("\0")||e.startsWith("/")||e.includes("\\"))throw new Error(`invalid index artifact path: ${e||"<empty>"}`);let t=e.split("/");if(t.some(n=>!n||n==="."||n===".."))throw new Error(`invalid index artifact path: ${e}`);let r=t[0];if(!yr.includes(e)&&!hr.includes(r))throw new Error(`index artifact path is not shareable: ${e}`);return e}function D(e,t){let r=Ee(t),n=st(e),i=st(n,...r.split("/"));if(i!==n&&!i.startsWith(`${n}${Ii}`))throw new Error(`index artifact escapes cache: ${t}`);return i}function Sr(e,t,r){let n=hi(e,t),i;try{i=yi(n,{withFileTypes:!0,encoding:"utf8"})}catch{return}for(let o of i){let a=`${t}/${o.name}`;if(o.isSymbolicLink())throw new Error(`index artifact cannot be a symlink: ${a}`);o.isDirectory()?Sr(e,a,r):o.isFile()&&r.push(Ee(a))}}function bi(e,t){let r=D(e,t),n;try{n=gi(r)}catch{throw new Error(`required index artifact is missing: ${t}`)}if(!n.isFile()||n.isSymbolicLink())throw new Error(`required index artifact is not a regular file: ${t}`);if(Si(st(e),r).startsWith(".."))throw new Error(`index artifact escapes cache: ${t}`)}var ut=1,br="SCIP_QUERY_SHARED_CACHE",Ri=2,Ge=JSON.stringify({cliVersion:Pt,artifactCatalogVersion:se,postIndexAugmentationSchemaVersion:Ri,sqliteGenerationStoreVersion:F,typescriptFragmentStoreVersion:Ve,typescriptOverlayStoreVersion:we}),ft="manifest.json",Dr="shared-cache.json";var pt=[ct,ne,ie];function Pi(e,t){if(!e.clean||!e.treeOid)return;let r=Mr(JSON.stringify({version:ut,repositoryId:e.repositoryId,treeOid:e.treeOid,fingerprint:wt(t),producerIdentity:Ge}));return{repositoryId:e.repositoryId,worktreeId:e.worktreeId,projectRoot:e.projectRoot,treeOid:e.treeOid,fingerprint:t,producerIdentity:Ge,generationId:r,repositoryCacheDir:Ae(e.repositoryId)}}function Ha(e,t,r){if(!ji(r))return!1;let n=Pi(e,r);if(!n)return!1;try{let i=Ai(t);if(!i||i.repositoryId!==e.repositoryId||i.worktreeId!==e.worktreeId)return!1;let o=JSON.parse(R(l(n.repositoryCacheDir,"worktrees",`${i.worktreeId}.json`),{inputKind:"worktree cache lease",maxBytes:v}));return o.version!==1||o.repositoryId!==i.repositoryId||o.worktreeId!==i.worktreeId||$(o.projectRoot)!==$(e.projectRoot)||o.treeOid!==e.treeOid||$(o.localCacheDir)!==$(t)||o.ownershipChecksum!==mt(o)||o.baseGenerationId!==n.generationId||o.activeGenerationId!==n.generationId?!1:z(n,!1)!==null}catch{return!1}}function Va(e,t,r){if(process.env[br]==="0")return`${br}=0`;if(!Le(r))return"explicit cache or database override";if(Ce(lt(t))!==Ce(Gt(e))||t!==l(lt(t),"index.db"))return"index database is outside the managed worktree cache"}function Ua(e,t,r){if(!Le(t))return;let n=r??kt(e);return n?l(Ae(n.repositoryId),"evidence.db"):void 0}function z(e,t=!0){let r=gt(e),n;try{n=kr(R(l(r,ft),{inputKind:"shared-generation manifest",maxBytes:v}))}catch{return null}if(n.generationId!==e.generationId||n.repositoryId!==e.repositoryId||n.treeOid!==e.treeOid||n.producerIdentity!==e.producerIdentity||!ue(n.fingerprint,e.fingerprint)||!Di(r))return null;if(!t)return n;try{for(let i of n.artifacts){let o=D(r,i.path),a=Te(o);if(!a.isFile()||a.size!==i.size||W(o,{inputKind:"shared-generation artifact",maxBytes:x})!==i.sha256)return null}}catch{return null}return n}function Ya(e,t,r,n){if(!e.treeOid)return null;let i=Oe(t,r),o=l(Et(),"repositories",e.repositoryId),a;try{let d=dt(o);if(!d.isDirectory()||d.isSymbolicLink())return null;a=Gr(o)}catch{return null}let s=l(a,"generations"),c=[];try{for(let d of Er(s)){if(!/^[a-f0-9]{64}$/.test(d))continue;let u=l(s,d),f;try{f=dt(u)}catch{continue}if(!(!f.isDirectory()||f.isSymbolicLink()))try{let m=kr(R(l(u,ft),{inputKind:"shared-generation baseline manifest",maxBytes:v}));m.generationId===d&&m.repositoryId===e.repositoryId&&m.producerIdentity===Ge&&ki(m.fingerprint,i)&&c.push(m)}catch{continue}}}catch{return null}c.sort((d,u)=>{let f=d.treeOid===e.treeOid?0:1,m=u.treeOid===e.treeOid?0:1;if(f!==m)return f-m;if(n){let y=vr(d.fingerprint,n)-vr(u.fingerprint,n);if(y!==0)return y}return Date.parse(u.createdAt)-Date.parse(d.createdAt)||d.generationId.localeCompare(u.generationId)});for(let d of c){let u={repositoryId:e.repositoryId,worktreeId:e.worktreeId,projectRoot:e.projectRoot,treeOid:d.treeOid,fingerprint:d.fingerprint,producerIdentity:d.producerIdentity,generationId:d.generationId,repositoryCacheDir:a},f=z(u);if(f)return{snapshot:u,manifest:f}}return null}function Qa(e){let t=C(l(e.snapshot.repositoryCacheDir,"locks",`${e.snapshot.generationId}.publish.lock`));if(!t)throw new Error(`shared generation publication is already in progress for ${e.snapshot.generationId}`);try{return Ei(e)}finally{t.release()}}function Ei(e){let t=z(e.snapshot);if(t)return xr(e.snapshot,t);if(!Or(e.sourceCacheDir,e.sourceProjectRoot,e.snapshot.fingerprint))throw new Error("source index is incomplete, incompatible, or corrupt");let r=wr(e.sourceCacheDir);if(!r)throw new Error("source index artifacts are incomplete");let n=Pe(e.sourceCacheDir),i=l(e.snapshot.repositoryCacheDir,"generations"),o=[me(i)],a=Pr(l(i,`.tmp-${process.pid}-`));try{let s=[];for(let y of n.files){let k=D(e.sourceCacheDir,y),b=D(a,y);o.push(de(k,b,292)),e.onPublicationStage?.("after-artifact-flushed",y);let De=Te(b).size;s.push({path:y,size:De,sha256:W(b,{inputKind:"staged shared-generation artifact",maxBytes:x})})}let c=Tr(S(l(a,"index.scip"),{inputKind:"staged shared SCIP index",maxBytes:x})).metadata?.projectRoot;if(!c)throw new Error("shared SCIP generation has no project root metadata");let d=yt(e.sourceProjectRoot);if(c!==d)throw new Error("shared SCIP generation root does not match its source worktree");if(wr(e.sourceCacheDir)!==r||e.sourceStillValid&&!e.sourceStillValid())throw new Error("source index changed while staging a shared generation");let u={version:ut,artifactCatalogVersion:se,generationId:e.snapshot.generationId,repositoryId:e.snapshot.repositoryId,treeOid:e.snapshot.treeOid,fingerprint:e.snapshot.fingerprint,producerIdentity:e.snapshot.producerIdentity,sourceProjectRoot:e.sourceProjectRoot,scipProjectRoot:c,createdAt:(e.now??(()=>new Date))().toISOString(),artifacts:s.sort((y,k)=>y.path.localeCompare(k.path))},f=E(l(a,ft),u,{spacing:2,trailingNewline:!0});f.directorySync!=="not-requested"&&o.push(f.directorySync),e.onPublicationStage?.("after-manifest-flushed"),o.push(L(a)),e.onPublicationStage?.("after-staging-directory-synced");let m=gt(e.snapshot);try{if(j(m)&&!z(e.snapshot)){let y=`${m}.corrupt-${process.pid}-${Date.now()}`;B(m,y),M(y,{recursive:!0,force:!0})}B(a,m)}catch(y){let k=z(e.snapshot);if(k)return xr(e.snapshot,k);throw y}e.onPublicationStage?.("after-generation-renamed"),o.push(L(i)),e.onPublicationStage?.("after-generations-directory-synced");let P=J(...o);return{kind:"published",manifest:u,achievedDurability:P==="synced"?"directory-durable":"file-flushed",directorySync:P}}finally{M(a,{recursive:!0,force:!0})}}function xr(e,t){let r=L(l(e.repositoryCacheDir,"generations"));return{kind:"existing",manifest:t,achievedDurability:r==="synced"?"directory-durable":"file-flushed",directorySync:r}}function Ka(e){let t=gt(e.snapshot);Y(e.targetCacheDir,{recursive:!0});let r=C(l(e.targetCacheDir,"cache-lifecycle.lock"),{waitMs:e.lockWaitMs??3e4});if(!r)throw new Error("timed out waiting for another cache hydration");let n,i,o=!1;try{n=Pr(l(e.targetCacheDir,".shared-hydrate-")),Mi(e.manifest,e.snapshot);for(let c of e.manifest.artifacts){let d=D(t,c.path),u=D(n,c.path);if(de(d,u),Te(u).size!==c.size||W(u,{inputKind:"hydrated shared-generation artifact",maxBytes:x})!==c.sha256)throw new Error(`shared artifact is corrupt: ${c.path}`)}let a=yt(e.targetProjectRoot);if(a!==e.manifest.scipProjectRoot)for(let c of e.manifest.artifacts)c.path.endsWith(".scip")&&Vt(D(n,c.path),e.manifest.scipProjectRoot,a);if(!Or(n,e.targetProjectRoot,e.snapshot.fingerprint,!1))throw new Error("staged shared generation failed completeness or integrity validation");i=Li(e.targetCacheDir,n),o=!0,Ci(n,e.targetCacheDir,i),ur({tempOutputScip:l(n,"index.scip"),tempOutputDb:l(n,"index.db"),tempMetaPath:l(n,"meta.json"),outputScip:l(e.targetCacheDir,"index.scip"),outputDb:l(e.targetCacheDir,"index.db"),metaPath:l(e.targetCacheDir,"meta.json"),now:e.now});let s=Re(l(e.targetCacheDir,"index.db"),l(e.targetCacheDir,"meta.json"));if(s.state==="invalid"||s.state==="drifted")throw new Error(`hydrated SQLite generation failed validation: ${s.reason}`);e.persistLease!==!1&&Gi(e.snapshot,e.targetCacheDir,e.action??"attached",e.now)}catch(a){throw o&&i&&Oi(e.targetCacheDir,i),a}finally{n&&M(n,{recursive:!0,force:!0}),r.release()}}async function Ja(e,t={}){let r=t.timeoutMs??3e4,n=t.pollMs??100,i=t.now??pe,o=i()+r,a=l(e.repositoryCacheDir,"locks"),s=l(a,`${e.generationId}.lock`),c=d=>{if(!d||typeof d!="object"||Array.isArray(d))return null;let u=d.pid;return typeof u=="number"&&Number.isSafeInteger(u)&&u>0?{pid:u}:null};for(;i()<=o;){if(z(e))return{kind:"generation-ready"};let d=ye(s,{kind:"shared-generation-build",detail:{generationId:e.generationId},parseLegacy:c});if(d.kind==="acquired")return{kind:"owner",release:()=>d.lock.release()};let u=o-i();if(u<=0)break;await wi(Math.min(n,u))}return z(e)?{kind:"generation-ready"}:{kind:"timeout"}}function Gi(e,t,r,n=void 0){let i={version:1,repositoryId:e.repositoryId,worktreeId:e.worktreeId,projectRoot:e.projectRoot,treeOid:e.treeOid,localCacheDir:t,baseGenerationId:e.generationId,activeGenerationId:e.generationId,lastAction:r,lastSeenAt:(n??(()=>new Date))().toISOString()},o={...i,ownershipChecksum:mt(i)};return Lr(e.repositoryCacheDir,o,!0),o}function Xa(e,t,r=void 0){let n={version:1,repositoryId:e.repositoryId,worktreeId:e.worktreeId,projectRoot:e.projectRoot,treeOid:e.treeOid,localCacheDir:t,baseGenerationId:e.generationId,lastAction:"overlay",lastReason:`private cache forked from shared baseline ${e.generationId}`,lastSeenAt:(r??(()=>new Date))().toISOString()},i={...n,ownershipChecksum:mt(n)};return Lr(e.repositoryCacheDir,i,!0),i}function mt(e){return Mr(JSON.stringify({version:1,repositoryId:e.repositoryId,worktreeId:e.worktreeId,projectRoot:$(e.projectRoot),localCacheDir:$(e.localCacheDir)}))}function kr(e){let t=JSON.parse(e);if(t.version!==ut||t.artifactCatalogVersion!==se||typeof t.generationId!="string"||!/^[a-f0-9]{64}$/.test(t.generationId)||typeof t.repositoryId!="string"||!/^[a-f0-9]{24}$/.test(t.repositoryId)||typeof t.treeOid!="string"||!t.treeOid||typeof t.producerIdentity!="string"||t.producerIdentity!==Ge||typeof t.sourceProjectRoot!="string"||typeof t.scipProjectRoot!="string"||typeof t.createdAt!="string"||!Number.isFinite(Date.parse(t.createdAt))||!t.fingerprint||!Array.isArray(t.artifacts))throw new Error("invalid shared generation manifest");let r=new Set;for(let n of t.artifacts){if(!n||typeof n.path!="string"||typeof n.size!="number"||n.size<0||typeof n.sha256!="string"||!/^[a-f0-9]{64}$/.test(n.sha256))throw new Error("invalid shared generation artifact");if(Ee(n.path),r.has(n.path))throw new Error(`duplicate shared generation artifact: ${n.path}`);r.add(n.path)}for(let n of["index.db","index.scip","meta.json"])if(!r.has(n))throw new Error(`shared generation is missing ${n}`);return t}function de(e,t,r=384){return he(e,t,{mode:r})}function Ti(e,t,r){Y(e,{recursive:!0}),E(l(e,Dr),{version:1,repositoryId:t,worktreeId:r},{spacing:2,trailingNewline:!0})}function wr(e){try{let t=Pe(e),r=Rr("sha256");for(let n of t.files){let i=D(e,n),o=Te(i).size;r.update(n).update("\0").update(String(o)).update("\0"),ht(i,{inputKind:"source-generation artifact",maxBytes:x},a=>r.update(a)),r.update("\0")}return r.digest("hex")}catch{return null}}function Ar(e){try{let t=fe(R(l(e,"meta.json"),{inputKind:"reindex metadata",maxBytes:v}));return(t.kind==="legacy"||t.kind==="supported")&&t.capabilities.publishableGeneration?t.metadata:void 0}catch{return}}function Di(e){return Ar(e)?.scipCompanion!=="deferred"}function ki(e,t){let r=Oe(e.languages,e);return JSON.stringify(r)===JSON.stringify(t)}function vr(e,t){let r=new Map(e.files.map(o=>[o.path,`${o.size}\0${o.hash}`])),n=new Map(t.files.map(o=>[o.path,`${o.size}\0${o.hash}`])),i=0;for(let[o,a]of r)n.get(o)!==a&&(i+=1);for(let o of n.keys())r.has(o)||(i+=1);return i}function gt(e){return l(e.repositoryCacheDir,"generations",e.generationId)}function Ai(e){let t=JSON.parse(R(l(e,Dr),{inputKind:"worktree cache pointer",maxBytes:v}));return t.version!==1||typeof t.repositoryId!="string"||!/^[a-f0-9]{24}$/.test(t.repositoryId)||typeof t.worktreeId!="string"||!/^[a-f0-9]{24}$/.test(t.worktreeId)?null:{version:t.version,repositoryId:t.repositoryId,worktreeId:t.worktreeId}}function Lr(e,t,r){let n=At(e,{waitMs:5e3});if(!n)throw new Error("repository cache cleanup is busy");try{if(r){let o=t.activeGenerationId??t.baseGenerationId;if(!o||!j(l(e,"generations",o)))throw new Error("shared generation disappeared before its lease was attached")}let i=l(e,"worktrees");Y(i,{recursive:!0}),E(l(i,`${t.worktreeId}.json`),t,{spacing:2,trailingNewline:!0}),Ti(t.localCacheDir,t.repositoryId,t.worktreeId)}finally{n.release()}}function Li(e,t){let r=l(t,".rollback"),n=new Map,i=new Map;Y(r,{recursive:!0});for(let s of["index.scip","index.db","meta.json"]){let c=l(e,s),d=j(c);n.set(s,d),d&&de(c,l(r,"stable",s))}for(let s of pt){let c=l(e,s),d=j(c);if(d){let u=dt(c);if(!u.isDirectory()||u.isSymbolicLink())throw new Error(`managed artifact path is not a directory: ${s}`)}i.set(s,d)}let o=l(e,Z),a=j(o);return a&&Cr(o,l(r,"sqlite-generations")),{root:r,stableFiles:n,managedDirectories:i,generationStoreExisted:a}}function Ci(e,t,r){for(let n of pt){let i=l(t,n);if(r.managedDirectories.get(n)){let a=l(r.root,"managed",n);Y(lt(a),{recursive:!0}),B(i,a)}let o=l(e,n);j(o)&&B(o,i)}}function Oi(e,t){for(let i of pt){let o=l(e,i),a=l(t.root,"managed",i);t.managedDirectories.get(i)?j(a)&&(M(o,{recursive:!0,force:!0}),B(a,o)):M(o,{recursive:!0,force:!0})}for(let[i,o]of t.stableFiles){let a=l(e,i);if(!o){M(a,{force:!0});continue}let s=`${a}.shared-restore-${xi()}`;de(l(t.root,"stable",i),s),M(a,{force:!0}),B(s,a)}let r=l(e,Z);M(r,{recursive:!0,force:!0});let n=l(t.root,"sqlite-generations");t.generationStoreExisted&&j(n)&&B(n,r)}function Cr(e,t){Y(t,{recursive:!0});for(let r of Er(e,{withFileTypes:!0})){let n=l(e,r.name),i=l(t,r.name);if(r.isSymbolicLink())throw new Error(`managed cache backup cannot contain a symlink: ${n}`);r.isDirectory()?Cr(n,i):r.isFile()&&de(n,i)}}function Mi(e,t){if(e.generationId!==t.generationId||e.repositoryId!==t.repositoryId||e.treeOid!==t.treeOid||e.producerIdentity!==t.producerIdentity||!ue(e.fingerprint,t.fingerprint))throw new Error("shared generation manifest does not match the requested snapshot")}function Or(e,t,r,n=!0,i=!0){try{let o=Ar(e);if(!o||o.scipCompanion==="deferred"||!ue(xt(o.fingerprint),r)||JSON.stringify([...o.indexedLanguages??[]].sort())!==JSON.stringify([...r.languages].sort()))return ce("source validation rejected metadata"),!1;let a=Pe(e),s=Re(l(e,"index.db"),l(e,"meta.json"));if(n?s.state!=="current":s.state==="invalid"||s.state==="drifted")return ce(`source validation rejected SQLite generation state ${s.state}`),!1;let c=new vi(l(e,"index.db"),{readonly:!0,fileMustExist:!0});try{if(i){if(c.pragma("quick_check(1)",{simple:!0})!=="ok")return!1}else c.pragma("schema_version",{simple:!0})}finally{c.close()}let d=yt(t),f=(i?a.files.filter(m=>m.endsWith(".scip")):["index.scip"]).every(m=>{let P=Tr(S(D(e,m),{inputKind:"shared SCIP validation artifact",maxBytes:x})).metadata?.projectRoot;return P!==d&&ce(`source validation rejected SCIP root for ${m}: ${String(P)}`),P===d});return f||ce("source validation rejected SCIP project roots"),f}catch(o){return ce(`source validation failed: ${o instanceof Error?o.message:String(o)}`),!1}}function ce(e){process.env.SCIP_QUERY_DEBUG&&console.error(`shared-cache: ${e}`)}function yt(e){try{return Ir(Gr(e)).href}catch{return Ir($(e)).href}}function ji(e){if(!e||typeof e!="object")return!1;let t=e;return t.version===3&&Array.isArray(t.languages)&&typeof t.pnpmWorkspaces=="boolean"&&(t.typescriptProjectMode==="single"||t.typescriptProjectMode==="workspace")&&Array.isArray(t.typescriptProjects)&&Array.isArray(t.files)&&t.files.every(r=>r!==null&&typeof r=="object"&&typeof r.path=="string"&&typeof r.size=="number"&&typeof r.hash=="string"&&(r.semanticHash===void 0||typeof r.semanticHash=="string"))}function Mr(e){return Rr("sha256").update(e).digest("hex")}export{jr as a,Fi as b,At as c,C as d,Zi as e,Jr as f,eo as g,q as h,ao as i,mo as j,wo as k,vo as l,To as m,Bo as n,zo as o,Xo as p,Zo as q,ea as r,ur as s,ri as t,fa as u,Re as v,Pi as w,Ha as x,Va as y,Ua as z,z as A,Ya as B,Qa as C,Ka as D,Ja as E,Gi as F,Xa as G,mt as H};
|
|
2
|
-
//# sourceMappingURL=chunk-SIGVQT43.js.map
|
package/dist/chunk-UAQQR55F.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var b=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function x(n){let t=n.toLowerCase();return b.some(e=>t.endsWith(e))}import{createRequire as R}from"module";var d=R(import.meta.url),c,l;function M(){if(c!==void 0)return c;try{c=d("ts-morph")}catch{c=null}return c}function P(){if(l)return l;let n=M();if(!n)return"ts-morph:unavailable";let t="unknown";try{t=d("ts-morph/package.json").version??"unknown"}catch{}return l=`ts-morph:${t}:typescript:${n.ts.version}`,l}function j(n,t){return t.map(e=>({tsconfigPath:e,project:new n.Project({tsConfigFilePath:e,skipFileDependencyResolution:!0})}))}function $(n,t,e){return{language:"typescript",availability:()=>({available:!1,reason:n,tsconfigPath:t,tsconfigPaths:e}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}function T(n,t){let e=new Map(n.map(r=>[r.symbol,r])),o=new Map(n.map(r=>[r.symbolId,[]]));for(let r of t.values())for(let s of r){let a=e.get(s.targetSymbol);a&&o.get(a.symbolId).push(s.location)}for(let[r,s]of o)o.set(r,F(s));return o}function w(n,t,e){let o=g(n,t),r=g(n,e),s=[...o].filter(i=>!r.has(i)).sort(),a=[...r].filter(i=>!o.has(i)).sort(),f=y(n,t),m=y(n,e),u=[...f].filter(i=>!m.has(i)).sort(),p=[...m].filter(i=>!f.has(i)).sort();return{passed:s.length===0&&a.length===0,expectedCount:o.size,actualCount:r.size,missing:s,extra:a,callerFiles:{passed:u.length===0&&p.length===0,expectedCount:f.size,actualCount:m.size,missing:u,extra:p}}}function y(n,t){let e=new Set;for(let o of n)for(let r of t.get(o.symbolId)??[])r.file!==o.relativePath&&e.add(`${o.symbol}\0${r.file}`);return e}function D(n,t,e){let o=new Set(e),r=new Map(e.map(s=>[s,[]]));for(let s of n)for(let a of t.get(s.symbolId)??[])o.has(a.file)&&r.get(a.file).push({targetSymbol:s.symbol,location:a});for(let[s,a]of r)r.set(s,h(a));return r}function g(n,t){let e=new Set;for(let o of n)for(let r of t.get(o.symbolId)??[])e.add(`${o.symbol}\0${r.file}\0${r.line}\0${r.column}`);return e}function F(n){let t=new Map;for(let e of n)t.set(`${e.file}\0${e.line}\0${e.column}`,e);return[...t.values()].sort(S)}function h(n){let t=new Map;for(let e of n){let{location:o}=e;t.set(`${e.targetSymbol}\0${o.file}\0${o.line}\0${o.column}`,e)}return[...t.values()].sort((e,o)=>e.targetSymbol.localeCompare(o.targetSymbol)||S(e.location,o.location))}function S(n,t){return n.file.localeCompare(t.file)||n.line-t.line||n.column-t.column}export{b as a,x as b,M as c,P as d,j as e,$ as f,T as g,w as h,D as i};
|
|
2
|
-
//# sourceMappingURL=chunk-UAQQR55F.js.map
|