scip-query 0.10.0 → 0.10.2
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 +115 -58
- package/dist/augment-vue-worker.js +1 -1
- package/dist/chunk-3KLLFNT4.js +2 -0
- package/dist/{chunk-UIWAZ2NT.js → chunk-3UVJJ6Z7.js} +1 -1
- package/dist/chunk-3UW7VM4H.js +62 -0
- package/dist/chunk-3ZYF3ELZ.js +2 -0
- package/dist/{chunk-MN75T4UB.js → chunk-47UA45TU.js} +2 -2
- package/dist/{chunk-NC4IUW25.js → chunk-4ZUJJRWT.js} +2 -2
- package/dist/chunk-5B53WB6E.js +4 -0
- package/dist/{chunk-2WEH5QHC.js → chunk-5FOPAXWY.js} +2 -2
- package/dist/{chunk-VZRILF2Z.js → chunk-5M4TYWVI.js} +2 -2
- package/dist/{chunk-QJWN6LA5.js → chunk-5QJXH6ZL.js} +5 -5
- package/dist/{chunk-NN3O7TPH.js → chunk-64MNV6AB.js} +1 -1
- package/dist/chunk-77YBOOYT.js +2 -0
- package/dist/chunk-7KCSELEV.js +2 -0
- package/dist/{chunk-ZZ2W5P3D.js → chunk-7OHWPJ5N.js} +2 -2
- package/dist/chunk-7S5E7KWT.js +2 -0
- package/dist/chunk-A3VNUGKJ.js +2 -0
- package/dist/{chunk-ISCKLDSS.js → chunk-A4L36SZS.js} +3 -3
- package/dist/{chunk-IVAIPXNO.js → chunk-AUVBR62P.js} +2 -2
- package/dist/chunk-AW4N6MGC.js +18 -0
- package/dist/{chunk-PG3ZI5IH.js → chunk-B6MJ5VQV.js} +2 -2
- package/dist/chunk-B75HZHUP.js +2 -0
- package/dist/chunk-BGBBVSH4.js +2 -0
- package/dist/chunk-BKDXBJDQ.js +2 -0
- package/dist/{chunk-AQYBOORI.js → chunk-C2QSK7E7.js} +1 -1
- package/dist/chunk-C3MZZ2ZN.js +2 -0
- package/dist/{chunk-AP5GTKSG.js → chunk-CAWSSEVM.js} +2 -2
- package/dist/chunk-CFL2CNIF.js +10 -0
- package/dist/{chunk-4HTJZC6G.js → chunk-CJJP64OC.js} +2 -2
- package/dist/chunk-CNTEQMHA.js +2 -0
- package/dist/{chunk-WEJYUS5O.js → chunk-CRU42NJU.js} +2 -2
- package/dist/chunk-CSWZFD46.js +2 -0
- package/dist/{chunk-ZOT3WUZW.js → chunk-CTCAF3YA.js} +2 -2
- package/dist/chunk-D322LMSA.js +5 -0
- package/dist/{chunk-772YYL6I.js → chunk-DAI74TJU.js} +2 -2
- package/dist/chunk-DE7MA6OD.js +3 -0
- package/dist/chunk-DJMK4DBL.js +2 -0
- package/dist/chunk-DRAZH77R.js +7 -0
- package/dist/{chunk-L2KFPRMA.js → chunk-E44ZMVNA.js} +2 -2
- package/dist/{chunk-BNW3Q24R.js → chunk-E7KERP7E.js} +2 -2
- package/dist/{chunk-QKO474FG.js → chunk-EOZIZWW4.js} +2 -2
- package/dist/chunk-ERHOS6AW.js +2 -0
- package/dist/{chunk-ADRYSISR.js → chunk-ESG4HBEF.js} +2 -2
- package/dist/chunk-EWC3UK4V.js +3 -0
- package/dist/chunk-FGCL6NDB.js +8 -0
- package/dist/chunk-FIB4JPEX.js +2 -0
- package/dist/chunk-FNRPGGVI.js +2 -0
- package/dist/chunk-FOQHUKNZ.js +4 -0
- package/dist/chunk-FPMVCDIJ.js +2 -0
- package/dist/chunk-FUPDW5AC.js +3 -0
- package/dist/chunk-G3WGZU5Q.js +2 -0
- package/dist/chunk-GS33KGAY.js +2 -0
- package/dist/chunk-GZCQTZLK.js +2 -0
- package/dist/{chunk-VGBSY6N7.js → chunk-HVTYSC26.js} +2 -2
- package/dist/{chunk-2BMFRBV6.js → chunk-ICXVNWMI.js} +2 -2
- package/dist/chunk-JM72FNGA.js +2 -0
- package/dist/chunk-KPHKX4LP.js +71 -0
- package/dist/{chunk-6DEX3XP6.js → chunk-LPLGJ4HO.js} +2 -2
- package/dist/chunk-MHK7Z53U.js +2 -0
- package/dist/chunk-MHTDOFV7.js +5 -0
- package/dist/chunk-MUULWXSJ.js +2 -0
- package/dist/chunk-MZ7APUFN.js +3 -0
- package/dist/chunk-NNDYO2DX.js +2 -0
- package/dist/chunk-NP5HYVLX.js +20 -0
- package/dist/{chunk-Y5H7TBVE.js → chunk-NVFERV4U.js} +2 -2
- package/dist/{chunk-LWYIGRHR.js → chunk-NXIAHE7F.js} +1 -1
- package/dist/chunk-O3OKSF6O.js +2 -0
- package/dist/chunk-O4L4AB3T.js +2 -0
- package/dist/chunk-OBBDKQAG.js +3 -0
- package/dist/chunk-OLD6PBU6.js +7 -0
- package/dist/{chunk-V76FCF5F.js → chunk-PFOCOG57.js} +2 -2
- package/dist/chunk-PVZMPG5I.js +2 -0
- package/dist/chunk-QLNGUWR7.js +2 -0
- package/dist/chunk-QSXQT3NE.js +2 -0
- package/dist/{chunk-OLCKSG3Y.js → chunk-QVCCLDZI.js} +2 -2
- package/dist/chunk-RHTJBYZ5.js +2 -0
- package/dist/chunk-SPE4YCOT.js +7 -0
- package/dist/{chunk-FVIKFWUL.js → chunk-TM6GVHA6.js} +2 -2
- package/dist/chunk-TO54DY4O.js +2 -0
- package/dist/chunk-UMNENNTX.js +2 -0
- package/dist/chunk-UNJG7P2I.js +2 -0
- package/dist/{chunk-TKDJQ2WD.js → chunk-UUBMFL3F.js} +1 -1
- package/dist/chunk-VAA5FFIW.js +2 -0
- package/dist/chunk-WDUTG2ZR.js +4 -0
- package/dist/chunk-X7ZY6FFF.js +4 -0
- package/dist/{chunk-BGRPMGTD.js → chunk-YQH353VA.js} +2 -2
- package/dist/chunk-YTR4CO5S.js +38 -0
- package/dist/chunk-YUOAAR24.js +2 -0
- package/dist/{chunk-YWZBKYLS.js → chunk-YYD245WG.js} +2 -2
- package/dist/{chunk-SCEMECW7.js → chunk-Z4VHYJ5U.js} +2 -2
- package/dist/chunk-ZFMPHDAT.js +4 -0
- package/dist/chunk-ZQLO2SCU.js +6 -0
- package/dist/chunk-ZSLT7NWQ.js +61 -0
- package/dist/cli.js +276 -271
- package/dist/{config-types-CGIeLEpY.d.ts → config-types-Bj4sh28g.d.ts} +37 -1
- package/dist/{db-DdTPetj5.d.ts → db-CTarohbZ.d.ts} +1 -1
- package/dist/git-history-Dao3_Pu9.d.ts +12 -0
- package/dist/{health-C6r2VgpA.d.ts → health-Bx0x1HAG.d.ts} +64 -4
- package/dist/index.d.ts +7 -6
- package/dist/index.js +1 -1
- package/dist/postinstall.js +2 -2
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/bottlenecks.d.ts +6 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +40 -5
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +2 -2
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +2 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +6 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +10 -3
- package/dist/queries/dead.js +1 -1
- package/dist/queries/deep-chains.d.ts +6 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-gate.d.ts +66 -3
- package/dist/queries/diff-gate.js +1 -1
- package/dist/queries/diff-impact.d.ts +20 -4
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +20 -3
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +10 -3
- package/dist/queries/drift.js +1 -1
- package/dist/queries/extract-candidates.d.ts +11 -3
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +16 -3
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +20 -12
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +51 -0
- package/dist/queries/locality-candidates.js +2 -0
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +8 -3
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +4 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +31 -0
- package/dist/queries/react-component-duplicates.js +2 -0
- package/dist/queries/react-hook-candidates.d.ts +40 -0
- package/dist/queries/react-hook-candidates.js +2 -0
- package/dist/queries/react-large-component-pressure.d.ts +34 -0
- package/dist/queries/react-large-component-pressure.js +2 -0
- package/dist/queries/recent-duplicates.d.ts +32 -3
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +7 -3
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +21 -3
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +10 -3
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/stats.js +1 -1
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/unused-imports.d.ts +4 -0
- package/dist/queries/unused-imports.js +2 -0
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +35 -0
- package/dist/queries/vue-component-duplicates.js +2 -0
- package/dist/queries/vue-composable-candidates.d.ts +40 -0
- package/dist/queries/vue-composable-candidates.js +2 -0
- package/dist/queries/vue-large-view-pressure.d.ts +37 -0
- package/dist/queries/vue-large-view-pressure.js +2 -0
- package/dist/queries/wrapper-candidates.d.ts +6 -3
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +10 -10
- package/dist/reindex.d.ts +1 -1
- package/dist/reindex.js +22 -22
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -2
- package/docs/AGENT_GUIDE.md +353 -0
- package/docs/AI_FAILURE_MODES.md +278 -0
- package/docs/API.md +40 -0
- package/docs/COMMAND_REFERENCE.md +131 -0
- package/docs/DETECTOR_GUIDE.md +119 -0
- package/docs/accuracy-hardening-goal.md +54 -0
- package/docs/analyzer-inventory.md +162 -0
- package/docs/analyzer-validation-ledger.md +262 -0
- package/docs/analyzer-validation-protocol.md +192 -0
- package/docs/assets/scip-query-logo-dark.svg +21 -0
- package/docs/assets/scip-query-logo.svg +24 -0
- package/docs/locality-analyzer-design.md +193 -0
- package/package.json +44 -5
- package/skills/scip-directory-architecture/SKILL.md +178 -0
- package/skills/scip-maintainability/SKILL.md +24 -3
- package/skills/scip-query/SKILL.md +4 -2
- package/skills/scip-query-setup/SKILL.md +118 -0
- package/skills/scip-react-maintainability/SKILL.md +114 -0
- package/skills/scip-vue-maintainability/SKILL.md +130 -0
- package/dist/chunk-4DAPXOWD.js +0 -2
- package/dist/chunk-4JQFTUKD.js +0 -2
- package/dist/chunk-4MHT7LKP.js +0 -3
- package/dist/chunk-5OHZEO3U.js +0 -3
- package/dist/chunk-5QJIEYFB.js +0 -34
- package/dist/chunk-6IGXZZQ4.js +0 -4
- package/dist/chunk-6K2JQ2VI.js +0 -61
- package/dist/chunk-6QVCPUK6.js +0 -2
- package/dist/chunk-6VL4AIEO.js +0 -8
- package/dist/chunk-A2VTV2QB.js +0 -7
- package/dist/chunk-AI2ECT7L.js +0 -2
- package/dist/chunk-BUAC4Q4G.js +0 -2
- package/dist/chunk-BZ6LCGE6.js +0 -2
- package/dist/chunk-CMXFASVD.js +0 -2
- package/dist/chunk-CO3AL7NZ.js +0 -2
- package/dist/chunk-FVVT7GV6.js +0 -4
- package/dist/chunk-HXXRN77A.js +0 -2
- package/dist/chunk-IC3RC3KJ.js +0 -4
- package/dist/chunk-ITHQJZTG.js +0 -2
- package/dist/chunk-IW7ASGVF.js +0 -2
- package/dist/chunk-JODYQDE4.js +0 -2
- package/dist/chunk-MCW36F2D.js +0 -2
- package/dist/chunk-MX6F756F.js +0 -2
- package/dist/chunk-NGI4V4AB.js +0 -18
- package/dist/chunk-O6KCZPJQ.js +0 -62
- package/dist/chunk-OAI5GEIN.js +0 -6
- package/dist/chunk-OH5HIAID.js +0 -4
- package/dist/chunk-OXKEUWMJ.js +0 -2
- package/dist/chunk-PBGTMPJ7.js +0 -2
- package/dist/chunk-PRVDXGSK.js +0 -2
- package/dist/chunk-QYKKTYBN.js +0 -6
- package/dist/chunk-R3G6ERW7.js +0 -7
- package/dist/chunk-R6XDPWJA.js +0 -10
- package/dist/chunk-SJR4SB7B.js +0 -2
- package/dist/chunk-SYKCO25G.js +0 -16
- package/dist/chunk-T22X7WT6.js +0 -2
- package/dist/chunk-TH4JVC34.js +0 -71
- package/dist/chunk-VDY4HYNK.js +0 -2
- package/dist/chunk-VDZIEDJB.js +0 -2
- package/dist/chunk-VDZL45XI.js +0 -2
- package/dist/chunk-WJIS6BNI.js +0 -3
- package/dist/chunk-WN5Z3UVT.js +0 -7
- package/dist/chunk-XCW7DYHM.js +0 -2
- package/dist/chunk-ZF6P2NAT.js +0 -63
- package/dist/chunk-ZGIK464P.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as te,b as re,c as b,d as se,e as ne,f as oe,g as j,h as ie,i as U,j as ae,k as pe,l as E,m as W,n as T,o as V,p as z,q as S,r as Q,s as J,u as R,v as h,w as M,x as G}from"./chunk-CRU42NJU.js";import{b as le}from"./chunk-ERHOS6AW.js";import{a as ce,b as me,d as C}from"./chunk-EWC3UK4V.js";import{a as v}from"./chunk-D322LMSA.js";import{c as L}from"./chunk-7S5E7KWT.js";import{basename as ue}from"path";var ke=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function x(t){let r=[],e=0,s=0;for(let n=0;n<t.length;n++){let o=t[n];(o==="{"||o==="["||o==="(")&&e++,(o==="}"||o==="]"||o===")")&&e--,o===","&&e===0&&(r.push(t.slice(s,n)),s=n+1)}return r.push(t.slice(s)),r}function y(t,r){for(let e of t.namedChildren)if(e.type===r)return e;return null}function g(t,r){let e=new Set,s=(n,o)=>{let i=o||r.has(n.type);!i&&ke.has(n.type)&&e.add(n.text);for(let a of n.children)s(a,i)};return s(t.rootNode,!1),e}function P(t,r,e,s,n,o,i){return{importedName:n,localName:o,sourcePath:i??S(t,s,pe(r)),kind:"named",used:h(e,o),usedMembers:[]}}function f(t,r,e,s,n="named",o={}){return{importedName:t,localName:r,sourcePath:e,kind:n,used:s.has(r),usedMembers:[],isTypeOnly:o.isTypeOnly}}function $(t,r,e,s,n="named",o=[],i={}){return{importedName:t,localName:r,sourcePath:e,kind:n,used:s,usedMembers:o,isTypeOnly:i.isTypeOnly}}function D(t,r){return{importedName:t,localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]}}function O(t,r,e={}){return{importedName:t,localName:e.localName??null,sourcePath:r,kind:"namespace",used:e.used??!0,usedMembers:e.usedMembers??[],isTypeOnly:e.isTypeOnly}}function N(t,r,e){let s=[];for(let n of t.matchAll(r)){let o=n[0];if(!o||typeof n.index!="number")continue;let i=R(t,n.index,n.index+o.length);for(let a of e(n,i))s.push(a)}return s}function I(t,r,e,s){let n=C(t,r);if(n){let o=e(n);if(o)return o}return s()}function X(t,r,e,s){let n=C(t,r),o=ce(r),i=o?e[o]:void 0;return n&&i?i(n):s()}function de(t,r,e){return I(t,r,s=>we(t,r,s),()=>Ae(t,r,e))}function Ae(t,r,e){return N(e,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(s,n)=>{let o=s[1]?.trim();if(!o)return[];let i=ue(o).replace(/\.[^.]+$/,"");return[$(o,i,z(t,r,o),h(n,i))]})}function we(t,r,e){let s=g(e,new Set(["preproc_include"])),n=[];for(let o of e.rootNode.descendantsOfType("preproc_include")){let i=null;for(let p of o.namedChildren){if(p.type==="system_lib_string"){i=p.text.replace(/^<|>$/g,"");break}if(p.type==="string_literal"){i=p.namedChildren.find(c=>c.type==="string_content")?.text??p.text.replace(/^"|"$/g,"");break}}if(!i)continue;let a=ue(i).replace(/\.[^.]+$/,"");n.push(f(i,a,z(t,r,i),s))}return n}function fe(t,r,e){let s=[];for(let n of e.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let o=n[1]?.trim(),i=n[2]?.trim()??null,a=n[0];if(!o||!a||typeof n.index!="number")continue;let p=R(e,n.index,n.index+a.length);s.push({importedName:o,localName:i,sourcePath:Q(t,r,o),kind:i?"namespace":"side-effect",used:i?h(p,i):!0,usedMembers:i?M(p,i):[]})}return s}function ge(t,r,e){let s=[];for(let n of e.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let o=n[1]?.trim();o&&s.push({specifier:o,sourcePath:Q(t,r,o)})}return s}function Se(t,r,e){return X(t,r,{csharp:s=>je(t,r,s),vb:s=>Le(t,r,s)},()=>{let s=ae(r)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return N(e,s,(n,o)=>{let i=n[1]?.trim();if(!i)return[];let[a,p]=i.split(/\s*=\s*/),m=!!p,c=(m?p:a)?.trim()??i,l=c.split(".").pop()??c,u=m?a?.trim()??l:l;return[P(t,r,o,c,l,u,S(t,c,j))]})})}function Le(t,r,e){let s=g(e,new Set(["imports_statement"])),n=[];for(let o of e.rootNode.descendantsOfType("imports_statement")){let i=o.namedChildren.filter(u=>u.type==="namespace_name");if(i.length===0)continue;let a=i[i.length-1],p=i.length>1?i[0]:null,m=a.text,c=m.split(".").pop()??m,l=p?.text??c;n.push(f(c,l,S(t,m,j),s,p?"namespace":"named"))}return n}function je(t,r,e){let s=g(e,new Set(["using_directive"])),n=[];for(let o of e.rootNode.descendantsOfType("using_directive")){let i=o.namedChildren;if(i.length===0)continue;let a=null,p;i.length>=2&&i[0].type==="identifier"&&(i[1].type==="qualified_name"||i[1].type==="identifier")?(a=i[0],p=i[1]):p=i[i.length-1];let m=p.text,c=m.split(".").pop()??m,l=a?.text??c;n.push(f(c,l,S(t,m,j),s,a?"namespace":"named"))}return n}var ve=L("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function he(t,r){return ve.get(t,r,()=>{let e=new Set,s=v(t,r);if(!s)return e;let o=s.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))e.add(i[0]);return e})}function Y(t,r,e){return I(t,r,s=>$e(t,r,s),()=>Me(t,r,e))}function Me(t,r,e){return Qe(e).flatMap(s=>Ge(t,r,s.clause,s.specifier,s.start,s.end,e))}function $e(t,r,e){let s=qe(t,r,e),n=[];for(let o of e.rootNode.descendantsOfType("import_statement"))n.push(...Ue(t,r,e,o,s));return n}function qe(t,r,e){let s=g(e,new Set(["import_statement"]));if(me(r))for(let n of he(t,r))s.add(n);return s}function Ue(t,r,e,s,n){let o=Be(s);if(!o)return[];let i=E(t,r,o),a=y(s,"import_clause");return a?We(e,a,i,n,He(s.text)):[D("*",i)]}function We(t,r,e,s,n){let o=[];for(let i of r.namedChildren)if(i.type==="identifier")o.push(Fe(i.text,e,s,n));else if(i.type==="namespace_import"){let a=Je(t,i,e,s,n);a&&o.push(a)}else i.type==="named_imports"&&o.push(...Xe(i,e,s,n));return o}function Fe(t,r,e,s){return f("default",t,r,e,"default",{isTypeOnly:s})}function Je(t,r,e,s,n){let i=y(r,"identifier")?.text??"";if(!i)return null;let a=ze(t,i);return O("*",e,{localName:i,usedMembers:a,isTypeOnly:n,used:a.length>0||s.has(i)})}function Xe(t,r,e,s){let n=[];for(let o of t.namedChildren){if(o.type!=="import_specifier")continue;let i=o.namedChild(0),a=o.namedChild(1);if(!i)continue;let p=i.text,m=a?.text??p;n.push(f(p,m,r,e,"named",{isTypeOnly:s||Ve(o.text)}))}return n}function Be(t){let r=y(t,"string");if(!r)return null;let e=y(r,"string_fragment");return e?e.text:null}function He(t){return/^\s*import\s+type\b/.test(t)}function Ve(t){return/^\s*type\b/.test(t.trim())}function ze(t,r){let e=new Set;for(let s of t.rootNode.descendantsOfType("member_expression")){let n=s.namedChild(0),o=s.namedChild(1);!n||!o||n.type!=="identifier"||n.text!==r||(o.type==="property_identifier"||o.type==="identifier")&&e.add(o.text)}return[...e]}function Qe(t){let r=[],e=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let n of t.matchAll(e)){let o=n[0],i=n[1],a=n[2];!o||!a||typeof n.index!="number"||r.push({clause:i,specifier:a,start:n.index,end:n.index+o.length})}let s=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let n of t.matchAll(s)){let o=n[0],i=n[1];!o||!i||typeof n.index!="number"||r.push({clause:null,specifier:i,start:n.index,end:n.index+o.length})}return r.sort((n,o)=>n.start-o.start)}function Ge(t,r,e,s,n,o,i){let a=E(t,r,s),p=R(i,n,o);return e?Ye(e).map(c=>({...c,sourcePath:a})).map(c=>{if(c.kind==="namespace"){let l=M(p,c.localName);return O(c.importedName,c.sourcePath,{localName:c.localName,usedMembers:l,used:l.length>0||h(p,c.localName),isTypeOnly:c.isTypeOnly})}return c.kind==="side-effect"?D(c.importedName,c.sourcePath):$(c.importedName,c.localName??"",c.sourcePath,c.localName?h(p,c.localName):!1,c.kind,[],{isTypeOnly:c.isTypeOnly})}):[D("*",a)]}function Ye(t){let r=t.trim(),e=/^type\b/.test(r),s=r.replace(/^type\s+/,""),[n,o]=Ke(s),i=[];return n&&i.push(...xe(n,e)),o&&i.push(...xe(o,e)),i}function xe(t,r){let e=t.trim();if(!e)return[];if(e.startsWith("{")){let s=e.slice(1,-1).trim();return s?x(s).map(n=>{let o=n.trim(),i=r||/^type\b/.test(o),a=o.replace(/^type\s+/,""),[p,m]=a.split(/\s+as\s+/);return{importedName:p.trim(),localName:(m??p).trim(),kind:"named",isTypeOnly:i}}):[]}return e.startsWith("* as ")?[{importedName:"*",localName:e.slice(5).trim(),kind:"namespace",isTypeOnly:r}]:[{importedName:"default",localName:e,kind:"default",isTypeOnly:r}]}function Ke(t){let r=0;for(let e=0;e<t.length;e++){let s=t[e];if(s==="{"&&r++,s==="}"&&r--,s===","&&r===0)return[t.slice(0,e).trim(),t.slice(e+1).trim()]}return[t.trim(),null]}function K(t,r,e){let s=C(t,r);return s?nt(t,r,s):Ze(t,r,e)}function Ze(t,r,e){return[...et(t,r,e),...tt(t,r,e),...rt(t,r,e)]}function et(t,r,e){let s=[],n=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of e.matchAll(n)){if(typeof o.index!="number")continue;let i=o[1]??"",a=o[2]??"",p=x(i).map(l=>st(l.trim())).filter(l=>!!l),m=q(e,o.index),c=q(e,o.index+o[0].length-1);s.push({kind:"named",sourcePath:E(t,r,a),names:p,startLine:m,endLine:c})}return s}function tt(t,r,e){let s=[],n=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of e.matchAll(n)){if(typeof o.index!="number")continue;let i=o[2]??"",a=q(e,o.index),p=q(e,o.index+o[0].length-1);s.push({kind:"star-as",sourcePath:E(t,r,i),names:[],startLine:a,endLine:p})}return s}function rt(t,r,e){let s=[],n=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of e.matchAll(n)){if(typeof o.index!="number")continue;let i=o[1]??"",a=q(e,o.index),p=q(e,o.index+o[0].length-1);s.push({kind:"star",sourcePath:E(t,r,i),names:[],startLine:a,endLine:p})}return s}function st(t){if(!t)return null;let r=t.replace(/^type\s+/,"").trim();if(!r)return null;let e=r.match(/^(\w+)\s+as\s+(\w+)$/);if(e)return e[2]??null;let s=r.match(/^(\w+)$/);return s?s[1]??null:null}function q(t,r){let e=0;for(let s=0;s<r&&s<t.length;s++)t.charCodeAt(s)===10&&e++;return e}function nt(t,r,e){let s=[];for(let n of e.rootNode.descendantsOfType("export_statement")){let o=ot(t,r,n);if(o===void 0)continue;let i=n.startPosition.row,a=n.endPosition.row,p=it(n,o,i,a);s.push(p)}return s}function ot(t,r,e){let s=y(e,"string");if(!s)return;let n=y(s,"string_fragment");if(n)return E(t,r,n.text)}function it(t,r,e,s){let n=y(t,"export_clause");if(n){let i=[];for(let a of n.namedChildren){if(a.type!=="export_specifier")continue;let p=a.namedChild(0),m=a.namedChild(1);p&&i.push((m??p).text)}return{kind:"named",sourcePath:r,names:i,startLine:e,endLine:s}}return y(t,"namespace_export")?{kind:"star-as",sourcePath:r,names:[],startLine:e,endLine:s}:{kind:"star",sourcePath:r,names:[],startLine:e,endLine:s}}function ye(t,r,e){return X(t,r,{java:s=>at(t,r,s),kotlin:s=>pt(t,r,s),scala:s=>ct(t,r,s)},()=>N(e,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(s,n)=>{let o=s[1]?.trim();return o?mt(t,r,o,n):[]}))}function at(t,r,e){let s=g(e,new Set(["import_declaration"])),n=[];for(let o of e.rootNode.descendantsOfType("import_declaration")){let i=o.children.some(l=>l.type==="asterisk"),p=o.namedChildren.find(l=>l.type==="scoped_identifier")??o.namedChildren.find(l=>l.type==="identifier");if(!p)continue;let m=p.text;if(i){n.push(O("*",S(t,m,b)));continue}let c=m.split(".").pop()??m;n.push(f(c,c,S(t,m,b),s))}return n}function pt(t,r,e){let s=g(e,new Set(["import_header","import_list"])),n=[];for(let o of e.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"),p=o.namedChildren.find(d=>d.type==="import_alias");if(a){n.push(O("*",S(t,i.text,b)));continue}let m=i.text,c=m.split(".").pop()??m,u=p?.namedChild(0)?.text??c;n.push(f(c,u,S(t,m,b),s))}return n}function ct(t,r,e){let s=g(e,new Set(["import_declaration"])),n=[];for(let o of e.rootNode.descendantsOfType("import_declaration")){let i=o.namedChildren.find(l=>l.type==="namespace_selectors"||l.type==="namespace_wildcard"),a=o.namedChildren.filter(l=>l!==i&&(l.type==="identifier"||l.type==="stable_identifier")),p=a.map(l=>l.text).join(".");if(!p)continue;if(i?.type==="namespace_wildcard"){n.push(O("*",S(t,p,b)));continue}if(i?.type==="namespace_selectors"){for(let l of i.namedChildren)if(l.type==="arrow_renamed_identifier"){let[u,d]=l.namedChildren;if(!u)continue;let _=u.text,A=d?.text??_;if(_==="_")continue;n.push(f(_,A,S(t,`${p}.${_}`,b),s))}else if(l.type==="identifier"){let u=l.text;n.push(f(u,u,S(t,`${p}.${u}`,b),s))}continue}let m=a[a.length-1]?.text??p,c=a.slice(0,-1).map(l=>l.text).join(".")||p;n.push(f(m,m,S(t,c&&a.length>1?`${c}.${m}`:p,b),s))}return n}function mt(t,r,e,s){if(e.includes("{")&&e.includes("}")){let n=e.slice(0,e.indexOf("{")).replace(/\.$/,"").trim(),o=e.slice(e.indexOf("{")+1,e.lastIndexOf("}")).trim();return x(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[p,m]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),c=p?.trim();if(!c||c==="_")return[];let l=(m??c.split(".").pop()??c).trim(),u=c==="_"?n:`${n}.${c}`.replace(/\.\./g,".");return[P(t,r,s,u,c,l)]})}return[P(t,r,s,e,e.split(".").pop()??e,e.split(".").pop()??e)]}function Ie(t,r,e){return I(t,r,s=>lt(t,r,s),()=>N(e,/^[ \t]*use\s+(.+?)\s*;$/gm,(s,n)=>{let o=s[1]?.trim();return o?x(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[p,m]=a.split(/\s+as\s+/i),c=p?.trim()??a,l=c.split("\\").pop()??c,u=(m??l).trim();return[P(t,r,n,c,l,u,S(t,c.replace(/\\/g,"."),U))]}):[]}))}function lt(t,r,e){let s=g(e,new Set(["namespace_use_declaration"])),n=[],o=(i,a,p)=>{n.push(f(a,p,S(t,i.replace(/\\/g,"."),U),s))};for(let i of e.rootNode.descendantsOfType("namespace_use_declaration")){let a=i.namedChildren.find(p=>p.type==="namespace_use_group");if(a){let p=i.namedChildren.find(m=>m.type==="namespace_name")?.text??"";for(let m of a.namedChildren){if(m.type!=="namespace_use_clause")continue;let{importedName:c,localName:l,qualified:u}=Ne(m,p);c&&o(u,c,l)}continue}for(let p of i.namedChildren){if(p.type!=="namespace_use_clause")continue;let{importedName:m,localName:c,qualified:l}=Ne(p,"");m&&o(l,m,c)}}return n}function Ne(t,r){let e=t.namedChildren.find(m=>m.type==="qualified_name"),s=t.namedChildren.filter(m=>m.type==="name"),n="";e?n=e.text:s.length>=1&&(n=s[0].text);let o=e&&s.length>0?s[s.length-1]:null,i=n.split("\\").pop()??n,a=o?.text??i,p=r?`${r}\\${n}`:n;return{importedName:i,localName:a,qualified:p}}function Pe(t,r,e){return I(t,r,s=>ut(t,r,s),()=>ft(e).flatMap(s=>St(t,r,s,e)))}function ut(t,r,e){let s=g(e,new Set(["import_statement","import_from_statement"])),n=[];for(let o of e.rootNode.descendantsOfType("import_statement"))for(let i of o.namedChildren){let a=be(i);if(!a)continue;let p=W(t,r,a.qualifiedName);n.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:p,kind:"namespace",used:s.has(a.localName),usedMembers:[]})}for(let o of e.rootNode.descendantsOfType("import_from_statement")){let i=o.namedChild(0);if(!i)continue;let a=dt(i);if(a===null)continue;let p=W(t,r,a);for(let m=1;m<o.namedChildCount;m+=1){let c=o.namedChild(m);if(c.type==="wildcard_import"){n.push({importedName:"*",localName:null,sourcePath:p,kind:"side-effect",used:!0,usedMembers:[]});continue}let l=be(c);l&&n.push({importedName:l.qualifiedName,localName:l.localName,sourcePath:p,kind:"named",used:s.has(l.localName),usedMembers:[]})}}return n}function be(t){if(t.type==="aliased_import"){let r=t.namedChild(0),e=t.namedChild(1);return!r||!e?null:{qualifiedName:r.text,localName:e.text}}if(t.type==="dotted_name"){let r=t.text;return{qualifiedName:r,localName:r.split(".")[0]??r}}return t.type==="identifier"?{qualifiedName:t.text,localName:t.text}:null}function dt(t){if(t.type==="dotted_name")return t.text;if(t.type==="relative_import"){let r=y(t,"import_prefix")?.text??"",e=y(t,"dotted_name")?.text??"";return`${r}${e}`}return null}function ft(t){let r=t.split(`
|
|
2
|
+
`),e=[],s=0;for(let n=0;n<r.length;n++){let o=r[n],i=o.trimStart(),a=s;if(s+=o.length+1,!i.startsWith("import ")&&!i.startsWith("from "))continue;let p=o,m=a+o.length,c=G(o);for(;n+1<r.length&&(c>0||p.trimEnd().endsWith("\\"));){n++;let u=r[n];p+=`
|
|
3
|
+
${u}`,m+=1+u.length,c+=G(u),s+=u.length+1}let l=gt(p);l&&e.push({...l,start:a,end:m})}return e}function gt(t){let r=t.replace(/\\\s*\n/g," ").trim();if(r.startsWith("import "))return{kind:"import",module:null,clause:r.slice(7).trim()};let e=r.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!e)return null;let s=e[2].trim();return s.startsWith("(")&&s.endsWith(")")&&(s=s.slice(1,-1).trim()),{kind:"from",module:e[1],clause:s}}function St(t,r,e,s){let n=R(s,e.start,e.end),o=e.clause.replace(/\n/g," ").trim();if(e.kind==="import")return x(o).flatMap(p=>{let m=p.trim().replace(/,$/,"");if(!m)return[];let[c,l]=m.split(/\s+as\s+/),u=c.trim(),d=(l??u.split(".")[0]??u).trim(),_=W(t,r,u),A=M(n,d);return[{importedName:u,localName:d,sourcePath:_,kind:"namespace",used:h(n,d)||A.length>0,usedMembers:A}]});let i=e.module?W(t,r,e.module):null,a=[];for(let p of x(o)){let m=p.trim().replace(/,$/,"");if(!m)continue;if(m==="*"){a.push({importedName:"*",localName:null,sourcePath:i,kind:"side-effect",used:!0,usedMembers:[]});continue}let[c,l]=m.split(/\s+as\s+/),u=(l??c).trim();a.push({importedName:c.trim(),localName:u,sourcePath:i,kind:"named",used:h(n,u),usedMembers:[]})}return a}import{basename as ht}from"path";function _e(t,r,e){return I(t,r,s=>yt(t,r,s),()=>xt(t,r,e))}function xt(t,r,e){return N(e,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(s,n)=>{let o=s[1],i=s[2];if(!o||!i)return[];let a=o==="require_relative"?V(t,r,i):null;if(a){let p=Ee(i);return[$(p,p,a,h(n,p))]}return[D(i,a)]})}function yt(t,r,e){let s=g(e,new Set([])),n=[],o=new Set(["require","require_relative","load"]);for(let i of e.rootNode.descendantsOfType("call")){let a=i.namedChild(0);if(!a||a.type!=="identifier"||!o.has(a.text))continue;let m=i.namedChildren.find(d=>d.type==="argument_list")?.namedChild(0);if(!m||m.type!=="string")continue;let l=m.namedChildren.find(d=>d.type==="string_content")?.text;if(!l)continue;let u=a.text==="require_relative"?V(t,r,l):null;if(u){let d=Ee(l);n.push(f(d,d,u,s))}else n.push(D(l,u))}return n}function Ee(t){return le(ht(t).replace(/\.[^.]+$/,""),/_/)}function Te(t,r,e){return I(t,r,s=>Nt(t,r,s),()=>N(e,/^[ \t]*use\s+(.+?)\s*;$/gm,(s,n)=>{let o=s[1]?.trim();return o?It(t,r,o,n):[]}))}function Nt(t,r,e){let s=g(e,new Set(["use_declaration"])),n=[];for(let o of e.rootNode.descendantsOfType("use_declaration")){let i=o.namedChild(0);if(i)for(let a of F(i,"")){if(!a.importedName||a.importedName==="*")continue;let p=T(t,r,a.qualifiedName)??T(t,r,a.qualifiedName.split("::").slice(0,-1).join("::"));n.push(f(a.importedName,a.localName,p,s))}}return n}function F(t,r){switch(t.type){case"identifier":case"super":case"self":case"crate":{let e=t.text;return[{qualifiedName:B(r,e),importedName:e,localName:e}]}case"scoped_identifier":{let e=t.text,s=e.split("::").pop()??e;return[{qualifiedName:B(r,e),importedName:s,localName:s}]}case"scoped_use_list":{let e=t.namedChild(0),s=t.namedChild(1);if(!e||!s)return[];let n=B(r,e.text),o=[];for(let i of s.namedChildren)o.push(...F(i,n));return o}case"use_list":{let e=[];for(let s of t.namedChildren)e.push(...F(s,r));return e}case"use_as_clause":{let e=t.namedChild(0),s=t.namedChild(1);if(!e||!s)return[];let n=F(e,r),o=s.text;return n.map(i=>({...i,localName:o}))}case"use_wildcard":{let e=t.namedChild(0),s=e?e.text:"";return[{qualifiedName:B(r,`${s}::*`),importedName:"*",localName:"*"}]}default:return[]}}function B(t,r){return t?r?`${t}::${r}`:t:r}function It(t,r,e,s){let n=e.trim();if(n.includes("{")&&n.includes("}")){let c=n.slice(0,n.indexOf("{")).replace(/::$/,"").trim(),l=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return x(l).flatMap(u=>{let d=u.trim();if(!d||d==="self")return[];let[_,A]=d.split(/\s+as\s+/),w=_?.trim();if(!w)return[];let De=(A??w.split("::").pop()??w).trim(),Oe=`${c}::${w}`.replace(/::::/g,"::");return[P(t,r,s,Oe,w.split("::").pop()??w,De,T(t,r,c))]})}let[o,i]=n.split(/\s+as\s+/),a=o?.trim()??n,p=(i??a.split("::").pop()??a).trim(),m=T(t,r,a)??T(t,r,a.split("::").slice(0,-1).join("::"));return[P(t,r,s,a,a.split("::").pop()??a,p,m)]}function Re(t,r,e){let s=C(t,r);if(s)return bt(t,r,s);let n=[];for(let o of e.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let i=o[1]?.trim();i&&n.push(..._t(t,r,i))}return n}function bt(t,r,e){let s=[];for(let n of e.rootNode.descendantsOfType("use_declaration")){if(!Pt(n))continue;let o=n.namedChildren.find(i=>i.type!=="visibility_modifier");if(o)for(let i of F(o,""))i.importedName&&s.push(Z(t,r,i.qualifiedName))}return s}function Pt(t){for(let r of t.children)if(r.type==="visibility_modifier"&&r.text.startsWith("pub"))return!0;return!1}function _t(t,r,e){let s=e.trim();if(s.includes("{")&&s.includes("}")){let n=s.slice(0,s.indexOf("{")).replace(/::$/,"").trim(),o=s.slice(s.indexOf("{")+1,s.lastIndexOf("}")).trim();return x(o).flatMap(i=>{let a=i.trim();if(!a||a==="self")return[];let[p]=a.split(/\s+as\s+/),m=`${n}::${p?.trim()??a}`.replace(/::::/g,"::");return[Z(t,r,m)]})}return[Z(t,r,s)]}function Z(t,r,e){return{specifier:e,sourcePath:T(t,r,e)??T(t,r,e.split("::").slice(0,-1).join("::"))}}function k({language:t,extensions:r,imports:e,parseImports:s}){return{language:t,extensions:r,capabilities:{imports:e},parseImports:s}}function Ce(t,r){let e=r.toLowerCase();for(let s of t)for(let n of s.extensions)if(e.endsWith(n))return s;return null}var Et={language:"javascript",extensions:te,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:Y,parseReExports:K},Tt=k({language:"python",extensions:re,imports:"ast-with-regex-fallback",parseImports:Pe}),Rt=k({language:"jvm",extensions:b,imports:"ast-dispatch-with-regex-fallback",parseImports:ye}),Ct={language:"rust",extensions:se,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:Te,parseExports:Re},Dt=k({language:"ruby",extensions:ne,imports:"ast-with-regex-fallback",parseImports:_e}),Ot=k({language:"c/cpp",extensions:oe,imports:"ast-with-regex-fallback",parseImports:de}),kt=k({language:"dotnet",extensions:j,imports:"ast-dispatch-with-regex-fallback",parseImports:Se}),At={language:"dart",extensions:ie,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:fe,parseExports:ge},wt=k({language:"php",extensions:U,imports:"ast-with-regex-fallback",parseImports:Ie}),Lt=[Et,Tt,Rt,Ct,Dt,Ot,kt,At,wt];function H(t){return Ce(Lt,t)}var ee={clearGroups:["whole-project","source-file"]},jt=L("source-imports",ee),vt=L("source-exports",ee),Mt=L("source-reexports",ee);function Zr(t,r){let e=J(r);return Mt.get(t,e,()=>{let s=H(e);if(!s?.parseReExports)return[];let n=v(t,e);return n?s.parseReExports(t,e,n):[]})}function es(t,r){let e=J(r);return jt.get(t,e,()=>{let s=H(e);if(!s)return[];let n=v(t,e);return n?s.parseImports(t,e,n):[]})}function ts(t,r){let e=J(r);return vt.get(t,e,()=>{let s=H(e);if(!s?.parseExports)return[];let n=v(t,e);return n?s.parseExports(t,e,n):[]})}export{Zr as a,es as b,ts as c};
|
|
4
|
+
//# sourceMappingURL=chunk-FOQHUKNZ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as S}from"./chunk-O4L4AB3T.js";import{a as g}from"./chunk-GS33KGAY.js";import{a as f}from"./chunk-UMNENNTX.js";import{a as p}from"./chunk-TO54DY4O.js";import{b as y}from"./chunk-MHTDOFV7.js";import{e as h}from"./chunk-DRAZH77R.js";var v=.7,C=.62,R=.45;function H(i,t={}){let{windowCommits:e=100,limit:n=30,scope:a,scanLimit:l}=t,s=h(i);if(!s)return{available:!1,windowCommits:e,findings:[]};if(n<=0)return{available:!0,windowCommits:e,findings:[]};let d=A(i,{limit:n,minSimilarity:t.minSimilarity,scanLimit:l,scope:a,semantic:t.semantic}).map(o=>I(o,s,e)).filter(o=>o!==null);d.sort((o,r)=>(o.kind===r.kind?0:o.kind==="echo"?-1:1)||r.similarity-o.similarity||o.echoFile.localeCompare(r.echoFile)||o.echoSymbol.localeCompare(r.echoSymbol)||o.domain.localeCompare(r.domain));let b=d.slice(0,n).map(x);return{available:!0,windowCommits:e,findings:b,rootCauseGroups:w(b)}}function A(i,t){let e=K(t.limit);return[...F(i,{scope:t.scope,minSimilarity:t.minSimilarity??v,limit:e,scanLimit:t.scanLimit,semantic:t.semantic}),...B(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit}),...L(i,{scope:t.scope,minSimilarity:t.minSimilarity??R,limit:e,scanLimit:t.scanLimit}),...E(i,{scope:t.scope,minSimilarity:t.minSimilarity??C,limit:e,scanLimit:t.scanLimit}),...k(i,{scope:t.scope,minSimilarity:t.minSimilarity??R,limit:e,scanLimit:t.scanLimit})]}function F(i,t){return y(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,crossFileOnly:!0,scanLimit:t.scanLimit,semantic:t.semantic}).map(e=>({domain:"callable",basis:e.similarityBasis??"callees",symbolA:e.shortNameA,fileA:e.fileA,symbolB:e.shortNameB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:e.sharedCallees,sharedCallees:e.sharedCallees}))}function B(i,t){return f(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,scanLimit:t.scanLimit}).filter(e=>e.fileA!==e.fileB).map(e=>({domain:"react-component",basis:"jsx-structure",symbolA:e.componentA,fileA:e.fileA,symbolB:e.componentB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:u(["component",e.sharedComponents],["tag",e.sharedNativeTags],["prop",e.sharedProps],["event",e.sharedEvents],["binding",e.sharedBindings]),sharedCallees:[]}))}function L(i,t){return p(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,scanLimit:t.scanLimit}).filter(e=>e.fileA!==e.fileB).map(e=>({domain:"react-hook",basis:"react-behavior",symbolA:e.componentA,fileA:e.fileA,symbolB:e.componentB,fileB:e.fileB,similarity:e.similarity,sharedEvidence:u(["hook",e.sharedHooks],["react-hook",e.sharedReactHooks],["effect",e.sharedEffects],["state",e.sharedState],["request",e.sharedRequests],["handler",e.sharedHandlers],["action",e.sharedHandlerVerbs]),sharedCallees:[]}))}function E(i,t){return g(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,scanLimit:t.scanLimit}).filter(e=>e.fileA!==e.fileB).map(e=>({domain:"vue-component",basis:"vue-template",symbolA:c(e.fileA),fileA:e.fileA,symbolB:c(e.fileB),fileB:e.fileB,similarity:e.similarity,sharedEvidence:u(["component",e.sharedComponents],["prop",e.sharedProps],["event",e.sharedEvents],["directive",e.sharedDirectives],["slot",e.sharedSlots],["identifier",e.sharedIdentifiers]),sharedCallees:[]}))}function k(i,t){return S(i,{scope:t.scope,minSimilarity:t.minSimilarity,limit:t.limit,scanLimit:t.scanLimit}).filter(e=>e.fileA!==e.fileB).map(e=>({domain:"vue-composable",basis:"vue-behavior",symbolA:c(e.fileA),fileA:e.fileA,symbolB:c(e.fileB),fileB:e.fileB,similarity:e.similarity,sharedEvidence:u(["composable",e.sharedComposables],["store",e.sharedStores],["reactivity",e.sharedReactivity],["lifecycle",e.sharedLifecycle],["request",e.sharedRequests],["function",e.sharedFunctions],["action",e.sharedFunctionVerbs],["binding",e.sharedBindings],["template-event",e.sharedTemplateEvents]),sharedCallees:[]}))}function I(i,t,e){let n=t.get(i.fileA)?.commitsAgo??null,a=t.get(i.fileB)?.commitsAgo??null,l=n!==null&&n<=e,s=a!==null&&a<=e;if(!l&&!s)return null;if(l&&s){let m=(n??0)<=(a??0);return{kind:"twin",domain:i.domain,basis:i.basis,echoSymbol:m?i.symbolA:i.symbolB,echoFile:m?i.fileA:i.fileB,echoAgeCommits:(m?n:a)??0,establishedSymbol:m?i.symbolB:i.symbolA,establishedFile:m?i.fileB:i.fileA,establishedAgeCommits:m?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}return{kind:"echo",domain:i.domain,basis:i.basis,echoSymbol:l?i.symbolA:i.symbolB,echoFile:l?i.fileA:i.fileB,echoAgeCommits:(l?n:a)??0,establishedSymbol:l?i.symbolB:i.symbolA,establishedFile:l?i.fileB:i.fileA,establishedAgeCommits:l?a:n,similarity:i.similarity,sharedEvidence:i.sharedEvidence,sharedCallees:i.sharedCallees}}function x(i){let t=D(i);return{...i,rootCauseKey:t,groupKey:`recent-duplicate:${t}`}}function D(i){if(i.kind==="echo")return["echo",i.domain,i.basis,i.establishedSymbol].join(":");let t=i.sharedEvidence.slice().sort().join("|"),e=[i.echoSymbol,i.establishedSymbol].sort().join("|");return["twin",i.domain,i.basis,t||e].join(":")}function w(i){let t=new Map;for(let[e,n]of i.entries()){let a=n.rootCauseKey??D(n),l=n.groupKey??`recent-duplicate:${a}`,s=t.get(l);s||(s={groupKey:l,rootCauseKey:a,kind:n.kind,domain:n.domain,basis:n.basis,count:0,maxSimilarity:n.similarity,findingIndexes:[],echoFiles:new Set,establishedFile:n.kind==="echo"?n.establishedFile:void 0,establishedSymbol:n.kind==="echo"?n.establishedSymbol:void 0,relatedFiles:new Set,sharedEvidence:new Set,recommendation:N(n)},t.set(l,s)),s.count+=1,s.maxSimilarity=Math.max(s.maxSimilarity,n.similarity),s.findingIndexes.push(e),s.echoFiles.add(n.echoFile),s.relatedFiles.add(n.echoFile),s.relatedFiles.add(n.establishedFile);for(let m of n.sharedEvidence)s.sharedEvidence.add(m)}return[...t.values()].map(e=>({...e,echoFiles:[...e.echoFiles].sort(),relatedFiles:[...e.relatedFiles].sort(),sharedEvidence:[...e.sharedEvidence].sort().slice(0,16)})).sort((e,n)=>n.count-e.count||n.maxSimilarity-e.maxSimilarity||e.groupKey.localeCompare(n.groupKey))}function N(i){return i.kind==="echo"?"Review the established side once, then migrate or delete every echo in this group.":"Pick one owner for the new twins and consolidate the group before the copies diverge."}function K(i){return Number.isFinite(i)?i*5:Number.POSITIVE_INFINITY}function u(...i){let t=[],e=new Set;for(let[n,a]of i)for(let l of a){let s=`${n}:${l}`;e.has(s)||(e.add(s),t.push(s))}return t}function c(i){return(i.split("/").pop()??i).replace(/\.[^.]+$/,"")}export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FPMVCDIJ.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{l as T}from"./chunk-CRU42NJU.js";import{f as g}from"./chunk-3UW7VM4H.js";import{d as h}from"./chunk-JM72FNGA.js";import{a as k}from"./chunk-64MNV6AB.js";import{a as U,c as W}from"./chunk-7S5E7KWT.js";function p(i,e,t){if(i.has(e))return i.get(e);let n=t();return i.set(e,n),n}import $ from"path";function le(i,e){return i.getReferences().map(t=>{let n=t.getNode();return V(n,e)})}function fe(i){let e=i;return typeof e.findReferences=="function"?e.findReferences():[]}function _(i,e,t,n){let r=[];for(let o of fe(i))for(let s of le(o,n))s.file===e.relativePath&&s.line>=e.startLine&&s.line<=e.endLine||r.push(s);for(let o of t)r.push(o);return N(r)}function B(i,e,t,n){let r=[],o=t?.getStart();for(let s of i.getReferences()){let a=s.getNode();S(n,a.getSourceFile().getFilePath())===e&&(o!==void 0&&a.getStart()===o||r.push({location:V(a,n),node:a}))}return r}function V(i,e){let t=i.getSourceFile(),n=t.getLineAndColumnAtPos(i.getStart());return{file:S(e,t.getFilePath())??t.getBaseName(),line:n.line-1,column:n.column-1}}function z(i,e,t){let n=i.getSourceFile(),r=y(n,i),o=i.getText(),s=new RegExp(`\\b${pe(o)}\\b`,"g"),a=n.getFullText().split(`
|
|
2
|
+
`),l=[];for(let c=0;c<a.length;c++){if(c===r)continue;let d=a[c]??"";s.lastIndex=0;let u;for(;(u=s.exec(d))!==null;)l.push({file:e,line:c,column:u.index})}return N(l.filter(c=>S(t,$.join(t,c.file))===e))}function R(i){for(let e=i;e;e=e.getParent()){let t=e.getKindName();if(t.includes("Type")||t==="InterfaceDeclaration"||t==="TypeAliasDeclaration")return!0;if(t==="CallExpression"||t==="NewExpression"||t==="ExpressionStatement")return!1}return!1}function y(i,e){return i.getLineAndColumnAtPos(e.getStart()).line-1}function N(i){let e=new Set,t=[];for(let n of i){let r=`${n.file}:${n.line}:${n.column}`;e.has(r)||(e.add(r),t.push(n))}return t}function S(i,e){let t=$.relative(i||process.cwd(),e).replace(/\\/g,"/");return!t||t.startsWith("..")?null:t}function pe(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function J(i,e,t,n){let r=de(e,n);return r.size===0?new Map:ue(i,t,r)}function de(i,e){let t=new Map;for(let n of g(i,e)){let r=h(n.symbol)??n.leaf;if(!r)continue;let o=t.get(r);o||(o=[],t.set(r,o)),o.push(n)}return t}function ue(i,e,t){let n=new Map,r=new Map;return e.forEachDescendant(o=>{for(let s of me(i,o)){let a=t.get(s);if(!a)continue;let l=y(e,o);for(let c of a){if(l<c.startLine-1||l>c.endLine+1)continue;let d=Math.abs(l-c.startLine),u=r.get(c.symbolId);u!==void 0&&u<=d||(r.set(c.symbolId,d),n.set(c.symbolId,o))}}}),n}function me(i,e){let t=[],n=r=>{r&&!t.includes(r)&&t.push(r)};if("getNameNode"in e&&typeof e.getNameNode=="function"){let r=e.getNameNode();n(r?.getText())}if("getName"in e&&typeof e.getName=="function"){let r=e.getName();n(r)}return i.Node.isIdentifier(e)&&n(e.getText()),t}var ge=W("ts-definition-leaf-candidates",{clearGroups:["definition-catalog"]});function Y(i,e,t,n){let r=q(i,e),o=K(r.get(n)??[],t);if(o)return o;let s=[];for(let a of r.values())for(let l of a)((l.leaf||h(l.symbol)||"").includes(n)||l.symbol.includes(n))&&s.push(l);return K(s,t)}function X(i,e){let t=new Map;for(let[n,r]of q(i,e)){let o=r[0];o&&t.set(n,o)}return t}function q(i,e){return ge.get(i,e,()=>{let t=new Map;for(let n of g(i,e)){let r=n.leaf||h(n.symbol);if(!r)continue;let o=t.get(r);o||(o=[],t.set(r,o)),o.push({...n,leaf:r})}for(let n of t.values())n.sort((r,o)=>r.startLine-o.startLine||r.endLine-o.endLine||r.symbolId-o.symbolId);return t})}function K(i,e){let t=null,n=Number.POSITIVE_INFINITY;for(let r of i){let o=Math.abs(r.startLine-e);(o<n||o===n&&t&&r.startLine<t.startLine)&&(t=r,n=o)}return t}import ye from"path";var x=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function M(i){let e=i.toLowerCase();return x.some(t=>e.endsWith(t))}function G(i,e){let t=new Map,n=r=>M(r)?p(t,r,()=>{let o=ye.join(i.config.projectRoot,r);for(let{project:s}of e){let a=s.getSourceFile(o)??s.addSourceFileAtPathIfExists(o)??null;if(a)return{project:s,sourceFile:a}}return null}):null;return{sourceFile:r=>n(r)?.sourceFile??null,sourceFileMatch:n,indexedTypeScriptLikeDocuments:()=>k(i,{extensions:x})}}import m from"path";import{existsSync as F,readdirSync as he,readFileSync as H}from"fs";function Q(i){let e=m.join(i,"package.json");if(!F(e))return[];let t;try{t=JSON.parse(H(e,"utf8"))}catch{return[]}return(Array.isArray(t.workspaces)?t.workspaces:t.workspaces?.packages??[]).flatMap(r=>Se(i,r)).flatMap(r=>xe(i,r))}function Se(i,e){if(!e||e.startsWith("!")||e.includes("node_modules"))return[];if(!e.includes("*")){let s=m.join(i,e);return F(m.join(s,"package.json"))?[s]:[]}let t=e.indexOf("*"),n=e.slice(0,t).replace(/\/$/,""),r=e.slice(t+1).replace(/^\//,""),o=m.join(i,n||".");if(!F(o))return[];try{return he(o).map(s=>m.join(o,s,r)).filter(s=>F(m.join(s,"package.json")))}catch{return[]}}function xe(i,e){try{let t=JSON.parse(H(m.join(e,"package.json"),"utf8"));if(!t.name)return[];let n=m.relative(i,e).replace(/\\/g,"/");return[{name:t.name,rootRelative:n,sourceRootRelative:`${n}/src`}]}catch{return[]}}function Z(i,e){for(let t of i)if(e===t.name||e.startsWith(`${t.name}/`))return t.name;return null}function ee(i){return[`${i.sourceRootRelative}/index.ts`,`${i.sourceRootRelative}/index.tsx`,`${i.sourceRootRelative}/index.mts`,`${i.sourceRootRelative}/index.cts`]}import{existsSync as I,readFileSync as Ie,readdirSync as be,statSync as De}from"fs";import f from"path";var j=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"];function E(i,e){let n=e?f.dirname(f.join(i,e)):i,r=f.resolve(i);for(;n.startsWith(r);){for(let s of j){let a=f.join(n,s);if(I(a))return a}let o=f.dirname(n);if(o===n)break;n=o}for(let o of j){let s=f.join(i,o);if(I(s))return s}return null}function te(i){let e=i.config.projectRoot,t=new Set(ke(e,i.config.semantic?.typescript?.tsconfigs)),n=k(i,{includeIgnored:!1,extensions:x});for(let r of n){let o=E(e,r);o&&t.add(f.resolve(o))}if(t.size===0){let r=E(e);r&&t.add(f.resolve(r))}return[...t].filter(r=>!ne(e,r)).sort((r,o)=>r.localeCompare(o))}function ke(i,e=[]){let t=new Set;for(let n of e){let r=f.isAbsolute(n)?n:f.join(i,n);I(r)&&t.add(f.resolve(r))}for(let n of Ne(i))for(let r of j){let o=f.join(n,r);I(o)&&t.add(f.resolve(o))}if(t.size===0){let n=E(i);n&&t.add(f.resolve(n))}return[...t].filter(n=>!ne(i,n)).sort((n,r)=>n.localeCompare(r))}function Ne(i){let e=f.join(i,"package.json");if(!I(e))return[];let t;try{t=JSON.parse(Ie(e,"utf8"))}catch{return[]}return(Array.isArray(t.workspaces)?t.workspaces:t.workspaces?.packages??[]).flatMap(r=>Me(i,r))}function Me(i,e){if(!e||e.startsWith("!")||e.includes("node_modules"))return[];if(!e.includes("*")){let s=f.join(i,e);return C(s)?[s]:[]}let t=e.indexOf("*"),n=e.slice(0,t).replace(/\/$/,""),r=e.slice(t+1).replace(/^\//,""),o=f.join(i,n||".");return C(o)?be(o).map(s=>f.join(o,s,r)).filter(C):[]}function C(i){try{return De(i).isDirectory()}catch{return!1}}function ne(i,e){let t=f.relative(i,e).replace(/\\/g,"/");return t.startsWith("..")||t.includes("/node_modules/")||t.startsWith("node_modules/")||t.includes("/dist/")||t.startsWith("dist/")}import{createRequire as Fe}from"module";var ve=Fe(import.meta.url),b;function re(){if(b!==void 0)return b;try{b=ve("ts-morph")}catch{b=null}return b}function ie(i,e){return e.map(t=>({tsconfigPath:t,project:new i.Project({tsConfigFilePath:t,skipFileDependencyResolution:!1})}))}function v(i,e,t){return{language:"typescript",availability:()=>({available:!1,reason:i,tsconfigPath:e,tsconfigPaths:t}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}function ae(i,e){let t=re();if(!t)return v("ts-morph is not installed");let n=te(i);if(n.length===0)return v("no tsconfig found");try{let r=ie(t,n);return new w(i,t,r)}catch(r){return v(r instanceof Error?r.message:String(r),n[0],n)}}var w=class{constructor(e,t,n){this.db=e;this.tsMorph=t;this.projects=n;this.workspacePackages=Q(e.config.projectRoot),this.sourceFiles=G(e,n)}db;tsMorph;projects;language="typescript";importUsageCache=new Map;referencesCache=new Map;calleesCache=new Map;fileCalleesCache=new Map;signatureCache=new Map;definitionNodeCache=new Map;fileDefinitionNodeCache=new Map;indexedDefinitionLeafCache=new Map;packageImportReferenceIndex=null;packageExportIndex=null;workspacePackages;sourceFiles;availability(){return{available:!0,tsconfigPath:this.projects[0]?.tsconfigPath,tsconfigPaths:this.projects.map(e=>e.tsconfigPath)}}importUsage(e){return p(this.importUsageCache,e,()=>{let t=this.sourceFiles.sourceFile(e);if(!t)return[];let n=[];for(let r of t.getImportDeclarations())for(let o of this.importUsageForDeclaration(e,r))n.push(o);return n})}referencesFor(e){return p(this.referencesCache,e.symbolId,()=>{let t=this.nodeForDefinition(e),n=this.packageImportReferencesForDefinition(e);return t?_(t,e,n,this.db.config.projectRoot):n})}calleesFor(e){return p(this.calleesCache,e.symbolId,()=>p(this.fileCalleesCache,e.relativePath,()=>this.calleeMapForFile(e.relativePath)).get(e.symbolId)??[])}signatureFor(e){return p(this.signatureCache,e.symbolId,()=>{let t=this.nodeForDefinition(e);if(!t||!this.tsMorph.Node.isFunctionDeclaration(t)&&!this.tsMorph.Node.isMethodDeclaration(t)&&!this.tsMorph.Node.isArrowFunction(t)&&!this.tsMorph.Node.isFunctionExpression(t)&&!this.tsMorph.Node.isConstructorDeclaration(t))return null;let n=t.getType().getCallSignatures()[0];if(!n)return null;let r=n.getParameters().map(s=>{let a=s.getDeclarations()[0],l=a?s.getTypeAtLocation(a).getText(a):s.getValueDeclaration()?.getType().getText()??"unknown";return se(l)}),o=n.getReturnType().getText(t);return`(${r.join(",")})=>${se(o)}`})}importUsageForDeclaration(e,t){let n=T(this.db,e,t.getModuleSpecifierValue()),r=oe(t);return t.getImportClause()?.isTypeOnly()?r.map(o=>Pe(e,n,o)):r.map(o=>this.valueImportUsageForEntry(e,n,o))}valueImportUsageForEntry(e,t,n){let r=n.identifier?n.identifier.findReferences():[],o=[];for(let c of r)for(let d of B(c,e,n.identifier,this.db.config.projectRoot))o.push(d);let s=o.some(c=>!R(c.node)),a=o.some(c=>R(c.node)),l=n.isTypeOnly;return{importer:e,sourcePath:t,importedName:n.importedName,localName:n.localName,kind:n.kind,isTypeOnly:l,isUsed:l||o.length>0,isTypeUsed:l||a,isValueUsed:s,references:o.map(c=>c.location)}}packageImportReferencesForDefinition(e){return this.packageImportReferences().get(e.symbolId)??[]}packageImportReferences(){if(this.packageImportReferenceIndex)return this.packageImportReferenceIndex;let e=new Map,t=this.packageExports();for(let n of this.sourceFiles.indexedTypeScriptLikeDocuments())this.addPackageImportReferencesForDocument(e,t,n);for(let[n,r]of e)e.set(n,N(r));return this.packageImportReferenceIndex=e,e}addPackageImportReferencesForDocument(e,t,n){if(this.db.isIgnored(n))return;let r=this.sourceFiles.sourceFileMatch(n);if(r)for(let o of r.sourceFile.getImportDeclarations())this.addPackageImportReferencesForDeclaration(e,t,n,o)}addPackageImportReferencesForDeclaration(e,t,n,r){let o=Z(this.workspacePackages,r.getModuleSpecifierValue());if(!o)return;let s=t.get(o);if(s)for(let a of oe(r)){if(a.kind!=="named"||!a.identifier)continue;let l=s.get(a.importedName);if(!l||l.size===0)continue;let c=z(a.identifier,n,this.db.config.projectRoot);c.length>0&&Ce(e,l,c)}}packageExports(){if(this.packageExportIndex)return this.packageExportIndex;let e=new Map;for(let t of this.workspacePackages){let n=new Map;for(let r of ee(t))this.collectPackageExports(t,r,n,new Set);n.size>0&&e.set(t.name,n)}return this.packageExportIndex=e,e}collectPackageExports(e,t,n,r){if(r.has(t))return;r.add(t);let o=this.sourceFiles.sourceFile(t);if(o)for(let s of o.getExportDeclarations()){let a=s.getModuleSpecifierValue(),l=a?T(this.db,t,a):t;if(!l||!l.startsWith(`${e.sourceRootRelative}/`))continue;let c=s.getNamedExports();if(c.length===0){if(s.isNamespaceExport())continue;this.collectPackageExports(e,l,n,r);continue}for(let d of c){let u=d.getNameNode().getText(),A=d.getAliasNode()?.getText()??u,O=this.indexedDefinitionByLeaf(l,u);if(!O)continue;let D=n.get(A);D||(D=new Set,n.set(A,D)),D.add(O.symbolId)}}}indexedDefinitionByLeaf(e,t){return p(this.indexedDefinitionLeafCache,e,()=>X(this.db,e)).get(t)??null}nodeForDefinition(e){return p(this.definitionNodeCache,e.symbolId,()=>this.definitionNodesForFile(e.relativePath).get(e.symbolId)??null)}definitionNodesForFile(e){return p(this.fileDefinitionNodeCache,e,()=>{let t=this.sourceFiles.sourceFile(e);return t?J(this.tsMorph,this.db,t,e):new Map})}definitionFromSymbol(e){let t=e.getDeclarations();for(let n of t){let r=n.getSourceFile(),o=S(this.db.config.projectRoot,r.getFilePath());if(!o||this.db.isIgnored(o))continue;let s=y(r,n),a=Y(this.db,o,s,e.getName());if(a)return{symbol:a.symbol,file:a.relativePath,line:a.startLine}}return null}calleeMapForFile(e){let t=this.sourceFiles.sourceFile(e);if(!t)return new Map;let n=g(this.db,e).sort((o,s)=>o.startLine-s.startLine||s.endLine-o.endLine);if(n.length===0)return new Map;let r=new Map;t.forEachDescendant(o=>{if(!this.tsMorph.Node.isCallExpression(o)&&!this.tsMorph.Node.isNewExpression(o))return;let s=this.semanticCalleeForCallNode(t,n,o);s&&Te(r,s.callerId,s.target)});for(let[o,s]of r)r.set(o,je(s));return r}semanticCalleeForCallNode(e,t,n){let r=Re(t,y(e,n));if(!r)return null;let o=n.getExpression(),s=o.getSymbol()??o.getType().getSymbol(),a=s?this.definitionFromSymbol(s):null;return a?{callerId:r.symbolId,target:{symbol:a.symbol,file:a.file,line:a.line}}:null}};function oe(i){let e=[],t=i.getDefaultImport();t&&e.push({identifier:t,importedName:"default",localName:t.getText(),kind:"default",isTypeOnly:i.getImportClause()?.isTypeOnly()??!1});let n=i.getNamespaceImport();n&&e.push({identifier:n,importedName:"*",localName:n.getText(),kind:"namespace",isTypeOnly:i.getImportClause()?.isTypeOnly()??!1});for(let r of i.getNamedImports()){let o=r.getNameNode(),a=r.getAliasNode()??(o.getKindName()==="Identifier"?o:null);e.push({identifier:a,importedName:o.getText(),localName:a?.getText()??o.getText(),kind:"named",isTypeOnly:r.isTypeOnly()||(i.getImportClause()?.isTypeOnly()??!1)})}return e.length===0&&e.push({identifier:null,importedName:"*",localName:null,kind:"side-effect",isTypeOnly:!1}),e}function Pe(i,e,t){return{importer:i,sourcePath:e,importedName:t.importedName,localName:t.localName,kind:t.kind,isTypeOnly:!0,isUsed:!0,isTypeUsed:!0,isValueUsed:!1,references:[]}}function Te(i,e,t){let n=i.get(e);n||(n=[],i.set(e,n)),n.push(t)}function Re(i,e){let t=null;for(let n of i)e<n.startLine||e>n.endLine||(!t||n.startLine>=t.startLine)&&(t=n);return t}function Ce(i,e,t){for(let n of e){let r=i.get(n)??[];r.push(...t),i.set(n,r)}}function je(i){let e=new Set,t=[];for(let n of i){let r=`${n.symbol}|${n.file}|${n.line}`;e.has(r)||(e.add(r),t.push(n))}return t}function se(i){return i.replace(/\s+/g," ").replace(/\bimport\("[^"]+"\)\./g,"").trim()}var L=new WeakMap;U({name:"semantic-provider",groups:["semantic-provider"],clearAll:i=>L.delete(i)});function ce(i,e){let t=`${i.config.projectRoot}:typescript-workspace`,n=L.get(i);n||(n=new Map,L.set(i,n));let r=n.get(t);if(r)return r;let o=ae(i,e);return n.set(t,o),o}function kt(i,e){let t=P(i,e);return t?t.importUsage(e):[]}function Ee(i,e){let t=P(i,e.relativePath);return t?t.referencesFor(e):[]}function Nt(i,e){let t=new Map;for(let n of e)for(let r of Ee(i,n)){if(r.file===n.relativePath||i.isIgnored(r.file))continue;let o=t.get(n.symbolId);o||(o=new Set,t.set(n.symbolId,o)),o.add(r.file)}return t}function Mt(i,e){let t=new Map;for(let n of e){let r=P(i,n.relativePath);if(!r)continue;let o=r.calleesFor(n);o.length>0&&t.set(n.symbolId,o)}return t}function Ft(i,e){let t=P(i,e.relativePath);return t?t.signatureFor(e):null}function P(i,e){if(!M(e))return null;let t=ce(i,e);return t.availability().available?t:null}export{M as a,ce as b,kt as c,Ee as d,Nt as e,Mt as f,Ft as g};
|
|
3
|
+
//# sourceMappingURL=chunk-FUPDW5AC.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as p}from"./chunk-B75HZHUP.js";import{a as y}from"./chunk-3ZYF3ELZ.js";import{a as o}from"./chunk-BGBBVSH4.js";import{c as b}from"./chunk-JM72FNGA.js";function P(u,c={}){let{scope:f,minLoc:L=3,scanLimit:l}=c,s=new y(u),r=c.semantic!==!1,t=p(s.productionCallableDefinitions({scope:f,minLoc:L,excludeEntrySurfaces:!0,excludeRustTraitImplMembers:!0,includeSuppressed:!0,sortByLocDesc:typeof l=="number"&&l>0}),l),h=s.crossFileCallerMap(t,{semantic:r}),a=new Set(h.keys());for(let e of s.frameworkReferencedSymbolIds(t))a.add(e);let n=s.symbolsWithNonSelfCallees(t,{additive:!1,semantic:r}),m=t.filter(e=>!a.has(e.symbolId)).filter(e=>!n.has(e.symbolId)),I=s.sourceFallbackCallerFiles(m);for(let e of I.keys())a.add(e);let d=m.filter(e=>!a.has(e.symbolId)),C=s.symbolsWithNonSelfCallees(d,{additive:!0,semantic:r});for(let e of C)n.add(e);return d.filter(e=>!n.has(e.symbolId)).sort((e,i)=>o(i)-o(e)||e.relativePath.localeCompare(i.relativePath)||e.startLine-i.startLine).map(e=>({symbol:e.symbol,shortName:b(e.symbol),relativePath:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:o(e)}))}export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-G3WGZU5Q.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as p}from"./chunk-PVZMPG5I.js";import{a as c,b as a,c as f}from"./chunk-3UVJJ6Z7.js";import{c as m}from"./chunk-ERHOS6AW.js";function B(e,t={}){let{minSimilarity:n=.62,minTokens:i=8,limit:l=20,scope:d,scanLimit:h,filePattern:g}=t,k=P(e,{scope:d,minTokens:i,scanLimit:h});return p({profiles:k,limit:l,filePattern:g,compare:(o,s)=>v(o,s,n),sort:(o,s)=>s.similarity-o.similarity||o.fileA.localeCompare(s.fileA)||o.fileB.localeCompare(s.fileB)})}function P(e,t){return m(e,{scope:t.scope,minTemplateTokens:t.minTokens,scanLimit:t.scanLimit}).map(n=>({file:n.file,tokens:n.templateTokens,loc:C(n)}))}function C(e){return e.totalLines}function v(e,t,n){let i=c(e.tokens,t.tokens);if(i.size<6||!T(i))return null;let l=f(e.tokens,t.tokens);return l<n?null:{fileA:e.file,fileB:t.file,similarity:l,sharedTokens:u(i),sharedComponents:r(i,"component:"),sharedProps:r(i,"prop:"),sharedEvents:r(i,"event:"),sharedDirectives:r(i,"directive:"),sharedSlots:r(i,"slot:"),sharedIdentifiers:r(i,"id:"),uniqueToA:u(a(e.tokens,t.tokens)).slice(0,25),uniqueToB:u(a(t.tokens,e.tokens)).slice(0,25),locA:e.loc,locB:t.loc}}function T(e){let t=0,n=0;for(let i of e)i.startsWith("component:")&&(t+=1),(i.startsWith("prop:")||i.startsWith("event:")||i.startsWith("directive:")||i.startsWith("slot:"))&&(n+=1);return t>=1||n>=3}function r(e,t){return[...e].filter(n=>n.startsWith(t)).map(n=>n.slice(t.length)).sort()}function u(e){return[...e].sort()}export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GS33KGAY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as h}from"./chunk-YTR4CO5S.js";import{e as y,g as S,h as g,i as M,m as C}from"./chunk-HVTYSC26.js";import{e as R}from"./chunk-FUPDW5AC.js";import{g as b}from"./chunk-3UW7VM4H.js";import{d as m,f as p}from"./chunk-QLNGUWR7.js";import{a as f}from"./chunk-EWC3UK4V.js";import{a as u}from"./chunk-64MNV6AB.js";function D(e,n,t={}){let o=new Map;if(n&&n.length===0)return o;let i=u(e,{includeIgnored:!1}),a=M(e),r=n??b(e),l=new Set(r.map(s=>s.symbolId));return k(e,o,i,a,l),I(e,o,r,l),x(e,o,i,a,l),t.semantic!==!1&&_(o,R(e,A(r))),o}function k(e,n,t,o,i){for(let a of t){if(!f(a))continue;let r=m(e,a);if(r)for(let l of r){let s=S(a,o.get(l.calleeLeaf)??[]);if(!s||s.length===0)continue;let c=g(e,a,s,l.memberAccess);c&&i.has(c.symbolId)&&c.file!==a&&d(n,c.symbolId,a)}}}function I(e,n,t,o){let i=v(t);for(let a of L(e,o))e.isIgnored(a.relative_path)||w(a,i.get(a.symbol_id))||d(n,a.symbol_id,a.relative_path)}function L(e,n){return y(e,n?[...n]:void 0)}function v(e){let n=new Map;for(let t of e)n.set(t.symbolId,{docId:t.documentId,startLine:t.startLine,endLine:t.endLine});return n}function w(e,n){return!!n&&n.docId===e.document_id&&e.chunk_start>=n.startLine&&e.chunk_end<=n.endLine}function x(e,n,t,o,i){for(let a of t){if(f(a)!=="rust")continue;let r=p(e,a,{includeRustAttributeNames:!0});if(r.length!==0)for(let{name:l}of r){let s=o.get(l);if(s)for(let c of s)i.has(c.symbolId)&&c.file!==a&&d(n,c.symbolId,a)}}}function d(e,n,t){let o=e.get(n);o||(o=new Set,e.set(n,o)),o.add(t)}function A(e){return e.filter(n=>"relativePath"in n&&"symbol"in n&&"leaf"in n)}function _(e,n){for(let[t,o]of n){let i=e.get(t);i||(i=new Set,e.set(t,i));for(let a of o)i.add(a)}}function O(e,n,t={}){return h(e,n,t)}function F(e,n,t={}){return D(e,n,t)}function j(e,n){return C(e,n)}function Q(e,n,t={}){let o=F(e,n,{semantic:t.semantic});return t.sourceFallback===!1?o:V(o,j(e,n))}function V(e,n){let t=new Map;for(let[o,i]of e)t.set(o,new Set(i));for(let[o,i]of n){let a=t.get(o)??new Set;for(let r of i)a.add(r);t.set(o,a)}return t}export{O as a,F as b,j as c,Q as d};
|
|
2
|
+
//# sourceMappingURL=chunk-GZCQTZLK.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as C}from"./chunk-
|
|
1
|
+
import{d as C}from"./chunk-FUPDW5AC.js";import{c as _}from"./chunk-MZ7APUFN.js";import{b as S}from"./chunk-FOQHUKNZ.js";import{t as M}from"./chunk-CRU42NJU.js";import{f as y,k as h}from"./chunk-3UW7VM4H.js";import{d as f}from"./chunk-JM72FNGA.js";import{a as b}from"./chunk-QLNGUWR7.js";import{a as v}from"./chunk-EWC3UK4V.js";import{a as m}from"./chunk-D322LMSA.js";import{c as I}from"./chunk-OBBDKQAG.js";import{c as g,d as D}from"./chunk-7S5E7KWT.js";function R(e,r,n,t={}){if(!n)return[];let i=m(e,r);return i?i.indexOf(n)===-1?[]:(L(e,r).get(n)??[]).filter(s=>!B(s,t)):[]}function B(e,r){return typeof r.excludeStartLine=="number"&&typeof r.excludeEndLine=="number"&&e>=r.excludeStartLine&&e<=r.excludeEndLine}var G=g("file-identifiers",{clearGroups:["whole-project","source-file"]});function w(e,r){let n=b(e,r);return n?n.fileIdentifiers:G.get(e,r,()=>new Set(L(e,r).keys()))}var H=g("file-ident-lines",{clearGroups:["whole-project","source-file"]});function L(e,r){let n=b(e,r);return n?n.identifierLineMap:H.get(e,r,()=>z(e,r))}var J=g("file-idents-by-line",{clearGroups:["whole-project","source-file"]});function ie(e,r){let n=b(e,r);return n?n.identifiersByLine:J.get(e,r,()=>{let t=L(e,r),i=0;for(let s of t.values()){let c=s[s.length-1];c!==void 0&&c>i&&(i=c)}let o=new Array(i+1);for(let s=0;s<=i;s+=1)o[s]=new Set;for(let[s,c]of t)for(let a of c)o[a].add(s);return o})}function z(e,r){let n=new Map,t=(c,a)=>{let l=n.get(c);if(!l){n.set(c,[a]);return}l[l.length-1]!==a&&l.push(a)},i=m(e,r);if(!i)return n;let o=M(i).split(/\r?\n/),s=/\b([A-Za-z_$][\w$]*)\b/g;for(let c=0;c<o.length;c+=1){let a=o[c]??"";for(let l of a.matchAll(s))l[1]&&t(l[1],c)}return n}function k(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function d(e,r){return k(e)===k(r)}function O(e,r){let n=new Map;for(let t of S(e,r)){if(!t.sourcePath)continue;let i=t.localName??t.importedName;if(i&&F(n,i,t.sourcePath),t.kind==="namespace")for(let o of t.usedMembers)F(n,o,t.sourcePath)}return n}function F(e,r,n){let t=e.get(r);t||(t=new Set,e.set(r,t)),t.add(n)}function le(e,r){return E(e,r,n=>{let t=n?`AND m.symbol_id IN (${n.map(()=>"?").join(",")})`:"";return e.all(`SELECT
|
|
2
2
|
m.symbol_id,
|
|
3
3
|
d.relative_path,
|
|
4
4
|
COUNT(*) AS ref_count
|
|
@@ -37,4 +37,4 @@ import{d as C}from"./chunk-ZF6P2NAT.js";import{c as _}from"./chunk-4MHT7LKP.js";
|
|
|
37
37
|
) mention_doc ON mention_doc.symbol_id = gs.id
|
|
38
38
|
WHERE 1 = 1
|
|
39
39
|
${e.symbolNoiseFor("gs")}`),n=new Map;for(let t of r){if(!t.relative_path||e.isIgnored(t.relative_path))continue;let i=f(t.symbol);if(!i)continue;let o=n.get(i);o||(o=[],n.set(i,o)),o.some(s=>s.symbolId===t.id)||o.push({symbol:t.symbol,symbolId:t.id,file:t.relative_path})}return n})}function N(e,r,n){let t=x(e).get(n);if(!t||t.length===0)return[];if(t.length===1)return[p(t[0])];let i=t.filter(a=>a.file===r);if(i.length>0)return i.map(p);let o=O(e,r),s=o.get(n);if(s)for(let a of s){let l=t.filter(u=>d(a,u.file));if(l.length>0)return l.map(p)}let c=new Set;for(let a of o.values())for(let l of a)c.add(l);for(let a of c){let l=t.filter(u=>d(a,u.file));if(l.length>0&&l.length===t.length)return l.map(p)}return[]}function Ce(e,r,n){let t=N(e,r,n);if(t.length>0)return t;let i=x(e).get(n);return!i||i.length===0?[]:i.map(p)}function $(e,r,n={}){let t=_(e,r);if(!t)return[];let i=f(t.symbol);if(!i)return[];if(n.semantic!==!1){let s=C(e,{...t,leaf:i,parentTypeName:null,isFunctionLike:!1,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null});if(s.length>0){let c=new Map;for(let a of s){let l=c.get(a.file)??[];l.push(a.line),c.set(a.file,l)}return P(e,c)}}let o=new Map;for(let s of I(e)){let c=m(e,s);if(!c||c.indexOf(i)===-1||s!==t.relativePath&&!N(e,s,i).some(u=>u.symbolId===t.symbolId))continue;let a=R(e,s,i,s===t.relativePath?{excludeStartLine:t.startLine,excludeEndLine:t.endLine}:{});a.length>0&&o.set(s,a)}return P(e,o)}function we(e,r){let n=new Map;for(let o of r){if(!o.leaf)continue;let s=n.get(o.leaf)??[];s.push(o),n.set(o.leaf,s)}if(n.size===0)return new Map;let t=new Set(r.map(o=>o.symbolId)),i=new Map;for(let o of I(e)){let s=w(e,o);if(s.size!==0){for(let c of s)if(n.has(c))for(let a of N(e,o,c)){if(!t.has(a.symbolId)||o===a.relativePath)continue;let l=i.get(a.symbolId);l||(l=new Set,i.set(a.symbolId,l)),l.add(o)}}}return i}function p(e){return{symbolId:e.symbolId,symbol:e.symbol,relativePath:e.file}}function P(e,r){let n=[],t=new Set;for(let[i,o]of r){let s=y(e,i);for(let c of o){let a=h(s,c),l=`${i}|${c}|${a?.symbol??""}`;t.has(l)||(t.add(l),n.push({file:i,line:c,enclosingSymbol:a?.symbol??null}))}}return n}function Y(e,r){let n=q(e,r);return n?K(e,Q(e,n.match,n.identifier)):[]}function je(e,r,n={}){return Z(e,r,n).map(t=>({file:t.file,line:t.line,enclosingSymbol:t.enclosingSymbol}))}function Z(e,r,n={}){let t=$(e,r,{semantic:n.semantic}),i=t.length>0?j(t,"source-attribution"):j(Y(e,r),"scip-reference-chunk");return n.includeIgnored===!0?i:i.filter(o=>!e.isIgnored(o.file))}function j(e,r){return e.map(n=>({...n,provenance:r}))}function Q(e,r,n){let t=new Map;for(let[i,o]of U(e,r.symbolId))t.set(i,V(e,i,o,r,n));return t}function U(e,r){let n=new Map;for(let t of A(e,[r])){if(e.isIgnored(t.relative_path))continue;let i=n.get(t.relative_path);i||(i=[],n.set(t.relative_path,i)),i.push({start_line:t.chunk_start,end_line:t.chunk_end})}return n}function V(e,r,n,t,i){let o=r===t.relativePath?{excludeStartLine:t.startLine,excludeEndLine:t.endLine}:{},s=i?R(e,r,i,o):[];return n.flatMap(c=>X(s,c))}function X(e,r){let n=e.filter(t=>t>=r.start_line&&t<=r.end_line);return n.length>0?n:[r.start_line]}function q(e,r){let n=_(e,r);return n?{match:n,identifier:f(n.symbol)||null}:null}function K(e,r){let n=[],t=new Set;for(let[i,o]of r){let s=y(e,i);for(let c of o){let a=h(s,c),l=`${i}|${c}|${a?.symbol??""}`;t.has(l)||(t.add(l),n.push({file:i,line:c,enclosingSymbol:a?.symbol??null}))}}return n}export{L as a,ie as b,le as c,fe as d,A as e,d as f,Se as g,ye as h,x as i,O as j,N as k,Ce as l,we as m,Y as n,je as o};
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-HVTYSC26.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as m}from"./chunk-
|
|
1
|
+
import{b as m}from"./chunk-CTCAF3YA.js";import{i as o}from"./chunk-3UW7VM4H.js";function h(t,l){let s=m(t,l);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let d=s.map(()=>"?").join(", "),i=t.all(`SELECT relative_path FROM documents
|
|
2
2
|
WHERE relative_path IN (${d})
|
|
3
3
|
ORDER BY relative_path`,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e)),n=o(t,i,{onlyDocumented:!0,sort:!0}).map(({relativePath:e,...c})=>c),a=t.all(`SELECT DISTINCT d2.relative_path
|
|
4
4
|
FROM mentions m
|
|
@@ -32,4 +32,4 @@ import{b as m}from"./chunk-ZOT3WUZW.js";import{u as o}from"./chunk-O6KCZPJQ.js";
|
|
|
32
32
|
WHERE d2.relative_path IN (${d})
|
|
33
33
|
AND d1.relative_path NOT IN (${d})
|
|
34
34
|
ORDER BY d1.relative_path`,...s,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e));return{files:i,symbols:n,dependsOn:a,dependedOnBy:r}}export{h as a};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-ICXVNWMI.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var d={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function l(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let t=e.split(" ");if(t.length<4)return{scheme:t[0]??"",manager:t[1]??"",packageName:t[2]??"",version:"",descriptors:[],raw:e};let s=t[0],i=t[1],r=e.slice(s.length+1+i.length+1),n;if(r.startsWith("`")){let f=r.indexOf("`",1);f===-1?(n=r.slice(1),r=""):(n=r.slice(1,f),r=r.slice(f+2))}else{let f=r.indexOf(" ");f===-1?(n=r,r=""):(n=r.slice(0,f),r=r.slice(f+1))}let o,c=r.indexOf(" ");c===-1?(o=r,r=""):(o=r.slice(0,c),r=r.slice(c+1));let a=m(r);return{scheme:s,manager:i,packageName:n,version:o,descriptors:a,raw:e}}function b(e){let t=l(e);if("kind"in t)return null;for(let s=t.descriptors.length-2;s>=0;s--){let i=t.descriptors[s];if(i?.suffix==="type")return i.name}return null}function m(e){let t=[],s=0;for(;s<e.length;){if(e[s]==="["){let n=e.indexOf("]",s+1);if(n===-1){t.push({name:e.slice(s+1),suffix:"type-param"});break}t.push({name:e.slice(s+1,n),suffix:"type-param"}),s=n+1;continue}if(e[s]==="("&&(t.length===0||s===0||u(e[s-1]))){let n=e.indexOf(")",s+1);if(n!==-1&&e[n+1]!=="."){t.push({name:e.slice(s+1,n),suffix:"parameter"}),s=n+1;continue}}let i;if(e[s]==="`"){let n=e.indexOf("`",s+1);if(n===-1){i=e.slice(s+1),t.push({name:i,suffix:"term"});break}i=e.slice(s+1,n),s=n+1}else{let n=s;for(;s<e.length&&!u(e[s]);)s++;i=e.slice(n,s)}if(s>=e.length){i&&t.push({name:i,suffix:"term"});break}let r=e[s];if(r==="("){let n=e.indexOf(")",s+1);n!==-1&&e[n+1]==="."?(t.push({name:i,suffix:"method"}),s=n+2):n!==-1?(t.push({name:i,suffix:"method"}),s=n+1):(t.push({name:i,suffix:"term"}),s++)}else{let n=d[r];n&&t.push({name:i,suffix:n}),s+=1}}return t}function u(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function y(e){let t=l(e);if("kind"in t&&t.kind==="local")return`local:${t.id}`;let s=t;if(s.descriptors.length===0)return s.raw;let i=[];for(let r of s.descriptors){let n=g(r);n&&i.push(n)}return i.join(":")}function g(e){let t=e.suffix==="namespace"?x(e.name):e.name;return t?e.suffix==="method"?`${t}()`:t:""}function x(e){return e.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/,"").replace(/\.(py|pyi)$/,"").replace(/\.(rs)$/,"").replace(/\.(java|scala|kt|kts)$/,"").replace(/\.(rb)$/,"").replace(/\.(go)$/,"").replace(/\.(cs|vb)$/,"").replace(/\.(dart)$/,"").replace(/\.(php)$/,"").replace(/\.(c|cc|cpp|cxx|h|hpp)$/,"")}function k(e){let t=l(e);if("kind"in t&&t.kind==="local")return t.id;let s=t;return s.descriptors.length===0?"":s.descriptors[s.descriptors.length-1].name}function p(e){let t=l(e);if("kind"in t&&t.kind==="local")return null;let s=t;return s.descriptors[s.descriptors.length-1]?.suffix??null}function D(e){return e.endsWith("().")||p(e)==="method"}function $(e){let t=p(e);return t==="method"||t==="term"}function T(e){return p(e)==="namespace"}var h=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function M(e){return h.test(e)}var S=new Set(["test","tests","_tests"]);function O(e){let t=l(e);if("kind"in t)return!1;for(let s=0;s<t.descriptors.length-1;s+=1){let i=t.descriptors[s];if(i?.suffix==="namespace"&&i.name&&S.has(i.name))return!0}return!1}function j(e,t){let s=l(e),i=l(t);if("kind"in s||"kind"in i)return!1;let r=s.descriptors,n=i.descriptors;if(n.length!==r.length+1)return!1;for(let o=0;o<r.length;o++){let c=r[o],a=n[o];if(c.name!==a.name||c.suffix!==a.suffix)return!1}return!0}function I(e,t){let s=l(e),i=l(t);if("kind"in s||"kind"in i)return!1;let r=s.descriptors,n=i.descriptors;if(n.length<=r.length)return!1;for(let o=0;o<r.length;o++){let c=r[o],a=n[o];if(c.name!==a.name||c.suffix!==a.suffix)return!1}return!0}export{l as a,b,y as c,k as d,p as e,D as f,$ as g,T as h,M as i,O as j,j as k,I as l};
|
|
2
|
+
//# sourceMappingURL=chunk-JM72FNGA.js.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _e from"better-sqlite3";import{existsSync as _t,readFileSync as Mt,writeFileSync as Gt}from"fs";import{dirname as Wt,join as Ht,resolve as Me}from"path";import ne from"better-sqlite3";import{execFileSync as re}from"child_process";import{existsSync as oe,readdirSync as ie,readFileSync as se}from"fs";import{extname as m,join as F}from"path";import K from"ignore";import{readFileSync as B,existsSync as b}from"fs";import{dirname as h,isAbsolute as x,join as S,relative as J,resolve as X}from"path";function C(e){let t=K(),r=!1,n=z(e);for(let i of n)try{let o=B(i,"utf-8");t.add(o),r=!0}catch{}return r||t.add(q),{isIgnored:i=>V(t,e,i),filter:i=>i.filter(o=>!V(t,e,o))}}function z(e){let t=[],r=S(e,".gitignore");b(r)&&t.push(r);let n=h(e),i=0;for(;n!==h(n)&&i<5;){let o=S(n,".gitignore");if(b(o)&&t.push(o),b(S(n,".git")))break;n=h(n),i++}return t}var q=`
|
|
2
|
+
# Dependencies
|
|
3
|
+
node_modules/
|
|
4
|
+
vendor/
|
|
5
|
+
.bundle/
|
|
6
|
+
|
|
7
|
+
# Build output
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
out/
|
|
11
|
+
target/
|
|
12
|
+
bin/
|
|
13
|
+
obj/
|
|
14
|
+
|
|
15
|
+
# Python
|
|
16
|
+
__pycache__/
|
|
17
|
+
*.pyc
|
|
18
|
+
*.pyo
|
|
19
|
+
.venv/
|
|
20
|
+
venv/
|
|
21
|
+
.env/
|
|
22
|
+
env/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
|
|
25
|
+
# Rust
|
|
26
|
+
target/
|
|
27
|
+
|
|
28
|
+
# Java / Kotlin / Scala
|
|
29
|
+
*.class
|
|
30
|
+
.gradle/
|
|
31
|
+
.mvn/
|
|
32
|
+
|
|
33
|
+
# C# / .NET
|
|
34
|
+
bin/
|
|
35
|
+
obj/
|
|
36
|
+
packages/
|
|
37
|
+
|
|
38
|
+
# Go
|
|
39
|
+
vendor/
|
|
40
|
+
|
|
41
|
+
# Dart
|
|
42
|
+
.dart_tool/
|
|
43
|
+
build/
|
|
44
|
+
|
|
45
|
+
# PHP
|
|
46
|
+
vendor/
|
|
47
|
+
|
|
48
|
+
# IDE / OS
|
|
49
|
+
.idea/
|
|
50
|
+
.vscode/
|
|
51
|
+
*.swp
|
|
52
|
+
*.swo
|
|
53
|
+
.DS_Store
|
|
54
|
+
Thumbs.db
|
|
55
|
+
|
|
56
|
+
# Type definitions (often noise in queries)
|
|
57
|
+
*.d.ts
|
|
58
|
+
`;function V(e,t,r){let n=Y(t,r);if(!n)return!1;try{return e.ignores(n)}catch{return!1}}function Y(e,t){if(!t||t===".")return null;if(!x(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let r=x(t)?t:X(e,t),n=J(e,r).replaceAll("\\","/");return!n||n==="."||n.startsWith("..")?null:n}import{readdirSync as nt}from"fs";import{execFileSync as ot}from"child_process";import{extname as st,join as at}from"path";var Q=[];function k(e){e.groups.length>0&&Q.push(e)}function Z(){let e=new WeakMap;return{cache:e,ensure(t){let r=e.get(t);return r||(r=new Map,e.set(t,r)),r}}}function L(e,t){let{cache:r,ensure:n}=Z(),i={get(o,s,a){let u=n(o);if(u.has(s))return u.get(s);let c=a();return u.set(s,c),c},invalidate(o,s){r.get(o)?.delete(s)},invalidateAll(o){r.delete(o)},size(o){return r.get(o)?.size??0}};return k({name:e,groups:t.clearGroups,clearAll:o=>i.invalidateAll(o),clearFile:(o,s)=>i.invalidate(o,s)}),i}var ee=[".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"],T=[".vue"],te=new Set(ee.map(e=>e.toLowerCase())),ct=[...te].sort().join(","),D=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);var lt=L("source-files",{clearGroups:[]});function St(e){let t=new Set((e.extensions??T).map(o=>o.toLowerCase()));if(t.size===0)return{scanned:0,inserted:0,existing:0};if(!oe(e.dbPath))throw new Error(`SCIP SQLite database not found at ${e.dbPath}`);let r=C(e.projectRoot),n=ae(e.projectRoot,t).filter(o=>!r.isIgnored(o)),i=new ne(e.dbPath);try{let o=ce(i,n),s=i.prepare(`INSERT OR IGNORE INTO documents (language, relative_path, position_encoding, text)
|
|
59
|
+
VALUES (?, ?, NULL, ?)`),u=i.transaction(l=>{let p=0;for(let g of l){if(o.has(g))continue;let d=se(F(e.projectRoot,g),"utf-8"),U=s.run(le(g),g,d);p+=Number(U.changes)}return p})(n),c={scanned:n.length,inserted:u,existing:n.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 ae(e,t){let r=ue(e,t);if(r)return r;let n=[],i=o=>{let s=o?F(e,o):e,a;try{a=ie(s,{withFileTypes:!0})}catch{return}for(let u of a){if(D.has(u.name))continue;let c=o?`${o}/${u.name}`:u.name;if(u.isDirectory()){i(c);continue}t.has(m(u.name).toLowerCase())&&n.push(c)}};return i(""),n.sort()}function ue(e,t){try{return re("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:26214400,stdio:["ignore","pipe","ignore"]}).split(`
|
|
60
|
+
`).filter(n=>n&&t.has(m(n).toLowerCase())).sort()}catch{return null}}function ce(e,t){let r=new Set,n=500;for(let i=0;i<t.length;i+=n){let o=t.slice(i,i+n),s=e.prepare(`SELECT relative_path FROM documents WHERE relative_path IN (${o.map(()=>"?").join(",")})`).all(...o);for(let a of s)r.add(a.relative_path)}return r}function le(e){return m(e).toLowerCase()===".vue"?"vue":m(e).replace(/^\./,"").toLowerCase()||"source"}import{execFileSync as ge}from"child_process";import{createHash as de}from"crypto";import{readdirSync as fe,readFileSync as pe}from"fs";import{join as E}from"path";function I(e){return(be(e)??he(e)).filter(t=>t&&!w(t)).sort()}function Ct(e,t={}){return(t.language?I(e).filter(n=>me(n,t.language,t.markerFiles)):I(e)).map(n=>{let i=E(e,n);try{let o=pe(i);return{path:n,size:o.byteLength,hash:de("sha256").update(o).digest("hex")}}catch{return{path:n,size:-1,hash:"unreadable"}}})}function me(e,t,r){let n=e.split("/").at(-1)??e;if(r?.includes(e)||r?.includes(n)||ye.has(n))return!0;let i=e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:"";return(ve[t]??[]).includes(i)}function be(e){try{return ge("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:50*1024*1024,stdio:["ignore","pipe","ignore"]}).split(`
|
|
61
|
+
`).filter(Boolean)}catch{return null}}function he(e){let t=[],r=[""];for(;r.length>0;){let n=r.pop(),i=n?E(e,n):e,o;try{o=fe(i,{withFileTypes:!0})}catch{continue}for(let s of o){let a=n?`${n}/${s.name}`:s.name;if(s.isDirectory()){w(a)||r.push(a);continue}t.push(a)}}return t}function w(e){return e.split("/").some(r=>Se.has(r))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var Se=new Set([".git","node_modules",".scipquery-cache",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]),ye=new Set(["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lockb","tsconfig.json","tsconfig.base.json","pyproject.toml","setup.py","setup.cfg","Cargo.toml","Cargo.lock","go.mod","go.sum","pom.xml","build.gradle","build.gradle.kts","build.sbt","compile_commands.json","CMakeLists.txt","Makefile","Gemfile","Gemfile.lock","composer.json","composer.lock","pubspec.yaml","pubspec.lock"]),ve={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".mjs",".cjs"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"]};import{createRequire as Re}from"module";import{existsSync as xe,readFileSync as v}from"fs";import{dirname as O,extname as Ve,join as A,relative as Ce,resolve as Ft}from"path";import{pathToFileURL as ke}from"url";function P(e,t){let{vueCore:r,ts:n,volarTs:i}=Le(e),{parsed:o,vueOptions:s}=Te(r,n,t),a=O(t),u=r.createVueLanguagePlugin(n,o.options,s,d=>d),c=De(r,n,u),l=Fe(a,o),{languageServiceHost:p}=i.createLanguageServiceHost(n,n.sys,c,d=>d,l),g=n.createLanguageService(p);return{ts:n,language:c,languageService:g,fileNames:o.fileNames,configDir:a}}function Le(e){let t=Re(ke(A(e,"package.json")).href);return{vueCore:y(t,"@vue/language-core",e),ts:y(t,"typescript",e),volarTs:y(t,"@volar/typescript",e)}}function Te(e,t,r){let n=t.readConfigFile(r,t.sys.readFile);if(n.error||!n.config)throw new Error(`Failed to read ${r}`);let o=e.createParsedCommandLine(t,t.sys,r).vueOptions;return typeof e.createGlobalTypesWriter=="function"&&(o.globalTypesPath=e.createGlobalTypesWriter(o,t.sys.writeFile)),{parsed:t.parseJsonConfigFileContent(n.config,t.sys,O(r),void 0,r,void 0,e.getAllExtensions(o).map(s=>({extension:s.slice(1),isMixedContent:!0,scriptKind:t.ScriptKind.Deferred}))),vueOptions:o}}function De(e,t,r){let n={},i=e.createLanguage([r],new Map,o=>{if(!xe(o))return;let s=v(o,"utf-8");n.current?.scripts.set(o,t.ScriptSnapshot.fromString(s),r.getLanguageId(o)??Oe(o))});return n.current=i,i}function Fe(e,t){return{getCurrentDirectory:()=>e,getCompilationSettings:()=>t.options,getScriptFileNames:()=>t.fileNames,getProjectReferences:()=>t.projectReferences,getProjectVersion:()=>"0"}}function y(e,t,r){try{return e(t)}catch(n){throw(typeof n=="object"&&n!==null&&"code"in n?n.code:null)==="MODULE_NOT_FOUND"?new Error(`Vue augmentation requires ${t} to be installed in ${r}. Install Vue/Volar dependencies for that project, then rerun augment-vue.`,{cause:n}):n}}function N(e,t,r){let n=Ie(e);return i=>{let o=f(t,i.fileName),s=r.get(i.fileName);if(!s)return null;let a=r.positionAt(s,i.textSpan.start),u=n.get(o);if(!u)return null;let c=u.containingByLine.get(a.line);return c!==void 0?c:Ee(u.starts,a.line,2)}}function Ie(e){let t=e.prepare(`
|
|
62
|
+
SELECT
|
|
63
|
+
d.relative_path AS relativePath,
|
|
64
|
+
der.start_line AS startLine,
|
|
65
|
+
der.end_line AS endLine,
|
|
66
|
+
der.symbol_id AS symbolId
|
|
67
|
+
FROM defn_enclosing_ranges der
|
|
68
|
+
JOIN documents d ON d.id = der.document_id
|
|
69
|
+
ORDER BY d.relative_path, (der.end_line - der.start_line) DESC
|
|
70
|
+
`).all(),r=new Map;for(let n of t){let i=r.get(n.relativePath);i||(i={containingByLine:new Map,starts:[]},r.set(n.relativePath,i)),i.starts.push({line:n.startLine,symbolId:n.symbolId});for(let o=n.startLine;o<=n.endLine;o++)i.containingByLine.set(o,n.symbolId)}for(let n of r.values())n.starts.sort((i,o)=>i.line-o.line);return r}function Ee(e,t,r){let n=0,i=e.length-1;for(;n<=i;){let s=Math.floor((n+i)/2);e[s].line<t?n=s+1:i=s-1}let o=null;for(let s of[i,n]){let a=e[s];if(!a)continue;let u=Math.abs(a.line-t);u>r||(!o||u<o.distance)&&(o={distance:u,symbolId:a.symbolId})}return o?.symbolId??null}function j(e,t){let r=Pe(t),n=e.prepare("SELECT id FROM global_symbols WHERE symbol = ?"),i=new Map;return{get(o){if(i.has(o))return i.get(o)??null;let s=Ne(n,r,t,o);return i.set(o,s),s}}}function _(e,t,r,n,i){if(e.fileName.endsWith(".vue")){let o=n.language.scripts.get(e.fileName),s=o?.generated?.languagePlugin.typescript?.getServiceScript(o.generated.root)?.code;if(o&&s){let a=n.language.maps.get(s,o);if(R(a,e.textSpan.start)!==null)return r.get(e.fileName)}return e.fileName.startsWith(i)?r.get(e.fileName):null}return t(e)}function*M(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 G(e,t){for(let[r]of e.toGeneratedLocation(t,n=>!!n.navigation))return r;return null}function R(e,t){let r=e;for(let[n]of r.toSourceLocation(t,i=>!!i.navigation))return n;return null}function we(e,t){let r=0,n=e.lineStarts.length-1;for(;r<=n;){let o=Math.floor((r+n)/2);e.lineStarts[o]<=t?r=o+1:n=o-1}let i=Math.max(0,n);return{line:i,character:t-e.lineStarts[i]}}function $(e,t){return f(e,t).startsWith("node_modules/")}function f(e,t){return Ce(e,t).replaceAll("\\","/")}function Oe(e){switch(Ve(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 W(){let e=new Map;return{get(t){if(e.has(t))return e.get(t)??null;try{let r=v(t,"utf-8"),n={text:r,lineStarts:Ae(r)};return e.set(t,n),n}catch{return e.set(t,null),null}},positionAt:we}}function Ae(e){let t=[0];for(let r=0;r<e.length;r++)e.charCodeAt(r)===10&&t.push(r+1);return t}function Pe(e){try{let t=JSON.parse(v(A(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 Ne(e,t,r,n){let i=f(r,n),o=je(t.name,t.version,i);return e.get(o)?.id??null}function je(e,t,r){let n=r.split("/").map(i=>`\`${i.replaceAll("`","")}\``).join("/");return`scip-vue npm ${e} ${t} ${n}/default.`}function Kt(e){let t=Me(e.projectRoot,e.tsconfig),r=new _e(e.dbPath,{readonly:!0});try{let n=Ge({db:r,projectRoot:e.projectRoot,configPath:t,vueSymbolLookup:j(r,e.projectRoot)});return $e({vueFiles:e.vueFiles??[],tasks:e.tasks,...n})}finally{r.close()}}function Ge(e){let t=W();return{projectRoot:e.projectRoot,context:P(e.projectRoot,e.configPath),symbolLookup:N(e.db,e.projectRoot,t),vueSymbolLookup:e.vueSymbolLookup,sourceReader:t}}function $e(e){let t=[],r=0,n=e.tasks??e.vueFiles.map(i=>({fileName:i,startOffset:0,endOffset:Number.POSITIVE_INFINITY,countFileSkip:!0}));for(let i of n){let o=We(e,i);t.push(...o.occurrences),r+=o.skippedReferences}return{occurrences:t,skippedReferences:r}}function We(e,t){let r=e.context.language.scripts.get(t.fileName),n=r?.generated?.languagePlugin.typescript?.getServiceScript(r.generated.root)?.code;if(!r||!n)return{occurrences:[],skippedReferences:t.countFileSkip?1:0};let i=e.sourceReader.get(t.fileName);if(!i)return{occurrences:[],skippedReferences:t.countFileSkip?1:0};let o=e.context.language.maps.get(n,r),s=f(e.projectRoot,t.fileName),a=[...M(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:Ke(a),processedStarts:new Set};return He({...e,fileName:t.fileName,sourceInfo:i,sourceFile:s,map:o,tokenContext:u})}function He(e){let t=[],r=0;for(let n of e.tokenContext.tokens){if(e.tokenContext.processedStarts.has(n.start))continue;let i=G(e.map,n.start);if(i===null)continue;let s=(e.context.languageService.getDefinitionAtPosition(e.fileName,i+1)??[]).find(u=>!$(e.projectRoot,u.fileName));if(!s){r++;continue}let a=_(s,e.symbolLookup,e.vueSymbolLookup,e.context,e.projectRoot);if(a===null){r++;continue}H(t,e.sourceReader,e.sourceInfo,e.sourceFile,n,a),e.tokenContext.processedStarts.add(n.start),Ue(t,e,n,i,a)}return{occurrences:t,skippedReferences:r}}function Ue(e,t,r,n,i){if(!((t.tokenContext.tokenTextCounts.get(r.text)??0)<=1))for(let o of Be(t.context.languageService,t.fileName,n+1,t.map,r,t.tokenContext.tokenByStart)){if(t.tokenContext.processedStarts.has(o))continue;let s=t.tokenContext.tokenByStart.get(o);s&&(H(e,t.sourceReader,t.sourceInfo,t.sourceFile,s,i),t.tokenContext.processedStarts.add(o))}}function H(e,t,r,n,i,o){let s=t.positionAt(r,i.start);e.push({sourceFile:n,sourceLine:s.line,sourceStartChar:s.character,sourceEndChar:s.character+i.text.length,symbolId:o})}function Ke(e){let t=new Map;for(let r of e)t.set(r.text,(t.get(r.text)??0)+1);return t}function Be(e,t,r,n,i,o){let s=e.getDocumentHighlights?.(t,r,[t])??[],a=[];for(let u of s)if(u.fileName===t)for(let c of u.highlightSpans){let l=Je(n,c.textSpan.start,o,i.text);l!==null&&a.push(l)}return a}function Je(e,t,r,n){let i=r.get(t);if(i?.text===n)return i.start;let o=R(e,t);if(o===null)return null;let s=r.get(o);return s?.text===n?s.start:null}export{St as a,Ct as b,Kt as c};
|
|
71
|
+
//# sourceMappingURL=chunk-KPHKX4LP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-CTCAF3YA.js";import{a as h}from"./chunk-MZ7APUFN.js";import{c as p}from"./chunk-JM72FNGA.js";import{readFileSync as f}from"fs";import{extname as y,join as d}from"path";function M(t,e,a={}){let{context:s=0}=a,r=L(e);if(r)return j(t,r.filePath,r.startLine,r.endLine,s);let l=h(t,e);return l?R(t,l,s):null}function L(t){let e=t.match(/^(.+\.\w+):(\d+)-(\d+)$/);return e?{filePath:e[1],startLine:parseInt(e[2],10),endLine:parseInt(e[3],10)}:null}function R(t,e,a){let s=t.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),r=d(t.config.projectRoot,e.relativePath),l;try{l=f(r,"utf-8")}catch{return null}let n=l.split(`
|
|
2
2
|
`),c=Math.max(0,e.startLine-a),i=Math.min(n.length-1,e.endLine+a),u=n.slice(c,i+1).join(`
|
|
3
3
|
`);return{symbol:e.symbol,shortName:p(e.symbol),relativePath:e.relativePath,startLine:c,endLine:i,language:s?.language??v(e.relativePath),source:u}}function j(t,e,a,s,r){let l=m(t,e);if(!l)return null;let n=t.get("SELECT relative_path, language FROM documents WHERE relative_path = ?",l);if(!n)return null;let c=d(t.config.projectRoot,n.relative_path),i;try{i=f(c,"utf-8")}catch{return null}let u=i.split(`
|
|
4
4
|
`),o=Math.max(0,a-1-r),g=Math.min(u.length-1,s-1+r),b=u.slice(o,g+1).join(`
|
|
5
5
|
`);return{symbol:`${n.relative_path}:${a}-${s}`,shortName:`${n.relative_path}:${a}-${s}`,relativePath:n.relative_path,startLine:o,endLine:g,language:n.language??v(n.relative_path),source:b}}function v(t){switch(y(t).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{M as a};
|
|
6
|
-
//# sourceMappingURL=chunk-
|
|
6
|
+
//# sourceMappingURL=chunk-LPLGJ4HO.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as I}from"./chunk-ICXVNWMI.js";import{a as H}from"./chunk-X7ZY6FFF.js";import{a as p}from"./chunk-FIB4JPEX.js";import{a as T}from"./chunk-YQH353VA.js";import{a as G}from"./chunk-3KLLFNT4.js";import{a as k}from"./chunk-EOZIZWW4.js";import{a as v,b as F}from"./chunk-4ZUJJRWT.js";import{b as A}from"./chunk-CNTEQMHA.js";import{b as P}from"./chunk-DRAZH77R.js";import{a as j}from"./chunk-ESG4HBEF.js";import{a as S}from"./chunk-CFL2CNIF.js";import{a as D}from"./chunk-Z4VHYJ5U.js";import{a as w}from"./chunk-TM6GVHA6.js";function X(t,e,n={}){let o=n.impactDepth??3,r=n.sliceDepth??3,l=n.semantic,s=!z(e),a=s?H(t,e,{semantic:l}):{definitions:[],referencedBy:[]},m=s?D(t,e,{semantic:l}):null,f=s?j(t,e,{semantic:l}):null,h=s?k(t,e,{semantic:l}):null,y=s?p(t,e,{direction:"backward",maxDepth:r,semantic:l}):null,R=s?p(t,e,{direction:"forward",maxDepth:r,semantic:l}):null,C=s?S(t,e,{maxDepth:o,scope:n.scope}):[],i=w(t,e,{semantic:l}),d=v(t,e),g=F(t,e),u=I(t,e),x=T(t,e),c={symbol:a.definitions.length>0||a.referencedBy.length>0||m!==null||f!==null||h!==null||y!==null||R!==null||C.length>0,file:i!==null||d.length>0||g.length>0,module:u.files.length>0||u.symbols.length>0||x.length>0},b=[];!c.symbol&&!c.file&&!c.module&&b.push("No symbol, file, or module matched target.");let B=i?.file??a.definitions[0]?.relativePath??null;return{target:e,matched:c,history:O(t,B),trace:a,callGraph:m,complexity:f,dataflow:h,backwardSlice:y,forwardSlice:R,affected:C,changeSurface:i,deps:d,rdeps:g,system:u,surface:x,warnings:b}}function O(t,e){let n={available:!1,file:e,churn:null,coChangePartners:[],suppressionsInFile:0};if(!e)return n;let o=P(t);if(!o)return n;let r=A(t,e,{limit:5});return{available:!0,file:e,churn:o.get(e)??{changes:0,fixChanges:0,lastChangedAt:0},coChangePartners:r.findings.map(l=>({file:l.fileA===e?l.fileB:l.fileA,together:l.together,confidence:l.confidence,subjectContext:l.subjectContext})),suppressionsInFile:G(t).byFile.get(e)??0}}function z(t){return t.includes("/")||t.includes("\\")||/\.[A-Za-z0-9]+(?::\d+(?:-\d+)?)?$/.test(t)}export{X as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MHK7Z53U.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as F,b as w,e as N,f as O}from"./chunk-3UVJJ6Z7.js";import{b as M}from"./chunk-B75HZHUP.js";import{a as R}from"./chunk-3ZYF3ELZ.js";import{a as I}from"./chunk-YTR4CO5S.js";import{a as T}from"./chunk-MZ7APUFN.js";import{c as d,d as E,g as A}from"./chunk-JM72FNGA.js";import{b as B}from"./chunk-D322LMSA.js";import{d as D}from"./chunk-7S5E7KWT.js";function Fe(e,i,n={}){let{minSimilarity:t=.4,limit:r=20}=n,l=ne(e,i,{semantic:n.semantic!==!1});if(!l)return[];if(!A(l.symbol))return[];let a=J(e,l,t,{scanLimit:n.scanLimit,semantic:n.semantic!==!1});return a.length>0?a.slice(0,r):ae(e,i,{minSimilarity:t,limit:r})}function J(e,i,n,t){let r=G(e,{minCallees:3,excludeSymbol:i.symbol,scanLimit:t.scanLimit,semantic:t.semantic}),l=N([i,...r].map(c=>c.callees)),a=[];for(let c of r){if(c.callees.size<3)continue;let s=j(i,c,l,{minSimilarity:n,requireSignificantShared:1,requireSharedCount:0});s&&a.push(s)}return a.sort((c,s)=>s.similarity-c.similarity),a}function j(e,i,n,t){let{similarity:r,significantShared:l}=O(e.callees,i.callees,n);if(r<t.minSimilarity)return null;let a=F(e.callees,i.callees).size;if(l.length<t.requireSignificantShared&&a<t.requireSharedCount)return null;let c=l.length>0?l:[...F(e.callees,i.callees)],s=K(c,"callees");return{symbolA:e.symbol,shortNameA:d(e.symbol),fileA:e.file,symbolB:i.symbol,shortNameB:d(i.symbol),fileB:i.file,similarity:r,similarityBasis:"callees",sharedCallees:c.map(d),uniqueToA:[...w(e.callees,i.callees)].map(d),uniqueToB:[...w(i.callees,e.callees)].map(d),...s}}function De(e,i={}){let{minSimilarity:n=.5,limit:t=20,scope:r,minCallees:l=4,crossFileOnly:a=!1,scanLimit:c}=i,s=G(e,{minCallees:l,scope:r,scanLimit:c,semantic:i.semantic!==!1}),o=N(s.map(m=>m.callees)),f=new Map;for(let m of s)for(let u of m.callees)f.set(u,(f.get(u)??0)+1);let b=Math.max(8,Math.ceil(Math.sqrt(s.length))),y=new Map;for(let m=0;m<s.length;m+=1)for(let u of s[m].callees){if((f.get(u)??0)>b)continue;let g=y.get(u);g||(g=[],y.set(u,g)),g.push(m)}let h=[],S=0,C=new Set;for(let m=0;m<s.length;m+=1){let u=s[m],g=new Set;for(let v of u.callees){let k=y.get(v);if(k)for(let p of k)p>m&&g.add(p)}for(let v of g){let k=`${m}|${v}`;if(C.has(k))continue;C.add(k);let p=s[v];if(a&&u.file===p.file)continue;if(u.paramCount>=0&&p.paramCount>=0){let X=Math.abs(u.paramCount-p.paramCount),Y=Math.max(2,Math.ceil(Math.max(u.paramCount,p.paramCount)*.5));if(X>Y)continue}let q=j(u,p,o,{minSimilarity:n,requireSignificantShared:2,requireSharedCount:4});q&&(ee(h,q,t,S),S+=1)}}return h.sort((m,u)=>u.result.similarity-m.result.similarity||m.order-u.order),h.map(m=>m.result)}function ee(e,i,n,t){if(n<=0)return;if(e.length<n){e.push({result:i,order:t});return}let r=0;for(let a=1;a<e.length;a+=1){let c=e[a],s=e[r];(c.result.similarity<s.result.similarity||c.result.similarity===s.result.similarity&&c.order>s.order)&&(r=a)}let l=e[r];i.similarity<=l.result.similarity||(e[r]={result:i,order:t})}var ie=["ScipDatabase#all","ScipDatabase#get","ScipDatabase#prepare","ScipDatabase#pathExclusionsFor","ScipDatabase#isIgnored","ScipDatabase#symbolNoiseFor","PerDbValue#get","PerDbValue#has",":storage:db:ScipDatabase:all",":storage:db:ScipDatabase:get",":storage:db:ScipDatabase:prepare",":storage:db:ScipDatabase:pathExclusionsFor",":storage:db:ScipDatabase:isIgnored",":storage:db:ScipDatabase:symbolNoiseFor",":storage:per-db-cache:PerDbValue:get",":storage:per-db-cache:PerDbValue:has"];function ne(e,i,n){let t=T(e,i),r=new R(e);if(!t)return null;let l=I(e,t,{semantic:n.semantic});return{symbol:t.symbol,file:t.relativePath,callees:U(l.map(a=>a.symbol)),paramCount:r.callableSignature(t)?.paramCount??-1}}var te=D("callee-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]});function G(e,i){let{minCallees:n,scope:t,excludeSymbol:r,scanLimit:l}=i,a=i.semantic!==!1,c=te.get(e,()=>new Map),s=`${n}|${t??""}|${l??""}|${a}`,o=c.get(s);return o||(o=re(e,{minCallees:n,scope:t,scanLimit:l,semantic:a}),c.set(s,o)),r===void 0?o:o.filter(f=>f.symbol!==r)}function re(e,i){let{minCallees:n,scope:t,scanLimit:r,semantic:l}=i,a=new R(e),c=M(a.productionCallableDefinitions({scope:t,minLoc:5,sortByLocDesc:typeof r=="number"&&r>0}),r),s=a.calleeMap(c,{semantic:l});return c.map(o=>({symbol:o.symbol,file:o.relativePath,callees:U((s.get(o.symbolId)??[]).map(f=>f.symbol)),paramCount:a.callableSignature(o)?.paramCount??-1})).filter(o=>o.callees.size>=n)}function U(e){return new Set([...e].filter(i=>!se(i)))}function se(e){return ie.some(i=>e.includes(i))}function ae(e,i,n){let t=me(e,i);if(!t||t.tokens.size<3)return[];let r=n.minSimilarity>=.5?n.minSimilarity:.3,l=[],a=new Set,c=pe(ge(e));for(let s of t.tokens)for(let o of c.get(s)??[])a.add(o);for(let s of a){if(s.symbol===t.symbol||s.tokens.size<3)continue;let o=F(t.tokens,s.tokens);if(o.size<2)continue;let f=new Set([...t.tokens,...s.tokens]),b=f.size>0?o.size/f.size:0;b<r||l.push({symbolA:t.symbol,shortNameA:d(t.symbol),fileA:t.file,symbolB:s.symbol,shortNameB:d(s.symbol),fileB:s.file,similarity:b,similarityBasis:"source-tokens",sharedCallees:[...o].sort(),uniqueToA:[...w(t.tokens,s.tokens)].sort(),uniqueToB:[...w(s.tokens,t.tokens)].sort(),...K([...o],"source-tokens")})}return l.sort((s,o)=>o.similarity-s.similarity||s.shortNameB.localeCompare(o.shortNameB)),l.slice(0,n.limit)}function K(e,i){let n=e.flatMap(z),t=e.flatMap(m=>_(m,i)),r=L(n,V),l=L(n,Z),a=L(t,$),c=[...new Set(t.filter(P))],s=e.filter(m=>{let u=_(m,i);return u.some(g=>$.has(g))&&u.some(P)}).length,o=[];r.length>0&&o.push(`access/query scaffolding: ${r.slice(0,5).join(", ")}`),l.length>0&&o.push(`framework/generic scaffolding: ${l.slice(0,5).join(", ")}`),a.length>0&&o.push(`domain behavior verbs: ${a.slice(0,5).join(", ")}`),a.length>0&&c.length>0&&o.push(`domain-specific terms: ${c.slice(0,5).join(", ")}`);let f=i==="source-tokens"&&n.length>0&&n.every(m=>H.has(m));f&&o.push("shared source tokens are generic scaffolding");let b=a.length>0&&c.length>0,y=r.length+l.length>0,h=i==="callees"&&b&&e.length>=4&&c.length>=4&&s>=2,S=h?"domain-behavior":b?y?"mixed":"domain-behavior":r.length>0?"access-query-scaffolding":l.length>0||f?"framework-scaffolding":"structural-overlap";S==="structural-overlap"&&e.length>0&&o.push(`shared ${i} overlap has no recognized domain or scaffolding category`);let C=S==="domain-behavior"&&(e.length>=3||h)?"direct":"signal";return{evidenceClass:S,actionTier:C,evidenceClassReasons:o,recommendation:oe(S,C)}}function oe(e,i){return i==="direct"?"Shared domain behavior looks concrete; review for an extract/reuse opportunity.":e==="mixed"?"Shared evidence mixes domain behavior with scaffolding; review semantics before extracting anything.":e==="access-query-scaffolding"?"Shared evidence is mostly access/query scaffolding; compare product semantics before reusing code.":e==="structural-overlap"?"Shared structure has no domain or scaffolding classification; inspect names and behavior before reusing code.":"Shared evidence is mostly framework or generic scaffolding; treat as a contextual signal."}function L(e,i){return[...new Set(e.filter(n=>i.has(n)))]}function z(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(i=>i.length>1)}function _(e,i){if(i==="source-tokens")return z(e);let n=E(e);return z(n.length>0?n:le(e))}function le(e){return e.replace(/[()`]/g," ").replace(/\.[a-z][a-z0-9]+(?=\s|$)/gi," ").split(/[:/\\\s]+/).map(t=>t.trim()).filter(t=>/[A-Za-z]/.test(t)).at(-1)?.replace(/\.$/,"")??e}function P(e){return e.length>3&&!$.has(e)&&!V.has(e)&&!Z.has(e)&&!H.has(e)&&!ce.has(e)}var $=new Set(["archive","assign","book","cancel","create","delete","ensure","export","import","notify","persist","publish","restore","schedule","send","set","submit","sync","update","upload","validate","write"]),V=new Set(["access","auth","authorize","cache","context","db","find","get","guard","list","permission","permissions","prisma","query","request","response","role","route","session","sql","where"]),Z=new Set(["bytes","computed","crypto","describe","effect","expect","fetch","filter","hex","hook","json","map","mounted","on","promise","random","react","reduce","ref","render","state","test","token","trim","uuid","vue","watch"]),H=new Set(["bytes","crypto","data","false","get","hex","id","key","map","name","num","random","result","secret","set","string","to","token","true","type","value"]),ce=new Set(["best","backend","conflict","database","effect","effects","error","errors","frontend","found","helpers","javascript","module","modules","scip","shared","source","typescript","utils","with","workflow","workflows"]);function me(e,i){let n=T(e,i);if(!n||!A(n.symbol))return null;let t=ue(e,n);return t?{symbol:n.symbol,file:n.relativePath,tokens:t}:null}function ue(e,i){let n=E(i.symbol),t=W(e,i.relativePath,i.startLine,i.endLine,n),r=Q(t,n);return r.size>0?r:null}var fe=D("source-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]});function ge(e){return fe.get(e,()=>de(e))}function pe(e){let i=new Map;for(let n of e)for(let t of n.tokens){let r=i.get(t);r||(r=[],i.set(t,r)),r.push(n)}return i}function de(e){return new R(e).productionCallableDefinitions().map(n=>({symbol:n.symbol,file:n.relativePath,tokens:Q(W(e,n.relativePath,n.startLine,n.endLine,n.leaf),n.leaf)})).filter(n=>n.tokens.size>0)}function W(e,i,n,t,r){let l=B(e,i);if(l.length===0)return"";if(t>=n&&t-n<=12)return l.slice(n,t+1).join(`
|
|
2
|
+
`);let a=[new RegExp(`\\bdef\\s+${x(r)}\\b`),new RegExp(`\\bfun\\s+${x(r)}\\b`),new RegExp(`\\bfn\\s+${x(r)}\\b`),new RegExp(`\\bfunction\\s+${x(r)}\\b`),new RegExp(`\\b${x(r)}\\s*\\(`)],c=l.findIndex(s=>a.some(o=>o.test(s)));if(c>=0){let s=c;for(let o=c+1;o<l.length&&o<=c+8;o++){let f=l[o]??"";if(o>c&&Se(f)||(s=o,f.trim()===""&&o>c+1))break}return l.slice(c,s+1).join(`
|
|
3
|
+
`)}return l.slice(n,Math.min(l.length,n+8)).join(`
|
|
4
|
+
`)}function Q(e,i){if(!e)return new Set;let n=new Set(["public","private","protected","final","static","class","def","fun","fn","function","return","string","bool","boolean","void","unit","self","this","new","const","let","var","end","pub"]),t=be(i),l=e.replace(/["'`]/g," ").replace(/\b\d+\b/g," NUM ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[^A-Za-z0-9_]+/g," ").replace(/_/g," ").toLowerCase().split(/\s+/).map(a=>a.trim()).filter(a=>a.length>1).filter(a=>!n.has(a)).filter(a=>!t.has(a));return new Set(l)}function be(e){return new Set(e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9_]+|_/).map(i=>i.toLowerCase()).filter(i=>i.length>1))}function Se(e){return/^\s*(?:def|fun|fn|function|class|trait|module|object|enum|interface|public|private|protected)\b/.test(e)}function x(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{Fe as a,De as b,ee as c,G as d,U as e,K as f};
|
|
5
|
+
//# sourceMappingURL=chunk-MHTDOFV7.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as p}from"./chunk-B75HZHUP.js";import{a as b}from"./chunk-3ZYF3ELZ.js";import{a as f}from"./chunk-GZCQTZLK.js";import{a as c}from"./chunk-YTR4CO5S.js";import{c as m}from"./chunk-JM72FNGA.js";function k(o,n={}){let{limit:s=20,scope:i,minFanIn:r=2,minFanOut:a=2,scanLimit:e}=n,u=new b(o);return p(u.productionCallableDefinitions({scope:i,requireCallableSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof e=="number"&&e>0}),e).map(t=>d(o,t,n.semantic!==!1)).filter(t=>t.fanIn>=r&&t.fanOut>=a).sort((t,l)=>l.score-t.score||l.fanIn-t.fanIn).slice(0,s)}function d(o,n,s){let i=new Set(f(o,n,{limit:500,semantic:s}).map(e=>e.file)).size,r=new Set(c(o,n,{limit:500,semantic:s}).filter(e=>e.file!==n.relativePath).map(e=>`${e.symbol}|${e.file}`)).size,a=i*r;return{symbol:n.symbol,shortName:m(n.symbol),fanIn:i,fanOut:r,score:a,definedIn:n.relativePath,actionTier:"signal",riskKind:"coordination-hotspot",evidenceReasons:[`${i} incoming file(s) reference this symbol`,`${r} distinct cross-file callee symbol(s) are reached from it`,`centrality score is ${a} (fan-in * fan-out)`],recommendation:"Review ownership, API stability, and caller groups before changing this central symbol; do not refactor solely from graph centrality."}}export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MUULWXSJ.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as y,b as d,e as w,l as f}from"./chunk-3UW7VM4H.js";import{b as D,c as $,d as Q,f as v,g as A,h as N}from"./chunk-JM72FNGA.js";function re(e,n){let t=Z(e,n.trim());if(t)return t;let i=q(e,n);if(i)return i;let o=F(e,n);return o||j(e,n)}function F(e,n){let t=x(n),i=I(t);if(!i)return null;let o=`%${i.path}%`,r=i.leaf,c=O(e,o,r,t)[0];return c?f(e,c):null}function O(e,n,t,i){let o=w([],[...z(e,n,t),...W(e,n,t)]).filter(r=>!e.isIgnored(r.relative_path)).filter(r=>h(r,i)>1);return o.sort((r,a)=>h(a,i)-h(r,i)||r.end_line-r.start_line-(a.end_line-a.start_line)||r.start_line-a.start_line||r.symbol.localeCompare(a.symbol)),o}function z(e,n,t){return y(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function W(e,n,t){return d(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function j(e,n){let t=x(n),i=U(n),o=H(e,i),r=V(o,n,t);if(r&&!e.isIgnored(r.relative_path))return f(e,r);let a=null;for(let c of o){if(e.isIgnored(c.relative_path))continue;let l=J(c,n,t,i);l<=0||(!a||l>a.score)&&(a={row:c,score:l})}return a?f(e,a.row):null}function q(e,n){let t=n.match(/^(.+):(\d+)-(\d+)$/);if(!t)return null;let[,i,o,r]=t,a=Math.max(0,parseInt(o,10)-1),c=Math.max(a,parseInt(r,10)-1),l=T(e,i,a,c)??X(e,i,a,c);return l&&!e.isIgnored(l.relative_path)?f(e,l):null}function T(e,n,t,i){return y(e,{where:"d.relative_path LIKE ? AND der.start_line <= ? AND der.end_line >= ?",params:[`%${n}%`,t,i],orderBy:"(der.end_line - der.start_line) ASC",limit:1})[0]}function X(e,n,t,i){return d(e,{where:"d.relative_path LIKE ? AND c.start_line <= ? AND c.end_line >= ?",params:[`%${n}%`,t,i],orderBy:"(MAX(c.end_line) - MIN(c.start_line)) ASC",limit:1})[0]}function Z(e,n){let i=y(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, der.start_line",limit:1})[0]??d(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, start_line",limit:1})[0];return!i||e.isIgnored(i.relative_path)?null:f(e,i)}function ae(e,n){if("symbol"in n&&"relativePath"in n)return n;let t=G(e,n.symbolId)[0];return t?f(e,t):null}function G(e,n){let t=y(e,{where:"gs.id = ?",params:[n],orderBy:"der.start_line, der.end_line"}),i=d(e,{where:"gs.id = ?",params:[n],orderBy:"start_line, end_line"});return w(t,i)}function H(e,n){let t=n.map(()=>"(gs.symbol LIKE ? OR d.relative_path LIKE ? OR COALESCE(gs.display_name, '') LIKE ?)"),i=n.flatMap(c=>{let l=`%${c}%`;return[l,l,l]}),o=t.join(`
|
|
2
|
+
AND `),r=y(e,{where:o,params:i,limit:200}),a=d(e,{where:o,params:i,limit:200});return w(r,a)}function J(e,n,t,i){let o=n.trim(),r=t,a=r.replace(/\(\)$/,""),c=n.toLowerCase(),l=t.toLowerCase(),S=l.replace(/\(\)$/,""),k=e.symbol,C=$(e.symbol),b=Q(e.symbol),E=e.display_name??"",g=e.symbol.toLowerCase(),u=C.toLowerCase(),m=b.toLowerCase(),R=E.toLowerCase(),p=e.relative_path.toLowerCase(),K=/[/:.]/.test(t),M=I(t),_=M?.leaf.toLowerCase(),s=0;return(k===o||k===r)&&(s+=1150),(C===o||C===r)&&(s+=1100),E===a&&(s+=1180),b===a&&(s+=1160),(`${b}()`===o||`${b}()`===r)&&(s+=955),(g===c||g===l)&&(s+=1e3),(u===c||u===l)&&(s+=950),(p===c||p===l)&&(s+=925),(p.endsWith(`/${l}`)||p.endsWith(`/${c}`))&&(s+=875),R===S&&(s+=850),m===S&&(s+=825),(`${m}()`===c||`${m}()`===l)&&(s+=820),(u.endsWith(`:${l}`)||u.endsWith(`:${S}`)||u.endsWith(`:${S}()`))&&(s+=800),g.includes(l)&&(s+=120),u.includes(l)&&(s+=140),p.includes(l)&&(s+=140),R.includes(l)&&(s+=110),i.every(B=>{let L=B.toLowerCase();return g.includes(L)||u.includes(L)||p.includes(L)||R.includes(L)})&&(s+=100+i.length*15),M&&p.includes(M.path.toLowerCase())&&(s+=360,_&&(m===_||`${m}()`===_||`${m}()`==`${_}()`)&&(s+=700),v(e.symbol)&&(s+=180)),A(e.symbol)&&m===S&&(s+=60),!K&&N(e.symbol)&&(s-=160),s-=Math.min(50,Math.max(0,e.end_line-e.start_line)),s}function I(e){let n=e.trim().replace(/\\/g,"/"),t=n.lastIndexOf("/");if(t<=0||t===n.length-1)return null;let i=n.slice(t+1).replace(/\(\)$/,"");return!i||i.includes(".")?null:{path:n.slice(0,t),leaf:i}}function x(e){return e.trim().replace(/\(\)$/,"").replace(/\(.*$/,"")}function U(e){let n=x(e),t=n.split(/[^A-Za-z0-9_]+/).map(i=>i.trim()).filter(i=>i.length>0);return t.length>0?[...new Set(t)]:[n]}function V(e,n,t){let i=n.trim(),o=e.filter(r=>{let a=$(r.symbol),c=(r.display_name??"").trim();return r.symbol===i||a===i||a===t||c===i||c===t||`${c}()`===i||h(r,t)>1||r.relative_path===i});return o.length===0?null:(o.sort((r,a)=>h(a,t)-h(r,t)||r.end_line-r.start_line-(a.end_line-a.start_line)||r.relative_path.localeCompare(a.relative_path)||r.symbol.localeCompare(a.symbol)),o[0]??null)}function h(e,n){let t=I(n);if(!t)return 0;let i=e.relative_path.toLowerCase(),o=Q(e.symbol).toLowerCase(),r=t.path.toLowerCase(),a=t.leaf.toLowerCase();return i.includes(r)?o!==a?1:v(e.symbol)?D(e.symbol)===null?5:4:D(e.symbol)===null?3:2:0}export{re as a,Z as b,ae as c};
|
|
3
|
+
//# sourceMappingURL=chunk-MZ7APUFN.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as b}from"./chunk-PFOCOG57.js";import{a as g}from"./chunk-3ZYF3ELZ.js";import{a as d}from"./chunk-HVTYSC26.js";import{c as p}from"./chunk-JM72FNGA.js";import{a as c}from"./chunk-QLNGUWR7.js";import{a as o}from"./chunk-EWC3UK4V.js";function T(t,r={}){let{scope:l,limit:s=30,scanLimit:f}=r,u=r.files===void 0?null:new Set(r.files),L=new g(t);return b({candidates:()=>L.productionCallableDefinitions({scope:l,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}).filter(e=>h(e.relativePath)&&(u===null||u.has(e.relativePath))),scanLimit:f,evaluate:e=>{let n=c(t,e.relativePath)?.callables.find(a=>a.startLine===e.startLine&&a.endLine===e.endLine);if(!n||n.params.length===0||n.params.some(a=>!a.simple)||n.paramsEndLine>=n.endLine)return null;let y=d(t,e.relativePath),m=[];for(let a=n.params.length-1;a>=0;a--){let i=n.params[a];if(i.name===""||i.name.startsWith("_")||P(y.get(i.name),n.paramsEndLine,n.endLine))break;m.unshift(i.name)}return m.length===0?null:{symbol:e.symbol,shortName:p(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:n.paramCount,unusedTrailing:m}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:s})}function h(t){let r=o(t);return r==="typescript"||r==="tsx"||r==="javascript"}function P(t,r,l){return t?t.some(s=>s>r&&s<=l):!1}export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NNDYO2DX.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{a as S}from"./chunk-3ZYF3ELZ.js";import{e as b}from"./chunk-FUPDW5AC.js";import{c as p,f as h,h as y}from"./chunk-JM72FNGA.js";import{execFileSync as d}from"child_process";import{existsSync as x,readFileSync as N}from"fs";import{basename as C}from"path";var v="Unable to compute git diff.";function le(e,n={}){let t=n.plan??P(e,n);return t.note?A(t.note,t.changedFileLines):t.changedFiles.length===0?O(t.changedFileLines):T(t.changedFiles,[E(e,t.changedFiles,t.changedFiles,t.changedRanges)])}function P(e,n={}){let{base:t="HEAD"}=n;try{let i=$(e.config.projectRoot,t),r=J(e,i),s=G(e,k(e.config.projectRoot,t));return{changedFileLines:i,changedFiles:r,changedRanges:s,renamedFiles:B(e.config.projectRoot,t,r),note:i.length===0?"No changed files found.":void 0}}catch{return{changedFileLines:[],changedFiles:[],changedRanges:[],renamedFiles:[],note:v}}}function E(e,n,t,i=[]){let r=new S(e),s=new Set(t),a=q(i),l=[],m=new Map,f=n.flatMap(o=>r.definitionsForFile(o)).filter(ee).filter(o=>V(o,a)).sort((o,u)=>o.relativePath.localeCompare(u.relativePath)||o.startLine-u.startLine),c=f.map(o=>o.symbolId),g=K(e,c),w=Q(e,c,t),M=b(e,f.filter(o=>g.get(o.symbolId)===0));for(let o of f)j(e,o,s,l,m,M.get(o.symbolId)??new Set,g.get(o.symbolId)??0,w.get(o.symbolId)??new Set);return{changedSymbols:l,consumerEntries:[...m.entries()].map(([o,u])=>({file:o,symbols:[...u].sort()}))}}function T(e,n){let t=new Map,i=n.flatMap(s=>s.changedSymbols);for(let s of n)for(let a of s.consumerEntries){let l=t.get(a.file);l||(l=new Set,t.set(a.file,l));for(let m of a.symbols)l.add(m)}let r=X(t);return{changedFiles:[...e],changedSymbols:i,affectedConsumers:r,summary:{totalChangedFiles:e.length,totalChangedSymbols:i.length,totalAffectedFiles:r.length}}}function A(e,n=[]){return{changedFiles:n,changedSymbols:[],affectedConsumers:[],summary:{totalChangedFiles:n.length,totalChangedSymbols:0,totalAffectedFiles:0,note:e}}}function O(e){return{changedFiles:e,changedSymbols:[],affectedConsumers:[],summary:{totalChangedFiles:e.length,totalChangedSymbols:0,totalAffectedFiles:0,note:"Changed files are not present in the current SCIP index."}}}function $(e,n){let t=d("git",["diff","--name-only",n],{encoding:"utf-8",cwd:e,timeout:1e4}),i=d("git",["diff","--name-only","--cached",n],{encoding:"utf-8",cwd:e,timeout:1e4}),r=d("git",["ls-files","--others","--exclude-standard"],{encoding:"utf-8",cwd:e,timeout:1e4});return[...new Set([t,i,r].flatMap(s=>s.split(`
|
|
2
|
+
`)).map(s=>s.trim()).filter(s=>s.length>0))]}function k(e,n){let t=d("git",["diff","--unified=0",n],{encoding:"utf-8",cwd:e,timeout:1e4}),i=d("git",["diff","--unified=0","--cached",n],{encoding:"utf-8",cwd:e,timeout:1e4});return _([...L(t),...L(i)])}function z(e,n,t){try{return d("git",["show",`${n}:./${t}`],{encoding:"utf-8",cwd:e,timeout:1e4,stdio:["ignore","pipe","ignore"]})}catch{return null}}function B(e,n,t){if(t.length===0)return[];let i=new Map,r=new Set;for(let a of U(e,n))t.includes(a.to)&&(i.set(a.to,a),r.add(a.from));let s=W(e,n);if(s.length===0)return[...i.values()].sort((a,l)=>a.to.localeCompare(l.to));for(let a of t){if(i.has(a)||!x(`${e}/${a}`))continue;let l=s.filter(c=>!r.has(c)).filter(c=>C(c)===C(a));if(l.length===0)continue;let m=N(`${e}/${a}`,"utf-8"),f=l.map(c=>({from:c,to:a,similarity:H(z(e,n,c)??"",m)})).sort((c,g)=>g.similarity-c.similarity)[0];f&&f.similarity>=.45&&(i.set(a,f),r.add(f.from))}return[...i.values()].sort((a,l)=>a.to.localeCompare(l.to))}function W(e,n){let t=d("git",["diff","--name-only","--diff-filter=D",n],{encoding:"utf-8",cwd:e,timeout:1e4}),i=d("git",["diff","--name-only","--diff-filter=D","--cached",n],{encoding:"utf-8",cwd:e,timeout:1e4});return[...new Set([...R(t),...R(i)])]}function U(e,n){let t=d("git",["diff","--name-status","--find-renames",n],{encoding:"utf-8",cwd:e,timeout:1e4}),i=d("git",["diff","--name-status","--find-renames","--cached",n],{encoding:"utf-8",cwd:e,timeout:1e4});return[...t.split(`
|
|
3
|
+
`),...i.split(`
|
|
4
|
+
`)].map(r=>r.trim()).filter(r=>r.startsWith("R")).map(r=>r.split(" ")).filter(r=>r.length>=3).map(([r,s,a])=>({from:s,to:a,similarity:Number(r.slice(1))/100}))}function H(e,n){let t=new Set(I(e)),i=new Set(I(n));if(t.size===0&&i.size===0)return 1;if(t.size===0||i.size===0)return 0;let r=0;for(let s of t)i.has(s)&&(r+=1);return 2*r/(t.size+i.size)}function I(e){return e.match(/[A-Za-z_$][\w$]*|[{}()[\].,]/g)??[]}function R(e){return e.split(`
|
|
5
|
+
`).map(n=>n.trim()).filter(n=>n.length>0)}function J(e,n){let t=F(e),i=[];for(let r of n){let s=t(r);s&&!e.isIgnored(s)&&i.push(s)}return i}function G(e,n){let t=F(e),i=[];for(let r of n){let s=t(r.file);s&&!e.isIgnored(s)&&i.push({...r,file:s})}return _(i)}function F(e){let n=e.all(`SELECT relative_path FROM documents
|
|
6
|
+
ORDER BY id`).map(i=>i.relative_path),t=new Map(n.map(i=>[i,i]));return i=>{let r=i.replace(/\\/g,"/"),s=t.get(r);return s||(n.find(a=>a.endsWith(r))??null)}}function L(e){let n=[],t=null;for(let i of e.split(`
|
|
7
|
+
`)){if(i.startsWith("+++ ")){t=Y(i.slice(4).trim());continue}if(!t||!i.startsWith("@@ "))continue;let r=/@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@/.exec(i);if(!r)continue;let s=Math.max(0,Number(r[1])-1),a=r[2]===void 0?1:Number(r[2]);n.push({file:t,startLine:s,endLine:Math.max(s,s+Math.max(a,1)-1)})}return n}function Y(e){return e==="/dev/null"?null:e.startsWith("a/")||e.startsWith("b/")?e.slice(2):e}function _(e){let n=new Set,t=[];for(let i of e){let r=`${i.file}:${i.startLine}:${i.endLine}`;n.has(r)||(n.add(r),t.push(i))}return t}function q(e){let n=new Map;for(let t of e){let i=n.get(t.file);i||(i=[],n.set(t.file,i)),i.push(t)}return n}function V(e,n){let t=n.get(e.relativePath);return!t||t.length===0?!0:t.some(i=>Z(e.startLine,e.endLine,i.startLine,i.endLine))}function Z(e,n,t,i){return e<=i&&t<=n}function j(e,n,t,i,r,s,a,l){let m=Math.max(a,s.size);if(!ne(n,m))return;let f=p(n.symbol);i.push({symbol:n.symbol,shortName:f,file:n.relativePath,startLine:n.startLine,endLine:n.endLine,fanIn:m});for(let c of l)D(e,t,r,c,f);for(let c of s)D(e,t,r,c,f)}function K(e,n){if(n.length===0)return new Map;let t=e.all(`SELECT m.symbol_id, COUNT(DISTINCT c.document_id) AS fan_in
|
|
8
|
+
FROM mentions m
|
|
9
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
10
|
+
WHERE m.symbol_id IN (${n.map(()=>"?").join(",")})
|
|
11
|
+
AND m.role != 1
|
|
12
|
+
GROUP BY m.symbol_id`,...n);return new Map(t.map(i=>[i.symbol_id,i.fan_in]))}function Q(e,n,t){if(n.length===0||t.length===0)return new Map;let i=e.all(`SELECT DISTINCT m.symbol_id, ref_d.relative_path
|
|
13
|
+
FROM mentions m
|
|
14
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
15
|
+
JOIN documents ref_d ON c.document_id = ref_d.id
|
|
16
|
+
WHERE m.symbol_id IN (${n.map(()=>"?").join(",")})
|
|
17
|
+
AND m.role != 1
|
|
18
|
+
AND ref_d.relative_path NOT IN (${t.map(()=>"?").join(",")})
|
|
19
|
+
${e.pathExclusionsFor("ref_d")}`,...n,...t),r=new Map;for(let s of i){let a=r.get(s.symbol_id);a||(a=new Set,r.set(s.symbol_id,a)),a.add(s.relative_path)}return r}function D(e,n,t,i,r){if(e.isIgnored(i)||n.has(i))return;let s=t.get(i);s||(s=new Set,t.set(i,s)),s.add(r)}function X(e){return[...e.entries()].map(([n,t])=>({file:n,consumedSymbols:t.size})).sort((n,t)=>t.consumedSymbols-n.consumedSymbols)}function ee(e){return!(y(e.symbol)||e.parentTypeName!==null&&!h(e.symbol))}function ne(e,n){return h(e.symbol)||e.isTypeLike?!0:e.parentTypeName===null&&n>0}export{v as a,le as b,P as c,E as d,T as e,z as f};
|
|
20
|
+
//# sourceMappingURL=chunk-NP5HYVLX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-3ZYF3ELZ.js";import{a as i}from"./chunk-MZ7APUFN.js";import{c as s,e as o,k as m}from"./chunk-JM72FNGA.js";function L(t,l){let r=i(t,l);return r?new a(t).definitionsForFile(r.relativePath).filter(e=>e.symbol!==r.symbol).filter(e=>m(r.symbol,e.symbol)).sort((e,n)=>e.startLine-n.startLine||e.endLine-n.endLine).map(e=>({symbol:e.symbol,shortName:s(e.symbol),startLine:e.startLine,endLine:e.endLine,kind:o(e.symbol)??"unknown"})):[]}export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NVFERV4U.js.map
|
|
@@ -2,4 +2,4 @@ import{execFileSync as p}from"child_process";import{platform as u}from"os";var g
|
|
|
2
2
|
`),console.log("Or download manually:")):console.log("Download from:"),console.log(e?` ${e.url}
|
|
3
3
|
`:` https://github.com/sourcegraph/scip/releases/tag/${a}
|
|
4
4
|
`),console.log("After installing, ensure `scip` is on your PATH and run `scip-query reindex`.")}function $(e){if(l()==="darwin"&&n("brew")){e("Installing scip CLI via Homebrew...");try{if(t("brew",["install","sourcegraph/scip/scip"],{stdio:"inherit",timeout:3e5,env:process.env}),n("scip"))return e("Successfully installed scip CLI via Homebrew"),!0}catch(r){let i=r instanceof Error?r.message:String(r);e(`Homebrew install failed: ${i}`)}}if(n("go")){e("Installing scip CLI via go install...");try{if(t("go",["install","github.com/sourcegraph/scip/cmd/scip@latest"],{stdio:"inherit",timeout:3e5,env:process.env}),n("scip"))return e("Successfully installed scip CLI via go install"),!0}catch(r){let i=r instanceof Error?r.message:String(r);e(`go install failed: ${i}`)}}return e("Could not auto-install scip CLI."),e("Install manually from: https://github.com/sourcegraph/scip/releases"),!1}export{n as a,x as b,C as c,S as d,$ as e};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-NXIAHE7F.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as l}from"./chunk-ERHOS6AW.js";function v(e,t={}){let{minTotalLines:n=800,minTemplateLines:i=300,minScriptLines:a=300,minStyleLines:r=500,limit:o=20,scope:m,scanLimit:p,filePattern:u}=t;return l(e,{scope:m,scanLimit:p}).filter(s=>!u||s.file.includes(u)).map(s=>L(s,{minTotalLines:n,minTemplateLines:i,minScriptLines:a,minStyleLines:r})).filter(s=>s!==null).sort((s,c)=>c.totalLines-s.totalLines||s.file.localeCompare(c.file)).slice(0,o)}function L(e,t){let n=[];if(e.totalLines>=t.minTotalLines&&n.push(`${e.totalLines} total component line(s)`),e.templateLines>=t.minTemplateLines&&n.push(`${e.templateLines} template line(s)`),e.scriptLines>=t.minScriptLines&&n.push(`${e.scriptLines} script line(s)`),e.styleLines>=t.minStyleLines&&n.push(`${e.styleLines} style line(s)`),n.length===0)return null;let i=b(e),a=g(e,t,i),r=x(e.file),o=V(i,r);return{file:e.file,totalLines:e.totalLines,sfcLines:e.sfcLines,templateLines:e.templateLines,scriptLines:e.scriptLines,styleLines:e.styleLines,externalScriptLines:e.externalScriptLines,externalScriptPaths:e.externalScriptPaths,customBlockLines:e.customBlockLines,dominantPressure:i,pressureKinds:a,contextKind:r,recommendationKind:o,recommendation:d(o,r),reasons:n,loc:e.totalLines}}function b(e){let t=[{axis:"template",lines:e.templateLines},{axis:"script",lines:e.scriptLines-e.externalScriptLines},{axis:"style",lines:e.styleLines},{axis:"external-script",lines:e.externalScriptLines},{axis:"custom-block",lines:e.customBlockLines}];return t.sort((n,i)=>i.lines-n.lines),t[0]?.lines?t[0].axis:"total"}function g(e,t,n){let i=[];return e.totalLines>=t.minTotalLines&&(i.push("total"),n!=="total"&&i.push(n)),e.templateLines>=t.minTemplateLines&&i.push("template"),e.scriptLines>=t.minScriptLines&&i.push("script"),e.styleLines>=t.minStyleLines&&i.push("style"),(e.externalScriptLines>=t.minScriptLines||n==="external-script")&&i.push("external-script"),e.customBlockLines>0&&n==="custom-block"&&i.push("custom-block"),[...new Set(i.length>0?i:[n])]}function x(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).some(i=>w.has(i))||/(?:view|page|route)\.vue$/i.test(e)||/(?:^|\/)(views|pages|routes)\//i.test(e)?"route-page":"component"}function V(e,t){return e==="style"?"style-decomposition":e==="template"?"template-decomposition":e==="external-script"?"external-script-boundary":e==="custom-block"?"custom-block-review":t==="route-page"?"route-page-decomposition":e==="script"?"script-behavior-extraction":"total-size-review"}function d(e,t){switch(e){case"template-decomposition":return t==="route-page"?"Split route template sections into named panels before extracting script behavior.":"Split repeated template sections into named presentational components.";case"script-behavior-extraction":return"Extract independent script behavior into composables, controllers, or feature modules.";case"style-decomposition":return"Review UI/style decomposition; move repeated styling to component or style primitives, not composables.";case"external-script-boundary":return"Review the external script boundary and split controller/composable modules by workflow.";case"custom-block-review":return"Review custom block ownership before splitting template or script code.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"total-size-review":return"Review the largest block first, then split by the dominant reason to change."}}var w=new Set(["landing","page","pages","route","routes","view","views"]);export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-O3OKSF6O.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as V}from"./chunk-PVZMPG5I.js";import{a as v,b,c as R}from"./chunk-3UVJJ6Z7.js";import{c as B}from"./chunk-ERHOS6AW.js";function L(e,s={}){let{minSimilarity:i=.45,minSharedBehaviors:t=6,limit:n=20,scope:a,scanLimit:l,filePattern:c}=s,h=B(e,{scope:a,minBehaviorTokens:Math.max(3,t),scanLimit:l}).map(o=>({file:o.file,tokens:o.behaviorTokens,profile:o}));return V({profiles:h,limit:n,filePattern:c,compare:(o,r)=>w(o,r,i,t),sort:(o,r)=>r.similarity-o.similarity||o.fileA.localeCompare(r.fileA)||o.fileB.localeCompare(r.fileB)})}function w(e,s,i,t){let n=v(e.tokens,s.tokens);if(n.size<t||!q(n))return null;let a=P(e.tokens,s.tokens);if(a<i)return null;let l=d(n,"composable:"),c=d(n,"store:"),h=d(n,"reactivity:"),o=d(n,"lifecycle:"),r=d(n,"request:"),f=d(n,"function:"),g=d(n,"function-verb:"),p=d(n,"template-binding:"),C=d(n,"template-event:"),m=k({sharedComposables:l,sharedStores:c,sharedReactivity:h,sharedLifecycle:o,sharedRequests:r,sharedFunctions:f,sharedFunctionVerbs:g,sharedBindings:p,sharedTemplateEvents:C});return{fileA:e.file,fileB:s.file,similarity:a,sharedTokens:y(n),sharedComposables:l,sharedStores:c,sharedReactivity:h,sharedLifecycle:o,sharedRequests:r,sharedFunctions:f,sharedFunctionVerbs:g,sharedBindings:p,sharedTemplateEvents:C,evidenceClass:m.evidenceClass,actionTier:m.actionTier,evidenceClassReasons:m.reasons,recommendation:m.recommendation,uniqueToA:y(b(e.tokens,s.tokens)).slice(0,25),uniqueToB:y(b(s.tokens,e.tokens)).slice(0,25),reason:$({sharedComposables:l,sharedStores:c,sharedRequests:r,sharedLifecycle:o,sharedFunctions:f,sharedFunctionVerbs:g,sharedBindings:p}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function k(e){let s=[],i=[],t=[];e.sharedReactivity.length&&i.push(`shared reactivity primitive: ${e.sharedReactivity.join(", ")}`),e.sharedLifecycle.length&&i.push(`shared lifecycle primitive: ${e.sharedLifecycle.join(", ")}`),u(e.sharedComposables,"shared composable",s,t),u(e.sharedStores,"shared store",s,t),u(e.sharedRequests,"shared request",s,i),u(e.sharedFunctions,"shared function",s,i),u(e.sharedFunctionVerbs,"shared action verb",s,i),u(e.sharedBindings,"shared binding",s,i),u(e.sharedTemplateEvents,"shared template event",s,i);let n=s.length>0,a=i.length>0,l=t.length>0,c=n?a||l?"mixed":"domain-behavior":l?"shared-abstraction":"generic-workflow-scaffolding";return{actionTier:c==="domain-behavior"||c==="mixed"?"signal":"support",evidenceClass:c,reasons:[...s,...t,...i].slice(0,6),recommendation:A(c)}}function u(e,s,i,t){let n=[],a=[];for(let l of e)S(l)?n.push(l):a.push(l);n.length&&i.push(`${s} has domain term(s): ${n.slice(0,6).join(", ")}`),a.length&&t.push(`${s} is generic workflow: ${a.slice(0,6).join(", ")}`)}function S(e){return T(e).filter(i=>!F.has(i)).length>0}function T(e){return e.replace(/([A-Z])([A-Z][a-z])/g,"$1 $2").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)}function A(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e,s){if(e.size===0||s.size===0)return 0;let t=v(e,s).size/Math.min(e.size,s.size);return Math.max(R(e,s),t)}function q(e){let s=0,i=0,t=0,n=0,a=0,l=0,c=0;for(let r of e)r.startsWith("composable:")?s+=1:r.startsWith("store:")?i+=1:r.startsWith("request:")?t+=1:r.startsWith("lifecycle:")?n+=1:r.startsWith("function:")?a+=1:r.startsWith("reactivity:")?l+=1:(r.startsWith("function-verb:")||r.startsWith("template-binding:")||r.startsWith("template-event:"))&&(c+=1);let h=s+i,o=h+t+n+a+c;return t>=1&&o>=4||n>=1&&a>=2&&o>=4||h>=2&&(t>=1||a>=2)&&o>=5||a>=2&&l>=1&&o>=4}function $(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}function d(e,s){return[...e].filter(i=>i.startsWith(s)).map(i=>i.slice(s.length)).sort()}function y(e){return[...e].sort()}var F=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-O4L4AB3T.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as f}from"./chunk-64MNV6AB.js";import{c as l}from"./chunk-7S5E7KWT.js";import{readdirSync as g}from"fs";import{execFileSync as p}from"child_process";import{extname as d,join as m}from"path";var x=[".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"],O=[".vue"],S=new Set(x.map(e=>e.toLowerCase())),y=[...S].sort().join(","),h=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);function F(e,n={}){let s=n.includeIndexed??!0,r=n.includeAuxiliary??!0,t=n.extensions?.map(c=>c.toLowerCase()),o=t?new Set(t):S,u=t?[...o].sort().join(","):y,i=`${s?"1":"0"}|${r?"1":"0"}|${u}`;return E.get(e,i,()=>{let c=new Set;if(s)for(let a of f(e,{includeIgnored:!1}))o.has(d(a).toLowerCase())&&c.add(a);if(r)for(let a of _(e.config.projectRoot,o))e.isIgnored(a)||s&&c.has(a)||c.add(a);return[...c].sort()})}var E=l("source-files",{clearGroups:[]});function _(e,n){return I(e,n)??v(e,n)}function I(e,n){try{let s=p("git",["ls-files","--cached","--others","--exclude-standard"],{cwd:e,encoding:"utf-8",timeout:1e4,stdio:["ignore","pipe","ignore"]}),r=new Set;for(let t of s.split(`
|
|
2
|
+
`)){let o=t.trim();o&&n.has(d(o).toLowerCase())&&r.add(o)}return r}catch{return null}}function v(e,n){let s=new Set,r=t=>{let o=t?m(e,t):e,u;try{u=g(o,{withFileTypes:!0})}catch{return}for(let i of u)if(!h.has(i.name)){if(i.isDirectory()){r(t?`${t}/${i.name}`:i.name);continue}n.has(d(i.name).toLowerCase())&&s.add(t?`${t}/${i.name}`:i.name)}};return r(""),s}export{O as a,h as b,F as c};
|
|
3
|
+
//# sourceMappingURL=chunk-OBBDKQAG.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{b as k}from"./chunk-C3MZZ2ZN.js";import{a as D}from"./chunk-3ZYF3ELZ.js";import{f as y,g as v}from"./chunk-ZQLO2SCU.js";import{n as S}from"./chunk-HVTYSC26.js";import{f as L}from"./chunk-3UW7VM4H.js";import{c as h}from"./chunk-JM72FNGA.js";function z(e,n={}){let{scope:s,minLoc:c=1,maxDepth:a=5,scanLimit:f}=n,t=new D(e),i=_(e,s,c,f),o=new P;for(let r of i)o.add(r);let m=[],I=[];i.length>0&&m.push(C(e,0,i,o));let b=i.map(r=>r.definition).filter(r=>r!==null),x=new Set(i.map(r=>r.symbol));for(let r=1;r<=a&&b.length>0;r++){let u=t.calleeMap(b,{semantic:!1}),E=new Set;for(let d of b)for(let l of u.get(d.symbolId)??[])x.has(l.symbol)||E.add(l.symbol);let p=[];for(let d of E){x.add(d);let l=F(e,d);if(!l||e.isIgnored(l.relativePath)||y(e,l.relativePath)||v(e,l.symbol,l.relativePath)||t.fileKind(l.relativePath)==="test"||t.hasSuppressionComment(l))continue;let g=B(e,l,o);g.removable?p.push(w(l,"cascade")):g.blockingFiles.length>0&&I.push({shortName:h(l.symbol),file:l.relativePath,blockingFiles:g.blockingFiles.slice(0,3)})}if(p.length===0)break;for(let d of p)o.add(d);m.push(C(e,r,p,o)),b=p.map(d=>d.definition).filter(d=>d!==null)}let N=m.reduce((r,u)=>r+u.loc,0),R=m.reduce((r,u)=>r+u.entries.length,0);return{batches:m,totalSymbols:R,totalLoc:N,blocked:I}}function _(e,n,s,c){let a=k(e,{scope:n,minLoc:s,skipBarrels:!0,deadCodeOnly:!0,scanLimit:c,semantic:!1}),f=[];for(let t of a.symbols)t.kind==="dead-code"&&(y(e,t.relativePath)||v(e,t.symbol,t.relativePath)||f.push({symbol:t.symbol,shortName:t.shortName,file:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:t.loc,evidence:"graph-fact",definition:F(e,t.symbol)}));return f}function w(e,n){return{symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:e.endLine-e.startLine+1,evidence:n,definition:e}}function F(e,n){let s=e.get(`SELECT d.relative_path
|
|
2
|
+
FROM global_symbols gs
|
|
3
|
+
JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
|
|
4
|
+
JOIN documents d ON d.id = der.document_id
|
|
5
|
+
WHERE gs.symbol = ?
|
|
6
|
+
LIMIT 1`,n);return s?L(e,s.relative_path).find(c=>c.symbol===n)??null:null}function B(e,n,s){let c=S(e,n);if(c.length===0)return{removable:!1,blockingFiles:[]};let a=new Set;for(let f of c)f.file===n.relativePath&&f.line>=n.startLine&&f.line<=n.endLine||s.contains(f.file,f.line)||a.add(f.file);return{removable:a.size===0,blockingFiles:[...a]}}function C(e,n,s,c){let a=[...s].sort((i,o)=>i.file.localeCompare(o.file)||i.startLine-o.startLine),f=new Set(a.map(i=>i.file)),t=[];for(let i of f){let o=L(e,i);o.length>0&&o.every(m=>c.contains(i,m.startLine))&&t.push(i)}return{depth:n,entries:a.map(({definition:i,...o})=>o),loc:a.reduce((i,o)=>i+o.loc,0),filesEmptied:t.sort()}}var P=class{ranges=new Map;add(n){let s=this.ranges.get(n.file)??[];s.push({start:n.startLine,end:n.endLine}),this.ranges.set(n.file,s)}contains(n,s){let c=this.ranges.get(n);return c?c.some(a=>s>=a.start&&s<=a.end):!1}};export{z as a,P as b};
|
|
7
|
+
//# sourceMappingURL=chunk-OLD6PBU6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as d}from"./chunk-B75HZHUP.js";function u(e){let i=e.orderCandidates?[...e.candidates()].sort(e.orderCandidates):e.candidates(),a=d(i,e.scanLimit),r=e.prepare?.(a)??void 0,t=[];for(let s of a){let n=e.evaluate(s,r);n&&t.push(n)}return e.orderResults&&t.sort(e.orderResults),typeof e.limit=="number"?t.slice(0,e.limit):t}export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PFOCOG57.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function f(e){let t=[];if(e.filePattern){let r=e.profiles.find(i=>i.file.includes(e.filePattern));if(!r)return[];for(let i of e.profiles){if(i.file===r.file)continue;let l=e.compare(r,i);l&&t.push(l)}}else{let r=typeof e.overrunFactor=="number"&&Number.isFinite(e.limit)?e.limit*e.overrunFactor:Number.POSITIVE_INFINITY;for(let i=0;i<e.profiles.length;i+=1){for(let l=i+1;l<e.profiles.length;l+=1){let n=e.compare(e.profiles[i],e.profiles[l]);n&&t.push(n)}if(t.length>r)break}}return t.sort(e.sort??((r,i)=>i.similarity-r.similarity)),t.slice(0,e.limit)}export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PVZMPG5I.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as C}from"./chunk-ERHOS6AW.js";import{a as m,b as d,c as L,d as g}from"./chunk-EWC3UK4V.js";import{a as h,i as A,j as S}from"./chunk-D322LMSA.js";import{b as x,c as _,d as N}from"./chunk-A4L36SZS.js";import{f as b}from"./chunk-7S5E7KWT.js";var k=new Set(["identifier","type_identifier","field_identifier"]),v=new Set(["identifier"]),B=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),V=new Set(["rust","python"]),j=/\{([^{}]*)\}/g,O=/\b([A-Za-z_][\w]*)\b/g;function F(e,t){return P(t).has(e.type)}function R(e,t){return V.has(t)&&e.type==="string_content"}function y(e){let t=0;for(let n of e.values()){let c=n[n.length-1];c!==void 0&&c>t&&(t=c)}let r=new Array(t+1);for(let n=0;n<=t;n+=1)r[n]=new Set;for(let[n,c]of e)for(let u of c)r[u].add(n);return r}function P(e){return e==="rust"?k:e==="python"?v:B}function w(e,t){let r=e.startPosition.row;for(let n of e.text.matchAll(j)){let c=n[1]??"";for(let u of c.matchAll(O))u[1]&&t(u[1],r)}}var H=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],z=/^#!?\[\s*serde\s*\(/,U=/^#!?\[\s*schemars\s*\(/,G=/^#!?\[\s*validate\s*\(/,K=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function T(e,t,r){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let n=e.childForFieldName("function")??e.namedChild(0);if(!n)return;let c=S(n);if(!c||!K.has(c))return;let u=e.namedChildren.find(i=>i.type==="arguments");if(!u)return;let a=u.namedChild(0);if(!a||a.type!=="string")return;let o=a.namedChildren.find(i=>i.type==="string_fragment");o&&r.add(o.text)}function D(e,t){let r=z.test(e),n=U.test(e),c=G.test(e);if(!(!r&&!n&&!c))for(let u of H){u.lastIndex=0;let a;for(;(a=u.exec(e))!==null;){let o=a[1],i=o.split("::").pop()??o;i==="is_none"&&/\bOption\b/.test(o)||i==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(o)||i&&t.add(i)}}}function E(e,t){let r=new Map,n=(a,o)=>{if(a===o)return;let i=r.get(a);i||(i=new Set,r.set(a,i)),i.add(o)},c=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),u=(a,o)=>{let i=s=>{c.has(s.type)&&s.text!==o&&n(s.text,o);for(let l of s.children)i(l)};for(let s of a.children)i(s)};if(t==="rust")for(let a of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let o=a.namedChildren.find(s=>s.type==="type_identifier")?.text;if(!o)continue;let i=a.namedChildren.find(s=>s.type==="field_declaration_list"||s.type==="enum_variant_list"||s.type==="ordered_field_declaration_list");i&&u(i,o),a.type==="type_item"&&u(a,o)}else if(t==="python")for(let a of e.rootNode.descendantsOfType("class_definition")){let o=a.namedChildren.find(s=>s.type==="identifier")?.text;if(!o)continue;let i=a.namedChildren.find(s=>s.type==="block");if(i)for(let s of i.descendantsOfType("type"))for(let l of s.descendantsOfType("identifier"))l.text!==o&&n(l.text,o)}else for(let a of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let o=a.namedChildren.find(i=>i.type==="type_identifier")?.text;o&&u(a,o)}return r}var Y=b("source-facts",{clearGroups:["whole-project","source-file"]});function f(e,t){let r=h(e,t);if(!r)return null;let n=J(t,r);return n?Y.get(e,t,r,()=>Q(e,t,n,r)):null}function J(e,t){return d(e)?L(t)?.language??null:m(e)}function Q(e,t,r,n){let c=x(e,t,n),u=_(e,"source-facts",t,c);if(u){let i=q(u);if(i&&i.language===r)return i}let a=g(e,t);if(!a)return null;let o=$(a,r);return N(e,"source-facts",t,c,Z(o)),o}function Z(e){let t={language:e.language,callables:e.callables,callSites:e.callSites,typeContainerMap:[...e.typeContainerMap.entries()].map(([r,n])=>[r,[...n]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function q(e){try{let t=JSON.parse(e),r=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,typeContainerMap:new Map(t.typeContainerMap.map(([n,c])=>[n,new Set(c)])),identifierLineMap:r,identifiersByLine:y(r),fileIdentifiers:new Set(r.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function W(e,t,r,n){let c=f(e,t);return c?X(c,r,n)?.isLiteralPassthrough??!0:!0}function X(e,t,r){return e.callables.find(n=>n.startLine===t&&n.endLine===r)??null}function $(e,t){let r=[],n=[],c=new Set,u=new Set,a=new Map,o=(s,l)=>{let p=a.get(s);if(!p){a.set(s,[l]);return}p[p.length-1]!==l&&p.push(l)},i=s=>{let l=C(s,t);l&&r.push(l);let p=A(s,t);p&&n.push(p),T(s,t,u),t==="rust"&&(s.type==="attribute_item"||s.type==="inner_attribute_item")&&D(s.text,c),F(s,t)&&o(s.text,s.startPosition.row),R(s,t)&&w(s,o);for(let M of s.children)i(M)};return i(e.rootNode),{language:t,callables:r,callSites:n,typeContainerMap:E(e,t),identifierLineMap:a,identifiersByLine:y(a),fileIdentifiers:new Set(a.keys()),rustAttrReferencedNames:c,crossLanguageDispatchNames:u}}var I=new Set(["rust","typescript","tsx","javascript","python"]);function ee(e,t){let r=f(e,t);return!r||!I.has(r.language)?null:r.callables.map(n=>({name:n.name,startLine:n.startLine,endLine:n.endLine}))}function te(e,t){let r=f(e,t);return!r||!I.has(r.language)?null:r.callSites}function re(e,t){return f(e,t)?.typeContainerMap??new Map}function ne(e,t,r={}){let n=f(e,t);if(!n)return[];let c=[];if(r.includeCrossLanguageDispatchNames)for(let u of n.crossLanguageDispatchNames)c.push({name:u,kind:"cross-language-dispatch",occurrences:1});if(r.includeRustAttributeNames&&n.language==="rust")for(let u of n.rustAttrReferencedNames)c.push({name:u,kind:"rust-attribute",occurrences:1});return c}export{f as a,W as b,ee as c,te as d,re as e,ne as f};
|
|
2
|
+
//# sourceMappingURL=chunk-QLNGUWR7.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e as l}from"./chunk-EWC3UK4V.js";function S(e,n={}){let{minComponentLines:o=300,minFileLines:t=800,minJsxTokens:r=80,minBehaviorTokens:a=40,limit:m=20,scope:c,scanLimit:p,filePattern:i}=n;return l(e,{scope:c,scanLimit:p}).filter(s=>s.kind==="component").filter(s=>!i||s.file.includes(i)||s.name.includes(i)).map(s=>g(s,{minComponentLines:o,minFileLines:t,minJsxTokens:r,minBehaviorTokens:a})).filter(s=>s!==null).sort((s,u)=>u.componentLines-s.componentLines||u.fileLines-s.fileLines||s.file.localeCompare(u.file)).slice(0,m)}function g(e,n){let o=[];e.loc>=n.minComponentLines&&o.push(`${e.loc} component line(s)`);let t=Math.max(80,Math.floor(n.minComponentLines/2));if(e.fileLines>=n.minFileLines&&e.loc>=t&&o.push(`${e.fileLines} file line(s)`),e.jsxTokens.size>=n.minJsxTokens&&o.push(`${e.jsxTokens.size} JSX structure token(s)`),e.behaviorTokens.size>=n.minBehaviorTokens&&o.push(`${e.behaviorTokens.size} behavior token(s)`),o.length===0)return null;let r=x(e),a=C(e,n,r),m=f(e),c=b(r,a,m);return{file:e.file,component:e.name,componentLines:e.loc,fileLines:e.fileLines,jsxTokens:e.jsxTokens.size,behaviorTokens:e.behaviorTokens.size,dominantPressure:r,pressureKinds:a,contextKind:m,recommendationKind:c,recommendation:R(c,m),reasons:o,loc:e.loc}}function x(e){let n=[{axis:"component",value:e.loc},{axis:"file",value:e.fileLines},{axis:"jsx-structure",value:e.jsxTokens.size*3},{axis:"hook-behavior",value:e.behaviorTokens.size*4}];return n.sort((o,t)=>t.value-o.value),n[0]?.axis??"component"}function C(e,n,o){let t=[];e.loc>=n.minComponentLines&&t.push("component");let r=Math.max(80,Math.floor(n.minComponentLines/2));return e.fileLines>=n.minFileLines&&e.loc>=r&&t.push("file"),e.jsxTokens.size>=n.minJsxTokens&&t.push("jsx-structure"),e.behaviorTokens.size>=n.minBehaviorTokens&&t.push("hook-behavior"),[...new Set(t.length>0?t:[o])]}function f(e){let n=e.file.split(/[\\/]+/).filter(Boolean),o=n.slice(0,-1).map(i=>i.toLowerCase()),t=(n.at(-1)??e.name).replace(/\.[^.]+$/,""),r=`${t} ${e.name}`.split(/[^A-Za-z0-9]+/).filter(Boolean).map(i=>i.toLowerCase()),a=o.findIndex(i=>v.has(i)),m=a>=0&&o.slice(a+1).some(i=>h.has(i)),c=d(t)||d(e.name);return/(?:Page|Route|Screen|View)$/.test(t)||/(?:Page|Route|Screen|View)$/.test(e.name)||r.some(i=>k.has(i))||a>=0&&!m&&!c?"route-page":"component"}function d(e){let n=e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(o=>o.toLowerCase());return n.at(-1)&&L.has(n.at(-1))?!0:[...L].some(o=>e.endsWith(T(o)))}function b(e,n,o){return e==="hook-behavior"?"behavior-extraction":o==="route-page"?"route-page-decomposition":n.includes("hook-behavior")?"behavior-extraction":n.includes("jsx-structure")?"jsx-decomposition":n.includes("file")?"file-decomposition":e==="jsx-structure"?"jsx-decomposition":e==="file"&&!n.includes("component")?"file-decomposition":"component-decomposition"}function R(e,n){switch(e){case"behavior-extraction":return"Extract independent state, effects, requests, or handlers into hooks, controllers, or feature modules.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"jsx-decomposition":return n==="route-page"?"Split page JSX into named layout sections before extracting behavior.":"Split repeated JSX sections into named presentational components.";case"file-decomposition":return"Review file-level decomposition; split colocated panels or helpers before changing behavior.";case"component-decomposition":return"Review component boundaries around props, state ownership, and independently changing UI sections."}}var h=new Set(["component","components","panel","panels","partial","partials"]),L=new Set(["banner","button","card","dialog","drawer","filter","form","grid","header","item","list","menu","modal","nav","panel","picker","rail","row","section","selector","shell","sidebar","table","toolbar"]),v=new Set(["landing","page","pages","route","routes","screen","screens","view","views"]),k=new Set(["landing","page","route","screen","view"]);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-QSXQT3NE.js.map
|