scip-query 0.10.11 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/{vendor/scip/LICENSE.scip → LICENSE} +1 -0
- package/README.md +168 -55
- package/dist/augment-vue-worker.js +1 -1
- package/dist/chunk-2VSDXOG5.js +2 -0
- package/dist/chunk-343O6EVV.js +2 -0
- package/dist/chunk-3KDUITBE.js +7 -0
- package/dist/chunk-3T2FNHIU.js +2 -0
- package/dist/chunk-3V6JQQM5.js +2 -0
- package/dist/chunk-5AAAEZ2Z.js +2 -0
- package/dist/chunk-6Q6OFLFQ.js +8 -0
- package/dist/chunk-6XA4LDHY.js +2 -0
- package/dist/chunk-75X52JTA.js +2 -0
- package/dist/{chunk-54KGX7EX.js → chunk-7HB3CZFD.js} +2 -2
- package/dist/chunk-7JZRFDCU.js +2 -0
- package/dist/chunk-7XL7J7PT.js +3 -0
- package/dist/chunk-ALHNAPS2.js +2 -0
- package/dist/{chunk-JATUZIEH.js → chunk-BDRBPG7Y.js} +2 -2
- package/dist/chunk-BN5SXXQS.js +40 -0
- package/dist/chunk-C4ICAIJ4.js +3 -0
- package/dist/{chunk-LSET2TXH.js → chunk-CMHYBXJB.js} +2 -2
- package/dist/{chunk-YWYFU2V3.js → chunk-DRPAQAFM.js} +6 -6
- package/dist/chunk-FERAXG6Y.js +72 -0
- package/dist/chunk-FLJJLSGB.js +2 -0
- package/dist/chunk-FXG3PHVW.js +9 -0
- package/dist/chunk-GCN2P4EJ.js +2 -0
- package/dist/chunk-GHXRVCIY.js +21 -0
- package/dist/chunk-GNG622H3.js +3 -0
- package/dist/chunk-H4LUPLEJ.js +2 -0
- package/dist/{chunk-BASVXNY3.js → chunk-H56MGERE.js} +4 -4
- package/dist/chunk-H7NSJ7L2.js +5 -0
- package/dist/chunk-HINMXZ6J.js +2 -0
- package/dist/chunk-HXXMPYEF.js +2 -0
- package/dist/{chunk-Z3YYR4OS.js → chunk-HZKMEXA3.js} +2 -2
- package/dist/chunk-IFSX6YVU.js +4 -0
- package/dist/chunk-ISLWJ4PY.js +10 -0
- package/dist/chunk-J5WVNZ6O.js +2 -0
- package/dist/chunk-K2HYR5A7.js +3 -0
- package/dist/chunk-K6UI6EBZ.js +2 -0
- package/dist/chunk-KJCDEDQW.js +2 -0
- package/dist/{chunk-Z4HICZGY.js → chunk-KKMOB3OJ.js} +2 -2
- package/dist/{chunk-YWOOQ4FF.js → chunk-KMVGRIO2.js} +2 -2
- package/dist/chunk-LWOOTRHC.js +2 -0
- package/dist/{chunk-EY43NV4M.js → chunk-LZNLRE4X.js} +17 -8
- package/dist/chunk-M2YXL62V.js +23 -0
- package/dist/chunk-MNEJYEHW.js +3 -0
- package/dist/chunk-MTDBHTSF.js +2 -0
- package/dist/{chunk-ZQDIXAF5.js → chunk-N2Z3CU7X.js} +2 -2
- package/dist/chunk-N7PNFLGY.js +2 -0
- package/dist/chunk-NAH5EAZS.js +6 -0
- package/dist/chunk-NBXK32I6.js +2 -0
- package/dist/chunk-NJJ7AS4F.js +2 -0
- package/dist/{chunk-FDEQIPPK.js → chunk-NLMRJ7SI.js} +2 -2
- package/dist/chunk-ODVITBYU.js +26 -0
- package/dist/chunk-ORBRX2QJ.js +2 -0
- package/dist/chunk-P36UR5II.js +2 -0
- package/dist/chunk-PYZZBIEU.js +3 -0
- package/dist/chunk-PZS6J5YG.js +16 -0
- package/dist/{chunk-LM5SHAN4.js → chunk-QARYU7R3.js} +2 -2
- package/dist/chunk-QJ3FK4TB.js +38 -0
- package/dist/chunk-QXGTGE2C.js +35 -0
- package/dist/chunk-QZ4JVECJ.js +2 -0
- package/dist/chunk-R3JY4EZ4.js +102 -0
- package/dist/{chunk-VOYOYC5T.js → chunk-R5336VHZ.js} +2 -2
- package/dist/chunk-RJMXSHKM.js +2 -0
- package/dist/chunk-STBXCPKY.js +5 -0
- package/dist/chunk-T2FQ4GHD.js +9 -0
- package/dist/chunk-TFWDJDGO.js +2 -0
- package/dist/chunk-TG7QSYCJ.js +2 -0
- package/dist/{chunk-FKCGBZAC.js → chunk-TTS75UF2.js} +5 -5
- package/dist/{chunk-BVRS7RKQ.js → chunk-U7I373V4.js} +2 -2
- package/dist/chunk-UIKLA3F5.js +2 -0
- package/dist/{chunk-P753MDDE.js → chunk-UMPNL7T6.js} +2 -2
- package/dist/chunk-URSSPS5H.js +2 -0
- package/dist/chunk-VGMUFW3J.js +2 -0
- package/dist/chunk-VXTNADIW.js +18 -0
- package/dist/chunk-VYF5HA76.js +2 -0
- package/dist/chunk-WFGOH2UI.js +43 -0
- package/dist/chunk-WGA5BBTA.js +4 -0
- package/dist/chunk-WIBFXSYB.js +6 -0
- package/dist/chunk-WPSS37EW.js +2 -0
- package/dist/chunk-WQHWIVA7.js +3 -0
- package/dist/chunk-WS3Z6W3M.js +65 -0
- package/dist/chunk-WXVGNFAO.js +2 -0
- package/dist/{chunk-6LJHXREW.js → chunk-WZLPXFZU.js} +2 -2
- package/dist/chunk-X4O6K47U.js +2 -0
- package/dist/chunk-X6OGDTQH.js +2 -0
- package/dist/chunk-XEMQUN3Z.js +20 -0
- package/dist/{chunk-7B6LP46R.js → chunk-XHWLNQVZ.js} +2 -2
- package/dist/chunk-XMR747CP.js +2 -0
- package/dist/chunk-Y6L4LXPG.js +2 -0
- package/dist/chunk-YCPASUCX.js +2 -0
- package/dist/chunk-YZXV3CU3.js +60 -0
- package/dist/chunk-ZEKBR4OK.js +10 -0
- package/dist/chunk-ZMGBWSFZ.js +2 -0
- package/dist/cli.js +462 -274
- package/dist/{config-types-BDIWAYzr.d.ts → config-types-BrHl3Bge.d.ts} +61 -1
- package/dist/{db-Djj3Nqrb.d.ts → db-_Bdx0E1W.d.ts} +1 -1
- package/dist/diff-gate-types-CG2YQ_ei.d.ts +4 -0
- package/dist/{frontend-behavior-evidence-BxKpKWUu.d.ts → frontend-behavior-evidence-EfM4_9bc.d.ts} +1 -1
- package/dist/{health-D5J42g4D.d.ts → health-BEZ1Rt0S.d.ts} +54 -2
- package/dist/index.d.ts +10 -70
- package/dist/index.js +2 -2
- package/dist/postinstall.js +1 -4
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -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 +12 -2
- 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 +7 -3
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +42 -4
- 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 +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +12 -3
- 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 +3 -3
- package/dist/queries/dead.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -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 +65 -8
- package/dist/queries/diff-gate.js +1 -1
- package/dist/queries/diff-impact.d.ts +21 -3
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +29 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +15 -3
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +55 -0
- package/dist/queries/duplicate-bodies.js +2 -0
- package/dist/queries/extract-candidates.d.ts +2 -2
- 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 +4 -3
- 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 +3 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +12 -7
- 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 +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- 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 +11 -3
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +3 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +7 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +3 -3
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- 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 +9 -4
- 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 +17 -10
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +85 -17
- 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 +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- 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/twin-ab.d.ts +55 -0
- package/dist/queries/twin-ab.js +2 -0
- package/dist/queries/twin-drift.d.ts +97 -0
- package/dist/queries/twin-drift.js +2 -0
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- 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 +7 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +3 -3
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +6 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +9 -9
- package/dist/reindex.d.ts +30 -4
- package/dist/reindex.js +19 -19
- package/dist/runtime.d.ts +12 -6
- package/dist/runtime.js +2 -2
- package/dist/{scip-cli-CnK9Va4O.d.ts → scip-cli-C7cg4ZHR.d.ts} +1 -1
- package/dist/symbol-types-DaoeXKUt.d.ts +66 -0
- package/docs/AGENT_GUIDE.md +20 -18
- package/docs/AI_FAILURE_MODES.md +36 -13
- package/docs/API.md +1 -1
- package/docs/COMMAND_REFERENCE.md +57 -14
- package/docs/DETECTOR_GUIDE.md +20 -3
- package/docs/REGEX_POLICY.md +34 -0
- package/docs/analyzer-inventory.md +48 -3
- package/docs/analyzer-validation-ledger.md +41 -6
- package/package.json +23 -7
- package/scripts/build-scip-windows.mjs +10 -7
- package/scripts/evidence-product-contract.mjs +197 -0
- package/skills/_shared/SKILL.md +243 -0
- package/skills/_shared/agents/openai.yaml +4 -0
- package/skills/scip-api-impact/SKILL.md +55 -71
- package/skills/scip-claim-audit/SKILL.md +105 -0
- package/skills/scip-claim-audit/agents/openai.yaml +4 -0
- package/skills/scip-cleanup-audit/SKILL.md +122 -0
- package/skills/scip-cleanup-audit/agents/openai.yaml +4 -0
- package/skills/scip-cleanup-improve/SKILL.md +84 -0
- package/skills/scip-cleanup-improve/agents/openai.yaml +4 -0
- package/skills/scip-concrete-plan/SKILL.md +181 -0
- package/skills/scip-concrete-plan/agents/openai.yaml +4 -0
- package/skills/scip-conductor/SKILL.md +133 -0
- package/skills/scip-conductor/agents/openai.yaml +4 -0
- package/skills/scip-debug/SKILL.md +60 -58
- package/skills/scip-diagram/SKILL.md +64 -94
- package/skills/scip-directory-architecture/SKILL.md +65 -107
- package/skills/scip-doc-reconcile/SKILL.md +56 -67
- package/skills/scip-explore/SKILL.md +78 -210
- package/skills/scip-hyper-optimization/SKILL.md +124 -198
- package/skills/scip-integrity-audit/SKILL.md +103 -0
- package/skills/scip-integrity-audit/agents/openai.yaml +4 -0
- package/skills/scip-language-playbook/SKILL.md +56 -326
- package/skills/scip-maintainability/SKILL.md +80 -219
- package/skills/scip-probe-reachability/SKILL.md +92 -0
- package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
- package/skills/scip-query/SKILL.md +108 -124
- package/skills/scip-react-maintainability/SKILL.md +64 -82
- package/skills/scip-setup/SKILL.md +121 -0
- package/skills/scip-setup/agents/openai.yaml +4 -0
- package/skills/scip-tla-model-system/SKILL.md +138 -0
- package/skills/scip-tla-model-system/agents/openai.yaml +4 -0
- package/skills/scip-triage-issue/SKILL.md +53 -41
- package/skills/scip-twin-drift/SKILL.md +107 -0
- package/skills/scip-twin-drift/agents/openai.yaml +4 -0
- package/skills/scip-verify/SKILL.md +70 -88
- package/skills/scip-vue-maintainability/SKILL.md +67 -94
- package/dist/chunk-2KHTSEIL.js +0 -102
- package/dist/chunk-3VD3JMK2.js +0 -2
- package/dist/chunk-4UZO3XCV.js +0 -35
- package/dist/chunk-5GOLFJEO.js +0 -8
- package/dist/chunk-5OST6GYB.js +0 -2
- package/dist/chunk-65AU3HFZ.js +0 -2
- package/dist/chunk-6GN7FXCH.js +0 -2
- package/dist/chunk-6IR2AOBM.js +0 -7
- package/dist/chunk-6JRV4MY2.js +0 -23
- package/dist/chunk-6QSOCTZT.js +0 -18
- package/dist/chunk-72KY2ZFO.js +0 -2
- package/dist/chunk-7GO4EQF5.js +0 -2
- package/dist/chunk-7IVSJJZU.js +0 -7
- package/dist/chunk-7TWLSZK5.js +0 -2
- package/dist/chunk-A536TEU4.js +0 -3
- package/dist/chunk-AVWPHM2Q.js +0 -4
- package/dist/chunk-B32FX5KB.js +0 -2
- package/dist/chunk-B6MJ5VQV.js +0 -2
- package/dist/chunk-BFXPG2VN.js +0 -2
- package/dist/chunk-BSN22NRK.js +0 -9
- package/dist/chunk-BZ53S4ZN.js +0 -2
- package/dist/chunk-C5CTSJ6X.js +0 -6
- package/dist/chunk-CO5GJRP7.js +0 -2
- package/dist/chunk-CW5YFOCP.js +0 -5
- package/dist/chunk-DS6QEB3G.js +0 -5
- package/dist/chunk-E35O7UCB.js +0 -2
- package/dist/chunk-EXDQ35NN.js +0 -2
- package/dist/chunk-FAYI6KZ5.js +0 -2
- package/dist/chunk-FFVIFETB.js +0 -2
- package/dist/chunk-FG4NT6VY.js +0 -2
- package/dist/chunk-FXNWFMKW.js +0 -25
- package/dist/chunk-G5UPYQGL.js +0 -4
- package/dist/chunk-GQBMH2TQ.js +0 -2
- package/dist/chunk-GRJY65YT.js +0 -2
- package/dist/chunk-HF25DFSC.js +0 -3
- package/dist/chunk-HHN2B5KA.js +0 -2
- package/dist/chunk-IHUETYFW.js +0 -2
- package/dist/chunk-JCLDUKT6.js +0 -38
- package/dist/chunk-JGN2ZFJR.js +0 -2
- package/dist/chunk-JM72FNGA.js +0 -2
- package/dist/chunk-JME7OWD3.js +0 -2
- package/dist/chunk-KDFONWTW.js +0 -40
- package/dist/chunk-LPL4MA6R.js +0 -2
- package/dist/chunk-LZHUWKGD.js +0 -2
- package/dist/chunk-M4COR2H6.js +0 -2
- package/dist/chunk-NOJAM5ZV.js +0 -21
- package/dist/chunk-O6ZH6C6Y.js +0 -2
- package/dist/chunk-OBGRLXWF.js +0 -3
- package/dist/chunk-OLTESY4K.js +0 -3
- package/dist/chunk-ONPCQ2PM.js +0 -6
- package/dist/chunk-P4KYUPBD.js +0 -4
- package/dist/chunk-P5RYBRIO.js +0 -4
- package/dist/chunk-P7AL7Y37.js +0 -2
- package/dist/chunk-PFOCOG57.js +0 -2
- package/dist/chunk-QLAUCRDJ.js +0 -2
- package/dist/chunk-QPU7EXAW.js +0 -2
- package/dist/chunk-QYB5P7GL.js +0 -2
- package/dist/chunk-RNM6LMCF.js +0 -2
- package/dist/chunk-RVWSAMTT.js +0 -2
- package/dist/chunk-TK7O5ER5.js +0 -3
- package/dist/chunk-TQ5W2H3S.js +0 -4
- package/dist/chunk-USPV3T5K.js +0 -2
- package/dist/chunk-UUBMFL3F.js +0 -59
- package/dist/chunk-VCQYSG2M.js +0 -10
- package/dist/chunk-VUKC6F77.js +0 -20
- package/dist/chunk-W2CBNBEL.js +0 -71
- package/dist/chunk-W6BVEKYC.js +0 -3
- package/dist/chunk-WUCEKFQC.js +0 -3
- package/dist/chunk-XUGQU7PM.js +0 -41
- package/dist/chunk-Y5NBHMQX.js +0 -2
- package/dist/chunk-YCOFCT4B.js +0 -2
- package/dist/chunk-YZA6PPZL.js +0 -3
- package/skills/concrete-plan/SKILL.md +0 -372
- package/skills/concrete-plan/agents/openai.yaml +0 -4
- package/skills/scip-adoption/SKILL.md +0 -122
- package/skills/scip-adoption/agents/openai.yaml +0 -4
- package/skills/scip-ai-cleanup/SKILL.md +0 -153
- package/skills/scip-ai-cleanup/agents/openai.yaml +0 -4
- package/skills/scip-debloat/SKILL.md +0 -439
- package/skills/scip-debloat/agents/openai.yaml +0 -4
- package/skills/scip-health-audit/SKILL.md +0 -162
- package/skills/scip-health-audit/agents/openai.yaml +0 -4
- package/skills/scip-health-improve/SKILL.md +0 -155
- package/skills/scip-health-improve/agents/openai.yaml +0 -4
- package/skills/scip-query-setup/SKILL.md +0 -170
- package/skills/scip-query-setup/agents/openai.yaml +0 -3
- package/vendor/scip/README.md +0 -6
- package/vendor/scip/win32-arm64/scip.exe +0 -0
- package/vendor/scip/win32-x64/scip.exe +0 -0
package/dist/chunk-QPU7EXAW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e as l}from"./chunk-HF25DFSC.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-QPU7EXAW.js.map
|
package/dist/chunk-QYB5P7GL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as d,c as m}from"./chunk-C5CTSJ6X.js";import{a as B}from"./chunk-VUKC6F77.js";function F(s,e={}){let{scope:r,maxDepth:c=10}=e,n=B(s,r),i=[],a=new Set,l=new Set,f=[];function y(t,o){if(o>c)return;if(l.has(t)){let h=f.indexOf(t);if(h!==-1){let u=f.slice(h).concat(t),g=u.indexOf(u.reduce((x,$)=>x<$?x:$)),p=[...u.slice(g,-1),...u.slice(0,g),u[g]],S=p.join(" -> ");b.has(S)||(b.add(S),i.push({path:p,kind:R(p)}))}return}if(a.has(t))return;a.add(t),l.add(t),f.push(t);let k=n.get(t);if(k)for(let h of k)y(h,o+1);f.pop(),l.delete(t)}let b=new Set;for(let t of n.keys())a.has(t)||y(t,0);return i.sort((t,o)=>t.kind!==o.kind?t.kind==="real"?-1:1:t.path.length-o.path.length),i}function R(s){for(let c of s){let n=d(c);if(n==="test"||n==="barrel"||n==="entry")return"module-hierarchy"}if(s.length!==3)return"real";let[e,r]=s;return!e||!r?"real":m(e)||m(r)||C(e,r)||C(r,e)||D(e,r)||D(r,e)||d(e)==="entry"||d(r)==="entry"?"module-hierarchy":"real"}function C(s,e){if(!/\.rs$/.test(s)||!/\.rs$/.test(e))return!1;let r=e.replace(/\.rs$/,"/");return s.startsWith(r)?!s.slice(r.length).includes("/"):!1}function D(s,e){if(!/\.rs$/.test(s)||!/\.rs$/.test(e))return!1;let r=s.replace(/\.rs$/,""),c=e.replace(/\.rs$/,"");if(r===c+"_tests"||r===c+"/tests")return!0;let n=s.split("/"),i=e.split("/");if(n.length===i.length&&n.includes("tests")&&i.includes("src")){let a=n[n.length-1],l=i[i.length-1];if(a&&a===l)return!0}return!1}export{F as a};
|
|
2
|
-
//# sourceMappingURL=chunk-QYB5P7GL.js.map
|
package/dist/chunk-RNM6LMCF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as k}from"./chunk-JCLDUKT6.js";import{e as g,g as R,h as M,i as C,o as D}from"./chunk-KDFONWTW.js";import{e as h}from"./chunk-OLTESY4K.js";import{g as S}from"./chunk-2KHTSEIL.js";import{d as y}from"./chunk-JM72FNGA.js";import{d as p,f as b}from"./chunk-72KY2ZFO.js";import{a as d}from"./chunk-HF25DFSC.js";import{a as m}from"./chunk-64MNV6AB.js";function L(e,n,t={}){let o=new Map;if(n&&n.length===0)return o;let r=m(e,{includeIgnored:!1}),a=C(e),i=n??S(e),l=new Set(i.map(c=>c.symbolId)),s=F(i);return I(e,o,r,a,l,s),w(e,o,i,l),_(e,o,r,a,l,s),t.semantic!==!1&&V(o,h(e,j(i))),o}function I(e,n,t,o,r,a){for(let i of t){if(!d(i))continue;let l=p(e,i);if(l)for(let s of l){if(a&&!a.has(s.calleeLeaf))continue;let c=R(i,o.get(s.calleeLeaf)??[]);if(!c||c.length===0)continue;let f=M(e,i,c,s.memberAccess);f&&r.has(f.symbolId)&&f.file!==i&&u(n,f.symbolId,i)}}}function w(e,n,t,o){let r=x(t);for(let a of v(e,o))e.isIgnored(a.relative_path)||A(a,r.get(a.symbol_id))||u(n,a.symbol_id,a.relative_path)}function v(e,n){return g(e,n?[...n]:void 0)}function x(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 A(e,n){return!!n&&n.docId===e.document_id&&e.chunk_start>=n.startLine&&e.chunk_end<=n.endLine}function _(e,n,t,o,r,a){for(let i of t){if(d(i)!=="rust")continue;let l=b(e,i,{includeRustAttributeNames:!0});if(l.length!==0)for(let{name:s}of l){if(a&&!a.has(s))continue;let c=o.get(s);if(c)for(let f of c)r.has(f.symbolId)&&f.file!==i&&u(n,f.symbolId,i)}}}function u(e,n,t){let o=e.get(n);o||(o=new Set,e.set(n,o)),o.add(t)}function F(e){let n=new Set;for(let t of e){let o="leaf"in t&&typeof t.leaf=="string"?t.leaf:"symbol"in t&&typeof t.symbol=="string"?y(t.symbol):"";o&&n.add(o)}return n.size>0?n:null}function j(e){return e.filter(n=>"relativePath"in n&&"symbol"in n&&"leaf"in n)}function V(e,n){for(let[t,o]of n){let r=e.get(t);r||(r=new Set,e.set(t,r));for(let a of o)r.add(a)}}function W(e,n,t={}){return k(e,n,t)}function K(e,n,t={}){return L(e,n,t)}function G(e,n){return D(e,n)}function X(e,n,t={}){let o=K(e,n,{semantic:t.semantic});return t.sourceFallback===!1?o:E(o,G(e,n))}function E(e,n){let t=new Map;for(let[o,r]of e)t.set(o,new Set(r));for(let[o,r]of n){let a=t.get(o)??new Set;for(let i of r)a.add(i);t.set(o,a)}return t}export{W as a,K as b,G as c,X as d,E as e};
|
|
2
|
-
//# sourceMappingURL=chunk-RNM6LMCF.js.map
|
package/dist/chunk-RVWSAMTT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as p,b as H,c as d,d as u}from"./chunk-BZ53S4ZN.js";import{a as b}from"./chunk-3VD3JMK2.js";import{a as R,b as g}from"./chunk-YWOOQ4FF.js";import{e as v}from"./chunk-HF25DFSC.js";function F(e,r={}){let{minSimilarity:h=.45,minSharedBehaviors:c=6,limit:t=20,scope:n,scanLimit:a,filePattern:l,focusFiles:f}=r,i=v(e,{scope:n,minBehaviorTokens:Math.max(3,c),scanLimit:a}).map(s=>({file:s.file,component:s.name,tokens:s.behaviorTokens,profile:s}));return b({profiles:i,limit:t,filePattern:l,focusFiles:f,compare:(s,o)=>y(s,o,h,c),sort:(s,o)=>o.similarity-s.similarity||s.fileA.localeCompare(o.fileA)||s.componentA.localeCompare(o.componentA)||s.fileB.localeCompare(o.fileB)||s.componentB.localeCompare(o.componentB)})}function y(e,r,h,c){let t=R(e.tokens,r.tokens);if(t.size<c||!A(t))return null;let n=H(e.tokens,r.tokens);if(n<h)return null;let a=d(t,"hook:"),l=d(t,"react-hook:"),f=d(t,"effect:"),i=d(t,"state:"),s=d(t,"request:"),o=d(t,"handler:"),k=d(t,"handler-verb:"),m=B({sharedHooks:a,sharedReactHooks:l,sharedEffects:f,sharedState:i,sharedRequests:s,sharedHandlers:o,sharedHandlerVerbs:k});return{fileA:e.file,componentA:e.component,fileB:r.file,componentB:r.component,similarity:n,sharedTokens:u(t),sharedHooks:a,sharedReactHooks:l,sharedEffects:f,sharedState:i,sharedRequests:s,sharedHandlers:o,sharedHandlerVerbs:k,evidenceClass:m.evidenceClass,actionTier:m.actionTier,evidenceClassReasons:m.reasons,recommendation:m.recommendation,uniqueToA:u(g(e.tokens,r.tokens)).slice(0,25),uniqueToB:u(g(r.tokens,e.tokens)).slice(0,25),reason:E({sharedHooks:a,sharedReactHooks:l,sharedEffects:f,sharedState:i,sharedRequests:s,sharedHandlers:o,sharedHandlerVerbs:k}),locA:e.profile.loc,locB:r.profile.loc}}function B(e){return p({genericWords:P,stripPrefixes:S,primitiveGroups:[{values:e.sharedReactHooks,reasonPrefix:"shared React primitives",bucket:"generic"},{values:e.sharedEffects,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedHooks,label:"shared hook",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedState,label:"shared state",fallbackBucket:"generic"},{names:e.sharedHandlers,label:"shared handler",fallbackBucket:"generic"},{names:e.sharedHandlerVerbs,label:"shared action verb",fallbackBucket:"generic"}],recommendation:C})}function C(e){switch(e){case"domain-behavior":return"Review for a shared hook, controller, or feature module around the named domain behavior.";case"mixed":return"Separate generic React mechanics from domain-specific behavior before extracting a shared hook.";case"shared-abstraction":return"Review the existing shared hook 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 hook-extraction evidence."}}function A(e){let r=0,h=0,c=0,t=0,n=0,a=0,l=0;for(let s of e)s.startsWith("hook:")?r+=1:s.startsWith("react-hook:")?h+=1:s.startsWith("effect:")?c+=1:s.startsWith("request:")?t+=1:s.startsWith("handler:")||s.startsWith("handler-verb:")?n+=1:s.startsWith("state:")?a+=1:s.startsWith("state-hook:")&&(l+=1);let f=a+l,i=r+h+c+t+n+f;return t>=1&&i>=4||r>=1&&(t>=1||a>=1||n>=2)&&i>=5||a>=1&&n>=2&&(c>=1||h>=2)&&i>=5}function E(e){let r=[];return e.sharedHooks.length&&r.push(`shared hooks: ${e.sharedHooks.join(", ")}`),e.sharedReactHooks.length&&r.push(`shared React hooks: ${e.sharedReactHooks.join(", ")}`),e.sharedEffects.length&&r.push(`shared effects: ${e.sharedEffects.join(", ")}`),e.sharedState.length&&r.push(`shared state: ${e.sharedState.join(", ")}`),e.sharedRequests.length&&r.push(`shared requests: ${e.sharedRequests.join(", ")}`),e.sharedHandlers.length&&r.push(`shared handlers: ${e.sharedHandlers.slice(0,6).join(", ")}`),e.sharedHandlerVerbs.length&&r.push(`shared action verbs: ${e.sharedHandlerVerbs.slice(0,6).join(", ")}`),r.join("; ")||"shared React behavior profile"}var P=new Set(["add","apply","async","callback","cancel","change","clear","close","create","data","delete","draft","edit","effect","error","fetch","filter","form","handle","has","is","item","items","load","loader","loading","memo","name","open","reducer","refresh","ref","remove","request","reset","resource","row","rows","save","saving","search","select","selected","state","store","submit","toggle","update","use","value"]),S=[/^use(?=[A-Z])/,/^handle(?=[A-Z])/,/^is(?=[A-Z])/,/^has(?=[A-Z])/];export{F as a};
|
|
2
|
-
//# sourceMappingURL=chunk-RVWSAMTT.js.map
|
package/dist/chunk-TK7O5ER5.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as y,b as d,e as w,n as f}from"./chunk-2KHTSEIL.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-TK7O5ER5.js.map
|
package/dist/chunk-TQ5W2H3S.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{appendFileSync as p,mkdirSync as u}from"fs";import{dirname as l}from"path";import{performance as i}from"perf_hooks";var E="SCIP_QUERY_PROFILE",M="SCIP_QUERY_PROFILE_OUT",P="SCIP_QUERY_PROFILE_COMMAND",s=new Set,a=!1;function c(){let e=process.env[E];return e==="1"||e==="true"}function m(){return process.env[M]}function O(){return process.env[P]}function g(e,n,o){if(!c())return n();let t=i.now();try{let r=n();return f({type:"span",name:e,durationMs:Math.round(i.now()-t),ok:!0,...d(o)??{}}),r}catch(r){throw f({type:"span",name:e,durationMs:Math.round(i.now()-t),ok:!1,error:r instanceof Error?r.message:String(r),...d(o)??{}}),r}}function f(e,n=m()){let o={timestamp:new Date().toISOString(),pid:process.pid,command:O(),...e},t=`${JSON.stringify(o)}
|
|
2
|
-
`;if(n)try{let r=l(n);s.has(r)||(u(r,{recursive:!0}),s.add(r)),p(n,t);return}catch(r){a||(a=!0,process.stderr.write(`[profile] failed to write ${n}: ${r instanceof Error?r.message:String(r)}
|
|
3
|
-
`));return}c()&&process.stderr.write(t)}function d(e){return typeof e=="function"?e():e}export{c as a,g as b};
|
|
4
|
-
//# sourceMappingURL=chunk-TQ5W2H3S.js.map
|
package/dist/chunk-USPV3T5K.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as re}from"./chunk-B75HZHUP.js";import{a as I}from"./chunk-5OST6GYB.js";import{b as Z,e as J,f as q,g as $}from"./chunk-C5CTSJ6X.js";import{a as ne}from"./chunk-RNM6LMCF.js";import{c as X,d as Q,e as Y,f as w,l as te}from"./chunk-KDFONWTW.js";import{e as ee}from"./chunk-OLTESY4K.js";import{b as p}from"./chunk-TQ5W2H3S.js";import{b as B}from"./chunk-P5RYBRIO.js";import{h as G,o as R}from"./chunk-2KHTSEIL.js";import{c as W,f as H,g as z,h as U,i as K,j as V}from"./chunk-JM72FNGA.js";import{a as j,d as L}from"./chunk-HF25DFSC.js";import{a as D}from"./chunk-DS6QEB3G.js";import{b as A,d as M,e as O}from"./chunk-XUGQU7PM.js";import{a as S}from"./chunk-64MNV6AB.js";import{b as v}from"./chunk-7S5E7KWT.js";var x=new WeakMap;function se(e,t){let n=j(t);if(!(n==="rust"||n==="typescript"||n==="tsx"||n==="javascript"))return[];let r=D(e,t);if(!r)return[];let s=A(e,t,r),a=M(e,"definition-exclusions",t,s);if(a){let c=Ee(a);if(c)return c}let u=n==="rust"?Ne(e,t):Le(e,t);return O(e,"definition-exclusions",t,s,JSON.stringify(u)),u}function Ee(e){try{let t=JSON.parse(e);return!Array.isArray(t)||!t.every(Ce)?null:t}catch{return null}}function Ce(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.startLine!="number"||!Number.isFinite(t.startLine)||typeof t.endLine!="number"||!Number.isFinite(t.endLine)||typeof t.reason!="string"?!1:t.containerName===void 0||typeof t.containerName=="string"}var oe=new Set(["describe","it","test","fdescribe","fit","xdescribe","xit","beforeEach","afterEach","beforeAll","afterAll","before","after","suite","bench","benchmark"]),ve=/\b(?:describe|it|test|fdescribe|fit|xdescribe|xit|beforeEach|afterEach|beforeAll|afterAll|before|after|suite|bench|benchmark)\s*\(/,De=/\b(?:export\s+)?(?:async\s+)?function\s+use[A-Z][A-Za-z0-9_$]*\b|\b(?:const|let|var)\s+use[A-Z][A-Za-z0-9_$]*\s*(?::[^=;]+)?=\s*(?:async\s*)?(?:function\b|(?:<[^=;{]+>\s*)?(?:\([^)]*\)|[A-Za-z_$][\w$]*)\s*=>)/;function Le(e,t){let n=D(e,t);if(!n||!we(n))return[];let i=L(e,t);if(!i)return[];let r=x.get(i);if(r)return r;let s=!1,a=i.rootNode;for(let c of a.namedChildren){if(c.type!=="expression_statement")continue;let d=c.namedChild(0);if(!d||d.type!=="call_expression")continue;let o=d.namedChild(0);if(!o)continue;let l=o.type==="member_expression"?o.namedChild(o.namedChildCount-1)?.text:o.text;if(l&&oe.has(l)){s=!0;break}}let u=[];s&&u.push({startLine:0,endLine:a.endPosition.row,reason:"TS/JS test file (describe/it/test at top level)"});for(let c of a.namedChildren){let d=null,o=null;if(c.type==="function_declaration")d=c.namedChild(0)?.text??null,o=c;else if(c.type==="export_statement"){let l=c.namedChild(0);l?.type==="function_declaration"&&(d=l.namedChild(0)?.text??null,o=l)}else if(c.type==="lexical_declaration"){let l=c.namedChild(0);if(l?.type==="variable_declarator"){let m=l.namedChild(0)?.text,y=l.namedChild(1);m&&(y?.type==="arrow_function"||y?.type==="function_expression")&&(d=m,o=l)}}d&&/^use[A-Z]/.test(d)&&o&&u.push({startLine:o.startPosition.row,endLine:o.endPosition.row,reason:"React custom hook (use*)"})}return u.push(...ae(i,new Set(["function_declaration","method_definition","class_declaration","interface_declaration","type_alias_declaration","enum_declaration","variable_declarator","export_statement"]),new Set(["comment"]))),x.set(i,u),u}function we(e){if(e.includes("scip-query"))return!0;let t=!1;for(let n of oe)if(e.includes(n)){t=!0;break}return t&&ve.test(e)?!0:e.includes("use")&&De.test(e)}var Ie=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale)?/i;function Pe(e){return Ie.test(e)}function ae(e,t,n){let i=[],r=s=>{if(t.has(s.type)&&s.parent){let u=s.parent.children,c=-1;for(let d=0;d<u.length;d+=1)if(u[d].startIndex===s.startIndex&&u[d].type===s.type){c=d;break}if(c>0)for(let d=c-1;d>=0;d-=1){let o=u[d];if(n.has(o.type)){if(Pe(o.text)){i.push({startLine:s.startPosition.row,endLine:s.endPosition.row,reason:"scip-query suppression comment"});break}continue}if(!(o.type==="attribute_item"||o.type==="inner_attribute_item"))break}}for(let a of s.namedChildren)r(a)};return r(e.rootNode),i}function Ne(e,t){let n=L(e,t);if(!n)return[];let i=x.get(n);if(i)return i;let r=[],s=ke(n);return s?(x.set(n,s),s):(ce(n.rootNode,r,!1,!1),r.push(...ae(n,new Set(["function_item","function_signature_item","struct_item","enum_item","union_item","impl_item","mod_item","static_item","const_item"]),new Set(["line_comment","block_comment"]))),r.push(...We(n.rootNode)),x.set(n,r),r)}function ke(e){return He(e.rootNode)?[{startLine:0,endLine:e.rootNode.endPosition.row,reason:"generated file (@generated header)"}]:null}function ce(e,t,n,i){let r=n,s=i;e.type==="trait_item"&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait declaration body (dynamic dispatch)"}),e.type==="impl_item"&&e.childForFieldName("trait")&&(s=!0,t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl block (dynamic dispatch)"})),e.type==="function_item"||e.type==="function_signature_item"?Fe(e,t,n,i):i&&Be(e)?t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl associated item (dynamic dispatch)"}):e.type==="struct_item"||e.type==="enum_item"||e.type==="union_item"?Te(e,t,n):e.type==="mod_item"&&P(e).some(a=>/#\[\s*cfg\s*\(\s*test\s*\)/.test(a))&&(r=!0);for(let a of e.namedChildren)ce(a,t,r,s)}function Fe(e,t,n,i){let r=P(e),s=null;i?s="trait impl method (dynamic dispatch)":n&&(s="inside #[cfg(test)] mod");for(let a of r){let u=Me(a);if(u){s=u;break}if(le(a)){s="#[allow(dead_code)]";break}}s&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:s})}function Te(e,t,n){let i=P(e),r=e.namedChildren.find(s=>s.type==="type_identifier")?.text;i.some(je)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[derive(<reflective>)] \u2014 fields accessed via macro/reflection",containerName:r}),i.some(le)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[allow(dead_code)]",containerName:r}),n&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"inside #[cfg(test)] mod",containerName:r})}function P(e){let t=e.parent;if(!t)return[];let n=t.children,i=-1;for(let s=0;s<n.length;s+=1)if(n[s].startIndex===e.startIndex&&n[s].type===e.type){i=s;break}if(i<=0)return[];let r=[];for(let s=i-1;s>=0;s-=1){let a=n[s];if(a.type==="attribute_item"||a.type==="inner_attribute_item")r.push(a.text);else{if(a.type==="line_comment"||a.type==="block_comment")continue;break}}return r}var Ae=[{re:/#\[\s*tauri::command\b/,reason:"#[tauri::command]"},{re:/#\[\s*command\b/,reason:"#[command]"},{re:/#\[\s*test\b/,reason:"#[test]"},{re:/#\[\s*bench\b/,reason:"#[bench]"},{re:/#\[\s*tokio::test\b/,reason:"#[tokio::test]"},{re:/#\[\s*async_std::test\b/,reason:"#[async_std::test]"},{re:/#\[\s*wasm_bindgen\b/,reason:"#[wasm_bindgen]"},{re:/#\[\s*no_mangle\b/,reason:"#[no_mangle]"},{re:/#\[\s*napi\b/,reason:"#[napi]"},{re:/#\[\s*pyfunction\b/,reason:"#[pyfunction]"},{re:/#\[\s*pymethod\b/,reason:"#[pymethod]"},{re:/#\[\s*pyo3\b/,reason:"#[pyo3]"},{re:/#\[\s*cfg\s*\(\s*test\s*\)/,reason:"#[cfg(test)]"},{re:/#\[\s*doc\s*\(\s*hidden\s*\)/,reason:"#[doc(hidden)]"}];function Me(e){return Ae.find(({re:t})=>t.test(e))?.reason??null}var Oe=[/\bSerialize\b/,/\bDeserialize\b/,/\bFromRow\b/,/\bsqlx::FromRow\b/,/\bDeriveEntityModel\b/,/\bIntoSchema\b/,/\bToSchema\b/,/\bDeriveValueType\b/,/\bError\b/,/\bthiserror::Error\b/];function je(e){return/#\[\s*derive\s*\(/.test(e)?Oe.some(t=>t.test(e)):!1}function le(e){return/#\[\s*allow\s*\(\s*dead_code\s*\)/.test(e)}function Be(e){return e.type==="const_item"||e.type==="type_item"||e.type==="static_item"||e.type==="associated_type"}function We(e){let t=Ue(e);if(t.size===0)return[];let n=[];for(let i of e.descendantsOfType("mod_item")){let r=i.childForFieldName("name")?.text;r&&t.has(r)&&n.push({startLine:i.startPosition.row,endLine:i.endPosition.row,reason:'serde `with = "..."` module \u2014 body invoked via reflection',containerName:r})}return n}function He(e){for(let t=0;t<Math.min(e.namedChildCount,12);t+=1){let n=e.namedChild(t);if(!n||n.type!=="line_comment"&&n.type!=="block_comment")break;if(/@generated\b/.test(n.text)||/This file is .*generated\b/i.test(n.text)||/Code generated by/i.test(n.text)||/Generated by:\s*https?:\/\/openapi-generator/i.test(n.text)||/openapi-generator/i.test(n.text)&&/Generated by/i.test(n.text))return!0}return!1}var ze=/^#!?\[\s*serde\s*\(/,ie=/\bwith\s*=\s*"([^"]+)"/g;function Ue(e){let t=new Set;for(let n of e.descendantsOfType("attribute_item")){if(!ze.test(n.text))continue;ie.lastIndex=0;let i;for(;(i=ie.exec(n.text))!==null;){let r=i[1],s=r.split("::").pop()??r;s&&t.add(s)}}return t}function ue(e){let t=new Map,n=i=>{let r=t.get(i);if(r)return r;let s=se(e,i);return r={ranges:s.map(a=>({startLine:a.startLine,endLine:a.endLine})),containers:new Set(s.map(a=>a.containerName).filter(a=>!!a))},t.set(i,r),r};return(i,r,s,a)=>{let u=n(i);for(let c of u.ranges)if(r>=c.startLine&&r<=c.endLine)return!0;if(a&&u.containers.has(a))return!0;for(let c of R(s))if(u.containers.has(c))return!0;return!1}}function mt(e,t={}){v(e,{groups:t.semanticProvider===!0?["whole-project","semantic-provider"]:["whole-project"]})}function de(e,t,n={}){v(e,{groups:n.definitions===!0?["source-file","definition-catalog"]:["source-file"],file:t.replace(/\\/g,"/")})}function me(e,t){return t.isIgnoredPath(e.relativePath)?b("ignored-file"):U(e.symbol)?b("module-like-symbol"):fe(e.symbol)?!e.isFunctionLike&&e.enclosingSymbol&&fe(e.enclosingSymbol)?b("nested-non-callable-value"):!t.includeTests&&!N(e.relativePath)?b("test-file"):!t.includeTests&&t.isExcludedRegion(e.relativePath,e.startLine,e.symbol,e.parentTypeName)?b("excluded-file-region"):K(e.symbol)?b("rust-trait-impl-member"):V(e.symbol)?b("rust-test-module"):!t.includeMembers&&!Ke(e)?b("member"):e.endLine-e.startLine+1<t.minLoc?b("below-min-loc"):{accepted:!0}:b("non-value-symbol")}function N(e){return Z(e)!=="test"}function b(e){return{accepted:!1,rejectionReason:e}}function fe(e){return z(e)||e.endsWith("().")||e.endsWith(".")}function Ke(e){return H(e.symbol)||R(e.symbol).length===0}function pe(){return new Map}function be(e,t,n){let i=new Map;for(let r of X(e,n))e.isIgnored(r.relative_path)||t.has(r.relative_path)||E(i,r.symbol_id,r.relative_path,r.ref_count,"scip-mention");return i}function ye(e,t,n){let i=new Set;for(let r of Q(e,t))e.isIgnored(r.relative_path)||n.has(r.relative_path)||i.add(r.symbol_id);return i}function k(e,t){let n=e.get(t);if(!n)return!1;for(let i of n.values())if(i.occurrences>0)return!0;return!1}function _(e,t,n){let i=e.get(t);if(!i)return!1;for(let[r,s]of i)if(r!==n&&s.occurrences>0)return!0;return!1}function ge(e){return e?.occurrences??0}function E(e,t,n,i,r="source-fallback"){if(i<=0)return;let s=xe(e,t,n);s.occurrences+=i,s.sources.add(r)}function he(e,t,n,i,r){if(i<=0)return;let s=xe(e,t,n);s.occurrences=Math.max(i,s.occurrences),s.sources.add(r)}function xe(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));let r=i.get(n);return r||(r={occurrences:0,sources:new Set},i.set(n,r)),r}var Ve=3e3,Ze=1e3;function jt(e,t={}){let{scope:n,minLoc:i=1,includeTests:r=!1,skipBarrels:s=!1,includeMembers:a=!1,deadCodeOnly:u=!1,scanLimit:c,semantic:d=!0}=t,o=0,l=p("dead.candidates",()=>{let f=re(Je(e,{scope:n,minLoc:i,includeTests:r,includeMembers:a}),c);return o=f.length,f},()=>({definitions:o})),m=s?new Set(J(e)):new Set,y=0,g=u?pe():p("dead.mention-reference-counts",()=>{let f=be(e,m,l.map(C=>C.symbolId));return y=f.size,f},()=>({definitions:l.length,symbolsWithReferences:y})),F=0,Re=u?p("dead.mentioned-symbol-ids",()=>{let f=ye(e,l.map(C=>C.symbolId),m);return F=f.size,f},()=>({definitions:l.length,referencedSymbols:F})):new Set,h=u?l.filter(f=>!Re.has(f.symbolId)):l.filter(f=>!_(g,f.symbolId,f.relativePath));u?p("dead.source-fallback.dead-code-only",()=>Qe(e,h,g,m),()=>({definitions:h.length})):p("dead.source-fallback.ast",()=>Xe(e,h,g,m),()=>({definitions:h.length}));let T=u?h.filter(f=>!k(g,f.symbolId)):h.filter(f=>!_(g,f.symbolId,f.relativePath));p("dead.caller-map-supplement",()=>rt(e,T,g,{includeTests:r,inactiveBarrelPaths:m,includeSemantic:!u&&d}),()=>({definitions:T.length,semantic:!u&&d}));let _e=u?h.filter(f=>!k(g,f.symbolId)):l;return Ge(e,qe(_e,g))}function Je(e,t){let n=ue(e),i=[];for(let r of G(e,t.scope))me(r,{minLoc:t.minLoc,includeTests:t.includeTests,includeMembers:t.includeMembers,isIgnoredPath:a=>e.isIgnored(a),isExcludedRegion:n}).accepted&&i.push(r);return i}function qe(e,t){return e.map(n=>$e(n,t)).filter(n=>n.cross_file_refs===0).sort((n,i)=>i.loc-n.loc||n.relative_path.localeCompare(i.relative_path)||n.start_line-i.start_line)}function $e(e,t){let n=t.get(e.symbolId)??new Map,i=ge(n.get(e.relativePath)),r=0;for(let[s,a]of n)s!==e.relativePath&&(r+=a.occurrences);return{relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine,loc:e.endLine-e.startLine+1,symbol:e.symbol,same_file_refs:i,cross_file_refs:r}}function Ge(e,t){let n=[],i=0,r=0,s=0;for(let a of t){if(e.isIgnored(a.relative_path)||q(e,a.relative_path)||$(e,a.symbol,a.relative_path))continue;let u=a.same_file_refs===0?"dead-code":"file-internal";u==="dead-code"?i++:r++,s+=a.loc,n.push({relativePath:a.relative_path,startLine:a.start_line,endLine:a.end_line,loc:a.loc,symbol:a.symbol,shortName:W(a.symbol),sameFileRefs:a.same_file_refs,kind:u})}return{symbols:n,counts:{total:n.length,deadCode:i,fileInternal:r,loc:s},totalCount:n.length,deadCodeCount:i,fileInternalCount:r,totalLoc:s}}function Xe(e,t,n,i){if(t.length===0)return;let r=new I(e),s=new Set(t.map(c=>c.symbolId)),a=new Set(t.map(c=>c.leaf).filter(Boolean)),u=new Set(r.sourceFiles());for(let c of S(e))u.add(c);r.scanSourceReferences({paths:u,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:a,skipPath:c=>i.has(c)},c=>{s.has(c.target.symbolId)&&(tt(e,c)||E(n,c.target.symbolId,c.sourceFile,nt(c),"source-fallback"))})}function Qe(e,t,n,i){if(t.length===0)return;let r=new I(e),s=Ye(t),a=new Set(r.sourceFiles());for(let o of S(e))a.add(o);let u=new Set(s.keys()),c=new Map,d=o=>{let l=c.get(o);return l||(l=te(e,o),c.set(o,l)),l};r.scanSourceReferences({paths:a,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:u,skipPath:o=>i.has(o),resolveTargets:({sourceFile:o,name:l,kind:m})=>{let y=s.get(l);return y?et(o,l,y,()=>d(o),{permissive:m!=="cross-language-dispatch"}):[]},afterPath:o=>{c.delete(o),de(e,o)}},o=>{let l=o.kind==="identifier"&&o.sourceFile===o.target.relativePath?Math.max(0,o.occurrences-1):o.occurrences;o.kind==="identifier"&&Se(e,{sourceFile:o.sourceFile,name:o.name,target:o.target,occurrences:l})||E(n,o.target.symbolId,o.sourceFile,l,"source-fallback")})}function Ye(e){let t=new Map;for(let n of e){if(!n.leaf)continue;let i=t.get(n.leaf)??[];i.push(n),t.set(n.leaf,i)}return t}function et(e,t,n,i,r){let s=n.filter(d=>d.relativePath===e);if(s.length>0)return s;if(!r.permissive&&n.length===1)return[...n];let a=i(),u=a.get(t);if(u)for(let d of u){let o=n.filter(l=>w(d,l.relativePath));if(o.length>0)return o}let c=new Set;for(let d of a.values())for(let o of d)c.add(o);for(let d of c){let o=n.filter(l=>w(d,l.relativePath));if(o.length>0&&o.length===n.length)return o}return r.permissive?[...n]:[]}function tt(e,t){return t.kind==="cross-language-dispatch"&&t.target.relativePath===t.sourceFile?!0:t.kind==="identifier"&&Se(e,t)}function nt(e){return e.kind==="identifier"&&e.target.relativePath===e.sourceFile?Math.max(0,e.occurrences-1):e.occurrences}function Se(e,t){return t.occurrences>1?!1:B(e,t.sourceFile).some(n=>n.used||n.sourcePath!==t.target.relativePath?!1:n.importedName===t.name||n.localName===t.name)}function rt(e,t,n,i){let r=i.includeSemantic!==!1,s=r&&t.length>=Ve&&S(e).length>=Ze,a=(o,l)=>{l===o.relativePath||e.isIgnored(l)||i.inactiveBarrelPaths.has(l)||!i.includeTests&&!N(l)||he(n,o.symbolId,l,1,"caller-map")};if(s?p("dead.caller-map.mention-chunks",()=>it(e,t,a),()=>({definitions:t.length})):p("dead.caller-map.per-symbol",()=>{for(let o of t){let l=ne(e,o,{semantic:r});if(l.length!==0)for(let m of l)a(o,m.file)}},()=>({definitions:t.length,semantic:r})),!s)return;let u=0,c=p("dead.caller-map.semantic-candidates",()=>{let o=t.filter(l=>!_(n,l.symbolId,l.relativePath));return u=o.length,o},()=>({definitions:t.length,semanticCandidates:u}));if(c.length===0)return;let d=ee(e,c);for(let o of c){let l=d.get(o.symbolId);if(l)for(let m of l)a(o,m)}}function it(e,t,n){let i=new Map(t.map(r=>[r.symbolId,r]));for(let r of Y(e,[...i.keys()])){let s=i.get(r.symbol_id);s&&n(s,r.relative_path)}}export{mt as a,jt as b};
|
|
2
|
-
//# sourceMappingURL=chunk-USPV3T5K.js.map
|
package/dist/chunk-UUBMFL3F.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import d from"ignore";import{readFileSync as c,existsSync as s}from"fs";import{dirname as l,isAbsolute as g,join as a,relative as u,resolve as v}from"path";function F(r){let e=d(),n=!1,t=b(r);for(let i of t)try{let o=c(i,"utf-8");e.add(o),n=!0}catch{}return n||e.add(h),{isIgnored:i=>f(e,r,i),filter:i=>i.filter(o=>!f(e,r,o))}}function b(r){let e=[],n=a(r,".gitignore");s(n)&&e.push(n);let t=l(r),i=0;for(;t!==l(t)&&i<5;){let o=a(t,".gitignore");if(s(o)&&e.push(o),s(a(t,".git")))break;t=l(t),i++}return e}var h=`
|
|
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 f(r,e,n){let t=m(e,n);if(!t)return!1;try{return r.ignores(t)}catch{return!1}}function m(r,e){if(!e||e===".")return null;if(!g(e)&&!e.startsWith(".."))return e.replaceAll("\\","/");let n=g(e)?e:v(r,e),t=u(r,n).replaceAll("\\","/");return!t||t==="."||t.startsWith("..")?null:t}export{F as a};
|
|
59
|
-
//# sourceMappingURL=chunk-UUBMFL3F.js.map
|
package/dist/chunk-VCQYSG2M.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{a as N}from"./chunk-RNM6LMCF.js";import{a as I,b as S}from"./chunk-TK7O5ER5.js";import{f as p,m as g}from"./chunk-2KHTSEIL.js";import{c as h,e as b}from"./chunk-JM72FNGA.js";function x(o,s,r={}){let{maxDepth:c=5,scope:a}=r,l=I(o,s);if(!l)return[];let u=[],f=new Set([l.symbolId]),m=new Set,t=[l];for(let e=1;e<=c&&t.length!==0;e++){let i=[];for(let y of t)for(let n of D(o,y,a)){let d=`${n.file}|${n.shortName}`;if(n.symbolId!==null){if(f.has(n.symbolId))continue;f.add(n.symbolId)}else if(m.has(d))continue;m.add(d),u.push({symbol:n.symbol,shortName:n.shortName,file:n.file,depth:e}),n.symbolId!==null&&n.symbolMatch&&i.push(n.symbolMatch)}t=i}return u.sort((e,i)=>e.depth-i.depth||e.file.localeCompare(i.file)),u}function D(o,s,r){let c=N(o,s,{limit:500}).filter(t=>!o.isIgnored(t.file)).filter(t=>!r||t.file.includes(r)),a=new Set(c.map(t=>t.file)),l=[];for(let t of M(o,s,r)){if(a.has(t))continue;let e=p(o,t),i=e.length>0?g(e,e[0].startLine):null;l.push({symbol:i?.symbol??t,file:t})}let u=[...c,...l],f=[],m=new Set;for(let t of u){let e=S(o,t.symbol);if(!e){let y=`${t.file}|${t.symbol}`;if(m.has(y))continue;m.add(y),f.push({symbolId:null,symbol:t.symbol,shortName:h(t.symbol),file:t.file,symbolMatch:null});continue}if(e.symbolId===s.symbolId||o.isIgnored(e.relativePath)||!_(e.symbol))continue;let i=`${e.symbolId}|${e.relativePath}`;m.has(i)||(m.add(i),f.push({symbolId:e.symbolId,symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,symbolMatch:e}))}return f}function M(o,s,r){let c=r?"AND consumer_d.relative_path LIKE ?":"",a=[s.symbolId,s.documentId];return r&&a.push(`%${r}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
|
|
2
|
-
FROM mentions m
|
|
3
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
4
|
-
JOIN documents consumer_d ON consumer_d.id = c.document_id
|
|
5
|
-
WHERE m.symbol_id = ?
|
|
6
|
-
AND m.role != 1
|
|
7
|
-
AND c.document_id != ?
|
|
8
|
-
${o.pathExclusionsFor("consumer_d")}
|
|
9
|
-
${c}`,...a).map(l=>l.relative_path).filter(l=>!o.isIgnored(l)))}function _(o){let s=b(o);return s==="method"||s==="type"||o.endsWith("().")}export{x as a};
|
|
10
|
-
//# sourceMappingURL=chunk-VCQYSG2M.js.map
|
package/dist/chunk-VUKC6F77.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{b as c}from"./chunk-P5RYBRIO.js";import{a}from"./chunk-64MNV6AB.js";import{c as d}from"./chunk-7S5E7KWT.js";var g=d("file-dep-graph",{clearGroups:["whole-project"]});function p(e,i){return g.get(e,i??"",()=>{let s=new Map,n=new Set(a(e,{includeIgnored:!1})),r=(t,o)=>f(e,s,n,t,o);for(let t of m(e,i))r(t.from_file,t.to_file);for(let t of n)if(!(i&&!t.includes(i)))for(let o of c(e,t))o.sourcePath&&r(t,o.sourcePath);return s})}function m(e,i){let s=i?`AND d1.relative_path LIKE '%${i}%'`:"";return e.all(`SELECT DISTINCT
|
|
2
|
-
d1.relative_path AS from_file,
|
|
3
|
-
d2.relative_path AS to_file
|
|
4
|
-
FROM mentions m
|
|
5
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
6
|
-
JOIN documents d1 ON c.document_id = d1.id
|
|
7
|
-
JOIN global_symbols gs ON m.symbol_id = gs.id
|
|
8
|
-
JOIN (
|
|
9
|
-
SELECT m2.symbol_id, c2.document_id
|
|
10
|
-
FROM mentions m2
|
|
11
|
-
JOIN chunks c2 ON m2.chunk_id = c2.id
|
|
12
|
-
WHERE m2.role = 1
|
|
13
|
-
GROUP BY m2.symbol_id
|
|
14
|
-
) sym_def ON sym_def.symbol_id = gs.id
|
|
15
|
-
JOIN documents d2 ON sym_def.document_id = d2.id
|
|
16
|
-
WHERE d1.id != d2.id
|
|
17
|
-
AND m.role != 1
|
|
18
|
-
${e.pathExclusionsFor("d1","d2")}
|
|
19
|
-
${s}`)}function f(e,i,s,n,r){if(n===r||e.isIgnored(n)||e.isIgnored(r)||!s.has(r))return;let t=i.get(n);t||(t=new Set,i.set(n,t)),t.add(r)}export{p as a};
|
|
20
|
-
//# sourceMappingURL=chunk-VUKC6F77.js.map
|
package/dist/chunk-W2CBNBEL.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import Ge from"better-sqlite3";import{existsSync as Wt,readFileSync as Ht,writeFileSync as Kt}from"fs";import{dirname as Bt,join as Jt,resolve as Ue}from"path";import oe from"better-sqlite3";import{execFileSync as ie}from"child_process";import{existsSync as se,readdirSync as ae,readFileSync as ue}from"fs";import{extname as m,join as F}from"path";import B from"ignore";import{readFileSync as J,existsSync as b}from"fs";import{dirname as S,isAbsolute as x,join as h,relative as z,resolve as q}from"path";function C(e){let t=B(),r=!1,n=Y(e);for(let i of n)try{let o=J(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 Y(e){let t=[],r=h(e,".gitignore");b(r)&&t.push(r);let n=S(e),i=0;for(;n!==S(n)&&i<5;){let o=h(n,".gitignore");if(b(o)&&t.push(o),b(h(n,".git")))break;n=S(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=Z(t,r);if(!n)return!1;try{return e.ignores(n)}catch{return!1}}function Z(e,t){if(!t||t===".")return null;if(!x(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let r=x(t)?t:q(e,t),n=z(e,r).replaceAll("\\","/");return!n||n==="."||n.startsWith("..")?null:n}import{readdirSync as ot}from"fs";import{execFileSync as st}from"child_process";import{extname as ut,join as ct}from"path";var ee=[];function k(e){e.groups.length>0&&ee.push(e)}function te(){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 T(e,t){let{cache:r,ensure:n}=te(),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 ne=[".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"],E=[".vue"],L=[".tsx",".jsx"],D=[".vue"],gt=[...L,...D],dt=new Set(L),ft=new Set(D),re=new Set(ne.map(e=>e.toLowerCase())),pt=[...re].sort().join(","),I=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);var mt=T("source-files",{clearGroups:[]});function Vt(e){let t=new Set((e.extensions??E).map(o=>o.toLowerCase()));if(t.size===0)return{scanned:0,inserted:0,existing:0};if(!se(e.dbPath))throw new Error(`SCIP SQLite database not found at ${e.dbPath}`);let r=C(e.projectRoot),n=ce(e.projectRoot,t).filter(o=>!r.isIgnored(o)),i=new oe(e.dbPath);try{let o=ge(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=ue(F(e.projectRoot,g),"utf-8"),X=s.run(de(g),g,d);p+=Number(X.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 ce(e,t){let r=le(e,t);if(r)return r;let n=[],i=o=>{let s=o?F(e,o):e,a;try{a=ae(s,{withFileTypes:!0})}catch{return}for(let u of a){if(I.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 le(e,t){try{return ie("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 ge(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 de(e){return m(e).toLowerCase()===".vue"?"vue":m(e).replace(/^\./,"").toLowerCase()||"source"}import{execFileSync as fe}from"child_process";import{createHash as pe}from"crypto";import{readdirSync as me,readFileSync as be}from"fs";import{join as O}from"path";function w(e){return(he(e)??ye(e)).filter(t=>t&&!A(t)).sort()}function Dt(e,t={}){return(t.language?w(e).filter(n=>Se(n,t.language,t.markerFiles)):w(e)).map(n=>{let i=O(e,n);try{let o=be(i);return{path:n,size:o.byteLength,hash:pe("sha256").update(o).digest("hex")}}catch{return{path:n,size:-1,hash:"unreadable"}}})}function Se(e,t,r){let n=e.split("/").at(-1)??e;if(r?.includes(e)||r?.includes(n)||Re.has(n))return!0;let i=e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:"";return(xe[t]??[]).includes(i)}function he(e){try{return fe("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 ye(e){let t=[],r=[""];for(;r.length>0;){let n=r.pop(),i=n?O(e,n):e,o;try{o=me(i,{withFileTypes:!0})}catch{continue}for(let s of o){let a=n?`${n}/${s.name}`:s.name;if(s.isDirectory()){A(a)||r.push(a);continue}t.push(a)}}return t}function A(e){return e.split("/").some(r=>ve.has(r))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var ve=new Set([".git","node_modules",".scipquery-cache",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]),Re=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"]),xe={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 Ve}from"module";import{existsSync as Ce,readFileSync as v}from"fs";import{dirname as N,extname as ke,join as _,relative as Te,resolve as At}from"path";import{pathToFileURL as Ee}from"url";function P(e,t){let{vueCore:r,ts:n,volarTs:i}=Le(e),{parsed:o,vueOptions:s}=De(r,n,t),a=N(t),u=r.createVueLanguagePlugin(n,o.options,s,d=>d),c=Ie(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=Ve(Ee(_(e,"package.json")).href);return{vueCore:y(t,"@vue/language-core",e),ts:y(t,"typescript",e),volarTs:y(t,"@volar/typescript",e)}}function De(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,N(r),void 0,r,void 0,e.getAllExtensions(o).map(s=>({extension:s.slice(1),isMixedContent:!0,scriptKind:t.ScriptKind.Deferred}))),vueOptions:o}}function Ie(e,t,r){let n={},i=e.createLanguage([r],new Map,o=>{if(!Ce(o))return;let s=v(o,"utf-8");n.current?.scripts.set(o,t.ScriptSnapshot.fromString(s),r.getLanguageId(o)??Ne(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 j(e,t,r){let n=we(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:Oe(u.starts,a.line,2)}}function we(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 Oe(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 M(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=je(n,r,t,o);return i.set(o,s),s}}}function G(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*U(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 $(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 Ae(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 W(e,t){return f(e,t).startsWith("node_modules/")}function f(e,t){return Te(e,t).replaceAll("\\","/")}function Ne(e){switch(ke(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 H(){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:_e(r)};return e.set(t,n),n}catch{return e.set(t,null),null}},positionAt:Ae}}function _e(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(_(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 je(e,t,r,n){let i=f(r,n),o=Me(t.name,t.version,i);return e.get(o)?.id??null}function Me(e,t,r){let n=r.split("/").map(i=>`\`${i.replaceAll("`","")}\``).join("/");return`scip-vue npm ${e} ${t} ${n}/default.`}function qt(e){let t=Ue(e.projectRoot,e.tsconfig),r=new Ge(e.dbPath,{readonly:!0});try{let n=$e({db:r,projectRoot:e.projectRoot,configPath:t,vueSymbolLookup:M(r,e.projectRoot)});return We({vueFiles:e.vueFiles??[],tasks:e.tasks,...n})}finally{r.close()}}function $e(e){let t=H();return{projectRoot:e.projectRoot,context:P(e.projectRoot,e.configPath),symbolLookup:j(e.db,e.projectRoot,t),vueSymbolLookup:e.vueSymbolLookup,sourceReader:t}}function We(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=He(e,i);t.push(...o.occurrences),r+=o.skippedReferences}return{occurrences:t,skippedReferences:r}}function He(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=[...U(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:Be(a),processedStarts:new Set};return Ke({...e,fileName:t.fileName,sourceInfo:i,sourceFile:s,map:o,tokenContext:u})}function Ke(e){let t=[],r=0;for(let n of e.tokenContext.tokens){if(e.tokenContext.processedStarts.has(n.start))continue;let i=$(e.map,n.start);if(i===null)continue;let s=(e.context.languageService.getDefinitionAtPosition(e.fileName,i+1)??[]).find(u=>!W(e.projectRoot,u.fileName));if(!s){r++;continue}let a=G(s,e.symbolLookup,e.vueSymbolLookup,e.context,e.projectRoot);if(a===null){r++;continue}K(t,e.sourceReader,e.sourceInfo,e.sourceFile,n,a),e.tokenContext.processedStarts.add(n.start),Xe(t,e,n,i,a)}return{occurrences:t,skippedReferences:r}}function Xe(e,t,r,n,i){if(!((t.tokenContext.tokenTextCounts.get(r.text)??0)<=1))for(let o of Je(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&&(K(e,t.sourceReader,t.sourceInfo,t.sourceFile,s,i),t.tokenContext.processedStarts.add(o))}}function K(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 Be(e){let t=new Map;for(let r of e)t.set(r.text,(t.get(r.text)??0)+1);return t}function Je(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=ze(n,c.textSpan.start,o,i.text);l!==null&&a.push(l)}return a}function ze(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{Vt as a,Dt as b,qt as c};
|
|
71
|
-
//# sourceMappingURL=chunk-W2CBNBEL.js.map
|
package/dist/chunk-W6BVEKYC.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{q as d}from"./chunk-KDFONWTW.js";import{a as h}from"./chunk-TK7O5ER5.js";import{g}from"./chunk-JM72FNGA.js";import{a as m}from"./chunk-DS6QEB3G.js";import{a as p}from"./chunk-64MNV6AB.js";function _(t,r,n={}){let e=h(t,r);if(!e)return[];let l=!g(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=d(t,e,{semantic:n.semantic}).map(o=>({relativePath:o.file,line:o.line})),s=R(t,e),f=new Set,a=[];for(let o of[...l,...c,...s]){let u=`${o.relativePath}:${o.line}`;f.has(u)||(f.add(u),a.push(o))}return a}function R(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=b(r.symbol);if(n.length===0)return[];let e=[];for(let i of p(t,{extensions:[".rb"],includeIgnored:!1})){let l=m(t,i);if(!l)continue;let c=l.split(`
|
|
2
|
-
`);for(let s=0;s<c.length;s++){let f=c[s]??"";n.some(a=>new RegExp(`@${a}\\b|\\b${a}:`).test(f))&&e.push({relativePath:i,line:s})}}return e}function b(t){let n=(t.split(":").pop()??t).replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^A-Za-z0-9_]+/g,"_").toLowerCase().replace(/^_+|_+$/g,""),e=n.split("_").filter(Boolean),i=new Set;return n&&i.add(n),e.length>=1&&i.add(e[e.length-1]),e.length>=2&&i.add(e.slice(-2).join("_")),[...i]}export{_ as a};
|
|
3
|
-
//# sourceMappingURL=chunk-W6BVEKYC.js.map
|
package/dist/chunk-WUCEKFQC.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as P}from"./chunk-LM5SHAN4.js";import{a as x}from"./chunk-PFOCOG57.js";import{a as v}from"./chunk-B75HZHUP.js";import{a as b}from"./chunk-5OST6GYB.js";import{a as g,g as p}from"./chunk-C5CTSJ6X.js";import{a as h}from"./chunk-BGBBVSH4.js";import{c as l,d as m,g as u}from"./chunk-JM72FNGA.js";import{b as f}from"./chunk-72KY2ZFO.js";import{b as d}from"./chunk-DS6QEB3G.js";import{basename as y,extname as L}from"path";function X(n,e){let{scope:i,maxLoc:t=15,limit:o=30,scanLimit:s}=e??{},a=new b(n);return x({candidates:()=>A(a,i,t),orderCandidates:v,scanLimit:s,prepare:r=>a.calleeMap(r,{semantic:e?.semantic!==!1}),evaluate:(r,c)=>S(n,r,c.get(r.symbolId)??[]),orderResults:(r,c)=>r.loc-c.loc||r.file.localeCompare(c.file),limit:o})}function S(n,e,i){let t=R(i);if(t.size!==1||!f(n,e.relativePath,e.startLine,e.endLine))return null;let[,o]=[...t.entries()][0],s=I(n,e,o),a=T(n,e),r=s.length>0||a.length>0?"signal":"direct";return{symbol:e.symbol,shortName:l(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:h(e),forwardsTo:o.symbol,forwardsToShort:l(o.symbol),forwardsToFile:o.file,actionTier:r,boundaryEvidence:s,publicFacadeEvidence:a,recommendation:D(r,s,a)}}function I(n,e,i){return P(n,e.relativePath,e.startLine,"passthrough","explicit ignore-passthrough comment",[{label:"passthrough name",value:l(e.symbol)},{label:"callee name",value:l(i.symbol)},{label:"passthrough module",value:y(e.relativePath,L(e.relativePath))},{label:"callee module",value:y(i.file,L(i.file))}])}function D(n,e,i){if(n==="signal"){if(i.length>0)return`Review the public API before inlining; public-facade evidence: ${i.slice(0,2).join("; ")}.`;let t=e.filter(C);return t.length>0?`Review the public API before inlining; public-surface evidence: ${t.slice(0,2).join("; ")}.`:`Review the boundary before inlining; boundary evidence: ${e.slice(0,2).join("; ")}.`}return"Inline or remove this passthrough unless an external API or runtime registration depends on the forwarding name."}function T(n,e){return E(n,e)?g(n,e.relativePath)?["exported passthrough is declared on the package public surface"]:p(n,e.symbol,e.relativePath)?["exported passthrough matches configured or framework public entry surface"]:[]:[]}function E(n,e){let i=d(n,e.relativePath);if(i.length===0)return!1;let t=i.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
|
|
2
|
-
`);return j.test(t)?!0:w(i,m(e.symbol))}function w(n,e){if(!e)return!1;let i=new RegExp(`^\\s*export\\s*\\{[^}\\n]*\\b${F(e)}\\b`);return n.some(t=>i.test(t))}function C(n){return n.includes("public surface")}function F(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function R(n){let e=n.some(t=>u(t.symbol))?n.filter(t=>u(t.symbol)):n,i=new Map;for(let t of e)i.has(t.symbol)||i.set(t.symbol,t);return i}function A(n,e,i){return n.productionCallableDefinitions({scope:e,minLoc:3,maxLoc:i,requireFunctionLikeSymbol:!0,excludeRustTraitImplMembers:!0})}var j=/^\s*export\s+(?:default\s+)?(?:(?:async\s+)?function\b|(?:const|let|var)\b)/m;export{X as a};
|
|
3
|
-
//# sourceMappingURL=chunk-WUCEKFQC.js.map
|
package/dist/chunk-XUGQU7PM.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{c as p}from"./chunk-7S5E7KWT.js";import{createHash as h}from"crypto";import{readFileSync as v}from"fs";import{dirname as g,join as f}from"path";import N from"better-sqlite3";var y="evidence.db",d=new WeakMap,m=p("evidence-content-hash",{clearGroups:["whole-project","source-file"]}),L=p("evidence-project-fingerprint",{clearGroups:["whole-project"]}),c="evidence-v1",E="version NOT LIKE 'evidence-%'";function T(n){return h("sha256").update(n).digest("hex")}function A(n,t,e){return m.get(n,t,()=>T(e))}function O(n){return L.get(n,"current",()=>{try{let t=JSON.parse(v(f(g(n.config.dbPath),"meta.json"),"utf-8"));if(t.version!==2&&t.version!==3||t.status!=="complete"||t.fingerprint===void 0)return null;let e=Array.isArray(t.indexedLanguages)?[...t.indexedLanguages].sort():[];return T(JSON.stringify({fingerprint:t.fingerprint,indexedLanguages:e}))}catch(t){return u("project fingerprint unavailable",t),null}})}function u(n,t){process.env.SCIP_QUERY_DEBUG&&console.error(`evidence-cache: ${n}: ${t instanceof Error?t.message:String(t)}`)}function s(n){if(d.has(n))return d.get(n)??null;let t=null;try{let e=new N(f(g(n.config.dbPath),y));e.pragma("journal_mode = WAL"),e.pragma("busy_timeout = 5000"),e.pragma("synchronous = NORMAL"),e.exec(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS file_evidence (
|
|
3
|
-
kind TEXT NOT NULL,
|
|
4
|
-
relative_path TEXT NOT NULL,
|
|
5
|
-
content_hash TEXT NOT NULL,
|
|
6
|
-
version TEXT NOT NULL,
|
|
7
|
-
payload TEXT NOT NULL,
|
|
8
|
-
PRIMARY KEY (kind, relative_path)
|
|
9
|
-
);
|
|
10
|
-
CREATE TABLE IF NOT EXISTS semantic_callees (
|
|
11
|
-
relative_path TEXT NOT NULL,
|
|
12
|
-
symbol TEXT NOT NULL,
|
|
13
|
-
content_hash TEXT NOT NULL,
|
|
14
|
-
deps_digest TEXT NOT NULL,
|
|
15
|
-
version TEXT NOT NULL,
|
|
16
|
-
payload TEXT NOT NULL,
|
|
17
|
-
PRIMARY KEY (relative_path, symbol)
|
|
18
|
-
);
|
|
19
|
-
CREATE TABLE IF NOT EXISTS semantic_references (
|
|
20
|
-
relative_path TEXT NOT NULL,
|
|
21
|
-
symbol TEXT NOT NULL,
|
|
22
|
-
project_fingerprint TEXT NOT NULL,
|
|
23
|
-
version TEXT NOT NULL,
|
|
24
|
-
payload TEXT NOT NULL,
|
|
25
|
-
PRIMARY KEY (relative_path, symbol)
|
|
26
|
-
);
|
|
27
|
-
`),t={evidence:e,readFileEvidence:e.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),readLegacyFileEvidence:e.prepare(`SELECT payload FROM file_evidence
|
|
28
|
-
WHERE kind = ? AND relative_path = ? AND content_hash = ? AND ${E}
|
|
29
|
-
ORDER BY version DESC
|
|
30
|
-
LIMIT 1`),writeFileEvidence:e.prepare("INSERT OR REPLACE INTO file_evidence (kind, relative_path, content_hash, version, payload) VALUES (?, ?, ?, ?, ?)"),readCallees:e.prepare(`SELECT payload FROM semantic_callees
|
|
31
|
-
WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCallees:e.prepare(`SELECT payload FROM semantic_callees
|
|
32
|
-
WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND ${E}
|
|
33
|
-
ORDER BY version DESC
|
|
34
|
-
LIMIT 1`),writeCallees:e.prepare(`INSERT OR REPLACE INTO semantic_callees
|
|
35
|
-
(relative_path, symbol, content_hash, deps_digest, version, payload) VALUES (?, ?, ?, ?, ?, ?)`),dropStaleCallees:e.prepare("DELETE FROM semantic_callees WHERE relative_path = ? AND content_hash != ?"),readReferences:e.prepare(`SELECT payload FROM semantic_references
|
|
36
|
-
WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferences:e.prepare(`SELECT payload FROM semantic_references
|
|
37
|
-
WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND ${E}
|
|
38
|
-
ORDER BY version DESC
|
|
39
|
-
LIMIT 1`),writeReferences:e.prepare(`INSERT OR REPLACE INTO semantic_references
|
|
40
|
-
(relative_path, symbol, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)`),dropStaleReferences:e.prepare("DELETE FROM semantic_references WHERE project_fingerprint != ?")}}catch(e){u("disabled (open failed)",e)}return d.set(n,t),t}function o(n,t,e){u(`disabled (${t})`,e),d.set(n,null)}function b(n,t,e,a){let r=s(n);if(!r)return null;try{return(r.readFileEvidence.get(t,e,a,c)??r.readLegacyFileEvidence.get(t,e,a))?.payload??null}catch(i){return o(n,"file_evidence read",i),null}}function w(n,t,e,a,r){let i=s(n);if(i)try{i.writeFileEvidence.run(t,e,a,c,r)}catch(l){o(n,"file_evidence write",l)}}function F(n,t,e,a,r){let i=s(n);if(!i)return null;try{return(i.readCallees.get(t,e,a,r,c)??i.readLegacyCallees.get(t,e,a,r))?.payload??null}catch(l){return o(n,"semantic_callees read",l),null}}function I(n,t,e,a){let r=s(n);if(!r)return null;try{return(r.readReferences.get(t,e,a,c)??r.readLegacyReferences.get(t,e,a))?.payload??null}catch(i){return o(n,"semantic_references read",i),null}}function x(n,t){if(t.length===0)return;let e=s(n);if(e)try{e.evidence.transaction(()=>{let a=new Set;for(let r of t){let i=`${r.relativePath}\0${r.contentHash}`;a.has(i)||(a.add(i),e.dropStaleCallees.run(r.relativePath,r.contentHash)),e.writeCallees.run(r.relativePath,r.symbol,r.contentHash,r.depsDigest,c,r.payload)}})()}catch(a){o(n,"semantic_callees write",a)}}function U(n,t){if(t.length===0)return;let e=s(n);if(e)try{e.evidence.transaction(()=>{let a=new Set;for(let r of t)a.has(r.projectFingerprint)||(a.add(r.projectFingerprint),e.dropStaleReferences.run(r.projectFingerprint)),e.writeReferences.run(r.relativePath,r.symbol,r.projectFingerprint,c,r.payload)})()}catch(a){o(n,"semantic_references write",a)}}function j(n){return typeof n=="object"&&n!==null}function X(n){return Array.isArray(n)&&n.every(t=>typeof t=="string")?n:null}export{T as a,A as b,O as c,b as d,w as e,F as f,I as g,x as h,U as i,j,X as k};
|
|
41
|
-
//# sourceMappingURL=chunk-XUGQU7PM.js.map
|
package/dist/chunk-Y5NBHMQX.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as D}from"./chunk-5OST6GYB.js";import{p as A}from"./chunk-KDFONWTW.js";import{b as d,d as h,f as y}from"./chunk-OLTESY4K.js";import{c as S}from"./chunk-JM72FNGA.js";function F(e,n={}){let{samples:o=50,scope:r,maxDisagreements:l=5}=n,s=new D(e),i=C(s.productionCallableDefinitions({scope:r,minLoc:2,requireFunctionLikeSymbol:!0}),o);if(i.length===0||!R(e,i))return{available:!1,sampleSize:i.length,oracleCoverage:0,scores:[],topDisagreements:[]};let c={references:v(),callees:v()},a=[],g=0,T=y(e,i);for(let t of i){let u=f(t,h(e,t).map(m=>m.file)),b=f(t,(T.get(t.symbolId)??[]).map(m=>m.file));if(u.size===0&&b.size===0)continue;g+=1;let Q=f(t,A(e,t).map(m=>m.file)),I=f(t,(s.calleeMap([t],{semantic:!1}).get(t.symbolId)??[]).map(m=>m.file));x(c.references,t,"references",Q,u,a),x(c.callees,t,"callees",I,b,a)}return a.sort((t,u)=>u.cheapOnly.length+u.oracleOnly.length-(t.cheapOnly.length+t.oracleOnly.length)),{available:!0,sampleSize:i.length,oracleCoverage:i.length>0?p(g/i.length):0,scores:["references","callees"].map(t=>O(t,c[t])),topDisagreements:a.slice(0,l)}}function v(){return{comparedSymbols:0,agreed:0,cheapTotal:0,oracleTotal:0}}function C(e,n){let o=[...e].sort((s,i)=>s.symbolId-i.symbolId);if(o.length<=n)return o;let r=o.length/n,l=[];for(let s=0;s<n;s++)l.push(o[Math.floor(s*r)]);return l}function R(e,n){let o=n[0];if(!o)return!1;try{return d(e,o.relativePath).availability().available}catch{return!1}}function f(e,n){let o=new Set;for(let r of n)r!==e.relativePath&&o.add(r);return o}function x(e,n,o,r,l,s){if(r.size===0&&l.size===0)return;e.comparedSymbols+=1,e.cheapTotal+=r.size,e.oracleTotal+=l.size;let i=[],c=[];for(let a of r)l.has(a)?e.agreed+=1:i.push(a);for(let a of l)r.has(a)||c.push(a);(i.length>0||c.length>0)&&s.push({symbol:S(n.symbol),question:o,cheapOnly:i,oracleOnly:c})}var z={references:!0,callees:!1};function O(e,n){let o=n.oracleTotal>0?n.agreed/n.oracleTotal:1,r=n.cheapTotal-n.agreed;return{question:e,comparedSymbols:n.comparedSymbols,precision:z[e]&&n.cheapTotal>0?p(n.agreed/n.cheapTotal):null,recall:p(o),unverified:r}}function p(e){return Math.round(e*1e3)/1e3}export{F as a};
|
|
2
|
-
//# sourceMappingURL=chunk-Y5NBHMQX.js.map
|
package/dist/chunk-YCOFCT4B.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-5OST6GYB.js";import{a as l}from"./chunk-TK7O5ER5.js";import{d as o,f as a}from"./chunk-JM72FNGA.js";import{basename as d}from"path";function M(t,c){let n=l(t,c);if(!n)return[];let r=o(n.symbol),s=new m(t).definitionsForFile(n.relativePath).filter(e=>a(e.symbol)),i=s.filter(e=>e.parentTypeName===r||e.symbol.includes(r));return(i.length>0?i:p(d(n.relativePath))===r?s.filter(e=>e.symbol.includes("<invalid-global-code>")):[]).map(e=>({startLine:e.startLine,endLine:e.endLine,name:o(e.symbol)}))}function p(t){return t.replace(/\.[^.]+$/,"")}export{M as a};
|
|
2
|
-
//# sourceMappingURL=chunk-YCOFCT4B.js.map
|
package/dist/chunk-YZA6PPZL.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as v,e as F,f as L,h as g,i as V}from"./chunk-DS6QEB3G.js";import{c as N}from"./chunk-A536TEU4.js";import{e as b}from"./chunk-7S5E7KWT.js";import{ElementTypes as M,NodeTypes as A,parse as Z}from"@vue/compiler-dom";import{parse as Ee}from"@vue/compiler-sfc";function P(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}var W=b("vue-template-facts"),H=new Set(["component","keep-alive","slot","suspense","teleport","template","transition","transition-group"]),G=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),Y=new Set(["div","span","template"]),K=new Set(["as","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","if","import","in","instanceof","let","new","null","of","return","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);function w(e,t){let n=t.replace(/\\/g,"/"),r=v(e,n);return W.get(e,n,r,()=>J(n,L(e,n).template))}function J(e,t){let n={relativePath:e,template:t?{startLine:t.startLine,endLine:t.endLine}:null,componentTags:[],nativeTags:[],builtinTags:[],props:[],events:[],directives:[],slots:[],expressionIdentifiers:[],structuralTokens:[]};if(!t)return n;let r;try{r=Z(t.body,{comments:!1})}catch{return n}let i=new Set,o=s=>{s.trim()&&i.add(s)};return B(r.children,t.startLine,n,o),n.structuralTokens=[...i].sort(),n}function B(e,t,n,r){for(let i of e)i.type===A.ELEMENT&&(Q(i,t,n,r),B(i.children,t,n,r))}function Q(e,t,n,r){let i=se(e.tag),o={tag:e.tag,normalized:i,kind:oe(e),startLine:h(t,e.loc.start.line),endLine:h(t,e.loc.end.line)};o.kind==="component"?(n.componentTags.push(o),r(`component:${i}`)):o.kind==="builtin"?(n.builtinTags.push(o),r(`builtin:${i}`)):(n.nativeTags.push(o),Y.has(e.tag)||r(`native:${e.tag}`));for(let s of e.props)X(s,t,n,r)}function X(e,t,n,r){if(e.type===A.ATTRIBUTE){let a=e.value?.content??null,u=_("prop",e.name,a,t,e.loc.start.line,e.loc.end.line);n.props.push(u),r(`prop:${e.name}`);return}let i=te(e),o=E(e.exp),s=_(ee(e.name),i,o,t,e.loc.start.line,e.loc.end.line);switch(s.kind){case"prop":n.props.push(s),r(`prop:${i}`);break;case"event":n.events.push(s),r(`event:${i}`);break;case"slot":n.slots.push(s),r(`slot:${i}`);break;case"directive":n.directives.push(s),r(`directive:${i}`);break}o&&ne(o,t,e.loc.start.line,n,r)}function _(e,t,n,r,i,o){return{kind:e,name:t,value:n,startLine:h(r,i),endLine:h(r,o)}}function ee(e){switch(e){case"bind":case"model":return"prop";case"on":return"event";case"slot":return"slot";default:return"directive"}}function te(e){let t=E(e.arg);return t||e.name}function E(e){if(!e)return null;let t=("content"in e&&typeof e.content=="string"?e.content:e.loc.source).trim();return t||null}function ne(e,t,n,r,i){for(let o of re(e)){let s={name:o,startLine:h(t,n),endLine:h(t,n)};r.expressionIdentifiers.push(s),i(`id:${o}`)}}function re(e){let t=new Set,n=ie(e),r=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,i;for(;i=r.exec(n);){let o=i[0];K.has(o)||/^[A-Z_]+$/.test(o)||t.add(o)}return[...t].sort()}function ie(e){return e.replace(/\/\*[\s\S]*?\*\//g," ").replace(/\/\/.*$/gm," ").replace(/`(?:\\[\s\S]|\$\{([^}]*)\}|[^`\\])*`/g,(t,n)=>n??" ").replace(/'(?:\\[\s\S]|[^'\\])*'/g," ").replace(/"(?:\\[\s\S]|[^"\\])*"/g," ")}function oe(e){let t=e.tag;return e.tagType===M.COMPONENT?"component":H.has(t)?"builtin":G.has(t)?"native":/^[A-Z]/.test(t)||t.includes("-")?"component":"native"}function se(e){return P(e,/[-_:]/)}function h(e,t){return e+Math.max(0,t-1)}function S(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var ae=new Set(["function_declaration","method_definition","method_signature","function_signature"]);function z(e,t){let n=ue(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:I(n.functionNode),params:$(n.functionNode),paramsEndLine:k(n.functionNode),isLiteralPassthrough:R(n.functionNode,t)};if(!ce(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(i=>i.type==="identifier"||i.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:I(e),params:$(e),paramsEndLine:k(e),isLiteralPassthrough:R(e,t)}:null}function U(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function $(e){let t=U(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(S(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let i=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),o=r.childForFieldName("pattern");if(!i&&o&&o.type==="identifier"){n.push({name:o.text,simple:!0});continue}let s=r.namedChildren.find(a=>a.type==="identifier");n.push({name:o?.type==="identifier"?o.text:s?.text??"",simple:!1})}return n}function k(e){let t=U(e);return t?t.endPosition.row:e.startPosition.row}function ce(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?ae.has(e):!1}function ue(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")return null;if(e.type==="variable_declarator"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);return!n||!r||r.type!=="arrow_function"&&r.type!=="function_expression"?null:{name:n.text,definitionNode:e,functionNode:r}}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);return!n||!r||r.type!=="arrow_function"&&r.type!=="function_expression"?null:{name:n.text,definitionNode:e,functionNode:r}}return null}function I(e){let t=e.namedChildren.find(r=>r.type==="parameters"||r.type==="formal_parameters");if(!t)return 0;let n=0;for(let r of t.namedChildren)S(r)||(n+=1);return n}function R(e,t){let n=e.namedChildren.find(c=>c.type==="block"||c.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(c=>!S(c));if(r.length!==1)return!1;let i=r[0],o=null;if(i.type==="return_statement"||i.type==="expression_statement"?o=i.namedChild(0)??null:t==="rust"&&(i.type==="call_expression"||i.type==="macro_invocation")&&(o=i),!o)return!1;let s=t==="python"?"call":"call_expression";if(o.type!==s)return!1;let a=o.namedChildren.find(c=>c.type==="arguments"||c.type==="argument_list");if(!a)return!1;let u=a.namedChildren.filter(c=>!S(c)),l=e.namedChildren.find(c=>c.type==="parameters"||c.type==="formal_parameters");if(!l)return!1;let m=[];for(let c of l.namedChildren){if(c.type==="identifier"){m.push(c.text);continue}let f=c.namedChildren.find(T=>T.type==="identifier");f&&m.push(f.text)}if(u.length!==m.length)return!1;for(let c=0;c<m.length;c+=1){let f=u[c];if(f.type!=="identifier"||f.text!==m[c])return!1}return!0}var le=new Set(["ref","shallowRef","reactive","computed","watch","watchEffect"]),pe=new Set(["onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","onActivated","onDeactivated","onErrorCaptured"]),me=new Set(["axios","fetch","runRequest","useAsyncData","useFetch","useResource"]),fe=new Set(["defineEmits","defineExpose","defineModel","defineOptions","defineProps","withDefaults"]),de=new Set(["catch","for","function","if","return","switch","while"]);function D(e){let t={imports:[],functions:[],calls:[],composables:[],stores:[],reactivity:[],lifecycle:[],requests:[],macros:[],lineCount:0,externalLineCount:0,externalScriptPaths:[],unresolvedScripts:[]};for(let n of e.scripts){t.lineCount+=g(n),n.external&&(t.externalLineCount+=g(n),t.externalScriptPaths.push(n.sourcePath));for(let i of n.errors)t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:i});if(!n.body||!n.astLanguage){n.astLanguage||t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:`Unsupported Vue script language: ${n.lang??"unknown"}`});continue}t.imports.push(...Se(n));let r=F(n.astLanguage,n.body);r?he(n,r.rootNode,t):ye(n,t)}return ge(t),t.externalScriptPaths=j(t.externalScriptPaths),t}function ge(e){e.composables=y(e,"composable"),e.stores=y(e,"store"),e.reactivity=y(e,"reactivity"),e.lifecycle=y(e,"lifecycle"),e.requests=y(e,"request"),e.macros=y(e,"macro")}function y(e,t){return j(e.calls.filter(n=>n.categories.includes(t)).map(n=>n.name))}function he(e,t,n){let r=new Set,i=new Set,o=s=>{let a=z(s,e.astLanguage);if(a){let l=`${a.name}:${a.startLine}:${a.endLine}`;i.has(l)||(i.add(l),n.functions.push({name:a.name,sourcePath:e.sourcePath,startLine:e.startLine+a.startLine,endLine:e.startLine+a.endLine,setup:e.setup}))}let u=V(s,e.astLanguage);if(u){let l=`${u.calleeLeaf}:${u.line}`;r.has(l)||(r.add(l),n.calls.push({name:u.calleeLeaf,sourcePath:e.sourcePath,line:e.startLine+u.line,categories:O(u.calleeLeaf),setup:e.setup}))}for(let l of s.children)o(l)};o(t)}function ye(e,t){for(let n of e.body.matchAll(/\b([A-Za-z_$][\w$]*)\s*\(/g)){let r=n[1];!r||de.has(r)||t.calls.push({name:r,sourcePath:e.sourcePath,line:e.startLine+x(e.body,n.index??0),categories:O(r),setup:e.setup})}for(let n of e.body.matchAll(/\bfunction\s+([A-Za-z_$][\w$]*)\b/g)){let r=n[1];if(!r)continue;let i=e.startLine+x(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:i,endLine:i,setup:e.setup})}for(let n of e.body.matchAll(/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function\b|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/g)){let r=n[1];if(!r)continue;let i=e.startLine+x(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:i,endLine:i,setup:e.setup})}}function Se(e){let t=[];for(let n of e.body.matchAll(/\bimport\s+(?:type\s+)?([^'";]+?)\s+from\s+['"]([^'"]+)['"]/g)){let r=n[1]?.trim(),i=n[2];if(!r||!i)continue;let o=e.startLine+x(e.body,n.index??0);for(let s of be(r))t.push({local:s,source:i,sourcePath:e.sourcePath,line:o,setup:e.setup})}return t}function be(e){let t=[],r=e.split(",").map(s=>s.trim()).filter(Boolean)[0];r&&!r.startsWith("{")&&!r.startsWith("*")&&t.push(r);let i=/\{([^}]*)\}/.exec(e)?.[1];if(i)for(let s of i.split(",")){let a=s.trim();if(!a)continue;let u=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(a)?.[1];t.push(u??a.replace(/^type\s+/,"").trim())}let o=/\*\s+as\s+([A-Za-z_$][\w$]*)/.exec(e)?.[1];return o&&t.push(o),t.filter(s=>/^[A-Za-z_$][\w$]*$/.test(s))}function O(e){let t=["call"];return/^use[A-Z0-9_]/.test(e)&&t.push("composable"),/^use[A-Z0-9_].*Store$/.test(e)&&t.push("store"),le.has(e)&&t.push("reactivity"),pe.has(e)&&t.push("lifecycle"),me.has(e)&&t.push("request"),fe.has(e)&&t.push("macro"),t}function x(e,t){let n=0;for(let r=0;r<t&&r<e.length;r+=1)e.charCodeAt(r)===10&&(n+=1);return n}function j(e){return[...new Set(e)].sort()}var ve=new Set(["in","key","of"]),Le=new Set(["computed","defineEmits","defineProps","reactive","ref","watch","watchEffect"]),xe=b("vue-component-behavior-profiles");function Xe(e,t={}){let n=N(e,{extensions:[".vue"]}).filter(i=>!t.scope||i.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).map(i=>Te(e,i)).filter(i=>(t.minTemplateTokens===void 0||i.templateTokens.size>=t.minTemplateTokens)&&(t.minBehaviorTokens===void 0||i.behaviorTokens.size>=t.minBehaviorTokens))}function Te(e,t){let n=t.replace(/\\/g,"/"),r=v(e,n),i=xe.get(e,n,r,()=>Ce(e,n,r));return Fe(i)}function Ce(e,t,n){let r=L(e,t),i=w(e,t),o=D(r),s=Pe(i),a=i.expressionIdentifiers.map(p=>p.name).filter(p=>!s.includes(p)).filter((p,d,C)=>C.indexOf(p)===d).sort(),u=i.componentTags.map(p=>p.normalized).filter((p,d,C)=>C.indexOf(p)===d).sort(),l=n?n.split(`
|
|
2
|
-
`).length:0,m=g(r.template),c=o.lineCount,f=r.styles.reduce((p,d)=>p+g(d),0),T=r.customBlocks.reduce((p,d)=>p+g(d),0);return{file:t,sfc:r,templateFacts:i,scriptFacts:o,templateTokens:new Set(i.structuralTokens),behaviorTokens:Ne(i,o,a),templateBindingNames:a,templateLocalNames:s,componentNames:u,sfcLines:l,totalLines:l+o.externalLineCount,templateLines:m,scriptLines:c,styleLines:f,externalScriptLines:o.externalLineCount,externalScriptPaths:o.externalScriptPaths,customBlockLines:T}}function Fe(e){let t=Ve(e.scriptFacts);return{...e,scriptFacts:t,templateTokens:new Set(e.templateTokens),behaviorTokens:new Set(e.behaviorTokens),templateBindingNames:[...e.templateBindingNames],templateLocalNames:[...e.templateLocalNames],componentNames:[...e.componentNames],externalScriptPaths:t.externalScriptPaths}}function Ve(e){return{...e,imports:e.imports.map(t=>({...t})),functions:e.functions.map(t=>({...t})),calls:e.calls.map(t=>({...t,categories:[...t.categories]})),composables:[...e.composables],stores:[...e.stores],reactivity:[...e.reactivity],lifecycle:[...e.lifecycle],requests:[...e.requests],macros:[...e.macros],externalScriptPaths:[...e.externalScriptPaths],unresolvedScripts:e.unresolvedScripts.map(t=>({...t}))}}function Ne(e,t,n){let r=new Set;for(let i of t.composables)r.add(`composable:${i}`);for(let i of t.stores)r.add(`store:${i}`);for(let i of t.reactivity)r.add(`reactivity:${i}`);for(let i of t.lifecycle)r.add(`lifecycle:${i}`);for(let i of t.requests)r.add(`request:${i}`);for(let i of t.macros)r.add(`macro:${i}`);for(let i of t.functions){if(Le.has(i.name))continue;r.add(`function:${i.name}`);let o=/^[a-z]+/.exec(i.name)?.[0]??null;o&&o.length>2&&o!==i.name&&r.add(`function-verb:${o}`)}for(let i of e.events)r.add(`template-event:${i.name}`);for(let i of n)r.add(`template-binding:${i}`);return r}function Pe(e){let t=new Set;for(let n of e.directives)if(n.name==="for"&&n.value)for(let r of _e(n.value))t.add(r);for(let n of e.slots)if(n.value)for(let r of q(n.value))t.add(r);return[...t].sort()}function _e(e){let t=/^(.*?)\s+(?:in|of)\s+/.exec(e.trim());return t?q(t[1]??""):[]}function q(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];ve.has(r)||t.push(r)}return t}export{z as a,P as b,Xe as c};
|
|
3
|
-
//# sourceMappingURL=chunk-YZA6PPZL.js.map
|