@colbymchenry/codegraph-win32-arm64 1.5.0 → 1.6.1
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 +5 -0
- package/lib/dist/.test-build-engine.json +1 -0
- package/lib/dist/.test-build-viewer.json +1 -0
- package/lib/dist/bin/codegraph.d.ts +1 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +744 -320
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/viewer-gate.d.ts +17 -0
- package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
- package/lib/dist/bin/viewer-gate.js +31 -0
- package/lib/dist/bin/viewer-gate.js.map +1 -0
- package/lib/dist/context/formatter.d.ts +7 -1
- package/lib/dist/context/formatter.d.ts.map +1 -1
- package/lib/dist/context/formatter.js +12 -6
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +12 -0
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +103 -16
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +58 -2
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +187 -32
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +64 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +583 -6
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1417 -57
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +27 -4
- package/lib/dist/db/sqlite-adapter.d.ts +2 -0
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +56 -7
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts +12 -0
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
- package/lib/dist/db/synthesis-stage.js +89 -0
- package/lib/dist/db/synthesis-stage.js.map +1 -0
- package/lib/dist/db/wal-valve.d.ts +32 -12
- package/lib/dist/db/wal-valve.d.ts.map +1 -1
- package/lib/dist/db/wal-valve.js +65 -22
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.d.ts +53 -0
- package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
- package/lib/dist/db/wsl-shared-index.js +121 -0
- package/lib/dist/db/wsl-shared-index.js.map +1 -0
- package/lib/dist/directory.d.ts +130 -2
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +306 -23
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/errors.d.ts +14 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +16 -1
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +1 -0
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +15 -3
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/dfm-extractor.js +14 -10
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -1
- package/lib/dist/extraction/function-ref.d.ts +6 -4
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +41 -14
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +48 -12
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +176 -11
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +38 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +115 -3
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +218 -14
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +874 -176
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +310 -19
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +8 -3
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +58 -22
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +1 -1
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +169 -36
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
- package/lib/dist/extraction/languages/lua.js +4 -1
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +4 -0
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/python.d.ts.map +1 -1
- package/lib/dist/extraction/languages/python.js +71 -0
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +20 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +50 -20
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
- package/lib/dist/extraction/languages/scala.js +18 -3
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +9 -2
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +98 -22
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +6 -4
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +7 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +20 -1
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
- package/lib/dist/extraction/syntax-tokens.js +381 -0
- package/lib/dist/extraction/syntax-tokens.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +31 -3
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +101 -18
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +926 -132
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/lib/dist/file-limits.d.ts +40 -0
- package/lib/dist/file-limits.d.ts.map +1 -0
- package/lib/dist/file-limits.js +147 -0
- package/lib/dist/file-limits.js.map +1 -0
- package/lib/dist/graph/branch-guards.d.ts +248 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -0
- package/lib/dist/graph/branch-guards.js +2231 -0
- package/lib/dist/graph/branch-guards.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +251 -0
- package/lib/dist/graph/dead-code.d.ts.map +1 -0
- package/lib/dist/graph/dead-code.js +776 -0
- package/lib/dist/graph/dead-code.js.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.js +283 -0
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
- package/lib/dist/graph/index.d.ts +4 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +16 -1
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
- package/lib/dist/graph/named-symbol-flow.js +552 -0
- package/lib/dist/graph/named-symbol-flow.js.map +1 -0
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -0
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +83 -0
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
- package/lib/dist/graph/symbol-lookup.js +181 -0
- package/lib/dist/graph/symbol-lookup.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +9 -0
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +62 -36
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.d.ts +155 -0
- package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
- package/lib/dist/graph/type-hierarchy.js +382 -0
- package/lib/dist/graph/type-hierarchy.js.map +1 -0
- package/lib/dist/index.d.ts +273 -11
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +511 -34
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts +4 -3
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +11 -8
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +14 -2
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts +3 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +72 -12
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts +23 -8
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +74 -47
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-cli.js +215 -0
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.js +219 -0
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
- package/lib/dist/installer/targets/opencode.d.ts +16 -5
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
- package/lib/dist/installer/targets/opencode.js +73 -22
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +6 -0
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +14 -3
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +39 -11
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +6 -5
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +99 -20
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +12 -5
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/mcp/answer-freshness.d.ts +10 -0
- package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +68 -0
- package/lib/dist/mcp/answer-freshness.js.map +1 -0
- package/lib/dist/mcp/daemon-manager.d.ts +1 -1
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +17 -1
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +8 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +65 -2
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +17 -4
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +133 -23
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +26 -13
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +126 -32
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
- package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +46 -42
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +31 -9
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +190 -64
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.d.ts +140 -0
- package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/lib/dist/mcp/explore-dedup.js +239 -0
- package/lib/dist/mcp/explore-dedup.js.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.js +558 -0
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
- package/lib/dist/mcp/explore-session-state.d.ts +217 -0
- package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/lib/dist/mcp/explore-session-state.js +322 -0
- package/lib/dist/mcp/explore-session-state.js.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
- package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.js +30 -0
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
- package/lib/dist/mcp/index-freshness.d.ts +7 -0
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness.js +94 -0
- package/lib/dist/mcp/index-freshness.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +27 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +159 -14
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +14 -3
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
- package/lib/dist/mcp/project-lifecycle.js +181 -0
- package/lib/dist/mcp/project-lifecycle.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +15 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +2 -2
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +9 -7
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +2 -2
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +2 -2
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +13 -5
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +16 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +36 -13
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.d.ts +3 -1
- package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +10 -2
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +544 -38
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +4246 -770
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +61 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
- package/lib/dist/mcp/writer-lock.js +260 -0
- package/lib/dist/mcp/writer-lock.js.map +1 -0
- package/lib/dist/project-config.d.ts +23 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +39 -2
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +56 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
- package/lib/dist/resolution/alias-binding.js +127 -0
- package/lib/dist/resolution/alias-binding.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +21 -19
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +330 -154
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-constructor.js +123 -0
- package/lib/dist/resolution/cpp-constructor.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.js +342 -0
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +96 -2
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/expo-router.js +785 -0
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +251 -16
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +5 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +29 -1
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +79 -47
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +6 -14
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.js +328 -0
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.js +139 -0
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.js +78 -0
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +166 -0
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +153 -14
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +46 -0
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react-router.js +187 -0
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/react.d.ts +2 -1
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +188 -139
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +6 -1
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +11 -1
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts +82 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.js +377 -0
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
- package/lib/dist/resolution/import-resolver.d.ts +38 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +394 -28
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +89 -25
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +567 -149
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +13 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
- package/lib/dist/resolution/js-builtins.js +46 -0
- package/lib/dist/resolution/js-builtins.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +99 -22
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +2192 -87
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/next-router-synthesizer.js +113 -0
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +6 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +125 -17
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.js +126 -0
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/resolver-pool.d.ts +2 -0
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +4 -0
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/strip-comments.d.ts +6 -0
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +58 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
- package/lib/dist/resolution/synth-utils.d.ts +26 -0
- package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
- package/lib/dist/resolution/synth-utils.js +75 -0
- package/lib/dist/resolution/synth-utils.js.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts +49 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.js +931 -0
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +78 -2
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +64 -0
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
- package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
- package/lib/dist/search/identifier-segments.d.ts +10 -0
- package/lib/dist/search/identifier-segments.d.ts.map +1 -1
- package/lib/dist/search/identifier-segments.js +29 -0
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-paths.d.ts +106 -0
- package/lib/dist/search/query-paths.d.ts.map +1 -0
- package/lib/dist/search/query-paths.js +513 -0
- package/lib/dist/search/query-paths.js.map +1 -0
- package/lib/dist/search/query-utils.d.ts +16 -1
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +48 -10
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/watch-policy.d.ts +14 -0
- package/lib/dist/sync/watch-policy.d.ts.map +1 -1
- package/lib/dist/sync/watch-policy.js +19 -0
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +74 -35
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +281 -99
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts +4 -2
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +92 -41
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +21 -2
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +2 -0
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/deadcode.js +136 -0
- package/lib/dist/ui-server/api/deadcode.js.map +1 -0
- package/lib/dist/ui-server/api/effects.d.ts +87 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
- package/lib/dist/ui-server/api/effects.js +499 -0
- package/lib/dist/ui-server/api/effects.js.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.js +279 -0
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
- package/lib/dist/ui-server/api/events.d.ts +183 -0
- package/lib/dist/ui-server/api/events.d.ts.map +1 -0
- package/lib/dist/ui-server/api/events.js +430 -0
- package/lib/dist/ui-server/api/events.js.map +1 -0
- package/lib/dist/ui-server/api/file.d.ts +66 -0
- package/lib/dist/ui-server/api/file.d.ts.map +1 -0
- package/lib/dist/ui-server/api/file.js +235 -0
- package/lib/dist/ui-server/api/file.js.map +1 -0
- package/lib/dist/ui-server/api/filecode.d.ts +126 -0
- package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/filecode.js +205 -0
- package/lib/dist/ui-server/api/filecode.js.map +1 -0
- package/lib/dist/ui-server/api/flow.d.ts +226 -0
- package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
- package/lib/dist/ui-server/api/flow.js +612 -0
- package/lib/dist/ui-server/api/flow.js.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.js +92 -0
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
- package/lib/dist/ui-server/api/index.d.ts +90 -0
- package/lib/dist/ui-server/api/index.d.ts.map +1 -0
- package/lib/dist/ui-server/api/index.js +332 -0
- package/lib/dist/ui-server/api/index.js.map +1 -0
- package/lib/dist/ui-server/api/map.d.ts +238 -0
- package/lib/dist/ui-server/api/map.d.ts.map +1 -0
- package/lib/dist/ui-server/api/map.js +681 -0
- package/lib/dist/ui-server/api/map.js.map +1 -0
- package/lib/dist/ui-server/api/node.d.ts +81 -0
- package/lib/dist/ui-server/api/node.d.ts.map +1 -0
- package/lib/dist/ui-server/api/node.js +388 -0
- package/lib/dist/ui-server/api/node.js.map +1 -0
- package/lib/dist/ui-server/api/nodes.d.ts +25 -0
- package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/nodes.js +45 -0
- package/lib/dist/ui-server/api/nodes.js.map +1 -0
- package/lib/dist/ui-server/api/program.d.ts +139 -0
- package/lib/dist/ui-server/api/program.d.ts.map +1 -0
- package/lib/dist/ui-server/api/program.js +315 -0
- package/lib/dist/ui-server/api/program.js.map +1 -0
- package/lib/dist/ui-server/api/respond.d.ts +76 -0
- package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
- package/lib/dist/ui-server/api/respond.js +186 -0
- package/lib/dist/ui-server/api/respond.js.map +1 -0
- package/lib/dist/ui-server/api/route-roots.d.ts +39 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
- package/lib/dist/ui-server/api/route-roots.js +96 -0
- package/lib/dist/ui-server/api/route-roots.js.map +1 -0
- package/lib/dist/ui-server/api/routes.d.ts +59 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/routes.js +108 -0
- package/lib/dist/ui-server/api/routes.js.map +1 -0
- package/lib/dist/ui-server/api/screens.d.ts +117 -0
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
- package/lib/dist/ui-server/api/screens.js +611 -0
- package/lib/dist/ui-server/api/screens.js.map +1 -0
- package/lib/dist/ui-server/api/search.d.ts +29 -0
- package/lib/dist/ui-server/api/search.d.ts.map +1 -0
- package/lib/dist/ui-server/api/search.js +232 -0
- package/lib/dist/ui-server/api/search.js.map +1 -0
- package/lib/dist/ui-server/api/session.d.ts +52 -0
- package/lib/dist/ui-server/api/session.d.ts.map +1 -0
- package/lib/dist/ui-server/api/session.js +196 -0
- package/lib/dist/ui-server/api/session.js.map +1 -0
- package/lib/dist/ui-server/api/source.d.ts +200 -0
- package/lib/dist/ui-server/api/source.d.ts.map +1 -0
- package/lib/dist/ui-server/api/source.js +422 -0
- package/lib/dist/ui-server/api/source.js.map +1 -0
- package/lib/dist/ui-server/api/stats.d.ts +27 -0
- package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
- package/lib/dist/ui-server/api/stats.js +164 -0
- package/lib/dist/ui-server/api/stats.js.map +1 -0
- package/lib/dist/ui-server/api/steps.d.ts +274 -0
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
- package/lib/dist/ui-server/api/steps.js +1446 -0
- package/lib/dist/ui-server/api/steps.js.map +1 -0
- package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trail-store.js +323 -0
- package/lib/dist/ui-server/api/trail-store.js.map +1 -0
- package/lib/dist/ui-server/api/trails.d.ts +163 -0
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trails.js +369 -0
- package/lib/dist/ui-server/api/trails.js.map +1 -0
- package/lib/dist/ui-server/api/when.d.ts +125 -0
- package/lib/dist/ui-server/api/when.d.ts.map +1 -0
- package/lib/dist/ui-server/api/when.js +251 -0
- package/lib/dist/ui-server/api/when.js.map +1 -0
- package/lib/dist/ui-server/api/wire.d.ts +179 -0
- package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
- package/lib/dist/ui-server/api/wire.js +231 -0
- package/lib/dist/ui-server/api/wire.js.map +1 -0
- package/lib/dist/ui-server/assets.d.ts +40 -0
- package/lib/dist/ui-server/assets.d.ts.map +1 -0
- package/lib/dist/ui-server/assets.js +110 -0
- package/lib/dist/ui-server/assets.js.map +1 -0
- package/lib/dist/ui-server/constants.d.ts +32 -0
- package/lib/dist/ui-server/constants.d.ts.map +1 -0
- package/lib/dist/ui-server/constants.js +35 -0
- package/lib/dist/ui-server/constants.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts +113 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/index.js +307 -0
- package/lib/dist/ui-server/highlight/index.js.map +1 -0
- package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
- package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/languages.js +50 -0
- package/lib/dist/ui-server/highlight/languages.js.map +1 -0
- package/lib/dist/ui-server/index.d.ts +92 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -0
- package/lib/dist/ui-server/index.js +399 -0
- package/lib/dist/ui-server/index.js.map +1 -0
- package/lib/dist/ui-server/open-browser.d.ts +31 -0
- package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
- package/lib/dist/ui-server/open-browser.js +79 -0
- package/lib/dist/ui-server/open-browser.js.map +1 -0
- package/lib/dist/ui-server/security.d.ts +127 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -0
- package/lib/dist/ui-server/security.js +332 -0
- package/lib/dist/ui-server/security.js.map +1 -0
- package/lib/dist/ui-server/static.d.ts +45 -0
- package/lib/dist/ui-server/static.d.ts.map +1 -0
- package/lib/dist/ui-server/static.js +165 -0
- package/lib/dist/ui-server/static.js.map +1 -0
- package/lib/dist/utils.d.ts +14 -2
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +25 -10
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
- package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
- package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
- package/lib/dist/viewer/index.html +16 -0
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/picomatch/README.md +56 -51
- package/lib/node_modules/picomatch/lib/constants.js +4 -0
- package/lib/node_modules/picomatch/lib/parse.js +341 -1
- package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
- package/lib/node_modules/picomatch/lib/scan.js +30 -18
- package/lib/node_modules/picomatch/package.json +4 -4
- package/lib/package.json +9 -2
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Router — routes declared in markup, navigation written as a string.
|
|
3
|
+
*
|
|
4
|
+
* `frameworks/react.ts` already reads the route table out of the markup:
|
|
5
|
+
* `<Route path="/payment" component={PaymentScreen}/>` (v5),
|
|
6
|
+
* `<Route path="/payment" element={<PaymentScreen/>}/>` (v6) and
|
|
7
|
+
* `createBrowserRouter([{ path, element }])` (v6.4+) each become a `route`
|
|
8
|
+
* node named by its path, bound to the component that renders it. That is
|
|
9
|
+
* half of what "how does this app flow" means. This file is the other half.
|
|
10
|
+
*
|
|
11
|
+
* **Navigation is a string.** `history.push('/placeorder')` (v5, and the
|
|
12
|
+
* `useHistory` hook), `navigate('/placeorder')` (v6's `useNavigate`),
|
|
13
|
+
* `router.navigate(…)` on a data router, `redirect('/login')` from a loader
|
|
14
|
+
* or an action: the extractor records each as a call that resolves to
|
|
15
|
+
* nothing, because the target is a path, not a symbol. `resolve()` claims
|
|
16
|
+
* those refs, reads the argument off the source with the Expo Router readers
|
|
17
|
+
* (a string, a template with holes, a `{ pathname }` object, a conditional
|
|
18
|
+
* whose arms agree, a local `const href = …`), matches it against this
|
|
19
|
+
* framework's own route table, and returns a **`navigates`** edge carrying
|
|
20
|
+
* the href — the edge the Screens picture is drawn from and the step Steps
|
|
21
|
+
* draws as another page. `<Link to>` and `<Navigate to>` are JSX attributes
|
|
22
|
+
* rather than calls, so a synthesizer reads them instead
|
|
23
|
+
* (`react-router-synthesizer.ts`).
|
|
24
|
+
*
|
|
25
|
+
* Precision rests on the string naming a real route: a computed path, a path
|
|
26
|
+
* no route serves, and a conditional that forks are left unresolved rather
|
|
27
|
+
* than guessed. `push` and `replace` are two of the most common method names
|
|
28
|
+
* in JavaScript, so the receiver has to name a router — a bare `push` is an
|
|
29
|
+
* array's, and is never claimed.
|
|
30
|
+
*
|
|
31
|
+
* Known limits, both deliberate: a nested route's path is relative to its
|
|
32
|
+
* parent (`<Route path="team">` inside `<Route path="/dashboard">`), and the
|
|
33
|
+
* markup scan does not compose that tree, so only an absolute path is a
|
|
34
|
+
* destination an href can name; and a splat (`/admin/*`) matches anything, so
|
|
35
|
+
* it is never the answer to a concrete href.
|
|
36
|
+
*/
|
|
37
|
+
import type { FrameworkResolver, ResolutionContext } from '../types';
|
|
38
|
+
import { appRootFor, type RootedRouteTable } from './expo-router';
|
|
39
|
+
export type ReactRouterTable = RootedRouteTable;
|
|
40
|
+
/** The app a route file belongs to — the shared rule (`appRootFor`). */
|
|
41
|
+
export declare const reactRouterRoot: typeof appRootFor;
|
|
42
|
+
export declare function reactRouterTable(context: ResolutionContext): ReactRouterTable;
|
|
43
|
+
/** The verb a navigation call name stands for, or null. */
|
|
44
|
+
export declare function reactRouterNavVerb(name: string): string | null;
|
|
45
|
+
export declare const reactRouterResolver: FrameworkResolver;
|
|
46
|
+
//# sourceMappingURL=react-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-router.d.ts","sourceRoot":"","sources":["../../../src/resolution/frameworks/react-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAA8B,MAAM,UAAU,CAAC;AAEjG,OAAO,EAEL,UAAU,EAKV,KAAK,gBAAgB,EAEtB,MAAM,eAAe,CAAC;AAavB,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEhD,wEAAwE;AACxE,eAAO,MAAM,eAAe,mBAAa,CAAC;AAuB1C,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAqC7E;AAiBD,2DAA2D;AAC3D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI9D;AAMD,eAAO,MAAM,mBAAmB,EAAE,iBAgDjC,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* React Router — routes declared in markup, navigation written as a string.
|
|
4
|
+
*
|
|
5
|
+
* `frameworks/react.ts` already reads the route table out of the markup:
|
|
6
|
+
* `<Route path="/payment" component={PaymentScreen}/>` (v5),
|
|
7
|
+
* `<Route path="/payment" element={<PaymentScreen/>}/>` (v6) and
|
|
8
|
+
* `createBrowserRouter([{ path, element }])` (v6.4+) each become a `route`
|
|
9
|
+
* node named by its path, bound to the component that renders it. That is
|
|
10
|
+
* half of what "how does this app flow" means. This file is the other half.
|
|
11
|
+
*
|
|
12
|
+
* **Navigation is a string.** `history.push('/placeorder')` (v5, and the
|
|
13
|
+
* `useHistory` hook), `navigate('/placeorder')` (v6's `useNavigate`),
|
|
14
|
+
* `router.navigate(…)` on a data router, `redirect('/login')` from a loader
|
|
15
|
+
* or an action: the extractor records each as a call that resolves to
|
|
16
|
+
* nothing, because the target is a path, not a symbol. `resolve()` claims
|
|
17
|
+
* those refs, reads the argument off the source with the Expo Router readers
|
|
18
|
+
* (a string, a template with holes, a `{ pathname }` object, a conditional
|
|
19
|
+
* whose arms agree, a local `const href = …`), matches it against this
|
|
20
|
+
* framework's own route table, and returns a **`navigates`** edge carrying
|
|
21
|
+
* the href — the edge the Screens picture is drawn from and the step Steps
|
|
22
|
+
* draws as another page. `<Link to>` and `<Navigate to>` are JSX attributes
|
|
23
|
+
* rather than calls, so a synthesizer reads them instead
|
|
24
|
+
* (`react-router-synthesizer.ts`).
|
|
25
|
+
*
|
|
26
|
+
* Precision rests on the string naming a real route: a computed path, a path
|
|
27
|
+
* no route serves, and a conditional that forks are left unresolved rather
|
|
28
|
+
* than guessed. `push` and `replace` are two of the most common method names
|
|
29
|
+
* in JavaScript, so the receiver has to name a router — a bare `push` is an
|
|
30
|
+
* array's, and is never claimed.
|
|
31
|
+
*
|
|
32
|
+
* Known limits, both deliberate: a nested route's path is relative to its
|
|
33
|
+
* parent (`<Route path="team">` inside `<Route path="/dashboard">`), and the
|
|
34
|
+
* markup scan does not compose that tree, so only an absolute path is a
|
|
35
|
+
* destination an href can name; and a splat (`/admin/*`) matches anything, so
|
|
36
|
+
* it is never the answer to a concrete href.
|
|
37
|
+
*/
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.reactRouterResolver = exports.reactRouterRoot = void 0;
|
|
40
|
+
exports.reactRouterTable = reactRouterTable;
|
|
41
|
+
exports.reactRouterNavVerb = reactRouterNavVerb;
|
|
42
|
+
const package_deps_1 = require("./package-deps");
|
|
43
|
+
const expo_router_1 = require("./expo-router");
|
|
44
|
+
// `pageForHref` is framework-agnostic — it takes any RouteTable and decides
|
|
45
|
+
// which of its routes an href names (absolute URLs, holes, a conditional's
|
|
46
|
+
// two arms). It lives in `nextjs.ts` because that is where it was first
|
|
47
|
+
// needed; duplicating it here would be a second derivation of the same rule.
|
|
48
|
+
const nextjs_1 = require("./nextjs");
|
|
49
|
+
const ROUTE_LANGUAGES = ['typescript', 'javascript', 'tsx', 'jsx'];
|
|
50
|
+
/** The app a route file belongs to — the shared rule (`appRootFor`). */
|
|
51
|
+
exports.reactRouterRoot = expo_router_1.appRootFor;
|
|
52
|
+
/**
|
|
53
|
+
* True for a route node `frameworks/react.ts` emitted, and no other.
|
|
54
|
+
*
|
|
55
|
+
* Its id is a verbatim reconstruction of the node's own fields, which no
|
|
56
|
+
* other framework's route id is: a server route carries its METHOD
|
|
57
|
+
* (`route:file:12:POST:/login`), a file-based page carries no line.
|
|
58
|
+
*/
|
|
59
|
+
function isReactRouterRoute(node) {
|
|
60
|
+
return ((node.language === 'tsx' || node.language === 'jsx') &&
|
|
61
|
+
node.id === `route:${node.filePath}:${node.startLine}:${node.name}`);
|
|
62
|
+
}
|
|
63
|
+
/** `:id?` — a parameter React Router serves the route with or without. */
|
|
64
|
+
function isOptionalParam(seg) {
|
|
65
|
+
return seg.startsWith(':') && seg.endsWith('?');
|
|
66
|
+
}
|
|
67
|
+
const tables = new WeakMap();
|
|
68
|
+
function reactRouterTable(context) {
|
|
69
|
+
const all = context.getNodesByKind('route');
|
|
70
|
+
const cached = tables.get(context);
|
|
71
|
+
if (cached && cached.source === all)
|
|
72
|
+
return cached;
|
|
73
|
+
const byRoot = new Map();
|
|
74
|
+
const shortened = [];
|
|
75
|
+
const tableAt = (root) => {
|
|
76
|
+
let t = byRoot.get(root);
|
|
77
|
+
if (!t)
|
|
78
|
+
byRoot.set(root, (t = { source: all, exact: new Map(), dynamic: [] }));
|
|
79
|
+
return t;
|
|
80
|
+
};
|
|
81
|
+
for (const node of all) {
|
|
82
|
+
if (!isReactRouterRoute(node))
|
|
83
|
+
continue;
|
|
84
|
+
// A nested route's path is relative to its parent; without the tree it is
|
|
85
|
+
// not a destination. A splat matches everything, so it answers nothing.
|
|
86
|
+
if (!node.name.startsWith('/') || node.name.endsWith('*'))
|
|
87
|
+
continue;
|
|
88
|
+
const root = (0, exports.reactRouterRoot)(node.filePath);
|
|
89
|
+
const path = node.name.length > 1 && node.name.endsWith('/') ? node.name.slice(0, -1) : node.name;
|
|
90
|
+
(0, expo_router_1.addRouteTo)(tableAt(root), path, node);
|
|
91
|
+
// React Router's optional parameter: `/cart/:id?` is the screen for
|
|
92
|
+
// `/cart/5` AND for a bare `/cart`, which the navbar's cart icon links
|
|
93
|
+
// to. The matcher pairs a route with an href of the same length, so the
|
|
94
|
+
// shorter form is its own entry — collected now, registered after every
|
|
95
|
+
// literal path, so a route someone actually wrote always wins.
|
|
96
|
+
let segs = path.split('/').slice(1);
|
|
97
|
+
while (segs.length > 1 && isOptionalParam(segs[segs.length - 1])) {
|
|
98
|
+
segs = segs.slice(0, -1);
|
|
99
|
+
shortened.push({ root, path: '/' + segs.join('/'), node });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
for (const s of shortened) {
|
|
103
|
+
const t = byRoot.get(s.root);
|
|
104
|
+
if (t && !t.exact.has(s.path))
|
|
105
|
+
(0, expo_router_1.addRouteTo)(t, s.path, s.node);
|
|
106
|
+
}
|
|
107
|
+
const table = { source: all, byRoot };
|
|
108
|
+
tables.set(context, table);
|
|
109
|
+
return table;
|
|
110
|
+
}
|
|
111
|
+
// =============================================================================
|
|
112
|
+
// Navigation calls
|
|
113
|
+
// =============================================================================
|
|
114
|
+
/**
|
|
115
|
+
* `history.push` / `.replace` (v5, `useHistory`), `navigate(…)` (v6,
|
|
116
|
+
* `useNavigate`), `router.navigate(…)` (a data router), `redirect(…)` (a
|
|
117
|
+
* loader or an action).
|
|
118
|
+
*
|
|
119
|
+
* The receiver is required for `push` / `replace`: an unqualified `push` is
|
|
120
|
+
* an array's, and claiming it would put every `paths.push('/tmp/x')` in the
|
|
121
|
+
* repo one string-match away from a route.
|
|
122
|
+
*/
|
|
123
|
+
const NAV_CALL = /^(?:history|navigate|router)\.(?:push|replace|navigate)$|^(?:navigate|redirect)$/;
|
|
124
|
+
/** The verb a navigation call name stands for, or null. */
|
|
125
|
+
function reactRouterNavVerb(name) {
|
|
126
|
+
if (!NAV_CALL.test(name))
|
|
127
|
+
return null;
|
|
128
|
+
const dot = name.lastIndexOf('.');
|
|
129
|
+
return dot < 0 ? name : name.slice(dot + 1);
|
|
130
|
+
}
|
|
131
|
+
// =============================================================================
|
|
132
|
+
// The resolver
|
|
133
|
+
// =============================================================================
|
|
134
|
+
exports.reactRouterResolver = {
|
|
135
|
+
name: 'react-router',
|
|
136
|
+
languages: [...ROUTE_LANGUAGES],
|
|
137
|
+
detect(context) {
|
|
138
|
+
return (0, package_deps_1.dependsOn)(context, 'react-router', 'react-router-dom', 'react-router-native');
|
|
139
|
+
},
|
|
140
|
+
claimsReference(name) {
|
|
141
|
+
return NAV_CALL.test(name);
|
|
142
|
+
},
|
|
143
|
+
resolve(ref, context) {
|
|
144
|
+
if (ref.referenceKind !== 'calls')
|
|
145
|
+
return null;
|
|
146
|
+
const verb = reactRouterNavVerb(ref.referenceName);
|
|
147
|
+
if (!verb)
|
|
148
|
+
return null;
|
|
149
|
+
if (!ROUTE_LANGUAGES.includes(ref.language))
|
|
150
|
+
return null;
|
|
151
|
+
const routes = (0, expo_router_1.routesForFile)(reactRouterTable(context), ref.filePath);
|
|
152
|
+
if (!routes || routes.exact.size === 0)
|
|
153
|
+
return null;
|
|
154
|
+
const lines = context.getFileLines?.(ref.filePath) ?? context.readFile(ref.filePath)?.split(/\r?\n/) ?? null;
|
|
155
|
+
if (!lines)
|
|
156
|
+
return null;
|
|
157
|
+
const arg = (0, expo_router_1.firstArgumentText)(lines, ref.line, ref.column, verb);
|
|
158
|
+
if (arg === null)
|
|
159
|
+
return null;
|
|
160
|
+
let href = (0, expo_router_1.parseHrefExpression)(arg);
|
|
161
|
+
if (!href) {
|
|
162
|
+
const enclosing = context.getNodeById?.(ref.fromNodeId);
|
|
163
|
+
const start = enclosing && enclosing.filePath === ref.filePath ? enclosing.startLine : Math.max(1, ref.line - 40);
|
|
164
|
+
href = (0, expo_router_1.readHrefViaLocal)(lines, ref.line, ref.column, verb, start);
|
|
165
|
+
}
|
|
166
|
+
if (!href)
|
|
167
|
+
return null;
|
|
168
|
+
// Every arm of a conditional destination is somewhere this call goes; the
|
|
169
|
+
// first is this reference's resolution and the rest ride as `alsoTargets`.
|
|
170
|
+
const targets = (0, nextjs_1.destinationsForHref)(href, routes);
|
|
171
|
+
const target = targets[0];
|
|
172
|
+
if (!target)
|
|
173
|
+
return null;
|
|
174
|
+
return {
|
|
175
|
+
original: ref,
|
|
176
|
+
targetNodeId: target.node.id,
|
|
177
|
+
...(targets.length > 1
|
|
178
|
+
? { alsoTargets: targets.slice(1).map((t) => ({ targetNodeId: t.node.id, metadata: { href: t.href.display, navMethod: verb } })) }
|
|
179
|
+
: {}),
|
|
180
|
+
confidence: 0.95,
|
|
181
|
+
resolvedBy: 'framework',
|
|
182
|
+
edgeKind: 'navigates',
|
|
183
|
+
metadata: { href: target.href.display, navMethod: verb },
|
|
184
|
+
};
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=react-router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-router.js","sourceRoot":"","sources":["../../../src/resolution/frameworks/react-router.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* React Framework Resolver
|
|
3
3
|
*
|
|
4
|
-
* Handles React
|
|
4
|
+
* Handles React patterns: React Router routes, components, hooks, contexts.
|
|
5
|
+
* Next.js pages, route handlers and navigation are `nextjs.ts`'s.
|
|
5
6
|
*/
|
|
6
7
|
import { FrameworkResolver } from '../types';
|
|
7
8
|
export declare const reactResolver: FrameworkResolver;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/resolution/frameworks/react.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/resolution/frameworks/react.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,iBAAiB,EAAiD,MAAM,UAAU,CAAC;AAG5F,eAAO,MAAM,aAAa,EAAE,iBA4H3B,CAAC"}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* React Framework Resolver
|
|
4
4
|
*
|
|
5
|
-
* Handles React
|
|
5
|
+
* Handles React patterns: React Router routes, components, hooks, contexts.
|
|
6
|
+
* Next.js pages, route handlers and navigation are `nextjs.ts`'s.
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
9
|
exports.reactResolver = void 0;
|
|
10
|
+
const package_deps_1 = require("./package-deps");
|
|
9
11
|
exports.reactResolver = {
|
|
10
12
|
name: 'react',
|
|
11
13
|
// Includes 'tsx'/'jsx' so route extraction runs on JSX files (where
|
|
@@ -15,20 +17,9 @@ exports.reactResolver = {
|
|
|
15
17
|
// of language; only the extract pass filters on `languages`.)
|
|
16
18
|
languages: ['javascript', 'typescript', 'tsx', 'jsx'],
|
|
17
19
|
detect(context) {
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
const pkg = JSON.parse(packageJson);
|
|
23
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
24
|
-
if (deps.react || deps.next || deps['react-native']) {
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
// Invalid JSON
|
|
30
|
-
}
|
|
31
|
-
}
|
|
20
|
+
// React in a package.json — the root's, or a workspace's (`frontend/`, `apps/web/`).
|
|
21
|
+
if ((0, package_deps_1.dependsOn)(context, 'react', 'next', 'react-native'))
|
|
22
|
+
return true;
|
|
32
23
|
// Check for .jsx/.tsx files
|
|
33
24
|
const allFiles = context.getAllFiles();
|
|
34
25
|
return allFiles.some((f) => f.endsWith('.jsx') || f.endsWith('.tsx'));
|
|
@@ -96,21 +87,10 @@ exports.reactResolver = {
|
|
|
96
87
|
// what tree-sitter can't: route nodes (React Router + Next.js conventions),
|
|
97
88
|
// which is why 'tsx'/'jsx' are now in `languages` — `<Route>`/`element={<X/>}`
|
|
98
89
|
// routes live in JSX files and were previously skipped entirely.
|
|
99
|
-
//
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const routeTagRegex = /<Route\b/g;
|
|
104
|
-
let routeMatch;
|
|
105
|
-
while ((routeMatch = routeTagRegex.exec(content)) !== null) {
|
|
106
|
-
const window = content.slice(routeMatch.index, routeMatch.index + 400);
|
|
107
|
-
const pathMatch = window.match(/\bpath\s*=\s*["']([^"']+)["']/);
|
|
108
|
-
if (!pathMatch)
|
|
109
|
-
continue; // index/layout routes without a path
|
|
110
|
-
const routePath = pathMatch[1];
|
|
111
|
-
const compMatch = window.match(/\bcomponent\s*=\s*\{\s*([A-Z][A-Za-z0-9_]*)/) ||
|
|
112
|
-
window.match(/\belement\s*=\s*\{\s*<\s*([A-Z][A-Za-z0-9_]*)/);
|
|
113
|
-
const line = content.slice(0, routeMatch.index).split('\n').length;
|
|
90
|
+
// Read only each opening tag's own attributes, including expression values.
|
|
91
|
+
const declarations = scanRouteDeclarations(content, !/\.(?:ts|mts|cts)$/.test(filePath));
|
|
92
|
+
for (const { path: routePath, component, at } of declarations) {
|
|
93
|
+
const line = content.slice(0, at).split('\n').length;
|
|
114
94
|
const routeNode = {
|
|
115
95
|
id: `route:${filePath}:${line}:${routePath}`,
|
|
116
96
|
kind: 'route',
|
|
@@ -125,10 +105,10 @@ exports.reactResolver = {
|
|
|
125
105
|
updatedAt: now,
|
|
126
106
|
};
|
|
127
107
|
nodes.push(routeNode);
|
|
128
|
-
if (
|
|
108
|
+
if (component) {
|
|
129
109
|
references.push({
|
|
130
110
|
fromNodeId: routeNode.id,
|
|
131
|
-
referenceName:
|
|
111
|
+
referenceName: component,
|
|
132
112
|
referenceKind: 'references',
|
|
133
113
|
line,
|
|
134
114
|
column: 0,
|
|
@@ -137,73 +117,187 @@ exports.reactResolver = {
|
|
|
137
117
|
});
|
|
138
118
|
}
|
|
139
119
|
}
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
120
|
+
// Next.js pages and route handlers are `frameworks/nextjs.ts`'s.
|
|
121
|
+
return { nodes, references };
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
/** Structural scanner: strings, comments, JSX and balanced expressions are units. */
|
|
125
|
+
function scanRouteDeclarations(source, allowJsx) {
|
|
126
|
+
const routes = [];
|
|
127
|
+
const dataRouter = /\b(?:createBrowserRouter|createHashRouter|createMemoryRouter|createRoutesFromElements)\b/.test(source);
|
|
128
|
+
if (!dataRouter && !/<Route\b/.test(source))
|
|
129
|
+
return routes;
|
|
130
|
+
const literal = (value) => {
|
|
131
|
+
const match = /^(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)')$/.exec(value.trim());
|
|
132
|
+
return match ? match[1] ?? match[2] : undefined;
|
|
133
|
+
};
|
|
134
|
+
const componentName = (value, jsx) => {
|
|
135
|
+
if (!value)
|
|
136
|
+
return undefined;
|
|
137
|
+
const match = jsx
|
|
138
|
+
? /^\s*<\s*([A-Z][\w]*)\s*(?=[\s/>])/.exec(value)
|
|
139
|
+
: /^\s*([A-Z][\w]*)\s*$/.exec(value);
|
|
140
|
+
return match?.[1];
|
|
141
|
+
};
|
|
142
|
+
// The few characters before `at`, trailing whitespace skipped: enough for the
|
|
143
|
+
// end-anchored checks below without copying the whole prefix per `/` or `<`.
|
|
144
|
+
const tokenBefore = (at) => {
|
|
145
|
+
let j = at - 1;
|
|
146
|
+
while (j >= 0 && /\s/.test(source[j]))
|
|
147
|
+
j--;
|
|
148
|
+
return source.slice(Math.max(0, j - 11), j + 1);
|
|
149
|
+
};
|
|
150
|
+
const trivia = (at) => {
|
|
151
|
+
while (at < source.length) {
|
|
152
|
+
if (/\s/.test(source[at])) {
|
|
153
|
+
at++;
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
if (source.startsWith('//', at)) {
|
|
157
|
+
const end = source.indexOf('\n', at + 2);
|
|
158
|
+
at = end < 0 ? source.length : end;
|
|
178
159
|
}
|
|
160
|
+
else if (source.startsWith('/*', at)) {
|
|
161
|
+
const end = source.indexOf('*/', at + 2);
|
|
162
|
+
at = end < 0 ? source.length : end + 2;
|
|
163
|
+
}
|
|
164
|
+
else
|
|
165
|
+
break;
|
|
179
166
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
startColumn: 0,
|
|
197
|
-
endColumn: 0,
|
|
198
|
-
language: filePath.endsWith('.tsx') ? 'tsx' : filePath.endsWith('.ts') ? 'typescript' : 'javascript',
|
|
199
|
-
updatedAt: now,
|
|
200
|
-
});
|
|
167
|
+
return at;
|
|
168
|
+
};
|
|
169
|
+
function unit(at) {
|
|
170
|
+
const ch = source[at];
|
|
171
|
+
if (ch === '"' || ch === "'" || ch === '`') {
|
|
172
|
+
let i = at + 1;
|
|
173
|
+
while (i < source.length) {
|
|
174
|
+
if (source[i] === '\\') {
|
|
175
|
+
i += 2;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (source[i] === ch)
|
|
179
|
+
return i + 1;
|
|
180
|
+
if (ch === '`' && source.startsWith('${', i)) {
|
|
181
|
+
i = unit(i + 1);
|
|
182
|
+
continue;
|
|
201
183
|
}
|
|
184
|
+
i++;
|
|
202
185
|
}
|
|
186
|
+
return i;
|
|
203
187
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
188
|
+
// A regex can contain braces or JSX-looking text without ending an expression.
|
|
189
|
+
if (ch === '/') {
|
|
190
|
+
const before = tokenBefore(at);
|
|
191
|
+
if (!before || /[=(:,[!&|?{};]$/.test(before) || /\b(?:return|throw|case|yield)\s*$/.test(before)) {
|
|
192
|
+
let inClass = false;
|
|
193
|
+
for (let i = at + 1; i < source.length && source[i] !== '\n'; i++) {
|
|
194
|
+
if (source[i] === '\\') {
|
|
195
|
+
i++;
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
if (source[i] === '[')
|
|
199
|
+
inClass = true;
|
|
200
|
+
else if (source[i] === ']')
|
|
201
|
+
inClass = false;
|
|
202
|
+
else if (source[i] === '/' && !inClass) {
|
|
203
|
+
i++;
|
|
204
|
+
while (/[a-z]/i.test(source[i] ?? '') && i < source.length)
|
|
205
|
+
i++;
|
|
206
|
+
return i;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (allowJsx && ch === '<' && /^<(?:[A-Za-z][\w.:-]*|>)/.test(source.slice(at))) {
|
|
212
|
+
const before = tokenBefore(at);
|
|
213
|
+
// `count<limit` and `factory<Type>()` are not JSX opening tags.
|
|
214
|
+
if (!/[\w$)\]'"]$/.test(before) || /\breturn$/.test(before))
|
|
215
|
+
return jsx(at);
|
|
216
|
+
}
|
|
217
|
+
const close = ch === '{' ? '}' : ch === '[' ? ']' : ch === '(' ? ')' : undefined;
|
|
218
|
+
if (!close)
|
|
219
|
+
return at + 1;
|
|
220
|
+
let i = at + 1;
|
|
221
|
+
const fields = new Map();
|
|
222
|
+
while ((i = trivia(i)) < source.length && source[i] !== close) {
|
|
223
|
+
// A property must start at an object entry, never inside its value.
|
|
224
|
+
const key = ch === '{' ? /^(?:([A-Za-z_$][\w$]*)|["']([^"']+)["'])\s*:/.exec(source.slice(i)) : null;
|
|
225
|
+
if (key) {
|
|
226
|
+
const start = i;
|
|
227
|
+
const valueAt = trivia(i + key[0].length);
|
|
228
|
+
i = valueAt;
|
|
229
|
+
let valueEnd = i;
|
|
230
|
+
while ((i = trivia(i)) < source.length && source[i] !== ',' && source[i] !== close) {
|
|
231
|
+
i = unit(i);
|
|
232
|
+
valueEnd = i;
|
|
233
|
+
}
|
|
234
|
+
fields.set(key[1] ?? key[2], { value: source.slice(valueAt, valueEnd).trim(), at: start });
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
// Skip a whole entry (spread, method, shorthand), but still visit nested units.
|
|
238
|
+
while ((i = trivia(i)) < source.length && source[i] !== ',' && source[i] !== close)
|
|
239
|
+
i = unit(i);
|
|
240
|
+
}
|
|
241
|
+
if (source[i] === ',')
|
|
242
|
+
i++;
|
|
243
|
+
}
|
|
244
|
+
if (dataRouter && ch === '{' && source[i] === close) {
|
|
245
|
+
const pathField = fields.get('path');
|
|
246
|
+
const path = pathField && literal(pathField.value);
|
|
247
|
+
const component = componentName(fields.get('element')?.value, true)
|
|
248
|
+
?? componentName(fields.get('Component')?.value, false);
|
|
249
|
+
if (path !== undefined && component)
|
|
250
|
+
routes.push({ path: path || '/', component, at: pathField.at });
|
|
251
|
+
}
|
|
252
|
+
return i < source.length ? i + 1 : i;
|
|
253
|
+
}
|
|
254
|
+
function jsx(at) {
|
|
255
|
+
const tag = /^<([\w.:-]*)/.exec(source.slice(at));
|
|
256
|
+
let i = at + tag[0].length;
|
|
257
|
+
const attrs = new Map();
|
|
258
|
+
while ((i = trivia(i)) < source.length && source[i] !== '>' && !source.startsWith('/>', i)) {
|
|
259
|
+
const attr = /^[\w:-]+/.exec(source.slice(i));
|
|
260
|
+
if (!attr) {
|
|
261
|
+
i = unit(i);
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
i = trivia(i + attr[0].length);
|
|
265
|
+
if (source[i] !== '=')
|
|
266
|
+
continue;
|
|
267
|
+
i = trivia(i + 1);
|
|
268
|
+
const start = i;
|
|
269
|
+
i = unit(i);
|
|
270
|
+
attrs.set(attr[0], source.slice(start, i));
|
|
271
|
+
}
|
|
272
|
+
if (tag[1] === 'Route' && i < source.length) {
|
|
273
|
+
const path = literal(attrs.get('path') ?? '');
|
|
274
|
+
const expression = (name) => attrs.get(name)?.replace(/^\{([\s\S]*)\}$/, '$1');
|
|
275
|
+
const component = componentName(expression('component'), false) ?? componentName(expression('element'), true);
|
|
276
|
+
if (path)
|
|
277
|
+
routes.push({ path, component, at });
|
|
278
|
+
}
|
|
279
|
+
if (source.startsWith('/>', i))
|
|
280
|
+
return i + 2;
|
|
281
|
+
i++;
|
|
282
|
+
while (i < source.length) {
|
|
283
|
+
if (source.startsWith('</', i)) {
|
|
284
|
+
const end = source.indexOf('>', i + 2);
|
|
285
|
+
return end < 0 ? source.length : end + 1;
|
|
286
|
+
}
|
|
287
|
+
if (source[i] === '<' && /^<(?:[A-Za-z]|>)/.test(source.slice(i)))
|
|
288
|
+
i = jsx(i);
|
|
289
|
+
else if (source[i] === '{')
|
|
290
|
+
i = unit(i);
|
|
291
|
+
else
|
|
292
|
+
i++;
|
|
293
|
+
}
|
|
294
|
+
return i;
|
|
295
|
+
}
|
|
296
|
+
let at = 0;
|
|
297
|
+
while ((at = trivia(at)) < source.length)
|
|
298
|
+
at = unit(at);
|
|
299
|
+
return routes.sort((a, b) => a.at - b.at);
|
|
300
|
+
}
|
|
207
301
|
/**
|
|
208
302
|
* Check if string is PascalCase
|
|
209
303
|
*/
|
|
@@ -286,49 +380,4 @@ function resolveContext(name, context) {
|
|
|
286
380
|
return preferred[0].id;
|
|
287
381
|
return candidates[0].id;
|
|
288
382
|
}
|
|
289
|
-
/**
|
|
290
|
-
* Convert file path to Next.js route
|
|
291
|
-
*/
|
|
292
|
-
function filePathToRoute(filePath) {
|
|
293
|
-
// pages/index.tsx -> /
|
|
294
|
-
// pages/about.tsx -> /about
|
|
295
|
-
// pages/blog/[slug].tsx -> /blog/:slug
|
|
296
|
-
// app/page.tsx -> /
|
|
297
|
-
// app/about/page.tsx -> /about
|
|
298
|
-
// Only real page-component files are routes. Exclude non-page extensions
|
|
299
|
-
// (.mjs/.json/.cjs), config files (next.config.ts, vite.config.ts…), and
|
|
300
|
-
// Next.js special files (_app/_document). This also stops a `*.config.mjs`
|
|
301
|
-
// with `export default` in a dir like `nextjs-pages/` from being a "route".
|
|
302
|
-
const base = filePath.split('/').pop() ?? '';
|
|
303
|
-
if (!/\.(tsx?|jsx?)$/.test(base))
|
|
304
|
-
return null;
|
|
305
|
-
if (base.startsWith('_') || /\.config\.[a-z]+$/.test(base))
|
|
306
|
-
return null;
|
|
307
|
-
// Match pages/ and app/ as PATH SEGMENTS (not a substring — `nextjs-pages/`
|
|
308
|
-
// must not count as a `pages/` router dir).
|
|
309
|
-
if (/(?:^|\/)pages\//.test(filePath)) {
|
|
310
|
-
let route = filePath
|
|
311
|
-
.replace(/^.*pages\//, '/')
|
|
312
|
-
.replace(/\/index\.(tsx?|jsx?)$/, '')
|
|
313
|
-
.replace(/\.(tsx?|jsx?)$/, '')
|
|
314
|
-
.replace(/\[([^\]]+)\]/g, ':$1');
|
|
315
|
-
if (route === '')
|
|
316
|
-
route = '/';
|
|
317
|
-
return route;
|
|
318
|
-
}
|
|
319
|
-
if (/(?:^|\/)app\//.test(filePath)) {
|
|
320
|
-
// App router - only page.tsx files are routes
|
|
321
|
-
if (!filePath.includes('page.')) {
|
|
322
|
-
return null;
|
|
323
|
-
}
|
|
324
|
-
let route = filePath
|
|
325
|
-
.replace(/^.*app\//, '/')
|
|
326
|
-
.replace(/\/page\.(tsx?|jsx?)$/, '')
|
|
327
|
-
.replace(/\[([^\]]+)\]/g, ':$1');
|
|
328
|
-
if (route === '')
|
|
329
|
-
route = '/';
|
|
330
|
-
return route;
|
|
331
|
-
}
|
|
332
|
-
return null;
|
|
333
|
-
}
|
|
334
383
|
//# sourceMappingURL=react.js.map
|