@colbymchenry/codegraph-darwin-x64 0.9.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/bin/codegraph +3 -0
- package/lib/dist/bin/codegraph.d.ts +21 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -0
- package/lib/dist/bin/codegraph.js +1273 -0
- package/lib/dist/bin/codegraph.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/config.d.ts +51 -0
- package/lib/dist/config.d.ts.map +1 -0
- package/lib/dist/config.js +321 -0
- package/lib/dist/config.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 +244 -0
- package/lib/dist/context/formatter.js.map +1 -0
- package/lib/dist/context/index.d.ts +97 -0
- package/lib/dist/context/index.d.ts.map +1 -0
- package/lib/dist/context/index.js +1050 -0
- package/lib/dist/context/index.js.map +1 -0
- package/lib/dist/db/index.d.ts +83 -0
- package/lib/dist/db/index.d.ts.map +1 -0
- package/lib/dist/db/index.js +219 -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 +131 -0
- package/lib/dist/db/migrations.js.map +1 -0
- package/lib/dist/db/queries.d.ts +253 -0
- package/lib/dist/db/queries.d.ts.map +1 -0
- package/lib/dist/db/queries.js +1207 -0
- package/lib/dist/db/queries.js.map +1 -0
- package/lib/dist/db/schema.sql +151 -0
- package/lib/dist/db/sqlite-adapter.d.ts +46 -0
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -0
- package/lib/dist/db/sqlite-adapter.js +114 -0
- package/lib/dist/db/sqlite-adapter.js.map +1 -0
- package/lib/dist/directory.d.ts +57 -0
- package/lib/dist/directory.d.ts.map +1 -0
- package/lib/dist/directory.js +264 -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/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/grammars.d.ts +78 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -0
- package/lib/dist/extraction/grammars.js +332 -0
- package/lib/dist/extraction/grammars.js.map +1 -0
- package/lib/dist/extraction/index.d.ts +130 -0
- package/lib/dist/extraction/index.d.ts.map +1 -0
- package/lib/dist/extraction/index.js +1305 -0
- package/lib/dist/extraction/index.js.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts +4 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.js +126 -0
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.d.ts +3 -0
- package/lib/dist/extraction/languages/csharp.d.ts.map +1 -0
- package/lib/dist/extraction/languages/csharp.js +72 -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 +192 -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 +58 -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 +49 -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 +64 -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 +90 -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 +253 -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/pascal.d.ts +3 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal.js +66 -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 +107 -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/ruby.d.ts +3 -0
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -0
- package/lib/dist/extraction/languages/ruby.js +114 -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 +109 -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 +139 -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 +91 -0
- package/lib/dist/extraction/languages/swift.js.map +1 -0
- package/lib/dist/extraction/languages/typescript.d.ts +3 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -0
- package/lib/dist/extraction/languages/typescript.js +129 -0
- package/lib/dist/extraction/languages/typescript.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +52 -0
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/liquid-extractor.js +313 -0
- package/lib/dist/extraction/liquid-extractor.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 +94 -0
- package/lib/dist/extraction/parse-worker.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 +272 -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 +103 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-types.d.ts +179 -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 +233 -0
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -0
- package/lib/dist/extraction/tree-sitter.js +2425 -0
- package/lib/dist/extraction/tree-sitter.js.map +1 -0
- package/lib/dist/extraction/vue-extractor.d.ts +36 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/vue-extractor.js +163 -0
- package/lib/dist/extraction/vue-extractor.js.map +1 -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-scala.wasm +0 -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 +366 -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 +493 -0
- package/lib/dist/graph/traversal.js.map +1 -0
- package/lib/dist/index.d.ts +453 -0
- package/lib/dist/index.d.ts.map +1 -0
- package/lib/dist/index.js +833 -0
- package/lib/dist/index.js.map +1 -0
- package/lib/dist/installer/claude-md-template.d.ts +14 -0
- package/lib/dist/installer/claude-md-template.d.ts.map +1 -0
- package/lib/dist/installer/claude-md-template.js +21 -0
- package/lib/dist/installer/claude-md-template.js.map +1 -0
- package/lib/dist/installer/config-writer.d.ts +29 -0
- package/lib/dist/installer/config-writer.d.ts.map +1 -0
- package/lib/dist/installer/config-writer.js +111 -0
- package/lib/dist/installer/config-writer.js.map +1 -0
- package/lib/dist/installer/index.d.ts +65 -0
- package/lib/dist/installer/index.d.ts.map +1 -0
- package/lib/dist/installer/index.js +406 -0
- package/lib/dist/installer/index.js.map +1 -0
- package/lib/dist/installer/instructions-template.d.ts +28 -0
- package/lib/dist/installer/instructions-template.d.ts.map +1 -0
- package/lib/dist/installer/instructions-template.js +64 -0
- package/lib/dist/installer/instructions-template.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts +47 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -0
- package/lib/dist/installer/targets/claude.js +401 -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 +229 -0
- package/lib/dist/installer/targets/cursor.js.map +1 -0
- package/lib/dist/installer/targets/opencode.d.ts +30 -0
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -0
- package/lib/dist/installer/targets/opencode.js +235 -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 +83 -0
- package/lib/dist/installer/targets/registry.js.map +1 -0
- package/lib/dist/installer/targets/shared.d.ts +77 -0
- package/lib/dist/installer/targets/shared.d.ts.map +1 -0
- package/lib/dist/installer/targets/shared.js +246 -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 +116 -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/index.d.ts +94 -0
- package/lib/dist/mcp/index.d.ts.map +1 -0
- package/lib/dist/mcp/index.js +453 -0
- package/lib/dist/mcp/index.js.map +1 -0
- package/lib/dist/mcp/server-instructions.d.ts +19 -0
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -0
- package/lib/dist/mcp/server-instructions.js +71 -0
- package/lib/dist/mcp/server-instructions.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +257 -0
- package/lib/dist/mcp/tools.d.ts.map +1 -0
- package/lib/dist/mcp/tools.js +1646 -0
- package/lib/dist/mcp/tools.js.map +1 -0
- package/lib/dist/mcp/transport.d.ts +106 -0
- package/lib/dist/mcp/transport.d.ts.map +1 -0
- package/lib/dist/mcp/transport.js +233 -0
- package/lib/dist/mcp/transport.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 +213 -0
- package/lib/dist/resolution/frameworks/csharp.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 +225 -0
- package/lib/dist/resolution/frameworks/express.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 +158 -0
- package/lib/dist/resolution/frameworks/go.js.map +1 -0
- package/lib/dist/resolution/frameworks/index.d.ts +42 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/index.js +133 -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 +177 -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 +248 -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 +374 -0
- package/lib/dist/resolution/frameworks/nestjs.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 +278 -0
- package/lib/dist/resolution/frameworks/python.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 +272 -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 +198 -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 +207 -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 +249 -0
- package/lib/dist/resolution/frameworks/svelte.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 +376 -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 +306 -0
- package/lib/dist/resolution/frameworks/vue.js.map +1 -0
- package/lib/dist/resolution/import-resolver.d.ts +40 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -0
- package/lib/dist/resolution/import-resolver.js +663 -0
- package/lib/dist/resolution/import-resolver.js.map +1 -0
- package/lib/dist/resolution/index.d.ts +106 -0
- package/lib/dist/resolution/index.d.ts.map +1 -0
- package/lib/dist/resolution/index.js +709 -0
- package/lib/dist/resolution/index.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +32 -0
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -0
- package/lib/dist/resolution/name-matcher.js +384 -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 +441 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +172 -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/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 +53 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -0
- package/lib/dist/search/query-utils.js +350 -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 +223 -0
- package/lib/dist/sync/git-hooks.js.map +1 -0
- package/lib/dist/sync/index.d.ts +17 -0
- package/lib/dist/sync/index.d.ts.map +1 -0
- package/lib/dist/sync/index.js +28 -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 +81 -0
- package/lib/dist/sync/watcher.d.ts.map +1 -0
- package/lib/dist/sync/watcher.js +194 -0
- package/lib/dist/sync/watcher.js.map +1 -0
- package/lib/dist/types.d.ts +423 -0
- package/lib/dist/types.d.ts.map +1 -0
- package/lib/dist/types.js +262 -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/utils.d.ts +205 -0
- package/lib/dist/utils.d.ts.map +1 -0
- package/lib/dist/utils.js +549 -0
- package/lib/dist/utils.js.map +1 -0
- package/lib/node_modules/.package-lock.json +116 -0
- package/lib/node_modules/@clack/core/CHANGELOG.md +348 -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 +363 -0
- package/lib/node_modules/@clack/core/dist/index.mjs +17 -0
- package/lib/node_modules/@clack/core/dist/index.mjs.map +1 -0
- package/lib/node_modules/@clack/core/package.json +63 -0
- package/lib/node_modules/@clack/prompts/CHANGELOG.md +591 -0
- package/lib/node_modules/@clack/prompts/LICENSE +9 -0
- package/lib/node_modules/@clack/prompts/README.md +375 -0
- package/lib/node_modules/@clack/prompts/dist/index.d.mts +396 -0
- package/lib/node_modules/@clack/prompts/dist/index.mjs +144 -0
- package/lib/node_modules/@clack/prompts/dist/index.mjs.map +1 -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 +219 -0
- package/lib/node_modules/fast-wrap-ansi/lib/main.js.map +1 -0
- package/lib/node_modules/fast-wrap-ansi/package.json +51 -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 +738 -0
- package/lib/node_modules/picomatch/index.js +17 -0
- package/lib/node_modules/picomatch/lib/constants.js +180 -0
- package/lib/node_modules/picomatch/lib/parse.js +1085 -0
- package/lib/node_modules/picomatch/lib/picomatch.js +341 -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 +83 -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 +55 -0
- package/node +0 -0
- package/package.json +17 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Java Framework Resolver
|
|
4
|
+
*
|
|
5
|
+
* Handles Spring Boot and general Java patterns.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.springResolver = void 0;
|
|
9
|
+
const strip_comments_1 = require("../strip-comments");
|
|
10
|
+
exports.springResolver = {
|
|
11
|
+
name: 'spring',
|
|
12
|
+
languages: ['java'],
|
|
13
|
+
detect(context) {
|
|
14
|
+
// Check for pom.xml with Spring
|
|
15
|
+
const pomXml = context.readFile('pom.xml');
|
|
16
|
+
if (pomXml && (pomXml.includes('spring-boot') || pomXml.includes('springframework'))) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
// Check for build.gradle with Spring
|
|
20
|
+
const buildGradle = context.readFile('build.gradle');
|
|
21
|
+
if (buildGradle && (buildGradle.includes('spring-boot') || buildGradle.includes('springframework'))) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
const buildGradleKts = context.readFile('build.gradle.kts');
|
|
25
|
+
if (buildGradleKts && (buildGradleKts.includes('spring-boot') || buildGradleKts.includes('springframework'))) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
// Check for Spring annotations in Java files
|
|
29
|
+
const allFiles = context.getAllFiles();
|
|
30
|
+
for (const file of allFiles) {
|
|
31
|
+
if (file.endsWith('.java')) {
|
|
32
|
+
const content = context.readFile(file);
|
|
33
|
+
if (content && (content.includes('@SpringBootApplication') ||
|
|
34
|
+
content.includes('@RestController') ||
|
|
35
|
+
content.includes('@Service') ||
|
|
36
|
+
content.includes('@Repository'))) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
},
|
|
43
|
+
resolve(ref, context) {
|
|
44
|
+
// Pattern 1: Service references (dependency injection)
|
|
45
|
+
if (ref.referenceName.endsWith('Service')) {
|
|
46
|
+
const result = resolveByNameAndKind(ref.referenceName, SERVICE_KINDS, SERVICE_DIRS, context);
|
|
47
|
+
if (result) {
|
|
48
|
+
return {
|
|
49
|
+
original: ref,
|
|
50
|
+
targetNodeId: result,
|
|
51
|
+
confidence: 0.85,
|
|
52
|
+
resolvedBy: 'framework',
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Pattern 2: Repository references
|
|
57
|
+
if (ref.referenceName.endsWith('Repository')) {
|
|
58
|
+
const result = resolveByNameAndKind(ref.referenceName, SERVICE_KINDS, REPO_DIRS, context);
|
|
59
|
+
if (result) {
|
|
60
|
+
return {
|
|
61
|
+
original: ref,
|
|
62
|
+
targetNodeId: result,
|
|
63
|
+
confidence: 0.85,
|
|
64
|
+
resolvedBy: 'framework',
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Pattern 3: Controller references
|
|
69
|
+
if (ref.referenceName.endsWith('Controller')) {
|
|
70
|
+
const result = resolveByNameAndKind(ref.referenceName, CLASS_KINDS, CONTROLLER_DIRS, context);
|
|
71
|
+
if (result) {
|
|
72
|
+
return {
|
|
73
|
+
original: ref,
|
|
74
|
+
targetNodeId: result,
|
|
75
|
+
confidence: 0.85,
|
|
76
|
+
resolvedBy: 'framework',
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// Pattern 4: Entity/Model references
|
|
81
|
+
if (/^[A-Z][a-zA-Z]+$/.test(ref.referenceName)) {
|
|
82
|
+
const result = resolveByNameAndKind(ref.referenceName, CLASS_KINDS, ENTITY_DIRS, context);
|
|
83
|
+
if (result) {
|
|
84
|
+
return {
|
|
85
|
+
original: ref,
|
|
86
|
+
targetNodeId: result,
|
|
87
|
+
confidence: 0.7,
|
|
88
|
+
resolvedBy: 'framework',
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Pattern 5: Component references
|
|
93
|
+
if (ref.referenceName.endsWith('Component') || ref.referenceName.endsWith('Config')) {
|
|
94
|
+
const result = resolveByNameAndKind(ref.referenceName, CLASS_KINDS, COMPONENT_DIRS, context);
|
|
95
|
+
if (result) {
|
|
96
|
+
return {
|
|
97
|
+
original: ref,
|
|
98
|
+
targetNodeId: result,
|
|
99
|
+
confidence: 0.8,
|
|
100
|
+
resolvedBy: 'framework',
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
},
|
|
106
|
+
extract(filePath, content) {
|
|
107
|
+
if (!filePath.endsWith('.java'))
|
|
108
|
+
return { nodes: [], references: [] };
|
|
109
|
+
const nodes = [];
|
|
110
|
+
const references = [];
|
|
111
|
+
const now = Date.now();
|
|
112
|
+
const safe = (0, strip_comments_1.stripCommentsForRegex)(content, 'java');
|
|
113
|
+
// @GetMapping("/path"), @PostMapping(value = "/path"), @RequestMapping("/path")
|
|
114
|
+
const mappingRegex = /@(GetMapping|PostMapping|PutMapping|PatchMapping|DeleteMapping|RequestMapping)\s*\(\s*(?:value\s*=\s*|path\s*=\s*)?["']([^"']+)["'][^)]*\)/g;
|
|
115
|
+
let match;
|
|
116
|
+
while ((match = mappingRegex.exec(safe)) !== null) {
|
|
117
|
+
const [, mappingName, routePath] = match;
|
|
118
|
+
const line = safe.slice(0, match.index).split('\n').length;
|
|
119
|
+
const method = mappingName === 'RequestMapping' ? 'ANY' : mappingName.replace(/Mapping$/, '').toUpperCase();
|
|
120
|
+
const routeNode = {
|
|
121
|
+
id: `route:${filePath}:${line}:${method}:${routePath}`,
|
|
122
|
+
kind: 'route',
|
|
123
|
+
name: `${method} ${routePath}`,
|
|
124
|
+
qualifiedName: `${filePath}::route:${routePath}`,
|
|
125
|
+
filePath,
|
|
126
|
+
startLine: line,
|
|
127
|
+
endLine: line,
|
|
128
|
+
startColumn: 0,
|
|
129
|
+
endColumn: match[0].length,
|
|
130
|
+
language: 'java',
|
|
131
|
+
updatedAt: now,
|
|
132
|
+
};
|
|
133
|
+
nodes.push(routeNode);
|
|
134
|
+
// Look for the next public/private/protected method after the annotation
|
|
135
|
+
const tail = safe.slice(match.index + match[0].length);
|
|
136
|
+
const methodMatch = tail.match(/\b(?:public|private|protected)\s+[^;{]*?\s+(\w+)\s*\(/);
|
|
137
|
+
if (methodMatch) {
|
|
138
|
+
references.push({
|
|
139
|
+
fromNodeId: routeNode.id,
|
|
140
|
+
referenceName: methodMatch[1],
|
|
141
|
+
referenceKind: 'references',
|
|
142
|
+
line,
|
|
143
|
+
column: 0,
|
|
144
|
+
filePath,
|
|
145
|
+
language: 'java',
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return { nodes, references };
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
// Directory patterns
|
|
153
|
+
const SERVICE_DIRS = ['/service/', '/services/'];
|
|
154
|
+
const REPO_DIRS = ['/repository/', '/repositories/'];
|
|
155
|
+
const CONTROLLER_DIRS = ['/controller/', '/controllers/'];
|
|
156
|
+
const ENTITY_DIRS = ['/entity/', '/entities/', '/model/', '/models/', '/domain/'];
|
|
157
|
+
const COMPONENT_DIRS = ['/component/', '/components/', '/config/'];
|
|
158
|
+
const CLASS_KINDS = new Set(['class']);
|
|
159
|
+
const SERVICE_KINDS = new Set(['class', 'interface']);
|
|
160
|
+
/**
|
|
161
|
+
* Resolve a symbol by name using indexed queries instead of scanning all files.
|
|
162
|
+
*/
|
|
163
|
+
function resolveByNameAndKind(name, kinds, preferredDirPatterns, context) {
|
|
164
|
+
const candidates = context.getNodesByName(name);
|
|
165
|
+
if (candidates.length === 0)
|
|
166
|
+
return null;
|
|
167
|
+
const kindFiltered = candidates.filter((n) => kinds.has(n.kind));
|
|
168
|
+
if (kindFiltered.length === 0)
|
|
169
|
+
return null;
|
|
170
|
+
// Prefer candidates in framework-conventional directories
|
|
171
|
+
const preferred = kindFiltered.filter((n) => preferredDirPatterns.some((d) => n.filePath.includes(d)));
|
|
172
|
+
if (preferred.length > 0)
|
|
173
|
+
return preferred[0].id;
|
|
174
|
+
// Fall back to any match
|
|
175
|
+
return kindFiltered[0].id;
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=java.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"java.js","sourceRoot":"","sources":["../../../src/resolution/frameworks/java.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,sDAA0D;AAE7C,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,QAAQ;IACd,S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C,CAAC;IACjE,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAE3C,0DAA0D;IAC1D,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAC1C,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CACzD,CAAC;IAEF,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC;IAElD,yBAAyB;IACzB,OAAO,YAAY,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Laravel Framework Resolver
|
|
3
|
+
*
|
|
4
|
+
* Handles Laravel-specific patterns for reference resolution.
|
|
5
|
+
*/
|
|
6
|
+
import { FrameworkResolver } from '../types';
|
|
7
|
+
/**
|
|
8
|
+
* Laravel facade mappings to underlying classes
|
|
9
|
+
* Exported for potential use in facade resolution
|
|
10
|
+
*/
|
|
11
|
+
export declare const FACADE_MAPPINGS: Record<string, string>;
|
|
12
|
+
export declare const laravelResolver: FrameworkResolver;
|
|
13
|
+
//# sourceMappingURL=laravel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"laravel.d.ts","sourceRoot":"","sources":["../../../src/resolution/frameworks/laravel.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,iBAAiB,EAAiD,MAAM,UAAU,CAAC;AAG5F;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqBlD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,iBA2I7B,CAAC"}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Laravel Framework Resolver
|
|
4
|
+
*
|
|
5
|
+
* Handles Laravel-specific patterns for reference resolution.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.laravelResolver = exports.FACADE_MAPPINGS = void 0;
|
|
9
|
+
const strip_comments_1 = require("../strip-comments");
|
|
10
|
+
/**
|
|
11
|
+
* Laravel facade mappings to underlying classes
|
|
12
|
+
* Exported for potential use in facade resolution
|
|
13
|
+
*/
|
|
14
|
+
exports.FACADE_MAPPINGS = {
|
|
15
|
+
Auth: 'Illuminate\\Auth\\AuthManager',
|
|
16
|
+
Cache: 'Illuminate\\Cache\\CacheManager',
|
|
17
|
+
Config: 'Illuminate\\Config\\Repository',
|
|
18
|
+
DB: 'Illuminate\\Database\\DatabaseManager',
|
|
19
|
+
Event: 'Illuminate\\Events\\Dispatcher',
|
|
20
|
+
File: 'Illuminate\\Filesystem\\Filesystem',
|
|
21
|
+
Gate: 'Illuminate\\Auth\\Access\\Gate',
|
|
22
|
+
Hash: 'Illuminate\\Hashing\\HashManager',
|
|
23
|
+
Log: 'Illuminate\\Log\\LogManager',
|
|
24
|
+
Mail: 'Illuminate\\Mail\\Mailer',
|
|
25
|
+
Queue: 'Illuminate\\Queue\\QueueManager',
|
|
26
|
+
Redis: 'Illuminate\\Redis\\RedisManager',
|
|
27
|
+
Request: 'Illuminate\\Http\\Request',
|
|
28
|
+
Response: 'Illuminate\\Http\\Response',
|
|
29
|
+
Route: 'Illuminate\\Routing\\Router',
|
|
30
|
+
Session: 'Illuminate\\Session\\SessionManager',
|
|
31
|
+
Storage: 'Illuminate\\Filesystem\\FilesystemManager',
|
|
32
|
+
URL: 'Illuminate\\Routing\\UrlGenerator',
|
|
33
|
+
Validator: 'Illuminate\\Validation\\Factory',
|
|
34
|
+
View: 'Illuminate\\View\\Factory',
|
|
35
|
+
};
|
|
36
|
+
exports.laravelResolver = {
|
|
37
|
+
name: 'laravel',
|
|
38
|
+
languages: ['php'],
|
|
39
|
+
detect(context) {
|
|
40
|
+
// Check for artisan file (Laravel signature)
|
|
41
|
+
return context.fileExists('artisan') || context.fileExists('app/Http/Kernel.php');
|
|
42
|
+
},
|
|
43
|
+
resolve(ref, context) {
|
|
44
|
+
// Pattern 1: Model::method() - Eloquent static calls
|
|
45
|
+
const modelMatch = ref.referenceName.match(/^([A-Z][a-zA-Z]+)::(\w+)$/);
|
|
46
|
+
if (modelMatch) {
|
|
47
|
+
const [, className, methodName] = modelMatch;
|
|
48
|
+
const result = resolveModelCall(className, methodName, context);
|
|
49
|
+
if (result) {
|
|
50
|
+
return {
|
|
51
|
+
original: ref,
|
|
52
|
+
targetNodeId: result,
|
|
53
|
+
confidence: 0.85,
|
|
54
|
+
resolvedBy: 'framework',
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Pattern 2: Facade calls - Auth::user(), Cache::get()
|
|
59
|
+
const facadeMatch = ref.referenceName.match(/^(Auth|Cache|DB|Log|Mail|Queue|Session|Storage|Validator|Route|Request|Response)::(\w+)$/);
|
|
60
|
+
if (facadeMatch) {
|
|
61
|
+
// Facades typically resolve to external Laravel code
|
|
62
|
+
// Mark as external but note the facade
|
|
63
|
+
return null; // External, can't resolve to local node
|
|
64
|
+
}
|
|
65
|
+
// Pattern 3: Helper function calls - route(), view(), config()
|
|
66
|
+
if (['route', 'view', 'config', 'env', 'app', 'abort', 'redirect', 'response', 'request', 'session', 'url', 'asset', 'mix'].includes(ref.referenceName)) {
|
|
67
|
+
// These are Laravel helpers - external
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
// Pattern 4: Controller method references
|
|
71
|
+
const controllerMatch = ref.referenceName.match(/^([A-Z][a-zA-Z]+Controller)@(\w+)$/);
|
|
72
|
+
if (controllerMatch) {
|
|
73
|
+
const [, controller, method] = controllerMatch;
|
|
74
|
+
const result = resolveControllerMethod(controller, method, context);
|
|
75
|
+
if (result) {
|
|
76
|
+
return {
|
|
77
|
+
original: ref,
|
|
78
|
+
targetNodeId: result,
|
|
79
|
+
confidence: 0.9,
|
|
80
|
+
resolvedBy: 'framework',
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
},
|
|
86
|
+
extract(filePath, content) {
|
|
87
|
+
if (!filePath.endsWith('.php'))
|
|
88
|
+
return { nodes: [], references: [] };
|
|
89
|
+
const nodes = [];
|
|
90
|
+
const references = [];
|
|
91
|
+
const now = Date.now();
|
|
92
|
+
const safe = (0, strip_comments_1.stripCommentsForRegex)(content, 'php');
|
|
93
|
+
// Route::METHOD('/path', handler-expr)
|
|
94
|
+
// handler-expr can be: [Class::class, 'method'] | 'Controller@method' | Closure | Class::class
|
|
95
|
+
const routeRegex = /Route::(get|post|put|patch|delete|options|any)\s*\(\s*['"]([^'"]+)['"]\s*,\s*([^)]+)\)/g;
|
|
96
|
+
let match;
|
|
97
|
+
while ((match = routeRegex.exec(safe)) !== null) {
|
|
98
|
+
const [, method, routePath, handlerExpr] = match;
|
|
99
|
+
const line = safe.slice(0, match.index).split('\n').length;
|
|
100
|
+
const upper = method.toUpperCase();
|
|
101
|
+
const routeNode = {
|
|
102
|
+
id: `route:${filePath}:${line}:${upper}:${routePath}`,
|
|
103
|
+
kind: 'route',
|
|
104
|
+
name: `${upper} ${routePath}`,
|
|
105
|
+
qualifiedName: `${filePath}::route:${routePath}`,
|
|
106
|
+
filePath,
|
|
107
|
+
startLine: line,
|
|
108
|
+
endLine: line,
|
|
109
|
+
startColumn: 0,
|
|
110
|
+
endColumn: match[0].length,
|
|
111
|
+
language: 'php',
|
|
112
|
+
updatedAt: now,
|
|
113
|
+
};
|
|
114
|
+
nodes.push(routeNode);
|
|
115
|
+
const handlerName = extractLaravelHandler(handlerExpr);
|
|
116
|
+
if (handlerName) {
|
|
117
|
+
references.push({
|
|
118
|
+
fromNodeId: routeNode.id,
|
|
119
|
+
referenceName: handlerName,
|
|
120
|
+
referenceKind: 'references',
|
|
121
|
+
line,
|
|
122
|
+
column: 0,
|
|
123
|
+
filePath,
|
|
124
|
+
language: 'php',
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// Route::resource('name', Controller::class) / Route::apiResource('name', Controller::class)
|
|
129
|
+
const resourceRegex = /Route::(resource|apiResource)\s*\(\s*['"]([^'"]+)['"]\s*(?:,\s*([^)]+))?\)/g;
|
|
130
|
+
while ((match = resourceRegex.exec(safe)) !== null) {
|
|
131
|
+
const [, _fn, resourceName, handlerExpr] = match;
|
|
132
|
+
const line = safe.slice(0, match.index).split('\n').length;
|
|
133
|
+
const routeNode = {
|
|
134
|
+
id: `route:${filePath}:${line}:RESOURCE:${resourceName}`,
|
|
135
|
+
kind: 'route',
|
|
136
|
+
name: `resource:${resourceName}`,
|
|
137
|
+
qualifiedName: `${filePath}::route:${resourceName}`,
|
|
138
|
+
filePath,
|
|
139
|
+
startLine: line,
|
|
140
|
+
endLine: line,
|
|
141
|
+
startColumn: 0,
|
|
142
|
+
endColumn: match[0].length,
|
|
143
|
+
language: 'php',
|
|
144
|
+
updatedAt: now,
|
|
145
|
+
};
|
|
146
|
+
nodes.push(routeNode);
|
|
147
|
+
if (handlerExpr) {
|
|
148
|
+
const controllerName = extractLaravelHandler(handlerExpr);
|
|
149
|
+
if (controllerName) {
|
|
150
|
+
references.push({
|
|
151
|
+
fromNodeId: routeNode.id,
|
|
152
|
+
referenceName: controllerName,
|
|
153
|
+
referenceKind: 'imports',
|
|
154
|
+
line,
|
|
155
|
+
column: 0,
|
|
156
|
+
filePath,
|
|
157
|
+
language: 'php',
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return { nodes, references };
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Parse a Laravel route handler expression and return the symbol to link.
|
|
167
|
+
* - `[Class::class, 'method']` -> `method`
|
|
168
|
+
* - `'Controller@method'` -> `method`
|
|
169
|
+
* - `Class::class` -> `Class`
|
|
170
|
+
* - anything else (closure etc) -> null
|
|
171
|
+
*/
|
|
172
|
+
function extractLaravelHandler(expr) {
|
|
173
|
+
const trimmed = expr.trim();
|
|
174
|
+
// [Class::class, 'method'] — grab the string literal
|
|
175
|
+
const tupleMatch = trimmed.match(/^\[\s*[^,]+,\s*['"]([^'"]+)['"]\s*\]/);
|
|
176
|
+
if (tupleMatch)
|
|
177
|
+
return tupleMatch[1];
|
|
178
|
+
// 'Controller@method'
|
|
179
|
+
const atMatch = trimmed.match(/^['"]([^'"@]+)@([^'"]+)['"]$/);
|
|
180
|
+
if (atMatch)
|
|
181
|
+
return atMatch[2];
|
|
182
|
+
// Controller::class
|
|
183
|
+
const classMatch = trimmed.match(/^([A-Za-z_][A-Za-z0-9_]*)::class/);
|
|
184
|
+
if (classMatch)
|
|
185
|
+
return classMatch[1];
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Resolve a Model::method() call
|
|
190
|
+
*/
|
|
191
|
+
function resolveModelCall(className, methodName, context) {
|
|
192
|
+
// Try app/Models/ first (Laravel 8+)
|
|
193
|
+
let modelPath = `app/Models/${className}.php`;
|
|
194
|
+
if (context.fileExists(modelPath)) {
|
|
195
|
+
const nodes = context.getNodesInFile(modelPath);
|
|
196
|
+
// Look for the method in this class
|
|
197
|
+
const methodNode = nodes.find((n) => n.kind === 'method' && n.name === methodName);
|
|
198
|
+
if (methodNode) {
|
|
199
|
+
return methodNode.id;
|
|
200
|
+
}
|
|
201
|
+
// Return the class itself if method not found
|
|
202
|
+
const classNode = nodes.find((n) => n.kind === 'class' && n.name === className);
|
|
203
|
+
if (classNode) {
|
|
204
|
+
return classNode.id;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
// Try app/ (Laravel 7 and below)
|
|
208
|
+
modelPath = `app/${className}.php`;
|
|
209
|
+
if (context.fileExists(modelPath)) {
|
|
210
|
+
const nodes = context.getNodesInFile(modelPath);
|
|
211
|
+
const methodNode = nodes.find((n) => n.kind === 'method' && n.name === methodName);
|
|
212
|
+
if (methodNode) {
|
|
213
|
+
return methodNode.id;
|
|
214
|
+
}
|
|
215
|
+
const classNode = nodes.find((n) => n.kind === 'class' && n.name === className);
|
|
216
|
+
if (classNode) {
|
|
217
|
+
return classNode.id;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Resolve a Controller@method reference
|
|
224
|
+
*/
|
|
225
|
+
function resolveControllerMethod(controller, method, context) {
|
|
226
|
+
// Try app/Http/Controllers/
|
|
227
|
+
const controllerPath = `app/Http/Controllers/${controller}.php`;
|
|
228
|
+
if (context.fileExists(controllerPath)) {
|
|
229
|
+
const nodes = context.getNodesInFile(controllerPath);
|
|
230
|
+
const methodNode = nodes.find((n) => n.kind === 'method' && n.name === method);
|
|
231
|
+
if (methodNode) {
|
|
232
|
+
return methodNode.id;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
// Try name-based lookup for namespaced controllers
|
|
236
|
+
const controllerCandidates = context.getNodesByName(controller);
|
|
237
|
+
for (const ctrl of controllerCandidates) {
|
|
238
|
+
if (ctrl.kind === 'class' && ctrl.filePath.includes('Controllers')) {
|
|
239
|
+
const nodesInFile = context.getNodesInFile(ctrl.filePath);
|
|
240
|
+
const methodNode = nodesInFile.find((n) => n.kind === 'method' && n.name === method);
|
|
241
|
+
if (methodNode) {
|
|
242
|
+
return methodNode.id;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
//# sourceMappingURL=laravel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"laravel.js","sourceRoot":"","sources":["../../../src/resolution/frameworks/laravel.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,sDAA0D;AAE1D;;;GA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;QACvC,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;QACrD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAC3B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,MAAM,CAChD,CAAC;QACF,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,UAAU,CAAC,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;IAED,mDAAmD;IACnD,MAAM,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAChE,KAAK,MAAM,IAAI,IAAI,oBAAoB,EAAE,CAAC;QACxC,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YACnE,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC1D,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CACjC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,MAAM,CAChD,CAAC;YACF,IAAI,UAAU,EAAE,CAAC;gBACf,OAAO,UAAU,CAAC,EAAE,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NestJS Framework Resolver
|
|
3
|
+
*
|
|
4
|
+
* Handles NestJS decorator-based routing across its transport layers:
|
|
5
|
+
* - HTTP: @Controller(prefix) + @Get/@Post/@Put/@Patch/@Delete/@Head/@Options/@All
|
|
6
|
+
* - GraphQL: @Resolver + @Query/@Mutation/@Subscription
|
|
7
|
+
* - Microservices: @MessagePattern / @EventPattern
|
|
8
|
+
* - WebSockets: @WebSocketGateway(namespace) + @SubscribeMessage(event)
|
|
9
|
+
*
|
|
10
|
+
* Like the other framework extractors this is regex-over-source (comment-
|
|
11
|
+
* stripped), not AST traversal. NestJS differs from Spring/ASP.NET in two ways
|
|
12
|
+
* that this resolver has to account for:
|
|
13
|
+
*
|
|
14
|
+
* 1. An HTTP route's path is split across TWO decorators — the class-level
|
|
15
|
+
* `@Controller` prefix and the method-level `@Get`/`@Post` path — and both
|
|
16
|
+
* are frequently empty (`@Controller()`, `@Get()`). We pair each method
|
|
17
|
+
* decorator with its enclosing class and join the two paths.
|
|
18
|
+
*
|
|
19
|
+
* 2. `@Query()` is overloaded: it's a GraphQL *method* decorator (from
|
|
20
|
+
* `@nestjs/graphql`) AND a REST *parameter* decorator (from
|
|
21
|
+
* `@nestjs/common`). We only treat it as GraphQL when it sits inside an
|
|
22
|
+
* `@Resolver` class, which is what disambiguates the two.
|
|
23
|
+
*/
|
|
24
|
+
import { FrameworkResolver } from '../types';
|
|
25
|
+
export declare const nestjsResolver: FrameworkResolver;
|
|
26
|
+
//# sourceMappingURL=nestjs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nestjs.d.ts","sourceRoot":"","sources":["../../../src/resolution/frameworks/nestjs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EACL,iBAAiB,EAIlB,MAAM,UAAU,CAAC;AAQlB,eAAO,MAAM,cAAc,EAAE,iBAqJ5B,CAAC"}
|