scip-query 0.6.6 → 0.6.7

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 (165) hide show
  1. package/README.md +20 -1
  2. package/dist/chunk-2AUZ3PLO.js +2 -0
  3. package/dist/{chunk-PIRXZGV6.js → chunk-2CC7RA6B.js} +2 -2
  4. package/dist/{chunk-OQZF2DQJ.js → chunk-2R7OKZE5.js} +2 -2
  5. package/dist/{chunk-7PRMSA4Z.js → chunk-2YA36CXK.js} +2 -2
  6. package/dist/chunk-3A2M7AF3.js +4 -0
  7. package/dist/chunk-3EJRPTTB.js +2 -0
  8. package/dist/chunk-3SWWYJPB.js +6 -0
  9. package/dist/chunk-4M4FEWBL.js +7 -0
  10. package/dist/{chunk-UUIWMLDX.js → chunk-4Y6KUJDO.js} +2 -2
  11. package/dist/{chunk-MO65UK5V.js → chunk-55ZJ2FCW.js} +2 -2
  12. package/dist/chunk-6FLGPRBR.js +5 -0
  13. package/dist/chunk-6XRB6ATD.js +16 -0
  14. package/dist/{chunk-VEXS3I3N.js → chunk-7EQ4J66C.js} +2 -2
  15. package/dist/{chunk-QFBJZHMV.js → chunk-7TGEXAN5.js} +2 -2
  16. package/dist/chunk-ABLXPGAZ.js +2 -0
  17. package/dist/{chunk-IKQYNTW3.js → chunk-BG7YU4DJ.js} +2 -2
  18. package/dist/chunk-D2R6IIEO.js +2 -0
  19. package/dist/{chunk-YJODB2F5.js → chunk-E47WMJ5F.js} +2 -2
  20. package/dist/chunk-EEA3R37V.js +11 -0
  21. package/dist/chunk-FAN2CVZT.js +2 -0
  22. package/dist/{chunk-HVNVO6UW.js → chunk-FYO3FPFH.js} +2 -2
  23. package/dist/chunk-G47V5V3U.js +90 -0
  24. package/dist/chunk-GS55K4WJ.js +85 -0
  25. package/dist/{chunk-I377UMS2.js → chunk-HADDFTMU.js} +2 -2
  26. package/dist/chunk-HTJ5BOYP.js +10 -0
  27. package/dist/chunk-IARIBTCL.js +2 -0
  28. package/dist/{chunk-E2V5SE6M.js → chunk-IBWYWAWE.js} +2 -2
  29. package/dist/{chunk-DLWRLPKO.js → chunk-ILQSK2KJ.js} +2 -2
  30. package/dist/{chunk-KBGFYKOJ.js → chunk-JVMXNDRU.js} +2 -2
  31. package/dist/{chunk-O6VBAW7P.js → chunk-K345WFTU.js} +2 -2
  32. package/dist/{chunk-GPY33RTH.js → chunk-K6ULLR7M.js} +2 -2
  33. package/dist/chunk-KCC3GMCX.js +2 -0
  34. package/dist/{chunk-7LSCW7NF.js → chunk-KQWFRAQI.js} +2 -2
  35. package/dist/chunk-KRVRD6KZ.js +5 -0
  36. package/dist/{chunk-QFZE73XF.js → chunk-KYGNCIJ6.js} +8 -8
  37. package/dist/chunk-LHLXHH43.js +2 -0
  38. package/dist/{chunk-IZ4KV37N.js → chunk-M7GBLQG4.js} +2 -2
  39. package/dist/{chunk-WFDTS7XL.js → chunk-MEVK6R7N.js} +2 -2
  40. package/dist/{chunk-Q2ALKKSE.js → chunk-OCQN6WF4.js} +2 -2
  41. package/dist/{chunk-ERRUE5G4.js → chunk-PQTGBYXV.js} +2 -2
  42. package/dist/{chunk-ZHHMG4UC.js → chunk-QYWGC7JV.js} +2 -2
  43. package/dist/{chunk-TLRA5TR6.js → chunk-R373SHXM.js} +2 -2
  44. package/dist/{chunk-MXWC53GJ.js → chunk-RRWPHKZA.js} +2 -2
  45. package/dist/{chunk-6GPFHZP3.js → chunk-RUAJV3TN.js} +2 -2
  46. package/dist/{chunk-Q4R2IYA3.js → chunk-S57GUI2T.js} +2 -2
  47. package/dist/chunk-SVUVC5VS.js +2 -0
  48. package/dist/{chunk-4TX5IMMK.js → chunk-T426XELO.js} +2 -2
  49. package/dist/chunk-TX7BHRMT.js +2 -0
  50. package/dist/{chunk-YXMHTJYY.js → chunk-TYRPQE6R.js} +2 -2
  51. package/dist/{chunk-Y4DS3MDC.js → chunk-WPY46NIL.js} +2 -2
  52. package/dist/{chunk-CYJMOTIH.js → chunk-X3Z4KZNX.js} +2 -2
  53. package/dist/{chunk-7X7FLQC5.js → chunk-ZNNCDAYX.js} +2 -2
  54. package/dist/cli.js +156 -145
  55. package/dist/{db-BZPa7dzJ.d.ts → db-DdlToIC-.d.ts} +1 -0
  56. package/dist/index.d.ts +4 -4
  57. package/dist/index.js +2 -2
  58. package/dist/queries/affected.d.ts +1 -1
  59. package/dist/queries/affected.js +1 -1
  60. package/dist/queries/bottlenecks.d.ts +1 -1
  61. package/dist/queries/bottlenecks.js +1 -1
  62. package/dist/queries/by-kind.d.ts +1 -1
  63. package/dist/queries/by-kind.js +1 -1
  64. package/dist/queries/call-graph.d.ts +1 -1
  65. package/dist/queries/call-graph.js +1 -1
  66. package/dist/queries/change-surface.d.ts +1 -1
  67. package/dist/queries/change-surface.js +1 -1
  68. package/dist/queries/code.d.ts +1 -1
  69. package/dist/queries/code.js +1 -1
  70. package/dist/queries/complexity-hotspots.d.ts +2 -1
  71. package/dist/queries/complexity-hotspots.js +1 -1
  72. package/dist/queries/complexity.d.ts +1 -1
  73. package/dist/queries/complexity.js +1 -1
  74. package/dist/queries/convergence.d.ts +1 -1
  75. package/dist/queries/convergence.js +1 -1
  76. package/dist/queries/coupling.d.ts +1 -1
  77. package/dist/queries/coupling.js +1 -1
  78. package/dist/queries/cycles.d.ts +1 -1
  79. package/dist/queries/cycles.js +1 -1
  80. package/dist/queries/dataflow.d.ts +1 -1
  81. package/dist/queries/dataflow.js +1 -1
  82. package/dist/queries/dead.d.ts +1 -1
  83. package/dist/queries/dead.js +1 -1
  84. package/dist/queries/deep-chains.d.ts +1 -1
  85. package/dist/queries/deep-chains.js +1 -1
  86. package/dist/queries/deps.d.ts +1 -1
  87. package/dist/queries/deps.js +1 -1
  88. package/dist/queries/diff-impact.d.ts +20 -2
  89. package/dist/queries/diff-impact.js +1 -1
  90. package/dist/queries/drift.d.ts +1 -1
  91. package/dist/queries/drift.js +1 -1
  92. package/dist/queries/extract-candidates.d.ts +2 -1
  93. package/dist/queries/extract-candidates.js +1 -1
  94. package/dist/queries/fan.d.ts +1 -1
  95. package/dist/queries/fan.js +1 -1
  96. package/dist/queries/files.d.ts +1 -1
  97. package/dist/queries/health-cache-control.d.ts +15 -0
  98. package/dist/queries/health-cache-control.js +2 -0
  99. package/dist/queries/health.d.ts +66 -2
  100. package/dist/queries/health.js +1 -1
  101. package/dist/queries/hierarchy.d.ts +1 -1
  102. package/dist/queries/hierarchy.js +1 -1
  103. package/dist/queries/hotspots.d.ts +1 -1
  104. package/dist/queries/hotspots.js +1 -1
  105. package/dist/queries/imports.d.ts +1 -1
  106. package/dist/queries/imports.js +1 -1
  107. package/dist/queries/index.d.ts +3 -3
  108. package/dist/queries/index.js +1 -1
  109. package/dist/queries/isolated.d.ts +1 -1
  110. package/dist/queries/isolated.js +1 -1
  111. package/dist/queries/members.d.ts +1 -1
  112. package/dist/queries/members.js +1 -1
  113. package/dist/queries/methods.d.ts +1 -1
  114. package/dist/queries/methods.js +1 -1
  115. package/dist/queries/outline.d.ts +1 -1
  116. package/dist/queries/outline.js +1 -1
  117. package/dist/queries/passthrough-candidates.d.ts +2 -1
  118. package/dist/queries/passthrough-candidates.js +1 -1
  119. package/dist/queries/redundant-reexports.d.ts +1 -1
  120. package/dist/queries/redundant-reexports.js +1 -1
  121. package/dist/queries/refs.d.ts +1 -1
  122. package/dist/queries/refs.js +1 -1
  123. package/dist/queries/similar-chains.d.ts +1 -1
  124. package/dist/queries/similar-chains.js +1 -1
  125. package/dist/queries/similar-files.d.ts +1 -1
  126. package/dist/queries/similar-files.js +1 -1
  127. package/dist/queries/similar-signatures.d.ts +1 -1
  128. package/dist/queries/similar-signatures.js +1 -1
  129. package/dist/queries/similar.d.ts +2 -1
  130. package/dist/queries/similar.js +1 -1
  131. package/dist/queries/slice.d.ts +1 -1
  132. package/dist/queries/slice.js +1 -1
  133. package/dist/queries/stale-abstractions.d.ts +4 -2
  134. package/dist/queries/stale-abstractions.js +1 -1
  135. package/dist/queries/stats.d.ts +1 -1
  136. package/dist/queries/surface.d.ts +1 -1
  137. package/dist/queries/surface.js +1 -1
  138. package/dist/queries/symbols.d.ts +1 -1
  139. package/dist/queries/symbols.js +1 -1
  140. package/dist/queries/system.d.ts +1 -1
  141. package/dist/queries/system.js +1 -1
  142. package/dist/queries/trace.d.ts +1 -1
  143. package/dist/queries/trace.js +1 -1
  144. package/dist/queries/wrapper-candidates.d.ts +2 -1
  145. package/dist/queries/wrapper-candidates.js +1 -1
  146. package/package.json +1 -1
  147. package/dist/chunk-25HOGELX.js +0 -2
  148. package/dist/chunk-2TLYCK2L.js +0 -11
  149. package/dist/chunk-3PVIYZ74.js +0 -84
  150. package/dist/chunk-6DVA22YE.js +0 -2
  151. package/dist/chunk-7YI2M2AQ.js +0 -2
  152. package/dist/chunk-AADJ7MCQ.js +0 -2
  153. package/dist/chunk-AV7BOODV.js +0 -4
  154. package/dist/chunk-AXP4H62Q.js +0 -6
  155. package/dist/chunk-C4C3T4K3.js +0 -2
  156. package/dist/chunk-CSRPJCWO.js +0 -2
  157. package/dist/chunk-GBDZY73J.js +0 -2
  158. package/dist/chunk-KW2F3WSV.js +0 -5
  159. package/dist/chunk-NIN762LD.js +0 -5
  160. package/dist/chunk-QPJG6VRT.js +0 -16
  161. package/dist/chunk-TUV2VI7D.js +0 -7
  162. package/dist/chunk-UAPNU7UP.js +0 -2
  163. package/dist/chunk-URCJTFOD.js +0 -2
  164. package/dist/chunk-VRC3WKKE.js +0 -2
  165. package/dist/chunk-Z4AMQWVY.js +0 -90
