scip-query 0.22.0 → 0.23.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 +257 -0
- package/README.md +11 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-XI2CSWEY.js +2 -0
- package/dist/call-graph-UONR6JR5.js +2 -0
- package/dist/{chunk-FGNCOQUX.js → chunk-2E7CX53V.js} +2 -2
- package/dist/chunk-2GRUZAQF.js +43 -0
- package/dist/{chunk-DPWKKNKI.js → chunk-2LDBDR6J.js} +2 -2
- package/dist/{chunk-JHH5SCZ3.js → chunk-2OOY75BW.js} +2 -2
- package/dist/{chunk-XGGBK66W.js → chunk-2R3V3PSD.js} +2 -2
- package/dist/chunk-2WC2OEDO.js +4 -0
- package/dist/{chunk-57N6LN2A.js → chunk-3AF4TUFK.js} +2 -2
- package/dist/{chunk-2RE5OCHZ.js → chunk-3D3QG236.js} +2 -2
- package/dist/{chunk-D2MVJSP4.js → chunk-3FHOF22C.js} +2 -2
- package/dist/{chunk-7XZGZBSQ.js → chunk-3JKSW6LJ.js} +2 -2
- package/dist/chunk-3L2ZBPEX.js +133 -0
- package/dist/{chunk-NVSZNESQ.js → chunk-3PJABJSU.js} +2 -2
- package/dist/{chunk-WOOAY3PA.js → chunk-3SVF22I5.js} +2 -2
- package/dist/{chunk-YAGYMBEX.js → chunk-3WR4E3A3.js} +2 -2
- package/dist/chunk-4FTZ4P5G.js +2 -0
- package/dist/{chunk-F24G5NBE.js → chunk-4ILJCCXV.js} +2 -2
- package/dist/chunk-4UX2F3JX.js +2 -0
- package/dist/chunk-4WNW27SX.js +2 -0
- package/dist/chunk-5ENOG4VP.js +61 -0
- package/dist/{chunk-RHHCLWQ6.js → chunk-64BFSI5I.js} +2 -2
- package/dist/chunk-66DVSJQG.js +455 -0
- package/dist/{chunk-ISWFRGJ6.js → chunk-6HFCYNYE.js} +2 -2
- package/dist/{chunk-Y2VM4CJC.js → chunk-6I6L7Z62.js} +2 -2
- package/dist/{chunk-CKRWA452.js → chunk-6PQNKL3G.js} +2 -2
- package/dist/{chunk-GPGRZJ3R.js → chunk-6V5CNXL6.js} +2 -2
- package/dist/chunk-6VVV4WRR.js +4 -0
- package/dist/{chunk-BDGTPN27.js → chunk-7BWFZPPZ.js} +2 -2
- package/dist/{chunk-25GWKRUZ.js → chunk-7CYG22FH.js} +2 -2
- package/dist/chunk-7F45LJKI.js +2 -0
- package/dist/{chunk-4TQU4TX2.js → chunk-7IWV2EG3.js} +2 -2
- package/dist/{chunk-UDY7MIAW.js → chunk-AFHTBORT.js} +2 -2
- package/dist/chunk-AVRYW5OZ.js +2 -0
- package/dist/chunk-B3PYOSCX.js +2 -0
- package/dist/{chunk-RNKPYYYE.js → chunk-B5D7QPBE.js} +2 -2
- package/dist/{chunk-FFJQZG6J.js → chunk-BBCIS4DX.js} +2 -2
- package/dist/chunk-BDUVI7TO.js +3 -0
- package/dist/{chunk-BVFYEEBH.js → chunk-BE7ZZTMC.js} +2 -2
- package/dist/{chunk-NEIQPFBI.js → chunk-BHVUJOCQ.js} +2 -2
- package/dist/chunk-BKVWUP7Y.js +2 -0
- package/dist/{chunk-IJMD6BRI.js → chunk-BQGB4HBD.js} +2 -2
- package/dist/{chunk-ERCYGVAM.js → chunk-BRV7PIFF.js} +2 -2
- package/dist/chunk-CEEZJXEF.js +2 -0
- package/dist/{chunk-BTVKZGWT.js → chunk-CIYLO6SI.js} +2 -2
- package/dist/chunk-CJZXN4NU.js +2 -0
- package/dist/{chunk-VXJJTQYE.js → chunk-CNO7TOKL.js} +2 -2
- package/dist/{chunk-ZZ3Z7D56.js → chunk-COF23M5F.js} +2 -2
- package/dist/{chunk-ZGW4HLPD.js → chunk-CWFP7GM5.js} +2 -2
- package/dist/chunk-D2DHWI3D.js +2 -0
- package/dist/{chunk-Q55NF3ZG.js → chunk-D4N5SQ2M.js} +2 -2
- package/dist/{chunk-LXQUF2RP.js → chunk-DBRSYFXR.js} +2 -2
- package/dist/{chunk-PXXYQK55.js → chunk-DHUIOLDT.js} +2 -2
- package/dist/{chunk-KZYID5KV.js → chunk-DIRJWYBM.js} +2 -2
- package/dist/{chunk-IKVNEGTW.js → chunk-DIUFNHRJ.js} +2 -2
- package/dist/{chunk-CLG6DWVS.js → chunk-DTZCKZEU.js} +2 -2
- package/dist/{chunk-Z2PZVKPR.js → chunk-DULC3QFP.js} +2 -2
- package/dist/{chunk-AYPDH2LU.js → chunk-DYGHBZ2N.js} +2 -2
- package/dist/{chunk-JJ62MTQH.js → chunk-E5R6AQ73.js} +2 -2
- package/dist/{chunk-BWVQP3LB.js → chunk-E73UNJTF.js} +2 -2
- package/dist/{chunk-GVOMSPGL.js → chunk-EG2CPZMJ.js} +2 -2
- package/dist/{chunk-56NQAEPJ.js → chunk-EKV5HX33.js} +2 -2
- package/dist/{chunk-GDRJB3SB.js → chunk-EQHFIL6T.js} +2 -2
- package/dist/{chunk-EWWY2ZFL.js → chunk-ESIQ66Z7.js} +2 -2
- package/dist/chunk-EVFUMY4R.js +3 -0
- package/dist/{chunk-ZYM4HOFA.js → chunk-F7DY272B.js} +2 -2
- package/dist/chunk-FBN2FGXG.js +2 -0
- package/dist/{chunk-AZS7YPCB.js → chunk-FDLOBR6P.js} +2 -2
- package/dist/chunk-FESCRNVV.js +5 -0
- package/dist/{chunk-URSGGIZX.js → chunk-FFRKR4EQ.js} +2 -2
- package/dist/chunk-FGA2U4OR.js +8 -0
- package/dist/{chunk-7YQOCABQ.js → chunk-FIQRSHVM.js} +2 -2
- package/dist/{chunk-KFVSJX25.js → chunk-FPYLNQPT.js} +2 -2
- package/dist/{chunk-FELGD32K.js → chunk-FRUSVINH.js} +2 -2
- package/dist/chunk-GAS2LJMP.js +3 -0
- package/dist/{chunk-OTSPRVNW.js → chunk-GSP44ENC.js} +2 -2
- package/dist/{chunk-K3XFWJI2.js → chunk-GUFSG5TX.js} +2 -2
- package/dist/chunk-GYIZ4NXB.js +2 -0
- package/dist/{chunk-2OXVP5U5.js → chunk-GZIUDL6G.js} +2 -2
- package/dist/chunk-HCXEQRFF.js +18 -0
- package/dist/{chunk-LO5JSW2C.js → chunk-HEHOQQKH.js} +2 -2
- package/dist/{chunk-U2N2KE7A.js → chunk-HKGFPJ4T.js} +2 -2
- package/dist/chunk-HLZTEXRA.js +2 -0
- package/dist/{chunk-EELPBR7E.js → chunk-HOENASQM.js} +2 -2
- package/dist/{chunk-VTCIYFEK.js → chunk-HVF5VBG6.js} +2 -2
- package/dist/{chunk-TH6IC56G.js → chunk-HYO3NP5Q.js} +2 -2
- package/dist/{chunk-OPSAW5DT.js → chunk-I55I7XXP.js} +2 -2
- package/dist/{chunk-DEAB5TGT.js → chunk-IDFEUFKS.js} +2 -2
- package/dist/{chunk-DJAO2OZJ.js → chunk-IHGQTTVW.js} +2 -2
- package/dist/{chunk-XU75YQN4.js → chunk-IICPE7B2.js} +2 -2
- package/dist/{chunk-GY7CCCEZ.js → chunk-IL676XCC.js} +2 -2
- package/dist/{chunk-4HE7MVWD.js → chunk-ILTDAWEF.js} +2 -2
- package/dist/chunk-IZDPJ2QI.js +2 -0
- package/dist/{chunk-5YRQIE2B.js → chunk-J66VOFW6.js} +2 -2
- package/dist/{chunk-SB25YMEQ.js → chunk-JFMEXGFE.js} +2 -2
- package/dist/{chunk-QLBSG7U5.js → chunk-JGKUET5J.js} +2 -2
- package/dist/{chunk-VZ7NXSHV.js → chunk-JS4PGXMV.js} +2 -2
- package/dist/{chunk-ZAZGGSM3.js → chunk-JTQVMR42.js} +2 -2
- package/dist/chunk-JWTGMPIT.js +80 -0
- package/dist/{chunk-5ZMBRQFC.js → chunk-JYR66JN5.js} +2 -2
- package/dist/chunk-KLFEXGQA.js +2 -0
- package/dist/chunk-KYSDI3GE.js +5 -0
- package/dist/{chunk-MSR2QRUE.js → chunk-L6PJPETJ.js} +2 -2
- package/dist/{chunk-VU6LIWHT.js → chunk-LDVT66YM.js} +2 -2
- package/dist/chunk-LEECKFCJ.js +2 -0
- package/dist/{chunk-H7CG6LOE.js → chunk-LMZ5PRUV.js} +2 -2
- package/dist/{chunk-ZPASRBLF.js → chunk-LQRQN2XA.js} +2 -2
- package/dist/{chunk-HISEUIL2.js → chunk-LXABEJX3.js} +2 -2
- package/dist/{chunk-WHADK6OS.js → chunk-M2O5NY6W.js} +2 -2
- package/dist/{chunk-Y334QQU5.js → chunk-MNV5FSBW.js} +2 -2
- package/dist/{chunk-RYOYJMGF.js → chunk-MPQ4OTBM.js} +2 -2
- package/dist/{chunk-6NC3YSPY.js → chunk-MV3CDXPI.js} +2 -2
- package/dist/{chunk-NRBNAECH.js → chunk-MWN53KRN.js} +2 -2
- package/dist/chunk-N2ZSIIGR.js +117 -0
- package/dist/chunk-N5B2NILC.js +5 -0
- package/dist/{chunk-Q6T2CAJL.js → chunk-NJITK2GP.js} +2 -2
- package/dist/{chunk-ENWQWA2R.js → chunk-NOGJXYFO.js} +2 -2
- package/dist/{chunk-V4NG5OMS.js → chunk-NOYBFVJA.js} +106 -106
- package/dist/chunk-NWQXSFFU.js +3 -0
- package/dist/chunk-ODDUPDP7.js +13 -0
- package/dist/{chunk-A77SCPW2.js → chunk-OLIWTZI3.js} +2 -2
- package/dist/{chunk-XFMVKFSF.js → chunk-OLNV6I6U.js} +2 -2
- package/dist/{chunk-QKT4UI2Y.js → chunk-OR2E3AGZ.js} +2 -2
- package/dist/chunk-OSR2GEHQ.js +2 -0
- package/dist/{chunk-5H5WTJSD.js → chunk-OSSESPDX.js} +2 -2
- package/dist/{chunk-KQHJEU6V.js → chunk-OWOOWNJ5.js} +2 -2
- package/dist/{chunk-GRX7JOXQ.js → chunk-P42EIXTA.js} +2 -2
- package/dist/{chunk-AQ2PORIO.js → chunk-PJFGPYTU.js} +2 -2
- package/dist/{chunk-LRI5OMPE.js → chunk-PP7KNN7L.js} +2 -2
- package/dist/{chunk-PLJUQFQN.js → chunk-PU7T5QYQ.js} +2 -2
- package/dist/{chunk-JUN5DOAK.js → chunk-PWWAJSKV.js} +2 -2
- package/dist/{chunk-7IQXARSQ.js → chunk-PZL5T7SU.js} +2 -2
- package/dist/{chunk-UAQ4T73O.js → chunk-QBE3YX64.js} +2 -2
- package/dist/{chunk-3TJY6M3B.js → chunk-QGVTFRY2.js} +2 -2
- package/dist/chunk-QOJONDS7.js +2 -0
- package/dist/chunk-QU5XRYB5.js +4 -0
- package/dist/{chunk-2KVU55CW.js → chunk-QUU5OBVK.js} +2 -2
- package/dist/{chunk-Q5TA4OY4.js → chunk-RBLQNW26.js} +2 -2
- package/dist/chunk-RTQ7NEKG.js +81 -0
- package/dist/{chunk-F24QUEQP.js → chunk-SQXRS7BG.js} +2 -2
- package/dist/chunk-SSK6LDPC.js +2 -0
- package/dist/chunk-SZHGTCPP.js +7 -0
- package/dist/chunk-T4N4P2K5.js +16 -0
- package/dist/chunk-TA3QKLLU.js +2 -0
- package/dist/chunk-TEBQMNVI.js +43 -0
- package/dist/{chunk-NK3JMP22.js → chunk-TPFHAQ2G.js} +2 -2
- package/dist/chunk-TQPCBMWT.js +5 -0
- package/dist/{chunk-HG722PO7.js → chunk-TRNAEQ6P.js} +2 -2
- package/dist/chunk-TY7CRN3Z.js +2 -0
- package/dist/{chunk-7XA3OM44.js → chunk-UHFYCMZO.js} +2 -2
- package/dist/{chunk-ARVO6TTW.js → chunk-UICY4GTQ.js} +2 -2
- package/dist/{chunk-SWK4XPUS.js → chunk-UVGEWT4Y.js} +2 -2
- package/dist/{chunk-GIQ6CSL4.js → chunk-UXW33INU.js} +2 -2
- package/dist/{chunk-RDULNRSJ.js → chunk-VMPRET3I.js} +2 -2
- package/dist/{chunk-I6UTXNHU.js → chunk-VNLGKHS6.js} +2 -2
- package/dist/{chunk-44T4DUAA.js → chunk-VQILFTEH.js} +2 -2
- package/dist/{chunk-N7FP5H5U.js → chunk-VUPHCS7Y.js} +8 -8
- package/dist/{chunk-JAT6C3VX.js → chunk-VVZSBTSU.js} +2 -2
- package/dist/{chunk-FBCVASUG.js → chunk-VZRNID6A.js} +2 -2
- package/dist/{chunk-TUQIPUDS.js → chunk-W5OXRYGE.js} +2 -2
- package/dist/chunk-W6STWDQI.js +57 -0
- package/dist/chunk-W7CXK74K.js +2 -0
- package/dist/chunk-WB3WYIRE.js +4 -0
- package/dist/{chunk-C76O5MDS.js → chunk-WDNVY4E7.js} +2 -2
- package/dist/{chunk-TAYD3AE7.js → chunk-WIWY3CRX.js} +2 -2
- package/dist/chunk-WK46TNUM.js +3 -0
- package/dist/chunk-WNTFFKAX.js +12 -0
- package/dist/{chunk-JFQBRL3J.js → chunk-WOIKCX6A.js} +2 -2
- package/dist/{chunk-PIFTZEEM.js → chunk-WUN6KBHV.js} +2 -2
- package/dist/chunk-WYCTJDVR.js +2 -0
- package/dist/chunk-WYPL7GF7.js +2 -0
- package/dist/{chunk-XN22RGSR.js → chunk-XBGWL66K.js} +2 -2
- package/dist/{chunk-R6M456QG.js → chunk-XDQMU3BT.js} +2 -2
- package/dist/{chunk-XJX6LGHL.js → chunk-XFA4SSO3.js} +2 -2
- package/dist/{chunk-2YC7YNKT.js → chunk-XGZEP6GR.js} +2 -2
- package/dist/chunk-XPDPNWTQ.js +368 -0
- package/dist/chunk-XRYABF57.js +8 -0
- package/dist/{chunk-YIHNPKWD.js → chunk-YBGKCQIS.js} +2 -2
- package/dist/{chunk-2XCGSDIT.js → chunk-YEN6CYC7.js} +2 -2
- package/dist/{chunk-VMWUV6WB.js → chunk-YF5IB2LF.js} +2 -2
- package/dist/{chunk-TNG2FYS5.js → chunk-YI2AWIHC.js} +2 -2
- package/dist/{chunk-EELG7D3Q.js → chunk-YPWBKGFU.js} +2 -2
- package/dist/{chunk-GQIDEID3.js → chunk-YPWHBBIS.js} +2 -2
- package/dist/{chunk-TKDNDQA7.js → chunk-YSH6U3L4.js} +2 -2
- package/dist/{chunk-BUTEIZKP.js → chunk-YU5DZUZI.js} +2 -2
- package/dist/chunk-YWO5DDRC.js +16 -0
- package/dist/{chunk-6HRZQLOI.js → chunk-Z4CDXYNQ.js} +2 -2
- package/dist/{chunk-XSWYJCAK.js → chunk-ZF5KHH7C.js} +2 -2
- package/dist/chunk-ZOHS7AQV.js +21 -0
- package/dist/{chunk-7U2YQSDE.js → chunk-ZTI4SBFV.js} +2 -2
- package/dist/cli-main.js +2 -2
- package/dist/code-MI6F2TTU.js +2 -0
- package/dist/code-result-json-FXALY4HE.js +2 -0
- package/dist/{command-descriptors-ORNTVNYV.js → command-descriptors-P34VABY5.js} +136 -135
- package/dist/dataflow-4KEMJPC6.js +2 -0
- package/dist/dependence-slice-R7FPWD5M.js +2 -0
- package/dist/deps-7EMQUYUT.js +2 -0
- package/dist/direct-navigation-6YO234F2.js +3 -0
- package/dist/entry-map-KOOLR26E.js +2 -0
- package/dist/files-OPIPJIGZ.js +2 -0
- package/dist/hierarchy-QPD2CAER.js +2 -0
- package/dist/imports-M6HUXRXC.js +2 -0
- package/dist/index.js +1 -1
- package/dist/members-I5MEFOCT.js +2 -0
- package/dist/methods-5JYGGHXA.js +2 -0
- package/dist/output-continuation-command-UPQAAKBP.js +3 -0
- package/dist/postinstall.js +1 -1
- package/dist/project-reindex-UKKQ5PLS.js +3 -0
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +9 -0
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/query-service-server.js +3 -3
- package/dist/refs-PSU4JZZW.js +2 -0
- package/dist/refs-pagination-JG6CJMRC.js +2 -0
- package/dist/reindex-worker.js +25 -25
- package/dist/reindex.d.ts +3 -2
- package/dist/reindex.js +35 -35
- package/dist/runtime.d.ts +34 -2
- package/dist/runtime.js +4 -4
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-H-n59izO.d.ts → scip-cli-DOerTq-R.d.ts} +42 -4
- package/dist/slice-HYRATV64.js +2 -0
- package/dist/surface-VTGDYWF5.js +2 -0
- package/dist/symbol-resolution-WD5EU5JE.js +2 -0
- package/dist/system-LRQNFOR2.js +2 -0
- package/dist/trace-F4B6OLL4.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-VRPZY72V.js +2 -0
- package/dist/watch-server.js +3 -3
- package/package.json +1 -1
- package/dist/by-kind-4IYG2SKW.js +0 -2
- package/dist/call-graph-WQNXMNNN.js +0 -2
- package/dist/chunk-2BTJALUS.js +0 -454
- package/dist/chunk-3QXC54FQ.js +0 -3
- package/dist/chunk-42W3LFUK.js +0 -13
- package/dist/chunk-4GAQ6FI4.js +0 -43
- package/dist/chunk-6VEFRPTD.js +0 -5
- package/dist/chunk-7C26EKLZ.js +0 -4
- package/dist/chunk-7JYHQAH2.js +0 -22
- package/dist/chunk-7KSO2OAP.js +0 -2
- package/dist/chunk-AK3PYTIK.js +0 -5
- package/dist/chunk-AMIMMNA4.js +0 -11
- package/dist/chunk-AUY5BL74.js +0 -2
- package/dist/chunk-BDHFVH2M.js +0 -18
- package/dist/chunk-BECZLYNU.js +0 -8
- package/dist/chunk-BYDAFMSR.js +0 -57
- package/dist/chunk-BZYSGZRK.js +0 -2
- package/dist/chunk-C7IJMOFP.js +0 -134
- package/dist/chunk-CBBHFNLX.js +0 -2
- package/dist/chunk-D35XIZGN.js +0 -2
- package/dist/chunk-DKM723YF.js +0 -79
- package/dist/chunk-E44IVWIJ.js +0 -367
- package/dist/chunk-EDMB6SSO.js +0 -7
- package/dist/chunk-EETGXQY7.js +0 -3
- package/dist/chunk-FKGQOTKD.js +0 -2
- package/dist/chunk-GH5YSGZL.js +0 -5
- package/dist/chunk-HCVJR2V4.js +0 -3
- package/dist/chunk-HXOU4XNH.js +0 -3
- package/dist/chunk-IMKZEXZG.js +0 -2
- package/dist/chunk-ISIQLPJ2.js +0 -61
- package/dist/chunk-IXESDH3J.js +0 -2
- package/dist/chunk-JT6XX7QY.js +0 -8
- package/dist/chunk-MHIEP7EG.js +0 -4
- package/dist/chunk-OJNK5ALA.js +0 -2
- package/dist/chunk-OXYAWIEA.js +0 -2
- package/dist/chunk-OZETODHH.js +0 -2
- package/dist/chunk-PBUH2P5S.js +0 -3
- package/dist/chunk-PLYUVM4F.js +0 -2
- package/dist/chunk-Q7GBK5T7.js +0 -81
- package/dist/chunk-QWKHW6VZ.js +0 -2
- package/dist/chunk-RPL3ARU7.js +0 -16
- package/dist/chunk-SVHTMVA4.js +0 -4
- package/dist/chunk-T6QD2ZQB.js +0 -43
- package/dist/chunk-TD7VKJ2Y.js +0 -117
- package/dist/chunk-TUSPIVZ3.js +0 -4
- package/dist/chunk-UT7TADJX.js +0 -2
- package/dist/chunk-VUSKPCUB.js +0 -2
- package/dist/chunk-WN3TCGJ4.js +0 -2
- package/dist/chunk-WSLEJSFR.js +0 -2
- package/dist/chunk-WYZIHUPZ.js +0 -16
- package/dist/chunk-XE33FV5W.js +0 -2
- package/dist/chunk-Z2AWCTN6.js +0 -2
- package/dist/chunk-ZOXKSQQB.js +0 -2
- package/dist/code-EQJFDT6I.js +0 -2
- package/dist/code-result-json-7UWIWBOO.js +0 -2
- package/dist/dataflow-6VL54GX5.js +0 -2
- package/dist/dependence-slice-DT2NUHD2.js +0 -2
- package/dist/deps-DB7H5IKC.js +0 -2
- package/dist/direct-navigation-O3LUAYWQ.js +0 -3
- package/dist/entry-map-6K62RV3D.js +0 -2
- package/dist/files-MSLD7MO6.js +0 -2
- package/dist/hierarchy-IVBXAKFA.js +0 -2
- package/dist/imports-FRAVZ3Y2.js +0 -2
- package/dist/members-KJOJDYGO.js +0 -2
- package/dist/methods-2AYABBT3.js +0 -2
- package/dist/output-continuation-command-JHMPH6NC.js +0 -3
- package/dist/project-reindex-HYO4WD7Z.js +0 -3
- package/dist/refs-ARMA6XUJ.js +0 -2
- package/dist/refs-pagination-VUGIWN6U.js +0 -2
- package/dist/slice-YOB5YFAM.js +0 -2
- package/dist/surface-VY5EFWTW.js +0 -2
- package/dist/symbol-resolution-DGQN4XIV.js +0 -2
- package/dist/system-2KQ3QD2P.js +0 -2
- package/dist/trace-HTIPTXAE.js +0 -2
- package/dist/value-flow-5FV3VQI7.js +0 -2
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import{a as I,o as v,r as P,x as Q,y as j}from"./chunk-ODDUPDP7.js";import{D as A,a as D}from"./chunk-ZOHS7AQV.js";import{a as _,c as O,e as C,f as T,h as w,k as $}from"./chunk-FESCRNVV.js";import{c as h,d as N,i as S,j as x}from"./chunk-JWTGMPIT.js";var ie={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function u(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let n=e.split(" ");if(n.length<4)return{scheme:n[0]??"",manager:n[1]??"",packageName:n[2]??"",version:"",descriptors:[],raw:e};let t=n[0],i=n[1],r=e.slice(t.length+1+i.length+1),o;if(r.startsWith("`")){let l=r.indexOf("`",1);l===-1?(o=r.slice(1),r=""):(o=r.slice(1,l),r=r.slice(l+2))}else{let l=r.indexOf(" ");l===-1?(o=r,r=""):(o=r.slice(0,l),r=r.slice(l+1))}let s,a=r.indexOf(" ");a===-1?(s=r,r=""):(s=r.slice(0,a),r=r.slice(a+1));let c=re(r);return{scheme:t,manager:i,packageName:o,version:s,descriptors:c,raw:e}}function p(e){let n=u(e);if("kind"in n)return null;for(let t=n.descriptors.length-2;t>=0;t--){let i=n.descriptors[t];if(i?.suffix==="type")return i.name}return null}function re(e){let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let o=e.indexOf("]",t+1);if(o===-1){n.push({name:e.slice(t+1),suffix:"type-param"});break}n.push({name:e.slice(t+1,o),suffix:"type-param"}),t=o+1;continue}if(e[t]==="("&&(n.length===0||t===0||B(e[t-1]))){let o=e.indexOf(")",t+1);if(o!==-1&&e[o+1]!=="."){n.push({name:e.slice(t+1,o),suffix:"parameter"}),t=o+1;continue}}let i;if(e[t]==="`"){let o=e.indexOf("`",t+1);if(o===-1){i=e.slice(t+1),n.push({name:i,suffix:"term"});break}i=e.slice(t+1,o),t=o+1}else{let o=t;for(;t<e.length&&!B(e[t]);)t++;i=e.slice(o,t)}if(t>=e.length){i&&n.push({name:i,suffix:"term"});break}let r=e[t];if(r==="("){let o=e.indexOf(")",t+1);o!==-1&&e[o+1]==="."?(n.push({name:i,suffix:"method"}),t=o+2):o!==-1?(n.push({name:i,suffix:"method"}),t=o+1):(n.push({name:i,suffix:"term"}),t++)}else{let o=ie[r];o&&n.push({name:i,suffix:o}),t+=1}}return n}function B(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function z(e){let n=u(e);if("kind"in n&&n.kind==="local")return`local:${n.id}`;let t=n;if(t.descriptors.length===0)return t.raw;let i=[];for(let r of t.descriptors){let o=oe(r);o&&i.push(o)}return i.join(":")}function oe(e){let n=e.suffix==="namespace"?se(e.name):e.name;return n?e.suffix==="method"?`${n}()`:n:""}function se(e){return e.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/,"").replace(/\.(py|pyi)$/,"").replace(/\.(rs)$/,"").replace(/\.(java|scala|kt|kts)$/,"").replace(/\.(rb)$/,"").replace(/\.(go)$/,"").replace(/\.(cs|vb)$/,"").replace(/\.(dart)$/,"").replace(/\.(php)$/,"").replace(/\.(c|cc|cpp|cxx|h|hpp)$/,"")}function W(e){let n=u(e);if("kind"in n&&n.kind==="local")return n.id;let t=n;return t.descriptors.length===0?"":t.descriptors[t.descriptors.length-1].name}function g(e){let n=u(e);if("kind"in n&&n.kind==="local")return null;let t=n;return t.descriptors[t.descriptors.length-1]?.suffix??null}function Be(e){return e.endsWith("().")||g(e)==="method"}function L(e){let n=g(e);return n==="method"?!0:n!=="term"?!1:e.endsWith("().")?!0:e.startsWith("rust-analyzer ")&&e.includes("#")?!1:e.startsWith("scip-typescript ")?!/#[A-Za-z0-9_$]+\.$/.test(e):!0}function ze(e){return g(e)==="namespace"}var ae=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function We(e){return ae.test(e)}var le=new Set(["test","tests","_tests"]);function Je(e){let n=u(e);if("kind"in n)return!1;for(let t=0;t<n.descriptors.length-1;t+=1){let i=n.descriptors[t];if(i?.suffix==="namespace"&&i.name&&le.has(i.name))return!0}return!1}function Ge(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,o=i.descriptors;if(o.length!==r.length+1)return!1;for(let s=0;s<r.length;s++){let a=r[s],c=o[s];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function He(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,o=i.descriptors;if(o.length<=r.length)return!1;for(let s=0;s<r.length;s++){let a=r[s],c=o[s];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Ke(e,n){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.start_char, der.end_line, der.end_char, d.relative_path, gs.display_name, gs.documentation
|
|
2
|
+
FROM global_symbols gs
|
|
3
|
+
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
4
|
+
JOIN documents d ON der.document_id = d.id
|
|
5
|
+
WHERE ${n.where}
|
|
6
|
+
${e.pathExclusionsFor("d")}
|
|
7
|
+
${G(n.orderBy)}
|
|
8
|
+
${H(n.limit)}`,...n.params??[])}function Ye(e,n){return e.all(`SELECT
|
|
9
|
+
gs.id,
|
|
10
|
+
gs.symbol,
|
|
11
|
+
c.document_id,
|
|
12
|
+
MIN(c.start_line) AS start_line,
|
|
13
|
+
0 AS start_char,
|
|
14
|
+
MAX(c.end_line) AS end_line,
|
|
15
|
+
0 AS end_char,
|
|
16
|
+
d.relative_path,
|
|
17
|
+
gs.display_name,
|
|
18
|
+
gs.documentation
|
|
19
|
+
FROM global_symbols gs
|
|
20
|
+
JOIN mentions m ON m.symbol_id = gs.id
|
|
21
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
22
|
+
JOIN documents d ON c.document_id = d.id
|
|
23
|
+
WHERE m.role = 1
|
|
24
|
+
AND ${n.where}
|
|
25
|
+
${e.pathExclusionsFor("d")}
|
|
26
|
+
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
|
|
27
|
+
${G(n.orderBy)}
|
|
28
|
+
${H(n.limit)}`,...n.params??[])}function G(e){return e?`ORDER BY ${e}`:""}function H(e){return typeof e=="number"?`LIMIT ${e}`:""}function U(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function K(e){if(!e)return null;let n=J(e);if(n)return n.replace(/\n/g," ");let t=e.indexOf("|");if(t===-1)return e.replace(/\n/g," ");let i=e.slice(t+1);return(J(i)??i).replace(/\n/g," ")}function J(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function b(e){return{forFile(n,t){return Y(e,n,t)},forFiles(n,t){let i=new Map;for(let r of n)i.set(r,Y(e,r,t));return i}}}function Y(e,n,t){let i={file:n},r=t.facts||t.identifiers;if(t.text&&(i.text=w(e,n)),t.lines&&(i.lines=$(e,n)),t.ast&&(i.ast=A(e,n)),t.imports&&(i.imports=j(e,n)),t.reexports&&(i.reexports=Q(e,n)),r){let o=v(e,n),s=o.facts;t.facts&&(i.facts=s),o.unavailable&&(i.sourceFactsUnavailable=o.unavailable),t.identifiers&&s&&(i.identifiers=s.fileIdentifiers,i.identifierLineMap=s.identifierLineMap)}return i}function ce(e,n={}){if(p(e.symbol)!==null)return n.includeClassMemberFallbacks===!0;let r=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(r)}function F(e,n,t={}){let i=new Map;for(let o of n)e.length>0&&!ce(o,{includeClassMemberFallbacks:t.includeClassMemberFallbacks})||i.set(o.id,o);for(let o of e)i.set(o.id,o);let r=[...i.values()];return t.sort?r.sort((o,s)=>o.start_line-s.start_line||o.end_line-s.end_line||o.symbol.localeCompare(s.symbol)):r}function yn(e){let n=new Map;for(let t of e){if(!t.leaf)continue;let i=n.get(t.leaf)??[];i.push(t),n.set(t.leaf,i)}return n}var de=h("file-definitions",{clearGroups:["definition-catalog"]}),ue=N("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),fe=h("file-function-like-definitions",{clearGroups:["definition-catalog"]}),X=new WeakMap;function E(e,n,t={},i){return T(n),t.includeClassMemberFallbacks?R(e,n,void 0,{includeClassMemberFallbacks:!0},i):de.get(e,n,()=>{let r=m(i,"evidence-read",()=>ee(e,n));if(r)return r;let o=R(e,n,void 0,t,i);return m(i,"evidence-write",()=>{let s=x(e),a=b(e).forFile(n,{text:!0}).text;s&&a&&V.write(e,n,S(e,n,a),{projectFingerprint:s,definitions:o.map(c=>({...c}))})}),o})}function me(e,n){return fe.get(e,n,()=>{let t=ee(e,n);return t?t.filter(i=>i.isFunctionLike):R(e,n,i=>i.isFunctionLike)})}var V=O({kind:"file-definitions",invalidation:C("file-definitions"),serialize:pe,deserialize:ge});function ee(e,n){let t=x(e);if(!t)return null;let i=b(e).forFile(n,{text:!0}).text;if(!i)return null;let r=V.read(e,n,S(e,n,i));return r?be(r,t,n):null}function pe(e){return JSON.stringify(e)}function ge(e){try{let n=JSON.parse(e);return!_(n)||typeof n.projectFingerprint!="string"||!Array.isArray(n.definitions)?null:{projectFingerprint:n.projectFingerprint,definitions:n.definitions}}catch{return null}}function be(e,n,t){if(e.projectFingerprint!==n)return null;let i=[];for(let r of e.definitions){let o=ye(r,t);if(!o)return null;i.push(o)}return i}function ye(e,n){return!_(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.startChar!="number"&&e.startChar!==void 0||typeof e.endLine!="number"||typeof e.endChar!="number"&&e.endChar!==void 0||e.relativePath!==n||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,startChar:e.startChar,endLine:e.endLine,endChar:e.endChar,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function R(e,n,t,i={},r){let o=m(r,"primary-rows",()=>he(e,n)),s=m(r,"fallback-rows",()=>Se(e,n)),a=m(r,"merge-rows",()=>F(o,s,{sort:!0,includeClassMemberFallbacks:i.includeClassMemberFallbacks}).map(M));return t&&(a=a.filter(t)),m(r,"range-correction",()=>k(e,n,a,r,i.rangeCorrectionEvidence))}function m(e,n,t){return e?e(n,t):t()}function he(e,n){return e.all(`SELECT
|
|
29
|
+
gs.id,
|
|
30
|
+
gs.symbol,
|
|
31
|
+
der.document_id,
|
|
32
|
+
der.start_line,
|
|
33
|
+
der.start_char,
|
|
34
|
+
der.end_line,
|
|
35
|
+
der.end_char,
|
|
36
|
+
d.relative_path,
|
|
37
|
+
gs.display_name,
|
|
38
|
+
gs.kind,
|
|
39
|
+
gs.documentation,
|
|
40
|
+
gs.enclosing_symbol
|
|
41
|
+
FROM global_symbols gs
|
|
42
|
+
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
43
|
+
JOIN documents d ON der.document_id = d.id
|
|
44
|
+
WHERE d.relative_path = ?
|
|
45
|
+
${e.symbolNoiseFor("gs")}
|
|
46
|
+
ORDER BY der.start_line, der.end_line`,n)}function Se(e,n){return e.all(`SELECT
|
|
47
|
+
gs.id,
|
|
48
|
+
gs.symbol,
|
|
49
|
+
c.document_id,
|
|
50
|
+
MIN(c.start_line) AS start_line,
|
|
51
|
+
0 AS start_char,
|
|
52
|
+
MAX(c.end_line) AS end_line,
|
|
53
|
+
0 AS end_char,
|
|
54
|
+
d.relative_path,
|
|
55
|
+
gs.display_name,
|
|
56
|
+
gs.kind,
|
|
57
|
+
gs.documentation,
|
|
58
|
+
gs.enclosing_symbol
|
|
59
|
+
FROM global_symbols gs
|
|
60
|
+
JOIN mentions m ON m.symbol_id = gs.id
|
|
61
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
62
|
+
JOIN documents d ON c.document_id = d.id
|
|
63
|
+
WHERE d.relative_path = ?
|
|
64
|
+
AND m.role = 1
|
|
65
|
+
${e.symbolNoiseFor("gs")}
|
|
66
|
+
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
|
|
67
|
+
ORDER BY start_line, end_line`,n)}function M(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,startChar:e.start_char??0,endLine:e.end_line,endChar:e.end_char??0,relativePath:e.relative_path,leaf:W(e.symbol),parentTypeName:p(e.symbol),isFunctionLike:L(e.symbol),isTypeLike:g(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function hn(e,n={}){return xe(e,n.scope)}function xe(e,n){return D(e,{scope:n,includeIgnored:!1}).flatMap(t=>E(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function Sn(e,n){return D(e,{scope:n,includeIgnored:!1}).flatMap(t=>me(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function xn(e,n){let t=ue.get(e,()=>new WeakMap),i=t.get(n.symbolMatches);i||(i=new Map,t.set(n.symbolMatches,i));let r=JSON.stringify({scope:n.scope??null,sqlPrefilter:n.sqlPrefilter??null}),o=i.get(r);if(o)return[...o];let s=Z(De(e,n.scope,n.sqlPrefilter)),a=Z(_e(e,n.scope,n.sqlPrefilter)),c=new Set([...s.keys(),...a.keys()]),l=[];for(let d of[...c].sort()){if(e.isIgnored(d))continue;let f=F(s.get(d)??[],a.get(d)??[],{sort:!0}).filter(te=>n.symbolMatches(te.symbol));f.length!==0&&l.push(...k(e,d,f.map(M)))}return i.set(r,l),[...l]}function De(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${ne("gs",t)}`:"",o=n?[`%${n}%`]:[];return e.all(`SELECT
|
|
68
|
+
gs.id,
|
|
69
|
+
gs.symbol,
|
|
70
|
+
der.document_id,
|
|
71
|
+
der.start_line,
|
|
72
|
+
der.start_char,
|
|
73
|
+
der.end_line,
|
|
74
|
+
der.end_char,
|
|
75
|
+
d.relative_path,
|
|
76
|
+
gs.display_name,
|
|
77
|
+
gs.kind,
|
|
78
|
+
gs.documentation,
|
|
79
|
+
gs.enclosing_symbol
|
|
80
|
+
FROM global_symbols gs
|
|
81
|
+
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
82
|
+
JOIN documents d ON der.document_id = d.id
|
|
83
|
+
WHERE 1 = 1
|
|
84
|
+
${e.pathExclusionsFor("d")}
|
|
85
|
+
${i}
|
|
86
|
+
${r}
|
|
87
|
+
${e.symbolNoiseFor("gs")}
|
|
88
|
+
ORDER BY d.relative_path, der.start_line, der.end_line`,...o)}function _e(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${ne("gs",t)}`:"",o=n?[`%${n}%`]:[];return e.all(`SELECT
|
|
89
|
+
gs.id,
|
|
90
|
+
gs.symbol,
|
|
91
|
+
c.document_id,
|
|
92
|
+
MIN(c.start_line) AS start_line,
|
|
93
|
+
0 AS start_char,
|
|
94
|
+
MAX(c.end_line) AS end_line,
|
|
95
|
+
0 AS end_char,
|
|
96
|
+
d.relative_path,
|
|
97
|
+
gs.display_name,
|
|
98
|
+
gs.kind,
|
|
99
|
+
gs.documentation,
|
|
100
|
+
gs.enclosing_symbol
|
|
101
|
+
FROM global_symbols gs
|
|
102
|
+
JOIN mentions m ON m.symbol_id = gs.id
|
|
103
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
104
|
+
JOIN documents d ON c.document_id = d.id
|
|
105
|
+
WHERE m.role = 1
|
|
106
|
+
AND NOT EXISTS (
|
|
107
|
+
SELECT 1
|
|
108
|
+
FROM defn_enclosing_ranges existing_der
|
|
109
|
+
WHERE existing_der.symbol_id = gs.id
|
|
110
|
+
)
|
|
111
|
+
${e.pathExclusionsFor("d")}
|
|
112
|
+
${i}
|
|
113
|
+
${r}
|
|
114
|
+
${e.symbolNoiseFor("gs")}
|
|
115
|
+
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
|
|
116
|
+
ORDER BY d.relative_path, start_line, end_line`,...o)}function Ie(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function ne(e,n){return n==="callable"?Ie(e):Le(e)}function Le(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function Z(e){let n=new Map;for(let t of e){let i=n.get(t.relative_path);i?i.push(t):n.set(t.relative_path,[t])}return n}function Dn(e,n,t={}){if(n.length===0)return[];let i=n.flatMap(r=>E(e,r)).filter(r=>!e.isIgnored(r.relativePath));return t.onlyDocumented&&(i=i.filter(r=>r.documentation!==null&&r.documentation!=="")),t.sort&&(i=i.sort((r,o)=>r.relativePath.localeCompare(o.relativePath)||r.startLine-o.startLine||r.endLine-o.endLine)),i.map(r=>({startLine:r.startLine,endLine:r.endLine,symbol:r.symbol,shortName:z(r.symbol),signature:U(K(r.documentation)),relativePath:r.relativePath,enclosingSymbol:r.enclosingSymbol}))}function Fe(e){let n=new Map,t=e.map((i,r)=>({definition:i,index:r,span:i.endLine-i.startLine})).sort((i,r)=>i.span-r.span||i.index-r.index);for(let{definition:i}of t)for(let r=i.startLine;r<=i.endLine;r+=1)n.has(r)||n.set(r,i);return n}function _n(e,n){let t=X.get(e);return t||(t=Fe(e),X.set(e,t)),t.get(n)??null}function In(e,n){let t=E(e,n.relative_path).find(i=>i.symbolId===n.id)??(p(n.symbol)===null||!L(n.symbol)?void 0:k(e,n.relative_path,[M(n)])[0]);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,startChar:t.startChar,endLine:t.endLine,endChar:t.endChar,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,startChar:n.start_char??0,endLine:n.end_line,endChar:n.end_char??0,relativePath:n.relative_path}}function k(e,n,t,i,r){let o=m(i,"range-correction.source-text",()=>r?r.source:b(e).forFile(n,{text:!0}).text),s=m(i,"range-correction.callable-sites",()=>r?r.callables:P(e,n));return s?m(i,"range-correction.ast-correction",()=>Oe(t,s,o)):o?m(i,"range-correction.regex-fallback",()=>Re(t,o)):t}function Re(e,n){let t=n.split(/\r?\n/),i=Ee(e,t),r=Me(e,i),o=ke(r,t);return Ne(e,o)}function Ee(e,n){let t=e.some(r=>y(r.symbol))?Pe(n):null,i=new Map;for(let r of e)i.set(r.symbolId,ve(n,t,r));return i}function Me(e,n){return e.filter(t=>y(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,i)=>t.startLine-i.startLine||t.definition.startLine-i.definition.startLine||t.definition.symbol.localeCompare(i.definition.symbol))}function ke(e,n){let t=new Map;for(let i=0;i<e.length;i+=1){let r=e[i],o=e[i+1],s=o?Math.max(r.startLine,o.startLine-1):n.length-1;t.set(r.definition.symbolId,{startLine:r.startLine,endLine:Qe(n,r.definition,r.startLine,s)})}return t}function Ne(e,n){return e.map(t=>{let i=n.get(t.symbolId);return i?{...t,startLine:i.startLine,endLine:i.endLine}:t})}function Oe(e,n,t=null){let i=new Map;for(let r of n){let o=i.get(r.name);o?o.push(r):i.set(r.name,[r])}return e.map(r=>{if(!Ae(r)||!r.leaf)return q(r,t);let o=i.get(r.leaf);if(!o||o.length===0)return q(r,t);let s=t?Ce(r,o,t):null;if(s)return{...r,startLine:s.startLine,endLine:s.endLine};let a=o[0],c=Math.abs(a.startLine-r.startLine);for(let l=1;l<o.length;l+=1){let d=o[l],f=Math.abs(d.startLine-r.startLine);f<c&&(a=d,c=f)}return{...r,startLine:a.startLine,endLine:a.endLine}})}function Ce(e,n,t){let i=Te(e.symbol);if(!i)return null;let r=t.split(/\r?\n/),o=new RegExp(`\\b${I(i)}\\b`);for(let s of n){let a=we(r,s.startLine);if(a&&o.test(a))return s}return null}function Te(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function we(e,n){for(let t=n;t>=0;t-=1){let i=e[t]?.trim()??"";if(i){if(/^impl\b/.test(i))return $e(e,t,n);if(/^(?:struct|enum|trait|mod)\b/.test(i))return null}}return null}function $e(e,n,t){let i=[];for(let r=n;r<=t;r+=1){let o=e[r]??"";if(i.push(o),o.includes("{"))break}return i.join(" ")}function Ae(e){return y(e.symbol)?!0:g(e.symbol)==="term"&&p(e.symbol)===null}function q(e,n){if(!n||!e.leaf||g(e.symbol)!=="term"||p(e.symbol)!==null)return e;let t=I(e.leaf),i=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),o=n.split(/\r?\n/).findIndex(s=>i.test(s));return o>=0?{...e,startLine:o,endLine:o}:e}function ve(e,n,t){if(!y(t.symbol))return t.startLine;let i=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return i;let r=n.get(t.leaf);if(!r||r.length===0)return i;let o=null;for(let s of r){let a=Math.abs(s-t.startLine);(!o||a<o.distance)&&(o={line:s,distance:a})}return o?.line??i}function Pe(e){let n=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,t=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,i=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,r=/\b([A-Za-z_$][\w$]*)\s*\(/g,o=new Map,s=(a,c)=>{let l=o.get(a);if(!l){o.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let d of c.matchAll(n))d[1]&&s(d[1],a);for(let d of c.matchAll(t))d[1]&&s(d[1],a);let l=c.match(i);l?.[1]&&s(l[1],a);for(let d of c.matchAll(r))d[1]&&s(d[1],a)}return o}function Qe(e,n,t,i){let r=Math.max(t,Math.min(e.length-1,i)),o=Math.max(t,Math.min(r,n.endLine)),s=0,a=0,c=!1;for(let l=t;l<=r;l+=1){let d=je(e[l]??"");for(let f of d)f==="{"?(s+=1,c=!0):f==="}"?s=Math.max(0,s-1):f==="("?a+=1:f===")"&&(a=Math.max(0,a-1));if(c&&s===0||!c&&a===0&&l>=o)return l}return o}function je(e){let n="",t=null,i=!1;for(let r=0;r<e.length;r+=1){let o=e[r],s=e[r+1];if(!t&&o==="/"&&s==="/"){n+=" ".repeat(e.length-r);break}if(t){if(i){i=!1,n+=" ";continue}if(o==="\\"){i=!0,n+=" ";continue}o===t&&(t=null),n+=" ";continue}if(o==='"'||o==="'"||o==="`"){t=o,n+=" ";continue}n+=o}return n}function y(e){return e.includes("().")}function Ln(e){let n=u(e);if("kind"in n)return[];let t=[];for(let i=n.descriptors.length-2;i>=0;i-=1){let r=n.descriptors[i];r?.suffix==="type"&&r.name&&t.push(r.name)}return t}export{b as a,u as b,p as c,z as d,W as e,g as f,Be as g,L as h,ze as i,We as j,Je as k,Ge as l,He as m,Ke as n,Ye as o,U as p,K as q,F as r,yn as s,E as t,hn as u,xe as v,Sn as w,xn as x,Dn as y,Fe as z,_n as A,In as B,Ln as C};
|
|
117
|
+
//# sourceMappingURL=chunk-N2ZSIIGR.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{isAbsolute as it,relative as jn}from"path";var g=class extends Error{constructor(n,r){super(`refusing unsafe project file path ${JSON.stringify(n)} (${r})`);this.relativePath=n;this.reason=r;this.name="UnsafeProjectPathError"}relativePath;reason;code="SCIP_QUERY_UNSAFE_PROJECT_PATH"};function be(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function zi(e){return e.replace(/\\/g,"/")}function Hi(e,t){return be(e)===be(t)}function b(e,t){let n=jn(e,t);return n===""||!n.startsWith("..")&&!it(n)}function w(e){if(!e)throw new g(e,"empty-path");if(e.includes("\0"))throw new g(e,"nul-byte");if(it(e)||/^[A-Za-z]:/.test(e)||e.startsWith("//")||e.startsWith("\\\\"))throw new g(e,"absolute-path");let t=be(e);if(t.split("/").some(r=>r===".."))throw new g(e,"parent-traversal");if(!t||t===".")throw new g(e,"empty-path");return t}function te(e,t,n=[]){let r=Pe(e);if(dt.has(r)||n.some(o=>ee(r,o))||t.some(o=>lt(r,o)))return"config";if(t.some(gt)&&/\.d\.(?:ts|mts|cts)$/.test(r.toLowerCase()))return"ambient";let i=ft(r);return t.some(o=>(ht[o]??[]).includes(i))?"source":"other"}function pt(e,t,n){let r=Pe(e);if(dt.has(r)||n?.some(o=>ee(r,o))||lt(r,t)||gt(t)&&/\.d\.(?:ts|mts|cts)$/.test(r.toLowerCase()))return!0;let i=ft(r);return(ht[t]??[]).includes(i)}function Ui(e){if(typeof e!="object"||e===null)return null;let t=e;return typeof t.version!="number"||!st(t.languages)||typeof t.pnpmWorkspaces!="boolean"||typeof t.typescriptProjectMode!="string"||!st(t.typescriptProjects)||t.clojureConfigPath!==void 0&&typeof t.clojureConfigPath!="string"||!Array.isArray(t.files)||!t.files.every(xe)?null:t}function ot(e){return{...e,files:e.files.map(({semanticHash:t,...n})=>n)}}function qi(e,t){return!e||!t?e===t:JSON.stringify(ot(e))===JSON.stringify(ot(t))}function Ji(e,t){let n=new Map((e?.files??[]).map(a=>[a.path,a])),r=new Map(t.files.map(a=>[a.path,a])),i=new Set([...n.keys(),...r.keys()]),o=[];for(let a of[...i].sort()){let c=n.get(a),u=r.get(a),d=te(a,t.languages);!c&&u?o.push({kind:"added",path:a,inputKind:d,after:u}):c&&!u?o.push({kind:"deleted",path:a,inputKind:d,before:c}):c&&u&&(c.hash!==u.hash||c.size!==u.size)&&o.push({kind:"modified",path:a,inputKind:d,before:c,after:u})}let s=new Set;return e||s.add("prior-snapshot-unavailable"),e&&e.version!==t.version&&s.add("snapshot-version-changed"),(at(e?.files??[])||at(t.files))&&s.add("duplicate-input-path"),[...e?.files??[],...t.files].some(Cn)&&s.add("unreadable-input"),{version:1,changes:o,projectIdentityChanged:e?!Fn(e,t):!0,uncertainty:[...s].sort()}}function st(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function at(e){return new Set(e.map(t=>t.path)).size!==e.length}function xe(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.path=="string"&&typeof t.size=="number"&&Number.isFinite(t.size)&&typeof t.hash=="string"&&(t.semanticHash===void 0||typeof t.semanticHash=="string")}function Cn(e){return e.hash==="unreadable"||e.size<0}function Fn(e,t){return ct(e.languages,t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&ct(e.typescriptProjects,t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function ct(e,t){if(e.length!==t.length)return!1;let n=[...e].sort(),r=[...t].sort();return n.every((i,o)=>i===r[o])}var dt=new Set([".scipquery.json"]),kn={typescript:["tsconfig.json"],javascript:["package.json"],java:["pom.xml","build.gradle"],scala:["build.sbt"],kotlin:["build.gradle.kts"],rust:["Cargo.toml"],python:["pyproject.toml","setup.py"],ruby:["Gemfile"],go:["go.mod"],cpp:["CMakeLists.txt","Makefile"],c:["CMakeLists.txt","Makefile"],csharp:["*.csproj","*.sln"],vb:["*.vbproj","*.sln"],dart:["pubspec.yaml"],php:["composer.json"],clojure:["deps.edn","project.clj","bb.edn","shadow-cljs.edn"]},wn={typescript:["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","tsconfig.*.json","jsconfig.json","jsconfig.*.json"],javascript:["package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","tsconfig.json","tsconfig.*.json","jsconfig.json","jsconfig.*.json"],java:["build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","gradle.lockfile","gradle-wrapper.properties"],scala:["plugins.sbt","build.properties"],kotlin:["pom.xml","build.gradle","settings.gradle","settings.gradle.kts","gradle.properties","gradle.lockfile","gradle-wrapper.properties"],rust:["Cargo.lock","rust-project.json","rust-toolchain","rust-toolchain.toml"],python:["setup.cfg","requirements*.txt","Pipfile","Pipfile.lock","poetry.lock","uv.lock"],ruby:["Gemfile.lock","gems.locked"],go:["go.sum","go.work","go.work.sum"],cpp:["compile_commands.json"],c:["compile_commands.json"],csharp:["Directory.Build.props","Directory.Build.targets","Directory.Packages.props","packages.lock.json","NuGet.Config","global.json"],vb:["Directory.Build.props","Directory.Build.targets","Directory.Packages.props","packages.lock.json","NuGet.Config","global.json"],dart:["pubspec.lock","analysis_options.yaml"],php:["composer.lock"],clojure:[]},ut=new Map;function lt(e,t){return kn[t].some(n=>ee(e,n))||wn[t].some(n=>ee(e,n))}function ee(e,t){let n=Pe(t).replace(/^\.\//,"");if(!n)return!1;let r=e.split("/").at(-1)??e,i=n.includes("/")?e:r;if(!n.includes("*")&&!n.includes("?"))return i===n;let o=ut.get(n);if(!o){let s=n.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]");o=new RegExp(`^${s}$`),ut.set(n,o)}return o.test(i)}function Pe(e){return e.replaceAll("\\","/").replace(/^\.\//,"")}function ft(e){return e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:""}function gt(e){return e==="typescript"||e==="javascript"}var ht={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".mjs",".cjs",".vue"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"],clojure:[".clj",".cljs",".cljc"]};function R(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function mt(e){return typeof e=="string"&&Number.isFinite(Date.parse(e))}function Ki(e){return typeof e=="string"&&e.length>0}function Yi(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function Xi(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>0}var Rn=/^[a-f0-9]{64}$/u;function Qi(e){return typeof e=="string"&&Rn.test(e)}function Zi(e){return typeof e=="string"&&e.length>0&&e.length<=256&&!/[\0\r\n]/u.test(e)}function eo(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0}var yt=["typescript","javascript","java","scala","kotlin","rust","python","ruby","go","cpp","c","csharp","vb","dart","php","clojure"];var je=2,O=3;var Ce=new Set(yt);function ao(e){let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch(s){return{kind:"malformed",reason:`invalid JSON: ${Ln(s)}`}}if(!R(t))return{kind:"malformed",reason:"metadata must be a JSON object"};let n=t.version;if(!Number.isInteger(n))return{kind:"malformed",reason:"version must be an integer"};if(n!==je&&n!==O)return{kind:"unsupported",version:n,direction:n<je?"older":"future"};let r=In(t,n);if(r)return{kind:"malformed",reason:r};let i=t,o={metadata:i,capabilities:En(i)};return n===je?{kind:"legacy",...o,metadata:i}:{kind:"supported",...o,metadata:i}}function co(e){return e.kind==="legacy"||e.kind==="supported"?e.metadata:null}function uo(e){if(e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.stableGenerationIdentity)return null;let t=e.metadata;return JSON.stringify({version:t.version,status:t.status,updatedAt:t.updatedAt,fingerprint:t.fingerprint,indexedLanguages:t.indexedLanguages,scipCompanion:t.scipCompanion,sqliteLayoutVersion:t.version===O?t.sqliteLayoutVersion:void 0})}function En(e){let t=e.fingerprint!==void 0,n=R(e.fingerprint),r=e.indexedLanguages!==void 0,i=e.status==="complete",o=e.version===O?e:null;return{usableForQuery:r,usableForEvidenceCache:t,publishableGeneration:i&&n&&r,stableGenerationIdentity:i&&t&&typeof e.updatedAt=="string",languageShardReuse:!!o?.languageFingerprints,typescriptProjectShardReuse:!!o?.typescriptProjectShards}}function In(e,t){if(e.status!=="complete"&&e.status!=="partial")return"status must be complete or partial";if(e.updatedAt!==void 0&&!mt(e.updatedAt))return"updatedAt must be a valid timestamp";for(let n of["requestedLanguages","indexedLanguages"])if(e[n]!==void 0&&!vn(e[n]))return`${n} must contain unique supported languages`;return e.skipped!==void 0&&!Tn(e.skipped)?"skipped must contain supported language/reason pairs":e.scipCompanion!==void 0&&e.scipCompanion!=="current"&&e.scipCompanion!=="deferred"?"scipCompanion must be current or deferred":t===O&&e.sqliteLayoutVersion!==void 0&&(!Number.isSafeInteger(e.sqliteLayoutVersion)||e.sqliteLayoutVersion<1)?"sqliteLayoutVersion must be a positive safe integer":t===O&&e.languageFingerprints!==void 0&&!On(e.languageFingerprints)?"languageFingerprints must map supported languages to fingerprint objects":t===O&&e.typescriptProjectShards!==void 0&&!An(e.typescriptProjectShards)?"typescriptProjectShards must map project names to file fingerprints":null}function po(e){return e.version===O&&e.sqliteLayoutVersion===1}function vn(e){return!Array.isArray(e)||!e.every(t=>typeof t=="string"&&Ce.has(t))?!1:new Set(e).size===e.length}function Tn(e){return Array.isArray(e)&&e.every(t=>R(t)&&typeof t.language=="string"&&Ce.has(t.language)&&typeof t.reason=="string")}function On(e){return R(e)&&Object.entries(e).every(([t,n])=>Ce.has(t)&&R(n))}function An(e){return R(e)&&Object.values(e).every(t=>R(t)&&Array.isArray(t.files)&&t.files.every(xe))}function Ln(e){return e instanceof Error?e.message:String(e)}import{closeSync as Fe,fstatSync as ne,openSync as ke,readFileSync as Dn,readSync as St}from"fs";import{createHash as _n}from"crypto";var bt=8*1024*1024,xt=64*1024*1024,Bn=512*1024*1024,Mn=256*1024*1024,E=class extends Error{constructor(n,r,i,o,s){let a=i==="too-large"?`is ${o} bytes; the safety limit is ${s} bytes`:i==="not-regular"?"is not a regular file":"changed while it was being read";super(`${n} ${JSON.stringify(r)} ${a}`);this.inputKind=n;this.inputPath=r;this.reason=i;this.observedBytes=o;this.limitBytes=s;this.name="BoundedFileReadError"}inputKind;inputPath;reason;observedBytes;limitBytes;code="SCIP_QUERY_BOUNDED_FILE_READ"};function re(e,t){A(t.maxBytes);let n=String(e),r=ke(e,"r");try{let i=ne(r);jt(i,t,n);let o=Dn(r),s=ne(r);if(s.dev!==i.dev||s.ino!==i.ino||s.size!==i.size||o.byteLength!==i.size)throw new E(t.inputKind,n,"changed-during-read",s.size,t.maxBytes);return o}finally{Fe(r)}}function we(e,t,n="utf8"){return re(e,t).toString(n)}function $(e,t){return we(e,{maxBytes:bt,inputKind:t})}function Nn(e,t){return we(e,{maxBytes:xt,inputKind:t})}function Re(e,t){A(t.maxBytes);let n=[],r=Buffer.allocUnsafe(64*1024),i=0;for(;;){let o=St(e,r,0,r.length,null);if(o===0)break;if(i+=o,!Number.isSafeInteger(i)||i>t.maxBytes)throw new E(t.inputKind,`file descriptor ${e}`,"too-large",i,t.maxBytes);n.push(Buffer.from(r.subarray(0,o)))}return Buffer.concat(n,i)}function Gn(e,t,n="utf8"){return Re(e,t).toString(n)}function Pt(e,t){let n=ke(e,"r");try{return Re(n,t)}finally{Fe(n)}}function Wn(e,t,n="utf8"){return Pt(e,t).toString(n)}function ie(e,t,n){A(t.maxBytes);let r=String(e),i=ke(e,"r");try{let o=ne(i);jt(o,t,r);let s=Buffer.allocUnsafe(Math.min(1024*1024,Math.max(1,o.size))),a=0;for(;a<o.size;){let u=St(i,s,0,Math.min(s.length,o.size-a),a);if(u===0)break;n(s.subarray(0,u)),a+=u}let c=ne(i);if(c.dev!==o.dev||c.ino!==o.ino||c.size!==o.size||a!==o.size)throw new E(t.inputKind,r,"changed-during-read",c.size,t.maxBytes);return a}finally{Fe(i)}}function zn(e,t){let n=_n("sha256");return ie(e,t,r=>n.update(r)),n.digest("hex")}function jt(e,t,n){if(!e.isFile())throw new E(t.inputKind,n,"not-regular",Number(e.size),t.maxBytes);if(e.size>t.maxBytes)throw new E(t.inputKind,n,"too-large",Number(e.size),t.maxBytes)}function A(e){if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`maxBytes must be a non-negative safe integer; received ${e}`)}import{spawnSync as $n}from"child_process";import{createHash as Un}from"crypto";import{existsSync as qn,lstatSync as Jn,realpathSync as Vn}from"fs";import{dirname as Kn,isAbsolute as Yn,join as Xn,relative as Fo,resolve as ae,sep as ko}from"path";var Ct=Symbol.for("scip-query.project-file-listing-context.v1"),Ft=globalThis,Ee=Ft[Ct],I=Ee&&typeof Ee=="object"?Ee:{};Ft[Ct]=I;function kt(e,t){let n=I.active?I.canonicalProjectRoots:void 0,r=n?.get(e);if(r!==void 0)return r;let i=t();return n?.set(e,i),i}function wt(){return I.sequence??0}function Rt(e,t,n){let r=I.active,i=r?.get(e);if(i&&i.pathBytes<=t)return i;let o=Hn(n(),(I.sequence??0)+1);if(I.sequence=o.sequence,o.pathBytes>t)throw new RangeError(`Git project file listing exceeded ${t} path bytes.`);return r?.set(e,o),o}function Et(e,t){let n=I.active?.get(e);return n&&n.sequence>t?n.indexAllowsTreeFingerprintReuse:void 0}function*It(e){let t=0;for(;t<e.taggedOutput.length;){let n=e.taggedOutput.indexOf("\0",t);if(n<0)return;yield e.taggedOutput.slice(t+2,n),t=n+1}}function Hn(e,t){let n=0,r=0,i=!0;for(;n<e.length;){let o=e.indexOf("\0",n);if(o<0||o<=n+2||e[n+1]!==" ")throw new Error("Git returned a malformed tagged project file listing.");let s=e[n];i&&=s==="H"||s==="?",r+=1,n=o+1}return{taggedOutput:e,pathBytes:Buffer.byteLength(e,"utf8")-r*2,indexAllowsTreeFingerprintReuse:i,sequence:t}}var T={run(e,t){let n=Tt(e,t);return n.kind==="success"?n.output:void 0},runResult:Tt},Qn=["rev-parse","--show-toplevel","--absolute-git-dir","--git-common-dir","HEAD","HEAD^{tree}"],ve=["status","--porcelain=v2","--branch","-z","--untracked-files=all"],oe=/^[0-9a-f]{40,64}$/;function Ro(e,t,n=T){if(!t||t.startsWith("-")||/[\0\r\n]/.test(t))throw new Error(`Invalid Git revision ${JSON.stringify(t)}.`);let r=n.runResult(e,["rev-parse","--verify","--end-of-options",`${t}^{commit}`]);if(r.kind!=="success"||!oe.test(r.output))throw new Error(`Git revision ${JSON.stringify(t)} does not resolve to exactly one commit.`);return r.output}function Eo(e,t=T){return Zn(e,t)?.context}function Zn(e,t=T){let n=t.runResult(e,Qn);if(n.kind==="success"){let i=er(n.output);if(i){let o=tr(i,t);if(o)return vt(o)}}let r=nr(e,t);return r?vt(r):void 0}function Io(e,t=T){if(!e.headCommit)return;let n=t.run(e.projectRoot,ve);if(n===void 0)return;let r=Te(n);if(!(!r?.headCommit||r.headCommit!==e.headCommit))return{...e,clean:r.clean}}function vo(e,t=T,n={}){let r=t===T&&n.cachedInventoryAfterSequence!==void 0?Et(e,n.cachedInventoryAfterSequence):void 0;if(r!==void 0)return r;let i=t.run(e,["ls-files","-v","-z"]);return i===void 0?!1:i.split("\0").filter(Boolean).every(o=>o.startsWith("H "))}function vt(e){return{context:e,projectFileInventorySequence:wt()}}function Te(e){let t=e.split("\0").filter(Boolean),n=t.find(i=>i.startsWith("# branch.oid "))?.slice(13),r=n==="(initial)"?void 0:n;if(!(r!==void 0&&!oe.test(r))&&n!==void 0)return{headCommit:r,clean:t.every(i=>i.startsWith("# "))}}function er(e){let t=e.split(`
|
|
2
|
+
`).map(c=>c.trim());if(t.length!==5)return;let[n,r,i,o,s]=t;if(!n||!r||!i||!o||!s||!oe.test(o)||!oe.test(s))return;let a=v(n);return{root:a,gitDir:v(se(a,r)),commonDir:v(se(a,i)),headCommit:o,treeOid:s}}function tr(e,t){let n=t.run(e.root,ve);if(n===void 0)return;let r=Te(n);return r?.headCommit!==e.headCommit?void 0:{...Ot(e.root,e.gitDir),commonDir:e.commonDir,repositoryId:Oe("repository",e.commonDir),headCommit:e.headCommit,treeOid:e.treeOid,clean:r.clean}}function nr(e,t){let n=rr(e,t);if(n.kind!=="worktree")return;let r=n.identity,i=r.projectRoot,o=t.run(i,["rev-parse","--git-common-dir"])?.trim();if(!o)return;let s=v(se(i,o)),a=Ie(t.run(i,["rev-parse","--verify","HEAD"])),c=Ie(t.run(i,["rev-parse","--verify","HEAD^{tree}"])),u=t.run(i,ve);if(u===void 0)return;let d=Te(u);if(!(!d||d.headCommit!==a))return{...r,commonDir:s,repositoryId:Oe("repository",s),headCommit:a,treeOid:c,clean:d.clean}}function rr(e,t=T){let n=t.runResult(e,["rev-parse","--show-toplevel"]);if(n.kind==="not-repository")return{kind:"non-git"};if(n.kind==="error")return n;let r=n.output.trim();if(!r)return{kind:"error",message:"Git returned an empty worktree root."};let i=v(r),o=t.run(i,["rev-parse","--absolute-git-dir"])?.trim();if(!o)return{kind:"error",message:"Git did not return an absolute worktree directory."};let s=v(se(i,o));return{kind:"worktree",identity:Ot(i,s)}}function Ot(e,t){return{projectRoot:e,gitDir:t,worktreeId:Oe("worktree",`${e}\0${t}`)}}function To(e,t,n=T){return Ie(n.run(e,t))}function se(e,t){return Yn(t)?t:ae(e,t)}function v(e){try{return Vn(e)}catch{return ae(e)}}function Oe(e,t){return Un("sha256").update(`${e}\0${t}`).digest("hex").slice(0,24)}function Ie(e){return e?.trim()||void 0}function Tt(e,t){let n=$n("git",["-C",e,...t],{encoding:"utf-8",env:{...process.env,LC_ALL:"C"},maxBuffer:52428800,stdio:["ignore","pipe","pipe"],timeout:3e4,killSignal:"SIGKILL"});if(n.status===0)return{kind:"success",output:n.stdout.trimEnd()};let i=(typeof n.stderr=="string"?n.stderr.trim():"")||n.error?.message||`git exited with status ${n.status??"unknown"}`,o=n.error?.code;return(/not a git repository/i.test(i)||o==="ENOENT"&&qn(ae(e)))&&!ir(e)?{kind:"not-repository"}:{kind:"error",message:i}}function ir(e){if(process.env.GIT_DIR||process.env.GIT_COMMON_DIR)return!0;let t=ae(e);for(;;){try{return Jn(Xn(t,".git")),!0}catch(r){let i=r.code;if(i!=="ENOENT"&&i!=="ENOTDIR")return!0}let n=Kn(t);if(n===t)return!1;t=n}}import{createRequire as ar}from"module";import{existsSync as cr,lstatSync as Lt,readdirSync as ur,statSync as pr}from"fs";import l from"path";import{AsyncLocalStorage as or}from"async_hooks";var sr=new or;function L(e,t){let n=ce(e);if(!n||n.missing.has(t))return;let r=n.files.get(t);if(r)return r;let i=n.readBaseFile?.(t);return i&&n.files.set(t,i),i}function D(e,t){let n=ce(e);if(n)return n.missing.has(t)?"missing":n.paths.includes(t)?"present":"missing"}function At(e,t){return ce(e)?.fingerprints.get(t)}function _(e){return ce(e)?.paths}function ce(e){let t=sr.getStore();if(t)return t.projectRoot===v(e)?t:void 0}var dr=ar(import.meta.url),Dt=new Set([".cache",".git",".next",".nuxt",".turbo",".nx","build","coverage","dist","node_modules","tmp","vendor"]),lr=18003;function ue(e,t=[]){let n=l.resolve(e),r=t.flatMap(c=>hr(n,c));if(r.length>0)return _t(n,Mt(r));let i=gr(n),o=Mt(i),s=mr(n,o)?[n,...o]:o,a=s.length>0?s:[n];return _t(n,a)}function Nt(e){return new Set(e.map(t=>t==="."?"tsconfig.json":`${t.replace(/\/$/u,"")}/tsconfig.json`))}function Gt(e){let t=e.split("/").at(-1)?.toLowerCase();return t?.startsWith("tsconfig")===!0&&t.endsWith(".json")}var fr=/^\.scipquery-compiler-shard-\d+\.tsconfig\.json$/;function zo(e){return`.scipquery-compiler-shard-${e}.tsconfig.json`}function Wt(e){return fr.test(e)}function zt(e,t,n=[]){let r;try{r=dr("@ts-morph/common/dist/typescript.js")}catch{return null}let i=l.resolve(e),o=t==="workspace"?ue(i,n):["."],s=new Set;for(let a of o){let c=a==="."?i:l.join(i,a),u=l.join(c,"tsconfig.json"),d=Sr(r,i);if(!d.fileExists(u))return null;let p=r.readConfigFile(u,d.readFile);if(p.error)return null;let f=r.parseJsonConfigFileContent(p.config,d,c);if(f.errors.some(m=>m.code!==lr))return null;for(let m of f.fileNames){let h=l.resolve(m);b(i,h)&&s.add(l.relative(i,h).split(l.sep).join("/"))}}return s}function Ho(e,t,n,r){let i=l.resolve(e),o=new Set(r);for(let a of n){let c=l.resolve(i,a);if(b(i,c))try{let u=Lt(c);if(u.isSymbolicLink()||u.isFile()&&!o.has(B(i,c)))return!1}catch{}}let s=t==="workspace"?ue(i,n):["."];for(let a of s){let c=a==="."?i:l.join(i,a),u=l.join(c,"tsconfig.json");if(!$t(i,u))continue;let d=B(i,u);if(!o.has(d))return!1;try{if(Lt(u).isSymbolicLink())return!1;let p=Ut(i,u);if(p.includes("extends")||p.includes("\\"))return!1}catch{return!1}}return!0}function _t(e,t){return[...new Set(t.map(n=>B(e,n)))].sort((n,r)=>n.localeCompare(r))}function gr(e){let t=_(e);if(t)return t.flatMap(i=>{if(i.split("/").some(s=>Dt.has(s)))return[];let o=l.join(e,...i.split("/"));return Bt(e,o)?[l.dirname(o)]:[]});let n=[],r=[e];for(;r.length>0;){let i=r.pop(),o;try{o=ur(i,{withFileTypes:!0})}catch{continue}for(let s of o){let a=l.join(i,s.name);if(s.isDirectory()){!Dt.has(s.name)&&!s.name.startsWith(".")&&r.push(a);continue}s.isFile()&&Bt(e,a)&&n.push(l.dirname(a))}}return n}function hr(e,t){let n=t.trim();if(!n)return[];let r=l.resolve(e,n);if(!b(e,r))return[];let i=_(e);if(i){let o=B(e,r);if(i.includes(o)&&Ae(l.basename(r)))return[l.dirname(r)];let s=o==="."?"":`${o}/`;return i.some(a=>a.startsWith(s))?[r]:[]}try{let o=pr(r);if(o.isDirectory())return[r];if(o.isFile()&&Ae(l.basename(r)))return[l.dirname(r)]}catch{return[]}return[]}function Bt(e,t){if(!Ae(l.basename(t)))return!1;let n=Ht(e,t);return n?l.basename(t)==="tsconfig.json"||"include"in n||"files"in n||"references"in n:!1}function Ae(e){return e.startsWith("tsconfig")&&e.endsWith(".json")}function Mt(e){let t=[...new Set(e.map(n=>l.resolve(n)))].sort((n,r)=>n.localeCompare(r));return t.length<=1?t:t.filter(n=>!t.some(r=>r!==n&&xr(n,r)))}function mr(e,t){if(t.length===0||t.some(r=>l.resolve(r)===e))return!1;let n=l.join(e,"tsconfig.json");return $t(e,n)&&yr(e,n)}function yr(e,t){let r=Ht(e,t)?.include;return Array.isArray(r)?r.some(i=>typeof i=="string"&&i.trim()!==""&&!i.startsWith("!")&&(i.includes("/")||i.includes("**")||!l.extname(i))):!1}function Ht(e,t){try{let n=JSON.parse(Ut(e,t));return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function $t(e,t){let n=B(e,t),r=D(e,n);return r?r==="present":cr(t)}function Ut(e,t){let n=B(e,t);if(_(e)){let i=L(e,n);if(!i)throw Object.assign(new Error(`Snapshot file ${n} is missing.`),{code:"ENOENT"});return i.content.toString("utf8")}return $(t,"TypeScript project config")}function Sr(e,t){let n=_(t);if(!n)return e.sys;let r=l.resolve(t),i=new Set(n),o=br(r,n),s=e,a=c=>{let u=l.resolve(c);return b(r,u)?B(r,u):null};return{useCaseSensitiveFileNames:e.sys.useCaseSensitiveFileNames,fileExists(c){let u=a(c);return u===null?e.sys.fileExists(c):i.has(u)},readFile(c){let u=a(c);return u===null?e.sys.readFile(c):L(r,u)?.content.toString("utf8")},readDirectory(c,u,d,p,f){let m=l.resolve(c);return b(r,m)?s.matchFiles(m,u,d,p,e.sys.useCaseSensitiveFileNames,r,f,h=>o.get(l.resolve(h))??{files:[],directories:[]},h=>h):e.sys.readDirectory(c,u,d,p,f)}}}function br(e,t){let n=new Map,r=new Map,i=o=>{n.has(o)||n.set(o,new Set),r.has(o)||r.set(o,new Set)};i(e);for(let o of t){let s=o.split("/"),a=e;for(let c=0;c<s.length-1;c+=1){let u=s[c];i(a),r.get(a).add(u),a=l.join(a,u),i(a)}n.get(a).add(s.at(-1))}return new Map([...n].map(([o,s])=>[o,{files:[...s].sort(),directories:[...r.get(o)??[]].sort()}]))}function B(e,t){let n=l.relative(e,t);return n?n.split(l.sep).join("/"):"."}function xr(e,t){let n=l.relative(e,t);return!!n&&!n.startsWith("..")&&!l.isAbsolute(n)}import{createHash as _e}from"crypto";import{execFileSync as qt}from"child_process";import{createRequire as Pr}from"module";var jr=Pr(import.meta.url),Cr=/\.(?:[cm]?[jt]sx?)$/iu,Fr=/\.[jt]sx$/iu,Jt=/(?:^|\/)package\.json$/iu,U,Le=new Map;function Vt(e,t){if(!Be(e))return;let n=kr();if(n)try{let r=typeof t=="string"?t:t.toString("utf8"),i=Fr.test(e)?n.LanguageVariant.JSX:n.LanguageVariant.Standard,o=n.createScanner(n.ScriptTarget.Latest,!1,i,r),s=_e("sha256").update(`typescript-semantic-v1\0${i}\0`),a=!1,c=!1;for(;;){let u=o.scan();if(u===n.SyntaxKind.EndOfFileToken)break;if(u===n.SyntaxKind.WhitespaceTrivia)continue;if(u===n.SyntaxKind.NewLineTrivia){a&&(c=!0);continue}c&&s.update("line-break\0");let d=o.getTokenText();s.update(`${u}\0${Buffer.byteLength(d)}\0`).update(d).update("\0"),a=!0,c=!1}return s.digest("hex")}catch{return}}function Be(e){return Cr.test(e)}function Me(e,t){if(Jt.test(e))try{let n=JSON.parse(typeof t=="string"?t:t.toString("utf8"));if(typeof n!="object"||n===null||Array.isArray(n))return;let{scripts:r,...i}=n;return _e("sha256").update("typescript-package-json-v1\0").update(De(i)).digest("hex")}catch{return}}function Ne(e){return Jt.test(e)}function Vo(e,t,n){if(!Ne(t)||!/^[a-f0-9]{64}$/u.test(n))return;let r=`${e}\0${t}\0${n}`;if(Le.has(r))return Le.get(r);let i;try{let o=qt("git",["-C",e,"log","--all","--format=%H","--max-count=64","--",t],{encoding:"utf8",maxBuffer:1048576,timeout:5e3}).split(/\r?\n/u).filter(Boolean);for(let s of o){let a=qt("git",["-C",e,"show",`${s}:${t}`],{encoding:null,maxBuffer:4194304,timeout:5e3});if(_e("sha256").update(a).digest("hex")===n){i=Me(t,a);break}}}catch{i=void 0}return Le.set(r,i),i}function kr(){if(U!==void 0)return U;try{U=jr("typescript")}catch{U=null}return U}function De(e){return Array.isArray(e)?`[${e.map(De).join(",")}]`:typeof e=="object"&&e!==null?`{${Object.entries(e).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>`${JSON.stringify(t)}:${De(n)}`).join(",")}}`:JSON.stringify(e)}import{createHash as en,randomUUID as Lr}from"crypto";import{chmodSync as tn,existsSync as M,linkSync as Dr,lstatSync as ge,readdirSync as ze,realpathSync as C,unlinkSync as _r,writeSync as Br}from"fs";import{homedir as Mr}from"os";import{basename as Nr,dirname as he,isAbsolute as Qt,join as y,resolve as me}from"path";import{closeSync as wr,existsSync as Rr,fsyncSync as Er,mkdirSync as Ir,openSync as vr}from"fs";import{dirname as Kt}from"path";function pe(e,t,n,r){let i=0;for(;i<t.length;){let o=n.writeFile(e,t,i,t.length-i);if(!Number.isSafeInteger(o)||o<=0||o>t.length-i)throw new Error(`${r} write did not make valid forward progress`);i+=o}}function Ge(e,t){if(t!=="win32")return!1;let n=e.code;return n==="EACCES"||n==="EBADF"||n==="EINVAL"||n==="EISDIR"||n==="EPERM"}var q=Object.freeze({platform:process.platform,pathExists:e=>Rr(e),makeDirectory:e=>Ir(e,{recursive:!0}),openFile:(e,t,n)=>vr(e,t,n),syncFile:e=>Er(e),closeFile:e=>wr(e)});function Yt(e,t=q){let n=[],r=e;for(;!t.pathExists(r);){n.push(r);let o=Kt(r);if(o===r)throw new Error(`Cannot establish a durable directory path without an existing ancestor: ${e}`);r=o}let i="synced";for(let o of n.reverse())t.makeDirectory(o),i=le(i,de(Kt(o),t));return i}function de(e,t=q){let n;try{n=t.openFile(e,"r")}catch(r){if(Ge(r,t.platform))return"unsupported";throw r}try{t.syncFile(n)}catch(r){try{t.closeFile(n)}catch{}if(Ge(r,t.platform))return"unsupported";throw r}return t.closeFile(n),"synced"}function le(...e){return e.every(t=>t==="not-requested")?"not-requested":e.includes("unsupported")?"unsupported":"synced"}import{createRequire as Tr}from"module";var Or=Tr(import.meta.url),Xt=Ar().version;function Ar(){for(let e of["../package.json","../../package.json"])try{return Or(e)}catch{}return{version:"0.0.0"}}var nn=1,V=".scip-query-cache-owner.json",Gr=16*1024,rn=Object.freeze({...q,randomToken:()=>Lr(),linkFile:(e,t)=>Dr(e,t),removeFile:e=>_r(e),writeFile:(e,t,n,r)=>Br(e,t,n,r)});function fe(e,t){return Object.assign(new Error(`refusing unsafe project dbPath ${JSON.stringify(e)} (${t}); use a repository-relative directory that remains inside the checkout`),{name:"UnsafeCachePathError",code:"SCIP_QUERY_UNSAFE_CACHE_PATH",configuredPath:e,reason:t})}function F(e,t){return Object.assign(new Error(`refusing unowned cache directory ${JSON.stringify(e)} (${t}); move unrelated data elsewhere or choose a new empty dbPath`),{name:"CacheOwnershipError",code:"SCIP_QUERY_CACHE_OWNERSHIP",cacheDir:e,reason:t})}function Wr(e,t){let n=C(e);return Hr(n,He(n,t))}function He(e,t){let n=C(e),r=process.env.SCIP_QUERY_CACHE_DIR;return r?me(r):t?.dbPath?Ur(n,t.dbPath):zr(n)}function on(){let e=process.env.XDG_CACHE_HOME;return y(e||y(Mr(),".cache"),"scip-query")}function zr(e){let t=me(e);try{t=C(t)}catch{}let n=en("sha256").update(t).digest("hex").slice(0,12);return y(on(),"projects",n)}function ls(e){if(!/^[a-f0-9]{24}$/.test(e))throw new Error(`invalid repository cache identity: ${e}`);let t=y(on(),"repositories",e);return cn(t),C(t)}function fs(e){return process.env.SCIP_QUERY_SHARED_CACHE!=="0"&&!process.env.SCIP_QUERY_CACHE_DIR&&!process.env.SCIP_QUERY_INDEX_DB&&!e?.dbPath}function gs(e,t){let n=Wr(e,t);return{cacheDir:n,dbPath:y(n,"index.db"),indexPath:y(n,"index.scip"),metaPath:y(n,"meta.json")}}function Hr(e,t,n=rn){return $r(e,t,n).cacheDir}function $r(e,t,n=rn){let r=C(e),i=M(t)?"synced":cn(t,n),o=C(t),s=y(o,V);if(M(s))return We(r,o),$e(s),J(o),{kind:"existing",cacheDir:o};Zt(o),Yr(o),Zt(o);let c=`${JSON.stringify({schemaVersion:nn,canonicalProjectRoot:r,canonicalCacheDir:o,creatorVersion:Xt},null,2)}
|
|
3
|
+
`;try{let u=Xr(s,c,n),d=le(i,u);return{kind:"published",cacheDir:o,achievedDurability:d==="synced"?"directory-durable":"file-flushed",directorySync:d}}catch(u){if(Zr(u))return We(r,o),{kind:"existing",cacheDir:o};throw u}}function We(e,t){let n=C(e),r=C(t);return Jr(r,n,r)}function hs(e,t){return M(y(t,V))?(We(e,t),sn(t),!0):!1}function Ur(e,t){let n;try{n=w(t)}catch(s){throw s instanceof g?fe(t,s.reason):s}let r=me(e,...n.split("/"));if(r===e||!b(e,r))throw fe(t,"outside-project");let i=qr(r),o=C(i);if(!b(e,o)&&o!==e)throw fe(t,"symlink-escape");return r}function qr(e){let t=e;for(;!M(t);){let n=he(t);if(n===t)throw fe(e,"no-existing-ancestor");t=n}return t}function Jr(e,t,n){let r=y(e,V);if(!M(r)||ge(r).isSymbolicLink())throw F(e,"missing regular ownership record");let i=ge(r);if(!i.isFile()||i.size>Gr)throw F(e,"invalid ownership record file");let o=$(r,"cache ownership record"),s=Vr(o,e);if(t!==void 0&&s.canonicalProjectRoot!==t)throw F(e,"ownership record belongs to a different project");if(s.canonicalCacheDir!==n)throw F(e,"ownership record names a different cache directory");return{record:s,ownerSha256:en("sha256").update(o).digest("hex"),physicalCacheDir:e}}function Vr(e,t){try{let n=JSON.parse(e);if(n.schemaVersion!==nn||typeof n.canonicalProjectRoot!="string"||typeof n.canonicalCacheDir!="string"||typeof n.creatorVersion!="string"||!Qt(n.canonicalProjectRoot)||!Qt(n.canonicalCacheDir))throw new Error("invalid fields");return n}catch(n){throw F(t,`malformed ownership record: ${n instanceof Error?n.message:String(n)}`)}}function Zt(e){let t=ze(e).filter(n=>n!==V&&!Kr(n));if(t.length>0)throw F(e,`unrecognized existing entries: ${t.slice(0,3).join(", ")}`)}function Kr(e){return e.startsWith(`${V}.tmp-`)||e.startsWith("git-worktree-context.json.tmp-")||[".scipquery-generations","affected-shadow-latest.json","affected-shadow.jsonl","agent-hooks","augment-vue-meta.json","cache-lifecycle.lock","evidence.db","evidence.db-shm","evidence.db-wal","health-report-cache.json","git-worktree-context.json","index.db","index.db-shm","index.db-wal","index.lock","index.scip","language-indexes","meta.json","reindex-activity.jsonl","shared-cache.json","typescript-index","typescript-scip-fragments","typescript-scip-overlays","typescript-semantic","typescript-shard-costs.json","watch-activity.json","watch-refresh-requests","watch-state.json","watch.lock"].includes(e)?!0:/^(?:reindex-|rust-|typescript-)/.test(e)}function Yr(e){for(let t of ze(e)){let n=y(e,t);try{let r=ge(n);if(r.isSymbolicLink())throw F(e,`legacy cache entry ${t} is a symlink`);if(r.isDirectory())J(n);else if(r.isFile())$e(n);else throw F(e,`legacy cache entry ${t} is not a file or directory`)}catch(r){if(an(r))continue;throw r}}J(e)}function sn(e,t=!1){try{let n=ge(e);if(n.isSymbolicLink())throw F(e,"managed cache tree contains a symlink");if(n.isFile()){$e(e);return}if(!n.isDirectory())throw F(e,"managed cache tree contains a special file");J(e);for(let r of ze(e))sn(y(e,r),!0)}catch(n){if(t&&an(n))return;throw n}}function an(e){let t=e?.code;return t==="ENOENT"||t==="ENOTDIR"}function cn(e,t=q){let n=Yt(e,t);return J(e),n}function Xr(e,t,n){let r=`${e}.tmp-${process.pid}-${n.randomToken()}`,i,o=!1;try{i=n.openFile(r,"wx",384),o=!0,pe(i,Buffer.from(t),n,"cache ownership record"),n.syncFile(i),n.closeFile(i),i=void 0,n.linkFile(r,e);let s=de(he(e),n);return n.removeFile(r),o=!1,le(s,de(he(e),n))}finally{if(i!==void 0)try{n.closeFile(i)}catch{}if(o)try{n.removeFile(r)}catch{}}}function J(e){process.platform!=="win32"&&tn(e,448)}function $e(e){process.platform!=="win32"&&tn(e,384)}function Qr(e){if(M(e))return C(e);let t=C(he(e));return y(t,Nr(e))}function ms(e){return Qr(me(e))}function Zr(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}import{execFileSync as hi}from"child_process";import{isUtf8 as hn}from"buffer";import{createHash as Ye}from"crypto";import{closeSync as Sn,fstatSync as K,lstatSync as Qe,openSync as bn,readdirSync as mi,readFileSync as yi,readSync as mn,readlinkSync as Si,realpathSync as X}from"fs";import{isAbsolute as bi,join as Ze,relative as xi,resolve as Pi,sep as ji}from"path";import{closeSync as un,existsSync as qe,openSync as ei,realpathSync as ti,renameSync as ni,unlinkSync as pn,writeSync as ri}from"fs";import{dirname as ii,join as oi}from"path";var si="fingerprint-stat-cache.json",dn=1,ai=8*1024*1024,Ue=new Map;function Je(e,t,n,r){let i=ln(e),o=i.files.get(t);if(!(!o||!fn(o,n,r)))return i.hits+=1,{hash:o.hash,size:o.fingerprintSize,...o.semanticHash===void 0?{}:{semanticHash:o.semanticHash}}}function Ve(e,t,n,r,i){if(i.hash==="unreadable"||i.size<0||!Number.isFinite(i.size))return;let o=ln(e),s={kind:n,dev:r.dev,ino:r.ino,mtimeMs:r.mtimeMs,ctimeMs:r.ctimeMs,size:r.size,hash:i.hash,fingerprintSize:i.size,...i.semanticHash===void 0?{}:{semanticHash:i.semanticHash}},a=o.files.get(t);a&&fi(a,s)||(o.files.set(t,s),o.stores+=1,o.dirty=!0)}function Ke(e){let t=Ue.get(gn(e));if(!(!t?.dirty||!t.cachePath))try{let n=ii(t.cachePath);if(!qe(n))return;gi(t.cachePath,pi(t)),t.dirty=!1}catch{}}function ln(e){let t=gn(e),n=Ue.get(t);if(n)return n;let r=ci(t),i=ui(r),o={cachePath:r,files:i,dirty:!1,hits:0,stores:0};return Ue.set(t,o),o}function ci(e){try{let t=He(e);return qe(t)?oi(t,si):null}catch{return null}}function ui(e){let t=new Map;if(!e||!qe(e))return t;try{let n=JSON.parse(re(e,{inputKind:"fingerprint stat cache",maxBytes:ai}).toString("utf8"));if(!di(n))return t;for(let[r,i]of Object.entries(n.files))i&&t.set(r,i)}catch{return t}return t}function pi(e){return{version:dn,files:Object.fromEntries(e.files)}}function di(e){if(typeof e!="object"||e===null)return!1;let t=e;return t.version!==dn||typeof t.files!="object"||t.files===null?!1:Object.values(t.files).every(li)}function li(e){if(typeof e!="object"||e===null)return!1;let t=e;return(t.kind==="file"||t.kind==="symlink")&&Number.isFinite(t.dev)&&Number.isFinite(t.ino)&&Number.isFinite(t.mtimeMs)&&Number.isFinite(t.ctimeMs)&&Number.isFinite(t.size)&&Number.isFinite(t.fingerprintSize)&&typeof t.hash=="string"&&t.hash!=="unreadable"&&(t.semanticHash===void 0||typeof t.semanticHash=="string")}function fn(e,t,n){return e.kind===t&&e.dev===n.dev&&e.ino===n.ino&&e.mtimeMs===n.mtimeMs&&e.ctimeMs===n.ctimeMs&&e.size===n.size}function fi(e,t){return fn(e,t.kind,t)&&e.hash===t.hash&&e.fingerprintSize===t.fingerprintSize&&e.semanticHash===t.semanticHash}function gi(e,t){let n=`${e}.${process.pid}.tmp`;try{pn(n)}catch{}let r=Buffer.from(`${JSON.stringify(t)}
|
|
4
|
+
`,"utf8"),i=ei(n,"wx",384);try{pe(i,r,{writeFile:(o,s,a,c)=>ri(o,s,a,c)},"fingerprint stat cache")}catch(o){throw un(i),pn(n),o}un(i),ni(n,e)}function gn(e){return ti(e)}var Q=64*1024*1024,Ci=1024*1024,Fi=1024,N=class extends Error{constructor(n,r,i,o){super(`${n} ${JSON.stringify(r)} is ${i} bytes; the safety limit is ${o} bytes`);this.inputKind=n;this.inputPath=r;this.observedBytes=i;this.limitBytes=o;this.name="InputTooLargeError"}inputKind;inputPath;observedBytes;limitBytes;code="SCIP_QUERY_INPUT_TOO_LARGE"};function ki(e){return[...new Set((e??[]).map(t=>t.trim()).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function et(e,t,n={}){let r=w(t),i=kt(e,()=>X(e)),o=Pi(i,...r.split("/"));if(!b(i,o)||o===i)throw new g(t,"outside-project");let s=X(o);if(!b(i,s)||s===i)throw new g(t,"outside-project");let a=Qe(s);if(!a.isFile())throw new g(t,"not-a-file");let c={projectRoot:i,relativePath:r,absolutePath:s,size:a.size,mtimeMs:a.mtimeMs,device:a.dev,inode:a.ino},u=n.maxBytes??Q;if(A(u),c.size>u)throw new N(n.inputKind??"project file",c.relativePath,c.size,u);return c}function wi(e,t,n={}){let r=w(t),i=D(e,r);if(i){if(i==="missing")throw Object.assign(new Error(`Snapshot project file ${JSON.stringify(r)} does not exist.`),{code:"ENOENT"});let c=L(e,r);if(!c)throw new g(r,"changed-during-read");let u=n.maxBytes??Q;if(A(u),c.size>u)throw new N(n.inputKind??"project file",r,c.size,u);return Buffer.from(c.content)}let o=et(e,t,n),s=n.maxBytes??Q,a=bn(o.absolutePath,"r");try{let c=K(a);if(Y(c,o,t),c.size>s)throw new N(n.inputKind??"project file",o.relativePath,c.size,s);let u=yi(a),d=K(a);if(Y(d,o,t),u.byteLength!==c.size)throw new g(t,"changed-during-read");return u}finally{Sn(a)}}function Bs(e,t,n,r={}){if(n.byteLength===0)throw new Error("Project file probe literal must not be empty.");let{matchedLiteralIndexes:i,...o}=Ri(e,t,[n],r);return{...o,includesLiteral:i.length>0}}function Ri(e,t,n,r={}){if(n.length===0||n.some(c=>c.byteLength===0))throw new Error("Project file probe literals must not be empty.");let i=w(t),o=D(e,i);if(o){if(o==="missing")throw Object.assign(new Error(`Snapshot project file ${JSON.stringify(i)} does not exist.`),{code:"ENOENT"});let c=L(e,i);if(!c)throw new g(i,"changed-during-read");let u=r.maxBytes??Q;if(A(u),c.size>u)throw new N(r.inputKind??"project file",i,c.size,u);let d=!c.content.includes(0)&&hn(c.content),p=n.map(yn),f=d?Ii(c.content,n,p):[];return{byteLength:c.size,isUtf8Text:d,matchedLiteralIndexes:f,bytes:f.length>0?Buffer.from(c.content):null,...r.computeSha256?{sha256:c.sha256}:{}}}let s=et(e,t,r),a=bn(s.absolutePath,"r");try{let c=K(a);Y(c,s,t);let u=r.computeSha256?Ye("sha256"):null,d=r.scratchBuffer??Buffer.allocUnsafe(Ci);if(d.byteLength===0)throw new Error("Project file probe scratch buffer must not be empty.");let p=0,f=n.map(()=>!1),m=!1,h=!0,x=Buffer.alloc(0),Z=n.map(()=>Buffer.alloc(0)),G=n.map(yn);for(;p<c.size;){let P=mn(a,d,0,Math.min(d.byteLength,c.size-p),p);if(P<=0)throw new g(t,"changed-during-read");let j=d.subarray(0,P);if(u?.update(j),m||=j.includes(0),h){let S=x.byteLength>0?Buffer.concat([x,j]):j,H=Ei(S);h=hn(S.subarray(0,H)),x=Buffer.from(S.subarray(H))}for(let S=0;S<n.length;S+=1){if(f[S])continue;let H=n[S],rt=Z[S];f[S]=vi(j,H,rt,G[S]),Z[S]=Ti(j,H,rt)}p+=P}h&&=x.byteLength===0,Y(K(a),s,t);let W=!m&&h,z=W?f.flatMap((P,j)=>P?[j]:[]):[],k=null;if(z.length>0){k=Buffer.allocUnsafe(c.size);let P=0;for(;P<k.byteLength;){let j=mn(a,k,P,k.byteLength-P,P);if(j<=0)throw new g(t,"changed-during-read");P+=j}Y(K(a),s,t)}return{byteLength:c.size,isUtf8Text:W,matchedLiteralIndexes:z,bytes:k,...u?{sha256:u.digest("hex")}:{}}}finally{Sn(a)}}function Ms(e,t,n={}){return wi(e,t,n).toString("utf8")}function Y(e,t,n){if(!e.isFile()||e.dev!==t.device||e.ino!==t.inode||e.size!==t.size)throw new g(n,"changed-during-read")}function Ei(e){if(e.byteLength===0)return 0;let t=e.byteLength-1,n=0;for(;t>=0&&n<3&&(e[t]&192)===128;)n+=1,t-=1;if(t<0)return e.byteLength;let r=e[t];return((r&128)===0?1:(r&224)===192?2:(r&240)===224?3:(r&248)===240?4:0)>e.byteLength-t?t:e.byteLength}function Ii(e,t,n){return t.flatMap((r,i)=>Xe(e,r,n[i])?[i]:[])}function vi(e,t,n,r){if(Xe(e,t,r))return!0;if(n.byteLength===0||t.byteLength===1)return!1;let i=e.subarray(0,Math.min(e.byteLength,t.byteLength-1));return Xe(Buffer.concat([n,i]),t,r)}function Xe(e,t,n){if(n<0)return e.includes(t);let r=t[n],i=e.indexOf(r),o=0;for(;i>=0;){if(o+=1,o>Fi)return e.includes(t);let s=i-n;if(s>=0&&s+t.byteLength<=e.byteLength&&e.compare(t,0,t.byteLength,s,s+t.byteLength)===0)return!0;i=e.indexOf(r,i+1)}return!1}function yn(e){for(let n=1;n<e.byteLength;n+=1){let r=e[n];if(r>=65&&r<=90)return n}let t=e[0];return t>=65&&t<=90?0:-1}function Ti(e,t,n){let r=t.byteLength-1;if(r===0)return Buffer.alloc(0);if(e.byteLength>=r)return Buffer.from(e.subarray(e.byteLength-r));let i=Buffer.concat([n,e]);return Buffer.from(i.subarray(Math.max(0,i.byteLength-r)))}function tt(e){return typeof e=="object"&&e!==null&&"code"in e&&(e.code==="ENOENT"||e.code==="ENOTDIR")}function Ns(e,t){try{return et(e,t),!0}catch(n){if(tt(n))return!1;throw n}}function Oi(e){let t=_(e);return t?t.filter(n=>n&&!Se(n)).sort():(Mi(e)??Ni(e)).filter(n=>n&&!Se(n)).sort()}function Ai(e,t={}){let n=(t.includePaths??[]).map(w),r=[...new Set([...Oi(e),...n])].filter(s=>!Se(s)).filter(s=>!t.language||pt(s,t.language,t.markerFiles)).filter(s=>!t.includePath||t.includePath(s)).sort((s,a)=>s.localeCompare(a)),i=X(e),o=r.flatMap(s=>xn(e,i,s));return Ke(i),o}function xn(e,t,n){let r=At(e,n);if(r)return[{path:n,size:r.fingerprintSize??r.size,hash:r.sha256}];if(D(e,n)==="present"){let o=L(e,n);if(o)return[{path:n,size:o.fingerprintSize??o.size,hash:o.sha256}]}let i=Ze(e,n);try{let o=Qe(i);if(o.isSymbolicLink()){let x=Je(t,n,"symlink",ye(o));if(x)return[{path:n,size:x.size,hash:x.hash}];let Z=X(i),G=xi(t,Z);if(G===".."||G.startsWith(`..${ji}`)||bi(G))throw new Error("external symlink");let W=Si(i),z=Ye("sha256").update("symlink\0").update(W).digest("hex"),k=Buffer.byteLength(W);return Ve(t,n,"symlink",ye(o),{hash:z,size:k}),[{path:n,size:k,hash:z}]}let s=Be(n)||Ne(n),a=Je(t,n,"file",ye(o));if(a&&(!s||a.semanticHash!==void 0))return[{path:n,size:a.size,hash:a.hash,...a.semanticHash===void 0?{}:{semanticHash:a.semanticHash}}];let c=Ye("sha256"),u=s,d=[],p=ie(i,{inputKind:"project fingerprint input",maxBytes:Q},x=>{c.update(x),u&&d.push(Buffer.from(x))}),f=c.digest("hex"),m=u?Buffer.concat(d,p):void 0,h=m?Vt(n,m)??Me(n,m):void 0;return Ve(t,n,"file",ye(o),{hash:f,size:p,...h===void 0?{}:{semanticHash:h}}),[{path:n,size:p,hash:f,...h===void 0?{}:{semanticHash:h}}]}catch(o){return tt(o)?[]:[{path:n,size:-1,hash:"unreadable"}]}}function ye(e){return{dev:e.dev,ino:e.ino,mtimeMs:e.mtimeMs,ctimeMs:e.ctimeMs,size:e.size}}function Pn(e,t,n){let r=nt(t,n),i=[...r.typescriptProjects.filter(c=>_i(e,c)),...r.clojureConfigPath?[r.clojureConfigPath]:[]],o=r.languages.includes("typescript")?zt(e,r.typescriptProjectMode,r.typescriptProjects):null,s=r.languages.includes("typescript")?r.typescriptProjectMode==="workspace"?ue(e,r.typescriptProjects):["."]:[],a=Nt(s);return{...r,files:Ai(e,{includePath:c=>{if(c===".scipquery.json")return!1;let u=te(c,t,i);return u==="other"||u==="config"&&Gt(c)&&!a.has(c)?!1:u!=="source"||!Di(c)||!o?!0:o.has(c)},includePaths:i})}}function Gs(e,t){let n=new Set(t.files.map(o=>o.path)),r=Pn(e,t.languages,t),i=new Map(r.files.map(o=>[o.path,o]));return{...nt(t.languages,t),files:[...t.files.flatMap(o=>{let s=i.get(o.path);return s?[s]:[]}),...r.files.filter(o=>!n.has(o.path))]}}function Ws(e,t,n,r,i,o){let s=p=>({mode:"full",fingerprint:Pn(e,t,n),reason:p});if(!i)return s("change-journal-unavailable");if(!i.complete)return s(`change-journal-incomplete:${i.incompleteReason??"unknown"}`);if(!o)return s("accepted-generation-unavailable");if(i.baseGeneration!==o)return s("change-journal-base-mismatch");if(!r)return s("prior-project-input-snapshot-unavailable");let a=nt(t,n);if(!Li(r,a))return s("project-input-configuration-changed");if(new Set(r.files.map(p=>p.path)).size!==r.files.length)return s("prior-project-input-snapshot-has-duplicate-paths");if(i.entries.length===0)return{mode:"delta",fingerprint:{...a,files:[...r.files].sort((p,f)=>p.path.localeCompare(f.path))},changedPaths:[]};let c=[...a.typescriptProjects,...a.clojureConfigPath?[a.clojureConfigPath]:[]],u=new Map(r.files.map(p=>[p.path,p]));for(let p of i.entries){let f=u.get(p.path);if(te(p.path,t,c)!=="source")return s("non-source-project-input-changed");if(p.kind==="add"&&f)return s("added-path-already-in-prior-project-input-snapshot");if(p.kind==="delete"&&!f)return s("deleted-path-not-in-prior-project-input-snapshot");if(p.kind==="change"&&!f)return s("changed-path-not-in-prior-project-input-snapshot");if(f&&(f.hash==="unreadable"||f.size<0))return s("changed-path-was-unreadable")}let d=X(e);for(let p of i.entries){let f=xn(e,d,p.path);if(p.kind==="delete"){if(f.length!==0)return s("deleted-source-is-still-readable");u.delete(p.path);continue}if(f.length!==1||f[0].hash==="unreadable"||f[0].size<0)return s(p.kind==="add"?"added-source-is-not-readable":"changed-source-no-longer-readable");u.set(p.path,f[0])}return Ke(d),{mode:"delta",fingerprint:{...a,files:[...u.values()].sort((p,f)=>p.path.localeCompare(f.path))},changedPaths:i.entries.map(p=>p.path).sort()}}function Li(e,t){return e.version===t.version&&JSON.stringify([...e.languages].sort())===JSON.stringify(t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&JSON.stringify([...e.typescriptProjects].sort())===JSON.stringify(t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function Di(e){return/\.(?:[cm]?[jt]sx?|vue)$/iu.test(e)}function _i(e,t){let n;try{n=w(t)}catch{return!1}let r=D(e,n);if(r)return r==="present";try{return Qe(Ze(e,n)).isFile()}catch(i){if(tt(i))return!1;throw i}}function nt(e,t){return{version:3,languages:[...e].sort(),pnpmWorkspaces:t.typescriptProjectMode!=="workspace"&&t.pnpmWorkspaces===!0,typescriptProjectMode:t.typescriptProjectMode??"single",typescriptProjects:ki(t.typescriptProjects),clojureConfigPath:Bi(t.clojureConfigPath)}}function Bi(e){return e?.trim()||void 0}function Mi(e){try{let t=Rt(e,52428800,()=>hi("git",["-C",e,"ls-files","-co","-v","-z","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:104857600,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"}));return[...It(t)]}catch{return null}}function Ni(e){let t=[],n=[""];for(;n.length>0;){let r=n.pop(),i=r?Ze(e,r):e,o;try{o=mi(i,{withFileTypes:!0})}catch{continue}for(let s of o){let a=r?`${r}/${s.name}`:s.name;if(s.isDirectory()){Se(a)||n.push(a);continue}t.push(a)}}return t}function Se(e){let t=e.split("/");return e==="meta.json"||Wt(e)||t[0]===".scipquery"&&(t[1]==="events"||t[1]==="ledger"||t[1]==="releases"||t[1]==="suppressions")||t.some(n=>Gi.has(n))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var Gi=new Set([".git","node_modules",".scipquery-cache",".scipquery-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);export{g as a,be as b,zi as c,Hi as d,b as e,w as f,te as g,pt as h,Ui as i,ot as j,qi as k,Ji as l,kn as m,R as n,mt as o,Ki as p,Yi as q,Xi as r,Qi as s,Zi as t,eo as u,yt as v,O as w,ao as x,co as y,uo as z,En as A,po as B,bt as C,xt as D,Bn as E,Mn as F,E as G,re as H,we as I,$ as J,Nn as K,Gn as L,Wn as M,ie as N,zn as O,pe as P,Ge as Q,q as R,Yt as S,de as T,le as U,Rt as V,It as W,T as X,Ro as Y,Eo as Z,Io as _,vo as $,To as aa,se as ba,v as ca,ue as da,Nt as ea,Gt as fa,zo as ga,Wt as ha,zt as ia,Ho as ja,Vo as ka,Xt as la,He as ma,on as na,zr as oa,ls as pa,fs as qa,gs as ra,hs as sa,ms as ta,N as ua,ki as va,et as wa,wi as xa,Bs as ya,Ri as za,Ms as Aa,tt as Ba,Ns as Ca,Oi as Da,Ai as Ea,Pn as Fa,Gs as Ga,Ws as Ha,nt as Ia};
|
|
5
|
+
//# sourceMappingURL=chunk-N5B2NILC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as r}from"./chunk-N5B2NILC.js";function _(t){switch(t){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}function a(t){let s=r(t);return i(s)?"test":n(s)?"worker":u(s)?"entry":f(s)?"barrel":"source"}function i(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function n(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function u(t){let s=t.split("/"),e=s[s.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:s.length<=2:!1}function f(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}export{_ as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-NJITK2GP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{r as p}from"./chunk-RTQ7NEKG.js";import{f as o,h as d,j as s,k as c}from"./chunk-FGA2U4OR.js";import{c as a}from"./chunk-H5EXS3HM.js";import{join as S}from"path";var u=3,b=2,x="typescript-semantic";function R(n){let e=S(n,x),t=d(e);return{...t,requestDir:t.legacyRequestDir}}function q(n){let e=JSON.parse(n),t=e.protocolVersion,r=t===b;if(!r&&t!==u||typeof e.id!="string"||typeof e.generation!="string"||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||e.profileEnvironment!==void 0&&!a(e.profileEnvironment)||!e.request||!g(e.request)||!r&&(e.mailboxVersion!==o||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==c(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript semantic service received an invalid mailbox request.");if(!r){let i=e,y=s("typescript-semantic-v3",{generation:i.generation,profileEnvironment:i.profileEnvironment,request:i.request});if(i.operationKey!==y)throw new Error("TypeScript semantic service received a mismatched mailbox operation identity.");return i}let m=s("typescript-semantic-v2",{id:e.id,generation:e.generation,request:e.request});return{protocolVersion:u,mailboxVersion:o,id:e.id,operationKey:m,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,generation:e.generation,...e.profileEnvironment?{profileEnvironment:e.profileEnvironment}:{},request:e.request}}function g(n){if(!n||typeof n!="object"||!("kind"in n))return!1;let e=n;switch(e.kind){case"availability":return!0;case"import-usage":return typeof e.file=="string";case"reference-fragments":return p(e.files)!==null;case"references":return l(e.definitions)&&(e.exact===void 0||typeof e.exact=="boolean");case"callees":return l(e.definitions);case"signature":return f(e.definition);default:return!1}}function l(n){return Array.isArray(n)&&n.every(f)}function f(n){if(!n||typeof n!="object")return!1;let e=n;return typeof e.symbolId=="number"&&typeof e.documentId=="number"&&typeof e.symbol=="string"&&typeof e.relativePath=="string"&&typeof e.leaf=="string"&&typeof e.startLine=="number"&&typeof e.endLine=="number"}export{u as a,R as b,q as c};
|
|
2
|
+
//# sourceMappingURL=chunk-NOGJXYFO.js.map
|