scip-query 0.6.3 → 0.6.5

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.
Files changed (196) hide show
  1. package/README.md +31 -29
  2. package/dist/augment-vue-worker.js +2 -0
  3. package/dist/chunk-2ZGHRI2A.js +5 -0
  4. package/dist/chunk-32R4VYYA.js +2 -0
  5. package/dist/chunk-3UB2DPLP.js +2 -0
  6. package/dist/chunk-4X7C236P.js +84 -0
  7. package/dist/chunk-5LQ6CVX3.js +2 -0
  8. package/dist/chunk-5YYMKE3G.js +70 -0
  9. package/dist/chunk-7LSCW7NF.js +6 -0
  10. package/dist/chunk-7X7FLQC5.js +2 -0
  11. package/dist/chunk-A5UNS4DR.js +4 -0
  12. package/dist/chunk-BNCTPTVX.js +2 -0
  13. package/dist/{chunk-TRBNQ273.js → chunk-C5BFS23M.js} +2 -2
  14. package/dist/{chunk-DM56ECPZ.js → chunk-DRLWW74T.js} +2 -2
  15. package/dist/chunk-EB5IVUNU.js +2 -0
  16. package/dist/{chunk-TPOYTT6O.js → chunk-ERRUE5G4.js} +4 -4
  17. package/dist/chunk-F4KR22Z2.js +2 -0
  18. package/dist/chunk-FG6A6ZUP.js +2 -0
  19. package/dist/chunk-FHSD5RKF.js +19 -0
  20. package/dist/chunk-FVVEIGP3.js +5 -0
  21. package/dist/chunk-GBDZY73J.js +2 -0
  22. package/dist/{chunk-4TYGGOLO.js → chunk-H4DXD2FB.js} +1 -1
  23. package/dist/chunk-HUASU3AD.js +71 -0
  24. package/dist/chunk-IJWIYZO5.js +2 -0
  25. package/dist/chunk-K6H3XJQW.js +7 -0
  26. package/dist/{chunk-KYT47WU2.js → chunk-KAM4C6ZD.js} +1 -1
  27. package/dist/{chunk-56LPZC3S.js → chunk-KTCODJNQ.js} +3 -3
  28. package/dist/chunk-LJ2YWNQF.js +2 -0
  29. package/dist/chunk-LT2CPEQ4.js +2 -0
  30. package/dist/chunk-M5QTG55L.js +2 -0
  31. package/dist/chunk-MKFH7QJG.js +7 -0
  32. package/dist/chunk-MO32JMOD.js +12 -0
  33. package/dist/chunk-MO65UK5V.js +6 -0
  34. package/dist/chunk-MTK3JAJT.js +2 -0
  35. package/dist/{chunk-6TRXTRCW.js → chunk-MXWC53GJ.js} +4 -4
  36. package/dist/{chunk-HLILTI7S.js → chunk-OQZF2DQJ.js} +3 -3
  37. package/dist/chunk-PBFMZKXE.js +6 -0
  38. package/dist/{chunk-MMKNCPHB.js → chunk-PFMGJ4BR.js} +4 -4
  39. package/dist/{chunk-5KWWENJZ.js → chunk-PK4U6NWP.js} +2 -2
  40. package/dist/{chunk-CH47OLNL.js → chunk-Q2ALKKSE.js} +4 -4
  41. package/dist/chunk-QFCK6WV2.js +39 -0
  42. package/dist/chunk-QFZE73XF.js +84 -0
  43. package/dist/chunk-QRYEOK3M.js +2 -0
  44. package/dist/{chunk-LORWXBOO.js → chunk-RKTDEIHF.js} +1 -1
  45. package/dist/chunk-ROWAEEOD.js +2 -0
  46. package/dist/chunk-RT5PV5JQ.js +7 -0
  47. package/dist/chunk-TLRA5TR6.js +2 -0
  48. package/dist/chunk-U5MVUPOO.js +2 -0
  49. package/dist/chunk-URUVLDM7.js +29 -0
  50. package/dist/chunk-WHGCGENP.js +16 -0
  51. package/dist/chunk-WIIZF5FP.js +2 -0
  52. package/dist/chunk-WNMAH3P7.js +2 -0
  53. package/dist/chunk-XV3XUZ3X.js +11 -0
  54. package/dist/chunk-YDKWDTAW.js +2 -0
  55. package/dist/{chunk-IUNRL2AQ.js → chunk-YDNCX5PF.js} +2 -2
  56. package/dist/chunk-YU25IHJX.js +90 -0
  57. package/dist/{chunk-VZE4SOJG.js → chunk-Z5CTXSWT.js} +3 -3
  58. package/dist/chunk-ZFCQQ4B5.js +2 -0
  59. package/dist/chunk-ZHHMG4UC.js +114 -0
  60. package/dist/cli.js +487 -388
  61. package/dist/{db-DKhNQ75l.d.ts → db-BZPa7dzJ.d.ts} +19 -9
  62. package/dist/index.d.ts +221 -13
  63. package/dist/index.js +45 -31
  64. package/dist/postinstall.js +1 -1
  65. package/dist/queries/affected.d.ts +1 -1
  66. package/dist/queries/affected.js +1 -1
  67. package/dist/queries/bottlenecks.d.ts +1 -1
  68. package/dist/queries/bottlenecks.js +1 -1
  69. package/dist/queries/by-kind.d.ts +1 -1
  70. package/dist/queries/by-kind.js +1 -1
  71. package/dist/queries/call-graph.d.ts +1 -1
  72. package/dist/queries/call-graph.js +1 -1
  73. package/dist/queries/change-surface.d.ts +1 -1
  74. package/dist/queries/change-surface.js +1 -1
  75. package/dist/queries/code.d.ts +1 -1
  76. package/dist/queries/code.js +1 -1
  77. package/dist/queries/complexity-hotspots.d.ts +1 -1
  78. package/dist/queries/complexity-hotspots.js +1 -1
  79. package/dist/queries/complexity.d.ts +1 -1
  80. package/dist/queries/complexity.js +1 -1
  81. package/dist/queries/convergence.d.ts +1 -1
  82. package/dist/queries/convergence.js +1 -1
  83. package/dist/queries/coupling.d.ts +1 -1
  84. package/dist/queries/coupling.js +1 -1
  85. package/dist/queries/cycles.d.ts +1 -1
  86. package/dist/queries/cycles.js +1 -1
  87. package/dist/queries/dataflow.d.ts +1 -1
  88. package/dist/queries/dataflow.js +1 -1
  89. package/dist/queries/dead.d.ts +1 -1
  90. package/dist/queries/dead.js +1 -1
  91. package/dist/queries/deep-chains.d.ts +1 -1
  92. package/dist/queries/deep-chains.js +1 -1
  93. package/dist/queries/deps.d.ts +1 -1
  94. package/dist/queries/deps.js +1 -1
  95. package/dist/queries/diff-impact.d.ts +1 -1
  96. package/dist/queries/diff-impact.js +1 -1
  97. package/dist/queries/drift-policy.d.ts +6 -0
  98. package/dist/queries/drift-policy.js +2 -0
  99. package/dist/queries/drift.d.ts +1 -1
  100. package/dist/queries/drift.js +1 -1
  101. package/dist/queries/extract-candidates.d.ts +1 -1
  102. package/dist/queries/extract-candidates.js +1 -1
  103. package/dist/queries/fan.d.ts +1 -1
  104. package/dist/queries/fan.js +1 -1
  105. package/dist/queries/files.d.ts +1 -1
  106. package/dist/queries/files.js +1 -1
  107. package/dist/queries/health.d.ts +1 -1
  108. package/dist/queries/health.js +1 -1
  109. package/dist/queries/hierarchy.d.ts +1 -1
  110. package/dist/queries/hierarchy.js +1 -1
  111. package/dist/queries/hotspots.d.ts +1 -1
  112. package/dist/queries/hotspots.js +1 -1
  113. package/dist/queries/imports.d.ts +1 -1
  114. package/dist/queries/imports.js +1 -1
  115. package/dist/queries/index.d.ts +1 -1
  116. package/dist/queries/index.js +1 -1
  117. package/dist/queries/isolated.d.ts +1 -1
  118. package/dist/queries/isolated.js +1 -1
  119. package/dist/queries/members.d.ts +1 -1
  120. package/dist/queries/members.js +1 -1
  121. package/dist/queries/methods.d.ts +1 -1
  122. package/dist/queries/methods.js +1 -1
  123. package/dist/queries/outline.d.ts +1 -1
  124. package/dist/queries/outline.js +1 -1
  125. package/dist/queries/passthrough-candidates.d.ts +1 -1
  126. package/dist/queries/passthrough-candidates.js +1 -1
  127. package/dist/queries/redundant-reexports.d.ts +1 -1
  128. package/dist/queries/redundant-reexports.js +1 -1
  129. package/dist/queries/refs.d.ts +1 -1
  130. package/dist/queries/refs.js +1 -1
  131. package/dist/queries/similar-chains.d.ts +1 -1
  132. package/dist/queries/similar-chains.js +1 -1
  133. package/dist/queries/similar-files.d.ts +1 -1
  134. package/dist/queries/similar-files.js +1 -1
  135. package/dist/queries/similar-signatures.d.ts +1 -1
  136. package/dist/queries/similar-signatures.js +1 -1
  137. package/dist/queries/similar.d.ts +1 -1
  138. package/dist/queries/similar.js +1 -1
  139. package/dist/queries/slice.d.ts +1 -1
  140. package/dist/queries/slice.js +1 -1
  141. package/dist/queries/stale-abstractions.d.ts +1 -1
  142. package/dist/queries/stale-abstractions.js +1 -1
  143. package/dist/queries/stats.d.ts +1 -1
  144. package/dist/queries/stats.js +1 -1
  145. package/dist/queries/surface.d.ts +1 -1
  146. package/dist/queries/surface.js +1 -1
  147. package/dist/queries/symbols.d.ts +1 -1
  148. package/dist/queries/symbols.js +1 -1
  149. package/dist/queries/system.d.ts +1 -1
  150. package/dist/queries/system.js +1 -1
  151. package/dist/queries/trace.d.ts +1 -1
  152. package/dist/queries/trace.js +1 -1
  153. package/dist/queries/wrapper-candidates.d.ts +1 -1
  154. package/dist/queries/wrapper-candidates.js +1 -1
  155. package/dist/reindex-worker.js +10 -63
  156. package/package.json +4 -2
  157. package/dist/chunk-2OXZVIED.js +0 -41
  158. package/dist/chunk-5IM4IQ6N.js +0 -2
  159. package/dist/chunk-5OV6CUTY.js +0 -2
  160. package/dist/chunk-6QXYWGE5.js +0 -10
  161. package/dist/chunk-C6PQLWHR.js +0 -7
  162. package/dist/chunk-DX5YEUX4.js +0 -6
  163. package/dist/chunk-DXXROCSQ.js +0 -19
  164. package/dist/chunk-EARGTC7U.js +0 -12
  165. package/dist/chunk-EJXPKSWV.js +0 -29
  166. package/dist/chunk-EUHHVFTI.js +0 -2
  167. package/dist/chunk-F2TGKDMW.js +0 -2
  168. package/dist/chunk-GSVIC6KN.js +0 -2
  169. package/dist/chunk-H4IWC7KJ.js +0 -89
  170. package/dist/chunk-H7BWAMFI.js +0 -4
  171. package/dist/chunk-HUEIPY4M.js +0 -5
  172. package/dist/chunk-ID7TO4P6.js +0 -65
  173. package/dist/chunk-J22I2FWD.js +0 -6
  174. package/dist/chunk-KOGVTPGE.js +0 -7
  175. package/dist/chunk-LUYN4IWJ.js +0 -2
  176. package/dist/chunk-MDUIJELV.js +0 -39
  177. package/dist/chunk-MSNW2AR2.js +0 -2
  178. package/dist/chunk-N3Z2SJCR.js +0 -2
  179. package/dist/chunk-NB3GIT4Z.js +0 -7
  180. package/dist/chunk-OBPP5RRE.js +0 -2
  181. package/dist/chunk-ORBQ3HJD.js +0 -2
  182. package/dist/chunk-P6IUCZA3.js +0 -24
  183. package/dist/chunk-Q2MCCKWZ.js +0 -2
  184. package/dist/chunk-QRULHDMO.js +0 -84
  185. package/dist/chunk-RAJHIEBM.js +0 -70
  186. package/dist/chunk-RKZBRDFK.js +0 -2
  187. package/dist/chunk-RPRIZ43D.js +0 -2
  188. package/dist/chunk-RXGCTLHY.js +0 -2
  189. package/dist/chunk-S6IGA6KK.js +0 -2
  190. package/dist/chunk-TVJMEDHH.js +0 -2
  191. package/dist/chunk-UDKLKBPQ.js +0 -2
  192. package/dist/chunk-UGUBEKK5.js +0 -2
  193. package/dist/chunk-VKYLXCV6.js +0 -2
  194. package/dist/chunk-VQXXSUQF.js +0 -8
  195. package/dist/chunk-VZHI3TUX.js +0 -6
  196. package/dist/chunk-YSEQFGGH.js +0 -2
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import"./chunk-FVH3Y44U.js";import{a as zn}from"./chunk-EJXPKSWV.js";import{a as Wn}from"./chunk-5OV6CUTY.js";import{a as qn}from"./chunk-6TRXTRCW.js";import{a as Un}from"./chunk-H7BWAMFI.js";import{a as Vn}from"./chunk-KOGVTPGE.js";import{a as xr}from"./chunk-VKYLXCV6.js";import{a as yr}from"./chunk-DM56ECPZ.js";import{a as Fr}from"./chunk-RKZBRDFK.js";import{a as Dr}from"./chunk-RPRIZ43D.js";import{a as Kn,b as Qn,c as Yn}from"./chunk-MDUIJELV.js";import{a as er}from"./chunk-EUHHVFTI.js";import{a as Bn}from"./chunk-GSVIC6KN.js";import{a as Zn}from"./chunk-UDKLKBPQ.js";import{a as Tr}from"./chunk-RAJHIEBM.js";import{a as Ir}from"./chunk-P6IUCZA3.js";import{a as tr,b as nr,c as rr,d as ir}from"./chunk-MMKNCPHB.js";import{a as Mn}from"./chunk-KYT47WU2.js";import{a as Pr}from"./chunk-LUYN4IWJ.js";import{a as kr}from"./chunk-NB3GIT4Z.js";import{a as fr,b as hr}from"./chunk-J22I2FWD.js";import"./chunk-LORWXBOO.js";import{a as Er}from"./chunk-HUEIPY4M.js";import{a as $n}from"./chunk-N3Z2SJCR.js";import{a as cr}from"./chunk-MSNW2AR2.js";import{a as Cr}from"./chunk-ORBQ3HJD.js";import{a as wr}from"./chunk-DXXROCSQ.js";import{a as br}from"./chunk-TVJMEDHH.js";import{a as dr}from"./chunk-HLILTI7S.js";import{a as Xn}from"./chunk-VZE4SOJG.js";import{a as _r}from"./chunk-C6PQLWHR.js";import{a as Lr}from"./chunk-S6IGA6KK.js";import{a as sr,b as or}from"./chunk-CH47OLNL.js";import{a as ar}from"./chunk-YSEQFGGH.js";import{a as Nr}from"./chunk-TRBNQ273.js";import{a as Jn}from"./chunk-EARGTC7U.js";import"./chunk-F2TGKDMW.js";import{a as pr}from"./chunk-IUNRL2AQ.js";import{a as Hn,b as Gn}from"./chunk-TPOYTT6O.js";import{a as Sr}from"./chunk-RXGCTLHY.js";import{a as lr}from"./chunk-2OXZVIED.js";import{a as ur,b as gr}from"./chunk-UGUBEKK5.js";import{a as mr}from"./chunk-OBPP5RRE.js";import{a as vr}from"./chunk-6QXYWGE5.js";import{a as jr}from"./chunk-VZHI3TUX.js";import"./chunk-DX5YEUX4.js";import{a as Rr}from"./chunk-Q2MCCKWZ.js";import"./chunk-5KWWENJZ.js";import{a as ae,b as le}from"./chunk-56LPZC3S.js";import"./chunk-ID7TO4P6.js";import"./chunk-VQXXSUQF.js";import"./chunk-H4IWC7KJ.js";import"./chunk-QRULHDMO.js";import{a as He,b as Ge,c as qe}from"./chunk-5IM4IQ6N.js";import ze from"better-sqlite3";import{statSync as ce}from"fs";var U=class{db;config;pathFilter;constructor(t,r){this.config=t,this.pathFilter=r??null,this.db=new ze(t.dbPath,{readonly:!0}),this.db.pragma("busy_timeout = 5000")}isIgnored(t){return this.pathFilter?.isIgnored(t)??!1}get localSymbolPredicate(){return`(
1
+ import"./chunk-FVH3Y44U.js";import{a as Ai}from"./chunk-URUVLDM7.js";import{a as Li}from"./chunk-GBDZY73J.js";import{a as _i}from"./chunk-MXWC53GJ.js";import{a as Ni}from"./chunk-A5UNS4DR.js";import{a as Ps}from"./chunk-5YYMKE3G.js";import{a as Fi}from"./chunk-RT5PV5JQ.js";import{a as cs}from"./chunk-YDKWDTAW.js";import{a as us}from"./chunk-DRLWW74T.js";import{a as ws}from"./chunk-5LQ6CVX3.js";import{a as ks}from"./chunk-BNCTPTVX.js";import{a as $i}from"./chunk-Z5CTXSWT.js";import{a as Bi,b as Wi,c as Ui}from"./chunk-QFCK6WV2.js";import{a as Gi}from"./chunk-F4KR22Z2.js";import{a as Di}from"./chunk-ZFCQQ4B5.js";import{a as Hi}from"./chunk-TLRA5TR6.js";import{a as ps}from"./chunk-WHGCGENP.js";import{a as qi,b as Ji,c as zi,d as Xi}from"./chunk-PFMGJ4BR.js";import{a as Ti}from"./chunk-KAM4C6ZD.js";import{a as xs}from"./chunk-FG6A6ZUP.js";import{a as Oi}from"./chunk-QRYEOK3M.js";import{a as ms}from"./chunk-K6H3XJQW.js";import{a as os,b as as}from"./chunk-PBFMZKXE.js";import"./chunk-RKTDEIHF.js";import{a as bs}from"./chunk-FVVEIGP3.js";import{a as es}from"./chunk-MTK3JAJT.js";import{a as hs}from"./chunk-3UB2DPLP.js";import{a as fs}from"./chunk-FHSD5RKF.js";import"./chunk-LJ2YWNQF.js";import{a as ls}from"./chunk-IJWIYZO5.js";import{a as is}from"./chunk-OQZF2DQJ.js";import{a as Rs}from"./chunk-MKFH7QJG.js";import{a as Ss}from"./chunk-U5MVUPOO.js";import{a as Ki,b as Qi}from"./chunk-Q2ALKKSE.js";import{a as Yi}from"./chunk-EB5IVUNU.js";import{a as Is}from"./chunk-C5BFS23M.js";import{a as Vi}from"./chunk-MO32JMOD.js";import{a as rs}from"./chunk-YDNCX5PF.js";import{a as ji,b as Mi}from"./chunk-ERRUE5G4.js";import{a as gs}from"./chunk-M5QTG55L.js";import{a as Zi}from"./chunk-ROWAEEOD.js";import{a as ts,b as ns}from"./chunk-7X7FLQC5.js";import{a as ss}from"./chunk-LT2CPEQ4.js";import{a as ds}from"./chunk-XV3XUZ3X.js";import{a as vs}from"./chunk-7LSCW7NF.js";import"./chunk-MO65UK5V.js";import{a as ys}from"./chunk-WNMAH3P7.js";import{a as rt}from"./chunk-32R4VYYA.js";import"./chunk-PK4U6NWP.js";import"./chunk-WIIZF5FP.js";import{a as ge,b as de}from"./chunk-KTCODJNQ.js";import"./chunk-4X7C236P.js";import"./chunk-2ZGHRI2A.js";import"./chunk-YU25IHJX.js";import"./chunk-ZHHMG4UC.js";import{n as et,o as tt,p as nt}from"./chunk-QFZE73XF.js";import it from"better-sqlite3";var H=class{db;config;pathFilter;constructor(t,n){this.config=t,this.pathFilter=n??null,this.db=new it(t.dbPath,{readonly:!0}),this.db.pragma("busy_timeout = 5000")}isIgnored(t){return this.pathFilter?.isIgnored(t)??!1}get localSymbolPredicate(){return`(
2
2
  EXISTS (
3
3
  SELECT 1
4
4
  FROM defn_enclosing_ranges local_der
@@ -15,8 +15,8 @@ import"./chunk-FVH3Y44U.js";import{a as zn}from"./chunk-EJXPKSWV.js";import{a as
15
15
  AND local_m.role = 1
16
16
  ${this.pathExclusionsFor("local_d").trimStart()}
17
17
  )
18
- )`}get pathExclusions(){return this.pathExclusionsFor("d")}get symbolNoise(){return this.symbolNoiseFor("gs")}pathExclusionsFor(...t){return t.flatMap(r=>[`AND ${r}.relative_path NOT LIKE 'node_modules/%'`,`AND ${r}.relative_path NOT LIKE '.git/%'`]).join(`
19
- `)}symbolNoiseFor(t){return`AND ${t}.symbol NOT LIKE '%().(%' AND ${t}.symbol NOT LIKE '%typeLiteral%'`}all(t,...r){return this.db.prepare(t).all(...r)}get(t,...r){return this.db.prepare(t).get(...r)}sizeBytes(){try{return ce(this.config.dbPath).size}catch{return 0}}lastModified(){try{return ce(this.config.dbPath).mtime}catch{return null}}close(){this.db.close()}};import Je from"ignore";import{readFileSync as Xe,existsSync as H}from"fs";import{dirname as G,isAbsolute as ue,join as q,relative as Ke,resolve as Qe}from"path";function C(e){let t=Je(),r=!1,n=Ye(e);for(let i of n)try{let s=Xe(i,"utf-8");t.add(s),r=!0}catch{}return r||t.add(Ze),{isIgnored:i=>ge(t,e,i),filter:i=>i.filter(s=>!ge(t,e,s))}}function Ye(e){let t=[],r=q(e,".gitignore");H(r)&&t.push(r);let n=G(e),i=0;for(;n!==G(n)&&i<5;){let s=q(n,".gitignore");if(H(s)&&t.push(s),H(q(n,".git")))break;n=G(n),i++}return t}var Ze=`
18
+ )`}get pathExclusions(){return this.pathExclusionsFor("d")}get symbolNoise(){return this.symbolNoiseFor("gs")}pathExclusionsFor(...t){return t.flatMap(n=>[`AND ${n}.relative_path NOT LIKE 'node_modules/%'`,`AND ${n}.relative_path NOT LIKE '.git/%'`]).join(`
19
+ `)}symbolNoiseFor(t){return`AND ${t}.symbol NOT LIKE '%().(%' AND ${t}.symbol NOT LIKE '%typeLiteral%'`}all(t,...n){return this.db.prepare(t).all(...n)}get(t,...n){return this.db.prepare(t).get(...n)}close(){this.db.close()}};import st from"ignore";import{readFileSync as ot,existsSync as G}from"fs";import{dirname as q,isAbsolute as pe,join as J,relative as at,resolve as ut}from"path";function I(e){let t=st(),n=!1,r=ct(e);for(let i of r)try{let s=ot(i,"utf-8");t.add(s),n=!0}catch{}return n||t.add(lt),{isIgnored:i=>fe(t,e,i),filter:i=>i.filter(s=>!fe(t,e,s))}}function ct(e){let t=[],n=J(e,".gitignore");G(n)&&t.push(n);let r=q(e),i=0;for(;r!==q(r)&&i<5;){let s=J(r,".gitignore");if(G(s)&&t.push(s),G(J(r,".git")))break;r=q(r),i++}return t}var lt=`
20
20
  # Dependencies
21
21
  node_modules/
22
22
  vendor/
@@ -73,11 +73,24 @@ Thumbs.db
73
73
 
74
74
  # Type definitions (often noise in queries)
75
75
  *.d.ts
76
- `;function ge(e,t,r){let n=et(t,r);if(!n)return!1;try{return e.ignores(n)}catch{return!1}}function et(e,t){if(!t||t===".")return null;if(!ue(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let r=ue(t)?t:Qe(e,t),n=Ke(e,r).replaceAll("\\","/");return!n||n==="."||n.startsWith("..")?null:n}import{execFileSync as je}from"child_process";import{existsSync as _e,renameSync as Ne,rmSync as ln}from"fs";import{basename as cn,dirname as un,extname as gn,join as W}from"path";import{execFileSync as E}from"child_process";import{platform as L,arch as tt}from"os";var pe=L()==="win32",de="v0.7.0";function P(e){let t=pe?"where":"which";try{return E(t,[e],{stdio:"pipe"}),!0}catch{return!1}}function nt(){try{return E(pe?"where":"which",["scip"],{stdio:"pipe"}),!0}catch{return!1}}function rt(){try{return E("scip",["--version"],{stdio:"pipe"}).toString().trim()}catch{return null}}function it(){let e=L(),t=tt(),r,n,i;switch(e){case"darwin":r="darwin",i="tar.gz";break;case"linux":r="linux",i="tar.gz";break;case"win32":r="windows",i="zip";break;default:return null}switch(t){case"arm64":n="arm64";break;case"x64":n="amd64";break;default:return null}let s=`scip-${r}-${n}.${i}`;return{url:`https://github.com/sourcegraph/scip/releases/download/${de}/${s}`,filename:s}}function st(){let e=it();console.log("\nThe `scip` CLI is required but not found on PATH.\n"),L()==="darwin"?(console.log("Install via Homebrew:"),console.log(` brew install sourcegraph/scip/scip
76
+ `;function fe(e,t,n){let r=gt(t,n);if(!r)return!1;try{return e.ignores(r)}catch{return!1}}function gt(e,t){if(!t||t===".")return null;if(!pe(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let n=pe(t)?t:ut(e,t),r=at(e,n).replaceAll("\\","/");return!r||r==="."||r.startsWith("..")?null:r}import{execFile as kr,execFileSync as Pr}from"child_process";import{closeSync as wr,existsSync as y,mkdirSync as Ue,mkdtempSync as Cr,openSync as Er,readFileSync as Or,renameSync as v,rmSync as R,writeFileSync as He}from"fs";import{cpus as Tr}from"os";import{basename as W,dirname as b,extname as Lr,join as p}from"path";import{execFileSync as k}from"child_process";import{platform as O,arch as dt}from"os";var me=O()==="win32",he="v0.7.0";function E(e){let t=me?"where":"which";try{return k(t,[e],{stdio:"pipe"}),!0}catch{return!1}}function pt(){try{return k(me?"where":"which",["scip"],{stdio:"pipe"}),!0}catch{return!1}}function ft(){try{return k("scip",["--version"],{stdio:"pipe"}).toString().trim()}catch{return null}}function mt(){let e=O(),t=dt(),n,r,i;switch(e){case"darwin":n="darwin",i="tar.gz";break;case"linux":n="linux",i="tar.gz";break;case"win32":n="windows",i="zip";break;default:return null}switch(t){case"arm64":r="arm64";break;case"x64":r="amd64";break;default:return null}let s=`scip-${n}-${r}.${i}`;return{url:`https://github.com/sourcegraph/scip/releases/download/${he}/${s}`,filename:s}}function ht(){let e=mt();console.log("\nThe `scip` CLI is required but not found on PATH.\n"),O()==="darwin"?(console.log("Install via Homebrew:"),console.log(` brew install sourcegraph/scip/scip
77
77
  `),console.log("Or download manually:")):console.log("Download from:"),console.log(e?` ${e.url}
78
- `:` https://github.com/sourcegraph/scip/releases/tag/${de}
79
- `),console.log("After installing, ensure `scip` is on your PATH and run `scip-query reindex`.")}function j(e){if(L()==="darwin"&&P("brew")){e("Installing scip CLI via Homebrew...");try{if(E("brew",["install","sourcegraph/scip/scip"],{stdio:"inherit",timeout:3e5,env:process.env}),P("scip"))return e("Successfully installed scip CLI via Homebrew"),!0}catch(t){let r=t instanceof Error?t.message:String(t);e(`Homebrew install failed: ${r}`)}}if(P("go")){e("Installing scip CLI via go install...");try{if(E("go",["install","github.com/sourcegraph/scip/cmd/scip@latest"],{stdio:"inherit",timeout:3e5,env:process.env}),P("scip"))return e("Successfully installed scip CLI via go install"),!0}catch(t){let r=t instanceof Error?t.message:String(t);e(`go install failed: ${r}`)}}return e("Could not auto-install scip CLI."),e("Install manually from: https://github.com/sourcegraph/scip/releases"),!1}import ot from"better-sqlite3";import{existsSync as at,readdirSync as lt,readFileSync as ct}from"fs";import{extname as z,join as me}from"path";function w(e){let t=new Set((e.extensions??ae).map(s=>s.toLowerCase()));if(t.size===0)return{scanned:0,inserted:0,existing:0};if(!at(e.dbPath))throw new Error(`SCIP SQLite database not found at ${e.dbPath}`);let r=C(e.projectRoot),n=ut(e.projectRoot,t).filter(s=>!r.isIgnored(s)),i=new ot(e.dbPath);try{let s=n.length===0?new Set:new Set(i.prepare(`SELECT relative_path FROM documents WHERE relative_path IN (${n.map(()=>"?").join(",")})`).all(...n).map(d=>d.relative_path)),a=i.prepare(`INSERT OR IGNORE INTO documents (language, relative_path, position_encoding, text)
80
- VALUES (?, ?, NULL, ?)`),o=i.transaction(d=>{let g=0;for(let p of d){if(s.has(p))continue;let y=ct(me(e.projectRoot,p),"utf-8"),l=a.run(gt(p),p,y);g+=Number(l.changes)}return g})(n),u={scanned:n.length,inserted:o,existing:n.length-o};return e.onStatus?.(`Augmented SQLite documents with ${o} auxiliary source file${o===1?"":"s"} (${u.existing} already present).`),u}finally{i.close()}}function ut(e,t){let r=[],n=i=>{let s=i?me(e,i):e,a=[];try{a=lt(s,{withFileTypes:!0})}catch{return}for(let c of a){if(le.has(c.name))continue;let o=i?`${i}/${c.name}`:c.name;if(c.isDirectory()){n(o);continue}t.has(z(c.name).toLowerCase())&&r.push(o)}};return n(""),r.sort()}function gt(e){return z(e).toLowerCase()===".vue"?"vue":z(e).replace(/^\./,"").toLowerCase()||"source"}import{existsSync as pt,readdirSync as he}from"fs";import{extname as dt,join as ye}from"path";var mt=new Set([".git",".hg",".svn",".idea",".vscode","node_modules","vendor","dist","build","target","bin","obj",".dart_tool",".gradle",".next",".venv","venv","__pycache__"]),ft=[{language:"typescript",files:["tsconfig.json","tsconfig.base.json"],extensions:[".ts",".tsx",".mts",".cts"]},{language:"rust",files:["Cargo.toml"],extensions:[".rs"]},{language:"go",files:["go.mod"],extensions:[".go"]},{language:"java",files:["pom.xml","build.gradle","build.gradle.kts"],extensions:[".java"]},{language:"kotlin",files:["build.gradle.kts"],extensions:[".kt",".kts"]},{language:"scala",files:["build.sbt"],extensions:[".scala"]},{language:"python",files:["pyproject.toml","setup.py","setup.cfg","Pipfile"],extensions:[".py",".pyi"]},{language:"ruby",files:["Gemfile"],extensions:[".rb"]},{language:"cpp",files:["compile_commands.json","CMakeLists.txt","Makefile"],extensions:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"]},{language:"c",files:["compile_commands.json","CMakeLists.txt","Makefile"],extensions:[".c",".h"]},{language:"csharp",globs:["*.csproj","*.sln"],extensions:[".cs"]},{language:"vb",globs:["*.vbproj"],extensions:[".vb"]},{language:"dart",files:["pubspec.yaml"],extensions:[".dart"]},{language:"php",files:["composer.json"],extensions:[".php"]},{language:"javascript",files:["package.json"],extensions:[".js",".jsx",".mjs",".cjs"]}];function _(e){let t=[],r=ht(e),n=St(e);for(let i of ft){if(yt(e,i.files)){t.push(i.language);continue}if(xt(r,i.globs)){t.push(i.language);continue}vt(n,i.extensions)&&t.push(i.language)}return t.includes("typescript")&&fe(t,"javascript"),t.includes("cpp")&&!n.has(".c")&&fe(t,"c"),t}function ht(e){try{return he(e)}catch{return[]}}function yt(e,t){return t?.length?t.some(r=>pt(ye(e,r))):!1}function xt(e,t){return t?.length?e.some(r=>t.some(n=>bt(r,n))):!1}function bt(e,t){if(t==="*")return!0;if(!t.includes("*"))return e===t;let[r,n]=t.split("*");return e.startsWith(r??"")&&e.endsWith(n??"")}function St(e){let t=new Set,r=[e];for(;r.length>0;){let n=r.pop();if(!n)continue;let i;try{i=he(n,{withFileTypes:!0})}catch{continue}for(let s of i){if(s.name.startsWith(".")&&!s.name.endsWith("proj")&&!s.name.endsWith("sln")&&s.isDirectory())continue;let a=ye(n,s.name);if(s.isDirectory()){mt.has(s.name)||r.push(a);continue}let c=dt(s.name).toLowerCase();c&&t.add(c)}}return t}function vt(e,t){return t?.length?t.some(r=>e.has(r)):!1}function fe(e,t){let r=e.indexOf(t);r!==-1&&e.splice(r,1)}import{existsSync as xe,readdirSync as It}from"fs";import{join as J}from"path";var X={typescript:{language:"typescript",indexerBinary:"scip-typescript",checkCommand:"npx scip-typescript --version",indexArgs:({outputPath:e,pnpmWorkspaces:t})=>{let r=["scip-typescript","index","--infer-tsconfig","--output",e,"--no-progress-bar"];return t&&r.splice(2,0,"--pnpm-workspaces"),{binary:"npx",args:r}},markerFiles:["tsconfig.json"],installMethods:[{label:"npm",prerequisite:"npm",binary:"npm",args:["install","-g","@sourcegraph/scip-typescript"]}],installUrl:"https://github.com/sourcegraph/scip-typescript",bundledNpmPackage:"@sourcegraph/scip-typescript"},javascript:{language:"javascript",indexerBinary:"scip-typescript",checkCommand:"npx scip-typescript --version",indexArgs:({outputPath:e})=>({binary:"npx",args:["scip-typescript","index","--infer-tsconfig","--output",e,"--no-progress-bar"]}),markerFiles:["package.json"],installMethods:[{label:"npm",prerequisite:"npm",binary:"npm",args:["install","-g","@sourcegraph/scip-typescript"]}],installUrl:"https://github.com/sourcegraph/scip-typescript",bundledNpmPackage:"@sourcegraph/scip-typescript"},java:{language:"java",indexerBinary:"scip-java",checkCommand:"scip-java --version",indexArgs:({outputPath:e})=>({binary:"scip-java",args:["index","--output",e]}),markerFiles:["pom.xml","build.gradle"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-java/releases"},scala:{language:"scala",indexerBinary:"scip-java",checkCommand:"scip-java --version",indexArgs:({outputPath:e})=>({binary:"scip-java",args:["index","--output",e]}),markerFiles:["build.sbt"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-java/releases"},kotlin:{language:"kotlin",indexerBinary:"scip-java",checkCommand:"scip-java --version",indexArgs:({outputPath:e})=>({binary:"scip-java",args:["index","--output",e]}),markerFiles:["build.gradle.kts"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-java/releases"},rust:{language:"rust",indexerBinary:"rust-analyzer",checkCommand:"rust-analyzer --version",indexArgs:({outputPath:e})=>({binary:"rust-analyzer",args:["scip",".","--output",e]}),markerFiles:["Cargo.toml"],installMethods:[{label:"rustup",prerequisite:"rustup",binary:"rustup",args:["component","add","rust-analyzer"]}],installUrl:"https://github.com/rust-lang/rust-analyzer"},python:{language:"python",indexerBinary:"scip-python",binaryAliases:["scip-python-plus"],checkCommand:"npx scip-python --version",indexArgs:({outputPath:e})=>({binary:"npx",args:["scip-python","index","--output",e,"--project-name","project"]}),markerFiles:["pyproject.toml","setup.py"],installMethods:[{label:"npm",prerequisite:"npm",binary:"npm",args:["install","-g","scip-python-plus"]}],installUrl:"https://github.com/PlunderStruck/scip-python",bundledNpmPackage:"scip-python-plus"},ruby:{language:"ruby",indexerBinary:"scip-ruby",checkCommand:"scip-ruby --version",indexArgs:({indexerBinary:e})=>({binary:e,args:["--dir","."]}),defaultOutputPath:"index.scip",markerFiles:["Gemfile"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-ruby/releases"},go:{language:"go",indexerBinary:"scip-go",checkCommand:"scip-go --version",indexArgs:({outputPath:e})=>({binary:"scip-go",args:["--output",e]}),markerFiles:["go.mod"],installMethods:[{label:"go install",prerequisite:"go",binary:"go",args:["install","github.com/sourcegraph/scip-go@latest"]}],installUrl:"https://github.com/sourcegraph/scip-go"},cpp:{language:"cpp",indexerBinary:"scip-clang",checkCommand:"scip-clang --version",indexArgs:({outputPath:e})=>({binary:"scip-clang",args:["--compdb-path","compile_commands.json","--index-output-path",e]}),markerFiles:["CMakeLists.txt","Makefile"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-clang/releases"},c:{language:"c",indexerBinary:"scip-clang",checkCommand:"scip-clang --version",indexArgs:({outputPath:e})=>({binary:"scip-clang",args:["--compdb-path","compile_commands.json","--index-output-path",e]}),markerFiles:["CMakeLists.txt","Makefile"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-clang/releases"},csharp:{language:"csharp",indexerBinary:"scip-dotnet",checkCommand:"scip-dotnet --version",indexArgs:({projectRoot:e,outputPath:t})=>({binary:"scip-dotnet",args:["index",be(e,[".sln",".csproj"])??e,"--output",t,"--working-directory",e]}),markerFiles:["*.csproj","*.sln"],installMethods:[{label:"dotnet",prerequisite:"dotnet",binary:"dotnet",args:["tool","install","--global","scip-dotnet"]}],installUrl:"https://github.com/sourcegraph/scip-dotnet/releases"},vb:{language:"vb",indexerBinary:"scip-dotnet",checkCommand:"scip-dotnet --version",indexArgs:({projectRoot:e,outputPath:t})=>({binary:"scip-dotnet",args:["index",be(e,[".sln",".vbproj"])??e,"--output",t,"--working-directory",e]}),markerFiles:["*.vbproj","*.sln"],installMethods:[{label:"dotnet",prerequisite:"dotnet",binary:"dotnet",args:["tool","install","--global","scip-dotnet"]}],installUrl:"https://github.com/sourcegraph/scip-dotnet/releases"},dart:{language:"dart",indexerBinary:"scip-dart",checkCommand:"scip-dart --version",indexArgs:({indexerBinary:e,outputPath:t})=>({binary:e,args:["--output",t]}),markerFiles:["pubspec.yaml"],installMethods:[{label:"dart pub",prerequisite:"dart",binary:"dart",args:["pub","global","activate","scip_dart"]}],installUrl:"https://github.com/Workiva/scip-dart/releases"},php:{language:"php",indexerBinary:"scip-php",projectLocalBinaries:["vendor/davidrjenni/scip-php/bin/scip-php","vendor/bin/scip-php"],checkCommand:"scip-php --version",indexArgs:({projectRoot:e,indexerBinary:t})=>{let r=J(e,"vendor","bin","scip-php"),n=J(e,"vendor","davidrjenni","scip-php","bin","scip-php");return{binary:"php",args:["-d","error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED",xe(n)?n:xe(r)?r:t]}},defaultOutputPath:"index.scip",markerFiles:["composer.json"],installMethods:[],installUrl:"https://github.com/davidrjenni/scip-php/releases"}};function N(e){return X[e]}function be(e,t){let r;try{r=It(e)}catch{return null}for(let n of r)if(t.some(i=>n.endsWith(i)))return J(e,n);return null}import{readFileSync as wt,writeFileSync as kt}from"fs";import{create as K}from"@bufbuild/protobuf";import{deserializeSCIP as Ct,serializeSCIP as Et,DocumentSchema as Rt,IndexSchema as Pt,SymbolInformationSchema as Lt}from"@c4312/scip";function Q(e){if(e.length===0)throw new Error("Cannot merge zero SCIP indexes");if(e.length===1)return e[0];let t=jt(e),r=_t(e.flatMap(i=>i.documents??[])),n=Se(e.flatMap(i=>i.externalSymbols??[]));return K(Pt,{metadata:t,documents:r,externalSymbols:n})}function D(e,t){if(e.length===0)throw new Error("Cannot merge zero SCIP files");let r=e.map(i=>Ct(wt(i))),n=Q(r);return kt(t,Buffer.from(Et(n))),{documentCount:n.documents.length,externalSymbolCount:n.externalSymbols.length,inputCount:e.length}}function jt(e){let t=e[0]?.metadata;if(!t)return;let r=t.projectRoot;for(let n of e.slice(1)){let i=n.metadata?.projectRoot;if(r&&i&&i!==r)throw new Error(`Cannot merge SCIP indexes with different project roots: ${r} vs ${i}`)}return t}function _t(e){let t=new Map;for(let r of e){let n=t.get(r.relativePath);if(!n){t.set(r.relativePath,r);continue}t.set(r.relativePath,K(Rt,{language:n.language||r.language,relativePath:n.relativePath||r.relativePath,occurrences:[...n.occurrences,...r.occurrences],symbols:Se([...n.symbols,...r.symbols]),text:Dt(n.text,r.text),positionEncoding:n.positionEncoding||r.positionEncoding}))}return[...t.values()]}function Se(e){let t=new Map;for(let r of e){let n=t.get(r.symbol);if(!n){t.set(r.symbol,r);continue}t.set(r.symbol,K(Lt,{symbol:n.symbol,documentation:Tt([...n.documentation,...r.documentation]),relationships:Nt([...n.relationships,...r.relationships]),kind:n.kind||r.kind,displayName:n.displayName||r.displayName,enclosingSymbol:n.enclosingSymbol||r.enclosingSymbol,signatureDocumentation:n.signatureDocumentation??r.signatureDocumentation}))}return[...t.values()]}function Nt(e){let t=new Set,r=[];for(let n of e){let i=[n.symbol,n.isReference?"1":"0",n.isImplementation?"1":"0",n.isTypeDefinition?"1":"0",n.isDefinition?"1":"0"].join("|");t.has(i)||(t.add(i),r.push(n))}return r}function Dt(e,t){return e?t?e.length>=t.length?e:t:e:t}function Tt(e){return[...new Set(e)]}import{execFileSync as T}from"child_process";import{existsSync as Y}from"fs";import{createRequire as Ft}from"module";import{platform as ve}from"os";import{join as Ie}from"path";var Ot=Ft(import.meta.url),At=ve()==="win32";function v(e){let t=At?"where":"which";try{return T(t,[e],{stdio:"pipe"}),!0}catch{return!1}}function we(e){return[e.indexerBinary,...e.binaryAliases??[]]}function F(e){let t=we(e);return t.length===1?t[0]:t.join(" or ")}function R(e){for(let t of we(e))if(v(t))return t;return ke(e)?e.indexerBinary:null}function O(e){return R(e)!==null||ke(e)}function ke(e){if(!e.bundledNpmPackage)return!1;try{return Ot.resolve(`${e.bundledNpmPackage}/package.json`),!0}catch{return!1}}function Z(e,t){for(let r of e.projectLocalBinaries??[]){let n=Ie(t,r);if(Y(n))return n}return null}function ee(e,t=process.env,r=e.indexerBinary){if(e.indexerBinary!=="scip-dotnet"||Ce(r,t))return t;let n=$t(r,t);return n?{...t,DOTNET_ROOT:n}:t}function A(e,t){let r=e.installMethods,n=F(e);if(!r?.length)return t(`No auto-install method available for ${n}.`),e.installUrl&&t(`Install manually from: ${e.installUrl}`),!1;for(let i of r)if(v(i.prerequisite)){t(`Installing ${n} via ${i.label}...`);try{T(i.binary,i.args,{stdio:"inherit",timeout:3e5,env:process.env});let s=R(e);if(s){let a=s===e.indexerBinary?"":` (using ${s})`;return t(`Successfully installed ${n} via ${i.label}${a}`),!0}t(`${i.label} command completed but ${n} was not found on PATH`)}catch(s){let a=s instanceof Error?s.message:String(s);t(`${i.label} install failed: ${a}`)}}return t(`Could not auto-install ${n}.`),e.installUrl&&t(`Install manually from: ${e.installUrl}`),!1}function $t(e,t){for(let r of Mt(t))if(Ce(e,{...t,DOTNET_ROOT:r}))return r;return null}function Mt(e){let t=[],r=e.DOTNET_ROOT;if(r&&Y(r)&&t.push(r),ve()==="darwin"&&v("brew"))try{let n=T("brew",["--prefix","dotnet@9"],{stdio:"pipe",env:e}).toString().trim(),i=Ie(n,"libexec");Y(i)&&!t.includes(i)&&t.push(i)}catch{}return t}function Ce(e,t){try{return T(e,["--version"],{stdio:"pipe",env:t}),!0}catch{return!1}}import Wt from"better-sqlite3";import{createRequire as Bt}from"module";import{existsSync as Ee,readFileSync as $}from"fs";import{dirname as Vt,extname as Ut,join as Re,relative as Ht,resolve as Gt}from"path";import{pathToFileURL as qt}from"url";function Pe(e){w({projectRoot:e.projectRoot,dbPath:e.dbPath});let t=Gt(e.projectRoot,e.tsconfig);if(!Ee(t))throw new Error(`Vue tsconfig not found at ${t}`);let r=Jt(e.projectRoot,t),n=r.fileNames.filter(s=>s.endsWith(".vue")),i=new Wt(e.dbPath);try{zt(i);let s=Xt(i,e.projectRoot),a=Kt(i,e.projectRoot,n),c=[],o=0;for(let d of n){let g=r.language.scripts.get(d),p=g?.generated?.languagePlugin.typescript?.getServiceScript(g.generated.root)?.code;if(!g||!p){o++;continue}let y=r.language.maps.get(p,g),l=$(d,"utf-8");for(let m of Zt(l)){let h=en(y,m.start);if(h===null)continue;let S=(r.languageService.getDefinitionAtPosition(d,h+1)??[]).find(V=>!nn(e.projectRoot,V.fileName));if(!S){o++;continue}let b=Qt(S,s,a,r,e.projectRoot);if(b===null){o++;continue}let k=Le(l,m.start);c.push({sourceFile:M(e.projectRoot,d),sourceLine:k.line,sourceStartChar:k.character,sourceEndChar:k.character+m.text.length,symbolId:b})}}let u=Yt(i,c);return e.onStatus?.(`Resolved ${c.length} Vue references with Volar; inserted ${u} mentions.`),{vueFiles:n.length,resolvedReferences:c.length,insertedMentions:u,skippedReferences:o,syntheticSymbols:a.syntheticSymbols}}finally{i.close()}}function zt(e){e.transaction(()=>{e.prepare(`
78
+ `:` https://github.com/sourcegraph/scip/releases/tag/${he}
79
+ `),console.log("After installing, ensure `scip` is on your PATH and run `scip-query reindex`.")}function T(e){if(O()==="darwin"&&E("brew")){e("Installing scip CLI via Homebrew...");try{if(k("brew",["install","sourcegraph/scip/scip"],{stdio:"inherit",timeout:3e5,env:process.env}),E("scip"))return e("Successfully installed scip CLI via Homebrew"),!0}catch(t){let n=t instanceof Error?t.message:String(t);e(`Homebrew install failed: ${n}`)}}if(E("go")){e("Installing scip CLI via go install...");try{if(k("go",["install","github.com/sourcegraph/scip/cmd/scip@latest"],{stdio:"inherit",timeout:3e5,env:process.env}),E("scip"))return e("Successfully installed scip CLI via go install"),!0}catch(t){let n=t instanceof Error?t.message:String(t);e(`go install failed: ${n}`)}}return e("Could not auto-install scip CLI."),e("Install manually from: https://github.com/sourcegraph/scip/releases"),!1}import bt from"better-sqlite3";import{execFileSync as yt}from"child_process";import{existsSync as xt,readdirSync as St,readFileSync as vt}from"fs";import{extname as L,join as be}from"path";function m(e){let t=new Set((e.extensions??ge).map(s=>s.toLowerCase()));if(t.size===0)return{scanned:0,inserted:0,existing:0};if(!xt(e.dbPath))throw new Error(`SCIP SQLite database not found at ${e.dbPath}`);let n=I(e.projectRoot),r=Rt(e.projectRoot,t).filter(s=>!n.isIgnored(s)),i=new bt(e.dbPath);try{let s=kt(i,r),o=i.prepare(`INSERT OR IGNORE INTO documents (language, relative_path, position_encoding, text)
80
+ VALUES (?, ?, NULL, ?)`),u=i.transaction(g=>{let l=0;for(let d of g){if(s.has(d))continue;let f=vt(be(e.projectRoot,d),"utf-8"),Ze=o.run(Pt(d),d,f);l+=Number(Ze.changes)}return l})(r),c={scanned:r.length,inserted:u,existing:r.length-u};return e.onStatus?.(`Augmented SQLite documents with ${u} auxiliary source file${u===1?"":"s"} (${c.existing} already present).`),c}finally{i.close()}}function Rt(e,t){let n=It(e,t);if(n)return n;let r=[],i=s=>{let o=s?be(e,s):e,a;try{a=St(o,{withFileTypes:!0})}catch{return}for(let u of a){if(de.has(u.name))continue;let c=s?`${s}/${u.name}`:u.name;if(u.isDirectory()){i(c);continue}t.has(L(u.name).toLowerCase())&&r.push(c)}};return i(""),r.sort()}function It(e,t){try{return yt("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:26214400,stdio:["ignore","pipe","ignore"]}).split(`
81
+ `).filter(r=>r&&t.has(L(r).toLowerCase())).sort()}catch{return null}}function kt(e,t){let n=new Set,r=500;for(let i=0;i<t.length;i+=r){let s=t.slice(i,i+r),o=e.prepare(`SELECT relative_path FROM documents WHERE relative_path IN (${s.map(()=>"?").join(",")})`).all(...s);for(let a of o)n.add(a.relative_path)}return n}function Pt(e){return L(e).toLowerCase()===".vue"?"vue":L(e).replace(/^\./,"").toLowerCase()||"source"}import{execFileSync as wt}from"child_process";import{existsSync as Ct,readdirSync as xe}from"fs";import{extname as Se,join as ve}from"path";var Et=new Set([".git",".hg",".svn",".idea",".vscode","node_modules","vendor","dist","build","target","bin","obj",".dart_tool",".gradle",".next",".venv","venv","__pycache__"]),Ot=[{language:"typescript",files:["tsconfig.json","tsconfig.base.json"],extensions:[".ts",".tsx",".mts",".cts"]},{language:"rust",files:["Cargo.toml"],extensions:[".rs"]},{language:"go",files:["go.mod"],extensions:[".go"]},{language:"java",files:["pom.xml","build.gradle","build.gradle.kts"],extensions:[".java"]},{language:"kotlin",files:["build.gradle.kts"],extensions:[".kt",".kts"]},{language:"scala",files:["build.sbt"],extensions:[".scala"]},{language:"python",files:["pyproject.toml","setup.py","setup.cfg","Pipfile"],extensions:[".py",".pyi"]},{language:"ruby",files:["Gemfile"],extensions:[".rb"]},{language:"cpp",files:["compile_commands.json","CMakeLists.txt","Makefile"],extensions:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"]},{language:"c",files:["compile_commands.json","CMakeLists.txt","Makefile"],extensions:[".c",".h"]},{language:"csharp",globs:["*.csproj","*.sln"],extensions:[".cs"]},{language:"vb",globs:["*.vbproj"],extensions:[".vb"]},{language:"dart",files:["pubspec.yaml"],extensions:[".dart"]},{language:"php",files:["composer.json"],extensions:[".php"]},{language:"javascript",files:["package.json"],extensions:[".js",".jsx",".mjs",".cjs"]}];function D(e){let t=[],n=Tt(e),r=Nt(e);for(let i of Ot){if(Lt(e,i.files)){t.push(i.language);continue}if(Dt(n,i.globs)){t.push(i.language);continue}Mt(r,i.extensions)&&t.push(i.language)}return t.includes("typescript")&&ye(t,"javascript"),t.includes("cpp")&&!r.has(".c")&&ye(t,"c"),t}function Tt(e){try{return xe(e)}catch{return[]}}function Lt(e,t){return t?.length?t.some(n=>Ct(ve(e,n))):!1}function Dt(e,t){return t?.length?e.some(n=>t.some(r=>Ft(n,r))):!1}function Ft(e,t){if(t==="*")return!0;if(!t.includes("*"))return e===t;let[n,r]=t.split("*");return e.startsWith(n??"")&&e.endsWith(r??"")}function Nt(e){let t=jt(e);if(t)return t;let n=new Set,r=[e];for(;r.length>0;){let i=r.pop();if(!i)continue;let s;try{s=xe(i,{withFileTypes:!0})}catch{continue}for(let o of s){if(o.name.startsWith(".")&&!o.name.endsWith("proj")&&!o.name.endsWith("sln")&&o.isDirectory())continue;let a=ve(i,o.name);if(o.isDirectory()){Et.has(o.name)||r.push(a);continue}let u=Se(o.name).toLowerCase();u&&n.add(u)}}return n}function jt(e){try{let t=wt("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:26214400,stdio:["ignore","pipe","ignore"]}),n=new Set;for(let r of t.split(`
82
+ `)){if(!r)continue;let i=Se(r).toLowerCase();i&&n.add(i)}return n}catch{return null}}function Mt(e,t){return t?.length?t.some(n=>e.has(n)):!1}function ye(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}import{existsSync as Re,readdirSync as _t}from"fs";import{join as z}from"path";var X={typescript:{language:"typescript",indexerBinary:"scip-typescript",checkCommand:"npx scip-typescript --version",indexArgs:({outputPath:e,pnpmWorkspaces:t,indexerBinary:n})=>{let r=["index","--infer-tsconfig","--output",e,"--no-progress-bar"];return t&&r.splice(1,0,"--pnpm-workspaces"),{binary:n,args:r}},markerFiles:["tsconfig.json"],installMethods:[{label:"npm",prerequisite:"npm",binary:"npm",args:["install","-g","@sourcegraph/scip-typescript"]}],installUrl:"https://github.com/sourcegraph/scip-typescript",bundledNpmPackage:"@sourcegraph/scip-typescript"},javascript:{language:"javascript",indexerBinary:"scip-typescript",checkCommand:"npx scip-typescript --version",indexArgs:({outputPath:e,indexerBinary:t})=>({binary:t,args:["index","--infer-tsconfig","--output",e,"--no-progress-bar"]}),markerFiles:["package.json"],installMethods:[{label:"npm",prerequisite:"npm",binary:"npm",args:["install","-g","@sourcegraph/scip-typescript"]}],installUrl:"https://github.com/sourcegraph/scip-typescript",bundledNpmPackage:"@sourcegraph/scip-typescript"},java:{language:"java",indexerBinary:"scip-java",checkCommand:"scip-java --version",indexArgs:({outputPath:e})=>({binary:"scip-java",args:["index","--output",e]}),markerFiles:["pom.xml","build.gradle"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-java/releases"},scala:{language:"scala",indexerBinary:"scip-java",checkCommand:"scip-java --version",indexArgs:({outputPath:e})=>({binary:"scip-java",args:["index","--output",e]}),markerFiles:["build.sbt"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-java/releases"},kotlin:{language:"kotlin",indexerBinary:"scip-java",checkCommand:"scip-java --version",indexArgs:({outputPath:e})=>({binary:"scip-java",args:["index","--output",e]}),markerFiles:["build.gradle.kts"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-java/releases"},rust:{language:"rust",indexerBinary:"rust-analyzer",checkCommand:"rust-analyzer --version",indexArgs:({outputPath:e})=>({binary:"rust-analyzer",args:["scip",".","--output",e]}),markerFiles:["Cargo.toml"],installMethods:[{label:"rustup",prerequisite:"rustup",binary:"rustup",args:["component","add","rust-analyzer"]}],installUrl:"https://github.com/rust-lang/rust-analyzer"},python:{language:"python",indexerBinary:"scip-python-plus",binaryAliases:["scip-python"],checkCommand:"scip-python-plus --version",indexArgs:({outputPath:e,indexerBinary:t})=>({binary:t,args:["index","--output",e,"--project-name","project"]}),markerFiles:["pyproject.toml","setup.py"],installMethods:[{label:"npm",prerequisite:"npm",binary:"npm",args:["install","-g","scip-python-plus"]}],installUrl:"https://github.com/PlunderStruck/scip-python",bundledNpmPackage:"scip-python-plus"},ruby:{language:"ruby",indexerBinary:"scip-ruby",checkCommand:"scip-ruby --version",indexArgs:({indexerBinary:e})=>({binary:e,args:["--dir","."]}),defaultOutputPath:"index.scip",markerFiles:["Gemfile"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-ruby/releases"},go:{language:"go",indexerBinary:"scip-go",checkCommand:"scip-go --version",indexArgs:({outputPath:e})=>({binary:"scip-go",args:["--output",e]}),markerFiles:["go.mod"],installMethods:[{label:"go install",prerequisite:"go",binary:"go",args:["install","github.com/sourcegraph/scip-go@latest"]}],installUrl:"https://github.com/sourcegraph/scip-go"},cpp:{language:"cpp",indexerBinary:"scip-clang",checkCommand:"scip-clang --version",indexArgs:({outputPath:e})=>({binary:"scip-clang",args:["--compdb-path","compile_commands.json","--index-output-path",e]}),markerFiles:["CMakeLists.txt","Makefile"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-clang/releases"},c:{language:"c",indexerBinary:"scip-clang",checkCommand:"scip-clang --version",indexArgs:({outputPath:e})=>({binary:"scip-clang",args:["--compdb-path","compile_commands.json","--index-output-path",e]}),markerFiles:["CMakeLists.txt","Makefile"],installMethods:[],installUrl:"https://github.com/sourcegraph/scip-clang/releases"},csharp:{language:"csharp",indexerBinary:"scip-dotnet",checkCommand:"scip-dotnet --version",indexArgs:({projectRoot:e,outputPath:t})=>({binary:"scip-dotnet",args:["index",Ie(e,[".sln",".csproj"])??e,"--output",t,"--working-directory",e]}),markerFiles:["*.csproj","*.sln"],installMethods:[{label:"dotnet",prerequisite:"dotnet",binary:"dotnet",args:["tool","install","--global","scip-dotnet"]}],installUrl:"https://github.com/sourcegraph/scip-dotnet/releases"},vb:{language:"vb",indexerBinary:"scip-dotnet",checkCommand:"scip-dotnet --version",indexArgs:({projectRoot:e,outputPath:t})=>({binary:"scip-dotnet",args:["index",Ie(e,[".sln",".vbproj"])??e,"--output",t,"--working-directory",e]}),markerFiles:["*.vbproj","*.sln"],installMethods:[{label:"dotnet",prerequisite:"dotnet",binary:"dotnet",args:["tool","install","--global","scip-dotnet"]}],installUrl:"https://github.com/sourcegraph/scip-dotnet/releases"},dart:{language:"dart",indexerBinary:"scip-dart",checkCommand:"scip-dart --version",indexArgs:({indexerBinary:e,outputPath:t})=>({binary:e,args:["--output",t]}),markerFiles:["pubspec.yaml"],installMethods:[{label:"dart pub",prerequisite:"dart",binary:"dart",args:["pub","global","activate","scip_dart"]}],installUrl:"https://github.com/Workiva/scip-dart/releases"},php:{language:"php",indexerBinary:"scip-php",projectLocalBinaries:["vendor/davidrjenni/scip-php/bin/scip-php","vendor/bin/scip-php"],checkCommand:"scip-php --version",indexArgs:({projectRoot:e,indexerBinary:t})=>{let n=z(e,"vendor","bin","scip-php"),r=z(e,"vendor","davidrjenni","scip-php","bin","scip-php");return{binary:"php",args:["-d","error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED",Re(r)?r:Re(n)?n:t]}},defaultOutputPath:"index.scip",markerFiles:["composer.json"],installMethods:[],installUrl:"https://github.com/davidrjenni/scip-php/releases"}};function F(e){return X[e]}function Ie(e,t){let n;try{n=_t(e)}catch{return null}for(let r of n)if(t.some(i=>r.endsWith(i)))return z(e,r);return null}import{readFileSync as At,writeFileSync as Vt}from"fs";import{create as K}from"@bufbuild/protobuf";import{deserializeSCIP as $t,serializeSCIP as Bt,DocumentSchema as Wt,IndexSchema as Ut,SymbolInformationSchema as Ht}from"@c4312/scip";function Q(e){if(e.length===0)throw new Error("Cannot merge zero SCIP indexes");if(e.length===1)return e[0];let t=Gt(e),n=qt(e.flatMap(i=>i.documents??[])),r=ke(e.flatMap(i=>i.externalSymbols??[]));return K(Ut,{metadata:t,documents:n,externalSymbols:r})}function N(e,t){if(e.length===0)throw new Error("Cannot merge zero SCIP files");let n=e.map(i=>$t(At(i))),r=Q(n);return Vt(t,Buffer.from(Bt(r))),{documentCount:r.documents.length,externalSymbolCount:r.externalSymbols.length,inputCount:e.length}}function Gt(e){let t=e[0]?.metadata;if(!t)return;let n=t.projectRoot;for(let r of e.slice(1)){let i=r.metadata?.projectRoot;if(n&&i&&i!==n)throw new Error(`Cannot merge SCIP indexes with different project roots: ${n} vs ${i}`)}return t}function qt(e){let t=new Map;for(let n of e){let r=t.get(n.relativePath);if(!r){t.set(n.relativePath,n);continue}t.set(n.relativePath,K(Wt,{language:r.language||n.language,relativePath:r.relativePath||n.relativePath,occurrences:[...r.occurrences,...n.occurrences],symbols:ke([...r.symbols,...n.symbols]),text:zt(r.text,n.text),positionEncoding:r.positionEncoding||n.positionEncoding}))}return[...t.values()]}function ke(e){let t=new Map;for(let n of e){let r=t.get(n.symbol);if(!r){t.set(n.symbol,n);continue}t.set(n.symbol,K(Ht,{symbol:r.symbol,documentation:Xt([...r.documentation,...n.documentation]),relationships:Jt([...r.relationships,...n.relationships]),kind:r.kind||n.kind,displayName:r.displayName||n.displayName,enclosingSymbol:r.enclosingSymbol||n.enclosingSymbol,signatureDocumentation:r.signatureDocumentation??n.signatureDocumentation}))}return[...t.values()]}function Jt(e){let t=new Set,n=[];for(let r of e){let i=[r.symbol,r.isReference?"1":"0",r.isImplementation?"1":"0",r.isTypeDefinition?"1":"0",r.isDefinition?"1":"0"].join("|");t.has(i)||(t.add(i),n.push(r))}return n}function zt(e,t){return e?t?e.length>=t.length?e:t:e:t}function Xt(e){return[...new Set(e)]}import{execFileSync as Kt}from"child_process";import{createHash as Qt}from"crypto";import{readdirSync as Yt,readFileSync as Zt}from"fs";import{join as Pe}from"path";function en(e){return(tn(e)??nn(e)).filter(t=>t&&!we(t)).sort()}function j(e){return en(e).map(t=>{let n=Pe(e,t);try{let r=Zt(n);return{path:t,size:r.byteLength,hash:Qt("sha256").update(r).digest("hex")}}catch{return{path:t,size:-1,hash:"unreadable"}}})}function tn(e){try{return Kt("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:50*1024*1024,stdio:["ignore","pipe","ignore"]}).split(`
83
+ `).filter(Boolean)}catch{return null}}function nn(e){let t=[],n=[""];for(;n.length>0;){let r=n.pop(),i=r?Pe(e,r):e,s;try{s=Yt(i,{withFileTypes:!0})}catch{continue}for(let o of s){let a=r?`${r}/${o.name}`:o.name;if(o.isDirectory()){we(a)||n.push(a);continue}t.push(a)}}return t}function we(e){return e.split("/").some(n=>rn.has(n))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var rn=new Set([".git","node_modules",".scipquery-cache",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);import{readFileSync as sn,writeFileSync as on}from"fs";import{create as Ce}from"@bufbuild/protobuf";import{deserializeSCIP as an,DocumentSchema as un,IndexSchema as cn,serializeSCIP as ln,SymbolRole as gn}from"@c4312/scip";function Ee(e){let t;try{t=an(sn(e))}catch{return{removedDefinitionOccurrences:0,touchedDocuments:0}}let n=dn(t);return n.removedDefinitionOccurrences>0&&on(e,Buffer.from(ln(n.index))),{removedDefinitionOccurrences:n.removedDefinitionOccurrences,touchedDocuments:n.touchedDocuments}}function dn(e){let t=new Set;for(let s of e.documents)for(let o of s.symbols)o.symbol&&t.add(o.symbol);for(let s of e.externalSymbols)s.symbol&&t.add(s.symbol);let n=0,r=0,i=[];for(let s of e.documents){let o=s.occurrences.filter(a=>(a.symbolRoles&gn.Definition)===0||t.has(a.symbol)?!0:(n+=1,!1));if(o.length===s.occurrences.length){i.push(s);continue}r+=1,i.push(Ce(un,{language:s.language,relativePath:s.relativePath,occurrences:o,symbols:s.symbols,text:s.text,positionEncoding:s.positionEncoding}))}return{index:n===0?e:Ce(cn,{metadata:e.metadata,documents:i,externalSymbols:e.externalSymbols}),removedDefinitionOccurrences:n,touchedDocuments:r}}import{execFileSync as _}from"child_process";import{existsSync as Y,readFileSync as pn}from"fs";import{createRequire as fn}from"module";import{platform as Te}from"os";import{dirname as Oe,join as M}from"path";var mn=fn(import.meta.url),hn=Te()==="win32";function h(e){let t=hn?"where":"which";try{return _(t,[e],{stdio:"pipe"}),!0}catch{return!1}}function Z(e){return[e.indexerBinary,...e.binaryAliases??[]]}function A(e){let t=Z(e);return t.length===1?t[0]:t.join(" or ")}function P(e){for(let t of Z(e))if(h(t))return t;return yn(e)}function V(e){return P(e)!==null||bn(e)}function bn(e){return Le(e)!==null}function yn(e){let t=Le(e);if(!t)return null;let r=JSON.parse(pn(t,"utf8")).bin;if(!r)return null;if(typeof r=="string")return M(Oe(t),r);for(let i of Z(e)){let s=r[i];if(s)return M(Oe(t),s)}return null}function Le(e){if(!e.bundledNpmPackage)return null;try{return mn.resolve(`${e.bundledNpmPackage}/package.json`)}catch{return null}}function ee(e,t){for(let n of e.projectLocalBinaries??[]){let r=M(t,n);if(Y(r))return r}return null}function te(e,t=process.env,n=e.indexerBinary){if(e.indexerBinary!=="scip-dotnet"||De(n,t))return t;let r=xn(n,t);return r?{...t,DOTNET_ROOT:r}:t}function $(e,t){let n=e.installMethods,r=A(e);if(!n?.length)return t(`No auto-install method available for ${r}.`),e.installUrl&&t(`Install manually from: ${e.installUrl}`),!1;for(let i of n)if(h(i.prerequisite)){t(`Installing ${r} via ${i.label}...`);try{_(i.binary,i.args,{stdio:"inherit",timeout:3e5,env:process.env});let s=P(e);if(s){let o=s===e.indexerBinary?"":` (using ${s})`;return t(`Successfully installed ${r} via ${i.label}${o}`),!0}t(`${i.label} command completed but ${r} was not found on PATH`)}catch(s){let o=s instanceof Error?s.message:String(s);t(`${i.label} install failed: ${o}`)}}return t(`Could not auto-install ${r}.`),e.installUrl&&t(`Install manually from: ${e.installUrl}`),!1}function xn(e,t){for(let n of Sn(t))if(De(e,{...t,DOTNET_ROOT:n}))return n;return null}function Sn(e){let t=[],n=e.DOTNET_ROOT;if(n&&Y(n)&&t.push(n),Te()==="darwin"&&h("brew"))try{let r=_("brew",["--prefix","dotnet@9"],{stdio:"pipe",env:e}).toString().trim(),i=M(r,"libexec");Y(i)&&!t.includes(i)&&t.push(i)}catch{}return t}function De(e,t){try{return _(e,["--version"],{stdio:"pipe",env:t}),!0}catch{return!1}}import vn from"better-sqlite3";import{createRequire as Rn}from"module";import{existsSync as Ne,mkdtempSync as In,readFileSync as w,rmSync as kn,statSync as Pn,writeFileSync as wn}from"fs";import{cpus as Cn,tmpdir as En}from"os";import{dirname as re,extname as On,join as S,relative as Tn,resolve as je}from"path";import{pathToFileURL as Ln}from"url";import{Worker as Dn}from"worker_threads";function Me(e){m({projectRoot:e.projectRoot,dbPath:e.dbPath});let t=je(e.projectRoot,e.tsconfig);if(!Ne(t))throw new Error(`Vue tsconfig not found at ${t}`);let n=new vn(e.dbPath);try{let r=er(n,e.projectRoot),i=S(re(e.dbPath),"augment-vue-meta.json"),s=Fe(n,e.projectRoot,e.tsconfig),o=Fn(i,s,e.onStatus);if(o)return o;let a=cr(n,e.projectRoot,r),u=Nn(n,e,t,r,a),c=pr(u.occurrences),g=jn(n,e,r,a,c);e.onStatus?.(`Resolved ${c.length} Vue references with Volar; inserted ${g} mentions.`);let l=Mn(r,c,g,u,a);return An(i,Fe(n,e.projectRoot,e.tsconfig),l),l}finally{n.close()}}function Fn(e,t,n){let r=_n(e,t);return r&&n?.(`Vue references unchanged; reused ${r.resolvedReferences} cached resolved references.`),r}function Nn(e,t,n,r,i){if(qn(r))return Jn({projectRoot:t.projectRoot,dbPath:t.dbPath,tsconfig:t.tsconfig,vueFiles:r});let s=xr(),o=tr(t.projectRoot,n);return Vn({projectRoot:t.projectRoot,vueFiles:o.fileNames.filter(a=>a.endsWith(".vue")),context:o,symbolLookup:or(e,t.projectRoot,s),vueSymbolLookup:i,sourceCache:s})}function jn(e,t,n,r,i){return lr(e,t.projectRoot,n,r,i)}function Mn(e,t,n,r,i){return{vueFiles:e.length,resolvedReferences:t.length,insertedMentions:n,skippedReferences:r.skippedReferences,syntheticSymbols:i.syntheticSymbols}}function _n(e,t){try{let n=JSON.parse(w(e,"utf-8"));return JSON.stringify(n.fingerprint)===JSON.stringify(t)?n.result:null}catch{return null}}function An(e,t,n){wn(e,JSON.stringify({updatedAt:new Date().toISOString(),fingerprint:t,result:n},null,2)+`
84
+ `)}function Fe(e,t,n){let r=e.prepare(`
85
+ SELECT
86
+ (SELECT COUNT(*) FROM documents) AS documents,
87
+ (SELECT COUNT(*) FROM global_symbols) AS symbols,
88
+ (SELECT COUNT(*) FROM chunks) AS chunks,
89
+ (SELECT COUNT(*) FROM mentions) AS mentions,
90
+ (SELECT COUNT(*) FROM defn_enclosing_ranges) AS ranges,
91
+ (SELECT MAX(id) FROM chunks) AS maxChunkId,
92
+ (SELECT MAX(id) FROM global_symbols) AS maxSymbolId
93
+ `).get();return{version:2,tsconfig:n,files:j(t),db:r}}function Vn(e){let t=[],n=0,r=e.tasks??e.vueFiles.map(i=>({fileName:i,startOffset:0,endOffset:Number.POSITIVE_INFINITY,countFileSkip:!0}));for(let i of r){let s=$n(e,i);t.push(...s.occurrences),n+=s.skippedReferences}return{occurrences:t,skippedReferences:n}}function $n(e,t){let n=e.context.language.scripts.get(t.fileName),r=n?.generated?.languagePlugin.typescript?.getServiceScript(n.generated.root)?.code;if(!n||!r)return{occurrences:[],skippedReferences:t.countFileSkip?1:0};let i=e.sourceCache(t.fileName);if(!i)return{occurrences:[],skippedReferences:t.countFileSkip?1:0};let s=e.context.language.maps.get(r,n),o=C(e.projectRoot,t.fileName),a=[...mr(i.text)],u={tokens:a.filter(c=>c.start>=t.startOffset&&c.start<t.endOffset),tokenByStart:new Map(a.map(c=>[c.start,c])),tokenTextCounts:Un(a),processedStarts:new Set};return Bn({...e,fileName:t.fileName,sourceInfo:i,sourceFile:o,map:s,tokenContext:u})}function Bn(e){let t=[],n=0;for(let r of e.tokenContext.tokens){if(e.tokenContext.processedStarts.has(r.start))continue;let i=hr(e.map,r.start);if(i===null)continue;let o=(e.context.languageService.getDefinitionAtPosition(e.fileName,i+1)??[]).find(u=>!br(e.projectRoot,u.fileName));if(!o){n++;continue}let a=dr(o,e.symbolLookup,e.vueSymbolLookup,e.context,e.projectRoot);if(a===null){n++;continue}_e(t,e.sourceInfo,e.sourceFile,r,a),e.tokenContext.processedStarts.add(r.start),Wn(t,e,r,i,a)}return{occurrences:t,skippedReferences:n}}function Wn(e,t,n,r,i){if(!((t.tokenContext.tokenTextCounts.get(n.text)??0)<=1))for(let s of Hn(t.context.languageService,t.fileName,r+1,t.map,n,t.tokenContext.tokenByStart)){if(t.tokenContext.processedStarts.has(s))continue;let o=t.tokenContext.tokenByStart.get(s);o&&(_e(e,t.sourceInfo,t.sourceFile,o,i),t.tokenContext.processedStarts.add(s))}}function _e(e,t,n,r,i){let s=We(t,r.start);e.push({sourceFile:n,sourceLine:s.line,sourceStartChar:s.character,sourceEndChar:s.character+r.text.length,symbolId:i})}function Un(e){let t=new Map;for(let n of e)t.set(n.text,(t.get(n.text)??0)+1);return t}function Hn(e,t,n,r,i,s){let o=e.getDocumentHighlights?.(t,n,[t])??[],a=[];for(let u of o)if(u.fileName===t)for(let c of u.highlightSpans){let g=Gn(r,c.textSpan.start,s,i.text);g!==null&&a.push(g)}return a}function Gn(e,t,n,r){let i=n.get(t);if(i?.text===r)return i.start;let s=Be(e,t);if(s===null)return null;let o=n.get(s);return o?.text===r?o.start:null}function qn(e){return e.length>=8&&Ae(e.length)>1}function Jn(e){let t=Ae(e.vueFiles.length),n=Xn(e.vueFiles),r=Qn(n,t),i=new URL("./augment-vue-worker.js",import.meta.url),s=In(S(En(),"scip-query-vue-workers-")),o=new SharedArrayBuffer(4),a=new Int32Array(o),u=zn(),c=Date.now();try{for(let l=0;l<r.length;l++)new Dn(i,{workerData:{projectRoot:e.projectRoot,dbPath:e.dbPath,tsconfig:e.tsconfig,tasks:r[l],resultPath:S(s,`${l}.json`),sharedBuffer:o}});for(;Atomics.load(a,0)<r.length;){if(Date.now()-c>u)throw new Error(`Vue reference workers timed out after ${(u/1e3).toFixed(0)}s`);Atomics.wait(a,0,Atomics.load(a,0),100)}let g=r.map((l,d)=>{let f=JSON.parse(w(S(s,`${d}.json`),"utf-8"));if(!f.ok)throw new Error(`Vue reference worker failed: ${f.error}`);return f.result});return{occurrences:g.flatMap(l=>l.occurrences),skippedReferences:g.reduce((l,d)=>l+d.skippedReferences,0)}}finally{kn(s,{recursive:!0,force:!0})}}function Ae(e){let t=Number(process.env.SCIP_QUERY_AUGMENT_VUE_WORKERS??0),n=Number.isFinite(t)&&t>0?t:Math.min(8,Math.max(1,Cn().length-1));return Math.max(1,Math.min(e,n))}function zn(){let e=Number(process.env.SCIP_QUERY_AUGMENT_VUE_WORKER_TIMEOUT_MS??0);return Number.isFinite(e)&&e>0?e:3e5}function Xn(e){let t=Kn(),n=[];for(let r of e){let i=Ve(r),s=Math.max(1,Math.ceil(i/t));for(let o=0;o<s;o++)n.push({fileName:r,startOffset:Math.floor(i*o/s),endOffset:o===s-1?Number.POSITIVE_INFINITY:Math.floor(i*(o+1)/s),countFileSkip:o===0})}return n}function Kn(){return Number.POSITIVE_INFINITY}function Qn(e,t){let n=Array.from({length:t},()=>({tasks:[],weight:0})),r=e.map(i=>({task:i,weight:Yn(i)})).sort((i,s)=>s.weight-i.weight);for(let i of r){let s=n.reduce((o,a)=>a.weight<o.weight?a:o);s.tasks.push(i.task),s.weight+=i.weight}return n.map(i=>i.tasks).filter(i=>i.length>0)}function Yn(e){return Number.isFinite(e.endOffset)?Math.max(1,e.endOffset-e.startOffset):Math.max(1,Ve(e.fileName)-e.startOffset)}function Ve(e){try{return Pn(e).size}catch{return 1}}function Zn(e){e.transaction(()=>{e.prepare(`
81
94
  DELETE FROM mentions
82
95
  WHERE chunk_id IN (
83
96
  SELECT c.id
@@ -92,43 +105,44 @@ Thumbs.db
92
105
  FROM documents
93
106
  WHERE language = 'vue' OR relative_path LIKE '%.vue'
94
107
  )
95
- `).run()})()}function Jt(e,t){let r=Bt(qt(Re(e,"package.json")).href),n=r("typescript"),i=r("@vue/language-core"),s=r("@volar/typescript"),a=n.readConfigFile(t,n.sys.readFile);if(a.error||!a.config)throw new Error(`Failed to read ${t}`);let o=i.createParsedCommandLine(n,n.sys,t).vueOptions;typeof i.createGlobalTypesWriter=="function"&&(o.globalTypesPath=i.createGlobalTypesWriter(o,n.sys.writeFile));let u=i.getAllExtensions(o).map(f=>({extension:f.slice(1),isMixedContent:!0,scriptKind:n.ScriptKind.Deferred})),d=Vt(t),g=n.parseJsonConfigFileContent(a.config,n.sys,d,void 0,t,void 0,u),p=i.createVueLanguagePlugin(n,g.options,o,f=>f),y;y=i.createLanguage([p],new Map,f=>{if(!Ee(f))return;let S=$(f,"utf-8");y.scripts.set(f,n.ScriptSnapshot.fromString(S),p.getLanguageId(f)??rn(f))});let l={getCurrentDirectory:()=>d,getCompilationSettings:()=>g.options,getScriptFileNames:()=>g.fileNames,getProjectReferences:()=>g.projectReferences,getProjectVersion:()=>"0"},{languageServiceHost:m}=s.createLanguageServiceHost(n,n.sys,y,f=>f,l),h=n.createLanguageService(m);return{ts:n,language:y,languageService:h,fileNames:g.fileNames,configDir:d}}function Xt(e,t){let r=e.prepare(`
96
- SELECT der.symbol_id AS symbolId
108
+ `).run()})()}function er(e,t){return e.prepare(`
109
+ SELECT relative_path AS relativePath
110
+ FROM documents
111
+ WHERE language = 'vue' OR relative_path LIKE '%.vue'
112
+ ORDER BY relative_path
113
+ `).all().map(r=>je(t,r.relativePath))}function tr(e,t){let{vueCore:n,ts:r,volarTs:i}=nr(e),{parsed:s,vueOptions:o}=rr(n,r,t),a=re(t),u=n.createVueLanguagePlugin(r,s.options,o,f=>f),c=ir(n,r,u),g=sr(a,s),{languageServiceHost:l}=i.createLanguageServiceHost(r,r.sys,c,f=>f,g),d=r.createLanguageService(l);return{ts:r,language:c,languageService:d,fileNames:s.fileNames,configDir:a}}function nr(e){let t=Rn(Ln(S(e,"package.json")).href);return{vueCore:ne(t,"@vue/language-core",e),ts:ne(t,"typescript",e),volarTs:ne(t,"@volar/typescript",e)}}function rr(e,t,n){let r=t.readConfigFile(n,t.sys.readFile);if(r.error||!r.config)throw new Error(`Failed to read ${n}`);let s=e.createParsedCommandLine(t,t.sys,n).vueOptions;return typeof e.createGlobalTypesWriter=="function"&&(s.globalTypesPath=e.createGlobalTypesWriter(s,t.sys.writeFile)),{parsed:t.parseJsonConfigFileContent(r.config,t.sys,re(n),void 0,n,void 0,e.getAllExtensions(s).map(o=>({extension:o.slice(1),isMixedContent:!0,scriptKind:t.ScriptKind.Deferred}))),vueOptions:s}}function ir(e,t,n){let r={},i=e.createLanguage([n],new Map,s=>{if(!Ne(s))return;let o=w(s,"utf-8");r.current?.scripts.set(s,t.ScriptSnapshot.fromString(o),n.getLanguageId(s)??yr(s))});return r.current=i,i}function sr(e,t){return{getCurrentDirectory:()=>e,getCompilationSettings:()=>t.options,getScriptFileNames:()=>t.fileNames,getProjectReferences:()=>t.projectReferences,getProjectVersion:()=>"0"}}function ne(e,t,n){try{return e(t)}catch(r){throw(typeof r=="object"&&r!==null&&"code"in r?r.code:null)==="MODULE_NOT_FOUND"?new Error(`Vue augmentation requires ${t} to be installed in ${n}. Install Vue/Volar dependencies for that project, then rerun augment-vue.`,{cause:r}):r}}function or(e,t,n){let r=ar(e);return i=>{let s=C(t,i.fileName),o=n(i.fileName);if(!o)return null;let a=We(o,i.textSpan.start),u=r.get(s);if(!u)return null;let c=u.containingByLine.get(a.line);return c!==void 0?c:ur(u.starts,a.line,2)}}function ar(e){let t=e.prepare(`
114
+ SELECT
115
+ d.relative_path AS relativePath,
116
+ der.start_line AS startLine,
117
+ der.end_line AS endLine,
118
+ der.symbol_id AS symbolId
97
119
  FROM defn_enclosing_ranges der
98
120
  JOIN documents d ON d.id = der.document_id
99
- WHERE d.relative_path = ?
100
- AND der.start_line <= ?
101
- AND der.end_line >= ?
102
- ORDER BY (der.end_line - der.start_line) ASC
103
- LIMIT 1
104
- `),n=e.prepare(`
105
- SELECT der.symbol_id AS symbolId
106
- FROM defn_enclosing_ranges der
107
- JOIN documents d ON d.id = der.document_id
108
- WHERE d.relative_path = ?
109
- AND der.start_line BETWEEN ? AND ?
110
- ORDER BY ABS(der.start_line - ?) ASC
111
- LIMIT 1
112
- `);return i=>{let s=M(t,i.fileName),a=sn(i.fileName);if(!a)return null;let c=Le(a,i.textSpan.start),o=r.get(s,c.line,c.line);return o?o.symbolId:n.get(s,Math.max(0,c.line-2),c.line+2,c.line)?.symbolId??null}}function Kt(e,t,r){let n=on(t),i=e.prepare("SELECT id FROM global_symbols WHERE symbol = ?"),s=e.prepare(`
121
+ ORDER BY d.relative_path, (der.end_line - der.start_line) DESC
122
+ `).all(),n=new Map;for(let r of t){let i=n.get(r.relativePath);i||(i={containingByLine:new Map,starts:[]},n.set(r.relativePath,i)),i.starts.push({line:r.startLine,symbolId:r.symbolId});for(let s=r.startLine;s<=r.endLine;s++)i.containingByLine.set(s,r.symbolId)}for(let r of n.values())r.starts.sort((i,s)=>i.line-s.line);return n}function ur(e,t,n){let r=0,i=e.length-1;for(;r<=i;){let o=Math.floor((r+i)/2);e[o].line<t?r=o+1:i=o-1}let s=null;for(let o of[i,r]){let a=e[o];if(!a)continue;let u=Math.abs(a.line-t);u>n||(!s||u<s.distance)&&(s={distance:u,symbolId:a.symbolId})}return s?.symbolId??null}function cr(e,t,n){let r=Rr(t),i=e.prepare("SELECT id FROM global_symbols WHERE symbol = ?"),s=e.prepare(`
113
123
  INSERT OR IGNORE INTO global_symbols (symbol, display_name, kind, documentation)
114
124
  VALUES (?, ?, ?, ?)
115
- `),a=e.prepare("SELECT id FROM documents WHERE relative_path = ?"),c=e.prepare(`
125
+ `),o=0,a=new Map;return e.transaction(()=>{for(let c of n){let g=C(t,c),l=Ir(r.name,r.version,g);s.run(l,"default",7,`Vue component|${g}`);let d=i.get(l);d&&(o++,a.set(c,d.id))}})(),{get(c){return a.get(c)??null},syntheticSymbols:o}}function lr(e,t,n,r,i){return e.transaction(()=>(Zn(e),gr(e,t,n,r),fr(e,i)))()}function gr(e,t,n,r){let i=e.prepare("SELECT id FROM documents WHERE relative_path = ?"),s=e.prepare(`
116
126
  INSERT INTO chunks (document_id, chunk_index, start_line, end_line, occurrences)
117
127
  VALUES (?, ?, ?, ?, X'00')
118
128
  `),o=e.prepare(`
119
129
  INSERT OR IGNORE INTO mentions (chunk_id, symbol_id, role)
120
130
  VALUES (?, ?, 1)
121
- `),u=0,d=new Map;return e.transaction(()=>{for(let p of r){let y=M(t,p),l=an(n.name,n.version,y);s.run(l,"default",7,`Vue component|${y}`);let m=i.get(l);if(!m)continue;u++,d.set(p,m.id);let h=a.get(y);if(!h)continue;let f=c.run(h.id,-1,0,0);o.run(Number(f.lastInsertRowid),m.id)}})(),{get(p){return d.get(p)??null},syntheticSymbols:u}}function Qt(e,t,r,n,i){if(e.fileName.endsWith(".vue")){let s=n.language.scripts.get(e.fileName),a=s?.generated?.languagePlugin.typescript?.getServiceScript(s.generated.root)?.code;if(s&&a){let c=n.language.maps.get(a,s);if(tn(c,e.textSpan.start)!==null)return r.get(e.fileName)}return e.fileName.startsWith(i)?r.get(e.fileName):null}return t(e)}function Yt(e,t){let r=e.prepare("SELECT id FROM documents WHERE relative_path = ?"),n=e.prepare(`
131
+ `);for(let a of n){let u=r.get(a);if(!u)continue;let c=C(t,a),g=i.get(c);if(!g)continue;let l=s.run(g.id,-1,0,0);o.run(Number(l.lastInsertRowid),u)}}function dr(e,t,n,r,i){if(e.fileName.endsWith(".vue")){let s=r.language.scripts.get(e.fileName),o=s?.generated?.languagePlugin.typescript?.getServiceScript(s.generated.root)?.code;if(s&&o){let a=r.language.maps.get(o,s);if(Be(a,e.textSpan.start)!==null)return n.get(e.fileName)}return e.fileName.startsWith(i)?n.get(e.fileName):null}return t(e)}function pr(e){let t=new Set,n=[];for(let r of e){let i=$e(r);t.has(i)||(t.add(i),n.push(r))}return n}function $e(e){return[e.sourceFile,e.sourceLine,e.sourceStartChar,e.sourceEndChar,e.symbolId].join(":")}function fr(e,t){let n=vr(e,[...new Set(t.map(u=>u.sourceFile))]),r=e.prepare(`
122
132
  INSERT INTO chunks (document_id, chunk_index, start_line, end_line, occurrences)
123
133
  VALUES (?, ?, ?, ?, X'00')
124
134
  `),i=e.prepare(`
125
135
  INSERT OR IGNORE INTO mentions (chunk_id, symbol_id, role)
126
136
  VALUES (?, ?, 0)
127
- `),s=new Set;return e.transaction(()=>{let c=0,o=0;for(let u of t){let d=`${u.sourceFile}:${u.sourceLine}:${u.sourceStartChar}:${u.symbolId}`;if(s.has(d))continue;s.add(d);let g=r.get(u.sourceFile);if(!g)continue;let p=n.run(g.id,o++,u.sourceLine,u.sourceLine),y=i.run(Number(p.lastInsertRowid),u.symbolId);c+=Number(y.changes)}return c})()}function*Zt(e){let t=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,r=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"]),n;for(;n=t.exec(e);){let i=n[0];r.has(i)||(yield{text:i,start:n.index,end:n.index+i.length})}}function en(e,t){for(let[r]of e.toGeneratedLocation(t,n=>!!n.navigation))return r;return null}function tn(e,t){let r=e;for(let[n]of r.toSourceLocation(t,i=>!!i.navigation))return n;return null}function Le(e,t){let r=0,n=0;for(let i=0;i<t;i++)e.charCodeAt(i)===10&&(r++,n=i+1);return{line:r,character:t-n}}function nn(e,t){return M(e,t).startsWith("node_modules/")}function M(e,t){return Ht(e,t).replaceAll("\\","/")}function rn(e){switch(Ut(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 sn(e){try{return $(e,"utf-8")}catch{return null}}function on(e){try{let t=JSON.parse($(Re(e,"package.json"),"utf-8"));return{name:t.name??"workspace",version:t.version??"0.0.0"}}catch{return{name:"workspace",version:"0.0.0"}}}function an(e,t,r){let n=r.split("/").map(i=>`\`${i.replaceAll("`","")}\``).join("/");return`scip-vue npm ${e} ${t} ${n}/default.`}async function pn(e){let{projectRoot:t,maxHeapMb:r=8192,onStatus:n=console.log,skipAutoInstall:i=!1}=e,s=e.outputScip??W(t,"index.scip"),a=e.outputDb??W(t,"index.db"),c=Date.now(),o=e.languages??_(t);if(o.length===0)throw new Error("No supported languages detected in this project. Looked for: tsconfig.json, Cargo.toml, go.mod, pyproject.toml, etc.");if(n(`Detected languages: ${o.join(", ")}`),!v("scip")){if(i)throw new Error(`The scip CLI is required but not found on PATH.
128
- Install from: https://github.com/sourcegraph/scip/releases`);if(n("scip CLI not found on PATH. Attempting auto-install..."),!j(n))throw new Error(`The scip CLI is required but could not be installed.
129
- Install manually from: https://github.com/sourcegraph/scip/releases`)}let u={...process.env,NODE_OPTIONS:`--max-old-space-size=${r}`},d=o.map((l,m)=>({language:l,scipPath:o.length>1?mn(s,l,m):s})),g=[],p=[];for(let{language:l,scipPath:m}of d){let h=N(l),f=F(h),S=Z(h,t);if(!S&&!O(h)){if(i){let x=`${f} not found on PATH (auto-install disabled). ${h.installUrl??""}`.trim();n(`Skipping ${l}: ${x}`),p.push({language:l,reason:x});continue}if(n(`${f} not found. Attempting auto-install...`),!A(h,n)){let x=`${f} could not be auto-installed. ${h.installUrl?`Install manually from ${h.installUrl}`:`Install ${f} and put it on PATH.`}`;n(`Skipping ${l}: ${x}`),p.push({language:l,reason:x});continue}}let b=S??R(h);if(!b){let x=`${f} was not found after installation checks.`;n(`Skipping ${l}: ${x}`),p.push({language:l,reason:x});continue}n(`Indexing ${l} with ${b}...`);let k=ee(h,u,b),{binary:V,args:Ve}=h.indexArgs({projectRoot:t,outputPath:m,pnpmWorkspaces:e.pnpmWorkspaces,indexerBinary:b});try{je(V,Ve,{cwd:t,env:k,stdio:"pipe",maxBuffer:50*1024*1024})}catch(x){let Ue=x instanceof Error?x.message:String(x),oe=`${b} indexer failed: ${Ue.split(`
130
- `)[0]}`;n(`Skipping ${l}: ${oe}`),p.push({language:l,reason:oe});continue}dn(h,t,m),g.push({language:l,scipPath:m})}if(g.length===0){let l=p.map(m=>` - ${m.language}: ${m.reason}`).join(`
137
+ `),s=new Set,o=0,a=0;for(let u of t){let c=$e(u);if(s.has(c))continue;s.add(c);let g=n.get(u.sourceFile);if(!g)continue;let l=r.run(g,a++,u.sourceLine,u.sourceLine),d=i.run(Number(l.lastInsertRowid),u.symbolId);o+=Number(d.changes)}return o}function*mr(e){let t=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,n=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=t.exec(e);){let i=r[0];n.has(i)||(yield{text:i,start:r.index,end:r.index+i.length})}}function hr(e,t){for(let[n]of e.toGeneratedLocation(t,r=>!!r.navigation))return n;return null}function Be(e,t){let n=e;for(let[r]of n.toSourceLocation(t,i=>!!i.navigation))return r;return null}function We(e,t){let n=0,r=e.lineStarts.length-1;for(;n<=r;){let s=Math.floor((n+r)/2);e.lineStarts[s]<=t?n=s+1:r=s-1}let i=Math.max(0,r);return{line:i,character:t-e.lineStarts[i]}}function br(e,t){return C(e,t).startsWith("node_modules/")}function C(e,t){return Tn(e,t).replaceAll("\\","/")}function yr(e){switch(On(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 xr(){let e=new Map;return t=>{if(e.has(t))return e.get(t)??null;try{let n=w(t,"utf-8"),r={text:n,lineStarts:Sr(n)};return e.set(t,r),r}catch{return e.set(t,null),null}}}function Sr(e){let t=[0];for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&t.push(n+1);return t}function vr(e,t){let n=new Map,r=500;for(let i=0;i<t.length;i+=r){let s=t.slice(i,i+r),o=e.prepare(`SELECT id, relative_path AS relativePath FROM documents WHERE relative_path IN (${s.map(()=>"?").join(",")})`).all(...s);for(let a of o)n.set(a.relativePath,a.id)}return n}function Rr(e){try{let t=JSON.parse(w(S(e,"package.json"),"utf-8"));return{name:t.name??"workspace",version:t.version??"0.0.0"}}catch{return{name:"workspace",version:"0.0.0"}}}function Ir(e,t,n){let r=n.split("/").map(i=>`\`${i.replaceAll("`","")}\``).join("/");return`scip-vue npm ${e} ${t} ${r}/default.`}async function Dr(e){let{projectRoot:t,maxHeapMb:n=8192,onStatus:r=console.log,skipAutoInstall:i=!1}=e,s=Fr(e),o=Date.now();Ue(b(s.outputScip),{recursive:!0}),Ue(b(s.outputDb),{recursive:!0});let a=e.languages??D(t);if(a.length===0)throw new Error("No supported languages detected in this project. Looked for: tsconfig.json, Cargo.toml, go.mod, pyproject.toml, etc.");r(`Detected languages: ${a.join(", ")}`);let u=ni(t,a,{pnpmWorkspaces:e.pnpmWorkspaces}),c=Kr(p(b(s.outputDb),"index.lock")),g=null;try{let l=Nr({opts:e,paths:s,languages:a,fingerprint:u,start:o,onStatus:r});if(l)return l;Vr(i,r);let d=jr(s);return g=d.runDir,await Mr({opts:e,languages:a,projectRoot:t,paths:s,tempPaths:d,fingerprint:u,start:o,maxHeapMb:n,skipAutoInstall:i,onStatus:r})}finally{g&&R(g,{recursive:!0,force:!0}),c()}}function Fr(e){let t=e.outputScip??p(e.projectRoot,"index.scip"),n=e.outputDb??p(e.projectRoot,"index.db");return{outputScip:t,outputDb:n,metaPath:p(b(n),"meta.json")}}function Nr(e){if(e.opts.skipIfUnchanged===!1||!y(e.paths.outputScip)||!y(e.paths.outputDb)||!ri(e.paths.metaPath,e.fingerprint))return null;m({projectRoot:e.opts.projectRoot,dbPath:e.paths.outputDb,onStatus:e.onStatus});let t=Date.now()-e.start;return e.onStatus(`Index unchanged; reused existing SQLite index in ${(t/1e3).toFixed(1)}s`),{languages:e.languages,indexPath:e.paths.outputScip,dbPath:e.paths.outputDb,durationMs:t,reused:!0,skipped:[]}}function jr(e){let t=Cr(p(b(e.outputDb),"reindex-"));return{runDir:t,tempOutputScip:p(t,W(e.outputScip)),tempOutputDb:p(t,W(e.outputDb)),tempMetaPath:p(t,W(e.metaPath))}}async function Mr(e){let t={...process.env,NODE_OPTIONS:`--max-old-space-size=${e.maxHeapMb}`},{indexedOutputs:n,skippedLanguages:r}=await _r(e,t);Ar(e,t,n,r);let i=Date.now()-e.start;return e.onStatus(`Done in ${(i/1e3).toFixed(1)}s`),{languages:n.map(s=>s.language),indexPath:e.paths.outputScip,dbPath:e.paths.outputDb,durationMs:i,reused:!1,skipped:r}}async function _r(e,t){let{preparedRuns:n,skippedLanguages:r}=$r({languages:e.languages,tempOutputScip:e.tempPaths.tempOutputScip,projectRoot:e.projectRoot,env:t,skipAutoInstall:e.skipAutoInstall,pnpmWorkspaces:e.opts.pnpmWorkspaces,onStatus:e.onStatus}),i=await Zr(n,e.projectRoot,e.onStatus,e.opts.indexerConcurrency),{indexedOutputs:s}=Wr(i,r);return Ur(s,r,e.languages,e.opts.allowPartial,e.onStatus),{indexedOutputs:s,skippedLanguages:r}}function Ar(e,t,n,r){Hr(n,e.tempPaths.tempOutputScip,e.onStatus),Gr(e.tempPaths.tempOutputScip,e.tempPaths.tempOutputDb,t,e.onStatus),m({projectRoot:e.projectRoot,dbPath:e.tempPaths.tempOutputDb,onStatus:e.onStatus}),ii(e.tempPaths.tempMetaPath,{version:2,status:r.length===0?"complete":"partial",updatedAt:new Date().toISOString(),fingerprint:e.fingerprint,requestedLanguages:e.languages,indexedLanguages:n.map(i=>i.language),skipped:[...r]}),Qr({tempOutputScip:e.tempPaths.tempOutputScip,tempOutputDb:e.tempPaths.tempOutputDb,tempMetaPath:e.tempPaths.tempMetaPath,outputScip:e.paths.outputScip,outputDb:e.paths.outputDb,metaPath:e.paths.metaPath})}function Vr(e,t){if(!h("scip")){if(e)throw new Error(`The scip CLI is required but not found on PATH.
138
+ Install from: https://github.com/sourcegraph/scip/releases`);if(t("scip CLI not found on PATH. Attempting auto-install..."),!T(t))throw new Error(`The scip CLI is required but could not be installed.
139
+ Install manually from: https://github.com/sourcegraph/scip/releases`)}}function $r(e){let t=[],n=[],r=e.languages.map((i,s)=>({language:i,scipPath:e.languages.length>1?Xr(e.tempOutputScip,i,s):e.tempOutputScip}));for(let{language:i,scipPath:s}of r){let o=Br({...e,language:i,scipPath:s});"skipped"in o?n.push(o.skipped):t.push(o.prepared)}return{preparedRuns:t,skippedLanguages:n}}function Br(e){let t=F(e.language),n=A(t),r=ee(t,e.projectRoot);if(!r&&!V(t)){if(e.skipAutoInstall){let a=`${n} not found on PATH (auto-install disabled). ${t.installUrl??""}`.trim();return e.onStatus(`Skipping ${e.language}: ${a}`),{skipped:{language:e.language,reason:a}}}if(e.onStatus(`${n} not found. Attempting auto-install...`),!$(t,e.onStatus)){let a=`${n} could not be auto-installed. ${t.installUrl?`Install manually from ${t.installUrl}`:`Install ${n} and put it on PATH.`}`;return e.onStatus(`Skipping ${e.language}: ${a}`),{skipped:{language:e.language,reason:a}}}}let i=r??P(t);if(!i){let a=`${n} was not found after installation checks.`;return e.onStatus(`Skipping ${e.language}: ${a}`),{skipped:{language:e.language,reason:a}}}let{binary:s,args:o}=t.indexArgs({projectRoot:e.projectRoot,outputPath:e.scipPath,pnpmWorkspaces:e.pnpmWorkspaces,indexerBinary:i});return{prepared:{language:e.language,scipPath:e.scipPath,config:t,resolvedBinary:i,binary:s,args:o,env:te(t,e.env,i)}}}function Wr(e,t){let n=[];for(let r of e)r.skipped?t.push(r.skipped):n.push({language:r.language,scipPath:r.scipPath});return{indexedOutputs:n}}function Ur(e,t,n,r,i){if(e.length===0){let s=t.map(o=>` - ${o.language}: ${o.reason}`).join(`
131
140
  `);throw new Error(`No language indexers ran successfully. Install at least one indexer for the languages in this project.
132
- `+l)}if(p.length>0&&n(`Indexed ${g.length} of ${o.length} languages; skipped ${p.map(l=>l.language).join(", ")}.`),o.length>1&&(g.length>1?(n(`Merging ${g.length} language indexes...`),D(g.map(l=>l.scipPath),s)):g[0].scipPath!==s&&Ne(g[0].scipPath,s)),n("Converting to SQLite..."),!_e(s))throw new Error(`SCIP index not found at ${s} after indexing`);try{je("scip",["expt-convert","--output",a,s],{env:u,stdio:"pipe",maxBuffer:50*1024*1024})}catch(l){let m=l instanceof Error?l.message:String(l);throw new Error(`Failed to convert SCIP index to SQLite: ${m}`,{cause:l})}finally{for(let{scipPath:l}of d)l!==s&&ln(l,{force:!0})}w({projectRoot:t,dbPath:a,onStatus:n});let y=Date.now()-c;return n(`Done in ${(y/1e3).toFixed(1)}s`),{languages:g.map(l=>l.language),indexPath:s,dbPath:a,durationMs:y,skipped:p}}function dn(e,t,r){if(!e.defaultOutputPath)return;let n=W(t,e.defaultOutputPath);r!==n&&_e(n)&&Ne(n,r)}function mn(e,t,r){let n=gn(e)||".scip",i=cn(e,n);return W(un(e),`${i}.${r+1}.${t}${n}`)}import{readFileSync as fn,writeFileSync as hn,existsSync as Te,mkdirSync as yn}from"fs";import{join as I,resolve as De}from"path";import{createHash as xn}from"crypto";import{homedir as bn}from"os";var Fe=".scipquery.json",Sn={enabled:!1,debounceMs:3e4,cooldownMs:6e4,ignore:[]};function vn(e){let t=I(e,Fe);if(!Te(t))return{};try{let r=fn(t,"utf-8");return JSON.parse(r)}catch{return{}}}function Oe(e){return{...Sn,...e.watch}}function Ae(e,t){let r=process.env.SCIP_QUERY_CACHE_DIR;if(r)return te(r);if(t?.dbPath)return te(De(e,t.dbPath));let i=process.env.XDG_CACHE_HOME||I(bn(),".cache"),s=xn("sha256").update(De(e)).digest("hex").slice(0,12),a=I(i,"scip-query","projects",s);return te(a)}function ne(e,t){let r=Ae(e,t);return{cacheDir:r,dbPath:I(r,"index.db"),indexPath:I(r,"index.scip"),metaPath:I(r,"meta.json")}}function In(e,t){let r=I(e,Fe);return Te(r)||hn(r,JSON.stringify({languages:t,watch:{enabled:!1,debounceMs:3e4,cooldownMs:6e4}},null,2)+`
133
- `),r}function te(e){return yn(e,{recursive:!0}),e}import{watch as wn}from"fs";import{existsSync as $e,renameSync as Me}from"fs";import{join as kn,relative as Cn}from"path";import{fork as En}from"child_process";import Rn from"ignore";var re=class{projectRoot;watchConfig;indexPaths;languages;pnpmWorkspaces;onStatus;onReindexComplete;onError;status={state:"idle"};debounceTimer=null;cooldownTimer=null;dirty=!1;changedFiles=0;reindexInFlight=!1;lastReindexEnd=0;fsWatchers=[];gitignoreFilter;extraIgnore;stopped=!1;constructor(t){this.projectRoot=t.projectRoot,this.watchConfig=Oe(t.config),this.indexPaths=ne(t.projectRoot,t.config),this.languages=t.languages,this.pnpmWorkspaces=t.config.indexer?.typescript?.pnpmWorkspaces??!1,this.onStatus=t.onStatus??(()=>{}),this.onReindexComplete=t.onReindexComplete??(()=>{}),this.onError=t.onError??(r=>console.error(r.message)),this.gitignoreFilter=C(t.projectRoot),this.extraIgnore=Rn(),this.watchConfig.ignore.length>0&&this.extraIgnore.add(this.watchConfig.ignore)}start(){this.stopped=!1,this.setStatus({state:"idle"});try{let t=wn(this.projectRoot,{recursive:!0},(r,n)=>{n&&!this.stopped&&this.handleFileChange(n)});this.fsWatchers.push(t)}catch{this.onError(new Error("Failed to start file watcher. On Linux, you may need to increase inotify limits: sysctl -w fs.inotify.max_user_watches=524288"))}}stop(){this.stopped=!0;for(let t of this.fsWatchers)t.close();this.fsWatchers=[],this.debounceTimer&&clearTimeout(this.debounceTimer),this.cooldownTimer&&clearTimeout(this.cooldownTimer),this.setStatus({state:"idle"})}handleFileChange(t){let r=Cn(this.projectRoot,kn(this.projectRoot,t));if(this.gitignoreFilter.isIgnored(r)||this.extraIgnore.ignores(r)||t.endsWith("index.db")||t.endsWith("index.scip")||t.endsWith("index.db.tmp")||t.endsWith(".scipquery.json"))return;if(this.changedFiles++,this.reindexInFlight){this.dirty=!0,this.setStatus({state:"indexing",startedAt:this.status.startedAt});return}if(this.status.state==="cooldown"){this.dirty=!0,this.setStatus({state:"cooldown",until:this.status.until,dirty:!0});return}this.debounceTimer&&clearTimeout(this.debounceTimer);let n=Date.now()+this.watchConfig.debounceMs;this.setStatus({state:"waiting",changedFiles:this.changedFiles,reindexAt:n}),this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.triggerReindex()},this.watchConfig.debounceMs)}triggerReindex(){if(this.reindexInFlight||this.stopped)return;let t=Date.now()-this.lastReindexEnd;if(this.lastReindexEnd>0&&t<this.watchConfig.cooldownMs){let n=this.watchConfig.cooldownMs-t;this.dirty=!0;let i=Date.now()+n;this.setStatus({state:"cooldown",until:i,dirty:!0}),this.cooldownTimer=setTimeout(()=>{this.cooldownTimer=null,this.dirty&&!this.stopped&&(this.dirty=!1,this.triggerReindex())},n);return}this.reindexInFlight=!0,this.dirty=!1,this.changedFiles=0;let r=Date.now();this.setStatus({state:"indexing",startedAt:r}),this.runReindex().then(n=>{if(this.reindexInFlight=!1,this.lastReindexEnd=Date.now(),this.onReindexComplete(n),this.dirty&&!this.stopped){let i=Date.now()+this.watchConfig.cooldownMs;this.setStatus({state:"cooldown",until:i,dirty:!0}),this.cooldownTimer=setTimeout(()=>{this.cooldownTimer=null,this.dirty&&!this.stopped?(this.dirty=!1,this.triggerReindex()):this.setStatus({state:"idle"})},this.watchConfig.cooldownMs)}else this.setStatus({state:"idle"})}).catch(n=>{this.reindexInFlight=!1,this.lastReindexEnd=Date.now(),this.onError(n instanceof Error?n:new Error(String(n))),this.setStatus({state:"idle"})})}runReindex(){return new Promise((t,r)=>{let n=Date.now(),i=this.indexPaths.dbPath+".tmp",s=Pn(this.indexPaths.indexPath),a=En(new URL("./reindex-worker.js",import.meta.url).pathname,[],{env:{...process.env,SCIP_REINDEX_PROJECT_ROOT:this.projectRoot,SCIP_REINDEX_OUTPUT_SCIP:s,SCIP_REINDEX_OUTPUT_DB:i,SCIP_REINDEX_LANGUAGES:this.languages?.join(",")??"",SCIP_REINDEX_PNPM_WORKSPACES:this.pnpmWorkspaces?"1":""},stdio:"pipe"});a.on("exit",c=>{if(c===0)try{$e(i)&&Me(i,this.indexPaths.dbPath),$e(s)&&Me(s,this.indexPaths.indexPath),t(Date.now()-n)}catch(o){r(new Error(`Atomic swap failed: ${o}`))}else r(new Error(`Reindex worker exited with code ${c}`))}),a.on("error",r)})}setStatus(t){this.status=t,this.onStatus(t)}};function Pn(e){return e.endsWith(".scip")?e.slice(0,-5)+".tmp.scip":e+".tmp.scip"}import{existsSync as ie,mkdirSync as Ln,symlinkSync as jn,readlinkSync as _n,unlinkSync as Nn}from"fs";import{join as B,dirname as We,resolve as se}from"path";import{homedir as Be,platform as Dn}from"os";import{fileURLToPath as Tn}from"url";var Fn=Dn()==="win32",On=["concrete-plan","scip-explore","scip-debloat","scip-verify","scip-language-playbook"];function An(e={}){let t=e.quiet?()=>{}:console.log,r=Tn(import.meta.url),n=se(We(r),"..","skills"),i=[B(Be(),".claude","skills"),B(Be(),".codex","skills")],s={installed:[],skipped:[],alreadyLinked:[]};for(let a of i){let c=We(a);if(!ie(c))continue;Ln(a,{recursive:!0});let o=a.includes(".codex")?"Codex":"Claude";for(let u of On){let d=B(n,u),g=B(a,u);if(!ie(d)){s.skipped.push(`${o}/${u}`);continue}if(ie(g)){try{let p=_n(g);if(se(p)===se(d)){s.alreadyLinked.push(`${o}/${u}`),t(` ok: ${u} \u2192 ${o} (already linked)`);continue}}catch{s.skipped.push(`${o}/${u}`),t(` skip: ${u} \u2192 ${o} (exists, not a symlink)`);continue}Nn(g)}jn(d,g,Fn?"junction":"dir"),s.installed.push(`${o}/${u}`),t(` done: ${u} \u2192 ${o}`)}}return s}export{X as INDEXER_CONFIGS,U as ScipDatabase,re as Watcher,Sr as affected,w as augmentAuxiliaryDocuments,Pe as augmentVueResolvedReferences,lr as bottlenecks,ur as byKind,mr as callGraph,vr as changeSurface,jr as code,_r as complexity,Rr as complexityHotspots,Lr as convergence,sr as coupling,C as createGitignoreFilter,ar as cycles,Nr as dataflow,Jn as dead,pr as deepChains,Hn as deps,_ as detectLanguages,Ir as diffImpact,wr as drift,br as extractCandidates,tr as fanIn,nr as fanOut,Mn as files,N as getIndexerConfig,rt as getScipVersion,Pr as health,dr as hierarchy,Xn as hotspots,Qn as importedBy,Kn as imports,In as initProjectConfig,An as installSkills,v as isBinaryAvailable,O as isIndexerInstalled,nt as isScipInstalled,cr as isolated,gr as kindCounts,qe as leafName,vn as loadProjectConfig,er as members,D as mergeScipFiles,Q as mergeScipIndexes,Bn as methods,Zn as outline,He as parseSymbol,Cr as passthroughCandidates,st as printScipInstallInstructions,Gn as rdeps,Tr as redundantReexports,Vn as refs,pn as reindex,Ae as resolveCacheDir,ne as resolveIndexPaths,Ge as shortenSymbol,fr as similar,hr as similarAll,xr as similarChains,yr as similarFiles,Fr as similarSignatures,Dr as slice,Er as staleAbstractions,$n as stats,zn as surface,Wn as symbols,qn as system,or as topCoupling,rr as topFanIn,ir as topFanOut,Un as trace,A as tryInstallIndexer,j as tryInstallScipCli,Yn as unusedImports,kr as wrapperCandidates};
141
+ `+s)}if(t.length!==0&&(i(`Indexed ${e.length} of ${n.length} languages; skipped ${t.map(s=>s.language).join(", ")}.`),!r))throw new Error(`Failed to index all required languages; preserving the previous index. Pass --allow-partial to intentionally write an incomplete index.
142
+ `+t.map(s=>` - ${s.language}: ${s.reason}`).join(`
143
+ `))}function Hr(e,t,n){e.length>1?(n(`Merging ${e.length} language indexes...`),N(e.map(r=>r.scipPath),t)):e[0].scipPath!==t&&v(e[0].scipPath,t)}function Gr(e,t,n,r){if(r("Converting to SQLite..."),!y(e))throw new Error(`SCIP index not found at ${e} after indexing`);try{let i=Ee(e);i.removedDefinitionOccurrences>0&&r(`Sanitized ${i.removedDefinitionOccurrences} invalid definition occurrences across ${i.touchedDocuments} documents before SQLite conversion.`),Pr("scip",["expt-convert","--output",t,e],{env:n,stdio:"pipe",maxBuffer:50*1024*1024})}catch(i){let s=i instanceof Error?i.message:String(i);throw new Error(`Failed to convert SCIP index to SQLite: ${s}`,{cause:i})}}function qr(e,t,n){if(!e.defaultOutputPath)return;let r=p(t,e.defaultOutputPath);n!==r&&y(r)&&v(r,n)}function Jr(e,t,n){if(!e.defaultOutputPath)return null;let r=p(t,e.defaultOutputPath);if(r===n)return null;let i=`${n}.default-output-backup`;return R(i,{force:!0}),y(r)?(v(r,i),{defaultOutputPath:r,backupPath:i}):{defaultOutputPath:r,backupPath:null}}function zr(e){e&&(R(e.defaultOutputPath,{force:!0}),e.backupPath&&y(e.backupPath)&&v(e.backupPath,e.defaultOutputPath))}function Xr(e,t,n){let r=Lr(e)||".scip",i=W(e,r);return p(b(e),`${i}.${n+1}.${t}${r}`)}function Kr(e){let t;try{t=Er(e,"wx")}catch(n){throw(typeof n=="object"&&n&&"code"in n?n.code:void 0)==="EEXIST"?new Error(`Another scip-query reindex is already running for ${b(e)}.`,{cause:n}):n}return He(t,JSON.stringify({pid:process.pid,startedAt:new Date().toISOString()})+`
144
+ `),()=>{try{wr(t)}finally{R(e,{force:!0})}}}function Qr(e){ie(e.tempOutputScip,e.outputScip),ie(e.tempOutputDb,e.outputDb),ie(e.tempMetaPath,e.metaPath)}function ie(e,t){R(`${t}.tmp-replace`,{force:!0}),v(e,`${t}.tmp-replace`),v(`${t}.tmp-replace`,t)}function Yr(e,t){if(e<=1)return 1;let n=Number(process.env.SCIP_QUERY_INDEXER_CONCURRENCY??0),r=Number.isFinite(t)&&t&&t>0?t:Number.isFinite(n)&&n>0?n:Math.min(2,Math.max(1,Tr().length-1));return Math.max(1,Math.min(e,Math.floor(r)))}async function Zr(e,t,n,r){let i=e.filter(c=>c.config.defaultOutputPath),s=e.filter(c=>!c.config.defaultOutputPath),o=[],a=Yr(s.length,r),u=await ti(s,a,c=>se(c,t,n));if(a>1){let c=new Map;for(let g of u.filter(l=>l.skipped)){let l=s.find(d=>d.language===g.language);l&&(n(`Retrying ${l.language} indexer serially after parallel failure...`),c.set(l.language,await se(l,t,n)))}o.push(...u.map(g=>c.get(g.language)??g))}else o.push(...u);for(let c of i)o.push(await se(c,t,n));return o.sort((c,g)=>e.findIndex(l=>l.language===c.language)-e.findIndex(l=>l.language===g.language))}async function se(e,t,n){n(`Indexing ${e.language} with ${e.resolvedBinary}...`),R(e.scipPath,{force:!0});let r=Jr(e.config,t,e.scipPath);try{await ei(e.binary,e.args,{cwd:t,env:e.env,maxBuffer:50*1024*1024}),qr(e.config,t,e.scipPath)}catch(i){let s=i instanceof Error?i.message:String(i),o=`${e.resolvedBinary} indexer failed: ${s.split(`
145
+ `)[0]}`;return n(`Skipping ${e.language}: ${o}`),{language:e.language,scipPath:e.scipPath,skipped:{language:e.language,reason:o}}}finally{zr(r)}if(!y(e.scipPath)){let i=`${e.resolvedBinary} indexer completed but did not produce ${e.scipPath}`;return n(`Skipping ${e.language}: ${i}`),{language:e.language,scipPath:e.scipPath,skipped:{language:e.language,reason:i}}}return{language:e.language,scipPath:e.scipPath}}function ei(e,t,n){return new Promise((r,i)=>{kr(e,[...t],n,s=>{s?i(s):r()})})}async function ti(e,t,n){if(e.length===0)return[];let r=new Array(e.length),i=0,s=Math.max(1,Math.min(e.length,t)),o=Array.from({length:s},async()=>{for(;i<e.length;){let a=i++;r[a]=await n(e[a])}});return await Promise.all(o),r}function ni(e,t,n){return{version:1,languages:[...t].sort(),pnpmWorkspaces:n.pnpmWorkspaces===!0,files:j(e)}}function ri(e,t){try{let n=JSON.parse(Or(e,"utf-8"));return n.version===2&&n.status==="complete"&&B(n.fingerprint)===B(t)&&B([...n.indexedLanguages??[]].sort())===B(t.languages)}catch{return!1}}function ii(e,t){He(e,`${JSON.stringify(t,null,2)}
146
+ `)}function B(e){return JSON.stringify(e)}import{readFileSync as si,writeFileSync as oi,existsSync as qe,mkdirSync as ai}from"fs";import{join as x,resolve as Ge}from"path";import{createHash as ui}from"crypto";import{homedir as ci}from"os";var Je=".scipquery.json",li={enabled:!1,debounceMs:3e4,cooldownMs:6e4,ignore:[]};function gi(e){let t=x(e,Je);if(!qe(t))return{};try{let n=si(t,"utf-8");return JSON.parse(n)}catch{return{}}}function ze(e){return{...li,...e.watch}}function di(e,t){let n=process.env.SCIP_QUERY_CACHE_DIR;if(n)return oe(n);if(t?.dbPath)return oe(Ge(e,t.dbPath));let i=process.env.XDG_CACHE_HOME||x(ci(),".cache"),s=ui("sha256").update(Ge(e)).digest("hex").slice(0,12),o=x(i,"scip-query","projects",s);return oe(o)}function ae(e,t){let n=di(e,t);return{cacheDir:n,dbPath:x(n,"index.db"),indexPath:x(n,"index.scip"),metaPath:x(n,"meta.json")}}function pi(e,t){let n=x(e,Je);return qe(n)||oi(n,JSON.stringify({languages:t,watch:{enabled:!1,debounceMs:3e4,cooldownMs:6e4}},null,2)+`
147
+ `),n}function oe(e){return ai(e,{recursive:!0}),e}import{watch as fi}from"fs";import{existsSync as Xe,renameSync as Ke}from"fs";import{join as mi,relative as hi}from"path";import{fork as bi}from"child_process";import yi from"ignore";var ue=class{projectRoot;watchConfig;indexPaths;languages;pnpmWorkspaces;onStatus;onReindexComplete;onError;status={state:"idle"};debounceTimer=null;cooldownTimer=null;dirty=!1;changedFiles=0;reindexInFlight=!1;lastReindexEnd=0;fsWatchers=[];gitignoreFilter;extraIgnore;stopped=!1;constructor(t){this.projectRoot=t.projectRoot,this.watchConfig=ze(t.config),this.indexPaths=ae(t.projectRoot,t.config),this.languages=t.languages,this.pnpmWorkspaces=t.config.indexer?.typescript?.pnpmWorkspaces??!1,this.onStatus=t.onStatus??(()=>{}),this.onReindexComplete=t.onReindexComplete??(()=>{}),this.onError=t.onError??(n=>console.error(n.message)),this.gitignoreFilter=I(t.projectRoot),this.extraIgnore=yi(),this.watchConfig.ignore.length>0&&this.extraIgnore.add(this.watchConfig.ignore)}start(){this.stopped=!1,this.setStatus({state:"idle"});try{let t=fi(this.projectRoot,{recursive:!0},(n,r)=>{r&&!this.stopped&&this.handleFileChange(r)});this.fsWatchers.push(t)}catch{this.onError(new Error("Failed to start file watcher. On Linux, you may need to increase inotify limits: sysctl -w fs.inotify.max_user_watches=524288"))}}stop(){this.stopped=!0;for(let t of this.fsWatchers)t.close();this.fsWatchers=[],this.debounceTimer&&clearTimeout(this.debounceTimer),this.cooldownTimer&&clearTimeout(this.cooldownTimer),this.setStatus({state:"idle"})}handleFileChange(t){let n=hi(this.projectRoot,mi(this.projectRoot,t));if(this.gitignoreFilter.isIgnored(n)||this.extraIgnore.ignores(n)||t.endsWith("index.db")||t.endsWith("index.scip")||t.endsWith("index.db.tmp")||t.endsWith(".scipquery.json"))return;if(this.changedFiles++,this.reindexInFlight){this.dirty=!0,this.setStatus({state:"indexing",startedAt:this.status.startedAt});return}if(this.status.state==="cooldown"){this.dirty=!0,this.setStatus({state:"cooldown",until:this.status.until,dirty:!0});return}this.debounceTimer&&clearTimeout(this.debounceTimer);let r=Date.now()+this.watchConfig.debounceMs;this.setStatus({state:"waiting",changedFiles:this.changedFiles,reindexAt:r}),this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.triggerReindex()},this.watchConfig.debounceMs)}triggerReindex(){if(this.reindexInFlight||this.stopped)return;let t=Date.now()-this.lastReindexEnd;if(this.lastReindexEnd>0&&t<this.watchConfig.cooldownMs){let r=this.watchConfig.cooldownMs-t;this.dirty=!0;let i=Date.now()+r;this.setStatus({state:"cooldown",until:i,dirty:!0}),this.cooldownTimer=setTimeout(()=>{this.cooldownTimer=null,this.dirty&&!this.stopped&&(this.dirty=!1,this.triggerReindex())},r);return}this.reindexInFlight=!0,this.dirty=!1,this.changedFiles=0;let n=Date.now();this.setStatus({state:"indexing",startedAt:n}),this.runReindex().then(r=>{if(this.reindexInFlight=!1,this.lastReindexEnd=Date.now(),this.onReindexComplete(r),this.dirty&&!this.stopped){let i=Date.now()+this.watchConfig.cooldownMs;this.setStatus({state:"cooldown",until:i,dirty:!0}),this.cooldownTimer=setTimeout(()=>{this.cooldownTimer=null,this.dirty&&!this.stopped?(this.dirty=!1,this.triggerReindex()):this.setStatus({state:"idle"})},this.watchConfig.cooldownMs)}else this.setStatus({state:"idle"})}).catch(r=>{this.reindexInFlight=!1,this.lastReindexEnd=Date.now(),this.onError(r instanceof Error?r:new Error(String(r))),this.setStatus({state:"idle"})})}runReindex(){return new Promise((t,n)=>{let r=Date.now(),i=this.indexPaths.dbPath+".tmp",s=xi(this.indexPaths.indexPath),o=bi(new URL("./reindex-worker.js",import.meta.url).pathname,[],{env:{...process.env,SCIP_REINDEX_PROJECT_ROOT:this.projectRoot,SCIP_REINDEX_OUTPUT_SCIP:s,SCIP_REINDEX_OUTPUT_DB:i,SCIP_REINDEX_LANGUAGES:this.languages?.join(",")??"",SCIP_REINDEX_PNPM_WORKSPACES:this.pnpmWorkspaces?"1":""},stdio:"pipe"});o.on("exit",a=>{if(a===0)try{Xe(i)&&Ke(i,this.indexPaths.dbPath),Xe(s)&&Ke(s,this.indexPaths.indexPath),t(Date.now()-r)}catch(u){n(new Error(`Atomic swap failed: ${u}`))}else n(new Error(`Reindex worker exited with code ${a}`))}),o.on("error",n)})}setStatus(t){this.status=t,this.onStatus(t)}};function xi(e){return e.endsWith(".scip")?e.slice(0,-5)+".tmp.scip":e+".tmp.scip"}import{existsSync as ce,mkdirSync as Si,symlinkSync as vi,readlinkSync as Ri,unlinkSync as Ii}from"fs";import{join as U,dirname as Qe,resolve as le}from"path";import{homedir as Ye,platform as ki}from"os";import{fileURLToPath as Pi}from"url";var wi=ki()==="win32",Ci=["concrete-plan","scip-explore","scip-debloat","scip-verify","scip-language-playbook"];function Ei(e={}){let t=e.quiet?()=>{}:console.log,n=Pi(import.meta.url),r=le(Qe(n),"..","skills"),i=[U(Ye(),".claude","skills"),U(Ye(),".codex","skills")],s={installed:[],skipped:[],alreadyLinked:[]};for(let o of i){let a=Qe(o);if(!ce(a))continue;Si(o,{recursive:!0});let u=o.includes(".codex")?"Codex":"Claude";for(let c of Ci){let g=U(r,c),l=U(o,c);if(!ce(g)){s.skipped.push(`${u}/${c}`);continue}if(ce(l)){try{let d=Ri(l);if(le(d)===le(g)){s.alreadyLinked.push(`${u}/${c}`),t(` ok: ${c} \u2192 ${u} (already linked)`);continue}}catch{s.skipped.push(`${u}/${c}`),t(` skip: ${c} \u2192 ${u} (exists, not a symlink)`);continue}Ii(l)}vi(g,l,wi?"junction":"dir"),s.installed.push(`${u}/${c}`),t(` done: ${c} \u2192 ${u}`)}}return s}export{X as INDEXER_CONFIGS,rt as ProjectIndex,H as ScipDatabase,ue as Watcher,gs as affected,m as augmentAuxiliaryDocuments,Me as augmentVueResolvedReferences,Zi as bottlenecks,ts as byKind,ss as callGraph,ds as changeSurface,vs as code,Rs as complexity,ys as complexityHotspots,Ss as convergence,Ki as coupling,I as createGitignoreFilter,Yi as cycles,Is as dataflow,Vi as dead,rs as deepChains,ji as deps,D as detectLanguages,ps as diffImpact,fs as drift,ls as extractCandidates,qi as fanIn,Ji as fanOut,Ti as files,F as getIndexerConfig,ft as getScipVersion,xs as health,is as hierarchy,$i as hotspots,Wi as importedBy,Bi as imports,pi as initProjectConfig,Ei as installSkills,h as isBinaryAvailable,V as isIndexerInstalled,pt as isScipInstalled,es as isolated,ns as kindCounts,nt as leafName,gi as loadProjectConfig,Gi as members,N as mergeScipFiles,Q as mergeScipIndexes,Di as methods,Hi as outline,et as parseSymbol,hs as passthroughCandidates,ht as printScipInstallInstructions,Mi as rdeps,Ps as redundantReexports,Fi as refs,Dr as reindex,ae as resolveIndexPaths,tt as shortenSymbol,os as similar,as as similarAll,cs as similarChains,us as similarFiles,ws as similarSignatures,ks as slice,bs as staleAbstractions,Oi as stats,Ai as surface,Li as symbols,_i as system,Qi as topCoupling,zi as topFanIn,Xi as topFanOut,Ni as trace,$ as tryInstallIndexer,T as tryInstallScipCli,Ui as unusedImports,ms as wrapperCandidates};
134
148
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as u,b as k,c as f,d as g}from"./chunk-4TYGGOLO.js";import{existsSync as p,mkdirSync as L,symlinkSync as v,readlinkSync as C,unlinkSync as b}from"fs";import{join as c,dirname as m,resolve as d}from"path";import{homedir as S,platform as q}from"os";import{fileURLToPath as R}from"url";var D=q()==="win32",N=["concrete-plan","scip-explore","scip-debloat","scip-verify","scip-language-playbook"];function T(t={}){let i=t.quiet?()=>{}:console.log,e=R(import.meta.url),I=d(m(e),"..","skills"),$=[c(S(),".claude","skills"),c(S(),".codex","skills")],s={installed:[],skipped:[],alreadyLinked:[]};for(let o of $){let h=m(o);if(!p(h))continue;L(o,{recursive:!0});let n=o.includes(".codex")?"Codex":"Claude";for(let l of N){let a=c(I,l),r=c(o,l);if(!p(a)){s.skipped.push(`${n}/${l}`);continue}if(p(r)){try{let x=C(r);if(d(x)===d(a)){s.alreadyLinked.push(`${n}/${l}`),i(` ok: ${l} \u2192 ${n} (already linked)`);continue}}catch{s.skipped.push(`${n}/${l}`),i(` skip: ${l} \u2192 ${n} (exists, not a symlink)`);continue}b(r)}v(a,r,D?"junction":"dir"),s.installed.push(`${n}/${l}`),i(` done: ${l} \u2192 ${n}`)}}return s}function y(){console.log("scip-query: installing skills...");let t=T({quiet:!1});if(t.installed.length+t.alreadyLinked.length>0&&console.log(`
2
+ import{a as u,b as k,c as f,d as g}from"./chunk-H4DXD2FB.js";import{existsSync as p,mkdirSync as L,symlinkSync as v,readlinkSync as C,unlinkSync as b}from"fs";import{join as c,dirname as m,resolve as d}from"path";import{homedir as S,platform as q}from"os";import{fileURLToPath as R}from"url";var D=q()==="win32",N=["concrete-plan","scip-explore","scip-debloat","scip-verify","scip-language-playbook"];function T(t={}){let i=t.quiet?()=>{}:console.log,e=R(import.meta.url),I=d(m(e),"..","skills"),$=[c(S(),".claude","skills"),c(S(),".codex","skills")],s={installed:[],skipped:[],alreadyLinked:[]};for(let o of $){let h=m(o);if(!p(h))continue;L(o,{recursive:!0});let n=o.includes(".codex")?"Codex":"Claude";for(let l of N){let a=c(I,l),r=c(o,l);if(!p(a)){s.skipped.push(`${n}/${l}`);continue}if(p(r)){try{let x=C(r);if(d(x)===d(a)){s.alreadyLinked.push(`${n}/${l}`),i(` ok: ${l} \u2192 ${n} (already linked)`);continue}}catch{s.skipped.push(`${n}/${l}`),i(` skip: ${l} \u2192 ${n} (exists, not a symlink)`);continue}b(r)}v(a,r,D?"junction":"dir"),s.installed.push(`${n}/${l}`),i(` done: ${l} \u2192 ${n}`)}}return s}function y(){console.log("scip-query: installing skills...");let t=T({quiet:!1});if(t.installed.length+t.alreadyLinked.length>0&&console.log(`
3
3
  ${t.installed.length} skill(s) installed, ${t.alreadyLinked.length} already linked.`),!u())console.log(`
4
4
  scip CLI not found on PATH. Attempting auto-install...`),g(console.log)||f();else{let e=k();console.log(`
5
5
  scip CLI: ${e??"installed"}`)}console.log("")}y();
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, A as AffectedResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, A as AffectedResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-RXGCTLHY.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as affected};
1
+ import{a}from"../chunk-M5QTG55L.js";import"../chunk-32R4VYYA.js";import"../chunk-PK4U6NWP.js";import"../chunk-WIIZF5FP.js";import"../chunk-KTCODJNQ.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as affected};
2
2
  //# sourceMappingURL=affected.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, B as BottleneckResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, B as BottleneckResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-2OXZVIED.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as bottlenecks};
1
+ import{a}from"../chunk-ROWAEEOD.js";import"../chunk-32R4VYYA.js";import"../chunk-PK4U6NWP.js";import"../chunk-WIIZF5FP.js";import"../chunk-KTCODJNQ.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as bottlenecks};
2
2
  //# sourceMappingURL=bottlenecks.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, a as ByKindResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, a as ByKindResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  declare function byKind(db: ScipDatabase, kindQuery: string, opts?: {
@@ -1,2 +1,2 @@
1
- import{a,b}from"../chunk-UGUBEKK5.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as byKind,b as kindCounts};
1
+ import{a,b}from"../chunk-7X7FLQC5.js";import"../chunk-QFZE73XF.js";export{a as byKind,b as kindCounts};
2
2
  //# sourceMappingURL=by-kind.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, C as CallGraphResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, C as CallGraphResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-OBPP5RRE.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as callGraph};
1
+ import{a}from"../chunk-LT2CPEQ4.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as callGraph};
2
2
  //# sourceMappingURL=call-graph.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, b as ChangeSurfaceResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, b as ChangeSurfaceResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-6QXYWGE5.js";import"../chunk-DX5YEUX4.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as changeSurface};
1
+ import{a}from"../chunk-XV3XUZ3X.js";import"../chunk-MO65UK5V.js";import"../chunk-32R4VYYA.js";import"../chunk-PK4U6NWP.js";import"../chunk-WIIZF5FP.js";import"../chunk-KTCODJNQ.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as changeSurface};
2
2
  //# sourceMappingURL=change-surface.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, c as CodeResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, c as CodeResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-VZHI3TUX.js";import"../chunk-DX5YEUX4.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as code};
1
+ import{a}from"../chunk-7LSCW7NF.js";import"../chunk-MO65UK5V.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as code};
2
2
  //# sourceMappingURL=code.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, d as ComplexityHotspot } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, d as ComplexityHotspot } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-Q2MCCKWZ.js";import"../chunk-5KWWENJZ.js";import"../chunk-56LPZC3S.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as complexityHotspots};
1
+ import{a}from"../chunk-WNMAH3P7.js";import"../chunk-32R4VYYA.js";import"../chunk-PK4U6NWP.js";import"../chunk-WIIZF5FP.js";import"../chunk-KTCODJNQ.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as complexityHotspots};
2
2
  //# sourceMappingURL=complexity-hotspots.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, e as ComplexityResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, e as ComplexityResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-C6PQLWHR.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as complexity};
1
+ import{a}from"../chunk-MKFH7QJG.js";import"../chunk-32R4VYYA.js";import"../chunk-PK4U6NWP.js";import"../chunk-WIIZF5FP.js";import"../chunk-KTCODJNQ.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as complexity};
2
2
  //# sourceMappingURL=complexity.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, f as ConvergenceResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, f as ConvergenceResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-S6IGA6KK.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as convergence};
1
+ import{a}from"../chunk-U5MVUPOO.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as convergence};
2
2
  //# sourceMappingURL=convergence.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, g as CouplingResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, g as CouplingResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a,b}from"../chunk-CH47OLNL.js";import"../chunk-DX5YEUX4.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as coupling,b as topCoupling};
1
+ import{a,b}from"../chunk-Q2ALKKSE.js";import"../chunk-MO65UK5V.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as coupling,b as topCoupling};
2
2
  //# sourceMappingURL=coupling.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, h as CycleResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, h as CycleResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-YSEQFGGH.js";import"../chunk-5KWWENJZ.js";import"../chunk-56LPZC3S.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as cycles};
1
+ import{a}from"../chunk-EB5IVUNU.js";import"../chunk-PK4U6NWP.js";import"../chunk-KTCODJNQ.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as cycles};
2
2
  //# sourceMappingURL=cycles.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, D as DataflowResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, D as DataflowResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-TRBNQ273.js";import"../chunk-F2TGKDMW.js";import"../chunk-56LPZC3S.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as dataflow};
1
+ import{a}from"../chunk-C5BFS23M.js";import"../chunk-WIIZF5FP.js";import"../chunk-KTCODJNQ.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as dataflow};
2
2
  //# sourceMappingURL=dataflow.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, i as DeadOptions, j as DeadSummary } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, i as DeadOptions, j as DeadSummary } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-EARGTC7U.js";import"../chunk-F2TGKDMW.js";import"../chunk-5KWWENJZ.js";import"../chunk-56LPZC3S.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as dead};
1
+ import{a}from"../chunk-MO32JMOD.js";import"../chunk-32R4VYYA.js";import"../chunk-PK4U6NWP.js";import"../chunk-WIIZF5FP.js";import"../chunk-KTCODJNQ.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as dead};
2
2
  //# sourceMappingURL=dead.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, k as DeepChainResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, k as DeepChainResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-IUNRL2AQ.js";import"../chunk-ID7TO4P6.js";import"../chunk-VQXXSUQF.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as deepChains};
1
+ import{a}from"../chunk-YDNCX5PF.js";import"../chunk-4X7C236P.js";import"../chunk-2ZGHRI2A.js";import"../chunk-YU25IHJX.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as deepChains};
2
2
  //# sourceMappingURL=deep-chains.js.map
@@ -1,4 +1,4 @@
1
- import { S as ScipDatabase, l as DepResult } from '../db-DKhNQ75l.js';
1
+ import { S as ScipDatabase, l as DepResult } from '../db-BZPa7dzJ.js';
2
2
  import 'better-sqlite3';
3
3
 
4
4
  /** What internal files does this file depend on? (forward dependencies) */
@@ -1,2 +1,2 @@
1
- import{a,b}from"../chunk-TPOYTT6O.js";import"../chunk-DX5YEUX4.js";import"../chunk-H4IWC7KJ.js";import"../chunk-QRULHDMO.js";import"../chunk-5IM4IQ6N.js";export{a as deps,b as rdeps};
1
+ import{a,b}from"../chunk-ERRUE5G4.js";import"../chunk-MO65UK5V.js";import"../chunk-ZHHMG4UC.js";import"../chunk-QFZE73XF.js";export{a as deps,b as rdeps};
2
2
  //# sourceMappingURL=deps.js.map