@@ -0,0 +1,2 @@
1
+ import{a as b,e as A}from"./chunk-TYRPQE6R.js";import{a as m,b as O,d as E}from"./chunk-7EQ4J66C.js";import{c as q}from"./chunk-WPY46NIL.js";import{b as F,c as L,f as D,i as M,m as v,o as N}from"./chunk-GS55K4WJ.js";import{C as P,E as T,f as p,g,h,n as R,t as C,u as I,w as x,x as k}from"./chunk-KYGNCIJ6.js";function V(i,e,o){let c=e.identifierResolution==="strict"?m:O;for(let t of e.paths){let l=g(t);if(!l&&!(e.includeVueSfc&&h(t))||i.isIgnored(t)||e.skipPath?.(t))continue;let u=D(i,t);for(let[n,s]of u)for(let f of c(i,t,n))o({sourceFile:t,name:n,target:f,occurrences:s.length,kind:"identifier"});if(e.includeCrossLanguageDispatchNames)for(let n of L(i,t))for(let s of m(i,t,n))o({sourceFile:t,name:n,target:s,occurrences:1,kind:"cross-language-dispatch"});if(e.includeRustAttributeNames&&l==="rust")for(let n of F(i,t))for(let s of c(i,t,n))o({sourceFile:t,name:n,target:s,occurrences:1,kind:"rust-attribute"})}}var G=class{constructor(e){this.db=e}db;scopedDefinitions(e){return T(this.db,e)}definitionsForFile(e){return P(this.db,e)}productionCallableDefinitions(e={}){let{scope:o,minLoc:c=1,maxLoc:t=Number.POSITIVE_INFINITY,excludeSymbol:l,excludeEntrySurfaces:u=!1,excludeTypesFiles:n=!1,requireFunctionLikeSymbol:s=!1,requireCallableSymbol:f=!1,excludeRustTraitImplMembers:K=!1,includeSuppressed:j=!1,sortByLocDesc:B=!1}=e,d=[];for(let r of this.scopedDefinitions(o)){let a=r.relativePath;if(this.db.isIgnored(a)||u&&A(this.db,a)||!H(r,{requireFunctionLikeSymbol:s,requireCallableSymbol:f})||l!==void 0&&r.symbol===l)continue;let S=y(r);S<c||S>t||n&&Y(a)||K&&x(r.symbol)||b(a)!=="test"&&(k(r.symbol)||!j&&p(this.db,a,r.startLine)||d.push(r))}return B?d.sort((r,a)=>y(a)-y(r)):d}calleeMap(e,o={}){return v(this.db,e,o)}crossFileCallerMap(e){return N(this.db,e)}sourceFallbackCallerFiles(e){return E(this.db,e)}fileDependencyGraph(e){return M(this.db,e)}fileKind(e){return b(e)}hasSuppressionComment(e){return p(this.db,e.relativePath,e.startLine)}sourceFiles(){return q(this.db)}scanSourceReferences(e,o){V(this.db,e,o)}callableSignature(e){return R(this.db,e.relativePath,e.startLine,e.endLine)}};function y(i){return i.endLine-i.startLine+1}function H(i,e){return e.requireCallableSymbol?C(i.symbol):e.requireFunctionLikeSymbol?I(i.symbol):i.isFunctionLike}function Y(i){return(i.split("/").pop()??"").includes("types")}export{G as a};
2
+ //# sourceMappingURL=chunk-SVUVC5VS.js.map
@@ -1,4 +1,4 @@
1
- import{a as P}from"./chunk-UAPNU7UP.js";import{d as R,e as v,f as D,g as F,h as L}from"./chunk-YXMHTJYY.js";import{a as m,i as S}from"./chunk-3PVIYZ74.js";import{e as f}from"./chunk-KW2F3WSV.js";import{B as h,H as c,o as d,r as p,s as g,t as b,u as y,v as _}from"./chunk-QFZE73XF.js";function Q(e,n={}){let{scope:r,minLoc:t=1,includeTests:s=!1,skipBarrels:a=!1,includeMembers:i=!1}=n,l=a?new Set(R(e)):new Set,o=w(e,l);k(e,o,l);let u=x(e,{scope:r,minLoc:t,includeTests:s,includeMembers:i});return H(e,u,o,{includeTests:s,inactiveBarrelPaths:l}),M(e,E(u,o))}function w(e,n){let r=e.all(`SELECT
1
+ import{a as P}from"./chunk-SVUVC5VS.js";import{d as R,e as v,f as D,g as F,h as L}from"./chunk-TYRPQE6R.js";import{a as m,k as S}from"./chunk-GS55K4WJ.js";import{f}from"./chunk-6FLGPRBR.js";import{D as h,J as c,q as d,t as p,u as g,v as b,w as y,x as _}from"./chunk-KYGNCIJ6.js";function Q(e,n={}){let{scope:r,minLoc:t=1,includeTests:s=!1,skipBarrels:a=!1,includeMembers:i=!1}=n,l=a?new Set(R(e)):new Set,o=w(e,l);k(e,o,l);let u=x(e,{scope:r,minLoc:t,includeTests:s,includeMembers:i});return H(e,u,o,{includeTests:s,inactiveBarrelPaths:l}),M(e,E(u,o))}function w(e,n){let r=e.all(`SELECT
2
2
  m.symbol_id,
3
3
  d.relative_path,
4
4
  COUNT(*) AS ref_count
@@ -9,4 +9,4 @@ import{a as P}from"./chunk-UAPNU7UP.js";import{d as R,e as v,f as D,g as F,h as
9
9
  ${e.pathExclusionsFor("d")}
10
10
  GROUP BY m.symbol_id, d.relative_path`),t=new Map;for(let s of r){if(e.isIgnored(s.relative_path)||n.has(s.relative_path))continue;let a=t.get(s.symbol_id);a||(a=new Map,t.set(s.symbol_id,a)),a.set(s.relative_path,s.ref_count)}return t}function x(e,n){let r=U(e);return h(e,{scope:n.scope}).filter(t=>!e.isIgnored(t.relativePath)).filter(t=>!b(t.symbol)).filter(t=>T(t.symbol)).filter(t=>t.isFunctionLike||!t.enclosingSymbol||!T(t.enclosingSymbol)).filter(t=>n.includeTests||C(t.relativePath)).filter(t=>n.includeTests||!r(t.relativePath,t.startLine,t.symbol,t.parentTypeName)).filter(t=>!y(t.symbol)).filter(t=>!_(t.symbol)).filter(t=>n.includeMembers||j(t)).filter(t=>t.endLine-t.startLine+1>=n.minLoc)}function E(e,n){return e.map(r=>I(r,n)).filter(r=>r.cross_file_refs===0).sort((r,t)=>t.loc-r.loc||r.relative_path.localeCompare(t.relative_path)||r.start_line-t.start_line)}function I(e,n){let r=n.get(e.symbolId)??new Map,t=r.get(e.relativePath)??0,s=0;for(let[a,i]of r)a!==e.relativePath&&(s+=i);return{relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine,loc:e.endLine-e.startLine+1,symbol:e.symbol,same_file_refs:t,cross_file_refs:s}}function M(e,n){let r=[],t=0,s=0,a=0;for(let i of n){if(e.isIgnored(i.relative_path)||v(e,i.relative_path)||D(e,i.symbol,i.relative_path))continue;let l=i.same_file_refs===0?"dead-code":"file-internal";l==="dead-code"?t++:s++,a+=i.loc,r.push({relativePath:i.relative_path,startLine:i.start_line,endLine:i.end_line,loc:i.loc,symbol:i.symbol,shortName:d(i.symbol),sameFileRefs:i.same_file_refs,kind:l})}return{symbols:r,totalCount:r.length,deadCodeCount:t,fileInternalCount:s,totalLoc:a}}function k(e,n,r){let t=new P(e),s=new Set(t.sourceFiles());for(let a of N(e))s.add(a);t.scanSourceReferences({paths:s,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",skipPath:a=>r.has(a)},a=>{O(e,a)||B(n,a.target.symbolId,a.sourceFile,A(a))})}function N(e){let n=e.all(`SELECT relative_path FROM documents
11
11
  WHERE 1 = 1 ${e.pathExclusionsFor("documents")}`);return new Set(n.map(r=>r.relative_path))}function O(e,n){return n.kind==="cross-language-dispatch"&&n.target.relativePath===n.sourceFile?!0:n.kind==="identifier"&&$(e,n)}function A(e){return e.kind==="identifier"&&e.target.relativePath===e.sourceFile?Math.max(0,e.occurrences-1):e.occurrences}function B(e,n,r,t){if(t<=0)return;let s=e.get(n);s||(s=new Map,e.set(n,s)),s.set(r,(s.get(r)??0)+t)}function $(e,n){return n.occurrences>1?!1:f(e,n.sourceFile).some(r=>r.used||r.sourcePath!==n.target.relativePath?!1:r.importedName===n.name||r.localName===n.name)}function H(e,n,r,t){for(let s of n){let a=S(e,s);if(a.length===0)continue;let i=r.get(s.symbolId);i||(i=new Map,r.set(s.symbolId,i));for(let l of a){let o=l.file;o===s.relativePath||e.isIgnored(o)||t.inactiveBarrelPaths.has(o)||!t.includeTests&&!C(o)||i.set(o,Math.max(1,i.get(o)??0))}}}function U(e){let n=new Map,r=t=>{let s=n.get(t);if(s)return s;let a=m(e,t);return s={ranges:a.map(i=>({startLine:i.startLine,endLine:i.endLine})),containers:new Set(a.map(i=>i.containerName).filter(i=>!!i))},n.set(t,s),s};return(t,s,a,i)=>{let l=r(t);for(let o of l.ranges)if(s>=o.startLine&&s<=o.endLine)return!0;if(i&&l.containers.has(i))return!0;for(let o of c(a))if(l.containers.has(o))return!0;return!1}}function C(e){return[...new Set([...F,...L])].every(r=>!W(e,r))}function W(e,n){return new RegExp(`^${n.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/%/g,".*").replace(/_/g,".")}$`).test(e)}function T(e){return g(e)||e.endsWith("().")||e.endsWith(".")}function j(e){return p(e.symbol)||c(e.symbol).length===0}export{Q as a};
12
- //# sourceMappingURL=chunk-4TX5IMMK.js.map
12
+ //# sourceMappingURL=chunk-T426XELO.js.map
@@ -0,0 +1,2 @@
1
+ import{a as R,b as L}from"./chunk-KRVRD6KZ.js";import{a as f}from"./chunk-QRYEOK3M.js";import{a as w}from"./chunk-4M4FEWBL.js";import{a as b}from"./chunk-FAN2CVZT.js";import{b as C}from"./chunk-3SWWYJPB.js";import{a as y}from"./chunk-IARIBTCL.js";import{a as x}from"./chunk-K6ULLR7M.js";import{a as S}from"./chunk-D2R6IIEO.js";import{a as m,b as h}from"./chunk-2AUZ3PLO.js";import{a as H}from"./chunk-2CC7RA6B.js";import{a as g}from"./chunk-T426XELO.js";import{a as P}from"./chunk-ABLXPGAZ.js";import{e as l,f as d}from"./chunk-TYRPQE6R.js";var O=50,j=75e3,W=5e3,A=2500,gt=["overview","dead","isolated","cycles","similar","extract-candidates","wrapper-candidates","passthrough-candidates","stale-abstractions","drift","complexity-hotspots"],q={overview:(t,e,a,r)=>({phase:"overview",statsResult:r,warnings:a.warnings}),dead:(t,e,a)=>({phase:"dead",dead:D(t,e,a)}),isolated:(t,e,a)=>({phase:"isolated",isolated:T(t,e,a)}),cycles:(t,e,a)=>({phase:"cycles",realCycleCount:B(t,e,a)}),similar:(t,e,a)=>({phase:"similar",similarCount:M(t,e,a)}),"extract-candidates":(t,e,a)=>({phase:"extract-candidates",extractCount:_(t,e,a)}),"wrapper-candidates":(t,e,a)=>({phase:"wrapper-candidates",wrappers:I(t,e,a)}),"passthrough-candidates":(t,e,a)=>({phase:"passthrough-candidates",passthroughs:$(t,e,a)}),"stale-abstractions":(t,e,a)=>({phase:"stale-abstractions",stale:z(t,e,a)}),drift:(t,e,a)=>({phase:"drift",drift:k(t,e,a)}),"complexity-hotspots":(t,e,a)=>({phase:"complexity-hotspots",complexity:N(t,e,a)})};function Ht(t,e={}){return E(t,e.full===!0,(a,r)=>{let i=F(t,e.scope,a,r);return v(i)})}function yt(t,e,a={}){return E(t,a.full===!0,(r,i)=>q[e](t,a.scope,i,r))}function E(t,e,a){let r=f(t),i=K(r,e);try{return a(r,i)}finally{m(t,{semanticProvider:!0}),h()}}function Ct(t){let e=o(t,"overview"),a={statsResult:e.statsResult,warnings:e.warnings,dead:o(t,"dead").dead,isolated:o(t,"isolated").isolated,realCycleCount:o(t,"cycles").realCycleCount,similarCount:o(t,"similar").similarCount,extractCount:o(t,"extract-candidates").extractCount,wrappers:o(t,"wrapper-candidates").wrappers,passthroughs:o(t,"passthrough-candidates").passthroughs,stale:o(t,"stale-abstractions").stale,drift:o(t,"drift").drift,complexity:o(t,"complexity-hotspots").complexity};return v(a)}function o(t,e){let a=t.find(r=>r.phase===e);if(!a)throw new Error(`Missing health phase result: ${e}`);return a}function v(t){let e=Q(t);return{score:J(t),overview:{documents:t.statsResult.documents,symbols:t.statsResult.symbols,indexSizeBytes:t.statsResult.indexSizeBytes},findings:{deadSymbols:t.dead.count,deadLoc:t.dead.loc,isolatedSymbols:t.isolated.count,isolatedLoc:t.isolated.loc,cycles:t.realCycleCount,similarPairs:t.similarCount,extractionCandidates:t.extractCount,wrappers:t.wrappers.count,passthroughs:t.passthroughs.count,staleTypes:t.stale.count,driftedFiles:t.drift.count,complexityHotspotCount:t.complexity.extremeCount},actions:e,topComplexity:t.complexity.top,warnings:t.warnings.length>0?t.warnings:void 0}}function F(t,e,a,r){let i=G(t,e,r),n=Y(t,e,r),c=X(t,e,r);return{statsResult:a,warnings:r.warnings,...i,...n,...c}}function G(t,e,a){return{dead:D(t,e,a),isolated:T(t,e,a),realCycleCount:B(t,e,a)}}function Y(t,e,a){return{similarCount:M(t,e,a),extractCount:_(t,e,a),wrappers:I(t,e,a),passthroughs:$(t,e,a),stale:z(t,e,a)}}function X(t,e,a){return{drift:k(t,e,a),complexity:N(t,e,a)}}function D(t,e,a){return s(t,a,"dead",()=>{let r=g(t,{scope:e,minLoc:3,skipBarrels:!0});return u(et(t,r.symbols))})}function T(t,e,a){return s(t,a,"isolated",()=>{let r=y(t,{scope:e,minLoc:3});return u(at(t,r))})}function B(t,e,a){return s(t,a,"cycles",()=>H(t,{scope:e}).filter(i=>i.kind==="real").length)}function M(t,e,a){return s(t,a,"similar",()=>C(t,{scope:e,minSimilarity:.6,limit:50,minCallees:4,scanLimit:a.candidateScanLimit}).length)}function _(t,e,a){return s(t,a,"extract-candidates",()=>S(t,{scope:e,minLoc:15,minCallees:5,limit:50,scanLimit:a.candidateScanLimit}).length)}function I(t,e,a){return s(t,a,"wrapper-candidates",()=>u(w(t,{scope:e,maxLoc:15,limit:50,scanLimit:a.candidateScanLimit})))}function $(t,e,a){return s(t,a,"passthrough-candidates",()=>u(b(t,{scope:e,maxLoc:15,limit:50,scanLimit:a.candidateScanLimit})))}function z(t,e,a){return s(t,a,"stale-abstractions",()=>{let r=R(t,{scope:e,minLoc:3,limit:50,scanLimit:a.candidateScanLimit}),i=r.filter(n=>n.consumers===0).length;return{count:r.length,loc:r.reduce((n,c)=>n+c.loc,0),unused:i,singleUse:r.length-i}})}function k(t,e,a){return s(t,a,"drift",()=>{let r=x(t,{scope:e});return{count:r.unusedImports+r.layerViolations,unusedImports:r.unusedImports,layerViolations:r.layerViolations}})}function N(t,e,a){return s(t,a,"complexity-hotspots",()=>{let r=P(t,{scope:e,minLoc:10,limit:10,scanLimit:a.candidateScanLimit});return{top:r.slice(0,5).map(i=>({symbol:i.shortName,score:i.score})),extremeCount:r.filter(i=>i.score>O).length}})}function Q(t){let e=[];if(t.dead.count>0&&e.push({category:"Dead code",description:`${t.dead.count} symbols with zero references anywhere \u2014 safe to delete`,effort:"low",impact:"high",count:t.dead.count,locRecoverable:t.dead.loc}),t.isolated.count>0&&e.push({category:"Isolated symbols",description:`${t.isolated.count} symbols completely disconnected from the codebase graph`,effort:"low",impact:"medium",count:t.isolated.count,locRecoverable:t.isolated.loc}),t.realCycleCount>0&&e.push({category:"Circular dependencies",description:`${t.realCycleCount} cycle(s) \u2014 break with dependency inversion or module restructuring`,effort:"medium",impact:"high",count:t.realCycleCount,locRecoverable:0}),t.similarCount>0&&e.push({category:"Similar functions",description:`${t.similarCount} pairs with real logic overlap (beyond shared imports) \u2014 consolidation candidates`,effort:"medium",impact:"medium",count:t.similarCount,locRecoverable:0}),t.extractCount>0&&e.push({category:"Extraction candidates",description:`${t.extractCount} large functions with isolated callee clusters \u2014 extract method opportunities`,effort:"medium",impact:"medium",count:t.extractCount,locRecoverable:0}),t.wrappers.count>0&&e.push({category:"Wrapper functions",description:`${t.wrappers.count} single-consumer symbols that could be inlined`,effort:"low",impact:"low",count:t.wrappers.count,locRecoverable:t.wrappers.loc}),t.passthroughs.count>0&&e.push({category:"Passthrough functions",description:`${t.passthroughs.count} functions that just forward to one callee \u2014 unnecessary indirection`,effort:"low",impact:"low",count:t.passthroughs.count,locRecoverable:t.passthroughs.loc}),t.stale.count>0){let i=[];t.stale.unused>0&&i.push(`${t.stale.unused} unused`),t.stale.singleUse>0&&i.push(`${t.stale.singleUse} single-consumer (not in types file)`),e.push({category:"Stale abstractions",description:`${i.join(", ")} \u2014 premature abstraction`,effort:"low",impact:"medium",count:t.stale.count,locRecoverable:t.stale.loc})}if(t.drift.count>0){let i=[];t.drift.unusedImports>0&&i.push(`${t.drift.unusedImports} unused imports`),t.drift.layerViolations>0&&i.push(`${t.drift.layerViolations} layer violations`),e.push({category:"Structural drift",description:i.join(", "),effort:t.drift.layerViolations>0?"medium":"low",impact:t.drift.layerViolations>0?"medium":"low",count:t.drift.count,locRecoverable:0})}let a={high:3,medium:2,low:1},r={low:3,medium:2,high:1};return e.sort((i,n)=>{let c=a[i.impact]*r[i.effort];return a[n.impact]*r[n.effort]-c}),e}function J(t){let e=Math.max(t.statsResult.documents,1),a=Math.max(t.statsResult.symbols,1),r=100,i=t.dead.count/a;r-=Math.min(20,Math.round(i*200));let n=t.isolated.count/a;r-=Math.min(10,Math.round(n*200)),r-=Math.min(15,t.realCycleCount*5);let c=t.similarCount/a*1e3;r-=Math.min(10,Math.round(c));let p=t.extractCount/a*1e3;r-=Math.min(5,Math.round(p/2)),r-=Math.min(3,t.wrappers.count),r-=Math.min(3,t.passthroughs.count);let U=t.stale.count/Math.max(a*.1,1);r-=Math.min(8,Math.round(U*10));let V=t.drift.count/e;return r-=Math.min(5,Math.round(V*50)),r-=Math.min(5,t.complexity.extremeCount*2),Math.max(0,Math.min(100,r))}function K(t,e){return t.symbols>=j||t.documents>=W?e?{candidateScanLimit:void 0,releaseCachesBetweenPhases:!0,warnings:["Large index detected; running unbounded health analyses because --full was supplied."]}:{candidateScanLimit:A,releaseCachesBetweenPhases:!0,warnings:[`Large index detected; candidate-style health checks scanned their highest-priority ${A} symbols. Run "scip-query health --full" for unbounded candidate counts.`]}:{candidateScanLimit:void 0,releaseCachesBetweenPhases:!0,warnings:[]}}function Z(t,e){e.releaseCachesBetweenPhases&&(L(t),m(t),h())}function s(t,e,a,r){tt(a);try{return r()}finally{Z(t,e)}}function tt(t){process.env.SCIP_QUERY_HEALTH_TRACE==="1"&&console.error(`[health] ${t}`)}function et(t,e){return e.filter(a=>!l(t,a.relativePath)&&!d(t,a.symbol,a.relativePath)&&a.kind==="dead-code")}function at(t,e){return e.filter(a=>!l(t,a.relativePath)&&!d(t,a.symbol,a.relativePath))}function u(t){return{count:t.length,loc:t.reduce((e,a)=>e+a.loc,0)}}export{gt as a,Ht as b,yt as c,Ct as d};
2
+ //# sourceMappingURL=chunk-TX7BHRMT.js.map
@@ -1,2 +1,2 @@
1
- import{c as a}from"./chunk-Y4DS3MDC.js";import{g as p}from"./chunk-3PVIYZ74.js";import{b as f}from"./chunk-QFZE73XF.js";function c(t){let r=o(t);return x(r)?"test":S(r)?"worker":y(r)?"entry":P(r)?"barrel":"source"}function _(t){return c(t)==="barrel"}function g(t){return h.get(t,()=>{let r=p(t),e=a(t).filter(s=>{let u=c(s);return u==="entry"||u==="worker"}),n=new Set,i=new Set;for(;e.length>0;){let s=e.shift();if(!n.has(s)){n.add(s),c(s)==="barrel"&&i.add(s);for(let u of r.get(s)??[])n.has(u)||e.push(u)}}return i})}var h=f("live-barrels");function b(t,r){return g(t).has(o(r))}function w(t){let r=g(t);return a(t).filter(e=>_(e)&&!r.has(e))}function D(t,r){let e=c(r);return e==="entry"||e==="worker"||b(t,r)}function E(t,r,e){let n=t.config.entryRoots;if(!n)return!1;let i=o(e);return!!(n.files?.some(s=>o(s)===i)||n.pathPrefixes?.some(s=>i.startsWith(o(s)))||n.qualifiedVars?.some(s=>$(r,s))||n.symbolPatterns?.some(s=>{try{return new RegExp(s).test(r)}catch{return!1}}))}var v=["%/__tests__/%","%.test.%","%.spec.%","%/test/%","%/tests/%","%_test.%","%_spec.%","%/test_%.%","%/spec_%.%"],B=["%/test-utils/%"];function x(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function S(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function y(t){let r=t.split("/"),e=r[r.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:r.length<=2:!1}function P(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}function o(t){return t.replace(/\\/g,"/")}function $(t,r){let e=r.lastIndexOf("/");if(e<0)return!1;let n=r.slice(0,e),i=r.slice(e+1);return t.includes(l(n)+"/")&&t.includes(l(i)+".")}function l(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{c as a,_ as b,b as c,w as d,D as e,E as f,v as g,B as h};
2
- //# sourceMappingURL=chunk-YXMHTJYY.js.map
1
+ import{c as a}from"./chunk-WPY46NIL.js";import{i as p}from"./chunk-GS55K4WJ.js";import{b as f}from"./chunk-KYGNCIJ6.js";function c(t){let r=o(t);return x(r)?"test":S(r)?"worker":y(r)?"entry":P(r)?"barrel":"source"}function _(t){return c(t)==="barrel"}function g(t){return h.get(t,()=>{let r=p(t),e=a(t).filter(s=>{let u=c(s);return u==="entry"||u==="worker"}),n=new Set,i=new Set;for(;e.length>0;){let s=e.shift();if(!n.has(s)){n.add(s),c(s)==="barrel"&&i.add(s);for(let u of r.get(s)??[])n.has(u)||e.push(u)}}return i})}var h=f("live-barrels");function b(t,r){return g(t).has(o(r))}function w(t){let r=g(t);return a(t).filter(e=>_(e)&&!r.has(e))}function D(t,r){let e=c(r);return e==="entry"||e==="worker"||b(t,r)}function E(t,r,e){let n=t.config.entryRoots;if(!n)return!1;let i=o(e);return!!(n.files?.some(s=>o(s)===i)||n.pathPrefixes?.some(s=>i.startsWith(o(s)))||n.qualifiedVars?.some(s=>$(r,s))||n.symbolPatterns?.some(s=>{try{return new RegExp(s).test(r)}catch{return!1}}))}var v=["%/__tests__/%","%.test.%","%.spec.%","%/test/%","%/tests/%","%_test.%","%_spec.%","%/test_%.%","%/spec_%.%"],B=["%/test-utils/%"];function x(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function S(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function y(t){let r=t.split("/"),e=r[r.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:r.length<=2:!1}function P(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}function o(t){return t.replace(/\\/g,"/")}function $(t,r){let e=r.lastIndexOf("/");if(e<0)return!1;let n=r.slice(0,e),i=r.slice(e+1);return t.includes(l(n)+"/")&&t.includes(l(i)+".")}function l(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{c as a,_ as b,b as c,w as d,D as e,E as f,v as g,B as h};
2
+ //# sourceMappingURL=chunk-TYRPQE6R.js.map
@@ -1,5 +1,5 @@
1
- import{a as l}from"./chunk-QFZE73XF.js";import{readdirSync as x}from"fs";import{extname as p,join as g}from"path";var f=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],w=[".vue"],S=new Set(f.map(e=>e.toLowerCase())),m=[...S].sort().join(","),E=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);function C(e,o={}){let s=o.includeIndexed??!0,i=o.includeAuxiliary??!0,t=o.extensions?.map(c=>c.toLowerCase()),r=t?new Set(t):S,a=t?[...r].sort().join(","):m,n=`${s?"1":"0"}|${i?"1":"0"}|${a}`;return h.get(e,n,()=>{let c=new Set;if(s){let u=e.all(`SELECT relative_path
1
+ import{a as l}from"./chunk-KYGNCIJ6.js";import{readdirSync as x}from"fs";import{extname as p,join as g}from"path";var f=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],w=[".vue"],S=new Set(f.map(e=>e.toLowerCase())),m=[...S].sort().join(","),E=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);function C(e,o={}){let s=o.includeIndexed??!0,i=o.includeAuxiliary??!0,t=o.extensions?.map(c=>c.toLowerCase()),r=t?new Set(t):S,a=t?[...r].sort().join(","):m,n=`${s?"1":"0"}|${i?"1":"0"}|${a}`;return h.get(e,n,()=>{let c=new Set;if(s){let u=e.all(`SELECT relative_path
2
2
  FROM documents
3
3
  WHERE 1 = 1
4
4
  ${e.pathExclusionsFor("documents")}`);for(let d of u)e.isIgnored(d.relative_path)||r.has(p(d.relative_path).toLowerCase())&&c.add(d.relative_path)}if(i)for(let u of y(e.config.projectRoot,r))e.isIgnored(u)||c.add(u);return[...c].sort()})}var h=l("source-files");function y(e,o){let s=new Set,i=t=>{let r=t?g(e,t):e,a;try{a=x(r,{withFileTypes:!0})}catch{return}for(let n of a)if(!E.has(n.name)){if(n.isDirectory()){i(t?`${t}/${n.name}`:n.name);continue}o.has(p(n.name).toLowerCase())&&s.add(t?`${t}/${n.name}`:n.name)}};return i(""),s}export{w as a,E as b,C as c};
