@colbymchenry/codegraph-win32-arm64 1.6.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 +599 -291
- 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/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +43 -2
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +21 -2
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +86 -31
- 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 +40 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +423 -3
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1026 -33
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +11 -1
- 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 +101 -2
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +254 -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 +35 -14
- package/lib/dist/extraction/function-ref.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 +77 -1
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +113 -15
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +599 -132
- 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 +291 -15
- 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/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/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.map +1 -1
- package/lib/dist/extraction/languages/rust.js +3 -0
- 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/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 +29 -3
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +96 -17
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +820 -82
- 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/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 +61 -35
- 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 +251 -11
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +395 -34
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +3 -2
- 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 +35 -7
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts +2 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +14 -4
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.js +7 -1
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- 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/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/types.d.ts +7 -0
- 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.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +16 -0
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +2 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +12 -3
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +7 -4
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +91 -29
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +17 -7
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +116 -24
- 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 +28 -9
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +146 -62
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.d.ts +5 -2
- package/lib/dist/mcp/explore-dedup.d.ts.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +8 -5
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- 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 +3 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +95 -11
- 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 +11 -2
- 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 +9 -0
- 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 +1 -1
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +6 -3
- package/lib/dist/mcp/server-instructions.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 +276 -36
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +2295 -980
- 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/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/callback-synthesizer.d.ts +23 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +291 -143
- 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/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 +376 -26
- 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 +552 -145
- 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 +69 -22
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +1902 -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/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/query-paths.d.ts +50 -1
- package/lib/dist/search/query-paths.d.ts.map +1 -1
- package/lib/dist/search/query-paths.js +227 -12
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +15 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +35 -7
- 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 +52 -35
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +236 -100
- 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 +1 -1
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +1 -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,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SvelteKit — navigation written as markup.
|
|
4
|
+
*
|
|
5
|
+
* <a href="/login">Sign in</a>
|
|
6
|
+
* <a href="/profile/@{user.username}">…</a>
|
|
7
|
+
* <a href={`/article/${slug}`}>…</a>
|
|
8
|
+
*
|
|
9
|
+
* SvelteKit has no link component: an ordinary `<a href>` IS the navigation,
|
|
10
|
+
* intercepted by the router. So a page's outgoing links are plain markup, the
|
|
11
|
+
* extractor records no reference for them, and the resolver in
|
|
12
|
+
* `frameworks/sveltekit-router.ts` — which binds `goto` and `redirect` —
|
|
13
|
+
* never sees them. This pass reads every internal `<a href>` out of the
|
|
14
|
+
* source, attributes it to the component (the innermost function) it is
|
|
15
|
+
* written in, matches it against the SvelteKit route table, and synthesizes
|
|
16
|
+
* one `navigates` edge from the component to the page.
|
|
17
|
+
*
|
|
18
|
+
* Edges are `provenance:'heuristic'`, `synthesizedBy:'sveltekit-link'`, with
|
|
19
|
+
* the href as written and `registeredAt` = the markup site. An external href
|
|
20
|
+
* is a link out of the site, not a transition; a computed one is nothing; a
|
|
21
|
+
* path no page serves is nothing. Nothing here runs on a project with no
|
|
22
|
+
* SvelteKit pages.
|
|
23
|
+
*
|
|
24
|
+
* This is `next-router-synthesizer.ts`'s twin over `<a href>` alone — Next
|
|
25
|
+
* reads `<Link href>` too, and Svelte has no such component.
|
|
26
|
+
*
|
|
27
|
+
* A second pass here binds a route to the `+page.svelte` that serves it
|
|
28
|
+
* (`svelteKitPageComponentEdges`): the route node and the component sit in the
|
|
29
|
+
* same file, but nothing joined them, so a SvelteKit page had no body for the
|
|
30
|
+
* Steps picture to walk and opened as a lone box.
|
|
31
|
+
*
|
|
32
|
+
* The other half of the join — a page and the `+page.server.js` beside it — is
|
|
33
|
+
* `callback-synthesizer.ts`'s `svelteKitLoadEdges`, which already existed: a
|
|
34
|
+
* SvelteKit page and its loader are two halves of one route joined by the file
|
|
35
|
+
* system rather than by a call, and without that join a page's own auth guard
|
|
36
|
+
* (`redirect(302, '/login')` in its loader) belongs to no screen at all.
|
|
37
|
+
*/
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.svelteKitLinkEdges = svelteKitLinkEdges;
|
|
40
|
+
exports.svelteKitPageComponentEdges = svelteKitPageComponentEdges;
|
|
41
|
+
const query_utils_1 = require("../search/query-utils");
|
|
42
|
+
const expo_router_1 = require("./frameworks/expo-router");
|
|
43
|
+
const nextjs_1 = require("./frameworks/nextjs");
|
|
44
|
+
const sveltekit_router_1 = require("./frameworks/sveltekit-router");
|
|
45
|
+
const synth_utils_1 = require("./synth-utils");
|
|
46
|
+
const MARKUP_FILE = /\.svelte$/;
|
|
47
|
+
/** `<a … href=…`, the attribute anywhere in the tag, quoted or bound. */
|
|
48
|
+
const LINK_TAG = /<a\b([^>]*?)\bhref\s*=\s*(?:"([^"]*)"|'([^']*)'|\{\s*)/g;
|
|
49
|
+
/** Links a single component may carry before it is a navigation menu, not a decision. */
|
|
50
|
+
const MAX_LINKS_PER_COMPONENT = 24;
|
|
51
|
+
async function svelteKitLinkEdges(ctx, onYield) {
|
|
52
|
+
const table = (0, sveltekit_router_1.svelteKitTable)(ctx);
|
|
53
|
+
if (table.byRoot.size === 0)
|
|
54
|
+
return [];
|
|
55
|
+
const edges = [];
|
|
56
|
+
const seen = new Set();
|
|
57
|
+
const perComponent = new Map();
|
|
58
|
+
let scanned = 0;
|
|
59
|
+
for (const file of ctx.getAllFiles()) {
|
|
60
|
+
if (!MARKUP_FILE.test(file) || (0, query_utils_1.isTestPath)(file))
|
|
61
|
+
continue;
|
|
62
|
+
const routes = (0, expo_router_1.routesForFile)(table, file);
|
|
63
|
+
if (!routes || routes.exact.size === 0)
|
|
64
|
+
continue;
|
|
65
|
+
if ((++scanned & 63) === 0)
|
|
66
|
+
await onYield();
|
|
67
|
+
const source = ctx.readFile(file);
|
|
68
|
+
if (!source || !source.includes('href'))
|
|
69
|
+
continue;
|
|
70
|
+
const nodes = ctx.getNodesInFile(file);
|
|
71
|
+
const lineOf = (0, synth_utils_1.makeLineAt)(source, 1);
|
|
72
|
+
LINK_TAG.lastIndex = 0;
|
|
73
|
+
let m;
|
|
74
|
+
while ((m = LINK_TAG.exec(source)) !== null) {
|
|
75
|
+
let literal = m[2] ?? m[3] ?? null;
|
|
76
|
+
if (literal === null) {
|
|
77
|
+
// `href={…}`: a string or a template with holes.
|
|
78
|
+
const at = m.index + m[0].length;
|
|
79
|
+
const ch = source[at];
|
|
80
|
+
if (ch === '"' || ch === "'" || ch === '`')
|
|
81
|
+
literal = (0, expo_router_1.readStringAt)(source, at);
|
|
82
|
+
}
|
|
83
|
+
if (literal === null)
|
|
84
|
+
continue;
|
|
85
|
+
// An external href is a link out of the site, not a transition. A
|
|
86
|
+
// Svelte `{expr}` inside a quoted attribute is an interpolation, so it
|
|
87
|
+
// becomes the same hole a template literal's `${…}` does — which is how
|
|
88
|
+
// `/profile/@{user.username}` reaches the `/profile/@:user` page.
|
|
89
|
+
if (!literal.startsWith('/'))
|
|
90
|
+
continue;
|
|
91
|
+
const href = (0, expo_router_1.toHref)(literal.replace(/\{[^}]*\}/g, expo_router_1.HOLE));
|
|
92
|
+
if (!href)
|
|
93
|
+
continue;
|
|
94
|
+
const line = lineOf(m.index);
|
|
95
|
+
const component = (0, synth_utils_1.enclosingFn)(nodes, line);
|
|
96
|
+
if (!component)
|
|
97
|
+
continue;
|
|
98
|
+
// A destination written as a choice names one route per arm, and the
|
|
99
|
+
// user reaches every one of them — each is drawn.
|
|
100
|
+
for (const { node: page, href: arm } of (0, nextjs_1.destinationsForHref)(href, routes)) {
|
|
101
|
+
const key = `${component.id}>${page.id}`;
|
|
102
|
+
if (seen.has(key))
|
|
103
|
+
continue;
|
|
104
|
+
const count = (perComponent.get(component.id) ?? 0) + 1;
|
|
105
|
+
perComponent.set(component.id, count);
|
|
106
|
+
if (count > MAX_LINKS_PER_COMPONENT)
|
|
107
|
+
continue;
|
|
108
|
+
seen.add(key);
|
|
109
|
+
edges.push({
|
|
110
|
+
source: component.id,
|
|
111
|
+
target: page.id,
|
|
112
|
+
kind: 'navigates',
|
|
113
|
+
line,
|
|
114
|
+
provenance: 'heuristic',
|
|
115
|
+
metadata: {
|
|
116
|
+
synthesizedBy: 'sveltekit-link',
|
|
117
|
+
href: arm.display,
|
|
118
|
+
navMethod: 'a',
|
|
119
|
+
registeredAt: `${file}:${line}`,
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return edges;
|
|
126
|
+
}
|
|
127
|
+
// =============================================================================
|
|
128
|
+
// A route and the page that serves it
|
|
129
|
+
// =============================================================================
|
|
130
|
+
/**
|
|
131
|
+
* One `calls` edge from each `+page.svelte` route to the component in its own
|
|
132
|
+
* file — the page that renders when a navigation lands there.
|
|
133
|
+
*
|
|
134
|
+
* Every other framework's resolver names this at extraction: a Next page route
|
|
135
|
+
* points at the file's default export, a React Router route at the component
|
|
136
|
+
* the markup named. SvelteKit's route is derived from the file's PATH, and its
|
|
137
|
+
* component has no name of its own to reference (every page file's component
|
|
138
|
+
* is called `+page`), so the two are joined here, where both are already in
|
|
139
|
+
* hand and the match is the file itself rather than a name.
|
|
140
|
+
*
|
|
141
|
+
* With it, `route-roots.ts` reads the page as the route's root: the Steps
|
|
142
|
+
* picture starts at the page instead of at an empty box, and the Screens walk
|
|
143
|
+
* attributes a navigation to the screen whose component holds it rather than
|
|
144
|
+
* falling back to the file it was written in.
|
|
145
|
+
*/
|
|
146
|
+
async function svelteKitPageComponentEdges(ctx, onYield) {
|
|
147
|
+
const table = (0, sveltekit_router_1.svelteKitTable)(ctx);
|
|
148
|
+
if (table.byRoot.size === 0)
|
|
149
|
+
return [];
|
|
150
|
+
const edges = [];
|
|
151
|
+
let scanned = 0;
|
|
152
|
+
const pages = new Set();
|
|
153
|
+
for (const routes of table.byRoot.values())
|
|
154
|
+
for (const page of routes.exact.values())
|
|
155
|
+
pages.add(page);
|
|
156
|
+
for (const page of pages) {
|
|
157
|
+
if ((++scanned & 31) === 0)
|
|
158
|
+
await onYield();
|
|
159
|
+
const component = ctx.getNodesInFile(page.filePath).find((n) => n.kind === 'component');
|
|
160
|
+
if (!component)
|
|
161
|
+
continue;
|
|
162
|
+
edges.push({
|
|
163
|
+
source: page.id,
|
|
164
|
+
target: component.id,
|
|
165
|
+
kind: 'calls',
|
|
166
|
+
line: component.startLine,
|
|
167
|
+
provenance: 'heuristic',
|
|
168
|
+
metadata: { synthesizedBy: 'sveltekit-page', registeredAt: page.filePath },
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
return edges;
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=sveltekit-synthesizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sveltekit-synthesizer.js","sourceRoot":"","sources":["../../src/resolution/sveltekit-synthesizer.ts"],"names":[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AAC,GAAG,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACvC,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAQ,CAAC;IAC9B,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;YAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtG,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,EAAE,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC;YAAE,MAAM,OAAO,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;QACxF,IAAI,CAAC,SAAS;YAAE,SAAS;QACzB,KAAK,CAAC,IAAI,CAAC;YACT,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,MAAM,EAAE,SAAS,CAAC,EAAE;YACpB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,SAAS,CAAC,SAAS;YACzB,UAAU,EAAE,WAAW;YACvB,QAAQ,EAAE,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,IAAI,CAAC,QAAQ,EAAE;SAC3E,CAAC,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Small helpers the dynamic-edge synthesizers share: a per-match line
|
|
3
|
+
* resolver over one source string, and "the function this line is in".
|
|
4
|
+
*/
|
|
5
|
+
import type { Node } from '../types';
|
|
6
|
+
/** The kinds a call site can be attributed to. */
|
|
7
|
+
export declare const FN_KINDS: ReadonlySet<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Per-match line resolver over `src`, 1-based at `baseLine`. The inline
|
|
10
|
+
* `src.slice(0, idx).split('\n').length` idiom is O(source-length) PER MATCH,
|
|
11
|
+
* which goes quadratic on a match-dense source (a generated function full of
|
|
12
|
+
* `.push(` calls re-scanned tens of thousands of times was most of the #1235
|
|
13
|
+
* indexing wedge). Builds the newline index once — lazily, since most sources
|
|
14
|
+
* never produce a match — then answers each call with a binary search.
|
|
15
|
+
*/
|
|
16
|
+
export declare function makeLineAt(src: string, baseLine: number): (idx: number) => number;
|
|
17
|
+
/** Innermost function/method node whose line range contains `line`. */
|
|
18
|
+
export declare function enclosingFn(nodesInFile: readonly Node[], line: number): Node | null;
|
|
19
|
+
/**
|
|
20
|
+
* The smallest `constant` / `variable` node whose lines contain `line` — the
|
|
21
|
+
* value a top-level registration is written inside (`const worker = new
|
|
22
|
+
* Worker('q', async (job) => …)`): what a caller imports and a walk can start
|
|
23
|
+
* from when no function encloses the site.
|
|
24
|
+
*/
|
|
25
|
+
export declare function enclosingValue(nodesInFile: readonly Node[], line: number): Node | null;
|
|
26
|
+
//# sourceMappingURL=synth-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synth-utils.d.ts","sourceRoot":"","sources":["../../src/resolution/synth-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,kDAAkD;AAClD,eAAO,MAAM,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAgD,CAAC;AAE1F;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAiBjF;AAED,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,WAAW,EAAE,SAAS,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAUnF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,SAAS,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAUtF"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Small helpers the dynamic-edge synthesizers share: a per-match line
|
|
4
|
+
* resolver over one source string, and "the function this line is in".
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.FN_KINDS = void 0;
|
|
8
|
+
exports.makeLineAt = makeLineAt;
|
|
9
|
+
exports.enclosingFn = enclosingFn;
|
|
10
|
+
exports.enclosingValue = enclosingValue;
|
|
11
|
+
/** The kinds a call site can be attributed to. */
|
|
12
|
+
exports.FN_KINDS = new Set(['method', 'function', 'component']);
|
|
13
|
+
/**
|
|
14
|
+
* Per-match line resolver over `src`, 1-based at `baseLine`. The inline
|
|
15
|
+
* `src.slice(0, idx).split('\n').length` idiom is O(source-length) PER MATCH,
|
|
16
|
+
* which goes quadratic on a match-dense source (a generated function full of
|
|
17
|
+
* `.push(` calls re-scanned tens of thousands of times was most of the #1235
|
|
18
|
+
* indexing wedge). Builds the newline index once — lazily, since most sources
|
|
19
|
+
* never produce a match — then answers each call with a binary search.
|
|
20
|
+
*/
|
|
21
|
+
function makeLineAt(src, baseLine) {
|
|
22
|
+
let nl = null;
|
|
23
|
+
return (idx) => {
|
|
24
|
+
if (!nl) {
|
|
25
|
+
nl = [];
|
|
26
|
+
for (let i = src.indexOf('\n'); i !== -1; i = src.indexOf('\n', i + 1))
|
|
27
|
+
nl.push(i);
|
|
28
|
+
}
|
|
29
|
+
// Count newlines strictly before idx.
|
|
30
|
+
let lo = 0;
|
|
31
|
+
let hi = nl.length;
|
|
32
|
+
while (lo < hi) {
|
|
33
|
+
const mid = (lo + hi) >> 1;
|
|
34
|
+
if (nl[mid] < idx)
|
|
35
|
+
lo = mid + 1;
|
|
36
|
+
else
|
|
37
|
+
hi = mid;
|
|
38
|
+
}
|
|
39
|
+
return baseLine + lo;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** Innermost function/method node whose line range contains `line`. */
|
|
43
|
+
function enclosingFn(nodesInFile, line) {
|
|
44
|
+
let best = null;
|
|
45
|
+
for (const n of nodesInFile) {
|
|
46
|
+
if (!exports.FN_KINDS.has(n.kind))
|
|
47
|
+
continue;
|
|
48
|
+
const end = n.endLine ?? n.startLine;
|
|
49
|
+
if (n.startLine <= line && end >= line) {
|
|
50
|
+
if (!best || n.startLine >= best.startLine)
|
|
51
|
+
best = n; // prefer the tightest (latest-starting) encloser
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return best;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The smallest `constant` / `variable` node whose lines contain `line` — the
|
|
58
|
+
* value a top-level registration is written inside (`const worker = new
|
|
59
|
+
* Worker('q', async (job) => …)`): what a caller imports and a walk can start
|
|
60
|
+
* from when no function encloses the site.
|
|
61
|
+
*/
|
|
62
|
+
function enclosingValue(nodesInFile, line) {
|
|
63
|
+
let best = null;
|
|
64
|
+
for (const n of nodesInFile) {
|
|
65
|
+
if (n.kind !== 'constant' && n.kind !== 'variable')
|
|
66
|
+
continue;
|
|
67
|
+
const end = n.endLine ?? n.startLine;
|
|
68
|
+
if (n.startLine <= line && end >= line) {
|
|
69
|
+
if (!best || n.startLine >= best.startLine)
|
|
70
|
+
best = n;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return best;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=synth-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synth-utils.js","sourceRoot":"","sources":["../../src/resolution/synth-utils.ts"],"names":[],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C,IAAI,CAAC;YAAE,SAAS;QACpC,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,SAAS,CAAC;QACrC,IAAI,CAAC,CAAC,SAAS,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACvC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,GAAG,CAAC,CAAC,CAAC,iDAAiD;QACzG,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,WAA4B,EAAE,IAAY;IACvE,IAAI,IAAI,GAAgB,IAAI,CAAC;IAC7B,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;QAC5B,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU;YAAE,SAAS;QAC7D,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,SAAS,CAAC;QACrC,IAAI,CAAC,CAAC,SAAS,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACvC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,GAAG,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TanStack Router — navigation written as markup.
|
|
3
|
+
*
|
|
4
|
+
* <Link to="/dashboard/invoices/$invoiceId" params={{ invoiceId: 3 }}>…</Link>
|
|
5
|
+
* <Link to="/login">Sign in</Link>
|
|
6
|
+
* <Navigate to="/dashboard" />
|
|
7
|
+
*
|
|
8
|
+
* A JSX attribute is not a call, so the extractor records no reference for it
|
|
9
|
+
* and the resolver in `frameworks/tanstack-router.ts` — which binds
|
|
10
|
+
* `navigate({ to })` and `redirect({ to })` — never sees it. This pass reads
|
|
11
|
+
* every `to` out of the source, attributes it to the component (the innermost
|
|
12
|
+
* function) it is written in, matches it against the TanStack route table, and
|
|
13
|
+
* synthesizes one `navigates` edge from the component to the route.
|
|
14
|
+
*
|
|
15
|
+
* What makes this different from React Router's identical-looking `<Link to>`:
|
|
16
|
+
* TanStack's `to` is the route PATTERN and the values ride beside it in
|
|
17
|
+
* `params`, so `to="/posts/$postId"` names the route rather than an address —
|
|
18
|
+
* and it is normalised the same way a route name is instead of being read as a
|
|
19
|
+
* URL. A `<Link from=…>` with no `to` is a relative link within the route it
|
|
20
|
+
* is already on, and names no destination of its own.
|
|
21
|
+
*
|
|
22
|
+
* Edges are `provenance:'heuristic'`, `synthesizedBy:'tanstack-link'`, with the
|
|
23
|
+
* destination as written and `registeredAt` = the JSX site. A computed `to` is
|
|
24
|
+
* nothing; a pattern no route serves is nothing. Nothing here runs on a project
|
|
25
|
+
* with no TanStack routes.
|
|
26
|
+
*/
|
|
27
|
+
import type { Edge } from '../types';
|
|
28
|
+
import type { ResolutionContext } from './types';
|
|
29
|
+
import type { MaybeYield } from './cooperative-yield';
|
|
30
|
+
export declare function tanstackLinkEdges(ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]>;
|
|
31
|
+
//# sourceMappingURL=tanstack-router-synthesizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstack-router-synthesizer.d.ts","sourceRoot":"","sources":["../../src/resolution/tanstack-router-synthesizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAmBtD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CA2DpG"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TanStack Router — navigation written as markup.
|
|
4
|
+
*
|
|
5
|
+
* <Link to="/dashboard/invoices/$invoiceId" params={{ invoiceId: 3 }}>…</Link>
|
|
6
|
+
* <Link to="/login">Sign in</Link>
|
|
7
|
+
* <Navigate to="/dashboard" />
|
|
8
|
+
*
|
|
9
|
+
* A JSX attribute is not a call, so the extractor records no reference for it
|
|
10
|
+
* and the resolver in `frameworks/tanstack-router.ts` — which binds
|
|
11
|
+
* `navigate({ to })` and `redirect({ to })` — never sees it. This pass reads
|
|
12
|
+
* every `to` out of the source, attributes it to the component (the innermost
|
|
13
|
+
* function) it is written in, matches it against the TanStack route table, and
|
|
14
|
+
* synthesizes one `navigates` edge from the component to the route.
|
|
15
|
+
*
|
|
16
|
+
* What makes this different from React Router's identical-looking `<Link to>`:
|
|
17
|
+
* TanStack's `to` is the route PATTERN and the values ride beside it in
|
|
18
|
+
* `params`, so `to="/posts/$postId"` names the route rather than an address —
|
|
19
|
+
* and it is normalised the same way a route name is instead of being read as a
|
|
20
|
+
* URL. A `<Link from=…>` with no `to` is a relative link within the route it
|
|
21
|
+
* is already on, and names no destination of its own.
|
|
22
|
+
*
|
|
23
|
+
* Edges are `provenance:'heuristic'`, `synthesizedBy:'tanstack-link'`, with the
|
|
24
|
+
* destination as written and `registeredAt` = the JSX site. A computed `to` is
|
|
25
|
+
* nothing; a pattern no route serves is nothing. Nothing here runs on a project
|
|
26
|
+
* with no TanStack routes.
|
|
27
|
+
*/
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.tanstackLinkEdges = tanstackLinkEdges;
|
|
30
|
+
const strip_comments_1 = require("./strip-comments");
|
|
31
|
+
const query_utils_1 = require("../search/query-utils");
|
|
32
|
+
const expo_router_1 = require("./frameworks/expo-router");
|
|
33
|
+
const nextjs_1 = require("./frameworks/nextjs");
|
|
34
|
+
const tanstack_router_1 = require("./frameworks/tanstack-router");
|
|
35
|
+
const synth_utils_1 = require("./synth-utils");
|
|
36
|
+
const JSX_FILE = /\.(?:[cm]?[jt]sx?)$/;
|
|
37
|
+
/** `<Link … to=` / `<Navigate … to=`, the attribute anywhere in the tag. */
|
|
38
|
+
const LINK_TAG = /<(Link|Navigate)\b([^>]*?)\bto\s*=\s*(?:"([^"]*)"|'([^']*)'|\{\s*)/g;
|
|
39
|
+
/** A tag this pass could possibly match — the cheap prefilter. */
|
|
40
|
+
const HAS_LINK_TAG = /<(?:Link|Navigate)\b/;
|
|
41
|
+
/** Links a single component may carry before it is a navigation menu, not a decision. */
|
|
42
|
+
const MAX_LINKS_PER_COMPONENT = 24;
|
|
43
|
+
async function tanstackLinkEdges(ctx, onYield) {
|
|
44
|
+
const table = (0, tanstack_router_1.tanstackTable)(ctx);
|
|
45
|
+
if (table.byRoot.size === 0)
|
|
46
|
+
return [];
|
|
47
|
+
const edges = [];
|
|
48
|
+
const seen = new Set();
|
|
49
|
+
const perComponent = new Map();
|
|
50
|
+
let scanned = 0;
|
|
51
|
+
for (const file of ctx.getAllFiles()) {
|
|
52
|
+
if (!JSX_FILE.test(file) || (0, query_utils_1.isTestPath)(file))
|
|
53
|
+
continue;
|
|
54
|
+
const routes = (0, expo_router_1.routesForFile)(table, file);
|
|
55
|
+
if (!routes || routes.exact.size === 0)
|
|
56
|
+
continue;
|
|
57
|
+
if ((++scanned & 63) === 0)
|
|
58
|
+
await onYield();
|
|
59
|
+
const source = ctx.readFile(file);
|
|
60
|
+
if (!source || !HAS_LINK_TAG.test(source))
|
|
61
|
+
continue;
|
|
62
|
+
const safe = (0, strip_comments_1.stripCommentsForRegex)(source, 'typescript');
|
|
63
|
+
const nodes = ctx.getNodesInFile(file);
|
|
64
|
+
const lineOf = (0, synth_utils_1.makeLineAt)(safe, 1);
|
|
65
|
+
LINK_TAG.lastIndex = 0;
|
|
66
|
+
let m;
|
|
67
|
+
while ((m = LINK_TAG.exec(safe)) !== null) {
|
|
68
|
+
let literal = m[3] ?? m[4] ?? null;
|
|
69
|
+
if (literal === null) {
|
|
70
|
+
// `to={…}`: a string or a template.
|
|
71
|
+
const at = m.index + m[0].length;
|
|
72
|
+
const ch = safe[at];
|
|
73
|
+
if (ch === '"' || ch === "'" || ch === '`')
|
|
74
|
+
literal = (0, expo_router_1.readStringAt)(safe, at);
|
|
75
|
+
}
|
|
76
|
+
if (literal === null)
|
|
77
|
+
continue;
|
|
78
|
+
const href = (0, tanstack_router_1.tanstackDestination)(JSON.stringify(literal));
|
|
79
|
+
if (!href)
|
|
80
|
+
continue;
|
|
81
|
+
const line = lineOf(m.index);
|
|
82
|
+
const component = (0, synth_utils_1.enclosingFn)(nodes, line);
|
|
83
|
+
if (!component)
|
|
84
|
+
continue;
|
|
85
|
+
// A destination written as a choice names one route per arm, and the
|
|
86
|
+
// user reaches every one of them — each is drawn.
|
|
87
|
+
for (const { node: route, href: arm } of (0, nextjs_1.destinationsForHref)(href, routes)) {
|
|
88
|
+
const key = `${component.id}>${route.id}`;
|
|
89
|
+
if (seen.has(key))
|
|
90
|
+
continue;
|
|
91
|
+
const count = (perComponent.get(component.id) ?? 0) + 1;
|
|
92
|
+
perComponent.set(component.id, count);
|
|
93
|
+
if (count > MAX_LINKS_PER_COMPONENT)
|
|
94
|
+
continue;
|
|
95
|
+
seen.add(key);
|
|
96
|
+
edges.push({
|
|
97
|
+
source: component.id,
|
|
98
|
+
target: route.id,
|
|
99
|
+
kind: 'navigates',
|
|
100
|
+
line,
|
|
101
|
+
provenance: 'heuristic',
|
|
102
|
+
metadata: {
|
|
103
|
+
synthesizedBy: 'tanstack-link',
|
|
104
|
+
href: arm.display,
|
|
105
|
+
navMethod: m[1] === 'Navigate' ? 'navigate' : 'link',
|
|
106
|
+
registeredAt: `${file}:${line}`,
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return edges;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=tanstack-router-synthesizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstack-router-synthesizer.js","sourceRoot":"","sources":["../../src/resolution/tanstack-router-synthesizer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;AAuBH,8CA2DC;AA7ED,qDAAyD;AACzD,uDAAmD;AACnD,0DAAuE;AACvE,gDAA0D;AAC1D,kEAAkF;AAClF,+CAAwD;AAExD,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AAEvC,4EAA4E;AAC5E,MAAM,QAAQ,GAAG,qEAAqE,CAAC;AAEvF,kEAAkE;AAClE,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAE5C,yFAAyF;AACzF,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE5B,KAAK,UAAU,iBAAiB,CAAC,GAAsB,EAAE,OAAmB;IACjF,MAAM,KAAK,GAAG,IAAA,+BAAa,EAAC,GAAG,CAAC,CAAC;IACjC,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACvC,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC/C,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAA,wBAAU,EAAC,IAAI,CAAC;YAAE,SAAS;QACvD,MAAM,MAAM,GAAG,IAAA,2BAAa,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,MAA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pD,YAAY,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE;qBAChC;iBACF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-tier channels — the web's equivalent of the React Native bridge.
|
|
3
|
+
*
|
|
4
|
+
* A web app is two programs that talk over a wire the graph cannot see: the
|
|
5
|
+
* page calls `fetch('/api/users', { method: 'POST' })` and the API's
|
|
6
|
+
* `app.post('/api/users', createUser)` answers; a service puts `'welcome'` on
|
|
7
|
+
* the `email` queue and a `@Process('welcome')` method picks it up; a
|
|
8
|
+
* gateway's `this.server.emit('message')` lands in the component that wrote
|
|
9
|
+
* `socket.on('message', …)`. Each hop is a string on both sides, which is the
|
|
10
|
+
* evidence that lets a synthesizer close it — exactly as the RN event channel
|
|
11
|
+
* pairs `sendEvent(withName: "x")` with `addListener('x')`.
|
|
12
|
+
*
|
|
13
|
+
* Three channels, one scan:
|
|
14
|
+
*
|
|
15
|
+
* 1. **`http-client`** — a literal path in a client call (`fetch`, `axios.post`,
|
|
16
|
+
* `ky`, `got`, `$fetch`, `useFetch`, `useSWR`, or a project instance made by
|
|
17
|
+
* `axios.create(…)` / `ky.extend(…)`) → the ONE route node `METHOD path` it
|
|
18
|
+
* denotes. Template holes match a `:param`; a hole in front of the path
|
|
19
|
+
* (`${API_URL}/users`) matches a route by its tail; a variable url, a path
|
|
20
|
+
* no route serves, or a path two routes serve alike produce nothing.
|
|
21
|
+
* Edge: enclosing function → route, `tier: 'client→server'`.
|
|
22
|
+
* 2. **`queue-job`** — `queue.add('job', …)` where the queue is named (`new
|
|
23
|
+
* Queue('email')`, `@InjectQueue('email')`) → the `@Process('job')` method
|
|
24
|
+
* of the `@Processor('email')` class, a WorkerHost's `process`, a
|
|
25
|
+
* `new Worker('email', handler)`, or Bull's `queue.process('job', handler)`.
|
|
26
|
+
* 3. **`event-bus`** — `eventEmitter.emit('user.created')` → `@OnEvent('user.created')`
|
|
27
|
+
* (globs honoured); and sockets in both directions: a client's
|
|
28
|
+
* `socket.emit('x')` → the server's `@SubscribeMessage('x')` / `socket.on('x')`
|
|
29
|
+
* (`tier: 'client→server'`), the server's `server.emit('x')` → the client's
|
|
30
|
+
* `socket.on('x', …)` (`tier: 'server→client'`). The in-process
|
|
31
|
+
* `.on('x', fn)` ↔ `.emit('x')` pairing stays the emitter pass's.
|
|
32
|
+
*
|
|
33
|
+
* Every edge is `kind: 'calls'`, `provenance: 'heuristic'`, and carries
|
|
34
|
+
* `synthesizedBy`, `channel` (`http` | `queue` | `event` | `socket`), the
|
|
35
|
+
* `tier` when the direction is known, the `event` / `queue` / `method` /
|
|
36
|
+
* `href` it was paired on, and `registeredAt` — the route registration, the
|
|
37
|
+
* decorator, the `.on` — so a reader can check the pairing. Fan-out is capped
|
|
38
|
+
* per event as the emitter pass caps it; an HTTP pairing needs no cap because
|
|
39
|
+
* it is exact. Test suites and generated files are never sources: a supertest
|
|
40
|
+
* call is the test's story, and forty of them would make the route a hub.
|
|
41
|
+
*/
|
|
42
|
+
import type { Edge } from '../types';
|
|
43
|
+
import type { ResolutionContext } from './types';
|
|
44
|
+
import type { MaybeYield } from './cooperative-yield';
|
|
45
|
+
export declare const TIER_CLIENT_TO_SERVER = "client\u2192server";
|
|
46
|
+
export declare const TIER_SERVER_TO_CLIENT = "server\u2192client";
|
|
47
|
+
export declare function hasCrossTierPattern(content: string): boolean;
|
|
48
|
+
export declare function crossTierEdges(ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]>;
|
|
49
|
+
//# sourceMappingURL=tier-synthesizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier-synthesizer.d.ts","sourceRoot":"","sources":["../../src/resolution/tier-synthesizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAetD,eAAO,MAAM,qBAAqB,uBAAkB,CAAC;AACrD,eAAO,MAAM,qBAAqB,uBAAkB,CAAC;AA20BrD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CA4DjG"}
|