@aroman22/codegraph-vba-darwin-arm64 1.3.3
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/bin/codegraph +14 -0
- package/lib/dist/bin/codegraph.d.ts +26 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -0
- package/lib/dist/bin/codegraph.js +2018 -0
- package/lib/dist/bin/codegraph.js.map +1 -0
- package/lib/dist/bin/command-supervision.d.ts +12 -0
- package/lib/dist/bin/command-supervision.d.ts.map +1 -0
- package/lib/dist/bin/command-supervision.js +76 -0
- package/lib/dist/bin/command-supervision.js.map +1 -0
- package/lib/dist/bin/fatal-handler.d.ts +20 -0
- package/lib/dist/bin/fatal-handler.d.ts.map +1 -0
- package/lib/dist/bin/fatal-handler.js +118 -0
- package/lib/dist/bin/fatal-handler.js.map +1 -0
- package/lib/dist/bin/node-version-check.d.ts +37 -0
- package/lib/dist/bin/node-version-check.d.ts.map +1 -0
- package/lib/dist/bin/node-version-check.js +79 -0
- package/lib/dist/bin/node-version-check.js.map +1 -0
- package/lib/dist/bin/uninstall.d.ts +14 -0
- package/lib/dist/bin/uninstall.d.ts.map +1 -0
- package/lib/dist/bin/uninstall.js +36 -0
- package/lib/dist/bin/uninstall.js.map +1 -0
- package/lib/dist/context/formatter.d.ts +30 -0
- package/lib/dist/context/formatter.d.ts.map +1 -0
- package/lib/dist/context/formatter.js +263 -0
- package/lib/dist/context/formatter.js.map +1 -0
- package/lib/dist/context/index.d.ts +119 -0
- package/lib/dist/context/index.d.ts.map +1 -0
- package/lib/dist/context/index.js +1296 -0
- package/lib/dist/context/index.js.map +1 -0
- package/lib/dist/context/markers.d.ts +19 -0
- package/lib/dist/context/markers.d.ts.map +1 -0
- package/lib/dist/context/markers.js +22 -0
- package/lib/dist/context/markers.js.map +1 -0
- package/lib/dist/db/index.d.ts +122 -0
- package/lib/dist/db/index.d.ts.map +1 -0
- package/lib/dist/db/index.js +296 -0
- package/lib/dist/db/index.js.map +1 -0
- package/lib/dist/db/migrations.d.ts +44 -0
- package/lib/dist/db/migrations.d.ts.map +1 -0
- package/lib/dist/db/migrations.js +140 -0
- package/lib/dist/db/migrations.js.map +1 -0
- package/lib/dist/db/queries.d.ts +402 -0
- package/lib/dist/db/queries.d.ts.map +1 -0
- package/lib/dist/db/queries.js +1626 -0
- package/lib/dist/db/queries.js.map +1 -0
- package/lib/dist/db/schema.sql +152 -0
- package/lib/dist/db/sqlite-adapter.d.ts +53 -0
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -0
- package/lib/dist/db/sqlite-adapter.js +117 -0
- package/lib/dist/db/sqlite-adapter.js.map +1 -0
- package/lib/dist/directory.d.ts +179 -0
- package/lib/dist/directory.d.ts.map +1 -0
- package/lib/dist/directory.js +625 -0
- package/lib/dist/directory.js.map +1 -0
- package/lib/dist/errors.d.ts +136 -0
- package/lib/dist/errors.d.ts.map +1 -0
- package/lib/dist/errors.js +219 -0
- package/lib/dist/errors.js.map +1 -0
- package/lib/dist/extraction/astro-extractor.d.ts +79 -0
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/astro-extractor.js +320 -0
- package/lib/dist/extraction/astro-extractor.js.map +1 -0
- package/lib/dist/extraction/dfm-extractor.d.ts +31 -0
- package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/dfm-extractor.js +151 -0
- package/lib/dist/extraction/dfm-extractor.js.map +1 -0
- package/lib/dist/extraction/extraction-version.d.ts +25 -0
- package/lib/dist/extraction/extraction-version.d.ts.map +1 -0
- package/lib/dist/extraction/extraction-version.js +28 -0
- package/lib/dist/extraction/extraction-version.js.map +1 -0
- package/lib/dist/extraction/function-ref.d.ts +118 -0
- package/lib/dist/extraction/function-ref.d.ts.map +1 -0
- package/lib/dist/extraction/function-ref.js +727 -0
- package/lib/dist/extraction/function-ref.js.map +1 -0
- package/lib/dist/extraction/generated-detection.d.ts +30 -0
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -0
- package/lib/dist/extraction/generated-detection.js +83 -0
- package/lib/dist/extraction/generated-detection.js.map +1 -0
- package/lib/dist/extraction/grammars.d.ts +128 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -0
- package/lib/dist/extraction/grammars.js +537 -0
- package/lib/dist/extraction/grammars.js.map +1 -0
- package/lib/dist/extraction/index.d.ts +187 -0
- package/lib/dist/extraction/index.d.ts.map +1 -0
- package/lib/dist/extraction/index.js +1951 -0
- package/lib/dist/extraction/index.js.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts +12 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.js +275 -0
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.d.ts +25 -0
- package/lib/dist/extraction/languages/csharp.d.ts.map +1 -0
- package/lib/dist/extraction/languages/csharp.js +175 -0
- package/lib/dist/extraction/languages/csharp.js.map +1 -0
- package/lib/dist/extraction/languages/dart.d.ts +3 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -0
- package/lib/dist/extraction/languages/dart.js +374 -0
- package/lib/dist/extraction/languages/dart.js.map +1 -0
- package/lib/dist/extraction/languages/go.d.ts +3 -0
- package/lib/dist/extraction/languages/go.d.ts.map +1 -0
- package/lib/dist/extraction/languages/go.js +111 -0
- package/lib/dist/extraction/languages/go.js.map +1 -0
- package/lib/dist/extraction/languages/index.d.ts +10 -0
- package/lib/dist/extraction/languages/index.d.ts.map +1 -0
- package/lib/dist/extraction/languages/index.js +53 -0
- package/lib/dist/extraction/languages/index.js.map +1 -0
- package/lib/dist/extraction/languages/java.d.ts +3 -0
- package/lib/dist/extraction/languages/java.d.ts.map +1 -0
- package/lib/dist/extraction/languages/java.js +315 -0
- package/lib/dist/extraction/languages/java.js.map +1 -0
- package/lib/dist/extraction/languages/javascript.d.ts +3 -0
- package/lib/dist/extraction/languages/javascript.d.ts.map +1 -0
- package/lib/dist/extraction/languages/javascript.js +106 -0
- package/lib/dist/extraction/languages/javascript.js.map +1 -0
- package/lib/dist/extraction/languages/kotlin.d.ts +3 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -0
- package/lib/dist/extraction/languages/kotlin.js +379 -0
- package/lib/dist/extraction/languages/kotlin.js.map +1 -0
- package/lib/dist/extraction/languages/lua.d.ts +3 -0
- package/lib/dist/extraction/languages/lua.d.ts.map +1 -0
- package/lib/dist/extraction/languages/lua.js +150 -0
- package/lib/dist/extraction/languages/lua.js.map +1 -0
- package/lib/dist/extraction/languages/luau.d.ts +3 -0
- package/lib/dist/extraction/languages/luau.d.ts.map +1 -0
- package/lib/dist/extraction/languages/luau.js +37 -0
- package/lib/dist/extraction/languages/luau.js.map +1 -0
- package/lib/dist/extraction/languages/objc.d.ts +3 -0
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -0
- package/lib/dist/extraction/languages/objc.js +175 -0
- package/lib/dist/extraction/languages/objc.js.map +1 -0
- package/lib/dist/extraction/languages/pascal.d.ts +3 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal.js +77 -0
- package/lib/dist/extraction/languages/pascal.js.map +1 -0
- package/lib/dist/extraction/languages/php.d.ts +3 -0
- package/lib/dist/extraction/languages/php.d.ts.map +1 -0
- package/lib/dist/extraction/languages/php.js +196 -0
- package/lib/dist/extraction/languages/php.js.map +1 -0
- package/lib/dist/extraction/languages/python.d.ts +3 -0
- package/lib/dist/extraction/languages/python.d.ts.map +1 -0
- package/lib/dist/extraction/languages/python.js +56 -0
- package/lib/dist/extraction/languages/python.js.map +1 -0
- package/lib/dist/extraction/languages/r.d.ts +3 -0
- package/lib/dist/extraction/languages/r.d.ts.map +1 -0
- package/lib/dist/extraction/languages/r.js +314 -0
- package/lib/dist/extraction/languages/r.js.map +1 -0
- package/lib/dist/extraction/languages/ruby.d.ts +3 -0
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -0
- package/lib/dist/extraction/languages/ruby.js +149 -0
- package/lib/dist/extraction/languages/ruby.js.map +1 -0
- package/lib/dist/extraction/languages/rust.d.ts +3 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -0
- package/lib/dist/extraction/languages/rust.js +142 -0
- package/lib/dist/extraction/languages/rust.js.map +1 -0
- package/lib/dist/extraction/languages/scala.d.ts +3 -0
- package/lib/dist/extraction/languages/scala.d.ts.map +1 -0
- package/lib/dist/extraction/languages/scala.js +209 -0
- package/lib/dist/extraction/languages/scala.js.map +1 -0
- package/lib/dist/extraction/languages/swift.d.ts +3 -0
- package/lib/dist/extraction/languages/swift.d.ts.map +1 -0
- package/lib/dist/extraction/languages/swift.js +152 -0
- package/lib/dist/extraction/languages/swift.js.map +1 -0
- package/lib/dist/extraction/languages/typescript.d.ts +16 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -0
- package/lib/dist/extraction/languages/typescript.js +167 -0
- package/lib/dist/extraction/languages/typescript.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +59 -0
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/liquid-extractor.js +357 -0
- package/lib/dist/extraction/liquid-extractor.js.map +1 -0
- package/lib/dist/extraction/mybatis-extractor.d.ts +48 -0
- package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/mybatis-extractor.js +198 -0
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -0
- package/lib/dist/extraction/parse-pool.d.ts +126 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -0
- package/lib/dist/extraction/parse-pool.js +319 -0
- package/lib/dist/extraction/parse-pool.js.map +1 -0
- package/lib/dist/extraction/parse-worker.d.ts +8 -0
- package/lib/dist/extraction/parse-worker.d.ts.map +1 -0
- package/lib/dist/extraction/parse-worker.js +97 -0
- package/lib/dist/extraction/parse-worker.js.map +1 -0
- package/lib/dist/extraction/razor-extractor.d.ts +42 -0
- package/lib/dist/extraction/razor-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/razor-extractor.js +285 -0
- package/lib/dist/extraction/razor-extractor.js.map +1 -0
- package/lib/dist/extraction/sql-query-extractor.d.ts +25 -0
- package/lib/dist/extraction/sql-query-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/sql-query-extractor.js +177 -0
- package/lib/dist/extraction/sql-query-extractor.js.map +1 -0
- package/lib/dist/extraction/svelte-extractor.d.ts +56 -0
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/svelte-extractor.js +275 -0
- package/lib/dist/extraction/svelte-extractor.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +28 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.js +152 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-types.d.ts +239 -0
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -0
- package/lib/dist/extraction/tree-sitter-types.js +10 -0
- package/lib/dist/extraction/tree-sitter-types.js.map +1 -0
- package/lib/dist/extraction/tree-sitter.d.ts +647 -0
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -0
- package/lib/dist/extraction/tree-sitter.js +5647 -0
- package/lib/dist/extraction/tree-sitter.js.map +1 -0
- package/lib/dist/extraction/vba-extractor.d.ts +394 -0
- package/lib/dist/extraction/vba-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/vba-extractor.js +1716 -0
- package/lib/dist/extraction/vba-extractor.js.map +1 -0
- package/lib/dist/extraction/vba-form-extractor.d.ts +89 -0
- package/lib/dist/extraction/vba-form-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/vba-form-extractor.js +367 -0
- package/lib/dist/extraction/vba-form-extractor.js.map +1 -0
- package/lib/dist/extraction/vba-preprocess.d.ts +81 -0
- package/lib/dist/extraction/vba-preprocess.d.ts.map +1 -0
- package/lib/dist/extraction/vba-preprocess.js +287 -0
- package/lib/dist/extraction/vba-preprocess.js.map +1 -0
- package/lib/dist/extraction/vue-extractor.d.ts +51 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/vue-extractor.js +254 -0
- package/lib/dist/extraction/vue-extractor.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +38 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
- package/lib/dist/extraction/wasm-runtime-flags.js +106 -0
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -0
- package/lib/dist/graph/index.d.ts +8 -0
- package/lib/dist/graph/index.d.ts.map +1 -0
- package/lib/dist/graph/index.js +13 -0
- package/lib/dist/graph/index.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +106 -0
- package/lib/dist/graph/queries.d.ts.map +1 -0
- package/lib/dist/graph/queries.js +339 -0
- package/lib/dist/graph/queries.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +127 -0
- package/lib/dist/graph/traversal.d.ts.map +1 -0
- package/lib/dist/graph/traversal.js +540 -0
- package/lib/dist/graph/traversal.js.map +1 -0
- package/lib/dist/index.d.ts +563 -0
- package/lib/dist/index.d.ts.map +1 -0
- package/lib/dist/index.js +1041 -0
- package/lib/dist/index.js.map +1 -0
- package/lib/dist/installer/config-writer.d.ts +28 -0
- package/lib/dist/installer/config-writer.d.ts.map +1 -0
- package/lib/dist/installer/config-writer.js +91 -0
- package/lib/dist/installer/config-writer.js.map +1 -0
- package/lib/dist/installer/index.d.ts +100 -0
- package/lib/dist/installer/index.d.ts.map +1 -0
- package/lib/dist/installer/index.js +524 -0
- package/lib/dist/installer/index.js.map +1 -0
- package/lib/dist/installer/instructions-template.d.ts +41 -0
- package/lib/dist/installer/instructions-template.d.ts.map +1 -0
- package/lib/dist/installer/instructions-template.js +53 -0
- package/lib/dist/installer/instructions-template.js.map +1 -0
- package/lib/dist/installer/targets/antigravity.d.ts +57 -0
- package/lib/dist/installer/targets/antigravity.d.ts.map +1 -0
- package/lib/dist/installer/targets/antigravity.js +308 -0
- package/lib/dist/installer/targets/antigravity.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts +62 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -0
- package/lib/dist/installer/targets/claude.js +454 -0
- package/lib/dist/installer/targets/claude.js.map +1 -0
- package/lib/dist/installer/targets/codex.d.ts +18 -0
- package/lib/dist/installer/targets/codex.d.ts.map +1 -0
- package/lib/dist/installer/targets/codex.js +185 -0
- package/lib/dist/installer/targets/codex.js.map +1 -0
- package/lib/dist/installer/targets/cursor.d.ts +35 -0
- package/lib/dist/installer/targets/cursor.d.ts.map +1 -0
- package/lib/dist/installer/targets/cursor.js +254 -0
- package/lib/dist/installer/targets/cursor.js.map +1 -0
- package/lib/dist/installer/targets/gemini.d.ts +26 -0
- package/lib/dist/installer/targets/gemini.d.ts.map +1 -0
- package/lib/dist/installer/targets/gemini.js +165 -0
- package/lib/dist/installer/targets/gemini.js.map +1 -0
- package/lib/dist/installer/targets/hermes.d.ts +18 -0
- package/lib/dist/installer/targets/hermes.d.ts.map +1 -0
- package/lib/dist/installer/targets/hermes.js +359 -0
- package/lib/dist/installer/targets/hermes.js.map +1 -0
- package/lib/dist/installer/targets/kiro.d.ts +27 -0
- package/lib/dist/installer/targets/kiro.d.ts.map +1 -0
- package/lib/dist/installer/targets/kiro.js +178 -0
- package/lib/dist/installer/targets/kiro.js.map +1 -0
- package/lib/dist/installer/targets/opencode.d.ts +38 -0
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -0
- package/lib/dist/installer/targets/opencode.js +307 -0
- package/lib/dist/installer/targets/opencode.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts +35 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -0
- package/lib/dist/installer/targets/registry.js +91 -0
- package/lib/dist/installer/targets/registry.js.map +1 -0
- package/lib/dist/installer/targets/shared.d.ts +101 -0
- package/lib/dist/installer/targets/shared.d.ts.map +1 -0
- package/lib/dist/installer/targets/shared.js +264 -0
- package/lib/dist/installer/targets/shared.js.map +1 -0
- package/lib/dist/installer/targets/toml.d.ts +52 -0
- package/lib/dist/installer/targets/toml.d.ts.map +1 -0
- package/lib/dist/installer/targets/toml.js +147 -0
- package/lib/dist/installer/targets/toml.js.map +1 -0
- package/lib/dist/installer/targets/types.d.ts +108 -0
- package/lib/dist/installer/targets/types.d.ts.map +1 -0
- package/lib/dist/installer/targets/types.js +16 -0
- package/lib/dist/installer/targets/types.js.map +1 -0
- package/lib/dist/mcp/daemon-manager.d.ts +42 -0
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-manager.js +129 -0
- package/lib/dist/mcp/daemon-manager.js.map +1 -0
- package/lib/dist/mcp/daemon-paths.d.ts +73 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-paths.js +165 -0
- package/lib/dist/mcp/daemon-paths.js.map +1 -0
- package/lib/dist/mcp/daemon-registry.d.ts +47 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-registry.js +233 -0
- package/lib/dist/mcp/daemon-registry.js.map +1 -0
- package/lib/dist/mcp/daemon.d.ts +258 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -0
- package/lib/dist/mcp/daemon.js +770 -0
- package/lib/dist/mcp/daemon.js.map +1 -0
- package/lib/dist/mcp/dynamic-boundaries.d.ts +41 -0
- package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -0
- package/lib/dist/mcp/dynamic-boundaries.js +359 -0
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -0
- package/lib/dist/mcp/engine.d.ts +122 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -0
- package/lib/dist/mcp/engine.js +350 -0
- package/lib/dist/mcp/engine.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +113 -0
- package/lib/dist/mcp/index.d.ts.map +1 -0
- package/lib/dist/mcp/index.js +481 -0
- package/lib/dist/mcp/index.js.map +1 -0
- package/lib/dist/mcp/liveness-watchdog.d.ts +18 -0
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -0
- package/lib/dist/mcp/liveness-watchdog.js +207 -0
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -0
- package/lib/dist/mcp/ppid-watchdog.d.ts +62 -0
- package/lib/dist/mcp/ppid-watchdog.d.ts.map +1 -0
- package/lib/dist/mcp/ppid-watchdog.js +64 -0
- package/lib/dist/mcp/ppid-watchdog.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts +87 -0
- package/lib/dist/mcp/proxy.d.ts.map +1 -0
- package/lib/dist/mcp/proxy.js +641 -0
- package/lib/dist/mcp/proxy.js.map +1 -0
- package/lib/dist/mcp/query-pool.d.ts +94 -0
- package/lib/dist/mcp/query-pool.d.ts.map +1 -0
- package/lib/dist/mcp/query-pool.js +297 -0
- package/lib/dist/mcp/query-pool.js.map +1 -0
- package/lib/dist/mcp/query-worker.d.ts +24 -0
- package/lib/dist/mcp/query-worker.d.ts.map +1 -0
- package/lib/dist/mcp/query-worker.js +87 -0
- package/lib/dist/mcp/query-worker.js.map +1 -0
- package/lib/dist/mcp/server-instructions.d.ts +34 -0
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -0
- package/lib/dist/mcp/server-instructions.js +126 -0
- package/lib/dist/mcp/server-instructions.js.map +1 -0
- package/lib/dist/mcp/session.d.ts +79 -0
- package/lib/dist/mcp/session.d.ts.map +1 -0
- package/lib/dist/mcp/session.js +330 -0
- package/lib/dist/mcp/session.js.map +1 -0
- package/lib/dist/mcp/stdin-teardown.d.ts +27 -0
- package/lib/dist/mcp/stdin-teardown.d.ts.map +1 -0
- package/lib/dist/mcp/stdin-teardown.js +49 -0
- package/lib/dist/mcp/stdin-teardown.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +591 -0
- package/lib/dist/mcp/tools.d.ts.map +1 -0
- package/lib/dist/mcp/tools.js +4211 -0
- package/lib/dist/mcp/tools.js.map +1 -0
- package/lib/dist/mcp/transport.d.ts +188 -0
- package/lib/dist/mcp/transport.d.ts.map +1 -0
- package/lib/dist/mcp/transport.js +359 -0
- package/lib/dist/mcp/transport.js.map +1 -0
- package/lib/dist/mcp/version.d.ts +19 -0
- package/lib/dist/mcp/version.d.ts.map +1 -0
- package/lib/dist/mcp/version.js +71 -0
- package/lib/dist/mcp/version.js.map +1 -0
- package/lib/dist/project-config.d.ts +56 -0
- package/lib/dist/project-config.d.ts.map +1 -0
- package/lib/dist/project-config.js +297 -0
- package/lib/dist/project-config.js.map +1 -0
- package/lib/dist/reasoning/config.d.ts +45 -0
- package/lib/dist/reasoning/config.d.ts.map +1 -0
- package/lib/dist/reasoning/config.js +171 -0
- package/lib/dist/reasoning/config.js.map +1 -0
- package/lib/dist/reasoning/credentials.d.ts +5 -0
- package/lib/dist/reasoning/credentials.d.ts.map +1 -0
- package/lib/dist/reasoning/credentials.js +83 -0
- package/lib/dist/reasoning/credentials.js.map +1 -0
- package/lib/dist/reasoning/login.d.ts +21 -0
- package/lib/dist/reasoning/login.d.ts.map +1 -0
- package/lib/dist/reasoning/login.js +85 -0
- package/lib/dist/reasoning/login.js.map +1 -0
- package/lib/dist/reasoning/reasoner.d.ts +43 -0
- package/lib/dist/reasoning/reasoner.d.ts.map +1 -0
- package/lib/dist/reasoning/reasoner.js +308 -0
- package/lib/dist/reasoning/reasoner.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +5 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.js +1038 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +15 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.js +2926 -0
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts +9 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/astro.js +169 -0
- package/lib/dist/resolution/frameworks/astro.js.map +1 -0
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/cargo-workspace.js +225 -0
- package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts +8 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.js +241 -0
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -0
- package/lib/dist/resolution/frameworks/drupal.d.ts +51 -0
- package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/drupal.js +367 -0
- package/lib/dist/resolution/frameworks/drupal.js.map +1 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts +3 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/expo-modules.js +148 -0
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -0
- package/lib/dist/resolution/frameworks/express.d.ts +8 -0
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/express.js +308 -0
- package/lib/dist/resolution/frameworks/express.js.map +1 -0
- package/lib/dist/resolution/frameworks/fabric.d.ts +3 -0
- package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/fabric.js +354 -0
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -0
- package/lib/dist/resolution/frameworks/go.d.ts +8 -0
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/go.js +161 -0
- package/lib/dist/resolution/frameworks/go.js.map +1 -0
- package/lib/dist/resolution/frameworks/goframe.d.ts +41 -0
- package/lib/dist/resolution/frameworks/goframe.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/goframe.js +112 -0
- package/lib/dist/resolution/frameworks/goframe.js.map +1 -0
- package/lib/dist/resolution/frameworks/index.d.ts +50 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/index.js +169 -0
- package/lib/dist/resolution/frameworks/index.js.map +1 -0
- package/lib/dist/resolution/frameworks/java.d.ts +8 -0
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/java.js +509 -0
- package/lib/dist/resolution/frameworks/java.js.map +1 -0
- package/lib/dist/resolution/frameworks/laravel.d.ts +13 -0
- package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/laravel.js +257 -0
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts +26 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.js +698 -0
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -0
- package/lib/dist/resolution/frameworks/play.d.ts +19 -0
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/play.js +111 -0
- package/lib/dist/resolution/frameworks/play.js.map +1 -0
- package/lib/dist/resolution/frameworks/python.d.ts +10 -0
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/python.js +400 -0
- package/lib/dist/resolution/frameworks/python.js.map +1 -0
- package/lib/dist/resolution/frameworks/react-native.d.ts +3 -0
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react-native.js +410 -0
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -0
- package/lib/dist/resolution/frameworks/react.d.ts +8 -0
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react.js +334 -0
- package/lib/dist/resolution/frameworks/react.js.map +1 -0
- package/lib/dist/resolution/frameworks/ruby.d.ts +8 -0
- package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/ruby.js +302 -0
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -0
- package/lib/dist/resolution/frameworks/rust.d.ts +8 -0
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/rust.js +304 -0
- package/lib/dist/resolution/frameworks/rust.js.map +1 -0
- package/lib/dist/resolution/frameworks/svelte.d.ts +9 -0
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/svelte.js +253 -0
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -0
- package/lib/dist/resolution/frameworks/swift-objc.d.ts +37 -0
- package/lib/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/swift-objc.js +252 -0
- package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -0
- package/lib/dist/resolution/frameworks/swift.d.ts +10 -0
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/swift.js +400 -0
- package/lib/dist/resolution/frameworks/swift.js.map +1 -0
- package/lib/dist/resolution/frameworks/vue.d.ts +9 -0
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/vue.js +303 -0
- package/lib/dist/resolution/frameworks/vue.js.map +1 -0
- package/lib/dist/resolution/go-module.d.ts +26 -0
- package/lib/dist/resolution/go-module.d.ts.map +1 -0
- package/lib/dist/resolution/go-module.js +78 -0
- package/lib/dist/resolution/go-module.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.d.ts +28 -0
- package/lib/dist/resolution/goframe-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.js +158 -0
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -0
- package/lib/dist/resolution/import-resolver.d.ts +78 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -0
- package/lib/dist/resolution/import-resolver.js +1849 -0
- package/lib/dist/resolution/import-resolver.js.map +1 -0
- package/lib/dist/resolution/index.d.ts +196 -0
- package/lib/dist/resolution/index.d.ts.map +1 -0
- package/lib/dist/resolution/index.js +1328 -0
- package/lib/dist/resolution/index.js.map +1 -0
- package/lib/dist/resolution/lru-cache.d.ts +24 -0
- package/lib/dist/resolution/lru-cache.d.ts.map +1 -0
- package/lib/dist/resolution/lru-cache.js +62 -0
- package/lib/dist/resolution/lru-cache.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +93 -0
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -0
- package/lib/dist/resolution/name-matcher.js +1256 -0
- package/lib/dist/resolution/name-matcher.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +68 -0
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -0
- package/lib/dist/resolution/path-aliases.js +238 -0
- package/lib/dist/resolution/path-aliases.js.map +1 -0
- package/lib/dist/resolution/strip-comments.d.ts +27 -0
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -0
- package/lib/dist/resolution/strip-comments.js +443 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -0
- package/lib/dist/resolution/swift-objc-bridge.d.ts +134 -0
- package/lib/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
- package/lib/dist/resolution/swift-objc-bridge.js +256 -0
- package/lib/dist/resolution/swift-objc-bridge.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +233 -0
- package/lib/dist/resolution/types.d.ts.map +1 -0
- package/lib/dist/resolution/types.js +8 -0
- package/lib/dist/resolution/types.js.map +1 -0
- package/lib/dist/resolution/workspace-packages.d.ts +48 -0
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -0
- package/lib/dist/resolution/workspace-packages.js +208 -0
- package/lib/dist/resolution/workspace-packages.js.map +1 -0
- package/lib/dist/search/query-parser.d.ts +57 -0
- package/lib/dist/search/query-parser.d.ts.map +1 -0
- package/lib/dist/search/query-parser.js +177 -0
- package/lib/dist/search/query-parser.js.map +1 -0
- package/lib/dist/search/query-utils.d.ts +87 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -0
- package/lib/dist/search/query-utils.js +449 -0
- package/lib/dist/search/query-utils.js.map +1 -0
- package/lib/dist/sync/git-hooks.d.ts +45 -0
- package/lib/dist/sync/git-hooks.d.ts.map +1 -0
- package/lib/dist/sync/git-hooks.js +225 -0
- package/lib/dist/sync/git-hooks.js.map +1 -0
- package/lib/dist/sync/index.d.ts +19 -0
- package/lib/dist/sync/index.d.ts.map +1 -0
- package/lib/dist/sync/index.js +35 -0
- package/lib/dist/sync/index.js.map +1 -0
- package/lib/dist/sync/watch-policy.d.ts +48 -0
- package/lib/dist/sync/watch-policy.d.ts.map +1 -0
- package/lib/dist/sync/watch-policy.js +124 -0
- package/lib/dist/sync/watch-policy.js.map +1 -0
- package/lib/dist/sync/watcher.d.ts +358 -0
- package/lib/dist/sync/watcher.d.ts.map +1 -0
- package/lib/dist/sync/watcher.js +829 -0
- package/lib/dist/sync/watcher.js.map +1 -0
- package/lib/dist/sync/worktree.d.ts +54 -0
- package/lib/dist/sync/worktree.d.ts.map +1 -0
- package/lib/dist/sync/worktree.js +145 -0
- package/lib/dist/sync/worktree.js.map +1 -0
- package/lib/dist/telemetry/index.d.ts +143 -0
- package/lib/dist/telemetry/index.d.ts.map +1 -0
- package/lib/dist/telemetry/index.js +541 -0
- package/lib/dist/telemetry/index.js.map +1 -0
- package/lib/dist/types.d.ts +409 -0
- package/lib/dist/types.d.ts.map +1 -0
- package/lib/dist/types.js +101 -0
- package/lib/dist/types.js.map +1 -0
- package/lib/dist/ui/glyphs.d.ts +42 -0
- package/lib/dist/ui/glyphs.d.ts.map +1 -0
- package/lib/dist/ui/glyphs.js +78 -0
- package/lib/dist/ui/glyphs.js.map +1 -0
- package/lib/dist/ui/shimmer-progress.d.ts +11 -0
- package/lib/dist/ui/shimmer-progress.d.ts.map +1 -0
- package/lib/dist/ui/shimmer-progress.js +90 -0
- package/lib/dist/ui/shimmer-progress.js.map +1 -0
- package/lib/dist/ui/shimmer-worker.d.ts +2 -0
- package/lib/dist/ui/shimmer-worker.d.ts.map +1 -0
- package/lib/dist/ui/shimmer-worker.js +118 -0
- package/lib/dist/ui/shimmer-worker.js.map +1 -0
- package/lib/dist/ui/types.d.ts +17 -0
- package/lib/dist/ui/types.d.ts.map +1 -0
- package/lib/dist/ui/types.js +3 -0
- package/lib/dist/ui/types.js.map +1 -0
- package/lib/dist/upgrade/index.d.ts +132 -0
- package/lib/dist/upgrade/index.d.ts.map +1 -0
- package/lib/dist/upgrade/index.js +576 -0
- package/lib/dist/upgrade/index.js.map +1 -0
- package/lib/dist/utils.d.ts +224 -0
- package/lib/dist/utils.d.ts.map +1 -0
- package/lib/dist/utils.js +583 -0
- package/lib/dist/utils.js.map +1 -0
- package/lib/node_modules/.modules.yaml +45 -0
- package/lib/node_modules/.pnpm/lock.yaml +126 -0
- package/lib/node_modules/.pnpm-workspace-state-v1.json +25 -0
- package/lib/node_modules/@clack/core/CHANGELOG.md +397 -0
- package/lib/node_modules/@clack/core/LICENSE +9 -0
- package/lib/node_modules/@clack/core/README.md +22 -0
- package/lib/node_modules/@clack/core/dist/index.d.mts +469 -0
- package/lib/node_modules/@clack/core/dist/index.mjs +981 -0
- package/lib/node_modules/@clack/core/package.json +64 -0
- package/lib/node_modules/@clack/prompts/CHANGELOG.md +672 -0
- package/lib/node_modules/@clack/prompts/LICENSE +9 -0
- package/lib/node_modules/@clack/prompts/README.md +396 -0
- package/lib/node_modules/@clack/prompts/dist/index.d.mts +928 -0
- package/lib/node_modules/@clack/prompts/dist/index.mjs +1398 -0
- package/lib/node_modules/@clack/prompts/package.json +68 -0
- package/lib/node_modules/commander/LICENSE +22 -0
- package/lib/node_modules/commander/Readme.md +1176 -0
- package/lib/node_modules/commander/esm.mjs +16 -0
- package/lib/node_modules/commander/index.js +24 -0
- package/lib/node_modules/commander/lib/argument.js +150 -0
- package/lib/node_modules/commander/lib/command.js +2777 -0
- package/lib/node_modules/commander/lib/error.js +39 -0
- package/lib/node_modules/commander/lib/help.js +747 -0
- package/lib/node_modules/commander/lib/option.js +380 -0
- package/lib/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/lib/node_modules/commander/package-support.json +19 -0
- package/lib/node_modules/commander/package.json +82 -0
- package/lib/node_modules/commander/typings/esm.d.mts +3 -0
- package/lib/node_modules/commander/typings/index.d.ts +1113 -0
- package/lib/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
- package/lib/node_modules/fast-string-truncated-width/dist/index.js +111 -0
- package/lib/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
- package/lib/node_modules/fast-string-truncated-width/dist/types.js +2 -0
- package/lib/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
- package/lib/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
- package/lib/node_modules/fast-string-truncated-width/license +21 -0
- package/lib/node_modules/fast-string-truncated-width/package.json +35 -0
- package/lib/node_modules/fast-string-truncated-width/readme.md +59 -0
- package/lib/node_modules/fast-string-width/dist/index.d.ts +4 -0
- package/lib/node_modules/fast-string-width/dist/index.js +14 -0
- package/lib/node_modules/fast-string-width/license +21 -0
- package/lib/node_modules/fast-string-width/package.json +34 -0
- package/lib/node_modules/fast-string-width/readme.md +42 -0
- package/lib/node_modules/fast-wrap-ansi/LICENSE +23 -0
- package/lib/node_modules/fast-wrap-ansi/README.md +26 -0
- package/lib/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
- package/lib/node_modules/fast-wrap-ansi/lib/main.js +218 -0
- package/lib/node_modules/fast-wrap-ansi/package.json +51 -0
- package/lib/node_modules/ignore/LICENSE-MIT +21 -0
- package/lib/node_modules/ignore/README.md +452 -0
- package/lib/node_modules/ignore/index.d.ts +81 -0
- package/lib/node_modules/ignore/index.js +784 -0
- package/lib/node_modules/ignore/legacy.js +681 -0
- package/lib/node_modules/ignore/package.json +87 -0
- package/lib/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/lib/node_modules/jsonc-parser/LICENSE.md +21 -0
- package/lib/node_modules/jsonc-parser/README.md +364 -0
- package/lib/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
- package/lib/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
- package/lib/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
- package/lib/node_modules/jsonc-parser/lib/esm/main.js +178 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
- package/lib/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
- package/lib/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
- package/lib/node_modules/jsonc-parser/lib/umd/main.js +194 -0
- package/lib/node_modules/jsonc-parser/package.json +37 -0
- package/lib/node_modules/picomatch/LICENSE +21 -0
- package/lib/node_modules/picomatch/README.md +749 -0
- package/lib/node_modules/picomatch/index.js +17 -0
- package/lib/node_modules/picomatch/lib/constants.js +184 -0
- package/lib/node_modules/picomatch/lib/parse.js +1386 -0
- package/lib/node_modules/picomatch/lib/picomatch.js +349 -0
- package/lib/node_modules/picomatch/lib/scan.js +391 -0
- package/lib/node_modules/picomatch/lib/utils.js +72 -0
- package/lib/node_modules/picomatch/package.json +82 -0
- package/lib/node_modules/picomatch/posix.js +3 -0
- package/lib/node_modules/sisteransi/license +21 -0
- package/lib/node_modules/sisteransi/package.json +34 -0
- package/lib/node_modules/sisteransi/readme.md +113 -0
- package/lib/node_modules/sisteransi/src/index.js +58 -0
- package/lib/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
- package/lib/node_modules/tree-sitter-wasms/LICENSE +24 -0
- package/lib/node_modules/tree-sitter-wasms/README.md +23 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-bash.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-c.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-cpp.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-css.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-dart.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elisp.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elixir.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elm.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-embedded_template.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-go.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-html.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-java.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-javascript.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-json.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-kotlin.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-lua.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-objc.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ocaml.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-php.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-python.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ql.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-rescript.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ruby.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-rust.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-scala.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-solidity.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-swift.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-systemrdl.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-tlaplus.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-toml.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-tsx.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-typescript.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-vue.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-yaml.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-zig.wasm +0 -0
- package/lib/node_modules/tree-sitter-wasms/package.json +64 -0
- package/lib/node_modules/web-tree-sitter/LICENSE +21 -0
- package/lib/node_modules/web-tree-sitter/README.md +269 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.cjs +4558 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.cjs.map +7 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.js +4516 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.js.map +7 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.wasm +0 -0
- package/lib/node_modules/web-tree-sitter/debug/tree-sitter.wasm.map +31 -0
- package/lib/node_modules/web-tree-sitter/lib/alloc.c +48 -0
- package/lib/node_modules/web-tree-sitter/lib/alloc.h +41 -0
- package/lib/node_modules/web-tree-sitter/lib/array.h +291 -0
- package/lib/node_modules/web-tree-sitter/lib/atomic.h +68 -0
- package/lib/node_modules/web-tree-sitter/lib/clock.h +146 -0
- package/lib/node_modules/web-tree-sitter/lib/error_costs.h +11 -0
- package/lib/node_modules/web-tree-sitter/lib/get_changed_ranges.c +523 -0
- package/lib/node_modules/web-tree-sitter/lib/get_changed_ranges.h +36 -0
- package/lib/node_modules/web-tree-sitter/lib/host.h +21 -0
- package/lib/node_modules/web-tree-sitter/lib/language.c +293 -0
- package/lib/node_modules/web-tree-sitter/lib/language.h +293 -0
- package/lib/node_modules/web-tree-sitter/lib/length.h +52 -0
- package/lib/node_modules/web-tree-sitter/lib/lexer.c +483 -0
- package/lib/node_modules/web-tree-sitter/lib/lexer.h +54 -0
- package/lib/node_modules/web-tree-sitter/lib/lib.c +12 -0
- package/lib/node_modules/web-tree-sitter/lib/node.c +875 -0
- package/lib/node_modules/web-tree-sitter/lib/parser.c +2297 -0
- package/lib/node_modules/web-tree-sitter/lib/parser.h +286 -0
- package/lib/node_modules/web-tree-sitter/lib/point.h +48 -0
- package/lib/node_modules/web-tree-sitter/lib/query.c +4347 -0
- package/lib/node_modules/web-tree-sitter/lib/reduce_action.h +34 -0
- package/lib/node_modules/web-tree-sitter/lib/reusable_node.h +95 -0
- package/lib/node_modules/web-tree-sitter/lib/stack.c +912 -0
- package/lib/node_modules/web-tree-sitter/lib/stack.h +133 -0
- package/lib/node_modules/web-tree-sitter/lib/subtree.c +1034 -0
- package/lib/node_modules/web-tree-sitter/lib/subtree.h +399 -0
- package/lib/node_modules/web-tree-sitter/lib/tree-sitter.c +987 -0
- package/lib/node_modules/web-tree-sitter/lib/tree-sitter.cjs +2988 -0
- package/lib/node_modules/web-tree-sitter/lib/tree-sitter.wasm +0 -0
- package/lib/node_modules/web-tree-sitter/lib/tree-sitter.wasm.map +1 -0
- package/lib/node_modules/web-tree-sitter/lib/tree.c +170 -0
- package/lib/node_modules/web-tree-sitter/lib/tree.h +31 -0
- package/lib/node_modules/web-tree-sitter/lib/tree_cursor.c +716 -0
- package/lib/node_modules/web-tree-sitter/lib/tree_cursor.h +48 -0
- package/lib/node_modules/web-tree-sitter/lib/ts_assert.h +11 -0
- package/lib/node_modules/web-tree-sitter/lib/unicode.h +75 -0
- package/lib/node_modules/web-tree-sitter/lib/wasm_store.c +1937 -0
- package/lib/node_modules/web-tree-sitter/lib/wasm_store.h +31 -0
- package/lib/node_modules/web-tree-sitter/package.json +98 -0
- package/lib/node_modules/web-tree-sitter/src/bindings.ts +26 -0
- package/lib/node_modules/web-tree-sitter/src/constants.ts +133 -0
- package/lib/node_modules/web-tree-sitter/src/index.ts +31 -0
- package/lib/node_modules/web-tree-sitter/src/language.ts +291 -0
- package/lib/node_modules/web-tree-sitter/src/lookahead_iterator.ts +75 -0
- package/lib/node_modules/web-tree-sitter/src/marshal.ts +176 -0
- package/lib/node_modules/web-tree-sitter/src/node.ts +646 -0
- package/lib/node_modules/web-tree-sitter/src/parser.ts +325 -0
- package/lib/node_modules/web-tree-sitter/src/query.ts +973 -0
- package/lib/node_modules/web-tree-sitter/src/tree.ts +145 -0
- package/lib/node_modules/web-tree-sitter/src/tree_cursor.ts +318 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.cjs +4031 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.cjs.map +7 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.js +3980 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.js.map +7 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.wasm +0 -0
- package/lib/node_modules/web-tree-sitter/tree-sitter.wasm.map +30 -0
- package/lib/node_modules/web-tree-sitter/web-tree-sitter.d.ts +1030 -0
- package/lib/node_modules/web-tree-sitter/web-tree-sitter.d.ts.map +56 -0
- package/lib/package.json +57 -0
- package/node +0 -0
- package/package.json +17 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* VBA pre-processing pipeline.
|
|
4
|
+
*
|
|
5
|
+
* Pure helpers used by `VbaExtractor` before and during regex extraction:
|
|
6
|
+
*
|
|
7
|
+
* 1. joinLineContinuations(src)
|
|
8
|
+
* VBA uses a trailing ` _` (space + underscore) at the end of a line to
|
|
9
|
+
* mark line continuation. We collapse these into single logical lines so
|
|
10
|
+
* the regex sweeps downstream see one statement per regex match.
|
|
11
|
+
*
|
|
12
|
+
* 2. stripVbaComments(src)
|
|
13
|
+
* VBA has two comment forms:
|
|
14
|
+
* - apostrophe `'` — anything from the apostrophe to end-of-line
|
|
15
|
+
* - `Rem ` (case-insensitive keyword, with trailing space) — the legacy
|
|
16
|
+
* alternative to `'`
|
|
17
|
+
* Both are STRIPPED only when outside double-quoted strings. We walk
|
|
18
|
+
* character-by-character so a `'` inside `"..."` is preserved.
|
|
19
|
+
*
|
|
20
|
+
* 3. extractStringLiterals(src)
|
|
21
|
+
* Used by SQL-variable tracking to read literal fragments from assignments
|
|
22
|
+
* such as `m_SQL = "SELECT ..." & ...`. It returns every `"..."` span
|
|
23
|
+
* with its 1-based line and 0-based column. VBA doubles `"` inside literals
|
|
24
|
+
* (`""`) as the escape for a single `"` — the escape is consumed, the
|
|
25
|
+
* literal is returned without the doubling.
|
|
26
|
+
*
|
|
27
|
+
* Each helper is < 50 LOC, pure, and tested in isolation in
|
|
28
|
+
* `__tests__/extraction-vba-preprocess.test.ts`.
|
|
29
|
+
*
|
|
30
|
+
* Source unchanged guarantee: every helper treats `src` as read-only.
|
|
31
|
+
*/
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.joinLineContinuations = joinLineContinuations;
|
|
34
|
+
exports.stripVbaComments = stripVbaComments;
|
|
35
|
+
exports.extractStringLiterals = extractStringLiterals;
|
|
36
|
+
// -----------------------------------------------------------------------------
|
|
37
|
+
// 1. joinLineContinuations
|
|
38
|
+
// -----------------------------------------------------------------------------
|
|
39
|
+
/**
|
|
40
|
+
* Collapse VBA line continuations: any line whose last non-newline character is
|
|
41
|
+
* `_` (preceded by exactly one space, per VBA convention) is joined to the
|
|
42
|
+
* next line. A single space replaces the joined boundary.
|
|
43
|
+
*
|
|
44
|
+
* - Input : multi-line source
|
|
45
|
+
* - Output : source with continuation lines merged into the previous line
|
|
46
|
+
*
|
|
47
|
+
* Does NOT inspect string literals — VBA's continuation convention is line-
|
|
48
|
+
* physical (the underscore must be the last non-space char on the line), so a
|
|
49
|
+
* `"` followed by `_` inside a string is still a line continuation. In real
|
|
50
|
+
* Dysflow-exported code this never happens (continuations are syntactic, not
|
|
51
|
+
* inside string content), so we skip the cost of tracking string state.
|
|
52
|
+
*/
|
|
53
|
+
function joinLineContinuations(src) {
|
|
54
|
+
if (!src)
|
|
55
|
+
return src;
|
|
56
|
+
// VBA convention: " _\n" → join. **Preserve the newline AND the
|
|
57
|
+
// leading space** so the transformed source has the same line count
|
|
58
|
+
// AND the same intra-line whitespace as the original — the sweep
|
|
59
|
+
// patterns downstream are anchored and the space before `_` is
|
|
60
|
+
// meaningful for the joined line.
|
|
61
|
+
//
|
|
62
|
+
// Dangling ` _` at end-of-file (malformed input defensive) has no
|
|
63
|
+
// newline to preserve; replace with a single space.
|
|
64
|
+
return src.replace(/ _(?:(\r?\n)|$)/g, (_m, nl) => ' ' + (nl ?? ''));
|
|
65
|
+
}
|
|
66
|
+
// -----------------------------------------------------------------------------
|
|
67
|
+
// 2. stripVbaComments
|
|
68
|
+
// -----------------------------------------------------------------------------
|
|
69
|
+
const REM_PREFIX = /^Rem(\s|$)/i;
|
|
70
|
+
// Fix 5: handle trailing bare `Rem` at EOL (`\s|$` instead of `\s` alone).
|
|
71
|
+
const REM_MIDLINE = /\s+Rem(\s|$)/i;
|
|
72
|
+
const OPTION_DIRECTIVE = /^\s*Option\s+\w+/i;
|
|
73
|
+
/**
|
|
74
|
+
* Strip VBA comments from source. Walks character-by-character:
|
|
75
|
+
* - inside a double-quoted string: skip until the closing `"` (handling the
|
|
76
|
+
* `""` doubled-quote escape so it doesn't terminate the string early)
|
|
77
|
+
* - outside a string:
|
|
78
|
+
* * `'` to EOL → drop the rest of the line
|
|
79
|
+
* * line-start `Rem ` (case-insensitive) → drop the whole line
|
|
80
|
+
* * mid-line ` Rem ` (case-insensitive, with surrounding whitespace) →
|
|
81
|
+
* drop the rest of the line
|
|
82
|
+
* * `Option <word>` directive lines → drop the whole line
|
|
83
|
+
* * newline → end-of-line marker for the apostrophe rule
|
|
84
|
+
*
|
|
85
|
+
* The trailing whitespace of each stripped line is trimmed so a `code ' comment`
|
|
86
|
+
* becomes `code` (not `code `), keeping downstream regex anchored patterns
|
|
87
|
+
* from drifting on whitespace artifacts.
|
|
88
|
+
*
|
|
89
|
+
* Source is treated as read-only.
|
|
90
|
+
*/
|
|
91
|
+
function stripVbaComments(src) {
|
|
92
|
+
if (!src)
|
|
93
|
+
return src;
|
|
94
|
+
const lines = src.split('\n');
|
|
95
|
+
const out = [];
|
|
96
|
+
for (const rawLine of lines) {
|
|
97
|
+
// Whole-line `Rem` comment.
|
|
98
|
+
if (REM_PREFIX.test(rawLine)) {
|
|
99
|
+
// Push an empty placeholder so the line count matches the original
|
|
100
|
+
// source — node `startLine` values computed downstream as `i + 1`
|
|
101
|
+
// depend on line-count parity. Same for Option directives below.
|
|
102
|
+
out.push('');
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
// Option directives — inert compiler hints that emit no symbol.
|
|
106
|
+
if (OPTION_DIRECTIVE.test(rawLine)) {
|
|
107
|
+
out.push('');
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
let codeOnly = '';
|
|
111
|
+
let inString = false;
|
|
112
|
+
let i = 0;
|
|
113
|
+
while (i < rawLine.length) {
|
|
114
|
+
const ch = rawLine[i];
|
|
115
|
+
const next = rawLine[i + 1];
|
|
116
|
+
if (inString) {
|
|
117
|
+
if (ch === '"' && next === '"') {
|
|
118
|
+
codeOnly += '""';
|
|
119
|
+
i += 2;
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (ch === '"') {
|
|
123
|
+
inString = false;
|
|
124
|
+
codeOnly += '"';
|
|
125
|
+
i++;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
codeOnly += ch;
|
|
129
|
+
i++;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (ch === '"') {
|
|
133
|
+
inString = true;
|
|
134
|
+
codeOnly += '"';
|
|
135
|
+
i++;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if (ch === "'") {
|
|
139
|
+
// Apostrophe starts a comment — drop the rest of the line.
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
codeOnly += ch;
|
|
143
|
+
i++;
|
|
144
|
+
}
|
|
145
|
+
// Trim trailing whitespace left over from a stripped comment. Also
|
|
146
|
+
// strip a mid-line ` Rem ` (legacy Rem syntax allowed anywhere with
|
|
147
|
+
// surrounding whitespace) — the character-by-character walk above only
|
|
148
|
+
// handles `'`; VBA's `Rem` is keyword-driven and may appear mid-line.
|
|
149
|
+
//
|
|
150
|
+
// **String-aware**: the previous implementation ran `REM_MIDLINE`
|
|
151
|
+
// against the whole stripped line and would silently truncate string
|
|
152
|
+
// literals containing " Rem " (e.g. `"SELECT Rem FROM tbl"` became
|
|
153
|
+
// `"SELECT`). Audit W1 (June 2026). The fix splits into alternating
|
|
154
|
+
// code / string segments and only applies the regex to code segments.
|
|
155
|
+
let stripped = codeOnly.replace(/\s+$/, '');
|
|
156
|
+
stripped = stripRemInCodeSegments(stripped);
|
|
157
|
+
out.push(stripped);
|
|
158
|
+
}
|
|
159
|
+
return out.join('\n');
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Split `line` into alternating code / string-literal segments and apply
|
|
163
|
+
* `REM_MIDLINE` only to code segments. String segments are returned
|
|
164
|
+
* verbatim — a string like `"SELECT Rem FROM tbl"` is NOT truncated.
|
|
165
|
+
*/
|
|
166
|
+
function stripRemInCodeSegments(line) {
|
|
167
|
+
const segments = [];
|
|
168
|
+
let buf = '';
|
|
169
|
+
let inString = false;
|
|
170
|
+
let i = 0;
|
|
171
|
+
while (i < line.length) {
|
|
172
|
+
const ch = line[i];
|
|
173
|
+
const next = line[i + 1];
|
|
174
|
+
if (inString) {
|
|
175
|
+
buf += ch;
|
|
176
|
+
if (ch === '"' && next === '"') {
|
|
177
|
+
buf += next;
|
|
178
|
+
i += 2;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (ch === '"') {
|
|
182
|
+
inString = false;
|
|
183
|
+
segments.push({ text: buf, isString: true });
|
|
184
|
+
buf = '';
|
|
185
|
+
i++;
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
i++;
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
if (ch === '"') {
|
|
192
|
+
if (buf) {
|
|
193
|
+
segments.push({ text: buf, isString: false });
|
|
194
|
+
buf = '';
|
|
195
|
+
}
|
|
196
|
+
inString = true;
|
|
197
|
+
buf += ch;
|
|
198
|
+
i++;
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
buf += ch;
|
|
202
|
+
i++;
|
|
203
|
+
}
|
|
204
|
+
if (buf)
|
|
205
|
+
segments.push({ text: buf, isString: inString });
|
|
206
|
+
// Fix 5: once a `Rem` comment marker is found in a code segment, discard
|
|
207
|
+
// that segment from the Rem position onward AND all subsequent segments
|
|
208
|
+
// (which may be string literals from the comment body — they must not
|
|
209
|
+
// produce false SQL table references).
|
|
210
|
+
let remFound = false;
|
|
211
|
+
for (const s of segments) {
|
|
212
|
+
if (remFound) {
|
|
213
|
+
s.text = '';
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
if (!s.isString) {
|
|
217
|
+
const m = REM_MIDLINE.exec(s.text);
|
|
218
|
+
if (m) {
|
|
219
|
+
s.text = s.text.slice(0, m.index).replace(/\s+$/, '');
|
|
220
|
+
remFound = true;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return segments.map((s) => s.text).join('');
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Walk source and record every double-quoted string literal with its 1-based
|
|
228
|
+
* line and 0-based column. VBA's `""` escape is collapsed to a single `"` in
|
|
229
|
+
* the recorded `text`.
|
|
230
|
+
*
|
|
231
|
+
* The source is NOT mutated.
|
|
232
|
+
*/
|
|
233
|
+
function extractStringLiterals(src) {
|
|
234
|
+
if (!src)
|
|
235
|
+
return [];
|
|
236
|
+
const out = [];
|
|
237
|
+
let line = 1;
|
|
238
|
+
let col = 0;
|
|
239
|
+
let i = 0;
|
|
240
|
+
while (i < src.length) {
|
|
241
|
+
const ch = src[i];
|
|
242
|
+
if (ch === '"') {
|
|
243
|
+
const startLine = line;
|
|
244
|
+
const startCol = col;
|
|
245
|
+
let text = '';
|
|
246
|
+
i++;
|
|
247
|
+
col++;
|
|
248
|
+
while (i < src.length) {
|
|
249
|
+
const c = src[i];
|
|
250
|
+
if (c === '"' && src[i + 1] === '"') {
|
|
251
|
+
// Escape: keep one `"` in the recorded text.
|
|
252
|
+
text += '"';
|
|
253
|
+
i += 2;
|
|
254
|
+
col += 2;
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
if (c === '"') {
|
|
258
|
+
// Closing quote.
|
|
259
|
+
i++;
|
|
260
|
+
col++;
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
if (c === '\n') {
|
|
264
|
+
// Unterminated string at EOL — stop walking it but record what we have.
|
|
265
|
+
// (VBA actually does support multi-line string literals via embedded
|
|
266
|
+
// vbCrLf, but Dysflow never emits them; defensive stop is fine.)
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
text += c;
|
|
270
|
+
i++;
|
|
271
|
+
col++;
|
|
272
|
+
}
|
|
273
|
+
out.push({ text, line: startLine, column: startCol });
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
if (ch === '\n') {
|
|
277
|
+
line++;
|
|
278
|
+
col = 0;
|
|
279
|
+
i++;
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
i++;
|
|
283
|
+
col++;
|
|
284
|
+
}
|
|
285
|
+
return out;
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=vba-preprocess.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vba-preprocess.js","sourceRoot":"","sources":["../../src/extraction/vba-preprocess.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;AAoBH,sDAWC;AA6BD,4CA4EC;AAuFD,sDAsDC;AAnRD,gFAAgF;AAChF,2BAA2B;AAC3B,gFAAgF;AAEhF;;;;;;;;;;;;;GAaG;AACH,SAAgB,qBAAqB,CAAC,GAAW;IAC/C,IAAI,CAAC,GAAG;QAAE,OAAO,GAAG,CAAC;IACrB,gEAAgE;IAChE,oEAAoE;IACpE,iEAAiE;IACjE,+DAA+D;IAC/D,kCAAkC;IAClC,EAAE;IACF,kEAAkE;IAClE,oDAAoD;IACpD,OAAO,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAA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E,CAAC;gBACtB,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;gBACjB,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;oBACpC,6CAA6C;oBAC7C,IAAI,IAAI,GAAG,CAAC;oBACZ,CAAC,IAAI,CAAC,CAAC;oBACP,GAAG,IAAI,CAAC,CAAC;oBACT,SAAS;gBACX,CAAC;gBACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;oBACd,iBAAiB;oBACjB,CAAC,EAAE,CAAC;oBACJ,GAAG,EAAE,CAAC;oBACN,MAAM;gBACR,CAAC;gBACD,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;oBACf,wEAAwE;oBACxE,qEAAqE;oBACrE,iEAAiE;oBACjE,MAAM;gBACR,CAAC;gBACD,IAAI,IAAI,CAAC,CAAC;gBACV,CAAC,EAAE,CAAC;gBACJ,GAAG,EAAE,CAAC;YACR,CAAC;YACD,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;YACtD,SAAS;QACX,CAAC;QACD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;YAChB,IAAI,EAAE,CAAC;YACP,GAAG,GAAG,CAAC,CAAC;YACR,CAAC,EAAE,CAAC;YACJ,SAAS;QACX,CAAC;QACD,CAAC,EAAE,CAAC;QACJ,GAAG,EAAE,CAAC;IACR,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ExtractionResult } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* VueExtractor - Extracts code relationships from Vue Single-File Component files
|
|
4
|
+
*
|
|
5
|
+
* Vue SFCs are multi-language (script + template + style). Rather than
|
|
6
|
+
* parsing the full Vue grammar, we extract the <script> block content
|
|
7
|
+
* and delegate it to the TypeScript/JavaScript TreeSitterExtractor.
|
|
8
|
+
*
|
|
9
|
+
* Every .vue file produces a component node (Vue components are always importable).
|
|
10
|
+
*/
|
|
11
|
+
export declare class VueExtractor {
|
|
12
|
+
private filePath;
|
|
13
|
+
private source;
|
|
14
|
+
private nodes;
|
|
15
|
+
private edges;
|
|
16
|
+
private unresolvedReferences;
|
|
17
|
+
private errors;
|
|
18
|
+
constructor(filePath: string, source: string);
|
|
19
|
+
/**
|
|
20
|
+
* Extract from Vue source
|
|
21
|
+
*/
|
|
22
|
+
extract(): ExtractionResult;
|
|
23
|
+
/**
|
|
24
|
+
* Create a component node for the .vue file
|
|
25
|
+
*/
|
|
26
|
+
private createComponentNode;
|
|
27
|
+
/**
|
|
28
|
+
* Extract <script> and <script setup> blocks from the Vue source
|
|
29
|
+
*/
|
|
30
|
+
private extractScriptBlocks;
|
|
31
|
+
/**
|
|
32
|
+
* Process a script block by delegating to TreeSitterExtractor
|
|
33
|
+
*/
|
|
34
|
+
private processScriptBlock;
|
|
35
|
+
/**
|
|
36
|
+
* Extract component usages from the Vue `<template>`.
|
|
37
|
+
*
|
|
38
|
+
* PascalCase tags (`<Modal>`, `<Button />`) and kebab-case tags
|
|
39
|
+
* (`<my-button>`) both represent component instantiations — analogous to
|
|
40
|
+
* function calls in imperative code. Capturing them creates parent→child
|
|
41
|
+
* component edges and lets `callers` / `impact` see a component that is
|
|
42
|
+
* only ever used in markup. Vue's extractor previously parsed only the
|
|
43
|
+
* `<script>` block, so these usages produced no edge at all (#629).
|
|
44
|
+
*
|
|
45
|
+
* HTML elements (lowercase, no hyphen) and Vue built-ins are skipped.
|
|
46
|
+
* Unmatched names create no edge during resolution, so converting
|
|
47
|
+
* kebab-case is safe even for native custom elements.
|
|
48
|
+
*/
|
|
49
|
+
private extractTemplateComponents;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=vue-extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue-extractor.d.ts","sourceRoot":"","sources":["../../src/extraction/vue-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,gBAAgB,EAAkD,MAAM,UAAU,CAAC;AA4BxG;;;;;;;;GAQG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,oBAAoB,CAA6B;IACzD,OAAO,CAAC,MAAM,CAAyB;gBAE3B,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK5C;;OAEG;IACH,OAAO,IAAI,gBAAgB;IAmC3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyB3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAgD3B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA4D1B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,yBAAyB;CAgDlC"}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VueExtractor = void 0;
|
|
4
|
+
const tree_sitter_helpers_1 = require("./tree-sitter-helpers");
|
|
5
|
+
const tree_sitter_1 = require("./tree-sitter");
|
|
6
|
+
const grammars_1 = require("./grammars");
|
|
7
|
+
/**
|
|
8
|
+
* Vue built-in components — skipped so a `<Transition>` / `<KeepAlive>` in the
|
|
9
|
+
* template doesn't become a phantom reference to a user component. Checked
|
|
10
|
+
* AFTER kebab→Pascal conversion, so `<keep-alive>` is caught here too.
|
|
11
|
+
*/
|
|
12
|
+
const VUE_BUILTIN_COMPONENTS = new Set([
|
|
13
|
+
'Transition',
|
|
14
|
+
'TransitionGroup',
|
|
15
|
+
'KeepAlive',
|
|
16
|
+
'Suspense',
|
|
17
|
+
'Teleport',
|
|
18
|
+
'Component',
|
|
19
|
+
'Slot',
|
|
20
|
+
]);
|
|
21
|
+
/** `my-component` → `MyComponent` (Vue allows either form in templates). */
|
|
22
|
+
function kebabToPascal(name) {
|
|
23
|
+
return name
|
|
24
|
+
.split('-')
|
|
25
|
+
.map((part) => (part ? part[0].toUpperCase() + part.slice(1) : ''))
|
|
26
|
+
.join('');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* VueExtractor - Extracts code relationships from Vue Single-File Component files
|
|
30
|
+
*
|
|
31
|
+
* Vue SFCs are multi-language (script + template + style). Rather than
|
|
32
|
+
* parsing the full Vue grammar, we extract the <script> block content
|
|
33
|
+
* and delegate it to the TypeScript/JavaScript TreeSitterExtractor.
|
|
34
|
+
*
|
|
35
|
+
* Every .vue file produces a component node (Vue components are always importable).
|
|
36
|
+
*/
|
|
37
|
+
class VueExtractor {
|
|
38
|
+
filePath;
|
|
39
|
+
source;
|
|
40
|
+
nodes = [];
|
|
41
|
+
edges = [];
|
|
42
|
+
unresolvedReferences = [];
|
|
43
|
+
errors = [];
|
|
44
|
+
constructor(filePath, source) {
|
|
45
|
+
this.filePath = filePath;
|
|
46
|
+
this.source = source;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Extract from Vue source
|
|
50
|
+
*/
|
|
51
|
+
extract() {
|
|
52
|
+
const startTime = Date.now();
|
|
53
|
+
try {
|
|
54
|
+
// Create component node for the .vue file itself
|
|
55
|
+
const componentNode = this.createComponentNode();
|
|
56
|
+
// Extract and process script blocks
|
|
57
|
+
const scriptBlocks = this.extractScriptBlocks();
|
|
58
|
+
for (const block of scriptBlocks) {
|
|
59
|
+
this.processScriptBlock(block, componentNode.id);
|
|
60
|
+
}
|
|
61
|
+
// Extract component usages from the <template> (<ComponentName>).
|
|
62
|
+
// Without this, a Vue component used only in another component's
|
|
63
|
+
// markup (incl. through a barrel import) is invisible to callers /
|
|
64
|
+
// impact (#629 follow-up).
|
|
65
|
+
this.extractTemplateComponents(componentNode.id);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
this.errors.push({
|
|
69
|
+
message: `Vue extraction error: ${error instanceof Error ? error.message : String(error)}`,
|
|
70
|
+
severity: 'error',
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
nodes: this.nodes,
|
|
75
|
+
edges: this.edges,
|
|
76
|
+
unresolvedReferences: this.unresolvedReferences,
|
|
77
|
+
errors: this.errors,
|
|
78
|
+
durationMs: Date.now() - startTime,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Create a component node for the .vue file
|
|
83
|
+
*/
|
|
84
|
+
createComponentNode() {
|
|
85
|
+
const lines = this.source.split('\n');
|
|
86
|
+
const fileName = this.filePath.split(/[/\\]/).pop() || this.filePath;
|
|
87
|
+
const componentName = fileName.replace(/\.vue$/, '');
|
|
88
|
+
const id = (0, tree_sitter_helpers_1.generateNodeId)(this.filePath, 'component', componentName, 1);
|
|
89
|
+
const node = {
|
|
90
|
+
id,
|
|
91
|
+
kind: 'component',
|
|
92
|
+
name: componentName,
|
|
93
|
+
qualifiedName: `${this.filePath}::${componentName}`,
|
|
94
|
+
filePath: this.filePath,
|
|
95
|
+
language: 'vue',
|
|
96
|
+
startLine: 1,
|
|
97
|
+
endLine: lines.length,
|
|
98
|
+
startColumn: 0,
|
|
99
|
+
endColumn: lines[lines.length - 1]?.length || 0,
|
|
100
|
+
isExported: true, // Vue components are always importable
|
|
101
|
+
updatedAt: Date.now(),
|
|
102
|
+
};
|
|
103
|
+
this.nodes.push(node);
|
|
104
|
+
return node;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Extract <script> and <script setup> blocks from the Vue source
|
|
108
|
+
*/
|
|
109
|
+
extractScriptBlocks() {
|
|
110
|
+
const blocks = [];
|
|
111
|
+
const scriptRegex = /<script(\s[^>]*)?>(?<content>[\s\S]*?)<\/script>/g;
|
|
112
|
+
let match;
|
|
113
|
+
while ((match = scriptRegex.exec(this.source)) !== null) {
|
|
114
|
+
const attrs = match[1] || '';
|
|
115
|
+
const content = match.groups?.content || match[2] || '';
|
|
116
|
+
// Detect TypeScript from lang attribute
|
|
117
|
+
const isTypeScript = /lang\s*=\s*["'](ts|typescript)["']/.test(attrs);
|
|
118
|
+
// Detect <script setup>
|
|
119
|
+
const isSetup = /\bsetup\b/.test(attrs);
|
|
120
|
+
// Calculate the 0-indexed line where the content begins. The content
|
|
121
|
+
// starts right after the opening tag's `>` — its leading `\n` is part
|
|
122
|
+
// of the content, so relative line 1 sits ON the tag's closing line
|
|
123
|
+
// (adding 1 here double-counted the embedded newline and shifted every
|
|
124
|
+
// script-block symbol down a line).
|
|
125
|
+
const beforeScript = this.source.substring(0, match.index);
|
|
126
|
+
const scriptTagLine = (beforeScript.match(/\n/g) || []).length;
|
|
127
|
+
const openingTag = match[0].substring(0, match[0].indexOf('>') + 1);
|
|
128
|
+
const openingTagLines = (openingTag.match(/\n/g) || []).length;
|
|
129
|
+
const contentStartLine = scriptTagLine + openingTagLines; // 0-indexed line
|
|
130
|
+
blocks.push({
|
|
131
|
+
content,
|
|
132
|
+
startLine: contentStartLine,
|
|
133
|
+
isSetup,
|
|
134
|
+
isTypeScript,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return blocks;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Process a script block by delegating to TreeSitterExtractor
|
|
141
|
+
*/
|
|
142
|
+
processScriptBlock(block, componentNodeId) {
|
|
143
|
+
const scriptLanguage = block.isTypeScript ? 'typescript' : 'javascript';
|
|
144
|
+
// Check if the script language parser is available
|
|
145
|
+
if (!(0, grammars_1.isLanguageSupported)(scriptLanguage)) {
|
|
146
|
+
this.errors.push({
|
|
147
|
+
message: `Parser for ${scriptLanguage} not available, cannot parse Vue script block`,
|
|
148
|
+
severity: 'warning',
|
|
149
|
+
});
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
// Delegate to TreeSitterExtractor
|
|
153
|
+
const extractor = new tree_sitter_1.TreeSitterExtractor(this.filePath, block.content, scriptLanguage);
|
|
154
|
+
const result = extractor.extract();
|
|
155
|
+
// Offset line numbers from script block back to .vue file positions
|
|
156
|
+
for (const node of result.nodes) {
|
|
157
|
+
node.startLine += block.startLine;
|
|
158
|
+
node.endLine += block.startLine;
|
|
159
|
+
node.language = 'vue'; // Mark as vue, not TS/JS
|
|
160
|
+
this.nodes.push(node);
|
|
161
|
+
// Add containment edge from component to this node
|
|
162
|
+
this.edges.push({
|
|
163
|
+
source: componentNodeId,
|
|
164
|
+
target: node.id,
|
|
165
|
+
kind: 'contains',
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
// Offset edges (they reference line numbers)
|
|
169
|
+
for (const edge of result.edges) {
|
|
170
|
+
if (edge.line) {
|
|
171
|
+
edge.line += block.startLine;
|
|
172
|
+
}
|
|
173
|
+
this.edges.push(edge);
|
|
174
|
+
}
|
|
175
|
+
// Offset unresolved references
|
|
176
|
+
for (const ref of result.unresolvedReferences) {
|
|
177
|
+
ref.line += block.startLine;
|
|
178
|
+
ref.filePath = this.filePath;
|
|
179
|
+
ref.language = 'vue';
|
|
180
|
+
this.unresolvedReferences.push(ref);
|
|
181
|
+
}
|
|
182
|
+
// Carry over errors
|
|
183
|
+
for (const error of result.errors) {
|
|
184
|
+
if (error.line) {
|
|
185
|
+
error.line += block.startLine;
|
|
186
|
+
}
|
|
187
|
+
this.errors.push(error);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Extract component usages from the Vue `<template>`.
|
|
192
|
+
*
|
|
193
|
+
* PascalCase tags (`<Modal>`, `<Button />`) and kebab-case tags
|
|
194
|
+
* (`<my-button>`) both represent component instantiations — analogous to
|
|
195
|
+
* function calls in imperative code. Capturing them creates parent→child
|
|
196
|
+
* component edges and lets `callers` / `impact` see a component that is
|
|
197
|
+
* only ever used in markup. Vue's extractor previously parsed only the
|
|
198
|
+
* `<script>` block, so these usages produced no edge at all (#629).
|
|
199
|
+
*
|
|
200
|
+
* HTML elements (lowercase, no hyphen) and Vue built-ins are skipped.
|
|
201
|
+
* Unmatched names create no edge during resolution, so converting
|
|
202
|
+
* kebab-case is safe even for native custom elements.
|
|
203
|
+
*/
|
|
204
|
+
extractTemplateComponents(componentNodeId) {
|
|
205
|
+
// Ranges covered by <script> / <style> blocks — skip them so script
|
|
206
|
+
// identifiers and CSS selectors aren't mistaken for template tags. This
|
|
207
|
+
// also correctly handles nested <template> tags (v-if / slots), which a
|
|
208
|
+
// single non-greedy <template>…</template> match would mis-bound.
|
|
209
|
+
const coveredRanges = [];
|
|
210
|
+
const blockRegex = /<(script|style)(\s[^>]*)?>[\s\S]*?<\/\1>/g;
|
|
211
|
+
let blockMatch;
|
|
212
|
+
while ((blockMatch = blockRegex.exec(this.source)) !== null) {
|
|
213
|
+
const startLine = (this.source.substring(0, blockMatch.index).match(/\n/g) || []).length;
|
|
214
|
+
const endLine = startLine + (blockMatch[0].match(/\n/g) || []).length;
|
|
215
|
+
coveredRanges.push([startLine, endLine]);
|
|
216
|
+
}
|
|
217
|
+
const lines = this.source.split('\n');
|
|
218
|
+
// Opening / self-closing tags (closing `</Foo>` starts with `</`, so the
|
|
219
|
+
// leading `<` followed by a name letter won't match it).
|
|
220
|
+
const tagRegex = /<([A-Za-z][A-Za-z0-9_-]*)\b/g;
|
|
221
|
+
for (let lineIdx = 0; lineIdx < lines.length; lineIdx++) {
|
|
222
|
+
if (coveredRanges.some(([start, end]) => lineIdx >= start && lineIdx <= end))
|
|
223
|
+
continue;
|
|
224
|
+
const line = lines[lineIdx];
|
|
225
|
+
let match;
|
|
226
|
+
while ((match = tagRegex.exec(line)) !== null) {
|
|
227
|
+
const raw = match[1];
|
|
228
|
+
let componentName;
|
|
229
|
+
if (/^[A-Z]/.test(raw)) {
|
|
230
|
+
componentName = raw; // PascalCase component
|
|
231
|
+
}
|
|
232
|
+
else if (raw.includes('-')) {
|
|
233
|
+
componentName = kebabToPascal(raw); // kebab-case component
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
continue; // lowercase, no hyphen → native HTML element
|
|
237
|
+
}
|
|
238
|
+
if (VUE_BUILTIN_COMPONENTS.has(componentName))
|
|
239
|
+
continue;
|
|
240
|
+
this.unresolvedReferences.push({
|
|
241
|
+
fromNodeId: componentNodeId,
|
|
242
|
+
referenceName: componentName,
|
|
243
|
+
referenceKind: 'references',
|
|
244
|
+
line: lineIdx + 1, // 1-indexed
|
|
245
|
+
column: match.index + 1,
|
|
246
|
+
filePath: this.filePath,
|
|
247
|
+
language: 'vue',
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
exports.VueExtractor = VueExtractor;
|
|
254
|
+
//# sourceMappingURL=vue-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue-extractor.js","sourceRoot":"","sources":["../../src/extraction/vue-extractor.ts"],"names":[],"mappings":";;;AACA,+DAAuD;AACvD,+CAAoD;AACpD,yCAAiD;AAEjD;;;;GAIG;AACH,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC;IACrC,YAAY;IACZ,iBAAiB;IACjB,WAAW;IACX,UAAU;IACV,UAAU;IACV,WAAW;IACX,MAAM;CACP,CAAC,CAAC;AAEH,4EAA4E;AAC5E,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SACnE,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED;;;;;;;;GAQG;AACH,MAAa,YAAY;IACf,QAAQ,CAAS;IACjB,MAAM,CAAS;IACf,KAAK,GAAW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