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.
- package/README.md +31 -29
- package/dist/augment-vue-worker.js +2 -0
- package/dist/chunk-2ZGHRI2A.js +5 -0
- package/dist/chunk-32R4VYYA.js +2 -0
- package/dist/chunk-3UB2DPLP.js +2 -0
- package/dist/chunk-4X7C236P.js +84 -0
- package/dist/chunk-5LQ6CVX3.js +2 -0
- package/dist/chunk-5YYMKE3G.js +70 -0
- package/dist/chunk-7LSCW7NF.js +6 -0
- package/dist/chunk-7X7FLQC5.js +2 -0
- package/dist/chunk-A5UNS4DR.js +4 -0
- package/dist/chunk-BNCTPTVX.js +2 -0
- package/dist/{chunk-TRBNQ273.js → chunk-C5BFS23M.js} +2 -2
- package/dist/{chunk-DM56ECPZ.js → chunk-DRLWW74T.js} +2 -2
- package/dist/chunk-EB5IVUNU.js +2 -0
- package/dist/{chunk-TPOYTT6O.js → chunk-ERRUE5G4.js} +4 -4
- package/dist/chunk-F4KR22Z2.js +2 -0
- package/dist/chunk-FG6A6ZUP.js +2 -0
- package/dist/chunk-FHSD5RKF.js +19 -0
- package/dist/chunk-FVVEIGP3.js +5 -0
- package/dist/chunk-GBDZY73J.js +2 -0
- package/dist/{chunk-4TYGGOLO.js → chunk-H4DXD2FB.js} +1 -1
- package/dist/chunk-HUASU3AD.js +71 -0
- package/dist/chunk-IJWIYZO5.js +2 -0
- package/dist/chunk-K6H3XJQW.js +7 -0
- package/dist/{chunk-KYT47WU2.js → chunk-KAM4C6ZD.js} +1 -1
- package/dist/{chunk-56LPZC3S.js → chunk-KTCODJNQ.js} +3 -3
- package/dist/chunk-LJ2YWNQF.js +2 -0
- package/dist/chunk-LT2CPEQ4.js +2 -0
- package/dist/chunk-M5QTG55L.js +2 -0
- package/dist/chunk-MKFH7QJG.js +7 -0
- package/dist/chunk-MO32JMOD.js +12 -0
- package/dist/chunk-MO65UK5V.js +6 -0
- package/dist/chunk-MTK3JAJT.js +2 -0
- package/dist/{chunk-6TRXTRCW.js → chunk-MXWC53GJ.js} +4 -4
- package/dist/{chunk-HLILTI7S.js → chunk-OQZF2DQJ.js} +3 -3
- package/dist/chunk-PBFMZKXE.js +6 -0
- package/dist/{chunk-MMKNCPHB.js → chunk-PFMGJ4BR.js} +4 -4
- package/dist/{chunk-5KWWENJZ.js → chunk-PK4U6NWP.js} +2 -2
- package/dist/{chunk-CH47OLNL.js → chunk-Q2ALKKSE.js} +4 -4
- package/dist/chunk-QFCK6WV2.js +39 -0
- package/dist/chunk-QFZE73XF.js +84 -0
- package/dist/chunk-QRYEOK3M.js +2 -0
- package/dist/{chunk-LORWXBOO.js → chunk-RKTDEIHF.js} +1 -1
- package/dist/chunk-ROWAEEOD.js +2 -0
- package/dist/chunk-RT5PV5JQ.js +7 -0
- package/dist/chunk-TLRA5TR6.js +2 -0
- package/dist/chunk-U5MVUPOO.js +2 -0
- package/dist/chunk-URUVLDM7.js +29 -0
- package/dist/chunk-WHGCGENP.js +16 -0
- package/dist/chunk-WIIZF5FP.js +2 -0
- package/dist/chunk-WNMAH3P7.js +2 -0
- package/dist/chunk-XV3XUZ3X.js +11 -0
- package/dist/chunk-YDKWDTAW.js +2 -0
- package/dist/{chunk-IUNRL2AQ.js → chunk-YDNCX5PF.js} +2 -2
- package/dist/chunk-YU25IHJX.js +90 -0
- package/dist/{chunk-VZE4SOJG.js → chunk-Z5CTXSWT.js} +3 -3
- package/dist/chunk-ZFCQQ4B5.js +2 -0
- package/dist/chunk-ZHHMG4UC.js +114 -0
- package/dist/cli.js +487 -388
- package/dist/{db-DKhNQ75l.d.ts → db-BZPa7dzJ.d.ts} +19 -9
- package/dist/index.d.ts +221 -13
- package/dist/index.js +45 -31
- package/dist/postinstall.js +1 -1
- package/dist/queries/affected.d.ts +1 -1
- package/dist/queries/affected.js +1 -1
- package/dist/queries/bottlenecks.d.ts +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +1 -1
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +1 -1
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/code.d.ts +1 -1
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +1 -1
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +1 -1
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/convergence.d.ts +1 -1
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +1 -1
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +1 -1
- package/dist/queries/dead.js +1 -1
- package/dist/queries/deep-chains.d.ts +1 -1
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/deps.d.ts +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +1 -1
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/drift-policy.d.ts +6 -0
- package/dist/queries/drift-policy.js +2 -0
- package/dist/queries/drift.d.ts +1 -1
- package/dist/queries/drift.js +1 -1
- package/dist/queries/extract-candidates.d.ts +1 -1
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +1 -1
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +1 -1
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +1 -1
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +1 -1
- package/dist/queries/imports.js +1 -1
- package/dist/queries/index.d.ts +1 -1
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +1 -1
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/members.d.ts +1 -1
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +1 -1
- package/dist/queries/methods.js +1 -1
- package/dist/queries/outline.d.ts +1 -1
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +1 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +1 -1
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/refs.d.ts +1 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/similar-chains.d.ts +1 -1
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +1 -1
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +1 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +1 -1
- package/dist/queries/slice.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +1 -1
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +1 -1
- package/dist/queries/stats.js +1 -1
- package/dist/queries/surface.d.ts +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system.d.ts +1 -1
- package/dist/queries/system.js +1 -1
- package/dist/queries/trace.d.ts +1 -1
- package/dist/queries/trace.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +1 -1
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +10 -63
- package/package.json +4 -2
- package/dist/chunk-2OXZVIED.js +0 -41
- package/dist/chunk-5IM4IQ6N.js +0 -2
- package/dist/chunk-5OV6CUTY.js +0 -2
- package/dist/chunk-6QXYWGE5.js +0 -10
- package/dist/chunk-C6PQLWHR.js +0 -7
- package/dist/chunk-DX5YEUX4.js +0 -6
- package/dist/chunk-DXXROCSQ.js +0 -19
- package/dist/chunk-EARGTC7U.js +0 -12
- package/dist/chunk-EJXPKSWV.js +0 -29
- package/dist/chunk-EUHHVFTI.js +0 -2
- package/dist/chunk-F2TGKDMW.js +0 -2
- package/dist/chunk-GSVIC6KN.js +0 -2
- package/dist/chunk-H4IWC7KJ.js +0 -89
- package/dist/chunk-H7BWAMFI.js +0 -4
- package/dist/chunk-HUEIPY4M.js +0 -5
- package/dist/chunk-ID7TO4P6.js +0 -65
- package/dist/chunk-J22I2FWD.js +0 -6
- package/dist/chunk-KOGVTPGE.js +0 -7
- package/dist/chunk-LUYN4IWJ.js +0 -2
- package/dist/chunk-MDUIJELV.js +0 -39
- package/dist/chunk-MSNW2AR2.js +0 -2
- package/dist/chunk-N3Z2SJCR.js +0 -2
- package/dist/chunk-NB3GIT4Z.js +0 -7
- package/dist/chunk-OBPP5RRE.js +0 -2
- package/dist/chunk-ORBQ3HJD.js +0 -2
- package/dist/chunk-P6IUCZA3.js +0 -24
- package/dist/chunk-Q2MCCKWZ.js +0 -2
- package/dist/chunk-QRULHDMO.js +0 -84
- package/dist/chunk-RAJHIEBM.js +0 -70
- package/dist/chunk-RKZBRDFK.js +0 -2
- package/dist/chunk-RPRIZ43D.js +0 -2
- package/dist/chunk-RXGCTLHY.js +0 -2
- package/dist/chunk-S6IGA6KK.js +0 -2
- package/dist/chunk-TVJMEDHH.js +0 -2
- package/dist/chunk-UDKLKBPQ.js +0 -2
- package/dist/chunk-UGUBEKK5.js +0 -2
- package/dist/chunk-VKYLXCV6.js +0 -2
- package/dist/chunk-VQXXSUQF.js +0 -8
- package/dist/chunk-VZHI3TUX.js +0 -6
- package/dist/chunk-YSEQFGGH.js +0 -2
package/dist/chunk-VQXXSUQF.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{a as B,b as ie,c as ae,d as G,f as F,g as ce,h as S}from"./chunk-QRULHDMO.js";import{existsSync as ve,readFileSync as Ae}from"fs";import{join as Oe}from"path";import{existsSync as w}from"fs";import{basename as Le,dirname as j,extname as R,join as E,relative as A,resolve as P}from"path";var qe=ie("indexed-paths"),H=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],K=[".py",".pyi"],C=[".java",".scala",".kt",".kts"],Z=[".rs"],ee=[".rb"],pe=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],L=[".cs",".vb"],te=[".dart"],X=[".php"],Ue=[H,K,C,Z,ee,pe,L,te,X];function $(e,r){return r.includes(R(e).toLowerCase())}function We(e){return $(e,K)}function Be(e){return $(e,C)}function Xe(e){return $(e,Z)}function Je(e){return $(e,ee)}function Fe(e){return $(e,pe)}function He(e){return $(e,L)}function le(e){return R(e).toLowerCase()===".vb"}function ze(e){return $(e,te)}function Ve(e){return $(e,X)}function re(e){let r=R(e).toLowerCase();for(let t of Ue)if(t.includes(r))return t;return H}function Qe(e){return Be(e)||He(e)||Ve(e)}function O(e,r,t){return We(r)?q(e,r,t):Xe(r)?T(e,r,t):Je(r)?z(e,r,t):Fe(r)?V(e,r,t):Qe(r)?g(e,t.replace(/\\/g,"."),re(r)):ze(r)?Q(e,r,t):Ye(e,r,t)}function Ye(e,r,t){if(!t.startsWith(".")&&!t.startsWith("/"))return null;let n=j(E(e.config.projectRoot,r)),s=P(n,t),o=M(e);for(let i of tt(s)){let a=b(A(e.config.projectRoot,i));if(o.has(a)||w(i))return a}return b(A(e.config.projectRoot,s))}function q(e,r,t){let n=M(e),s;if(t.startsWith(".")){let o=t.match(/^(\.+)(.*)$/);if(!o)return null;let i=o[1].length,a=o[2].replace(/^\./,""),c=j(E(e.config.projectRoot,r));for(let p=1;p<i;p++)c=j(c);s=a?P(c,a.replace(/\./g,"/")):c}else s=P(e.config.projectRoot,t.replace(/\./g,"/"));for(let o of Ge(s)){let i=b(A(e.config.projectRoot,o));if(n.has(i)||w(o))return i}return null}function T(e,r,t){if(!t)return null;let n=t.replace(/\s+as\s+.+$/,"").trim();if(!n.startsWith("crate::")&&!n.startsWith("self::")&&!n.startsWith("super::"))return null;let s=j(E(e.config.projectRoot,r)),o;n.startsWith("crate::")?o=P(e.config.projectRoot,"src",n.slice(7).replace(/::/g,"/")):n.startsWith("self::")?o=P(s,n.slice(6).replace(/::/g,"/")):o=P(j(s),n.slice(7).replace(/::/g,"/"));for(let i of Ke(o)){let a=b(A(e.config.projectRoot,i));if(M(e).has(a)||w(i))return a}return null}function z(e,r,t){let n=j(E(e.config.projectRoot,r)),s=P(n,t);for(let o of Ze(s)){let i=b(A(e.config.projectRoot,o));if(M(e).has(i)||w(o))return i}return null}function V(e,r,t){let n=M(e),s=j(E(e.config.projectRoot,r)),o=[P(s,t),P(e.config.projectRoot,t),P(e.config.projectRoot,"include",t),P(e.config.projectRoot,"src",t)];for(let i of o){let a=b(A(e.config.projectRoot,i));if(n.has(a)||w(i))return a}return null}function g(e,r,t){let n=M(e),s=r.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),o=s.replace(/\./g,"/"),i=s.split(".").pop()??s;for(let c of t){let p=`${o}${c}`,l=[...n].find(u=>u.endsWith(p));if(l)return l}for(let c of t){let p=[...n].find(l=>Le(l)===`${i}${c}`);if(p)return p}let a=[...n].filter(c=>t.includes(R(c).toLowerCase())).filter(c=>c.includes(`/${o}/`)||c.includes(`/${i}/`)).sort((c,p)=>c.localeCompare(p));return a.length===1?a[0]:null}function Q(e,r,t){let n=M(e);if(t.startsWith("package:")){let i=t.slice(8),a=i.indexOf("/");if(a<0)return null;let c=i.slice(a+1),p=b(c.startsWith("lib/")?c:`lib/${c}`);return n.has(p)?p:null}let s=j(E(e.config.projectRoot,r)),o=P(s,t);for(let i of et(o)){let a=b(A(e.config.projectRoot,i));if(n.has(a)||w(i))return a}return null}function Ge(e){let r=R(e);return K.includes(r)?[e]:[`${e}.py`,`${e}.pyi`,E(e,"__init__.py"),E(e,"__init__.pyi")]}function Ke(e){let r=R(e);return Z.includes(r)?[e]:[`${e}.rs`,E(e,"mod.rs")]}function Ze(e){let r=R(e);return ee.includes(r)?[e]:[`${e}.rb`,E(e,"index.rb")]}function et(e){let r=R(e);return te.includes(r)?[e]:[`${e}.dart`,e]}function tt(e){let r=R(e),t=new Set;if(r){t.add(e);for(let n of H)t.add(e.slice(0,-r.length)+n)}else for(let n of H)t.add(`${e}${n}`),t.add(E(e,`index${n}`));return[...t]}function M(e){return qe.get(e,()=>new Set(e.all(`SELECT relative_path
|
|
2
|
-
FROM documents
|
|
3
|
-
WHERE 1 = 1
|
|
4
|
-
${e.pathExclusionsFor("documents")}`).map(r=>b(r.relative_path)).filter(r=>!e.isIgnored(r))))}function b(e){return e.replace(/\\/g,"/")}function me(e){return e.replace(/'''[\s\S]*?'''/g,v).replace(/"""[\s\S]*?"""/g,v).replace(/#.*$/gm,v).replace(/\/\/.*$/gm,v).replace(/\/\*[\s\S]*?\*\//g,v).replace(/`(?:\\[\s\S]|[^`])*`/g,v).replace(/'(?:\\.|[^'\\\r\n])*'/g,v).replace(/"(?:\\.|[^"\\\r\n])*"/g,v)}function v(e){return e.replace(/[^\r\n]/g," ")}var rt=ae("stripped-lines");function er(e,r,t){return rt.get(e,r,t,()=>me(t).split(`
|
|
5
|
-
`))}var ue=null,ne="";function nt(e){return ue===e||(ue=e,ne=me(e)),ne}function x(e,r,t){let n=nt(e);return`${n.slice(0,r)}${" ".repeat(t-r)}${n.slice(t)}`}function y(e,r){return new RegExp(`\\b${de(r)}\\b`,"m").test(e)}function U(e,r){let t=new Set,n=new RegExp(`\\b${de(r)}\\s*\\.\\s*([A-Za-z_$][\\w$]*)`,"g");for(let s of e.matchAll(n)){let o=s[1];o&&t.add(o)}return[...t]}function de(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function I(e){let r=[],t=0,n=0;for(let s=0;s<e.length;s++){let o=e[s];(o==="{"||o==="["||o==="(")&&t++,(o==="}"||o==="]"||o===")")&&t--,o===","&&t===0&&(r.push(e.slice(n,s)),n=s+1)}return r.push(e.slice(n)),r}function _(e,r){for(let t of e.namedChildren)if(t.type===r)return t;return null}function h(e,r){let t=new Set,n=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]),s=(o,i)=>{let a=i||r.has(o.type);!a&&n.has(o.type)&&t.add(o.text);for(let c of o.children)s(c,a)};return s(e.rootNode,!1),t}function D(e,r,t,n,s,o,i){return{importedName:s,localName:o,sourcePath:i??g(e,n,re(r)),kind:"named",used:y(t,o),usedMembers:[]}}function ge(e,r,t){let n=S(e,r);return n?st(e,r,n):at(t).flatMap(s=>ct(e,r,s.clause,s.specifier,s.start,s.end,t))}function st(e,r,t){let n=h(t,new Set(["import_statement"]));if(ce(r))for(let o of ht(e,r))n.add(o);let s=[];for(let o of t.rootNode.descendantsOfType("import_statement")){let i=ot(o);if(!i)continue;let a=O(e,r,i),c=_(o,"import_clause");if(!c){s.push({importedName:"*",localName:null,sourcePath:a,kind:"side-effect",used:!0,usedMembers:[]});continue}for(let p of c.namedChildren)switch(p.type){case"identifier":{let l=p.text;s.push({importedName:"default",localName:l,sourcePath:a,kind:"default",used:n.has(l),usedMembers:[]});break}case"namespace_import":{let u=_(p,"identifier")?.text??"";if(!u)break;let m=it(t,u);s.push({importedName:"*",localName:u,sourcePath:a,kind:"namespace",used:m.length>0||n.has(u),usedMembers:m});break}case"named_imports":{for(let l of p.namedChildren){if(l.type!=="import_specifier")continue;let u=l.namedChild(0),m=l.namedChild(1);if(!u)continue;let d=u.text,f=m?.text??d;s.push({importedName:d,localName:f,sourcePath:a,kind:"named",used:n.has(f),usedMembers:[]})}break}}}return s}function ot(e){let r=_(e,"string");if(!r)return null;let t=_(r,"string_fragment");return t?t.text:null}function it(e,r){let t=new Set;for(let n of e.rootNode.descendantsOfType("member_expression")){let s=n.namedChild(0),o=n.namedChild(1);!s||!o||s.type!=="identifier"||s.text!==r||(o.type==="property_identifier"||o.type==="identifier")&&t.add(o.text)}return[...t]}function at(e){let r=[],t=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(t)){let o=s[0],i=s[1],a=s[2];!o||!a||typeof s.index!="number"||r.push({clause:i,specifier:a,start:s.index,end:s.index+o.length})}let n=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(n)){let o=s[0],i=s[1];!o||!i||typeof s.index!="number"||r.push({clause:null,specifier:i,start:s.index,end:s.index+o.length})}return r.sort((s,o)=>s.start-o.start)}function ct(e,r,t,n,s,o,i){let a=O(e,r,n),c=x(i,s,o);return t?pt(t).map(l=>({...l,sourcePath:a})).map(l=>{if(l.kind==="namespace"){let u=U(c,l.localName);return{...l,used:u.length>0||y(c,l.localName),usedMembers:u}}return l.kind==="side-effect"?{...l,used:!0,usedMembers:[]}:{...l,used:l.localName?y(c,l.localName):!1,usedMembers:[]}}):[{importedName:"*",localName:null,sourcePath:a,kind:"side-effect",used:!0,usedMembers:[]}]}function pt(e){let r=e.trim().replace(/^type\s+/,""),[t,n]=lt(r),s=[];return t&&s.push(...fe(t)),n&&s.push(...fe(n)),s}function fe(e){let r=e.trim();if(!r)return[];if(r.startsWith("{")){let t=r.slice(1,-1).trim();return t?I(t).map(n=>{let s=n.trim().replace(/^type\s+/,""),[o,i]=s.split(/\s+as\s+/);return{importedName:o.trim(),localName:(i??o).trim(),kind:"named"}}):[]}return r.startsWith("* as ")?[{importedName:"*",localName:r.slice(5).trim(),kind:"namespace"}]:[{importedName:"default",localName:r,kind:"default"}]}function lt(e){let r=0;for(let t=0;t<e.length;t++){let n=e[t];if(n==="{"&&r++,n==="}"&&r--,n===","&&r===0)return[e.slice(0,t).trim(),e.slice(t+1).trim()]}return[e.trim(),null]}function he(e,r){let t=S(e,r);if(t)return mt(e,r,t);let n=G(e,r);if(!n)return[];let s=[],o=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let c of n.matchAll(o)){if(typeof c.index!="number")continue;let p=c[1]??"",l=c[2]??"",u=I(p).map(f=>ut(f.trim())).filter(f=>!!f),m=W(n,c.index),d=W(n,c.index+c[0].length-1);s.push({kind:"named",sourcePath:O(e,r,l),names:u,startLine:m,endLine:d})}let i=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let c of n.matchAll(i)){if(typeof c.index!="number")continue;let p=c[2]??"",l=W(n,c.index),u=W(n,c.index+c[0].length-1);s.push({kind:"star-as",sourcePath:O(e,r,p),names:[],startLine:l,endLine:u})}let a=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let c of n.matchAll(a)){if(typeof c.index!="number")continue;let p=c[1]??"",l=W(n,c.index),u=W(n,c.index+c[0].length-1);s.push({kind:"star",sourcePath:O(e,r,p),names:[],startLine:l,endLine:u})}return s}function ut(e){if(!e)return null;let r=e.replace(/^type\s+/,"").trim();if(!r)return null;let t=r.match(/^(\w+)\s+as\s+(\w+)$/);if(t)return t[2]??null;let n=r.match(/^(\w+)$/);return n?n[1]??null:null}function W(e,r){let t=0;for(let n=0;n<r&&n<e.length;n++)e.charCodeAt(n)===10&&t++;return t}function mt(e,r,t){let n=[];for(let s of t.rootNode.descendantsOfType("export_statement")){let o=dt(e,r,s);if(o===void 0)continue;let i=s.startPosition.row,a=s.endPosition.row,c=ft(s,o,i,a);n.push(c)}return n}function dt(e,r,t){let n=_(t,"string");if(!n)return;let s=_(n,"string_fragment");if(s)return O(e,r,s.text)}function ft(e,r,t,n){let s=_(e,"export_clause");if(s){let i=[];for(let a of s.namedChildren){if(a.type!=="export_specifier")continue;let c=a.namedChild(0),p=a.namedChild(1);c&&i.push((p??c).text)}return{kind:"named",sourcePath:r,names:i,startLine:t,endLine:n}}return _(e,"namespace_export")?{kind:"star-as",sourcePath:r,names:[],startLine:t,endLine:n}:{kind:"star",sourcePath:r,names:[],startLine:t,endLine:n}}var gt=B("vue-non-script-identifiers");function ht(e,r){return gt.get(e,r,()=>{let t=new Set,n=G(e,r);if(!n)return t;let o=n.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g,i=>i.replace(/[^\r\n]/g," ")).replace(/<!--[\s\S]*?-->/g,i=>i.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,i=>i.replace(/[^\r\n]/g," "));for(let i of o.matchAll(/[A-Za-z_$][\w$]*/g))t.add(i[0]);return t})}import{basename as Se}from"path";function xe(e,r,t){let n=S(e,r);if(n)return St(e,r,n);let s=[];for(let o of t.matchAll(/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm)){let i=o[1]?.trim(),a=o[0];if(!i||!a||typeof o.index!="number")continue;let c=x(t,o.index,o.index+a.length),p=Se(i).replace(/\.[^.]+$/,"");s.push({importedName:i,localName:p,sourcePath:V(e,r,i),kind:"named",used:y(c,p),usedMembers:[]})}return s}function St(e,r,t){let n=h(t,new Set(["preproc_include"])),s=[];for(let o of t.rootNode.descendantsOfType("preproc_include")){let i=null;for(let c of o.namedChildren){if(c.type==="system_lib_string"){i=c.text.replace(/^<|>$/g,"");break}if(c.type==="string_literal"){i=c.namedChildren.find(l=>l.type==="string_content")?.text??c.text.replace(/^"|"$/g,"");break}}if(!i)continue;let a=Se(i).replace(/\.[^.]+$/,"");s.push({importedName:i,localName:a,sourcePath:V(e,r,i),kind:"named",used:n.has(a),usedMembers:[]})}return s}function ye(e,r,t){let n=[];for(let s of t.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let o=s[1]?.trim(),i=s[2]?.trim()??null,a=s[0];if(!o||!a||typeof s.index!="number")continue;let c=x(t,s.index,s.index+a.length);n.push({importedName:o,localName:i,sourcePath:Q(e,r,o),kind:i?"namespace":"side-effect",used:i?y(c,i):!0,usedMembers:i?U(c,i):[]})}return n}function Ne(e,r,t){let n=[];for(let s of t.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let o=s[1]?.trim();o&&n.push({specifier:o,sourcePath:Q(e,r,o)})}return n}function Ie(e,r,t){let n=S(e,r),s=F(r);if(n&&s==="csharp")return yt(e,r,n);if(n&&s==="vb")return xt(e,r,n);let o=[],i=le(r)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;for(let a of t.matchAll(i)){let c=a[1]?.trim(),p=a[0];if(!c||!p||typeof a.index!="number")continue;let l=x(t,a.index,a.index+p.length),[u,m]=c.split(/\s*=\s*/),d=!!m,f=(d?m:u)?.trim()??c,N=f.split(".").pop()??f,k=d?u?.trim()??N:N;o.push(D(e,r,l,f,N,k,g(e,f,L)))}return o}function xt(e,r,t){let n=h(t,new Set(["imports_statement"])),s=[];for(let o of t.rootNode.descendantsOfType("imports_statement")){let i=o.namedChildren.filter(m=>m.type==="namespace_name");if(i.length===0)continue;let a=i[i.length-1],c=i.length>1?i[0]:null,p=a.text,l=p.split(".").pop()??p,u=c?.text??l;s.push({importedName:l,localName:u,sourcePath:g(e,p,L),kind:c?"namespace":"named",used:n.has(u),usedMembers:[]})}return s}function yt(e,r,t){let n=h(t,new Set(["using_directive"])),s=[];for(let o of t.rootNode.descendantsOfType("using_directive")){let i=o.namedChildren;if(i.length===0)continue;let a=null,c=null;if(i.length>=2&&i[0].type==="identifier"&&(i[1].type==="qualified_name"||i[1].type==="identifier")?(a=i[0],c=i[1]):c=i[i.length-1],!c)continue;let p=c.text,l=p.split(".").pop()??p,u=a?.text??l;s.push({importedName:l,localName:u,sourcePath:g(e,p,L),kind:a?"namespace":"named",used:n.has(u),usedMembers:[]})}return s}function Pe(e,r,t){let n=S(e,r),s=F(r);if(n&&s==="java")return Nt(e,r,n);if(n&&s==="kotlin")return It(e,r,n);if(n&&s==="scala")return Pt(e,r,n);let o=[];for(let i of t.matchAll(/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm)){let a=i[1]?.trim(),c=i[0];if(!a||!c||typeof i.index!="number")continue;let p=x(t,i.index,i.index+c.length);o.push(...bt(e,r,a,p))}return o}function Nt(e,r,t){let n=h(t,new Set(["import_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("import_declaration")){let i=o.children.some(u=>u.type==="asterisk"),c=o.namedChildren.find(u=>u.type==="scoped_identifier")??o.namedChildren.find(u=>u.type==="identifier");if(!c)continue;let p=c.text;if(i){s.push({importedName:"*",localName:null,sourcePath:g(e,p,C),kind:"namespace",used:!0,usedMembers:[]});continue}let l=p.split(".").pop()??p;s.push({importedName:l,localName:l,sourcePath:g(e,p,C),kind:"named",used:n.has(l),usedMembers:[]})}return s}function It(e,r,t){let n=h(t,new Set(["import_header","import_list"])),s=[];for(let o of t.rootNode.descendantsOfType("import_header")){let i=o.namedChildren.find(d=>d.type==="identifier");if(!i)continue;let a=o.namedChildren.some(d=>d.type==="wildcard_import"),c=o.namedChildren.find(d=>d.type==="import_alias");if(a){s.push({importedName:"*",localName:null,sourcePath:g(e,i.text,C),kind:"namespace",used:!0,usedMembers:[]});continue}let p=i.text,l=p.split(".").pop()??p,m=c?.namedChild(0)?.text??l;s.push({importedName:l,localName:m,sourcePath:g(e,p,C),kind:"named",used:n.has(m),usedMembers:[]})}return s}function Pt(e,r,t){let n=h(t,new Set(["import_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("import_declaration")){let i=o.namedChildren.find(u=>u.type==="namespace_selectors"||u.type==="namespace_wildcard"),a=o.namedChildren.filter(u=>u!==i&&(u.type==="identifier"||u.type==="stable_identifier")),c=a.map(u=>u.text).join(".");if(!c)continue;if(i?.type==="namespace_wildcard"){s.push({importedName:"*",localName:null,sourcePath:g(e,c,C),kind:"namespace",used:!0,usedMembers:[]});continue}if(i?.type==="namespace_selectors"){for(let u of i.namedChildren)if(u.type==="arrow_renamed_identifier"){let[m,d]=u.namedChildren;if(!m)continue;let f=m.text,N=d?.text??f;if(f==="_")continue;s.push({importedName:f,localName:N,sourcePath:g(e,`${c}.${f}`,C),kind:"named",used:n.has(N),usedMembers:[]})}else if(u.type==="identifier"){let m=u.text;s.push({importedName:m,localName:m,sourcePath:g(e,`${c}.${m}`,C),kind:"named",used:n.has(m),usedMembers:[]})}continue}let p=a[a.length-1]?.text??c,l=a.slice(0,-1).map(u=>u.text).join(".")||c;s.push({importedName:p,localName:p,sourcePath:g(e,l&&a.length>1?`${l}.${p}`:c,C),kind:"named",used:n.has(p),usedMembers:[]})}return s}function bt(e,r,t,n){if(t.includes("{")&&t.includes("}")){let s=t.slice(0,t.indexOf("{")).replace(/\.$/,"").trim(),o=t.slice(t.indexOf("{")+1,t.lastIndexOf("}")).trim();return I(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[c,p]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),l=c?.trim();if(!l||l==="_")return[];let u=(p??l.split(".").pop()??l).trim(),m=l==="_"?s:`${s}.${l}`.replace(/\.\./g,".");return[D(e,r,n,m,l,u)]})}return[D(e,r,n,t,t.split(".").pop()??t,t.split(".").pop()??t)]}function _e(e,r,t){let n=S(e,r);if(n)return _t(e,r,n);let s=[];for(let o of t.matchAll(/^[ \t]*use\s+(.+?)\s*;$/gm)){let i=o[1]?.trim(),a=o[0];if(!i||!a||typeof o.index!="number")continue;let c=x(t,o.index,o.index+a.length);for(let p of I(i)){let l=p.trim();if(!l)continue;let[u,m]=l.split(/\s+as\s+/i),d=u?.trim()??l,f=d.split("\\").pop()??d,N=(m??f).trim();s.push(D(e,r,c,d,f,N,g(e,d.replace(/\\/g,"."),X)))}}return s}function _t(e,r,t){let n=h(t,new Set(["namespace_use_declaration"])),s=[],o=(i,a,c)=>{s.push({importedName:a,localName:c,sourcePath:g(e,i.replace(/\\/g,"."),X),kind:"named",used:n.has(c),usedMembers:[]})};for(let i of t.rootNode.descendantsOfType("namespace_use_declaration")){let a=i.namedChildren.find(c=>c.type==="namespace_use_group");if(a){let c=i.namedChildren.find(p=>p.type==="namespace_name")?.text??"";for(let p of a.namedChildren){if(p.type!=="namespace_use_clause")continue;let{importedName:l,localName:u,qualified:m}=be(p,c);l&&o(m,l,u)}continue}for(let c of i.namedChildren){if(c.type!=="namespace_use_clause")continue;let{importedName:p,localName:l,qualified:u}=be(c,"");p&&o(u,p,l)}}return s}function be(e,r){let t=e.namedChildren.find(p=>p.type==="qualified_name"),n=e.namedChildren.filter(p=>p.type==="name"),s="";t?s=t.text:n.length>=1&&(s=n[0].text);let o=t&&n.length>0?n[n.length-1]:null,i=s.split("\\").pop()??s,a=o?.text??i,c=r?`${r}\\${s}`:s;return{importedName:i,localName:a,qualified:c}}function De(e,r,t){let n=S(e,r);return n?Et(e,r,n):Dt(t).flatMap(s=>Tt(e,r,s,t))}function Et(e,r,t){let n=h(t,new Set(["import_statement","import_from_statement"])),s=[];for(let o of t.rootNode.descendantsOfType("import_statement"))for(let i of o.namedChildren){let a=Ee(i);if(!a)continue;let c=q(e,r,a.qualifiedName);s.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:n.has(a.localName),usedMembers:[]})}for(let o of t.rootNode.descendantsOfType("import_from_statement")){let i=o.namedChild(0);if(!i)continue;let a=Ct(i);if(a===null)continue;let c=q(e,r,a);for(let p=1;p<o.namedChildCount;p+=1){let l=o.namedChild(p);if(l.type==="wildcard_import"){s.push({importedName:"*",localName:null,sourcePath:c,kind:"side-effect",used:!0,usedMembers:[]});continue}let u=Ee(l);u&&s.push({importedName:u.qualifiedName,localName:u.localName,sourcePath:c,kind:"named",used:n.has(u.localName),usedMembers:[]})}}return s}function Ee(e){if(e.type==="aliased_import"){let r=e.namedChild(0),t=e.namedChild(1);return!r||!t?null:{qualifiedName:r.text,localName:t.text}}if(e.type==="dotted_name"){let r=e.text;return{qualifiedName:r,localName:r.split(".")[0]??r}}return e.type==="identifier"?{qualifiedName:e.text,localName:e.text}:null}function Ct(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let r=_(e,"import_prefix")?.text??"",t=_(e,"dotted_name")?.text??"";return`${r}${t}`}return null}function Dt(e){let r=e.split(`
|
|
6
|
-
`),t=[],n=0;for(let s=0;s<r.length;s++){let o=r[s],i=o.trimStart(),a=n;if(n+=o.length+1,!i.startsWith("import ")&&!i.startsWith("from "))continue;let c=o,p=a+o.length,l=Ce(o);for(;s+1<r.length&&(l>0||c.trimEnd().endsWith("\\"));){s++;let m=r[s];c+=`
|
|
7
|
-
${m}`,p+=1+m.length,l+=Ce(m),n+=m.length+1}let u=Rt(c);u&&t.push({...u,start:a,end:p})}return t}function Rt(e){let r=e.replace(/\\\s*\n/g," ").trim();if(r.startsWith("import "))return{kind:"import",module:null,clause:r.slice(7).trim()};let t=r.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!t)return null;let n=t[2].trim();return n.startsWith("(")&&n.endsWith(")")&&(n=n.slice(1,-1).trim()),{kind:"from",module:t[1],clause:n}}function Tt(e,r,t,n){let s=x(n,t.start,t.end),o=t.clause.replace(/\n/g," ").trim();if(t.kind==="import")return I(o).flatMap(c=>{let p=c.trim().replace(/,$/,"");if(!p)return[];let[l,u]=p.split(/\s+as\s+/),m=l.trim(),d=(u??m.split(".")[0]??m).trim(),f=q(e,r,m),N=U(s,d);return[{importedName:m,localName:d,sourcePath:f,kind:"namespace",used:y(s,d)||N.length>0,usedMembers:N}]});let i=t.module?q(e,r,t.module):null,a=[];for(let c of I(o)){let p=c.trim().replace(/,$/,"");if(!p)continue;if(p==="*"){a.push({importedName:"*",localName:null,sourcePath:i,kind:"side-effect",used:!0,usedMembers:[]});continue}let[l,u]=p.split(/\s+as\s+/),m=(u??l).trim();a.push({importedName:l.trim(),localName:m,sourcePath:i,kind:"named",used:y(s,m),usedMembers:[]})}return a}function Ce(e){let r=0;for(let t of e)t==="("&&r++,t===")"&&r--;return r}import{basename as kt}from"path";function Re(e,r,t){let n=S(e,r);if(n)return jt(e,r,n);let s=[];for(let o of t.matchAll(/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm)){let i=o[1],a=o[2],c=o[0];if(!i||!a||!c||typeof o.index!="number")continue;let p=x(t,o.index,o.index+c.length),l=i==="require_relative"?z(e,r,a):null;if(l){let u=Te(a);s.push({importedName:u,localName:u,sourcePath:l,kind:"named",used:y(p,u),usedMembers:[]});continue}s.push({importedName:a,localName:null,sourcePath:l,kind:"side-effect",used:!0,usedMembers:[]})}return s}function jt(e,r,t){let n=h(t,new Set([])),s=[],o=new Set(["require","require_relative","load"]);for(let i of t.rootNode.descendantsOfType("call")){let a=i.namedChild(0);if(!a||a.type!=="identifier"||!o.has(a.text))continue;let p=i.namedChildren.find(d=>d.type==="argument_list")?.namedChild(0);if(!p||p.type!=="string")continue;let u=p.namedChildren.find(d=>d.type==="string_content")?.text;if(!u)continue;let m=a.text==="require_relative"?z(e,r,u):null;if(m){let d=Te(u);s.push({importedName:d,localName:d,sourcePath:m,kind:"named",used:n.has(d),usedMembers:[]})}else s.push({importedName:u,localName:null,sourcePath:m,kind:"side-effect",used:!0,usedMembers:[]})}return s}function Te(e){return kt(e).replace(/\.[^.]+$/,"").split("_").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}function ke(e,r,t){let n=S(e,r);if(n)return $t(e,r,n);let s=[];for(let o of t.matchAll(/^[ \t]*use\s+(.+?)\s*;$/gm)){let i=o[1]?.trim(),a=o[0];if(!i||!a||typeof o.index!="number")continue;let c=x(t,o.index,o.index+a.length);s.push(...vt(e,r,i,c))}return s}function $t(e,r,t){let n=h(t,new Set(["use_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("use_declaration")){let i=o.namedChild(0);if(i)for(let a of J(i,"")){if(!a.importedName||a.importedName==="*")continue;let c=T(e,r,a.qualifiedName)??T(e,r,a.qualifiedName.split("::").slice(0,-1).join("::"));s.push({importedName:a.importedName,localName:a.localName,sourcePath:c,kind:"named",used:n.has(a.localName),usedMembers:[]})}}return s}function J(e,r){switch(e.type){case"identifier":case"super":case"self":case"crate":{let t=e.text;return[{qualifiedName:Y(r,t),importedName:t,localName:t}]}case"scoped_identifier":{let t=e.text,n=t.split("::").pop()??t;return[{qualifiedName:Y(r,t),importedName:n,localName:n}]}case"scoped_use_list":{let t=e.namedChild(0),n=e.namedChild(1);if(!t||!n)return[];let s=Y(r,t.text),o=[];for(let i of n.namedChildren)o.push(...J(i,s));return o}case"use_list":{let t=[];for(let n of e.namedChildren)t.push(...J(n,r));return t}case"use_as_clause":{let t=e.namedChild(0),n=e.namedChild(1);if(!t||!n)return[];let s=J(t,r),o=n.text;return s.map(i=>({...i,localName:o}))}case"use_wildcard":{let t=e.namedChild(0),n=t?t.text:"";return[{qualifiedName:Y(r,`${n}::*`),importedName:"*",localName:"*"}]}default:return[]}}function Y(e,r){return e?r?`${e}::${r}`:e:r}function vt(e,r,t,n){let s=t.trim();if(s.includes("{")&&s.includes("}")){let l=s.slice(0,s.indexOf("{")).replace(/::$/,"").trim(),u=s.slice(s.indexOf("{")+1,s.lastIndexOf("}")).trim();return I(u).flatMap(m=>{let d=m.trim();if(!d||d==="self")return[];let[f,N]=d.split(/\s+as\s+/),k=f?.trim();if(!k)return[];let Me=(N??k.split("::").pop()??k).trim(),we=`${l}::${k}`.replace(/::::/g,"::");return[D(e,r,n,we,k.split("::").pop()??k,Me,T(e,r,l))]})}let[o,i]=s.split(/\s+as\s+/),a=o?.trim()??s,c=(i??a.split("::").pop()??a).trim(),p=T(e,r,a)??T(e,r,a.split("::").slice(0,-1).join("::"));return[D(e,r,n,a,a.split("::").pop()??a,c,p)]}function je(e,r,t){let n=S(e,r);if(n)return At(e,r,n);let s=[];for(let o of t.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let i=o[1]?.trim();i&&s.push(...Mt(e,r,i))}return s}function At(e,r,t){let n=[];for(let s of t.rootNode.descendantsOfType("use_declaration")){if(!Ot(s))continue;let o=s.namedChildren.find(i=>i.type!=="visibility_modifier");if(o)for(let i of J(o,""))i.importedName&&n.push(se(e,r,i.qualifiedName))}return n}function Ot(e){for(let r of e.children)if(r.type==="visibility_modifier"&&r.text.startsWith("pub"))return!0;return!1}function Mt(e,r,t){let n=t.trim();if(n.includes("{")&&n.includes("}")){let s=n.slice(0,n.indexOf("{")).replace(/::$/,"").trim(),o=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return I(o).flatMap(i=>{let a=i.trim();if(!a||a==="self")return[];let[c]=a.split(/\s+as\s+/),p=`${s}::${c?.trim()??a}`.replace(/::::/g,"::");return[se(e,r,p)]})}return[se(e,r,n)]}function se(e,r,t){return{specifier:t,sourcePath:T(e,r,t)??T(e,r,t.split("::").slice(0,-1).join("::"))}}function $e(e,r){let t=r.toLowerCase();for(let n of e)for(let s of n.extensions)if(t.endsWith(s))return n;return null}var wt={language:"javascript",extensions:[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],parseImports:ge},Lt={language:"python",extensions:[".py",".pyi"],parseImports:De},qt={language:"jvm",extensions:[".java",".scala",".kt",".kts"],parseImports:Pe},Ut={language:"rust",extensions:[".rs"],parseImports:ke,parseExports:je},Wt={language:"ruby",extensions:[".rb"],parseImports:Re},Bt={language:"c/cpp",extensions:[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],parseImports:xe},Xt={language:"dotnet",extensions:[".cs",".vb"],parseImports:Ie},Jt={language:"dart",extensions:[".dart"],parseImports:ye,parseExports:Ne},Ft={language:"php",extensions:[".php"],parseImports:_e},Ht=[wt,Lt,qt,Ut,Wt,Bt,Xt,Jt,Ft];function oe(e){return $e(Ht,e)}function Sn(e,r){return he(e,r)}var zt=B("source-imports"),Vt=B("source-exports");function xn(e,r){let t=b(r);return zt.get(e,t,()=>{let n=oe(t);if(!n)return[];let s=Oe(e.config.projectRoot,t);if(!ve(s))return[];let o=Ae(s,"utf-8");return n.parseImports(e,t,o)})}function yn(e,r){let t=b(r);return Vt.get(e,t,()=>{let n=oe(t);if(!n?.parseExports)return[];let s=Oe(e.config.projectRoot,t);if(!ve(s))return[];let o=Ae(s,"utf-8");return n.parseExports(e,t,o)})}export{me as a,er as b,de as c,Sn as d,xn as e,yn as f};
|
|
8
|
-
//# sourceMappingURL=chunk-VQXXSUQF.js.map
|
package/dist/chunk-VZHI3TUX.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as f}from"./chunk-DX5YEUX4.js";import{a as p}from"./chunk-H4IWC7KJ.js";import{b as g}from"./chunk-5IM4IQ6N.js";import{readFileSync as v}from"fs";import{join as d}from"path";function _(e,u,l={}){let{context:a=0}=l,r=u.match(/^(.+\.\w+):(\d+)-(\d+)$/);if(r)return y(e,r[1],parseInt(r[2],10),parseInt(r[3],10),a);let t=p(e,u);if(!t)return null;let n=e.get("SELECT language FROM documents WHERE relative_path = ?",t.relativePath),m=d(e.config.projectRoot,t.relativePath),o;try{o=v(m,"utf-8")}catch{return null}let i=o.split(`
|
|
2
|
-
`),s=Math.max(0,t.startLine-a),c=Math.min(i.length-1,t.endLine+a),h=i.slice(s,c+1).join(`
|
|
3
|
-
`);return{symbol:t.symbol,shortName:g(t.symbol),relativePath:t.relativePath,startLine:s,endLine:c,language:n?.language??null,source:h}}function y(e,u,l,a,r){let t=f(e,u);if(!t)return null;let n=e.get("SELECT relative_path, language FROM documents WHERE relative_path = ?",t);if(!n)return null;let m=d(e.config.projectRoot,n.relative_path),o;try{o=v(m,"utf-8")}catch{return null}let i=o.split(`
|
|
4
|
-
`),s=Math.max(0,l-1-r),c=Math.min(i.length-1,a-1+r),h=i.slice(s,c+1).join(`
|
|
5
|
-
`);return{symbol:`${n.relative_path}:${l}-${a}`,shortName:`${n.relative_path}:${l}-${a}`,relativePath:n.relative_path,startLine:s,endLine:c,language:n.language,source:h}}export{_ as a};
|
|
6
|
-
//# sourceMappingURL=chunk-VZHI3TUX.js.map
|
package/dist/chunk-YSEQFGGH.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as p,b as d}from"./chunk-5KWWENJZ.js";import{g as B}from"./chunk-ID7TO4P6.js";function w(s,e={}){let{scope:r,maxDepth:c=10}=e,n=B(s,r),i=[],l=new Set,a=new Set,f=[];function g(t,o){if(o>c)return;if(a.has(t)){let h=f.indexOf(t);if(h!==-1){let u=f.slice(h).concat(t),m=u.indexOf(u.reduce(($,x)=>$<x?$:x)),y=[...u.slice(m,-1),...u.slice(0,m),u[m]],S=y.join(" -> ");b.has(S)||(b.add(S),i.push({path:y,kind:R(y)}))}return}if(l.has(t))return;l.add(t),a.add(t),f.push(t);let k=n.get(t);if(k)for(let h of k)g(h,o+1);f.pop(),a.delete(t)}let b=new Set;for(let t of n.keys())l.has(t)||g(t,0);return i.sort((t,o)=>t.kind!==o.kind?t.kind==="real"?-1:1:t.path.length-o.path.length),i}function R(s){for(let c of s){let n=p(c);if(n==="test"||n==="barrel"||n==="entry")return"module-hierarchy"}if(s.length!==3)return"real";let[e,r]=s;return!e||!r?"real":d(e)||d(r)||C(e,r)||C(r,e)||D(e,r)||D(r,e)||p(e)==="entry"||p(r)==="entry"?"module-hierarchy":"real"}function C(s,e){if(!/\.rs$/.test(s)||!/\.rs$/.test(e))return!1;let r=e.replace(/\.rs$/,"/");return s.startsWith(r)?!s.slice(r.length).includes("/"):!1}function D(s,e){if(!/\.rs$/.test(s)||!/\.rs$/.test(e))return!1;let r=s.replace(/\.rs$/,""),c=e.replace(/\.rs$/,"");if(r===c+"_tests"||r===c+"/tests")return!0;let n=s.split("/"),i=e.split("/");if(n.length===i.length&&n.includes("tests")&&i.includes("src")){let l=n[n.length-1],a=i[i.length-1];if(l&&l===a)return!0}return!1}export{w as a};
|
|
2
|
-
//# sourceMappingURL=chunk-YSEQFGGH.js.map
|