codebaseiq 0.1.0 → 0.3.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 +89 -0
- package/README.md +1 -1
- package/dist/augment-vue-worker.js +1 -1
- package/dist/{chunk-ZMI2JSX2.js → chunk-23C5AD3B.js} +2 -2
- package/dist/chunk-2E6OUPCF.js +2 -0
- package/dist/chunk-2EDX3JT5.js +3 -0
- package/dist/chunk-2I2UHZET.js +2 -0
- package/dist/{chunk-T3DGWPXM.js → chunk-2OMXFE64.js} +2 -2
- package/dist/chunk-2PRONPAS.js +3 -0
- package/dist/{chunk-GW6Z3WGY.js → chunk-356EZBIP.js} +2 -2
- package/dist/{chunk-UDS562V4.js → chunk-36JC5BG2.js} +2 -2
- package/dist/chunk-3RR2K7EZ.js +20 -0
- package/dist/{chunk-JE3WZ6II.js → chunk-3RSBGWGL.js} +2 -2
- package/dist/{chunk-VE5AVNMP.js → chunk-3VJ3OCRE.js} +2 -2
- package/dist/{chunk-FDGD5AB5.js → chunk-4LK5OIPW.js} +2 -2
- package/dist/chunk-5DSL3NT2.js +17 -0
- package/dist/chunk-5FWR5HLG.js +90 -0
- package/dist/chunk-5IC2WZAL.js +22 -0
- package/dist/{chunk-MVB3DAEY.js → chunk-5IZRKWTZ.js} +2 -2
- package/dist/{chunk-Q65CQ4XL.js → chunk-5LL4KEHO.js} +2 -2
- package/dist/chunk-5T44HG5Y.js +88 -0
- package/dist/{chunk-TRRC4ZJ7.js → chunk-5ZI2PPI7.js} +2 -2
- package/dist/{chunk-7XAN6GKB.js → chunk-67VJAYVR.js} +2 -2
- package/dist/{chunk-MOVBWNIP.js → chunk-6BF3VYEF.js} +2 -2
- package/dist/chunk-6JMAVFL4.js +3 -0
- package/dist/chunk-6O3KXIDL.js +2 -0
- package/dist/{chunk-JOIRNPPY.js → chunk-6VREELBC.js} +2 -2
- package/dist/chunk-6WAPPQ5F.js +82 -0
- package/dist/{chunk-FW53T7EB.js → chunk-75KJGYX7.js} +2 -2
- package/dist/chunk-7GAK2F3H.js +77 -0
- package/dist/{chunk-UBGWN7I4.js → chunk-7JELP5YE.js} +2 -2
- package/dist/chunk-7UCDGXRW.js +8 -0
- package/dist/{chunk-L57ZKWVG.js → chunk-AEXQYQD7.js} +2 -2
- package/dist/chunk-AQI4N64O.js +22 -0
- package/dist/{chunk-ICFDQHAM.js → chunk-AURCQHSG.js} +2 -2
- package/dist/{chunk-I2T2LLK2.js → chunk-BBP7HVBJ.js} +2 -2
- package/dist/{chunk-OFBE4NGP.js → chunk-BFBIMTCJ.js} +2 -2
- package/dist/{chunk-JEJLSICM.js → chunk-BGGB5N53.js} +2 -2
- package/dist/{chunk-TIIC3ZE7.js → chunk-BRQL7AFJ.js} +2 -2
- package/dist/{chunk-YSNONTJ2.js → chunk-BWL3PMPT.js} +2 -2
- package/dist/chunk-C6WKPKCF.js +127 -0
- package/dist/{chunk-YESXMKX3.js → chunk-C7OUW52M.js} +2 -2
- package/dist/chunk-C7QWUBR2.js +545 -0
- package/dist/{chunk-4WKDMDEW.js → chunk-CCIYWXX6.js} +2 -2
- package/dist/{chunk-FAJQ7LWY.js → chunk-CIYA2KZN.js} +2 -2
- package/dist/{chunk-VEXUL62T.js → chunk-CR3OG6SQ.js} +2 -2
- package/dist/{chunk-JSOYNVWH.js → chunk-CVHOQONG.js} +2 -2
- package/dist/{chunk-LU3BMVH2.js → chunk-CW6AXOLR.js} +2 -2
- package/dist/{chunk-TXXOEMZJ.js → chunk-D53LWANR.js} +2 -2
- package/dist/{chunk-DO6WQD2T.js → chunk-D62CTZX6.js} +2 -2
- package/dist/{chunk-N3IQCBCF.js → chunk-D7AZAOZX.js} +2 -2
- package/dist/{chunk-RDBI2RXU.js → chunk-D7DOB27N.js} +7 -7
- package/dist/chunk-DAKIGMIK.js +21 -0
- package/dist/chunk-DDN2F6GB.js +2 -0
- package/dist/chunk-DUKHVPU5.js +4 -0
- package/dist/chunk-DVWO7RBC.js +2 -0
- package/dist/{chunk-HKQUXIFO.js → chunk-E52K4L2W.js} +2 -2
- package/dist/chunk-EIBGSU2R.js +2 -0
- package/dist/chunk-EN4AHLL3.js +3 -0
- package/dist/chunk-EQNMD62X.js +51 -0
- package/dist/{chunk-ENCCHKM6.js → chunk-EXZ7VLRY.js} +4 -4
- package/dist/{chunk-NEDP5RFQ.js → chunk-F3QSL4W2.js} +2 -2
- package/dist/{chunk-O6QTXQPJ.js → chunk-F74LZWCE.js} +2 -2
- package/dist/{chunk-BH5F2Q4O.js → chunk-FEIZXBLH.js} +2 -2
- package/dist/chunk-FH5WG4LE.js +2 -0
- package/dist/{chunk-BVAJLC5A.js → chunk-FOZ74V56.js} +2 -2
- package/dist/{chunk-L4NRUAGJ.js → chunk-FQTIFWLR.js} +2 -2
- package/dist/chunk-FTTV7IRX.js +355 -0
- package/dist/chunk-FWQGH2N2.js +2 -0
- package/dist/{chunk-CAUCPUOF.js → chunk-GDHWOA57.js} +2 -2
- package/dist/{chunk-6MUIJMVL.js → chunk-GIDCP7KV.js} +2 -2
- package/dist/{chunk-ZV3JV5G5.js → chunk-GL6UTNUB.js} +2 -2
- package/dist/chunk-GP7C5VAE.js +2 -0
- package/dist/{chunk-FQKZWM4L.js → chunk-GQLDYCWS.js} +5 -5
- package/dist/chunk-GQXXOS55.js +2 -0
- package/dist/{chunk-H3LGFZVK.js → chunk-GUFPEFBG.js} +2 -2
- package/dist/{chunk-NNOKTMZT.js → chunk-GV2CEZCW.js} +2 -2
- package/dist/{chunk-FETNQCFO.js → chunk-GVAF222T.js} +2 -2
- package/dist/chunk-GWYZVVKY.js +21 -0
- package/dist/{chunk-7FND7D7N.js → chunk-HENP2O4A.js} +2 -2
- package/dist/{chunk-LZYFLFEH.js → chunk-HINZQKSY.js} +2 -2
- package/dist/{chunk-RR7SX44N.js → chunk-HQA7EBSK.js} +2 -2
- package/dist/{chunk-XMQ23E27.js → chunk-HVFB3PME.js} +2 -2
- package/dist/chunk-I22IZYDI.js +2 -0
- package/dist/chunk-ICUL7XRT.js +21 -0
- package/dist/{chunk-CQP3THUZ.js → chunk-IHSLIIL3.js} +2 -2
- package/dist/{chunk-34WBMAYK.js → chunk-ITSJMNUD.js} +2 -2
- package/dist/{chunk-PX4RYAAK.js → chunk-IZDPGOZR.js} +2 -2
- package/dist/chunk-J3GLP7Q5.js +3 -0
- package/dist/{chunk-CVYSU6BX.js → chunk-J7AMBVWF.js} +2 -2
- package/dist/{chunk-Y6KHROC3.js → chunk-JCMFBF4Z.js} +2 -2
- package/dist/chunk-JFIA2JI3.js +3 -0
- package/dist/chunk-JLZLLLW5.js +3 -0
- package/dist/{chunk-5PUWMSDU.js → chunk-JSNTHRLQ.js} +2 -2
- package/dist/{chunk-C6SBF2WH.js → chunk-JX6ZWDOS.js} +2 -2
- package/dist/{chunk-4XTAUQFD.js → chunk-JYI7CV25.js} +2 -2
- package/dist/chunk-K7JLSGCJ.js +8 -0
- package/dist/{chunk-XWUOUWYI.js → chunk-KPZGTB2O.js} +2 -2
- package/dist/{chunk-VXYS3FZD.js → chunk-LKUTSP4G.js} +2 -2
- package/dist/{chunk-GTXSJDCO.js → chunk-LMTSB3TB.js} +2 -2
- package/dist/chunk-LONKINMJ.js +543 -0
- package/dist/{chunk-WMPRTGH2.js → chunk-LQHYYIOB.js} +2 -2
- package/dist/{chunk-VUIYB2V3.js → chunk-LZSQ6X7E.js} +2 -2
- package/dist/{chunk-ST7V3SKN.js → chunk-M2Y6PCFE.js} +2 -2
- package/dist/chunk-MEUHIDI3.js +7 -0
- package/dist/{chunk-OZYRSMSH.js → chunk-MHWMEZDA.js} +2 -2
- package/dist/{chunk-RKEJ6VTF.js → chunk-MQW6SJ4P.js} +2 -2
- package/dist/{chunk-J77SU6VA.js → chunk-MSI3K7PJ.js} +2 -2
- package/dist/chunk-MVRGB4KJ.js +278 -0
- package/dist/{chunk-DQMDCD24.js → chunk-MZNMASFM.js} +2 -2
- package/dist/{chunk-ID63777H.js → chunk-NBCQZSGR.js} +2 -2
- package/dist/chunk-NBZKSTXP.js +2 -0
- package/dist/{chunk-SZD2KF7Q.js → chunk-NCJILOAK.js} +2 -2
- package/dist/{chunk-C7QOQX32.js → chunk-NDKOVQFG.js} +2 -2
- package/dist/{chunk-UNBY47BC.js → chunk-NEWHKGVD.js} +2 -2
- package/dist/{chunk-PYAB5SM6.js → chunk-O2M3VNDY.js} +2 -2
- package/dist/chunk-OFGOOL6U.js +3 -0
- package/dist/{chunk-SWHMHUKF.js → chunk-OQUCBKOI.js} +2 -2
- package/dist/{chunk-7MGU3HPH.js → chunk-P4NVCOM7.js} +2 -2
- package/dist/{chunk-ANFVSJWQ.js → chunk-PFC44E6D.js} +2 -2
- package/dist/{chunk-EZNMUY67.js → chunk-PHNCEUXX.js} +2 -2
- package/dist/{chunk-4FC325IF.js → chunk-PTQPPPG2.js} +2 -2
- package/dist/chunk-PUVNH4PO.js +3 -0
- package/dist/chunk-Q23IMHXS.js +343 -0
- package/dist/chunk-Q3ZCQY2Y.js +3 -0
- package/dist/{chunk-KMITESMT.js → chunk-Q4XEU3UH.js} +2 -2
- package/dist/{chunk-QKPLA6IC.js → chunk-QEOWONKY.js} +2 -2
- package/dist/{chunk-BJ6SQAEN.js → chunk-QMOZZ2VX.js} +2 -2
- package/dist/chunk-RCIGX23V.js +60 -0
- package/dist/{chunk-IOP6FWIM.js → chunk-RIYJ4L33.js} +2 -2
- package/dist/chunk-RJVAPMHF.js +14 -0
- package/dist/chunk-SB7NASHU.js +2 -0
- package/dist/{chunk-UZGZB3VB.js → chunk-SGMNWYTH.js} +2 -2
- package/dist/chunk-SMDIEDM4.js +27 -0
- package/dist/chunk-SV2LEFVM.js +2 -0
- package/dist/chunk-SX72EVMY.js +3 -0
- package/dist/chunk-T5X7DK6C.js +3 -0
- package/dist/{chunk-6NW7MU72.js → chunk-T6MQNNAC.js} +2 -2
- package/dist/chunk-T75DS2E6.js +21 -0
- package/dist/{chunk-HRWGYWRJ.js → chunk-TEANKHUU.js} +2 -2
- package/dist/chunk-TJBOJUVN.js +3 -0
- package/dist/{chunk-XLQ3GLWZ.js → chunk-TJWVT4DO.js} +2 -2
- package/dist/{chunk-7NVGT435.js → chunk-TNJGTQWO.js} +2 -2
- package/dist/{chunk-NE6IU5ZD.js → chunk-TOTWJZIX.js} +2 -2
- package/dist/{chunk-PBI2LFKH.js → chunk-TPO7XC5Z.js} +2 -2
- package/dist/{chunk-HPJRBHVT.js → chunk-U33PMPNW.js} +2 -2
- package/dist/{chunk-QHRNXP3C.js → chunk-U7NUXDQO.js} +2 -2
- package/dist/chunk-UC2FD2PS.js +4 -0
- package/dist/{chunk-PIOMTC27.js → chunk-UQE4XFSA.js} +2 -2
- package/dist/chunk-UQYQBLJX.js +5 -0
- package/dist/{chunk-KWVHSKHK.js → chunk-USOAJHY7.js} +2 -2
- package/dist/{chunk-GCHRX4YW.js → chunk-UW6KD57C.js} +2 -2
- package/dist/{chunk-PTAWHLVJ.js → chunk-VGWZ4MOY.js} +2 -2
- package/dist/{chunk-XME3HPXZ.js → chunk-VWYGCMV5.js} +2 -2
- package/dist/{chunk-AKB7V7TV.js → chunk-W7YLRXZE.js} +2 -2
- package/dist/{chunk-SYDJMPES.js → chunk-WK2IQJPK.js} +2 -2
- package/dist/{chunk-RBAS5ZHI.js → chunk-WWCV4E6J.js} +2 -2
- package/dist/{chunk-OL6KJP3N.js → chunk-XMJ53WG4.js} +2 -2
- package/dist/chunk-XN3EKMLI.js +4 -0
- package/dist/chunk-XQAVQVIL.js +3 -0
- package/dist/{chunk-IJ4HMYBE.js → chunk-XQPPURLQ.js} +2 -2
- package/dist/{chunk-OVTS4DKB.js → chunk-YHPG3S2U.js} +2 -2
- package/dist/{chunk-WOQBZPIF.js → chunk-YRKP7PM7.js} +2 -2
- package/dist/chunk-YT4DVWUV.js +11 -0
- package/dist/chunk-YTJHCGYB.js +61 -0
- package/dist/chunk-Z35GOVEH.js +2 -0
- package/dist/{chunk-OLF4MA5W.js → chunk-Z6RL7XOE.js} +4 -4
- package/dist/{chunk-UP3BUZR5.js → chunk-ZAFGY22Q.js} +2 -2
- package/dist/{chunk-CO5R3UNA.js → chunk-ZB4C5TTR.js} +2 -2
- package/dist/{chunk-ZZXSWSN6.js → chunk-ZNH33XIB.js} +2 -2
- package/dist/{chunk-EMNIHCRB.js → chunk-ZQ62NNKN.js} +2 -2
- package/dist/cli-context-FJL2JHOE.js +3 -0
- package/dist/cli-context-PQNWHMCQ.js +2 -0
- package/dist/cli-program-UO7PZD6V.js +7 -0
- package/dist/cli.js +1 -1
- package/dist/{code-DlqpBDd0.d.ts → code-DfX3xeWy.d.ts} +1 -1
- package/dist/code-viewer-KIXEYQNJ.js +12 -0
- package/dist/code-viewer-VHLBLIUM.js +11 -0
- package/dist/command-descriptors-F5P2V3NW.js +335 -0
- package/dist/command-descriptors-YCLATF5I.js +337 -0
- package/dist/{config-types-BNoC96J3.d.ts → config-types-D6X5S68_.d.ts} +50 -0
- package/dist/{db-D7sauVFH.d.ts → db-BoG_PWYH.d.ts} +2 -2
- package/dist/direct-navigation-4XJTXIDT.js +2 -0
- package/dist/direct-navigation-J5MVYYAD.js +3 -0
- package/dist/{graph-evidence-BIFqyisO.d.ts → graph-evidence-D1jx1Cql.d.ts} +1 -1
- package/dist/{health-DJaZXg8I.d.ts → health-DkYBS5BI.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/invocation-command-descriptors-RWV4VAI4.js +2 -0
- package/dist/invocation-command-descriptors-U76PN7IY.js +3 -0
- package/dist/{scip-cli-B7N3haxa.d.ts → maintenance-types-CdL5eQii.d.ts} +2 -21
- package/dist/output-continuation-command-BL25S26S.js +3 -0
- package/dist/output-continuation-command-BTETTXEC.js +2 -0
- package/dist/postinstall.js +1 -1
- package/dist/project-reindex-CRJU3IFG.js +2 -0
- package/dist/project-reindex-TQFCOA2O.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 +2 -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/reindex-worker.js +2 -2
- package/dist/reindex.d.ts +3 -5
- package/dist/reindex.js +72 -33
- package/dist/runtime.d.ts +23 -4
- package/dist/runtime.js +3 -3
- 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/sentinel-ensure-command-OSWGCFFL.js +3 -0
- package/dist/sentinel-ensure-command-SPW7XQLB.js +2 -0
- package/dist/sentinel-hook.js +39 -0
- package/dist/sentinel-worker.js +16 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/watch-server.js +6 -6
- package/docs/COMMAND_REFERENCE.md +5 -3
- package/docs/INDEX_GENERATIONS.md +2 -2
- package/docs/NPM_RELEASE.md +323 -0
- package/docs/schemas/npm-release-state.schema.json +4 -13
- package/docs/schemas/project-config.schema.json +159 -0
- package/package.json +10 -14
- package/skills/codebaseiq/SKILL.md +1 -1
- package/skills/concrete-plan/SKILL.md +1 -1
- package/ui/view/api.js +450 -0
- package/ui/view/app.js +394 -0
- package/ui/view/builder.js +323 -0
- package/ui/view/file-panel.js +170 -0
- package/ui/view/focus.js +379 -0
- package/ui/view/index.html +54 -0
- package/ui/view/map.js +424 -0
- package/ui/view/styles.css +1125 -0
- package/dist/chunk-2Q2LW5JW.js +0 -14
- package/dist/chunk-2X7V4HS4.js +0 -88
- package/dist/chunk-3IER7Q6H.js +0 -12
- package/dist/chunk-3JSXXYTZ.js +0 -345
- package/dist/chunk-476NR5B7.js +0 -2
- package/dist/chunk-5VKBFZZU.js +0 -3
- package/dist/chunk-6BQ3DSPK.js +0 -2
- package/dist/chunk-6CS3UQTN.js +0 -3
- package/dist/chunk-6OAHRI2D.js +0 -6
- package/dist/chunk-ADTBPVUZ.js +0 -21
- package/dist/chunk-BFFZDZQV.js +0 -2
- package/dist/chunk-BMYOV5GP.js +0 -77
- package/dist/chunk-C74PPYLA.js +0 -3
- package/dist/chunk-CWONGW6P.js +0 -3
- package/dist/chunk-DDZ7VHWV.js +0 -20
- package/dist/chunk-DR2LURYU.js +0 -3
- package/dist/chunk-ECQBG7PW.js +0 -564
- package/dist/chunk-EF2R3WNQ.js +0 -2
- package/dist/chunk-FM5BPL4V.js +0 -60
- package/dist/chunk-G6XFR4ZL.js +0 -4
- package/dist/chunk-GTIYTDRE.js +0 -562
- package/dist/chunk-HOA5YGOH.js +0 -3
- package/dist/chunk-KUW32IRO.js +0 -2
- package/dist/chunk-LTA3BRZX.js +0 -2
- package/dist/chunk-NAUD7LCA.js +0 -2
- package/dist/chunk-NCZUNH3E.js +0 -109
- package/dist/chunk-NNJ2KZZG.js +0 -4
- package/dist/chunk-NNO6A2PO.js +0 -2
- package/dist/chunk-OGTFJ3XD.js +0 -2
- package/dist/chunk-Q5ELPRKQ.js +0 -2
- package/dist/chunk-Q72QSKXC.js +0 -308
- package/dist/chunk-QCN62RTF.js +0 -3
- package/dist/chunk-QW7EP6WI.js +0 -21
- package/dist/chunk-RU65DDUP.js +0 -215
- package/dist/chunk-SELM5MER.js +0 -2
- package/dist/chunk-SMRBZ6EC.js +0 -2
- package/dist/chunk-SNNWPCN7.js +0 -4
- package/dist/chunk-TFZB6XTM.js +0 -239
- package/dist/chunk-UCD3H3UZ.js +0 -5
- package/dist/chunk-UXM43C7T.js +0 -3
- package/dist/chunk-VFY6Y2H6.js +0 -61
- package/dist/chunk-WE5RZHZ7.js +0 -5
- package/dist/chunk-YMGZZEW4.js +0 -2
- package/dist/chunk-YVCIMIOC.js +0 -12
- package/dist/chunk-Z54RD7VL.js +0 -3
- package/dist/chunk-ZKX2FRS6.js +0 -15
- package/dist/cli-context-3SNLDYBM.js +0 -3
- package/dist/cli-context-T3B7W6GG.js +0 -2
- package/dist/cli-program-YNOXO72B.js +0 -7
- package/dist/command-descriptors-6AOUKWW7.js +0 -346
- package/dist/command-descriptors-ZFKJSRUP.js +0 -344
- package/dist/direct-navigation-DP4LVMRX.js +0 -3
- package/dist/direct-navigation-FLUS3BT6.js +0 -2
- package/dist/invocation-command-descriptors-QT2JMY5J.js +0 -3
- package/dist/invocation-command-descriptors-YN4QJEAX.js +0 -2
- package/dist/output-continuation-command-2V2SL4TD.js +0 -2
- package/dist/output-continuation-command-65J5IP3O.js +0 -3
- package/dist/project-reindex-5JOKXAXT.js +0 -2
- package/dist/project-reindex-UQBIKO4M.js +0 -3
- package/docs/WINDOWS_SIDECAR_RELEASE.md +0 -424
- package/docs/schemas/windows-sidecar-provenance.schema.json +0 -137
- package/scripts/build-codebaseiq-windows.mjs +0 -197
- package/scripts/codebaseiq-windows-provenance.mjs +0 -364
- package/scripts/verify-codebaseiq-windows.mjs +0 -29
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{A as G,D as P,a as y,b as ce,i as k,j as le,t as B,u as de,w as j,x as ue,y as b}from"./chunk-
|
|
2
|
+
import{A as G,D as P,a as y,b as ce,i as k,j as le,t as B,u as de,w as j,x as ue,y as b}from"./chunk-JLZLLLW5.js";import{c as Y,d as H,e as Z,g as X,i as ee,k as x}from"./chunk-AQI4N64O.js";import{E,a as g,b as Q,c as C,e as S,v as se,x as ae}from"./chunk-C7QWUBR2.js";import{la as W}from"./chunk-7UCDGXRW.js";import{Ga as N,Ha as L,Ja as M,V as te,Wa as oe,Xa as re,Za as ie,ga as T,ka as ne}from"./chunk-FTTV7IRX.js";function ge(e,n,t){if(!Number.isSafeInteger(t.limit)||t.limit<=0)throw new Error("Reference page limit must be a positive safe integer.");let o=N(e,n);if(!o)return{rows:[],hasMore:!1,producer:t.producer??"source-keyset",semanticEnrichment:!1};if(t.producer==="complete-only"||t.semantic===!0||o.relativePath.endsWith(".rb"))return F(e,n,t);let i=oe(e,o);if(!i)return F(e,n,t);let s=fe(e,o),c=Te(e,s),a=[],l=t.producer==="source-keyset";for(let u of c){if(t.after&&u<t.after.relativePath)continue;t.instrumentation?.fileScanned?.(u);let f=re(e,i,u);f.length>0&&(l=!0);let d=new Set(f);s?.relativePath===u&&d.add(s.line);for(let m of[...d].sort((p,Ae)=>p-Ae)){let p={relativePath:u,line:m};if(!(t.after&&R(p,t.after)<=0)&&(a.push(p),t.instrumentation?.rowAccepted?.(p),l&&a.length>t.limit))return me(a,t.limit)}}return l?me(a,t.limit):F(e,n,t,s)}function R(e,n){return(e.relativePath<n.relativePath?-1:e.relativePath>n.relativePath?1:0)||e.line-n.line}function me(e,n){return{rows:e.slice(0,n),hasMore:e.length>n,producer:"source-keyset",semanticEnrichment:!1}}function F(e,n,t,o){let r=N(e,n),i=t.semantic===!0||r?.relativePath.endsWith(".rb")?E(e,n,{semantic:t.semantic}):De(e,n,o),s=Me(i).filter(c=>!t.after||R(c,t.after)>0);for(let c of s.slice(0,t.limit+1))t.instrumentation?.rowAccepted?.(c);return{rows:s.slice(0,t.limit),hasMore:s.length>t.limit,producer:"complete-only",semanticEnrichment:t.semantic===!0}}function De(e,n,t){let o=N(e,n);if(!o)return[];let r=t===void 0?fe(e,o):t,i=ie(e,o).map(s=>({relativePath:s.file,line:s.line}));return r?[r,...i]:i}function fe(e,n){return!ne(n.symbol)&&!e.isIgnored(n.relativePath)?{relativePath:n.relativePath,line:n.startLine}:null}function Te(e,n){let t=te(e);return!n||t.includes(n.relativePath)?t:[...t,n.relativePath].sort((o,r)=>o<r?-1:o>r?1:0)}function Me(e){let n=new Map;for(let t of e)n.set(`${t.relativePath}\0${t.line}`,t);return[...n.values()].sort(R)}import{InvalidArgumentError as v}from"commander";var St=W,Be=/^[+-]?\d+$/u,je=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/u,xt=(e=>V(e,"an integer")),pe=(e=>{let n=V(e,"a non-negative integer");if(n<0)throw new v(`Expected a non-negative integer, got "${e}".`);return n}),he=(e=>{let n=V(e,"a positive integer");if(n<1)throw new v(`Expected a positive integer, got "${e}".`);return n}),Et=(e=>{if(!je.test(e))throw new v(`Expected a number, got "${e}".`);let n=Number(e);if(!Number.isFinite(n))throw new v(`Expected a finite number, got "${e}".`);return n});function V(e,n){if(!Be.test(e))throw new v(`Expected ${n}, got "${e}".`);let t=Number(e);if(!Number.isSafeInteger(t))throw new v(`Expected ${n}, got "${e}".`);return t}function h(e,n,t,...o){return o.length>0?{flags:e,description:n,parser:t,defaultValue:o[0]}:{flags:e,description:n,parser:t}}function Ge(){return h("--json","Output as JSON for programmatic consumption")}function Fe(){return h("--compact","Emit minified one-line JSON (use with --json)")}function Ve(){return h("--result-only","Emit only the command-owned result (use with --json)")}function Ce(e=[]){return I(e)}function I(e=[]){let n=[Ge(),Ve(),Fe()],t=new Set(n.map(o=>o.flags));return[...e.filter(o=>!t.has(o.flags)),...n]}function $(e,n=[]){return{category:e,examples:n}}function Pt(e,n){return{origin:"mixed",observedSources:e,producerValidation:{status:"not-evaluated"},families:n}}function $t(e,n){return{origin:e,observedSources:n,producerValidation:{status:"not-evaluated"}}}function wt(e,n,t){return{id:e,selector:n,origin:{kind:"fixed",origin:t}}}function Ot(e,n,t,o){return{id:e,selector:n,origin:{kind:"result-field",field:t,values:o}}}function w(e,n,t,o,r,i,s){return{answers:typeof e=="string"?[e]:e,returns:typeof n=="string"?[n]:n,inputs:t,coverage:o,operation:i,semantic:s,...r?{scope:r}:{}}}function Nt(e,n,t,o,r,i=y){let s=typeof e=="string"?[e]:e,c=typeof n=="string"?[n]:n;return w(s,c,t,o,r,i,K(s.join(" "),c.join("; "),["This command establishes only its declared result units and evidence contract."],void 0,{outputCost:o==="complete"?"bounded":"variable"}))}function ye(e,n,t,o,r,i=y){let s=typeof e=="string"?[e]:e,c=typeof n=="string"?[n]:n;return w(s,c,t,o,r,i,Ke(c.join("; "),["This command does not establish repository graph relationships unless its result says so explicitly."]))}function be(e,n,t={ranking:"identity-only"}){return{kind:"locator",locates:e,nonClaims:n,outputCost:"small",frontierClosure:["evidence","inspect","code"],...t}}function Lt(e){return{kind:"graph-projection",outputCost:"bounded",frontierClosure:["inspect","code"],...e}}function Re(e,n,t,o={}){return{kind:"source-read",reads:e,nonClaims:n,outputCost:"potentially-large",frontierClosure:[],...t?{compatibility:t}:{},...o}}function K(e,n,t,o,r={}){return{kind:"analysis",analysis:e,resultMeaning:n,nonClaims:t,outputCost:"bounded",frontierClosure:["inspect","code"],...o?{compatibility:o}:{},...r}}function Ke(e,n,t,o={}){return{kind:"maintenance",effect:e,nonClaims:n,outputCost:"variable",frontierClosure:[],...t?{compatibility:t}:{},...o}}function J(e){return Buffer.from(JSON.stringify(e),"utf8").toString("base64url")}function A(e){return e.generation.identity}function U(e){return"after"in e?J({version:2,...e}):J({version:1,...e})}function ve(e,n){let t=_e(e);if(!Je(t)&&!Ue(t))throw new Error("Invalid result cursor. Run the command again without --cursor.");return ze(t,n),t}function Je(e){if(!e||typeof e!="object")return!1;let n=e;return n.version===1&&typeof n.command=="string"&&typeof n.target=="string"&&Number.isSafeInteger(n.offset)&&(n.offset??-1)>=0&&typeof n.indexGeneration=="string"&&n.indexGeneration.length>0}function Ue(e){if(!e||typeof e!="object")return!1;let n=e,t=n.after;return n.version===2&&typeof n.command=="string"&&typeof n.target=="string"&&!!t&&typeof t.relativePath=="string"&&t.relativePath.length>0&&Number.isSafeInteger(t.line)&&(t.line??-1)>=0&&(n.producer==="source-keyset"||n.producer==="complete-only")&&typeof n.semanticEnrichment=="boolean"&&typeof n.indexGeneration=="string"&&n.indexGeneration.length>0}function _e(e){try{return JSON.parse(Buffer.from(e,"base64url").toString("utf8"))}catch{throw new Error("Invalid result cursor. Run the command again without --cursor.")}}function ze(e,n){if(e.command!==n.command||e.target!==n.target)throw new Error("This cursor belongs to a different command or target. Run again without --cursor.");if(e.indexGeneration!==n.indexGeneration)throw new Error("The index changed after this cursor was issued. Run again without --cursor.")}function Se(e,n){let t=L(e,n),o=qe(t);for(let r of o)console.log(r)}function xe(e,n,t="No results found for resolved symbol."){return L(e,n).match?t:z(n,M(e,n,5))}function _(e,n,t,o){return{...D(e,n),[o]:t}}function D(e,n){let t=L(e,n);return t.match?{matched:!0,resolved:{symbol:t.match.symbol,shortName:T(t.match.symbol),relativePath:t.match.relativePath},otherMatches:t.candidates.map(o=>({shortName:o.shortName,relativePath:o.relativePath,startLine:o.startLine})),totalMatches:t.total}:{matched:!1,suggestions:M(e,n,5)}}function z(e,n){let t=`No definition matched '${e}'.`;return n.length>0?`${t} Suggestions: ${n.join(", ")}`:t}function qe(e){if(!e.match||e.total<=1)return[];let n=e.match,t=Math.max(0,e.total-1),o=[`Resolved: ${T(n.symbol)} (${n.relativePath}) -- ${t} other definition(s) share this name; qualify as <dir/leaf> to target another.`],r=e.candidates.slice(0,3);return r.length>0&&o.push(`Alternates: ${r.map(i=>`${i.shortName} (${i.relativePath}:${g(i.startLine)})`).join("; ")}`),o.push(""),o}var We=k(({db:e,args:n,opts:t})=>{let o=B(n,0),r=b(t,"signatures"),i=se(e,o);if(b(t,"json")){P("outline",n,t,i);return}if(console.log(`\u2550\u2550\u2550 REQUEST \u2550\u2550\u2550
|
|
3
3
|
file=${JSON.stringify(o)}; signatures=${r?"shown":"hidden"}`),i.length===0){console.log(`
|
|
4
4
|
\u2550\u2550\u2550 OBSERVED FACTS \u2550\u2550\u2550
|
|
5
5
|
No compiler-owned constructs were found for ${JSON.stringify(o)}.`),console.log(`
|
|
@@ -28,4 +28,4 @@ ${p}continue with --cursor ${d.cursor}`)}});function Ye(e,n,t){let o=E(e,n,{sema
|
|
|
28
28
|
`),o=0,r=0;for(let i=0;i<t.length;i++){let s=t[i].length+12;i>o&&r+s>Ee&&(n.push(`${e.relativePath}:${g(e.startLine+o)}-${g(e.startLine+i-1)}`),o=i,r=0),r+=s}return n.push(`${e.relativePath}:${g(e.startLine+o)}-${g(e.endLine)}`),n}function Pe(e,n){return{requested:n.length,matched:n.filter(t=>t.status==="matched").length,ambiguous:n.filter(t=>t.status==="ambiguous").length,missing:n.filter(t=>t.status==="missing").length,entries:[...n],bindingClosure:e.bindingClosure}}function $e(e,n){return["codebaseiq","code",...e.map(O),...n.members==="all"?["--members","all"]:[],...n.context>0?["--context",String(n.context)]:[]].join(" ")}function dt(e,n,t){if(!t)return D(e,n);let o={file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:g(t.startLine),endLine:g(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
|
|
29
29
|
`).map((s,c)=>({line:g(t.startLine+c),text:s}))},r=D(e,n),i=r.totalMatches??0;return!r.matched||!r.resolved||i<=1?o:{...o,resolution:{selected:r.resolved,alternatives:r.otherMatches??[],totalMatches:i}}}function ut(e){return{requested:e.requested,matched:e.matched,ambiguous:e.ambiguous,missing:e.missing,entries:e.entries.map(n=>({selector:n.selector,status:n.status,kind:n.kind,totalCandidates:n.totalCandidates,sources:n.results.map(t=>({file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:g(t.startLine),endLine:g(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
|
|
30
30
|
`).map((o,r)=>({line:g(t.startLine+r),text:o}))})),definitions:n.definitions,...n.fileCoverage?{fileCoverage:n.fileCoverage}:{},...n.rangeCoverage?{rangeCoverage:n.rangeCoverage}:{},candidates:n.candidates,omittedCandidates:n.omittedCandidates,suggestions:n.suggestions,...n.reason?{reason:n.reason}:{}})),literalValues:e.bindingClosure.inline}}function O(e){return`'${e.replaceAll("'","'\\''")}'`}var Zt=[{id:"session",command:"session",description:"Show evidence already delivered in this agent exploration session",options:[h("--reset","Clear this agent exploration-session ledger")],agent:ye("Which indexed source ranges and graph facts have already been delivered in this exploration session?","prior command ordinals, exact source ranges, and content-bound graph receipts",[],"complete","repository",ce("repository-observation",[{when:{kind:"option",name:"reset",equals:!0},role:"mutation"}])),renderShape:"custom",docs:$("Navigation"),handler:et},{id:"refs",command:"refs <symbol>",description:"Find all files referencing a symbol",options:Ce([h("--full","Run unbounded semantic analysis on large indexes"),h("-n, --limit <n>","Maximum reference sites to return",he),h("--cursor <cursor>","Continue a prior bounded result (implies --limit 50 when omitted)")]),budget:"semantic",agent:{operation:y,answers:["Which files reference this symbol?","Is this symbol used anywhere, or only defined?"],returns:["referencing file paths","reference line numbers grouped by file"],inputs:["symbol"],coverage:"bounded",semantic:K("Resolve the exact reference sites attributed to one compiler symbol identity.","Referencing file paths and reference line numbers grouped by file.",["Reference sites do not establish runtime execution, data flow, or task relevance."]),contrasts:[{command:"imported-by",distinction:"imported-by lists files importing the symbol; refs covers every reference site, imported or not."},{command:"affected",distinction:"refs is one hop out; affected is the transitive closure of what could break."}]},renderShape:"grouped-by-file",docs:$("Navigation",["codebaseiq refs login"]),handler:Qe},{id:"outline",command:"outline <file>",description:"Tree view of symbols in a file, with line ranges",agent:{...w("What symbols and nesting exist in this file?","symbol names, nesting, and line ranges",["file"],"complete",void 0,y,be(["file","symbol","construct"],["File ownership and nesting do not establish execution or task relevance."],{ranking:"identity-only",manualInput:"One exact current project file path.",evidenceCeiling:"Exact compiler-owned constructs and ranges when the file is indexed; no invented semantic overlay."})),contrasts:[{command:"search",distinction:"outline enumerates constructs in one known file; search locates exact text across current project text."},{command:"code",distinction:"outline returns identities and ranges; code materializes exact source for selected identities."}]},options:I([h("--signatures","Show trimmed symbol signatures")]),renderShape:"custom",docs:$("Navigation"),handler:We},{id:"code",command:"code <selectors...>",description:"Read exact definitions, ranges with local call closure, or file export surfaces",agent:{...w("What exact source defines these symbols, ranges, or file surfaces?","per-selector resolution, complete definition source, exact ranges with statically attributed same-file call closure, file export surfaces, omitted-local ledgers, and line ranges",[["symbol","file"]],"complete",void 0,y,Re(["construct","exact-source"],["Source materialization does not establish callers, runtime reachability, or task relevance by itself."],void 0,{manualInput:"One or more exact symbols, file:line ranges, or file paths.",evidenceCeiling:"Exact current source bytes for every resolved selector, with omitted file-local constructs disclosed."})),resultUnits:{kind:"field",field:"code"},contrasts:[{command:"inspect",distinction:"code materializes complete exact source; inspect batches bounded behavior or source gaps."},{command:"outline",distinction:"code reads selected implementations; outline enumerates file structure without reading every body."}]},options:I([h("-C, --context <n>","Extra lines of context above/below",pe,0),h("--members <exported|all>","For file selectors, return the exported surface or the complete file",void 0,"exported")]),renderShape:"custom",docs:$("Navigation",["codebaseiq code parseRequest handleRequest","codebaseiq code src/api.ts src/web.ts"]),handler:Xe}];export{St as a,xt as b,pe as c,he as d,Et as e,h as f,Fe as g,Ce as h,I as i,$ as j,Pt as k,$t as l,wt as m,Ot as n,w as o,Nt as p,ye as q,be as r,Lt as s,Re as t,K as u,Se as v,xe as w,_ as x,D as y,Zt as z};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-USOAJHY7.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-356EZBIP.js";import{b as i}from"./chunk-LMTSB3TB.js";import{y as l}from"./chunk-GVAF222T.js";function y(e,r){let s=i(e,r);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let a=s.map(()=>"?").join(", "),n=e.all(`SELECT relative_path FROM documents
|
|
2
2
|
WHERE relative_path IN (${a})
|
|
3
3
|
ORDER BY relative_path`,...s).map(t=>t.relative_path).filter(t=>!e.isIgnored(t)),p=l(e,n,{onlyDocumented:!0,sort:!0}).map(({relativePath:t,...f})=>f),m=o(e,"forward",s).filter(t=>!e.isIgnored(t)),d=o(e,"reverse",s).filter(t=>!e.isIgnored(t));return{files:n,symbols:p,dependsOn:m,dependedOnBy:d}}function g(e,r){return y(e,r)}export{y as a,g as b};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-UW6KD57C.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{a as x}from"./chunk-BWL3PMPT.js";import{C as b}from"./chunk-ICUL7XRT.js";import{x as p}from"./chunk-7GAK2F3H.js";var y=new Set(["call","call_expression","command","command_call","function_call_expression","invocation_expression","macro_invocation","method_call","method_invocation","new_expression","object_creation_expression"]);function h(e,t,n,r){if(!Number.isSafeInteger(n)||n<0)return null;if(!Number.isSafeInteger(r)||r<0)throw new RangeError(`contextLines must be a non-negative safe integer; received ${r}`);let i=p(e,t);if(i.length===0||n>=i.length)return null;let o=Math.max(0,n-r),c=Math.min(i.length-1,n+r);return{relativePath:t,startLine:o,endLine:c,focusLine:n,source:i.slice(o,c+1).join(`
|
|
2
2
|
`)}}function F(e,t,n,r,i){let o=h(e,t,n,r);if(!o)return null;let c=b(e,t)?.rootNode??null;if(!c)return{...o,kind:"bounded-context"};let s=_(c,n,i);if(s.length!==1)return{...o,kind:s.length===0?"non-call-reference":"bounded-context"};let l=s[0],a=p(e,t),u=Math.max(0,l.startPosition.row),S=l.endPosition.column===0?l.endPosition.row-1:l.endPosition.row,d=Math.min(a.length-1,Math.max(u,S));return{relativePath:t,startLine:u,endLine:d,focusLine:n,source:a.slice(u,d+1).join(`
|
|
3
3
|
`),kind:"complete-call-expression"}}function L(e,t,n,r,i){if(!Number.isSafeInteger(i)||i<=0)throw new RangeError(`maxLines must be a positive safe integer; received ${i}`);let o=p(e,t);if(o.length===0||n<0||n>=o.length)return null;let c=Math.min(o.length-1,r,n+i-1);return{relativePath:t,startLine:n,endLine:c,focusLine:n,source:o.slice(n,c+1).join(`
|
|
4
4
|
`)}}function k(e,t,n,r,i=6){if(!Number.isSafeInteger(r)||r<=0)throw new RangeError(`maxLines must be a positive safe integer; received ${r}`);let o=p(e,t);if(o.length===0||n<0||n>=o.length)return null;let c=x(e,t,n);if(!c){let m=h(e,t,n,i);return m?{...m,unitType:null,unitStartLine:m.startLine,unitEndLine:m.endLine,omittedLines:0}:null}let s=c.startLine,l=c.endLine,a=l-s+1,u=Math.min(a,r),S=n-s-Math.floor(u/2),d=Math.max(0,Math.min(a-u,S)),f=s+d,g=f+u-1;return{relativePath:t,startLine:f,endLine:g,focusLine:n,source:o.slice(f,g+1).join(`
|
|
5
5
|
`),unitType:c.type,unitStartLine:s,unitEndLine:l,omittedLines:a-u}}function _(e,t,n){let r=[];return N(e,t,n,r),r.filter(i=>!r.some(o=>o!==i&&o.startIndex>=i.startIndex&&o.endIndex<=i.endIndex))}function N(e,t,n,r){if(M(e,t)){y.has(e.type)&&w(e)===n&&r.push(e);for(let i of e.namedChildren)N(i,t,n,r)}}function w(e){let t=e.childForFieldName("function")??e.childForFieldName("constructor")??e.childForFieldName("method")??e.childForFieldName("name")??e.namedChild(0);return t?t.text.match(/[\p{L}_$][\p{L}\p{N}_$!?-]*/gu)?.at(-1)??null:null}function M(e,t){return e.startPosition.row<=t&&e.endPosition.row>=t}export{h as a,F as b,L as c,k as d};
|
|
6
|
-
//# sourceMappingURL=chunk-
|
|
6
|
+
//# sourceMappingURL=chunk-VGWZ4MOY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as p}from"./chunk-HENP2O4A.js";import{a as y}from"./chunk-6VREELBC.js";import{a as h}from"./chunk-MSI3K7PJ.js";import{o as u}from"./chunk-J7AMBVWF.js";import{a as S,c as b}from"./chunk-SGMNWYTH.js";import{A as d,d as m}from"./chunk-GVAF222T.js";function x(e,o,r={}){let{direction:c="backward",maxDepth:s=3}=r,l=S(e,o);return l?c==="backward"?k(e,l,s,{semantic:r.semantic!==!1}):D(e,l,{semantic:r.semantic!==!1}):null}function j(e,o,r={}){return x(e,o,r)}function k(e,o,r,c){let s=[],l=new Set([o.symbol]),t=[o];for(let n=1;n<=r&&t.length!==0;n++){let i=[];for(let g of t){let w=h(e,g,{semantic:c.semantic,semanticEvidence:y});for(let a of w){if(l.has(a.symbol))continue;l.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function D(e,o,r){let c=new Set,s=[],l=new p(e);for(let t of u(e,o,{semantic:r.semantic,semanticEvidence:y})){if(s.length>=30)break;let n=t.enclosingSymbol??d(l.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{x as a,j as b};
|
|
2
|
+
//# sourceMappingURL=chunk-VWYGCMV5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-356EZBIP.js";import{a as t}from"./chunk-LMTSB3TB.js";function a(e,o){let r=t(e,o);return r?i(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=t(e,o);return r?i(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-W7YLRXZE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b,b as y}from"./chunk-IRQOAM5G.js";import{a as R,b as H,c as B,e as h,f as k}from"./chunk-OTOKVOJ3.js";import{a as p,b as g}from"./chunk-NMTSZXCL.js";import{M as v}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as b,b as y}from"./chunk-IRQOAM5G.js";import{a as R,b as H,c as B,e as h,f as k}from"./chunk-OTOKVOJ3.js";import{a as p,b as g}from"./chunk-NMTSZXCL.js";import{M as v}from"./chunk-ICUL7XRT.js";function V(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:i=6,limit:o=20,scope:c,scanLimit:n,filePattern:d,focusFiles:f}=s,l=v(e).reactProfiles({scope:c,minBehaviorTokens:Math.max(3,i),scanLimit:n}).map(r=>({file:r.file,component:r.name,tokens:r.behaviorTokens,profile:r})),t=b(l,r=>r.tokens);return y({profiles:l,limit:o,filePattern:d,focusFiles:f,candidateIndex:t,profile:{name:"react-hook-candidates"},compare:(r,a)=>C(r,a,m,i),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.componentA.localeCompare(a.componentA)||r.fileB.localeCompare(a.fileB)||r.componentB.localeCompare(a.componentB)})}function C(e,s,m,i){let o=p(e.tokens,s.tokens);if(o.size<i||!E(o))return null;let c=H(e.tokens,s.tokens);if(c<m)return null;let n=h(o,"hook:"),d=h(o,"react-hook:"),f=h(o,"effect:"),l=h(o,"state:"),t=h(o,"request:"),r=h(o,"handler:"),a=h(o,"handler-verb:"),u=A({sharedHooks:n,sharedReactHooks:d,sharedEffects:f,sharedState:l,sharedRequests:t,sharedHandlers:r,sharedHandlerVerbs:a});return{fileA:e.file,componentA:e.component,fileB:s.file,componentB:s.component,similarity:c,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:k(o),sharedHooks:n,sharedReactHooks:d,sharedEffects:f,sharedState:l,sharedRequests:t,sharedHandlers:r,sharedHandlerVerbs:a,evidenceClass:u.evidenceClass,actionTier:u.actionTier,evidenceClassReasons:u.reasons,recommendation:u.recommendation,uniqueToA:k(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:k(g(s.tokens,e.tokens)).slice(0,25),reason:P({sharedHooks:n,sharedReactHooks:d,sharedEffects:f,sharedState:l,sharedRequests:t,sharedHandlers:r,sharedHandlerVerbs:a}),locA:e.profile.loc,locB:s.profile.loc}}function A(e){return R({genericWords:q,stripPrefixes:w,primitiveGroups:[{values:e.sharedReactHooks,reasonPrefix:"shared React primitives",bucket:"generic"},{values:e.sharedEffects,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedHooks,label:"shared hook",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedState,label:"shared state",fallbackBucket:"generic"},{names:e.sharedHandlers,label:"shared handler",fallbackBucket:"generic"},{names:e.sharedHandlerVerbs,label:"shared action verb",fallbackBucket:"generic"}],recommendation:S})}function S(e){switch(e){case"domain-behavior":return"Review for a shared hook, controller, or feature module around the named domain behavior.";case"mixed":return"Separate generic React mechanics from domain-specific behavior before extracting a shared hook.";case"shared-abstraction":return"Review the existing shared hook usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct hook-extraction evidence."}}function E(e){let s=0,m=0,i=0,o=0,c=0,n=0,d=0;for(let t of e)t.startsWith("hook:")?s+=1:t.startsWith("react-hook:")?m+=1:t.startsWith("effect:")?i+=1:t.startsWith("request:")?o+=1:t.startsWith("handler:")||t.startsWith("handler-verb:")?c+=1:t.startsWith("state:")?n+=1:t.startsWith("state-hook:")&&(d+=1);let f=n+d,l=s+m+i+o+c+f;return B([{name:"requests",count:o},{name:"customHooks",count:s},{name:"namedStates",count:n},{name:"handlers",count:c},{name:"effects",count:i},{name:"reactHooks",count:m},{name:"namedBehavior",count:l}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{customHooks:1,requests:1,namedBehavior:5},reason:"shared custom hook and request workflow"},{min:{customHooks:1,namedStates:1,namedBehavior:5},reason:"shared custom hook and state"},{min:{customHooks:1,handlers:2,namedBehavior:5},reason:"shared custom hook and handlers"},{min:{namedStates:1,handlers:2,effects:1,namedBehavior:5},reason:"shared stateful effects"},{min:{namedStates:1,handlers:2,reactHooks:2,namedBehavior:5},reason:"shared stateful React primitives"}]).pass}function P(e){let s=[];return e.sharedHooks.length&&s.push(`shared hooks: ${e.sharedHooks.join(", ")}`),e.sharedReactHooks.length&&s.push(`shared React hooks: ${e.sharedReactHooks.join(", ")}`),e.sharedEffects.length&&s.push(`shared effects: ${e.sharedEffects.join(", ")}`),e.sharedState.length&&s.push(`shared state: ${e.sharedState.join(", ")}`),e.sharedRequests.length&&s.push(`shared requests: ${e.sharedRequests.join(", ")}`),e.sharedHandlers.length&&s.push(`shared handlers: ${e.sharedHandlers.slice(0,6).join(", ")}`),e.sharedHandlerVerbs.length&&s.push(`shared action verbs: ${e.sharedHandlerVerbs.slice(0,6).join(", ")}`),s.join("; ")||"shared React behavior profile"}var q=new Set(["add","apply","async","callback","cancel","change","clear","close","create","data","delete","draft","edit","effect","error","fetch","filter","form","handle","has","is","item","items","load","loader","loading","memo","name","open","reducer","refresh","ref","remove","request","reset","resource","row","rows","save","saving","search","select","selected","state","store","submit","toggle","update","use","value"]),w=[/^use(?=[A-Z])/,/^handle(?=[A-Z])/,/^is(?=[A-Z])/,/^has(?=[A-Z])/];export{V as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WK2IQJPK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P,b as y}from"./chunk-IRQOAM5G.js";import{a as C,c as b,e as r,f}from"./chunk-OTOKVOJ3.js";import{a as g,b as h,c as k}from"./chunk-NMTSZXCL.js";import{M as v}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P,b as y}from"./chunk-IRQOAM5G.js";import{a as C,c as b,e as r,f}from"./chunk-OTOKVOJ3.js";import{a as g,b as h,c as k}from"./chunk-NMTSZXCL.js";import{M as v}from"./chunk-ICUL7XRT.js";function L(e,i={}){let{minSimilarity:o=.62,minTokens:n=8,limit:c=20,scope:l,scanLimit:u,filePattern:m,focusFiles:d}=i,s=B(e,{scope:l,minTokens:n,scanLimit:u}),p=P(s,t=>t.tokens);return y({profiles:s,limit:c,filePattern:m,focusFiles:d,candidateIndex:p,profile:{name:"vue-component-duplicates"},compare:(t,a)=>V(t,a,o),sort:(t,a)=>a.similarity-t.similarity||t.fileA.localeCompare(a.fileA)||t.fileB.localeCompare(a.fileB)})}function B(e,i){return v(e).vueProfiles({scope:i.scope,minTemplateTokens:i.minTokens,scanLimit:i.scanLimit}).map(o=>({file:o.file,tokens:o.templateTokens,loc:T(o)}))}function T(e){return e.totalLines}function V(e,i,o){let n=g(e.tokens,i.tokens);if(n.size<6||!R(n))return null;let c=k(e.tokens,i.tokens);if(c<o)return null;let l=r(n,"component:"),u=r(n,"prop:"),m=r(n,"event:"),d=r(n,"directive:"),s=r(n,"slot:"),p=r(n,"id:"),t=S({sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p});return{fileA:e.file,fileB:i.file,similarity:c,tokenCountA:e.tokens.size,tokenCountB:i.tokens.size,sharedTokens:f(n),sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p,evidenceClass:t.evidenceClass,actionTier:t.actionTier,evidenceClassReasons:t.reasons,recommendation:t.recommendation,uniqueToA:f(h(e.tokens,i.tokens)).slice(0,25),uniqueToB:f(h(i.tokens,e.tokens)).slice(0,25),locA:e.loc,locB:i.loc}}function R(e){let i=0,o=0;for(let n of e)n.startsWith("component:")&&(i+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("directive:")||n.startsWith("slot:"))&&(o+=1);return b([{name:"component",count:i},{name:"behavior",count:o}],[{min:{component:1},reason:"shared custom component"},{min:{behavior:3},reason:"shared Vue template structure"}]).pass}function S(e){return C({genericWords:x,primitiveGroups:[{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"},{values:e.sharedDirectives,reasonPrefix:"shared directives",bucket:"generic"},{values:e.sharedSlots,reasonPrefix:"shared slots",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedIdentifiers,label:"shared identifier",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific Vue primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var x=new Set(["actions","app","button","card","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WWCV4E6J.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as x}from"./chunk-
|
|
1
|
+
import{c as x}from"./chunk-HENP2O4A.js";import{a as S}from"./chunk-SGMNWYTH.js";import{d as g}from"./chunk-GVAF222T.js";import{b as p}from"./chunk-F74LZWCE.js";import{C as u}from"./chunk-ICUL7XRT.js";import{f as h,g as y}from"./chunk-SX72EVMY.js";function U(e,t,s={}){let n=S(e,t);if(!n)return null;let o=new x(e),a=w(e,n),r=n.endLine-n.startLine+1,i=o.calleeEvidenceMap([n],{additive:!0,semantic:s.semantic}),l=i.rows.get(n.symbolId)??[],c=new Set(l.map(L=>L.symbol)),m=i.incompleteSymbolIds.has(n.symbolId),b=i.unavailableSymbolIds.has(n.symbolId),N=s.semantic===!1?"disabled":m&&b?"incomplete-and-unavailable":m?"incomplete":b?"unavailable":"complete",d=!m&&!b;return{symbol:n.symbol,shortName:g(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:r,branches:a.branches,estimateBasis:a.estimateBasis,cyclomaticEstimate:a.branches+1,calleeCount:d?c.size:null,fanIn:C(e,n.symbolId),fanOut:d?D(l,n.relativePath):null,coverage:{semanticEvidence:N}}}function w(e,t){let s=u(e,t.relativePath);if(s){let n=v(s.rootNode,t.startLine,t.endLine);if(n)return{branches:M(n),estimateBasis:"ast"}}return{branches:P(E(e,t.relativePath,t.startLine,t.endLine),_(e,t.relativePath)),estimateBasis:"regex-fallback"}}function W(e,t){let s=new Map,n=new Map;for(let o of t){let a=n.get(o.relativePath)??[];a.push(o),n.set(o.relativePath,a)}for(let[o,a]of n){let r=u(e,o),i=r===null?[]:a.filter(c=>r.rootNode.startPosition.row<=c.startLine&&r.rootNode.endPosition.row>=c.endLine),l=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"});O(r.rootNode,i,s)}for(let c of a)l.has(c.symbolId)||s.set(c.symbolId,I(e,c))}return s}function I(e,t){return{branches:P(E(e,t.relativePath,t.startLine,t.endLine),_(e,t.relativePath)),estimateBasis:"regex-fallback"}}function _(e,t){return e.get("SELECT language FROM documents WHERE relative_path = ?",t)?.language??"unknown"}function E(e,t,s,n){try{return h(e.config.projectRoot,t,{inputKind:"indexed source file"}).split(`
|
|
2
2
|
`).slice(s,n+1).join(`
|
|
3
3
|
`)}catch(o){if(!y(o))throw o;return""}}function C(e,t){return e.get(`SELECT COUNT(DISTINCT c.document_id) AS c
|
|
4
4
|
FROM mentions m
|
|
@@ -13,4 +13,4 @@ import{c as x}from"./chunk-7FND7D7N.js";import{a as S}from"./chunk-UZGZB3VB.js";
|
|
|
13
13
|
WHERE m.symbol_id = ?
|
|
14
14
|
AND m.role != 1
|
|
15
15
|
AND sym_def.document_id != c.document_id`,t)?.c??0}function D(e,t){return new Set(e.filter(s=>s.file!==t).map(s=>s.symbol)).size}function M(e){let t=0;return f(e,s=>{t+=B(s)}),t}function O(e,t,s){let n=[...t].sort((o,a)=>o.startLine-a.startLine||a.endLine-o.endLine);f(e,o=>{let a=B(o);if(a===0)return;let r=o.startPosition.row,i=o.endPosition.row;for(let l of n){if(l.startLine>r)break;if(l.endLine<i)continue;let c=s.get(l.symbolId);c&&(c.branches+=a)}})}function f(e,t){t(e);for(let s of e.namedChildren)f(s,t)}function v(e,t,s){if(e.startPosition.row>t||e.endPosition.row<s)return null;for(let n of e.namedChildren){let o=v(n,t,s);if(o)return o}return e}var F=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 B(e){return F.has(e.type)?1:e.type==="binary_expression"&&e.parent?.type!=="binary_expression"&&(e.text.includes("&&")||e.text.includes("||"))?R(e.text):0}function R(e){return(e.match(/&&|\|\|/g)??[]).length}function P(e,t){let s=p(e),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(t==="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(t==="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(t==="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(t==="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{U as a,w as b,W as c,M as d};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-XMJ53WG4.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{H as f,I as h,K as x,L as b,i as m,k as d}from"./chunk-5FWR5HLG.js";import{createHash as N}from"crypto";var y=2,S=200,C=new Set(["string","template_string","string_literal","raw_string_literal","char_literal","concatenated_string"]),A={class_declaration:"name",abstract_class_declaration:"name",class:"name",class_definition:"name",trait_item:"name",impl_item:"type",mod_item:"name"},L=m({kind:"callable-units",invalidation:d("callable-units"),serialize:t=>JSON.stringify({version:y,...t}),deserialize:t=>{try{let e=JSON.parse(t);return e.version!==y?null:{language:e.language,contentHash:e.contentHash,units:e.units}}catch{return null}}});function U(t){return N("sha256").update(t).digest("hex")}function j(t,e,r){let s=U(r),n=L.read(t,e,s);if(n&&n.contentHash===s)return n;let o=f(t,e,r);if(!o)return null;let i={language:o.language,contentHash:s,units:E(o.tree,o.language)};return L.write(t,e,s,i),i}function E(t,e){let r=[],s=new Map,n=[],o=i=>{let l=b(i,e),u=l?.functionNode.childForFieldName("body");if(l&&u){let a=`${n.join(".")}#${l.name}`,g=s.get(a)??0;s.set(a,g+1),r.push(H(l.name,[...n],g,l.definitionNode,u,e)),n.push(l.name);for(let p of i.children)o(p);n.pop();return}let c=T(i);c&&n.push(c);for(let a of i.children)o(a);c&&n.pop()};return o(t.rootNode),r}function H(t,e,r,s,n,o){let i=[],l=[],u=new Set,c=a=>{if(x(a))return;let g=h(a,o);if(g&&u.add(g.calleeLeaf),C.has(a.type)){i.push(a.text.replace(/\r\n/g,`
|
|
2
|
+
`)),l.push("\0L");return}if(a.childCount===0){i.push(a.text),l.push(a.text);return}for(let p of a.children)c(p)};return c(n),{name:t,container:e,ordinal:r,startLine:s.startPosition.row,endLine:s.endPosition.row,bodyStartLine:n.startPosition.row,bodyLines:n.text.split(/\r?\n/).filter(a=>a.trim().length>0).length,tokenCount:i.length,signature:v(s,n),exactHash:_(i),shapeHash:_(l),calleeLeaves:[...u].sort(),exported:F(s)}}function T(t){let e=A[t.type];return e?t.childForFieldName(e)?.text??null:null}function v(t,e){let r=t.text.lastIndexOf(e.text),n=(r>=0?t.text.slice(0,r):w(t.text)).replace(/\s+/g," ").trim().replace(/[=:]?\s*$/,"").trim();return n.length>S?`${n.slice(0,S-1)}\u2026`:n}function w(t){let e=t.indexOf(`
|
|
3
|
+
`);return e>=0?t.slice(0,e):t}function F(t){if(t.namedChildren.some(r=>r.type==="visibility_modifier"&&r.text.startsWith("pub")))return!0;let e=t;for(let r=0;e&&r<3;r++,e=e.parent)if(e.type==="export_statement")return!0;return!1}function _(t){return N("sha256").update(t.join("")).digest("hex").slice(0,24)}export{j as a};
|
|
4
|
+
//# sourceMappingURL=chunk-XN3EKMLI.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as S,e as d}from"./chunk-YT4DVWUV.js";import{readdirSync as m}from"fs";import{execFileSync as x}from"child_process";import{extname as l,join as y}from"path";var h=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".clj",".cljs",".cljc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],X=[".vue"],f=[".tsx",".jsx"],g=[".vue"],_=[...f,...g],I=new Set(f),w=new Set(g),p=new Set(h.map(e=>e.toLowerCase())),C=[...p].sort().join(","),E=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs","out","coverage",".codebaseiq-cache","__pycache__",".venv","venv",".idea",".vscode"]);function O(e,t={}){let s=t.includeIndexed??!0,i=t.includeAuxiliary??!0,n=t.extensions?.map(c=>c.toLowerCase()),o=n?new Set(n):p,u=n?[...o].sort().join(","):C,r=`${s?"1":"0"}|${i?"1":"0"}|${u}`;return R.get(e,r,()=>{let c=new Set;if(s)for(let a of d(e,{includeIgnored:!1}))o.has(l(a).toLowerCase())&&c.add(a);if(i)for(let a of N(e.config.projectRoot,o))e.isIgnored(a)||s&&c.has(a)||c.add(a);return[...c].sort()})}function k(e,t={}){let s=!1,i=!1;for(let n of O(e,{extensions:_})){if(t.scope&&!n.includes(t.scope))continue;let o=l(n).toLowerCase();if(s||=I.has(o),i||=w.has(o),s&&i)break}return{react:s,vue:i}}var R=S("source-files",{clearGroups:[]});function N(e,t){return T(e,t)??v(e,t)}function T(e,t){try{let s=x("git",["ls-files","--cached","--others","--exclude-standard"],{cwd:e,encoding:"utf-8",timeout:1e4,killSignal:"SIGKILL",stdio:["ignore","pipe","ignore"],windowsHide:!0}),i=new Set;for(let n of s.split(`
|
|
2
|
+
`)){let o=n.trim();o&&(j(o)||t.has(l(o).toLowerCase())&&i.add(o))}return i}catch{return null}}function j(e){return e.split("/").some(t=>E.has(t))}function v(e,t){let s=new Set,i=n=>{let o=n?y(e,n):e,u;try{u=m(o,{withFileTypes:!0})}catch{return}for(let r of u)if(!E.has(r.name)){if(r.isDirectory()){i(n?`${n}/${r.name}`:r.name);continue}t.has(l(r.name).toLowerCase())&&s.add(n?`${n}/${r.name}`:r.name)}};return i(""),s}export{X as a,E as b,O as c,k as d};
|
|
3
|
+
//# sourceMappingURL=chunk-XQAVQVIL.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-6VREELBC.js";import{o as h}from"./chunk-J7AMBVWF.js";import{a as g}from"./chunk-SGMNWYTH.js";import{h as d}from"./chunk-GVAF222T.js";import{a as m}from"./chunk-ICUL7XRT.js";import{w as p}from"./chunk-7GAK2F3H.js";function D(t,r,n={}){let e=g(t,r);if(!e)return[];let l=!d(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=h(t,e,{semantic:n.semantic,semanticEvidence:R}).map(s=>({relativePath:s.file,line:s.line})),o=b(t,e),f=new Set,a=[];for(let s of[...l,...c,...o]){let u=`${s.relativePath}:${s.line}`;f.has(u)||(f.add(u),a.push(s))}return a}function b(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=S(r.symbol);if(n.length===0)return[];let e=[];for(let i of m(t,{extensions:[".rb"],includeIgnored:!1})){let l=p(t,i);if(!l)continue;let c=l.split(`
|
|
2
2
|
`);for(let o=0;o<c.length;o++){let f=c[o]??"";n.some(a=>new RegExp(`@${a}\\b|\\b${a}:`).test(f))&&e.push({relativePath:i,line:o})}}return e}function S(t){let n=(t.split(":").pop()??t).replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^A-Za-z0-9_]+/g,"_").toLowerCase().replace(/^_+|_+$/g,""),e=n.split("_").filter(Boolean),i=new Set;return n&&i.add(n),e.length>=1&&i.add(e[e.length-1]),e.length>=2&&i.add(e.slice(-2).join("_")),[...i]}export{D as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-XQPPURLQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{C as s}from"./chunk-ICUL7XRT.js";var p=new Set(["componentDidCatch","componentDidMount","componentDidUpdate","componentWillUnmount","getDerivedStateFromError","getDerivedStateFromProps","getSnapshotBeforeUpdate","render","shouldComponentUpdate","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate"]);function l(i,t){if(!t.parentTypeName||!/\.[cm]?[jt]sx?$/.test(t.relativePath))return!1;let r=s(i,t.relativePath);if(!r)return!1;let n=r.rootNode.descendantsOfType("method_definition").find(a=>a.startPosition.row<=t.startLine&&a.endPosition.row>=t.endLine);if(!n)return!1;if(/\boverride\b/.test(n.text.slice(0,Math.max(0,n.text.indexOf("{")))))return!0;let e=n.parent;for(;e&&e.type!=="class_declaration"&&e.type!=="class";)e=e.parent;if(!e)return!1;let o=e.text.slice(0,Math.max(0,e.text.indexOf("{")));return/\bimplements\b/.test(o)||/\bextends\b/.test(o)?!0:p.has(t.leaf)&&/\bextends\s+(?:React\.)?(?:Component|PureComponent)\b/.test(o)}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YHPG3S2U.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as B,g as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as B,g as S}from"./chunk-2OMXFE64.js";import{b as O}from"./chunk-B75HZHUP.js";import{a as E}from"./chunk-BGBBVSH4.js";import{c as k}from"./chunk-NDKOVQFG.js";import{a as L}from"./chunk-BRQL7AFJ.js";import{d as P}from"./chunk-SGX43S2L.js";import{d as I,g as z,j as D,u as $}from"./chunk-GVAF222T.js";import{b as T,k as v,p as A}from"./chunk-F74LZWCE.js";import{A as _}from"./chunk-7GAK2F3H.js";import{d as p}from"./chunk-3LCDIREB.js";import{d as b}from"./chunk-UC2FD2PS.js";var U=new Set(P());function $e(e,t={}){let{includeHomonyms:n=!1,limit:i}=t,s=X(e,t).filter(r=>r.relationship==="divergent"||n&&r.relationship==="homonym");return i?s.slice(0,i):s}function X(e,t={}){let{scope:n,minSimilarity:i=.3,scanLimit:s}=t,r=Q(e,{scope:n,scanLimit:s});return Y(r,{minSimilarity:i,isDelegatePair:De(e)}).filter(a=>!a.members.some(o=>_(e,o.file,o.startLine,"twin")))}function Y(e,t={}){let n=t.minSimilarity??.3,i=t.isDelegatePair,s=e.filter(c=>!V(c.leaf)&&!fe(c.leaf)&&L(c.file)!=="test"&&!D(c.symbol)&&!Z(c.symbol)&&!j(c.symbol,c.leaf)),{recordsByLeaf:r,recordOrder:a}=p("twin-drift.group-by-leaf",()=>q(s),()=>({records:s.length})),o=p("twin-drift.cluster-leaf-names",()=>W([...r.keys()]),()=>({leaves:r.size}));return p("twin-drift.compare-clusters",()=>{let c=[];for(let h of o){let u=J(h,r,a);if(u.length<2||new Set(u.map(f=>f.file)).size<2)continue;let m=null,R=!1,C=!1,y=new Set;for(let f=0;f<u.length;f+=1)for(let w=f+1;w<u.length;w+=1){let d=u[f],g=u[w];if(d.file===g.file||!ge(d,g)||i?.(d,g,u)||i?.(g,d,u))continue;if(R=!0,y.add(d.symbol),y.add(g.symbol),d.normalizedBody===g.normalizedBody){C=!0;continue}let M=oe(d.tokens,g.tokens);(!m||M>m.similarity)&&(m={a:d,b:g,similarity:M})}if(!R)continue;let x=u.filter(f=>y.has(f.symbol)).sort((f,w)=>f.file.localeCompare(w.file)||f.startLine-w.startLine).map(se);if(!m){c.push({leaf:G(h),relationship:C?"identical":"homonym",maxDivergence:0,members:x});continue}let N=m.similarity>=n?"divergent":"homonym";c.push({leaf:G(h),relationship:N,maxDivergence:Math.round((1-m.similarity)*1e3)/1e3,members:x,...N==="divergent"?{firstDivergentTokens:ae(m.a.tokens,m.b.tokens)}:{}})}return c},()=>({clusters:o.length,records:s.length})).sort((c,h)=>h.members.length-c.members.length||h.maxDivergence-c.maxDivergence||c.leaf.localeCompare(h.leaf))}function q(e){let t=new Map,n=new Map;for(let[i,s]of e.entries()){let r=t.get(s.leaf)??[];r.push(s),t.set(s.leaf,r),n.set(s,i)}return{recordsByLeaf:t,recordOrder:n}}function J(e,t,n){let i=[...e].flatMap(s=>t.get(s)??[]);return e.size>1&&i.sort((s,r)=>(n.get(s)??0)-(n.get(r)??0)),i}function Q(e,t){let n=p("twin-drift.load-definitions",()=>$(e,{scope:t.scope}).filter(r=>ee(r)&&!e.isIgnored(r.relativePath)).filter(r=>!k(r.relativePath)));p("twin-drift.sort-definitions",()=>n.sort((r,a)=>r.relativePath.localeCompare(a.relativePath)||r.startLine-a.startLine),()=>({definitions:n.length}));let i=O(n,t.scanLimit),s=p("twin-drift.select-candidates",()=>te(i),()=>({scanned:i.length}));return p("twin-drift.build-records",()=>{let r=[];for(let a of s){let o=ne(e,a);o&&r.push(o)}return r},()=>({candidates:s.length,scanned:i.length}))}function ee(e){return e.isFunctionLike?e.symbol.startsWith("rust-analyzer ")?typeof e.kind=="number"&&U.has(e.kind):!0:!1}function te(e){let t=e.filter(r=>r.leaf&&!V(r.leaf)&&!D(r.symbol)&&!Z(r.symbol)&&!j(r.symbol,r.leaf)),n=new Map;for(let r of t){let a=n.get(r.leaf)??[];a.push(r),n.set(r.leaf,a)}let i=W([...n.keys()]),s=new Set;for(let r of i){let a=[...r].flatMap(o=>n.get(o)??[]);if(!(a.length<2)&&!(new Set(a.map(o=>o.relativePath)).size<2)&&!a.every(o=>L(o.relativePath)==="test"))for(let o of a)s.add(o)}return e.filter(r=>s.has(r))}function ne(e,t){if(!t.leaf)return null;let n=B(e,t);if(!n||!z(t.symbol)&&!re(n,t.leaf))return null;let i=T(S(n)),s=i.replace(/\s+/g,"");if(!s||s.length<8)return null;let r=i.match(ie)??[];return r.length===0?null:{leaf:t.leaf,symbol:t.symbol,shortName:I(t.symbol),file:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:E(t),normalizedBody:s,tokens:r,isThinForwarder:H(i)}}function re(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`\\b(?:const|let|var)\\s+${n}(?:\\s*:[^=]+)?\\s*=\\s*(?:async\\s*)?(?:\\([^)]*\\)|[A-Za-z_$][\\w$]*)\\s*=>`,"s").test(e)}var ie=/[A-Za-z_$][A-Za-z0-9_$]*|\d+(?:\.\d+)?|[^\sA-Za-z0-9_$]/g;function se(e){return{symbol:e.symbol,shortName:e.shortName,file:e.file,startLine:e.startLine,endLine:e.endLine,loc:e.loc}}function oe(e,t){let n=new Set(e),i=new Set(t);if(n.size===0&&i.size===0)return 1;if(n.size===0||i.size===0)return 0;let s=0;for(let a of n)i.has(a)&&(s+=1);let r=n.size+i.size-s;return r===0?0:s/r}function ae(e,t){let n=Math.min(e.length,t.length),i=0;for(;i<n&&e[i]===t[i];)i+=1;let s=e.slice(i,i+6).join(" "),r=t.slice(i,i+6).join(" ");return!s&&!r?"(bodies differ only in trailing length)":`A: ${s||"(end)"} | B: ${r||"(end)"}`}function W(e){let t=new Map;for(let a of e)t.set(a,a);let n=a=>{let o=a;for(;t.get(o)!==o;)o=t.get(o);let l=a;for(;t.get(l)!==o;){let c=t.get(l);t.set(l,o),l=c}return o},i=(a,o)=>{let l=n(a),c=n(o);l!==c&&t.set(l,c)},s=new Map;for(let a of e){let o=a.slice(0,2).toLowerCase(),l=s.get(o)??[];l.push(a),s.set(o,l)}for(let a of s.values())for(let o=0;o<a.length;o+=1)for(let l=o+1;l<a.length;l+=1)le(a[o],a[l])&&i(a[o],a[l]);let r=new Map;for(let a of e){let o=n(a),l=r.get(o)??new Set;l.add(a),r.set(o,l)}return[...r.values()]}function le(e,t){return e===t||e.toLowerCase()===t.toLowerCase()?!0:e.length<8||t.length<8||Math.abs(e.length-t.length)>2||ce(e.toLowerCase(),t.toLowerCase())/Math.max(e.length,t.length)<.8?!1:pe(e.toLowerCase(),t.toLowerCase(),2)}function ce(e,t){let n=Math.min(e.length,t.length),i=0;for(;i<n&&e[i]===t[i];)i+=1;return i}function fe(e){return/^[A-Z][A-Z0-9_]*$/.test(e)||/^__[^_].*__$/.test(e)||ue.has(e.toLowerCase())}var ue=new Set(["main","row"]),me=new Set(["app","component","components","feature","features","impl","index","lib","route","routes","shared","src","tsx","typescript","ui"]);function Z(e){return e.startsWith("rust-analyzer ")&&/\/(?:tests?|benches?)\//.test(e)}var de=new Set(["default","new","reset"]);function j(e,t){return e.startsWith("rust-analyzer ")&&de.has(t.toLowerCase())}function ge(e,t){if(e.leaf.toLowerCase()!==t.leaf.toLowerCase()||e.leaf.length>4)return!0;let n=F(e);return[...F(t)].some(i=>n.has(i))}function F(e){let t=e.leaf.toLowerCase();return new Set(`${e.file}/${e.shortName}`.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>2&&n!==t&&!me.has(n)))}function pe(e,t,n){if(Math.abs(e.length-t.length)>n)return!1;let i=Array.from({length:t.length+1},(s,r)=>r);for(let s=1;s<=e.length;s+=1){let r=[s],a=r[0];for(let o=1;o<=t.length;o+=1){let l=e[s-1]===t[o-1]?0:1,c=Math.min(i[o]+1,r[o-1]+1,i[o-1]+l);r.push(c),a=Math.min(a,c)}if(a>n)return!1;i=r}return i[t.length]<=n}function ke(e){return H(T(S(e)))}function H(e){let t=e.trim();if(!t||he.test(t))return!1;let n=be(t);return n.length===0||n.length>2?!1:ye(n[n.length-1])}var he=/\b(?:if|else|for|while|switch|try|catch|do)\b/,we=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[[^[\]]*\])*\((?:[^()]|\([^()]*\))*\)$/;function ye(e){let t=e.trim().replace(/^return\s+/,"").replace(/^await\s+/,"").replace(/;\s*$/,"").trim();return we.test(t)}function be(e){let t=[],n=0,i="";for(let s of e){if(s==="("||s==="["||s==="{"?n+=1:(s===")"||s==="]"||s==="}")&&(n=Math.max(0,n-1)),s===";"&&n===0){t.push(i),i="";continue}i+=s}return i.trim()&&t.push(i),t.map(s=>s.trim()).filter(s=>s.length>0)}var Te=3;function De(e){let t=new Map;return(n,i,s)=>{if(!n.isThinForwarder)return!1;let r=`${n.symbol}\0${i.symbol}`,a=t.get(r);if(a!==void 0)return a;let o=K(e,n,i,s,Te,new Set);return t.set(r,o),o}}function K(e,t,n,i,s,r){if(s<=0||r.has(t.symbol)||(r.add(t.symbol),(v(e,t.file)??[]).filter(l=>l.line>=t.startLine&&l.line<=t.endLine&&l.calleeLeaf===n.leaf).length===0))return!1;let o=new Set(A(e,t.file).filter(l=>l.sourcePath&&(l.kind!=="namespace"||l.usedMembers.includes(n.leaf))).map(l=>l.sourcePath));if([...o].some(l=>b(l,n.file)))return!0;for(let l of i)if(!(l.symbol===t.symbol||l.symbol===n.symbol||!l.isThinForwarder)&&[...o].some(c=>b(c,l.file))&&K(e,l,n,i,s-1,r))return!0;return!1}function V(e){return e.startsWith("<")&&e.endsWith(">")}function G(e){return[...e].sort()[0]}export{$e as a,X as b,Y as c,ke as d,be as e};
|
|
2
|
+
//# sourceMappingURL=chunk-YRKP7PM7.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{c as p}from"./chunk-RCIGX23V.js";import{basename as D}from"path";function h(){let t=new WeakMap;return{cache:t,ensure(r){let a=t.get(r);return a||(a=new Map,t.set(r,a)),a}}}function g(t,r){let{cache:a,ensure:o}=h(),i={get(e,c,s){let n=o(e);if(n.has(c))return n.get(c);let l=s();return n.set(c,l),l},invalidate(e,c){a.get(e)?.delete(c)},invalidateAll(e){a.delete(e)},size(e){return a.get(e)?.size??0}};return p({name:t,groups:r.clearGroups,clearAll:e=>i.invalidateAll(e),clearFile:(e,c)=>i.invalidate(e,c)}),i}function S(t,r){let a=new WeakMap,o={get(i,e){let c=a.get(i);if(c)return c.value;let s=e();return a.set(i,{value:s}),s},invalidate(i){a.delete(i)},has(i){return a.has(i)}};return p({name:t,groups:r.clearGroups,clearAll:i=>o.invalidate(i)}),o}var m={clearGroups:["whole-project","source-file"]};function E(t){return v(t,m)}function v(t,r){let{cache:a,ensure:o}=h(),i={get(e,c,s,n){let l=o(e),u=l.get(c);if(u&&u.source===s)return u.value;let d=n();return l.set(c,{source:s,value:d}),d},invalidate(e,c){a.get(e)?.delete(c)},invalidateAll(e){a.delete(e)}};return p({name:t,groups:r.clearGroups,clearAll:e=>i.invalidateAll(e),clearFile:(e,c)=>i.invalidate(e,c)}),i}var C=g("indexed-document-paths",{clearGroups:["whole-project"]});function x(t,r={}){let a=V(r);return[...C.get(t,a,()=>{let i=r.scope?"AND relative_path LIKE ?":"",e=r.like?"AND relative_path LIKE ?":"",c=[...r.scope?[`%${r.scope}%`]:[],...r.like?[r.like]:[]],s=t.all(`SELECT relative_path
|
|
2
|
+
FROM documents
|
|
3
|
+
WHERE 1 = 1
|
|
4
|
+
${t.pathExclusionsFor("documents")}
|
|
5
|
+
${i}
|
|
6
|
+
${e}
|
|
7
|
+
ORDER BY relative_path`,...c).map(l=>l.relative_path),n=r.extensions?s.filter(l=>r.extensions.some(u=>l.toLowerCase().endsWith(u.toLowerCase()))):s;return r.includeIgnored===!1?n.filter(l=>!t.isIgnored(l)):n})]}function V(t){let r=t.extensions?[...new Set(t.extensions.map(a=>a.toLowerCase()))].sort():null;return JSON.stringify({scope:t.scope??null,like:t.like??null,extensions:r,includeIgnored:t.includeIgnored!==!1})}function K(t,r,a){let o=f(r);if(!o)return[];let i=t.all(`SELECT relative_path
|
|
8
|
+
FROM documents
|
|
9
|
+
WHERE relative_path = ?
|
|
10
|
+
${t.pathExclusionsFor("documents")}`,o).filter(n=>!t.isIgnored(n.relative_path)).map(n=>({relativePath:n.relative_path,score:b(n.relative_path,o)}));if(i.length>0)return i;let e=x(t,{includeIgnored:!1}).map(n=>({relativePath:n,score:b(n,o)})).filter(n=>n.score>0).sort((n,l)=>l.score-n.score||n.relativePath.localeCompare(l.relativePath)),c=e.filter(n=>n.score>=1100);if(c.length>0)return a.allowMultiple?c:[c[0]];let s=e.filter(n=>n.score>=800);return s.length>0?a.allowMultiple?s:[s[0]]:a.allowMultiple?e:e.slice(0,1)}function b(t,r){let a=f(t),o=D(a),i=D(r),e=0;return a===r&&(e+=1200),a.endsWith(`/${r}`)&&(e+=1100),o===i&&(e+=900),a.startsWith(`${r}/`)&&(e+=850),a.includes(r)&&(e+=250),e}function f(t){return t.trim().replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}export{g as a,S as b,E as c,v as d,x as e,K as f,f as g};
|
|
11
|
+
//# sourceMappingURL=chunk-YT4DVWUV.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import{a as M,b as _}from"./chunk-XQAVQVIL.js";import{a as k,g as j}from"./chunk-RCIGX23V.js";import{a as x,b as w,ca as N,g as S,ga as D}from"./chunk-UQYQBLJX.js";import he from"better-sqlite3";import{existsSync as En}from"fs";import{dirname as Tn,join as Cn,resolve as Se}from"path";import xe from"better-sqlite3";import{execFileSync as ve}from"child_process";import{existsSync as Ie,readdirSync as we}from"fs";import{extname as v,join as Ee}from"path";function $(e={}){return{id:"auxiliary-documents",facts:["auxiliary-document"],run:n=>Te({projectRoot:n.projectRoot,dbPath:n.dbPath,extensions:e.extensions,onStatus:n.onStatus})}}function Te(e){let n=new Set((e.extensions??M).map(i=>i.toLowerCase()));if(n.size===0)return{scanned:0,inserted:0,existing:0};if(!Ie(e.dbPath))throw new Error(`SCIP SQLite database not found at ${e.dbPath}`);let t=j(e.projectRoot),r=Ce(e.projectRoot,n).filter(i=>!t.isIgnored(i)),o=new xe(k(e.dbPath));try{let i=Le(o,r),s=o.prepare(`INSERT OR IGNORE INTO documents (language, relative_path, position_encoding, text)
|
|
2
|
+
VALUES (?, ?, NULL, ?)`),a=o.transaction(l=>{let f=0;for(let g of l){if(i.has(g))continue;let p=N(e.projectRoot,g,{inputKind:"auxiliary source file"}),m=s.run(Pe(g),g,p);f+=Number(m.changes)}return f})(r),c={scanned:r.length,inserted:a,existing:r.length-a};return e.onStatus?.(`Augmented SQLite documents with ${a} auxiliary source file${a===1?"":"s"} (${c.existing} already present).`),c}finally{o.close()}}function Ce(e,n){let t=Fe(e,n);if(t)return t;let r=[],o=i=>{let s=i?Ee(e,i):e,u;try{u=we(s,{withFileTypes:!0})}catch{return}for(let a of u){if(_.has(a.name))continue;let c=i?`${i}/${a.name}`:a.name;if(a.isDirectory()){o(c);continue}n.has(v(a.name).toLowerCase())&&r.push(c)}};return o(""),r.sort()}function Fe(e,n){try{return ve("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:26214400,stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:3e4,killSignal:"SIGKILL"}).split(`
|
|
3
|
+
`).filter(r=>r&&n.has(v(r).toLowerCase())).sort()}catch{return null}}function Le(e,n){let t=new Set,r=500;for(let o=0;o<n.length;o+=r){let i=n.slice(o,o+r),s=e.prepare(`SELECT relative_path FROM documents WHERE relative_path IN (${i.map(()=>"?").join(",")})`).all(...i);for(let u of s)t.add(u.relative_path)}return t}function Pe(e){return v(e).toLowerCase()===".vue"?"vue":v(e).replace(/^\./,"").toLowerCase()||"source"}import{writeFileSync as Oe}from"fs";function U(e,n){let t=performance.now(),r=e.run(n);return{stageId:e.id,facts:e.facts,durationMs:performance.now()-t,result:r}}async function B(e){let n=e.readFingerprint(),t=Ae(e.cachePath,n);if(t)return e.onCacheHit?.(t.result),t.result;let r=await e.compute();return Ne(e.cachePath,e.readFingerprint(),r),r}function Ae(e,n){try{let t=JSON.parse(S(e,{maxBytes:x,inputKind:"post-index augmentation cache"}));return W(t.fingerprint)===W(n)?{result:t.result}:null}catch{return null}}function Ne(e,n,t){Oe(e,`${JSON.stringify({updatedAt:new Date().toISOString(),fingerprint:n,result:t},null,2)}
|
|
4
|
+
`)}function W(e){return JSON.stringify(e)}import{randomUUID as Me}from"crypto";import{mkdtempSync as _e,rmSync as je,statSync as K}from"fs";import{tmpdir as $e}from"os";import{join as G}from"path";import{Worker as We}from"worker_threads";function De(){return{"missing-source-file":0,"missing-service-script":0,"no-definition":0,"same-file-definition":0,"unindexed-definition":0}}function y(){return{skippedReferences:0,skippedReferenceReasons:De(),skippedReferenceSamples:[]}}function I(e,n){e.skippedReferences+=n.skippedReferences;for(let t of Object.keys(e.skippedReferenceReasons)){e.skippedReferenceReasons[t]+=n.skippedReferenceReasons[t];for(let r of n.skippedReferenceSamples.filter(o=>o.reason===t))e.skippedReferenceSamples.filter(i=>i.reason===t&&i.sourceFile===r.sourceFile).length<2&&e.skippedReferenceSamples.push(r)}}var Ue=3e5,J=64*1024*1024,Be={createResultDirectory:()=>_e(G($e(),"codebaseiq-vue-workers-")),spawn:(e,n)=>new We(e,{workerData:n}),resultSize:e=>K(e).size,readResult:e=>S(e,{maxBytes:J,inputKind:"Vue worker result"}),removeResultDirectory:e=>je(e,{recursive:!0,force:!0})};function z(e){return e.length>=8&&Y(e.length)>1}async function X(e,n=Be){let t=Y(e.vueFiles.length),r=tn(e.vueFiles),o=on(r,t),i=new URL("./augment-vue-worker.js",import.meta.url),s=e.timeoutMs??en(),u=e.maxResultBytes??nn();H("timeoutMs",s),H("maxResultBytes",u);let a=Me(),c=n.createResultDirectory(),l=[],f,g,p;try{for(let d=0;d<o.length;d++){let b=d,L=o[d]??[],P=L.map(Ve=>Ve.taskId),O=G(c,`${b}.json`),A=n.spawn(i,{projectRoot:e.projectRoot,dbPath:e.dbPath,tsconfig:e.tsconfig,tasks:L,resultPath:O,runId:a,workerId:b,taskIds:P});l.push({workerId:b,taskIds:P,resultPath:O,handle:A,completion:He(A,b)})}await Ke(l,s);let m=l.sort((d,b)=>d.workerId-b.workerId).map(d=>Je(d,a,u,n));p={occurrences:m.flatMap(d=>d.occurrences),...y()};for(let d of m)I(p,d)}catch(m){f=m}finally{let m=await Ge(l);if(m.length===0)try{n.removeResultDirectory(c)}catch(d){m.push(d)}if(m.length>0){let d=f===void 0?m:[f,...m];g=new AggregateError(d,`Vue worker cleanup failed: ${Ze(d[0])}`)}}if(g)throw g;if(f!==void 0)throw f;if(!p)throw new Error("Vue workers completed without producing a merged result.");return p}function He(e,n){return new Promise((t,r)=>{let o=!1,i=a=>{o||(o=!0,e.off("error",s),e.off("exit",u),a?r(a):t())},s=a=>{i(new Error(`Vue reference worker ${n} failed: ${a.message}`,{cause:a}))},u=a=>{i(a===0?void 0:new Error(`Vue reference worker ${n} exited with code ${a}`))};e.once("error",s),e.once("exit",u)})}async function Ke(e,n){let t;try{await Promise.race([Promise.all(e.map(r=>r.completion)),new Promise((r,o)=>{t=setTimeout(()=>o(new Error(`Vue reference workers timed out after ${(n/1e3).toFixed(3)}s`)),n),t.unref()})])}finally{t&&clearTimeout(t)}}async function Ge(e){return(await Promise.allSettled(e.map(async t=>t.handle.terminate()))).flatMap(t=>t.status==="rejected"?[t.reason]:[])}function Je(e,n,t,r){let o=r.resultSize(e.resultPath);if(!Number.isSafeInteger(o)||o<0||o>t)throw new Error(`Vue reference worker ${e.workerId} result is ${o} bytes; limit is ${t} bytes`);let i;try{i=JSON.parse(r.readResult(e.resultPath))}catch(s){throw new Error(`Vue reference worker ${e.workerId} produced invalid JSON`,{cause:s})}if(!V(i)||i.version!==1||i.runId!==n||i.workerId!==e.workerId)throw new Error(`Vue reference worker ${e.workerId} result identity does not match its assignment`);if(!Qe(i.taskIds,e.taskIds))throw new Error(`Vue reference worker ${e.workerId} result task identities do not match its assignment`);if(i.ok===!1)throw typeof i.error!="string"?new Error(`Vue reference worker ${e.workerId} failure payload is malformed`):new Error(`Vue reference worker ${e.workerId} failed: ${i.error}`);if(i.ok!==!0||!ze(i.result))throw new Error(`Vue reference worker ${e.workerId} success payload is malformed`);return i.result}function ze(e){if(!V(e)||!Array.isArray(e.occurrences)||!e.occurrences.every(Xe)||!R(e.skippedReferences)||!V(e.skippedReferenceReasons))return!1;for(let n of["missing-source-file","missing-service-script","no-definition","same-file-definition","unindexed-definition"])if(!R(e.skippedReferenceReasons[n]))return!1;return Array.isArray(e.skippedReferenceSamples)&&e.skippedReferenceSamples.every(Ye)}function Xe(e){return V(e)&&typeof e.sourceFile=="string"&&R(e.sourceLine)&&R(e.sourceStartChar)&&R(e.sourceEndChar)&&typeof e.sourceToken=="string"&&typeof e.definitionFile=="string"&&R(e.symbolId)}function Ye(e){return V(e)&&typeof e.sourceFile=="string"&&R(e.sourceLine)&&R(e.sourceStartChar)&&R(e.sourceEndChar)&&typeof e.token=="string"&&qe(e.reason)}function qe(e){return e==="missing-source-file"||e==="missing-service-script"||e==="no-definition"||e==="same-file-definition"||e==="unindexed-definition"}function R(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function V(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Qe(e,n){return Array.isArray(e)&&e.length===n.length&&e.every((t,r)=>typeof t=="string"&&t===n[r])}function H(e,n){if(!Number.isSafeInteger(n)||n<=0)throw new TypeError(`${e} must be a positive safe integer.`)}function Ze(e){return e instanceof Error?e.message:String(e)}function Y(e){let n=Number(process.env.CODEBASEIQ_AUGMENT_VUE_WORKERS??0),t=Number.isFinite(n)&&n>0?n:1;return Math.max(1,Math.min(e,t))}function en(){let e=Number(process.env.CODEBASEIQ_AUGMENT_VUE_WORKER_TIMEOUT_MS??0);return Number.isFinite(e)&&e>0?e:Ue}function nn(){let e=Number(process.env.CODEBASEIQ_AUGMENT_VUE_WORKER_RESULT_MAX_BYTES??0);return Number.isSafeInteger(e)&&e>0?e:J}function tn(e){let n=rn(),t=[];for(let r of e){let o=q(r),i=Math.max(1,Math.ceil(o/n));for(let s=0;s<i;s++)t.push({taskId:`${t.length}:${r}:${s}`,fileName:r,startOffset:Math.floor(o*s/i),endOffset:s===i-1?Number.POSITIVE_INFINITY:Math.floor(o*(s+1)/i),countFileSkip:s===0})}return t}function rn(){return Number.POSITIVE_INFINITY}function on(e,n){let t=Array.from({length:n},()=>({tasks:[],weight:0})),r=e.map(o=>({task:o,weight:sn(o)})).sort((o,i)=>i.weight-o.weight);for(let o of r){let i=t.reduce((s,u)=>u.weight<s.weight?u:s);i.tasks.push(o.task),i.weight+=o.weight}return t.map(o=>o.tasks).filter(o=>o.length>0)}function sn(e){return Number.isFinite(e.endOffset)?Math.max(1,e.endOffset-e.startOffset):Math.max(1,q(e.fileName)-e.startOffset)}function q(e){try{return K(e).size}catch{return 1}}import{createRequire as un}from"module";import{existsSync as an}from"fs";import{dirname as Q,extname as cn,join as Z,relative as ln,resolve as fn}from"path";import{pathToFileURL as dn}from"url";function gn(e){e.transaction(()=>{e.prepare(`
|
|
5
|
+
DELETE FROM mentions
|
|
6
|
+
WHERE chunk_id IN (
|
|
7
|
+
SELECT c.id
|
|
8
|
+
FROM chunks c
|
|
9
|
+
JOIN documents d ON d.id = c.document_id
|
|
10
|
+
WHERE d.language = 'vue' OR d.relative_path LIKE '%.vue'
|
|
11
|
+
)
|
|
12
|
+
`).run(),e.prepare(`
|
|
13
|
+
DELETE FROM chunks
|
|
14
|
+
WHERE document_id IN (
|
|
15
|
+
SELECT id
|
|
16
|
+
FROM documents
|
|
17
|
+
WHERE language = 'vue' OR relative_path LIKE '%.vue'
|
|
18
|
+
)
|
|
19
|
+
`).run()})()}function ee(e,n){return e.prepare(`
|
|
20
|
+
SELECT relative_path AS relativePath
|
|
21
|
+
FROM documents
|
|
22
|
+
WHERE language = 'vue' OR relative_path LIKE '%.vue'
|
|
23
|
+
ORDER BY relative_path
|
|
24
|
+
`).all().map(r=>fn(n,r.relativePath))}function ne(e,n){let{vueCore:t,ts:r,volarTs:o}=mn(e),{parsed:i,vueOptions:s}=pn(t,r,n),u=Q(n),a=t.createVueLanguagePlugin(r,i.options,s,p=>p),c=Rn(t,r,a),l=hn(u,i),{languageServiceHost:f}=o.createLanguageServiceHost(r,r.sys,c,p=>p,l),g=r.createLanguageService(f);return{ts:r,language:c,languageService:g,fileNames:i.fileNames,configDir:u}}function mn(e){let n=un(dn(Z(e,"package.json")).href);return{vueCore:E(n,"@vue/language-core",e),ts:E(n,"typescript",e),volarTs:E(n,"@volar/typescript",e)}}function pn(e,n,t){let r=n.readConfigFile(t,n.sys.readFile);if(r.error||!r.config)throw new Error(`Failed to read ${t}`);let i=e.createParsedCommandLine(n,n.sys,t).vueOptions;return typeof e.createGlobalTypesWriter=="function"&&(i.globalTypesPath=e.createGlobalTypesWriter(i,n.sys.writeFile)),{parsed:n.parseJsonConfigFileContent(r.config,n.sys,Q(t),void 0,t,void 0,e.getAllExtensions(i).map(s=>({extension:s.slice(1),isMixedContent:!0,scriptKind:n.ScriptKind.Deferred}))),vueOptions:i}}function Rn(e,n,t){let r={},o=e.createLanguage([t],new Map,i=>{if(!an(i))return;let s=S(i,{maxBytes:w,inputKind:"Vue language-service source file"});r.current?.scripts.set(i,n.ScriptSnapshot.fromString(s),t.getLanguageId(i)??xn(i))});return r.current=o,o}function hn(e,n){return{getCurrentDirectory:()=>e,getCompilationSettings:()=>n.options,getScriptFileNames:()=>n.fileNames,getProjectReferences:()=>n.projectReferences,getProjectVersion:()=>"0"}}function E(e,n,t){try{return e(n)}catch(r){throw(typeof r=="object"&&r!==null&&"code"in r?r.code:null)==="MODULE_NOT_FOUND"?new Error(`Vue augmentation requires ${n} to be installed in ${t}. Install Vue/Volar dependencies for that project, then rerun augment-vue.`,{cause:r}):r}}function te(e,n,t){let r=Sn(e);return o=>{if(!o.name)return null;let i=h(n,o.fileName),s=t.get(o.fileName);if(!s)return null;let u=t.positionAt(s,o.textSpan.start),a=r.get(i);if(!a)return null;let c=a.starts.find(f=>f.line===u.line&&f.displayName===o.name);if(c)return c.symbolId;let l=a.containingByLine.get(u.line);return l&&l.displayName===o.name?l.symbolId:bn(a.starts,u.line,2,o.name)}}function Sn(e){let n=e.prepare(`
|
|
25
|
+
SELECT
|
|
26
|
+
d.relative_path AS relativePath,
|
|
27
|
+
der.start_line AS startLine,
|
|
28
|
+
der.end_line AS endLine,
|
|
29
|
+
der.symbol_id AS symbolId,
|
|
30
|
+
gs.display_name AS displayName
|
|
31
|
+
FROM defn_enclosing_ranges der
|
|
32
|
+
JOIN documents d ON d.id = der.document_id
|
|
33
|
+
JOIN global_symbols gs ON gs.id = der.symbol_id
|
|
34
|
+
ORDER BY d.relative_path, (der.end_line - der.start_line) DESC
|
|
35
|
+
`).all(),t=new Map;for(let r of n){let o=t.get(r.relativePath);o||(o={containingByLine:new Map,starts:[]},t.set(r.relativePath,o)),o.starts.push({line:r.startLine,symbolId:r.symbolId,displayName:r.displayName});for(let i=r.startLine;i<=r.endLine;i++)o.containingByLine.set(i,{symbolId:r.symbolId,displayName:r.displayName})}for(let r of t.values())r.starts.sort((o,i)=>o.line-i.line);return t}function bn(e,n,t,r){let o=0,i=e.length-1;for(;o<=i;){let u=Math.floor((o+i)/2);e[u].line<n?o=u+1:i=u-1}let s=null;for(let u of[i,o]){let a=e[u];if(!a||a.displayName!==r)continue;let c=Math.abs(a.line-n);c>t||(!s||c<s.distance)&&(s={distance:c,symbolId:a.symbolId})}return s?.symbolId??null}function re(e,n,t){let r=ge(n),o=e.prepare("SELECT id FROM global_symbols WHERE symbol = ?"),i=e.prepare(`
|
|
36
|
+
INSERT OR IGNORE INTO global_symbols (symbol, display_name, kind, documentation)
|
|
37
|
+
VALUES (?, ?, ?, ?)
|
|
38
|
+
`),s=0,u=new Map;return e.transaction(()=>{for(let c of t){let l=h(n,c),f=pe(r.name,r.version,l);i.run(f,"default",7,`Vue component|${l}`);let g=me(o,r,n,c);g&&(s++,u.set(c,g))}})(),{get(c){return u.get(c)??null},syntheticSymbols:s}}function oe(e,n,t,r,o){return e.transaction(()=>(gn(e),yn(e,n,t,r),kn(e,o)))()}function yn(e,n,t,r){let o=e.prepare("SELECT id FROM documents WHERE relative_path = ?"),i=e.prepare(`
|
|
39
|
+
INSERT INTO chunks (document_id, chunk_index, start_line, end_line, occurrences)
|
|
40
|
+
VALUES (?, ?, ?, ?, X'00')
|
|
41
|
+
`),s=e.prepare(`
|
|
42
|
+
INSERT OR IGNORE INTO mentions (chunk_id, symbol_id, role)
|
|
43
|
+
VALUES (?, ?, 1)
|
|
44
|
+
`);for(let u of t){let a=r.get(u);if(!a)continue;let c=h(n,u),l=o.get(c);if(!l)continue;let f=i.run(l.id,-1,0,0);s.run(Number(f.lastInsertRowid),a)}}function ie(e,n){let t=ge(n),r=e.prepare("SELECT id FROM global_symbols WHERE symbol = ?"),o=new Map;return{get(i){if(o.has(i))return o.get(i)??null;let s=me(r,t,n,i);return o.set(i,s),s}}}function se(e,n,t,r,o){if(e.fileName.endsWith(".vue")){let i=r.language.scripts.get(e.fileName),s=i?.generated?.languagePlugin.typescript?.getServiceScript(i.generated.root)?.code;if(i&&s){let u=r.language.maps.get(s,i);if(T(u,e.textSpan.start)!==null)return t.get(e.fileName)}return e.fileName.startsWith(o)?t.get(e.fileName):null}return n(e)}function ue(e){let n=new Set,t=[];for(let r of e){let o=ae(r);n.has(o)||(n.add(o),t.push(r))}return t}function ae(e){return[e.sourceFile,e.sourceLine,e.sourceStartChar,e.sourceEndChar,e.symbolId].join(":")}function kn(e,n){let t=In(e,[...new Set(n.map(a=>a.sourceFile))]),r=e.prepare(`
|
|
45
|
+
INSERT INTO chunks (document_id, chunk_index, start_line, end_line, occurrences)
|
|
46
|
+
VALUES (?, ?, ?, ?, X'00')
|
|
47
|
+
`),o=e.prepare(`
|
|
48
|
+
INSERT OR IGNORE INTO mentions (chunk_id, symbol_id, role)
|
|
49
|
+
VALUES (?, ?, 0)
|
|
50
|
+
`),i=new Set,s=0,u=0;for(let a of n){let c=ae(a);if(i.has(c))continue;i.add(c);let l=t.get(a.sourceFile);if(!l)continue;let f=r.run(l,u++,a.sourceLine,a.sourceLine),g=o.run(Number(f.lastInsertRowid),a.symbolId);s+=Number(g.changes)}return s}function*ce(e){let n=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,t=new Set(["script","setup","template","style","lang","scoped","true","false","null","undefined","const","let","var","import","from","export","return","if","else","for","while","function","class","type","interface","as","await","async"]),r;for(;r=n.exec(e);){let o=r[0];t.has(o)||(yield{text:o,start:r.index,end:r.index+o.length})}}function le(e,n){for(let[t]of e.toGeneratedLocation(n,r=>!!r.navigation))return t;return null}function T(e,n){let t=e;for(let[r]of t.toSourceLocation(n,o=>!!o.navigation))return r;return null}function Vn(e,n){let t=0,r=e.lineStarts.length-1;for(;t<=r;){let i=Math.floor((t+r)/2);e.lineStarts[i]<=n?t=i+1:r=i-1}let o=Math.max(0,r);return{line:o,character:n-e.lineStarts[o]}}function fe(e,n){return h(e,n).startsWith("node_modules/")}function h(e,n){return ln(e,n).replaceAll("\\","/")}function xn(e){switch(cn(e)){case".vue":return"vue";case".tsx":return"typescriptreact";case".ts":case".mts":case".cts":return"typescript";case".jsx":return"javascriptreact";case".js":case".mjs":case".cjs":return"javascript";case".json":return"json";default:return"typescript"}}function de(){let e=new Map;return{get(n){if(e.has(n))return e.get(n)??null;try{let t=S(n,{maxBytes:w,inputKind:"Vue source file"}),r={text:t,lineStarts:vn(t)};return e.set(n,r),r}catch{return e.set(n,null),null}},positionAt:Vn}}function vn(e){let n=[0];for(let t=0;t<e.length;t++)e.charCodeAt(t)===10&&n.push(t+1);return n}function In(e,n){let t=new Map,r=500;for(let o=0;o<n.length;o+=r){let i=n.slice(o,o+r),s=e.prepare(`SELECT id, relative_path AS relativePath FROM documents WHERE relative_path IN (${i.map(()=>"?").join(",")})`).all(...i);for(let u of s)t.set(u.relativePath,u.id)}return t}function ge(e){try{let n=JSON.parse(S(Z(e,"package.json"),{maxBytes:x,inputKind:"project package manifest"}));return{name:n.name??"workspace",version:n.version??"0.0.0"}}catch{return{name:"workspace",version:"0.0.0"}}}function me(e,n,t,r){let o=h(t,r),i=pe(n.name,n.version,o);return e.get(i)?.id??null}function pe(e,n,t){let r=t.split("/").map(o=>`\`${o.replaceAll("`","")}\``).join("/");return`scip-vue npm ${e} ${n} ${r}/default.`}async function Ft(e){return U($(),{projectRoot:e.projectRoot,dbPath:e.dbPath}),Fn(e)}async function Fn(e){let n=Se(e.projectRoot,e.tsconfig);if(!En(n))throw new Error(`Vue tsconfig not found at ${n}`);let t=new he(k(e.dbPath));try{let r=ee(t,e.projectRoot),o=Cn(Tn(e.dbPath),"augment-vue-meta.json");return await B({cachePath:o,readFingerprint:()=>An(t,e.projectRoot,e.tsconfig),compute:()=>Ln({db:t,projectRoot:e.projectRoot,dbPath:e.dbPath,tsconfig:e.tsconfig,configPath:n,vueFiles:r,onStatus:e.onStatus}),onCacheHit:i=>e.onStatus?.(`Vue references unchanged; reused ${i.resolvedReferences} cached resolved references.`)})}finally{t.close()}}async function Ln(e){let n=re(e.db,e.projectRoot,e.vueFiles),t=z(e.vueFiles)?await X({projectRoot:e.projectRoot,dbPath:e.dbPath,tsconfig:e.tsconfig,vueFiles:e.vueFiles}):On(e,n);return Pn(e,n,t)}function Pn(e,n,t){let r=ue(t.occurrences),o=oe(e.db,e.projectRoot,e.vueFiles,n,r),i={vueFiles:e.vueFiles.length,resolvedReferences:r.length,resolvedReferenceSamples:Wn(e.db,r,20),insertedMentions:o,skippedReferences:t.skippedReferences,skippedReferenceReasons:t.skippedReferenceReasons,skippedReferenceSamples:$n(t.skippedReferenceSamples,20),syntheticSymbols:n.syntheticSymbols};return e.onStatus?.(`Resolved ${i.resolvedReferences} Vue references with Volar; inserted ${i.insertedMentions} mentions.`),i}function On(e,n){let t=be({db:e.db,projectRoot:e.projectRoot,configPath:e.configPath,vueSymbolLookup:n});return ye({...t,vueFiles:t.context.fileNames.filter(r=>r.endsWith(".vue"))})}function An(e,n,t){let r=e.prepare(`
|
|
51
|
+
SELECT
|
|
52
|
+
(SELECT COUNT(*) FROM documents) AS documents,
|
|
53
|
+
(SELECT COUNT(*) FROM global_symbols) AS symbols,
|
|
54
|
+
(SELECT COUNT(*) FROM chunks) AS chunks,
|
|
55
|
+
(SELECT COUNT(*) FROM mentions) AS mentions,
|
|
56
|
+
(SELECT COUNT(*) FROM defn_enclosing_ranges) AS ranges,
|
|
57
|
+
(SELECT MAX(id) FROM chunks) AS maxChunkId,
|
|
58
|
+
(SELECT MAX(id) FROM global_symbols) AS maxSymbolId
|
|
59
|
+
`).get();return{version:3,tsconfig:t,files:D(n),db:r}}function Lt(e){let n=Se(e.projectRoot,e.tsconfig),t=new he(k(e.dbPath),{readonly:!0});try{let r=be({db:t,projectRoot:e.projectRoot,configPath:n,vueSymbolLookup:ie(t,e.projectRoot)});return ye({vueFiles:e.vueFiles??[],tasks:e.tasks,...r})}finally{t.close()}}function be(e){let n=de();return{projectRoot:e.projectRoot,context:ne(e.projectRoot,e.configPath),symbolLookup:te(e.db,e.projectRoot,n),vueSymbolLookup:e.vueSymbolLookup,sourceReader:n}}function ye(e){let n=[],t=y(),r=e.tasks??e.vueFiles.map(o=>({fileName:o,startOffset:0,endOffset:Number.POSITIVE_INFINITY,countFileSkip:!0}));for(let o of r){let i=Nn(e,o);n.push(...i.occurrences),I(t,i)}return{occurrences:n,...t}}function Nn(e,n){let t=e.sourceReader.get(n.fileName);if(!t)return Re(e.projectRoot,n,"missing-source-file");let r=e.context.language.scripts.get(n.fileName),o=r?.generated?.languagePlugin.typescript?.getServiceScript(r.generated.root)?.code;if(!r||!o)return Re(e.projectRoot,n,"missing-service-script");let i=e.context.language.maps.get(o,r),s=h(e.projectRoot,n.fileName),u=[...ce(t.text)],a={tokens:u.filter(c=>c.start>=n.startOffset&&c.start<n.endOffset),tokenByStart:new Map(u.map(c=>[c.start,c])),tokenTextCounts:Bn(u),processedStarts:new Set};return Dn({...e,fileName:n.fileName,sourceInfo:t,sourceFile:s,map:i,tokenContext:a})}function Dn(e){let n=[],t=y();for(let r of e.tokenContext.tokens){if(e.tokenContext.processedStarts.has(r.start)||Mn(e.sourceInfo.text,r.start))continue;let o=le(e.map,r.start);if(o===null)continue;let s=(e.context.languageService.getDefinitionAtPosition(e.fileName,o+1)??[]).find(l=>!fe(e.projectRoot,l.fileName));if(!s){C(t,e.sourceReader,e.sourceInfo,e.sourceFile,r,"no-definition");continue}let u=h(e.projectRoot,s.fileName),a=_n(e.sourceFile,r.text,u);if(a){C(t,e.sourceReader,e.sourceInfo,e.sourceFile,r,a);continue}let c=se(s,e.symbolLookup,e.vueSymbolLookup,e.context,e.projectRoot);if(c===null){C(t,e.sourceReader,e.sourceInfo,e.sourceFile,r,"unindexed-definition");continue}ke(n,e.sourceReader,e.sourceInfo,e.sourceFile,r,u,c),e.tokenContext.processedStarts.add(r.start),Un(n,e,r,o,u,c)}return{occurrences:n,...t}}function Mn(e,n){let t=e.lastIndexOf(`
|
|
60
|
+
`,n-1)+1,r=e.slice(t,n);return/\bfrom\s+['"][^'"]*$/.test(r)||/\bimport\s*\(\s*['"][^'"]*$/.test(r)}function _n(e,n,t){return t===e?"same-file-definition":t.endsWith(".vue")&&n!==t.split("/").at(-1)?.replace(/\.vue$/,"")?"unindexed-definition":null}function Re(e,n,t){let r=y();return n.countFileSkip&&(r.skippedReferences=1,r.skippedReferenceReasons[t]=1,r.skippedReferenceSamples.push({sourceFile:h(e,n.fileName),sourceLine:0,sourceStartChar:0,sourceEndChar:0,token:"",reason:t})),{occurrences:[],...r}}function C(e,n,t,r,o,i){if(e.skippedReferences++,e.skippedReferenceReasons[i]++,e.skippedReferenceSamples.filter(u=>u.reason===i&&u.sourceFile===r).length>=2)return;let s=n.positionAt(t,o.start);e.skippedReferenceSamples.push({sourceFile:r,sourceLine:s.line,sourceStartChar:s.character,sourceEndChar:s.character+o.text.length,token:o.text,reason:i})}function F(e,n){let t=new Map;for(let i of e){let s=t.get(i.sourceFile)??[];s.push(i),t.set(i.sourceFile,s)}let r=[...t.keys()].sort(),o=[];for(let i=0;o.length<n;i++){let s=!1;for(let u of r){let a=t.get(u)?.[i];if(a&&(o.push(a),s=!0,o.length===n))break}if(!s)break}return o}function jn(e,n){let t=F(e.filter(i=>i.sourceFile!==i.definitionFile),Math.ceil(n/2)),r=new Set(t.map(i=>`${i.sourceFile}:${i.sourceLine}:${i.sourceStartChar}:${i.sourceEndChar}:${i.symbolId}`)),o=F(e.filter(i=>!r.has(`${i.sourceFile}:${i.sourceLine}:${i.sourceStartChar}:${i.sourceEndChar}:${i.symbolId}`)),n-t.length);return[...t,...o]}function $n(e,n){let t=[...new Set(e.map(o=>o.reason))].sort(),r=[];for(let[o,i]of t.entries()){let s=t.length-o,u=Math.ceil((n-r.length)/s);r.push(...F(e.filter(a=>a.reason===i),u))}return r.slice(0,n)}function Wn(e,n,t){let r=e.prepare("SELECT symbol FROM global_symbols WHERE id = ?");return jn(n,t).map(({symbolId:o,...i})=>({...i,definitionSymbol:r.get(o)?.symbol??`symbol-id:${o}`}))}function Un(e,n,t,r,o,i){if(!((n.tokenContext.tokenTextCounts.get(t.text)??0)<=1))for(let s of Hn(n.context.languageService,n.fileName,r+1,n.map,t,n.tokenContext.tokenByStart)){if(n.tokenContext.processedStarts.has(s))continue;let u=n.tokenContext.tokenByStart.get(s);u&&(ke(e,n.sourceReader,n.sourceInfo,n.sourceFile,u,o,i),n.tokenContext.processedStarts.add(s))}}function ke(e,n,t,r,o,i,s){let u=n.positionAt(t,o.start);e.push({sourceFile:r,sourceLine:u.line,sourceStartChar:u.character,sourceEndChar:u.character+o.text.length,sourceToken:o.text,definitionFile:i,symbolId:s})}function Bn(e){let n=new Map;for(let t of e)n.set(t.text,(n.get(t.text)??0)+1);return n}function Hn(e,n,t,r,o,i){let s=e.getDocumentHighlights?.(n,t,[n])??[],u=[];for(let a of s)if(a.fileName===n)for(let c of a.highlightSpans){let l=Kn(r,c.textSpan.start,i,o.text);l!==null&&u.push(l)}return u}function Kn(e,n,t,r){let o=t.get(n);if(o?.text===r)return o.start;let i=T(e,n);if(i===null)return null;let s=t.get(i);return s?.text===r?s.start:null}export{$ as a,Te as b,U as c,Ft as d,Lt as e};
|
|
61
|
+
//# sourceMappingURL=chunk-YTJHCGYB.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as w}from"./chunk-ILMHV3KM.js";import{a as F,b as x,d as T,e as H,f as b,g as _,h as N}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-ILMHV3KM.js";import{a as F,b as x,d as T,e as H,f as b,g as _,h as N}from"./chunk-2PRONPAS.js";import{a as W,b as j}from"./chunk-P4NVCOM7.js";import{a as f}from"./chunk-6O3KXIDL.js";import{ca as B,da as q}from"./chunk-UQYQBLJX.js";import m from"process";import{existsSync as Se}from"fs";import{dirname as M,join as ve,resolve as E,sep as Le}from"path";import{fileURLToPath as ze}from"url";import{spawn as ae}from"child_process";import{platform as $}from"os";var c=class extends Error{},p=class extends Error{},v=class extends Error{constructor(r,n,i){super(`rust-analyzer LSP request ${n} failed: ${i}`);this.code=r}code},ue=3e4,le=16*1024,ce=64*1024*1024,U=64*1024,J=256*1024*1024,g=Buffer.from(`\r
|
|
2
2
|
\r
|
|
3
3
|
`,"ascii"),L=class{constructor(e,r={}){this.transport=e;this.requestTimeoutMs=r.requestTimeoutMs??ue,this.configuration=r.configuration??{};let n=de(r.maxHeaderBytes,r.maxMessageBytes);this.maxHeaderBytes=n.maxHeaderBytes,this.maxMessageBytes=n.maxMessageBytes,this.monotonicNow=r.monotonicNow??f,this.headerBuffer=Buffer.allocUnsafe(this.maxHeaderBytes+g.length),this.transport.onData(i=>this.handleData(i)),this.transport.onClose((i,s)=>this.failTransport(new Error(we(i,s)),!1)),this.transport.onError(i=>this.failTransport(i,!0))}transport;nextId=1;pending=new Map;diagnosedUris=new Set;diagnosticWaiters=new Map;readinessWaiters=new Set;requestTimeoutMs;configuration;maxHeaderBytes;maxMessageBytes;monotonicNow;headerBuffer;headerLength=0;bodyBuffer=null;bodyLength=0;transportFailure=null;transportKilled=!1;transportKillPromise=null;currentServerStatusGeneration=0;latestServerStatus=null;shutdownStarted=!1;async initialize(e,r={}){let n=e.capabilities??{},i=n.experimental&&typeof n.experimental=="object"&&!Array.isArray(n.experimental)?n.experimental:{},s=await this.request("initialize",{...e,capabilities:{...n,experimental:{...i,serverStatusNotification:!0}}},r);return this.notify("initialized",{}),s}async references(e,r={}){let n=await this.request("textDocument/references",e,r);return Array.isArray(n)?n:[]}async definition(e,r={}){let n=await this.request("textDocument/definition",e,r);return he(n)}async prepareCallHierarchy(e,r={}){let n=await this.request("textDocument/prepareCallHierarchy",e,r);return Array.isArray(n)?n:[]}async outgoingCalls(e,r={}){let n=await this.request("callHierarchy/outgoingCalls",{item:e},r);return Array.isArray(n)?n:[]}async hover(e,r={}){let n=await this.request("textDocument/hover",e,r);return n&&typeof n=="object"?n:null}async readinessBarrier(e={}){try{await this.request("codebaseiq/readinessBarrier",null,e)}catch(r){if(r instanceof v&&r.code===-32601)return;throw r}}serverStatusGeneration(){return this.currentServerStatusGeneration}serverStatusSnapshot(){let e=this.latestServerStatus;return e?{generation:e.generation,status:{...e.status}}:null}waitForQuiescence(e,r){if(this.transportFailure)return Promise.reject(this.transportFailure);let n=this.latestServerStatus;if(n&&n.generation>e){if(n.status.health==="error")return Promise.reject(G());if(n.status.quiescent)return Promise.resolve(n.status)}return new Promise((i,s)=>{let o={afterGeneration:e,resolve:i,reject:s,timeout:setTimeout(()=>{this.readinessWaiters.delete(o),s(new Error(`rust-analyzer readiness timed out after ${r}ms`))},r)};this.readinessWaiters.add(o)})}didOpenTextDocument(e){this.notify("textDocument/didOpen",{textDocument:e})}waitForDiagnostics(e,r){return this.transportFailure?Promise.resolve(!1):this.diagnosedUris.has(e)?Promise.resolve(!0):new Promise(n=>{let i=u=>{clearTimeout(s),n(u)},s=setTimeout(()=>{let u=this.diagnosticWaiters.get(e)?.filter(l=>l!==i);u&&u.length>0?this.diagnosticWaiters.set(e,u):this.diagnosticWaiters.delete(e),n(!1)},r),o=this.diagnosticWaiters.get(e)??[];o.push(i),this.diagnosticWaiters.set(e,o)})}async shutdown(e={}){if(!this.shutdownStarted){this.shutdownStarted=!0;try{await this.request("shutdown",null,e),this.notify("exit",null)}catch(r){throw this.notify("exit",null),this.killTransportOnce(),r}}}async shutdownAndReap(e={}){let r;try{await this.shutdown(e)}catch(n){r=n}try{await this.killTransportOnce()}catch(n){throw new Error(`rust-analyzer process-tree cleanup failed: ${n instanceof Error?n.message:String(n)}`,{cause:n})}if(r)throw r}request(e,r,n={}){if(this.transportFailure)return Promise.reject(this.transportFailure);let i=z(n.timeoutMs??this.requestTimeoutMs,n.deadlineMs,this.monotonicNow),s=this.nextId++,o={jsonrpc:"2.0",id:s,method:e,params:r};return new Promise((u,l)=>{let d=setTimeout(()=>{let y=i.deadlineLimited?new c(`rust-analyzer readiness deadline expired during LSP request ${e}`):new Error(`rust-analyzer LSP request ${e} timed out after ${i.timeoutMs}ms`);this.cancelAndFailTimedOutRequest(s,y)},i.timeoutMs);this.pending.set(s,{method:e,deadlineMs:n.deadlineMs,resolve:y=>u(y),reject:l,timeout:d}),this.transport.write(S(o))})}notify(e,r){this.transportFailure||this.transport.write(S({jsonrpc:"2.0",method:e,params:r}))}handleData(e){if(this.transportFailure||e.length===0)return;let r=0;for(;r<e.length&&!this.transportFailure;){if(this.bodyBuffer){let o=Math.min(e.length-r,this.bodyBuffer.length-this.bodyLength);if(e.copy(this.bodyBuffer,this.bodyLength,r,r+o),r+=o,this.bodyLength+=o,this.bodyLength===this.bodyBuffer.length){let u=this.bodyBuffer.toString("utf8");this.bodyBuffer=null,this.bodyLength=0;let l;try{l=Re(u)}catch{this.failProtocol("rust-analyzer LSP response body was not a valid JSON object");continue}try{this.dispatchMessage(l)}catch{this.failTransport(new Error("rust-analyzer LSP message handling failed"),!0)}}continue}if(this.headerLength===this.headerBuffer.length){this.failProtocol(`rust-analyzer LSP header exceeded ${this.maxHeaderBytes} byte limit`);return}if(this.headerBuffer[this.headerLength++]=e[r++],!this.headerDelimiterComplete())continue;let n=this.headerLength-g.length;if(n>this.maxHeaderBytes){this.failProtocol(`rust-analyzer LSP header exceeded ${this.maxHeaderBytes} byte limit`);return}let i=this.headerBuffer.subarray(0,n).toString("ascii");this.headerLength=0;let s;try{s=fe(i,this.maxMessageBytes)}catch(o){this.failProtocol(o instanceof Error?o.message:String(o));return}this.bodyBuffer=Buffer.allocUnsafe(s),this.bodyLength=0,s===0&&(this.bodyBuffer=null,this.failProtocol("rust-analyzer LSP response body was not a valid JSON object"))}}headerDelimiterComplete(){if(this.headerLength<g.length)return!1;let e=this.headerLength-g.length;return this.headerBuffer.subarray(e,this.headerLength).equals(g)}failProtocol(e){this.failTransport(new p(e),!0)}failTransport(e,r){this.transportFailure||(this.transportFailure=e,this.headerLength=0,this.bodyBuffer=null,this.bodyLength=0,r&&this.killTransportOnce().catch(()=>{}),this.rejectPending(e),this.resolveDiagnosticWaiters(!1))}killTransportOnce(){return this.transportKilled?this.transportKillPromise??Promise.resolve():(this.transportKilled=!0,this.transportKillPromise=Promise.resolve(this.transport.kill()),this.transportKillPromise)}async cancelAndFailTimedOutRequest(e,r){let n=this.pending.get(e);if(!n)return;this.pending.delete(e);try{this.transport.write(S({jsonrpc:"2.0",method:"$/cancelRequest",params:{id:e}}))}catch{}this.transportFailure||(this.transportFailure=r,this.headerLength=0,this.bodyBuffer=null,this.bodyLength=0);let i=r;try{await this.killTransportOnce()}catch(s){i=new Error(`${r.message}; rust-analyzer cleanup failed: ${s instanceof Error?s.message:String(s)}`,{cause:s})}n.reject(i),this.rejectPending(i),this.resolveDiagnosticWaiters(!1)}dispatchMessage(e){if(this.recordDiagnosticNotification(e),this.recordServerStatusNotification(e),e.id!==void 0&&e.id!==null&&e.method){this.respondToServerRequest(e);return}if(e.id===void 0||e.id===null)return;let r=this.pending.get(e.id);if(r){if(clearTimeout(r.timeout),this.pending.delete(e.id),e.error){r.reject(new v(e.error.code,r.method,e.error.message));return}if(r.deadlineMs!==void 0&&this.monotonicNow()>=r.deadlineMs){r.reject(new c(`rust-analyzer readiness deadline expired during LSP request ${r.method}`));return}r.resolve(e.result)}}recordDiagnosticNotification(e){if(e.method!=="textDocument/publishDiagnostics")return;let r=e.params,n=r&&typeof r=="object"&&typeof r.uri=="string"?r.uri:null;if(!n)return;this.diagnosedUris.add(n);let i=this.diagnosticWaiters.get(n)??[];this.diagnosticWaiters.delete(n),i.forEach(s=>s(!0))}recordServerStatusNotification(e){if(e.method!=="experimental/serverStatus"||e.id!==void 0||!me(e.params))return;let r=e.params,n={health:r.health,quiescent:r.quiescent,...typeof r.message=="string"?{message:r.message}:{}},i=++this.currentServerStatusGeneration;if(this.latestServerStatus={generation:i,status:n},n.health==="error"){this.rejectReadinessWaiters(G());return}if(n.quiescent)for(let s of this.readinessWaiters)i<=s.afterGeneration||(clearTimeout(s.timeout),this.readinessWaiters.delete(s),s.resolve(n))}respondToServerRequest(e){if(e.id===void 0||e.id===null||!e.method)return;let r=e.method==="workspace/configuration"?this.workspaceConfiguration(e.params):null;this.transport.write(S({jsonrpc:"2.0",id:e.id,result:r}))}workspaceConfiguration(e){return(e&&typeof e=="object"&&Array.isArray(e.items)?e.items:[]).map(n=>typeof n.section=="string"?pe(this.configuration,n.section):this.configuration)}rejectPending(e){for(let[r,n]of this.pending)clearTimeout(n.timeout),n.reject(e),this.pending.delete(r);this.rejectReadinessWaiters(e)}resolveDiagnosticWaiters(e){for(let r of this.diagnosticWaiters.values())r.forEach(n=>n(e));this.diagnosticWaiters.clear()}rejectReadinessWaiters(e){for(let r of this.readinessWaiters)clearTimeout(r.timeout),r.reject(e),this.readinessWaiters.delete(r)}};function de(t=le,e=ce){if(!Number.isSafeInteger(t)||t<=0)throw new TypeError("maxHeaderBytes must be a positive safe integer.");if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxMessageBytes must be a positive safe integer.");if(t>U)throw new RangeError(`maxHeaderBytes cannot exceed ${U} bytes for rust-analyzer LSP.`);if(t+g.length+e>J)throw new RangeError(`Combined rust-analyzer LSP header and message limits cannot exceed ${J} bytes.`);return{maxHeaderBytes:t,maxMessageBytes:e}}function fe(t,e){let r=[];for(let s of t.split(`\r
|
|
4
|
-
`)){let o=s.indexOf(":");o<0||s.slice(0,o).trim().toLowerCase()!=="content-length"||r.push(s.slice(o+1).trim())}if(r.length===0)throw new p("rust-analyzer LSP response missing Content-Length header");if(r.length>1){let s=new Set(r).size>1?"rust-analyzer LSP response has conflicting Content-Length headers":"rust-analyzer LSP response has duplicate Content-Length headers";throw new p(s)}let n=r[0];if(!/^\d+$/.test(n))throw new p("rust-analyzer LSP Content-Length must be a non-negative safe integer");let i=Number(n);if(!Number.isSafeInteger(i))throw new p("rust-analyzer LSP Content-Length must be a non-negative safe integer");if(i>e)throw new p(`rust-analyzer LSP Content-Length exceeds ${e} byte message limit`);return i}function z(t,e,r=f){if(e===void 0)return{timeoutMs:t,deadlineLimited:!1};let n=e-r();if(n<=0)throw new c("rust-analyzer readiness deadline expired before LSP operation");return{timeoutMs:Math.min(t,n),deadlineLimited:n<=t}}function me(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=t;return(e.health==="ok"||e.health==="warning"||e.health==="error")&&typeof e.quiescent=="boolean"&&(e.message===void 0||e.message===null||typeof e.message=="string")}function G(){return new c("rust-analyzer reported error health before reaching readiness")}function pe(t,e){let r=e.startsWith("rust-analyzer.")?e.slice(14):e;if(r===""||r==="rust-analyzer")return t;let n=t;for(let i of r.split(".")){if(!n||typeof n!="object")return null;n=n[i]}return n??null}function he(t){return t?(Array.isArray(t)?t:[t]).flatMap(r=>ye(r)?[r]:ge(r)?[{uri:r.targetUri,range:r.targetSelectionRange}]:[]):[]}function ye(t){return!!(t&&typeof t=="object"&&typeof t.uri=="string")}function ge(t){return!!(t&&typeof t=="object"&&typeof t.targetUri=="string")}function K(t,e,r=process.env,n){let i=ae(t,[],{cwd:e,env:r,detached:$()!=="win32",stdio:["pipe","pipe","pipe"],windowsHide:!0}),s=i.pid===void 0?null:
|
|
4
|
+
`)){let o=s.indexOf(":");o<0||s.slice(0,o).trim().toLowerCase()!=="content-length"||r.push(s.slice(o+1).trim())}if(r.length===0)throw new p("rust-analyzer LSP response missing Content-Length header");if(r.length>1){let s=new Set(r).size>1?"rust-analyzer LSP response has conflicting Content-Length headers":"rust-analyzer LSP response has duplicate Content-Length headers";throw new p(s)}let n=r[0];if(!/^\d+$/.test(n))throw new p("rust-analyzer LSP Content-Length must be a non-negative safe integer");let i=Number(n);if(!Number.isSafeInteger(i))throw new p("rust-analyzer LSP Content-Length must be a non-negative safe integer");if(i>e)throw new p(`rust-analyzer LSP Content-Length exceeds ${e} byte message limit`);return i}function z(t,e,r=f){if(e===void 0)return{timeoutMs:t,deadlineLimited:!1};let n=e-r();if(n<=0)throw new c("rust-analyzer readiness deadline expired before LSP operation");return{timeoutMs:Math.min(t,n),deadlineLimited:n<=t}}function me(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=t;return(e.health==="ok"||e.health==="warning"||e.health==="error")&&typeof e.quiescent=="boolean"&&(e.message===void 0||e.message===null||typeof e.message=="string")}function G(){return new c("rust-analyzer reported error health before reaching readiness")}function pe(t,e){let r=e.startsWith("rust-analyzer.")?e.slice(14):e;if(r===""||r==="rust-analyzer")return t;let n=t;for(let i of r.split(".")){if(!n||typeof n!="object")return null;n=n[i]}return n??null}function he(t){return t?(Array.isArray(t)?t:[t]).flatMap(r=>ye(r)?[r]:ge(r)?[{uri:r.targetUri,range:r.targetSelectionRange}]:[]):[]}function ye(t){return!!(t&&typeof t=="object"&&typeof t.uri=="string")}function ge(t){return!!(t&&typeof t=="object"&&typeof t.targetUri=="string")}function K(t,e,r=process.env,n){let i=ae(t,[],{cwd:e,env:r,detached:$()!=="win32",stdio:["pipe","pipe","pipe"],windowsHide:!0}),s=i.pid===void 0?null:W(i.pid,$()!=="win32"),o=s?F(n,s):null,u=null;return i.on("close",()=>x(o)),{write(l){i.stdin.write(l)},onData(l){i.stdout.on("data",l)},onClose(l){i.on("close",l)},onError(l){i.on("error",l)},kill(){if(!s){i.kill();return}return u??=j(s,{gracefulMs:1e3,forceMs:1e3}).then(l=>{if(!l.reaped)throw new Error(l.detail??`rust-analyzer process tree ${s.rootPid} was not reaped.`);x(o)}),u}}}function S(t){let e=JSON.stringify(t);return`Content-Length: ${Buffer.byteLength(e,"utf8")}\r
|
|
5
5
|
\r
|
|
6
6
|
${e}`}function Re(t){let e=JSON.parse(t);if(!e||typeof e!="object")throw new Error("rust-analyzer LSP response was not a JSON object");return e}function we(t,e){return`rust-analyzer LSP transport closed${e?` by ${e}`:t===null?"":` with code ${t}`}`}async function Q(t,e,r,n=f){let i=r-n();if(i<=0)throw new c("rust-analyzer readiness deadline expired before quiescence");try{let s=await t.waitForQuiescence(e,i);if(P(r,n,"during quiescence"),s.health==="error")throw new c("rust-analyzer reported error health before reaching readiness");if(!s.quiescent)throw new c("rust-analyzer did not report quiescence before reaching readiness");return s}catch(s){throw s instanceof c?s:new c(s instanceof Error?s.message:String(s))}}async function tt(t,e,r,n,i,s=f,o=D){let u=await Q(t,e,n,s);if(r===0)return u;let l=t.serverStatusSnapshot();if(!l)throw new c("rust-analyzer status is unavailable after initial document open");return await be(t,l,r,n,i,s,o)??u}async function be(t,e,r,n,i,s=f,o=D){if(r===0)return null;if(!e)throw new c("rust-analyzer status is unavailable before document open");Y(e.status,"before document open");try{await t.readinessBarrier({deadlineMs:n}),P(n,s,"during post-open synchronization")}catch(d){throw d instanceof c?d:new c(d instanceof Error?d.message:String(d))}let u=t.serverStatusSnapshot();if(!u||u.generation<e.generation)throw new c("rust-analyzer status is unavailable after document open");let l;return u.generation===e.generation?(Y(u.status,"after document open"),l=u.status):l=await Q(t,e.generation,n,s),await C(i,n,s,o),l}async function rt(t,e,r,n=f){let i=z(e,r,n);await t(i.timeoutMs),P(r,n,"during diagnostics")}async function C(t,e,r=f,n=D){if(t<=0)return;if(z(t,e,r).deadlineLimited)throw new c("rust-analyzer readiness deadline cannot accommodate delay");await n(t),P(e,r,"during delay")}async function nt(t,e){try{return await t()}catch(r){throw r instanceof c&&await e(),r}}function it(t){return t instanceof c?{ok:!1,error:t.message}:null}function P(t,e,r){if(t-e()<=0)throw new c(`rust-analyzer readiness deadline expired ${r}`)}function Y(t,e){if(t.health==="error")throw new c(`rust-analyzer reported error health ${e}`);if(!t.quiescent)throw new c(`rust-analyzer did not report quiescence ${e}`)}function D(t){return new Promise(e=>setTimeout(e,t))}async function Pe(t){let e=t.includeReferences!==!1,r=t.includeCallees===!0,n=t.includeSignatures===!0,i={timeoutMs:t.requestTimeoutMs},s=Ae(t),o=X(t),u=V(t),l=ee(t),d=Oe(t.projectRoot,s),y=Ie(t.projectRoot,d),k=ke(d),h=new L(K(t.rustAnalyzerBinary,y),{requestTimeoutMs:t.requestTimeoutMs,configuration:k});try{let A=await h.initialize({processId:m.pid,rootUri:T(y,"."),capabilities:{textDocument:{references:{dynamicRegistration:!1},callHierarchy:{dynamicRegistration:!1},hover:{dynamicRegistration:!1}}},initializationOptions:k});if(e&&!A.capabilities.referencesProvider)return{available:!1,reason:"rust-analyzer initialized without textDocument/references support.",references:o.map(a=>[a.symbolId,[]]),...r?{callees:u.map(a=>[a.symbolId,[]])}:{}};if(r&&!A.capabilities.callHierarchyProvider)return{available:!1,reason:"rust-analyzer initialized without call hierarchy support.",references:o.map(a=>[a.symbolId,[]]),callees:u.map(a=>[a.symbolId,[]]),...n?{signatures:l.map(a=>[a.symbolId,null])}:{}};if(n&&!A.capabilities.hoverProvider)return{available:!1,reason:"rust-analyzer initialized without hover support.",references:o.map(a=>[a.symbolId,[]]),...r?{callees:u.map(a=>[a.symbolId,[]])}:{},signatures:l.map(a=>[a.symbolId,null])};let ie=Be(h,t.projectRoot,s);await qe(h,ie,t.diagnosticsTimeoutMs??1e4),await ne(t.settleDelayMs??5e3);let I=e?await w(o,t.concurrency??8,async a=>{let O=await te(h,b(t.projectRoot,a,!1),{requestTimeoutMs:t.requestTimeoutMs,retryTimeoutMs:t.referenceRetryTimeoutMs});return{symbolId:a.symbolId,references:N(_(t.projectRoot,O.locations)),complete:O.complete}}):o.map(a=>({symbolId:a.symbolId,references:[],complete:!0})),se=r?await w(u,t.concurrency??8,async a=>({symbolId:a.symbolId,callees:await je(h,t.projectRoot,a,i)})):[],oe=n?await w(l,t.concurrency??8,async a=>({symbolId:a.symbolId,signature:await xe(h,t.projectRoot,a,i)})):[];return{available:!0,references:I.filter(a=>a.complete).map(a=>[a.symbolId,a.references]),incompleteReferenceSymbolIds:I.filter(a=>!a.complete).map(a=>a.symbolId),...r?{callees:se.map(a=>[a.symbolId,a.callees])}:{},...n?{signatures:oe.map(a=>[a.symbolId,a.signature])}:{}}}finally{await h.shutdown().catch(()=>{})}}function X(t){return t.referenceDefinitions??t.definitions}function V(t){return t.calleeDefinitions??t.definitions}function ee(t){return t.signatureDefinitions??t.definitions}function Ae(t){return[...t.includeReferences!==!1?X(t):[],...t.includeCallees===!0?V(t):[],...t.includeSignatures===!0?ee(t):[]]}async function xe(t,e,r,n={}){let i=b(e,r,!1),s=await Te(t,{textDocument:i.textDocument,position:i.position},n);return Ce(s)}async function Te(t,e,r={}){try{return await t.hover(e,r)}catch(n){if(R(n),!(n instanceof Error?n.message:String(n)).includes("content modified"))return null;await re(r.deadlineMs);try{return await t.hover(e,r)}catch(s){return R(s),null}}}function Ce(t){if(!t)return null;let e=De(t.contents),r=/```(?:rust)?\s*([\s\S]*?)```/i.exec(e),n=r?r[1]:e;for(let i of n.split(/\r?\n/)){let s=i.replace(/^`+|`+$/g,"").trim();if(s&&Ee(s))return s}return null}function De(t){return typeof t=="string"?t:Array.isArray(t)?t.map(Me).join(`
|
|
7
|
-
`):"value"in t?t.value:""}function Me(t){return typeof t=="string"?t:t.value}function Ee(t){return/^(?:pub(?:\([^)]*\))?\s+)?(?:async\s+)?(?:const\s+)?(?:unsafe\s+)?(?:extern\s+(?:"[^"]+"\s+)?)?(?:fn|struct|enum|trait|type|const|static|mod)\b/.test(t)}function ke(t){return{...t.length>0?{linkedProjects:t}:{},references:{excludeImports:!1,excludeTests:!1}}}function Ie(t,e){return e.length===1?M(e[0]):E(t)}function Oe(t,e){let r=E(t),n=[],i=new Set;for(let s of e){let o=M(E(r,s.relativePath));for(;$e(r,o);){let u=ve(o,"Cargo.toml");if(Se(u)){i.has(u)||(i.add(u),n.push(u));break}let l=M(o);if(l===o)break;o=l}}return n}function Be(t,e,r){let n=new Set,i=[];for(let s of r)if(!n.has(s.relativePath)){n.add(s.relativePath);try{let o=T(e,s.relativePath);t.didOpenTextDocument({uri:o,languageId:"rust",version:1,text:
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
`):"value"in t?t.value:""}function Me(t){return typeof t=="string"?t:t.value}function Ee(t){return/^(?:pub(?:\([^)]*\))?\s+)?(?:async\s+)?(?:const\s+)?(?:unsafe\s+)?(?:extern\s+(?:"[^"]+"\s+)?)?(?:fn|struct|enum|trait|type|const|static|mod)\b/.test(t)}function ke(t){return{...t.length>0?{linkedProjects:t}:{},references:{excludeImports:!1,excludeTests:!1}}}function Ie(t,e){return e.length===1?M(e[0]):E(t)}function Oe(t,e){let r=E(t),n=[],i=new Set;for(let s of e){let o=M(E(r,s.relativePath));for(;$e(r,o);){let u=ve(o,"Cargo.toml");if(Se(u)){i.has(u)||(i.add(u),n.push(u));break}let l=M(o);if(l===o)break;o=l}}return n}function Be(t,e,r){let n=new Set,i=[];for(let s of r)if(!n.has(s.relativePath)){n.add(s.relativePath);try{let o=T(e,s.relativePath);t.didOpenTextDocument({uri:o,languageId:"rust",version:1,text:B(e,s.relativePath,{inputKind:"indexed Rust source file"})}),i.push(o)}catch(o){if(!q(o))throw o}}return i}async function qe(t,e,r){await Promise.all(e.map(n=>t.waitForDiagnostics(n,r).catch(()=>!1)))}async function ht(t,e){return(await te(t,e)).locations}async function te(t,e,r={}){try{return{locations:await t.references(e,{timeoutMs:r.requestTimeoutMs,deadlineMs:r.deadlineMs}),complete:!0}}catch(n){R(n);let i=n instanceof Error?n.message:String(n);if(Z(n))return{locations:[],complete:!1};if(!i.includes("content modified"))return{locations:[],complete:!0};await re(r.deadlineMs);try{return{locations:await t.references(e,We(r)),complete:!0}}catch(s){return R(s),{locations:[],complete:!Z(s)}}}}function We(t){return{...t.retryTimeoutMs&&t.retryTimeoutMs>0?{timeoutMs:t.retryTimeoutMs}:{},...t.deadlineMs!==void 0?{deadlineMs:t.deadlineMs}:{}}}function Z(t){let e=t instanceof Error?t.message:String(t);return e.includes("rust-analyzer LSP request")&&e.includes("timed out after")}async function je(t,e,r,n={}){let i=b(e,r,!1),s=await Fe(t,{textDocument:i.textDocument,position:i.position},n),o=(await Promise.all(s.map(u=>He(t,u,n)))).flat();return Ne(_e(e,o))}async function Fe(t,e,r={}){try{return await t.prepareCallHierarchy(e,r)}catch(n){return R(n),[]}}async function He(t,e,r={}){try{return await t.outgoingCalls(e,r)}catch(n){return R(n),[]}}async function re(t){if(t===void 0){await ne(1e3);return}await C(1e3,t)}function R(t){if(t instanceof c)throw t}function _e(t,e){return e.map(r=>({symbol:r.to.name,file:H(t,r.to.uri),line:r.to.selectionRange.start.line,...r.fromRanges[0]===void 0?{}:{callsiteLine:r.fromRanges[0].start.line}}))}function Ne(t){let e=new Set,r=[];for(let n of t){let i=`${n.symbol}\0${n.file}\0${n.line}\0${n.callsiteLine??""}`;e.has(i)||(e.add(i),r.push(n))}return r.sort((n,i)=>n.file.localeCompare(i.file)||n.line-i.line||n.symbol.localeCompare(i.symbol))}function ne(t){return t<=0?Promise.resolve():new Promise(e=>setTimeout(e,t))}function $e(t,e){return e===t||e.startsWith(`${t}${Le}`)}async function Ue(){return new Promise((t,e)=>{let r=[];m.stdin.on("data",n=>r.push(n)),m.stdin.on("error",e),m.stdin.on("end",()=>t(Buffer.concat(r).toString("utf8")))})}async function Je(){try{let t=JSON.parse(await Ue()),e=await Pe(t);m.stdout.write(JSON.stringify(e))}catch(t){let e={available:!1,reason:t instanceof Error?t.message:String(t),references:[]};m.stdout.write(JSON.stringify(e)),m.exitCode=1}}m.argv[1]&&ze(import.meta.url)===m.argv[1]&&Je();export{L as a,K as b,tt as c,be as d,rt as e,nt as f,it as g,Pe as h,X as i,V as j,ee as k,Ae as l,xe as m,Te as n,Ce as o,ke as p,Ie as q,Oe as r,Be as s,qe as t,ht as u,te as v,je as w,ne as x};
|
|
8
|
+
//# sourceMappingURL=chunk-Z6RL7XOE.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as f}from"./chunk-
|
|
1
|
+
import{c as f}from"./chunk-HENP2O4A.js";import{a as b,d as g}from"./chunk-NDKOVQFG.js";import{d as m}from"./chunk-GVAF222T.js";import{o as u,p as _,q as a}from"./chunk-F74LZWCE.js";import{a as l}from"./chunk-ICUL7XRT.js";import{w as p}from"./chunk-7GAK2F3H.js";function B(e,t={}){let{scope:o,limit:r}=t,i=new f(e),s=T([...x(e,o),...y(e,i,o)]);return F(s),r?s.slice(0,r):s}function x(e,t){let o=[];for(let r of N(e,t)){if(e.isIgnored(r.barrel_path)||e.isIgnored(r.original_path)||g(e,r.barrel_path)||p(e,r.barrel_path)&&a(e,r.barrel_path).length===0)continue;let i=I(e,r),s=i?.barrel_consumers??0,n=i?.direct_consumers??0;s!==0||n!==0||o.push({barrelFile:r.barrel_path,symbol:r.symbol,shortName:m(r.symbol),originalFile:r.original_path,barrelConsumers:s,directConsumers:n,...h(e,r.barrel_path)})}return o}function N(e,t){let o=t?"AND barrel_d.relative_path LIKE ?":"",r=t?[`%${t}%`]:[];return e.all(`WITH barrel_refs AS MATERIALIZED (
|
|
2
2
|
SELECT DISTINCT
|
|
3
3
|
barrel_d.id AS barrel_doc_id,
|
|
4
4
|
barrel_d.relative_path AS barrel_path,
|
|
@@ -71,4 +71,4 @@ import{c as f}from"./chunk-7FND7D7N.js";import{a as b,d as g}from"./chunk-C7QOQX
|
|
|
71
71
|
${e.pathExclusionsFor("consumer_d")}
|
|
72
72
|
GROUP BY consumer_d.id
|
|
73
73
|
)`,t.barrel_doc_id,t.symbol_id,t.barrel_doc_id,t.original_doc_id)}function y(e,t,o){let r=[],i=C(e);for(let s of O(e,o))E(i,s,s)>0||r.push(...D(e,t,s,i));return r}function O(e,t){return l(e,{scope:t,includeIgnored:!1}).filter(o=>a(e,o).length>0||u(e,o).length>0)}function D(e,t,o,r){let i=a(e,o).filter(n=>n.sourcePath&&!e.isIgnored(n.sourcePath)).flatMap(n=>R(e,t,o,n.sourcePath,r,[A(n.specifier)])),s=u(e,o).filter(n=>n.sourcePath&&!e.isIgnored(n.sourcePath)).flatMap(n=>R(e,t,o,n.sourcePath,r,n.kind==="named"&&n.names.length>0?n.names:[n.kind==="star"?`* from ${n.sourcePath}`:`* namespace from ${n.sourcePath}`]));return[...i,...s]}function R(e,t,o,r,i,s){let n=t.definitionsForFile(r);return s.map(c=>{let d=n.find(S=>S.leaf===c);return{barrelFile:o,symbol:d?.symbol??`source-reexport:${o}:${c}`,shortName:d?m(d.symbol):c,originalFile:r,barrelConsumers:0,directConsumers:E(i,r,o),...h(e,o)}})}function A(e){return e.split("::").at(-1)?.split("/").at(-1)?.replace(/\.[^.]+$/,"")??e}function h(e,t){return b(e,t)?{actionTier:"signal",surfaceEvidence:["barrel file is declared on the package public surface"],recommendation:"Review the package API before removing this re-export; local consumers are zero, but external consumers may import through the public barrel."}:{actionTier:"direct",surfaceEvidence:[],recommendation:"Remove this unused re-export when the barrel is not part of an external API surface."}}function C(e){let t=new Map;for(let o of l(e,{includeIgnored:!1}))for(let r of _(e,o)){if(!r.sourcePath)continue;let i=t.get(r.sourcePath)??new Set;i.add(o),t.set(r.sourcePath,i)}return t}function E(e,t,o){let r=e.get(t);return r?r.size-(r.has(o)?1:0):0}function T(e){let t=new Set,o=[];for(let r of e){let i=`${r.barrelFile}|${r.symbol}|${r.originalFile}`;t.has(i)||(t.add(i),o.push(r))}return o}function F(e){e.sort((t,o)=>o.directConsumers-t.directConsumers||t.barrelFile.localeCompare(o.barrelFile)||t.shortName.localeCompare(o.shortName))}export{B as a};
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-ZAFGY22Q.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-GV2CEZCW.js";function j(e,s={}){let{minSimilarity:t=.5,limit:n=15,scope:i,minChainLength:r=3,maxChainLength:l=8}=s,a=c(e,i),o=y(a,r,l);if(o.length===0)return[];let f=d(o);return f.length<2?[]:S(x(f,t,n),n)}function d(e){let s=m(e),t=[];for(let n of e){let i=n.filter(r=>!s.has(r));i.length>=2&&t.push({original:n,filtered:i})}return t}function m(e){let{nodeFreq:s,tailFreq:t}=p(e),n=e.length*.9,i=e.length*.8,r=new Set;for(let[a,o]of s)o>n&&r.add(a);for(let[a,o]of t)o>i&&r.add(a);let l=["index.ts","index.js","cli.ts","main.ts","health.ts","health.js"];for(let a of s.keys()){let o=a.split("/").pop()??"";l.includes(o)&&r.add(a)}return r}function p(e){let s=new Map,t=new Map;for(let n of e){let i=new Set;for(let r of n)i.has(r)||(s.set(r,(s.get(r)??0)+1),i.add(r));for(let r=Math.max(0,n.length-2);r<n.length;r++)t.set(n[r],(t.get(n[r])??0)+1)}return{nodeFreq:s,tailFreq:t}}function x(e,s,t){let n=[];for(let i=0;i<e.length;i++){for(let r=i+1;r<e.length;r++){let l=b(e[i],e[r],s);l&&n.push(l)}if(n.length>t*10)break}return n.sort((i,r)=>Math.abs(r.similarity-i.similarity)>.01?r.similarity-i.similarity:i.divergencePoints.length-r.divergencePoints.length),n}function b(e,s,t){if(!C(e.filtered,s.filtered))return null;let{distance:n,ops:i}=A(e.filtered,s.filtered),r=Math.max(e.filtered.length,s.filtered.length);if(r===0)return null;let l=1-n/r;if(l<t||n===0)return null;let a=i.filter(f=>f.type==="substitute").map(f=>({index:f.indexA,nodeA:e.filtered[f.indexA],nodeB:s.filtered[f.indexB]}));return a.length===0||i.filter(f=>f.type==="match").length<2?null:{chainA:e.original,chainB:s.original,similarity:l,editDistance:n,divergencePoints:a,commonPrefix:F(e.original,s.original),commonSuffix:B(e.original,s.original)}}function C(e,s){let t=new Set(e);return s.some(n=>t.has(n))}function S(e,s){let t=[];for(let n of e)if(t.some(r=>h(n.chainA,r.chainA)&&h(n.chainB,r.chainB))||t.push(n),t.length>=s)break;return t}function y(e,s,t){let n=[];for(let r of e.keys()){if(n.length>=500)break;g(e,r,[r],new Set([r]),s,t,n,500)}return n}function g(e,s,t,n,i,r,l,a){if(l.length>=a)return;if(t.length>=r){t.length>=i&&l.push([...t]);return}let o=e.get(s);if(!o||o.size===0){t.length>=i&&l.push([...t]);return}let f=!1;for(let u of o)if(!n.has(u)&&(n.add(u),t.push(u),g(e,u,t,n,i,r,l,a),t.pop(),n.delete(u),f=!0,l.length>=a))return;!f&&t.length>=i&&l.push([...t])}function A(e,s){let t=e.length,n=s.length,i=Array.from({length:t+1},()=>Array(n+1).fill(0));for(let o=0;o<=t;o++)i[o][0]=o;for(let o=0;o<=n;o++)i[0][o]=o;for(let o=1;o<=t;o++)for(let f=1;f<=n;f++)e[o-1]===s[f-1]?i[o][f]=i[o-1][f-1]:i[o][f]=1+Math.min(i[o-1][f],i[o][f-1],i[o-1][f-1]);let r=[],l=t,a=n;for(;l>0||a>0;)l>0&&a>0&&e[l-1]===s[a-1]?(r.unshift({type:"match",indexA:l-1,indexB:a-1}),l--,a--):l>0&&a>0&&i[l][a]===i[l-1][a-1]+1?(r.unshift({type:"substitute",indexA:l-1,indexB:a-1}),l--,a--):a>0&&i[l][a]===i[l][a-1]+1?(r.unshift({type:"insert",indexA:l,indexB:a-1}),a--):(r.unshift({type:"delete",indexA:l-1,indexB:a}),l--);return{distance:i[t][n],ops:r}}function F(e,s){let t=[];for(let n=0;n<Math.min(e.length,s.length)&&e[n]===s[n];n++)t.push(e[n]);return t}function B(e,s){let t=[],n=e.length-1,i=s.length-1;for(;n>=0&&i>=0&&e[n]===s[i];)t.unshift(e[n]),n--,i--;return t}function h(e,s){if(e.length>s.length)return!1;let t=s.join("\u2192"),n=e.join("\u2192");return t.includes(n)}export{j as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZB4C5TTR.js.map
|