5
- //# sourceMappingURL=chunk-Y4DS3MDC.js.map
5
+ //# sourceMappingURL=chunk-WPY46NIL.js.map
@@ -1,2 +1,2 @@
1
- import{h as g}from"./chunk-3PVIYZ74.js";import{a as m}from"./chunk-ZHHMG4UC.js";import{o as r}from"./chunk-QFZE73XF.js";function w(i,f,p){let s=m(i,f),n=m(i,p);if(!s||!n)return null;let c=new Set(g(i,s).map(e=>e.symbol)),h=new Set(g(i,n).map(e=>e.symbol)),l=[];for(let e of c)h.has(e)&&l.push(e);let o=[];for(let e of c)h.has(e)||o.push(e);let a=[];for(let e of h)c.has(e)||a.push(e);let u=new Set([...c,...h]),d=u.size>0?l.length/u.size:0,t;u.size===0?t="Neither function calls other tracked symbols. There is no callee-pattern evidence for consolidation; inspect the source bodies directly.":l.length===0?t="These functions do not share any callees. They are not a callee-based consolidation candidate.":o.length===0&&a.length===0?t="These functions have identical tracked callee sets. They are a strong structural match, but identical callees do not prove interchangeable semantics; inspect signatures, control flow, and return values before consolidating.":o.length===0?t="A's tracked callees are a subset of B's. B may subsume part of A's structure, but verify signatures, guards, and non-call logic before replacing A with B.":a.length===0?t="B's tracked callees are a subset of A's. A may subsume part of B's structure, but verify signatures, guards, and non-call logic before replacing B with A.":o.length<=2&&a.length<=2?t=`Create a shared function with the ${l.length} common callees. Pass the ${o.length+a.length} divergent callees as parameters or strategy callbacks.`:t=`Extract the ${l.length} shared callees into a common helper. Each function calls the helper plus its own unique logic (${o.length} callees in A, ${a.length} in B).`;let y=s.endLine-s.startLine+1,b=n.endLine-n.startLine+1;return{symbolA:{symbol:s.symbol,shortName:r(s.symbol),file:s.relativePath,loc:y},symbolB:{symbol:n.symbol,shortName:r(n.symbol),file:n.relativePath,loc:b},similarity:d,sharedCallees:l.map(r),uniqueToA:o.map(r),uniqueToB:a.map(r),consolidationStrategy:t}}export{w as a};
2
- //# sourceMappingURL=chunk-CYJMOTIH.js.map
1
+ import{j as g}from"./chunk-GS55K4WJ.js";import{a as m}from"./chunk-QYWGC7JV.js";import{q as r}from"./chunk-KYGNCIJ6.js";function w(i,f,p){let s=m(i,f),n=m(i,p);if(!s||!n)return null;let c=new Set(g(i,s).map(e=>e.symbol)),h=new Set(g(i,n).map(e=>e.symbol)),l=[];for(let e of c)h.has(e)&&l.push(e);let o=[];for(let e of c)h.has(e)||o.push(e);let a=[];for(let e of h)c.has(e)||a.push(e);let u=new Set([...c,...h]),d=u.size>0?l.length/u.size:0,t;u.size===0?t="Neither function calls other tracked symbols. There is no callee-pattern evidence for consolidation; inspect the source bodies directly.":l.length===0?t="These functions do not share any callees. They are not a callee-based consolidation candidate.":o.length===0&&a.length===0?t="These functions have identical tracked callee sets. They are a strong structural match, but identical callees do not prove interchangeable semantics; inspect signatures, control flow, and return values before consolidating.":o.length===0?t="A's tracked callees are a subset of B's. B may subsume part of A's structure, but verify signatures, guards, and non-call logic before replacing A with B.":a.length===0?t="B's tracked callees are a subset of A's. A may subsume part of B's structure, but verify signatures, guards, and non-call logic before replacing B with A.":o.length<=2&&a.length<=2?t=`Create a shared function with the ${l.length} common callees. Pass the ${o.length+a.length} divergent callees as parameters or strategy callbacks.`:t=`Extract the ${l.length} shared callees into a common helper. Each function calls the helper plus its own unique logic (${o.length} callees in A, ${a.length} in B).`;let y=s.endLine-s.startLine+1,b=n.endLine-n.startLine+1;return{symbolA:{symbol:s.symbol,shortName:r(s.symbol),file:s.relativePath,loc:y},symbolB:{symbol:n.symbol,shortName:r(n.symbol),file:n.relativePath,loc:b},similarity:d,sharedCallees:l.map(r),uniqueToA:o.map(r),uniqueToB:a.map(r),consolidationStrategy:t}}export{w as a};
2
+ //# sourceMappingURL=chunk-X3Z4KZNX.js.map
@@ -1,2 +1,2 @@
1
- import{B as p,n as d,o as f,q as u}from"./chunk-QFZE73XF.js";var m={0:"UnspecifiedKind",1:"AbstractMethod",2:"Accessor",3:"Array",4:"Assertion",5:"AssociatedType",6:"Attribute",7:"Axiom",8:"Boolean",9:"Class",10:"Constant",11:"Constructor",12:"Contract",13:"DataFamily",14:"DefinitionMacro",15:"Delegate",16:"Enum",17:"EnumMember",18:"Error",19:"Event",20:"Fact",21:"Field",22:"File",23:"Function",24:"Getter",25:"Grammar",26:"Instance",27:"Interface",28:"Key",29:"Lang",30:"Lemma",31:"Library",32:"Macro",33:"Method",34:"MethodAlias",35:"MethodReceiver",36:"MethodSpecification",37:"Message",38:"Modifier",39:"Module",40:"Namespace",41:"Null",42:"Number",43:"Object",44:"Operator",45:"Package",46:"PackageObject",47:"Parameter",48:"ParameterLabel",49:"Pattern",50:"Predicate",51:"Property",52:"Protocol",53:"ProtocolMethod",54:"PureVirtualMethod",55:"Quasiquoter",56:"SelfParameter",57:"Setter",58:"Signature",59:"SingletonClass",60:"SingletonMethod",61:"StaticDataMember",62:"StaticEvent",63:"StaticField",64:"StaticMethod",65:"StaticProperty",66:"StaticVariable",67:"String",68:"Struct",69:"Subscript",70:"Tactic",71:"Theorem",72:"ThisParameter",73:"Trait",74:"TraitMethod",75:"Type",76:"TypeAlias",77:"TypeClass",78:"TypeClassMethod",79:"TypeFamily",80:"TypeParameter",81:"Union",82:"Value",83:"Variable"},c=new Map;for(let[e,i]of Object.entries(m))c.set(i.toLowerCase(),Number(e));function g(e){let i=parseInt(e,10);if(!isNaN(i))return i;let s=e.toLowerCase(),n=c.get(s);if(n!==void 0)return n;for(let[r,o]of c)if(r.includes(s))return o;return null}function N(e,i,s={}){let{scope:n,limit:r=100}=s,o=g(i);return o===null?[]:b(e,n).map(t=>({row:t,resolvedKind:y(t)})).filter(t=>t.resolvedKind===o).slice(0,r).map(({row:t,resolvedKind:l})=>({symbol:t.symbol,shortName:f(t.symbol),kind:l,kindName:m[l]??"Unknown",relativePath:t.relative_path,startLine:t.start_line,endLine:t.end_line}))}function P(e,i={}){let s=new Map;for(let n of b(e,i.scope)){let r=y(n);r===null||r===0||s.set(r,(s.get(r)??0)+1)}return[...s.entries()].sort((n,r)=>r[1]-n[1]||n[0]-r[0]).map(([n,r])=>({kind:n,kindName:m[n]??"Unknown",count:r}))}function b(e,i){return p(e,{scope:i}).map(S)}function S(e){return{symbol:e.symbol,kind:e.kind,documentation:e.documentation,enclosing_symbol:e.enclosingSymbol,relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine}}function y(e){return e.kind!==null&&e.kind!==0?h(e.kind,e.symbol,e.documentation):M(e.symbol,e.documentation,e.enclosing_symbol)}function h(e,i,s){let n=(s??"").toLowerCase();if(u(i)==="type"){if(n.includes("type "))return 76;if(n.includes("interface "))return 27;if(n.includes("struct "))return 68;if(n.includes("trait "))return 73;if(n.includes("class "))return 9}return e}function M(e,i,s){let n=d(e);if("kind"in n)return null;let r=n.descriptors,o=r[r.length-2]??null,a=u(e),t=(i??"").toLowerCase();return a==="type"?t.includes("type ")?76:t.includes("interface ")?27:t.includes("struct ")?68:t.includes("trait ")?73:(t.includes("class "),9):a==="method"?o?.suffix==="type"?33:23:a==="namespace"?39:a!=="term"?null:t.includes("async def ")||t.includes("def ")?23:(s?u(s):o?.suffix??null)==="type"?21:83}export{N as a,P as b};
2
- //# sourceMappingURL=chunk-7X7FLQC5.js.map
1
+ import{D as p,p as d,q as f,s as u}from"./chunk-KYGNCIJ6.js";var m={0:"UnspecifiedKind",1:"AbstractMethod",2:"Accessor",3:"Array",4:"Assertion",5:"AssociatedType",6:"Attribute",7:"Axiom",8:"Boolean",9:"Class",10:"Constant",11:"Constructor",12:"Contract",13:"DataFamily",14:"DefinitionMacro",15:"Delegate",16:"Enum",17:"EnumMember",18:"Error",19:"Event",20:"Fact",21:"Field",22:"File",23:"Function",24:"Getter",25:"Grammar",26:"Instance",27:"Interface",28:"Key",29:"Lang",30:"Lemma",31:"Library",32:"Macro",33:"Method",34:"MethodAlias",35:"MethodReceiver",36:"MethodSpecification",37:"Message",38:"Modifier",39:"Module",40:"Namespace",41:"Null",42:"Number",43:"Object",44:"Operator",45:"Package",46:"PackageObject",47:"Parameter",48:"ParameterLabel",49:"Pattern",50:"Predicate",51:"Property",52:"Protocol",53:"ProtocolMethod",54:"PureVirtualMethod",55:"Quasiquoter",56:"SelfParameter",57:"Setter",58:"Signature",59:"SingletonClass",60:"SingletonMethod",61:"StaticDataMember",62:"StaticEvent",63:"StaticField",64:"StaticMethod",65:"StaticProperty",66:"StaticVariable",67:"String",68:"Struct",69:"Subscript",70:"Tactic",71:"Theorem",72:"ThisParameter",73:"Trait",74:"TraitMethod",75:"Type",76:"TypeAlias",77:"TypeClass",78:"TypeClassMethod",79:"TypeFamily",80:"TypeParameter",81:"Union",82:"Value",83:"Variable"},c=new Map;for(let[e,i]of Object.entries(m))c.set(i.toLowerCase(),Number(e));function g(e){let i=parseInt(e,10);if(!isNaN(i))return i;let s=e.toLowerCase(),n=c.get(s);if(n!==void 0)return n;for(let[r,o]of c)if(r.includes(s))return o;return null}function N(e,i,s={}){let{scope:n,limit:r=100}=s,o=g(i);return o===null?[]:b(e,n).map(t=>({row:t,resolvedKind:y(t)})).filter(t=>t.resolvedKind===o).slice(0,r).map(({row:t,resolvedKind:l})=>({symbol:t.symbol,shortName:f(t.symbol),kind:l,kindName:m[l]??"Unknown",relativePath:t.relative_path,startLine:t.start_line,endLine:t.end_line}))}function P(e,i={}){let s=new Map;for(let n of b(e,i.scope)){let r=y(n);r===null||r===0||s.set(r,(s.get(r)??0)+1)}return[...s.entries()].sort((n,r)=>r[1]-n[1]||n[0]-r[0]).map(([n,r])=>({kind:n,kindName:m[n]??"Unknown",count:r}))}function b(e,i){return p(e,{scope:i}).map(S)}function S(e){return{symbol:e.symbol,kind:e.kind,documentation:e.documentation,enclosing_symbol:e.enclosingSymbol,relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine}}function y(e){return e.kind!==null&&e.kind!==0?h(e.kind,e.symbol,e.documentation):M(e.symbol,e.documentation,e.enclosing_symbol)}function h(e,i,s){let n=(s??"").toLowerCase();if(u(i)==="type"){if(n.includes("type "))return 76;if(n.includes("interface "))return 27;if(n.includes("struct "))return 68;if(n.includes("trait "))return 73;if(n.includes("class "))return 9}return e}function M(e,i,s){let n=d(e);if("kind"in n)return null;let r=n.descriptors,o=r[r.length-2]??null,a=u(e),t=(i??"").toLowerCase();return a==="type"?t.includes("type ")?76:t.includes("interface ")?27:t.includes("struct ")?68:t.includes("trait ")?73:(t.includes("class "),9):a==="method"?o?.suffix==="type"?33:23:a==="namespace"?39:a!=="term"?null:t.includes("async def ")||t.includes("def ")?23:(s?u(s):o?.suffix??null)==="type"?21:83}export{N as a,P as b};
2
+ //# sourceMappingURL=chunk-ZNNCDAYX.js.map