@backthread/extractor 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/cluster/domain-grouping.d.ts +113 -0
- package/dist/cluster/domain-grouping.d.ts.map +1 -0
- package/dist/cluster/domain-grouping.js +277 -0
- package/dist/cluster/domain-grouping.js.map +1 -0
- package/dist/cluster/grouping-gate.d.ts +54 -0
- package/dist/cluster/grouping-gate.d.ts.map +1 -0
- package/dist/cluster/grouping-gate.js +0 -0
- package/dist/cluster/grouping-gate.js.map +1 -0
- package/dist/cluster/louvain.d.ts +88 -0
- package/dist/cluster/louvain.d.ts.map +1 -0
- package/dist/cluster/louvain.js +674 -0
- package/dist/cluster/louvain.js.map +1 -0
- package/dist/cluster/overrides.d.ts +19 -0
- package/dist/cluster/overrides.d.ts.map +1 -0
- package/dist/cluster/overrides.js +32 -0
- package/dist/cluster/overrides.js.map +1 -0
- package/dist/cluster/subsystem.d.ts +45 -0
- package/dist/cluster/subsystem.d.ts.map +1 -0
- package/dist/cluster/subsystem.js +299 -0
- package/dist/cluster/subsystem.js.map +1 -0
- package/dist/cluster/workspaces.d.ts +64 -0
- package/dist/cluster/workspaces.d.ts.map +1 -0
- package/dist/cluster/workspaces.js +739 -0
- package/dist/cluster/workspaces.js.map +1 -0
- package/dist/extract.d.ts +52 -0
- package/dist/extract.d.ts.map +1 -0
- package/dist/extract.js +48 -0
- package/dist/extract.js.map +1 -0
- package/dist/framework/celery/celery.d.ts +17 -0
- package/dist/framework/celery/celery.d.ts.map +1 -0
- package/dist/framework/celery/celery.js +524 -0
- package/dist/framework/celery/celery.js.map +1 -0
- package/dist/framework/contribute-step.d.ts +38 -0
- package/dist/framework/contribute-step.d.ts.map +1 -0
- package/dist/framework/contribute-step.js +403 -0
- package/dist/framework/contribute-step.js.map +1 -0
- package/dist/framework/detect-step.d.ts +8 -0
- package/dist/framework/detect-step.d.ts.map +1 -0
- package/dist/framework/detect-step.js +54 -0
- package/dist/framework/detect-step.js.map +1 -0
- package/dist/framework/detect-util.d.ts +24 -0
- package/dist/framework/detect-util.d.ts.map +1 -0
- package/dist/framework/detect-util.js +59 -0
- package/dist/framework/detect-util.js.map +1 -0
- package/dist/framework/django/django.d.ts +22 -0
- package/dist/framework/django/django.d.ts.map +1 -0
- package/dist/framework/django/django.js +940 -0
- package/dist/framework/django/django.js.map +1 -0
- package/dist/framework/fastapi/fastapi.d.ts +27 -0
- package/dist/framework/fastapi/fastapi.d.ts.map +1 -0
- package/dist/framework/fastapi/fastapi.js +477 -0
- package/dist/framework/fastapi/fastapi.js.map +1 -0
- package/dist/framework/faststream/faststream.d.ts +19 -0
- package/dist/framework/faststream/faststream.d.ts.map +1 -0
- package/dist/framework/faststream/faststream.js +765 -0
- package/dist/framework/faststream/faststream.js.map +1 -0
- package/dist/framework/flask/flask.d.ts +17 -0
- package/dist/framework/flask/flask.d.ts.map +1 -0
- package/dist/framework/flask/flask.js +507 -0
- package/dist/framework/flask/flask.js.map +1 -0
- package/dist/framework/graphql/graphql.d.ts +17 -0
- package/dist/framework/graphql/graphql.d.ts.map +1 -0
- package/dist/framework/graphql/graphql.js +708 -0
- package/dist/framework/graphql/graphql.js.map +1 -0
- package/dist/framework/grpc/grpc.d.ts +22 -0
- package/dist/framework/grpc/grpc.d.ts.map +1 -0
- package/dist/framework/grpc/grpc.js +618 -0
- package/dist/framework/grpc/grpc.js.map +1 -0
- package/dist/framework/litestar/litestar.d.ts +17 -0
- package/dist/framework/litestar/litestar.d.ts.map +1 -0
- package/dist/framework/litestar/litestar.js +536 -0
- package/dist/framework/litestar/litestar.js.map +1 -0
- package/dist/framework/nest/nest.d.ts +19 -0
- package/dist/framework/nest/nest.d.ts.map +1 -0
- package/dist/framework/nest/nest.js +613 -0
- package/dist/framework/nest/nest.js.map +1 -0
- package/dist/framework/next/next.d.ts +22 -0
- package/dist/framework/next/next.d.ts.map +1 -0
- package/dist/framework/next/next.js +449 -0
- package/dist/framework/next/next.js.map +1 -0
- package/dist/framework/node/node.d.ts +24 -0
- package/dist/framework/node/node.d.ts.map +1 -0
- package/dist/framework/node/node.js +1009 -0
- package/dist/framework/node/node.js.map +1 -0
- package/dist/framework/orchestrator/orchestrator.d.ts +34 -0
- package/dist/framework/orchestrator/orchestrator.d.ts.map +1 -0
- package/dist/framework/orchestrator/orchestrator.js +691 -0
- package/dist/framework/orchestrator/orchestrator.js.map +1 -0
- package/dist/framework/orm/orm.d.ts +61 -0
- package/dist/framework/orm/orm.d.ts.map +1 -0
- package/dist/framework/orm/orm.js +620 -0
- package/dist/framework/orm/orm.js.map +1 -0
- package/dist/framework/python/analyze.d.ts +38 -0
- package/dist/framework/python/analyze.d.ts.map +1 -0
- package/dist/framework/python/analyze.js +98 -0
- package/dist/framework/python/analyze.js.map +1 -0
- package/dist/framework/python/py-ast.d.ts +130 -0
- package/dist/framework/python/py-ast.d.ts.map +1 -0
- package/dist/framework/python/py-ast.js +344 -0
- package/dist/framework/python/py-ast.js.map +1 -0
- package/dist/framework/python-orm/python-orm.d.ts +19 -0
- package/dist/framework/python-orm/python-orm.d.ts.map +1 -0
- package/dist/framework/python-orm/python-orm.js +516 -0
- package/dist/framework/python-orm/python-orm.js.map +1 -0
- package/dist/framework/react-native/react-native.d.ts +35 -0
- package/dist/framework/react-native/react-native.d.ts.map +1 -0
- package/dist/framework/react-native/react-native.js +1181 -0
- package/dist/framework/react-native/react-native.js.map +1 -0
- package/dist/framework/register.d.ts +2 -0
- package/dist/framework/register.d.ts.map +1 -0
- package/dist/framework/register.js +59 -0
- package/dist/framework/register.js.map +1 -0
- package/dist/framework/registry.d.ts +31 -0
- package/dist/framework/registry.d.ts.map +1 -0
- package/dist/framework/registry.js +70 -0
- package/dist/framework/registry.js.map +1 -0
- package/dist/framework/routing/expo-router.d.ts +31 -0
- package/dist/framework/routing/expo-router.d.ts.map +1 -0
- package/dist/framework/routing/expo-router.js +356 -0
- package/dist/framework/routing/expo-router.js.map +1 -0
- package/dist/framework/routing/index.d.ts +4 -0
- package/dist/framework/routing/index.d.ts.map +1 -0
- package/dist/framework/routing/index.js +16 -0
- package/dist/framework/routing/index.js.map +1 -0
- package/dist/framework/routing/next-router.d.ts +45 -0
- package/dist/framework/routing/next-router.d.ts.map +1 -0
- package/dist/framework/routing/next-router.js +378 -0
- package/dist/framework/routing/next-router.js.map +1 -0
- package/dist/framework/routing/route-tree.d.ts +73 -0
- package/dist/framework/routing/route-tree.d.ts.map +1 -0
- package/dist/framework/routing/route-tree.js +120 -0
- package/dist/framework/routing/route-tree.js.map +1 -0
- package/dist/framework/types.d.ts +230 -0
- package/dist/framework/types.d.ts.map +1 -0
- package/dist/framework/types.js +25 -0
- package/dist/framework/types.js.map +1 -0
- package/dist/graph/cross-language.d.ts +11 -0
- package/dist/graph/cross-language.d.ts.map +1 -0
- package/dist/graph/cross-language.js +123 -0
- package/dist/graph/cross-language.js.map +1 -0
- package/dist/graph/extract.d.ts +13 -0
- package/dist/graph/extract.d.ts.map +1 -0
- package/dist/graph/extract.js +79 -0
- package/dist/graph/extract.js.map +1 -0
- package/dist/graph/file-graph.d.ts +186 -0
- package/dist/graph/file-graph.d.ts.map +1 -0
- package/dist/graph/file-graph.js +427 -0
- package/dist/graph/file-graph.js.map +1 -0
- package/dist/graph/http-callsites.d.ts +14 -0
- package/dist/graph/http-callsites.d.ts.map +1 -0
- package/dist/graph/http-callsites.js +107 -0
- package/dist/graph/http-callsites.js.map +1 -0
- package/dist/graph/incremental.d.ts +122 -0
- package/dist/graph/incremental.d.ts.map +1 -0
- package/dist/graph/incremental.js +448 -0
- package/dist/graph/incremental.js.map +1 -0
- package/dist/graph/language.d.ts +31 -0
- package/dist/graph/language.d.ts.map +1 -0
- package/dist/graph/language.js +146 -0
- package/dist/graph/language.js.map +1 -0
- package/dist/graph/noise-filter.d.ts +46 -0
- package/dist/graph/noise-filter.d.ts.map +1 -0
- package/dist/graph/noise-filter.js +199 -0
- package/dist/graph/noise-filter.js.map +1 -0
- package/dist/graph/python-adapter.d.ts +36 -0
- package/dist/graph/python-adapter.d.ts.map +1 -0
- package/dist/graph/python-adapter.js +402 -0
- package/dist/graph/python-adapter.js.map +1 -0
- package/dist/graph/python-manifest.d.ts +22 -0
- package/dist/graph/python-manifest.d.ts.map +1 -0
- package/dist/graph/python-manifest.js +137 -0
- package/dist/graph/python-manifest.js.map +1 -0
- package/dist/graph/python-stdlib.d.ts +2 -0
- package/dist/graph/python-stdlib.d.ts.map +1 -0
- package/dist/graph/python-stdlib.js +53 -0
- package/dist/graph/python-stdlib.js.map +1 -0
- package/dist/graph/ts-morph-adapter.d.ts +65 -0
- package/dist/graph/ts-morph-adapter.d.ts.map +1 -0
- package/dist/graph/ts-morph-adapter.js +265 -0
- package/dist/graph/ts-morph-adapter.js.map +1 -0
- package/dist/graph/types.d.ts +37 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +50 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/infra/aws/aws-parse.d.ts +39 -0
- package/dist/infra/aws/aws-parse.d.ts.map +1 -0
- package/dist/infra/aws/aws-parse.js +149 -0
- package/dist/infra/aws/aws-parse.js.map +1 -0
- package/dist/infra/aws/aws.d.ts +6 -0
- package/dist/infra/aws/aws.d.ts.map +1 -0
- package/dist/infra/aws/aws.js +425 -0
- package/dist/infra/aws/aws.js.map +1 -0
- package/dist/infra/azure/azure-parse.d.ts +73 -0
- package/dist/infra/azure/azure-parse.d.ts.map +1 -0
- package/dist/infra/azure/azure-parse.js +178 -0
- package/dist/infra/azure/azure-parse.js.map +1 -0
- package/dist/infra/azure/azure.d.ts +12 -0
- package/dist/infra/azure/azure.d.ts.map +1 -0
- package/dist/infra/azure/azure.js +673 -0
- package/dist/infra/azure/azure.js.map +1 -0
- package/dist/infra/cloudflare/cloudflare.d.ts +50 -0
- package/dist/infra/cloudflare/cloudflare.d.ts.map +1 -0
- package/dist/infra/cloudflare/cloudflare.js +382 -0
- package/dist/infra/cloudflare/cloudflare.js.map +1 -0
- package/dist/infra/cloudflare/wrangler-parse.d.ts +6 -0
- package/dist/infra/cloudflare/wrangler-parse.d.ts.map +1 -0
- package/dist/infra/cloudflare/wrangler-parse.js +278 -0
- package/dist/infra/cloudflare/wrangler-parse.js.map +1 -0
- package/dist/infra/compose/compose-parse.d.ts +24 -0
- package/dist/infra/compose/compose-parse.d.ts.map +1 -0
- package/dist/infra/compose/compose-parse.js +77 -0
- package/dist/infra/compose/compose-parse.js.map +1 -0
- package/dist/infra/compose/compose.d.ts +12 -0
- package/dist/infra/compose/compose.d.ts.map +1 -0
- package/dist/infra/compose/compose.js +201 -0
- package/dist/infra/compose/compose.js.map +1 -0
- package/dist/infra/convex/convex-parse.d.ts +28 -0
- package/dist/infra/convex/convex-parse.d.ts.map +1 -0
- package/dist/infra/convex/convex-parse.js +74 -0
- package/dist/infra/convex/convex-parse.js.map +1 -0
- package/dist/infra/convex/convex.d.ts +18 -0
- package/dist/infra/convex/convex.d.ts.map +1 -0
- package/dist/infra/convex/convex.js +199 -0
- package/dist/infra/convex/convex.js.map +1 -0
- package/dist/infra/digitalocean/digitalocean.d.ts +33 -0
- package/dist/infra/digitalocean/digitalocean.d.ts.map +1 -0
- package/dist/infra/digitalocean/digitalocean.js +204 -0
- package/dist/infra/digitalocean/digitalocean.js.map +1 -0
- package/dist/infra/firebase/firebase.d.ts +43 -0
- package/dist/infra/firebase/firebase.d.ts.map +1 -0
- package/dist/infra/firebase/firebase.js +271 -0
- package/dist/infra/firebase/firebase.js.map +1 -0
- package/dist/infra/fly/fly-parse.d.ts +52 -0
- package/dist/infra/fly/fly-parse.d.ts.map +1 -0
- package/dist/infra/fly/fly-parse.js +114 -0
- package/dist/infra/fly/fly-parse.js.map +1 -0
- package/dist/infra/fly/fly.d.ts +15 -0
- package/dist/infra/fly/fly.d.ts.map +1 -0
- package/dist/infra/fly/fly.js +265 -0
- package/dist/infra/fly/fly.js.map +1 -0
- package/dist/infra/gcp/gcp-parse.d.ts +24 -0
- package/dist/infra/gcp/gcp-parse.d.ts.map +1 -0
- package/dist/infra/gcp/gcp-parse.js +123 -0
- package/dist/infra/gcp/gcp-parse.js.map +1 -0
- package/dist/infra/gcp/gcp.d.ts +10 -0
- package/dist/infra/gcp/gcp.d.ts.map +1 -0
- package/dist/infra/gcp/gcp.js +502 -0
- package/dist/infra/gcp/gcp.js.map +1 -0
- package/dist/infra/heroku/heroku-parse.d.ts +33 -0
- package/dist/infra/heroku/heroku-parse.d.ts.map +1 -0
- package/dist/infra/heroku/heroku-parse.js +63 -0
- package/dist/infra/heroku/heroku-parse.js.map +1 -0
- package/dist/infra/heroku/heroku.d.ts +24 -0
- package/dist/infra/heroku/heroku.d.ts.map +1 -0
- package/dist/infra/heroku/heroku.js +253 -0
- package/dist/infra/heroku/heroku.js.map +1 -0
- package/dist/infra/image-resolve.d.ts +56 -0
- package/dist/infra/image-resolve.d.ts.map +1 -0
- package/dist/infra/image-resolve.js +229 -0
- package/dist/infra/image-resolve.js.map +1 -0
- package/dist/infra/infra-step.d.ts +39 -0
- package/dist/infra/infra-step.d.ts.map +1 -0
- package/dist/infra/infra-step.js +57 -0
- package/dist/infra/infra-step.js.map +1 -0
- package/dist/infra/k8s/index.d.ts +78 -0
- package/dist/infra/k8s/index.d.ts.map +1 -0
- package/dist/infra/k8s/index.js +251 -0
- package/dist/infra/k8s/index.js.map +1 -0
- package/dist/infra/kamal/kamal-parse.d.ts +23 -0
- package/dist/infra/kamal/kamal-parse.d.ts.map +1 -0
- package/dist/infra/kamal/kamal-parse.js +66 -0
- package/dist/infra/kamal/kamal-parse.js.map +1 -0
- package/dist/infra/kamal/kamal.d.ts +17 -0
- package/dist/infra/kamal/kamal.d.ts.map +1 -0
- package/dist/infra/kamal/kamal.js +162 -0
- package/dist/infra/kamal/kamal.js.map +1 -0
- package/dist/infra/netlify/netlify.d.ts +33 -0
- package/dist/infra/netlify/netlify.d.ts.map +1 -0
- package/dist/infra/netlify/netlify.js +247 -0
- package/dist/infra/netlify/netlify.js.map +1 -0
- package/dist/infra/opentofu/opentofu.d.ts +3 -0
- package/dist/infra/opentofu/opentofu.d.ts.map +1 -0
- package/dist/infra/opentofu/opentofu.js +157 -0
- package/dist/infra/opentofu/opentofu.js.map +1 -0
- package/dist/infra/pulumi/pulumi-parse.d.ts +60 -0
- package/dist/infra/pulumi/pulumi-parse.d.ts.map +1 -0
- package/dist/infra/pulumi/pulumi-parse.js +155 -0
- package/dist/infra/pulumi/pulumi-parse.js.map +1 -0
- package/dist/infra/pulumi/pulumi.d.ts +23 -0
- package/dist/infra/pulumi/pulumi.d.ts.map +1 -0
- package/dist/infra/pulumi/pulumi.js +260 -0
- package/dist/infra/pulumi/pulumi.js.map +1 -0
- package/dist/infra/railway/railway-parse.d.ts +54 -0
- package/dist/infra/railway/railway-parse.d.ts.map +1 -0
- package/dist/infra/railway/railway-parse.js +200 -0
- package/dist/infra/railway/railway-parse.js.map +1 -0
- package/dist/infra/railway/railway.d.ts +19 -0
- package/dist/infra/railway/railway.d.ts.map +1 -0
- package/dist/infra/railway/railway.js +397 -0
- package/dist/infra/railway/railway.js.map +1 -0
- package/dist/infra/register.d.ts +2 -0
- package/dist/infra/register.d.ts.map +1 -0
- package/dist/infra/register.js +81 -0
- package/dist/infra/register.js.map +1 -0
- package/dist/infra/registry.d.ts +64 -0
- package/dist/infra/registry.d.ts.map +1 -0
- package/dist/infra/registry.js +205 -0
- package/dist/infra/registry.js.map +1 -0
- package/dist/infra/relevance.d.ts +16 -0
- package/dist/infra/relevance.d.ts.map +1 -0
- package/dist/infra/relevance.js +132 -0
- package/dist/infra/relevance.js.map +1 -0
- package/dist/infra/render/render-parse.d.ts +76 -0
- package/dist/infra/render/render-parse.d.ts.map +1 -0
- package/dist/infra/render/render-parse.js +155 -0
- package/dist/infra/render/render-parse.js.map +1 -0
- package/dist/infra/render/render.d.ts +11 -0
- package/dist/infra/render/render.d.ts.map +1 -0
- package/dist/infra/render/render.js +303 -0
- package/dist/infra/render/render.js.map +1 -0
- package/dist/infra/sst/sst-parse.d.ts +25 -0
- package/dist/infra/sst/sst-parse.d.ts.map +1 -0
- package/dist/infra/sst/sst-parse.js +45 -0
- package/dist/infra/sst/sst-parse.js.map +1 -0
- package/dist/infra/sst/sst.d.ts +19 -0
- package/dist/infra/sst/sst.d.ts.map +1 -0
- package/dist/infra/sst/sst.js +236 -0
- package/dist/infra/sst/sst.js.map +1 -0
- package/dist/infra/supabase/supabase-parse.d.ts +34 -0
- package/dist/infra/supabase/supabase-parse.d.ts.map +1 -0
- package/dist/infra/supabase/supabase-parse.js +113 -0
- package/dist/infra/supabase/supabase-parse.js.map +1 -0
- package/dist/infra/supabase/supabase.d.ts +15 -0
- package/dist/infra/supabase/supabase.d.ts.map +1 -0
- package/dist/infra/supabase/supabase.js +198 -0
- package/dist/infra/supabase/supabase.js.map +1 -0
- package/dist/infra/terraform/hcl-parse.d.ts +34 -0
- package/dist/infra/terraform/hcl-parse.d.ts.map +1 -0
- package/dist/infra/terraform/hcl-parse.js +203 -0
- package/dist/infra/terraform/hcl-parse.js.map +1 -0
- package/dist/infra/terraform/terraform.d.ts +14 -0
- package/dist/infra/terraform/terraform.d.ts.map +1 -0
- package/dist/infra/terraform/terraform.js +264 -0
- package/dist/infra/terraform/terraform.js.map +1 -0
- package/dist/infra/types.d.ts +151 -0
- package/dist/infra/types.d.ts.map +1 -0
- package/dist/infra/types.js +14 -0
- package/dist/infra/types.js.map +1 -0
- package/dist/infra/vercel/vercel-parse.d.ts +70 -0
- package/dist/infra/vercel/vercel-parse.d.ts.map +1 -0
- package/dist/infra/vercel/vercel-parse.js +194 -0
- package/dist/infra/vercel/vercel-parse.js.map +1 -0
- package/dist/infra/vercel/vercel.d.ts +30 -0
- package/dist/infra/vercel/vercel.d.ts.map +1 -0
- package/dist/infra/vercel/vercel.js +523 -0
- package/dist/infra/vercel/vercel.js.map +1 -0
- package/dist/infra/walk.d.ts +36 -0
- package/dist/infra/walk.d.ts.map +1 -0
- package/dist/infra/walk.js +85 -0
- package/dist/infra/walk.js.map +1 -0
- package/dist/safety.d.ts +13 -0
- package/dist/safety.d.ts.map +1 -0
- package/dist/safety.js +67 -0
- package/dist/safety.js.map +1 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +111 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +35 -0
- package/dist/version.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
// (closes "≥ Next + Expo") — the Next.js file-based routing
|
|
2
|
+
// convention parser, the SECOND convention on the shared route-tree model.
|
|
3
|
+
//
|
|
4
|
+
// Next.js encodes its page/navigation graph + API surface in the directory tree,
|
|
5
|
+
// across TWO routers that can co-exist during a migration:
|
|
6
|
+
// * App Router (`app/` | `src/app/`) — only SPECIAL files are routes:
|
|
7
|
+
// page.{tsx,ts,jsx,js} → role `page` (routed UI; navigable)
|
|
8
|
+
// route.{ts,js} → role `endpoint` (Route Handler / API; not nav)
|
|
9
|
+
// layout.* / template.* → role `layout` (structural wrapper)
|
|
10
|
+
// (co-located components/helpers are NOT route nodes — unlike Expo Router,
|
|
11
|
+
// where every file under `app/` is a route)
|
|
12
|
+
// URL rules: route groups `(group)` + parallel slots `@slot` are STRIPPED from
|
|
13
|
+
// the URL; dynamic `[param]` / catch-all `[...slug]` / optional `[[...slug]]`
|
|
14
|
+
// segments are kept (the shared bracket resolver matches them).
|
|
15
|
+
// * Pages Router (`pages/` | `src/pages/`) — EVERY file is a route, except:
|
|
16
|
+
// _document → not a route (the server doc shell)
|
|
17
|
+
// _app → role `layout` at `/` (the global wrapper)
|
|
18
|
+
// pages/api/** → role `endpoint`
|
|
19
|
+
// everything else → role `page` (`index` → segment root)
|
|
20
|
+
//
|
|
21
|
+
// Mirrors expo-router.ts in style + discipline (LOCKED, ):
|
|
22
|
+
// * Nav edges are `calls`, nothing else (the adapter feeds navEdges through
|
|
23
|
+
// contribute-step). Route NESTING is parentFileId METADATA, never an edge.
|
|
24
|
+
// * Deterministic ids — every keyed value derives from the path/file id.
|
|
25
|
+
// * No silent caps — a dynamic/unresolvable nav target is LOGGED + skipped.
|
|
26
|
+
// Never-store-source: reads the route dirs + file contents server-side, returns
|
|
27
|
+
// only the derived tree/edges; the consuming adapter declares `scansSourcePath`.
|
|
28
|
+
import { readdirSync, statSync } from 'node:fs';
|
|
29
|
+
import { join } from 'node:path';
|
|
30
|
+
import { SyntaxKind, } from 'ts-morph';
|
|
31
|
+
import { buildExtractionProject, toId } from '../../graph/ts-morph-adapter.js';
|
|
32
|
+
import { SOURCE_EXTENSIONS, EXCLUDE_DIRS } from '../../graph/file-graph.js';
|
|
33
|
+
import { buildHrefResolver, } from './route-tree.js';
|
|
34
|
+
export const NEXT_CONVENTION = 'next';
|
|
35
|
+
const SOURCE_EXT_SET = new Set(SOURCE_EXTENSIONS);
|
|
36
|
+
const EXCLUDE_SET = new Set(EXCLUDE_DIRS);
|
|
37
|
+
// `router.<m>('…')` methods whose first arg is a navigation target (the
|
|
38
|
+
// `useRouter()` result, conventionally bound to `router`, from next/navigation or
|
|
39
|
+
// next/router). A different binding name isn't recognized — so it isn't a dropped
|
|
40
|
+
// target either (matching the Expo parser's deliberate literal-name discipline).
|
|
41
|
+
const ROUTER_NAV_METHODS = new Set(['push', 'replace', 'prefetch']);
|
|
42
|
+
const ROUTER_RECEIVERS = new Set(['router']);
|
|
43
|
+
// JSX components whose `href` prop is a navigation target.
|
|
44
|
+
const NAV_COMPONENTS = new Set(['Link']);
|
|
45
|
+
// Bare function nav (`redirect('/x')` / `permanentRedirect('/x')` from
|
|
46
|
+
// next/navigation).
|
|
47
|
+
const NAV_FUNCS = new Set(['redirect', 'permanentRedirect']);
|
|
48
|
+
function isDir(p) {
|
|
49
|
+
try {
|
|
50
|
+
return statSync(p).isDirectory();
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Locate the Next route dirs for a repo (or workspace package). Next uses EITHER
|
|
58
|
+
* the repo-root layout (`app` / `pages`) OR the `src/` layout (`src/app` /
|
|
59
|
+
* `src/pages`) — root takes precedence. Both routers can co-exist (a migration).
|
|
60
|
+
*/
|
|
61
|
+
export function findNextRouteDirs(repoDir, rootPath = '') {
|
|
62
|
+
const base = rootPath ? join(repoDir, rootPath) : repoDir;
|
|
63
|
+
const firstDir = (cands) => {
|
|
64
|
+
for (const c of cands) {
|
|
65
|
+
const abs = join(base, c);
|
|
66
|
+
if (isDir(abs))
|
|
67
|
+
return abs;
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
appDirAbs: firstDir(['app', join('src', 'app')]),
|
|
73
|
+
pagesDirAbs: firstDir(['pages', join('src', 'pages')]),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Recursively collect repo-relative posix file ids of source files under a dir,
|
|
78
|
+
* skipping dot-entries + excluded dirs (mirror expo-router's walk). Sorted.
|
|
79
|
+
*/
|
|
80
|
+
export function walkNextSourceFiles(absDir, repoDir) {
|
|
81
|
+
const out = [];
|
|
82
|
+
const stack = [absDir];
|
|
83
|
+
while (stack.length > 0) {
|
|
84
|
+
const dir = stack.pop();
|
|
85
|
+
let entries;
|
|
86
|
+
try {
|
|
87
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
for (const e of entries) {
|
|
93
|
+
if (e.name.startsWith('.'))
|
|
94
|
+
continue;
|
|
95
|
+
const abs = join(dir, e.name);
|
|
96
|
+
if (e.isDirectory()) {
|
|
97
|
+
if (EXCLUDE_SET.has(e.name))
|
|
98
|
+
continue;
|
|
99
|
+
stack.push(abs);
|
|
100
|
+
}
|
|
101
|
+
else if (e.isFile()) {
|
|
102
|
+
const ext = e.name.split('.').pop();
|
|
103
|
+
if (ext && SOURCE_EXT_SET.has(ext))
|
|
104
|
+
out.push(toId(repoDir, abs));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return out.sort();
|
|
109
|
+
}
|
|
110
|
+
function stripExt(name) {
|
|
111
|
+
return name.replace(/\.[^.]+$/, '');
|
|
112
|
+
}
|
|
113
|
+
// A URL-invisible directory segment: an App Router route group `(group)` or a
|
|
114
|
+
// parallel-route slot `@slot` (both stripped from the path AND from the segment
|
|
115
|
+
// key used for grouping).
|
|
116
|
+
function isInvisibleSeg(seg) {
|
|
117
|
+
return (seg.startsWith('(') && seg.endsWith(')')) || seg.startsWith('@');
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Derive role + URL-shaped route path from a route file's path relative to its
|
|
121
|
+
* route-root dir, or `null` when the file is NOT a route node (an App Router
|
|
122
|
+
* co-located component, or `pages/_document`). Pure — no content read.
|
|
123
|
+
*/
|
|
124
|
+
export function nextRouteInfo(relToRoot, router) {
|
|
125
|
+
const segments = relToRoot.split('/');
|
|
126
|
+
const fileName = segments.pop() ?? relToRoot;
|
|
127
|
+
const dirSegments = segments;
|
|
128
|
+
const stem = stripExt(fileName);
|
|
129
|
+
if (router === 'app') {
|
|
130
|
+
// App Router: ONLY the special files are route nodes.
|
|
131
|
+
let role;
|
|
132
|
+
if (stem === 'page')
|
|
133
|
+
role = 'page';
|
|
134
|
+
else if (stem === 'route')
|
|
135
|
+
role = 'endpoint';
|
|
136
|
+
else if (stem === 'layout' || stem === 'template')
|
|
137
|
+
role = 'layout';
|
|
138
|
+
else
|
|
139
|
+
return null; // co-located component/helper — not a route node
|
|
140
|
+
const visible = dirSegments.filter((s) => !isInvisibleSeg(s));
|
|
141
|
+
const routePath = visible.length > 0 ? `/${visible.join('/')}` : '/';
|
|
142
|
+
return { routePath, role };
|
|
143
|
+
}
|
|
144
|
+
// Pages Router: every file is a route, with three special cases.
|
|
145
|
+
if (stem === '_document')
|
|
146
|
+
return null; // the server doc shell — not a route
|
|
147
|
+
if (stem === '_app')
|
|
148
|
+
return { routePath: '/', role: 'layout' }; // global wrapper
|
|
149
|
+
const role = dirSegments[0] === 'api' ? 'endpoint' : 'page';
|
|
150
|
+
const urlSegments = stem === 'index' ? [...dirSegments] : [...dirSegments, stem];
|
|
151
|
+
const visible = urlSegments.filter((s) => !isInvisibleSeg(s));
|
|
152
|
+
const routePath = visible.length > 0 ? `/${visible.join('/')}` : '/';
|
|
153
|
+
return { routePath, role };
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The top-level route SEGMENT key a file belongs to (for the route-segment
|
|
157
|
+
* grouping prior): the first URL-visible directory segment, or `''` (the root
|
|
158
|
+
* segment) for a file sitting directly in the route root (or only inside
|
|
159
|
+
* groups/slots). Pure — path only.
|
|
160
|
+
*/
|
|
161
|
+
export function nextSegmentKey(relToRoot, _router) {
|
|
162
|
+
const segments = relToRoot.split('/');
|
|
163
|
+
segments.pop(); // drop the filename
|
|
164
|
+
const visible = segments.filter((s) => !isInvisibleSeg(s));
|
|
165
|
+
return visible.length > 0 ? visible[0] : '';
|
|
166
|
+
}
|
|
167
|
+
// dir of a repo-relative file id ('app/blog/[slug]/page.tsx' → 'app/blog/[slug]').
|
|
168
|
+
function dirOf(fileId) {
|
|
169
|
+
const i = fileId.lastIndexOf('/');
|
|
170
|
+
return i === -1 ? '' : fileId.slice(0, i);
|
|
171
|
+
}
|
|
172
|
+
// Ancestor dirs from `dir` up to (and including) `rootDir`, nearest first.
|
|
173
|
+
function ancestorDirs(dir, rootDir) {
|
|
174
|
+
const out = [];
|
|
175
|
+
let cur = dir;
|
|
176
|
+
while (cur === rootDir || cur.startsWith(`${rootDir}/`)) {
|
|
177
|
+
out.push(cur);
|
|
178
|
+
if (cur === rootDir)
|
|
179
|
+
break;
|
|
180
|
+
cur = dirOf(cur);
|
|
181
|
+
}
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
// ---------------------------------------------------------------------------
|
|
185
|
+
// Nav-target extraction (reads source content via ts-morph) — same shape as the
|
|
186
|
+
// Expo parser, retargeted to Next's primitives (next/link <Link>, redirect()).
|
|
187
|
+
function literalTarget(node) {
|
|
188
|
+
if (!node)
|
|
189
|
+
return null;
|
|
190
|
+
if (node.getKind() === SyntaxKind.StringLiteral)
|
|
191
|
+
return node.getLiteralValue();
|
|
192
|
+
if (node.getKind() === SyntaxKind.ObjectLiteralExpression) {
|
|
193
|
+
const pathname = node.getProperty('pathname');
|
|
194
|
+
if (pathname && pathname.getKind() === SyntaxKind.PropertyAssignment) {
|
|
195
|
+
const init = pathname.getInitializer();
|
|
196
|
+
if (init && init.getKind() === SyntaxKind.StringLiteral) {
|
|
197
|
+
return init.getLiteralValue();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
// Pull nav targets from one source file: <Link href> + router.push|replace('…') +
|
|
204
|
+
// redirect|permanentRedirect('…').
|
|
205
|
+
function collectNavTargets(sf) {
|
|
206
|
+
const literals = [];
|
|
207
|
+
let dynamic = 0;
|
|
208
|
+
const jsxEls = [
|
|
209
|
+
...sf.getDescendantsOfKind(SyntaxKind.JsxOpeningElement),
|
|
210
|
+
...sf.getDescendantsOfKind(SyntaxKind.JsxSelfClosingElement),
|
|
211
|
+
];
|
|
212
|
+
for (const el of jsxEls) {
|
|
213
|
+
const tag = el.getTagNameNode().getText();
|
|
214
|
+
const local = tag.split('.').pop() ?? tag; // `NextLink.Link`-style → `Link`
|
|
215
|
+
if (!NAV_COMPONENTS.has(local))
|
|
216
|
+
continue;
|
|
217
|
+
const hrefAttr = el.getAttribute('href');
|
|
218
|
+
if (!hrefAttr || hrefAttr.getKind() !== SyntaxKind.JsxAttribute)
|
|
219
|
+
continue;
|
|
220
|
+
const init = hrefAttr.getInitializer();
|
|
221
|
+
if (!init)
|
|
222
|
+
continue;
|
|
223
|
+
let target = null;
|
|
224
|
+
if (init.getKind() === SyntaxKind.StringLiteral) {
|
|
225
|
+
target = init.getLiteralValue();
|
|
226
|
+
}
|
|
227
|
+
else if (init.getKind() === SyntaxKind.JsxExpression) {
|
|
228
|
+
target = literalTarget(init.getExpression());
|
|
229
|
+
}
|
|
230
|
+
if (target !== null)
|
|
231
|
+
literals.push(target);
|
|
232
|
+
else
|
|
233
|
+
dynamic++;
|
|
234
|
+
}
|
|
235
|
+
for (const call of sf.getDescendantsOfKind(SyntaxKind.CallExpression)) {
|
|
236
|
+
const callee = call.getExpression();
|
|
237
|
+
let isNav = false;
|
|
238
|
+
if (callee.getKind() === SyntaxKind.PropertyAccessExpression) {
|
|
239
|
+
const pae = callee;
|
|
240
|
+
const base = pae.getExpression();
|
|
241
|
+
isNav =
|
|
242
|
+
ROUTER_NAV_METHODS.has(pae.getName()) &&
|
|
243
|
+
base.getKind() === SyntaxKind.Identifier &&
|
|
244
|
+
ROUTER_RECEIVERS.has(base.getText());
|
|
245
|
+
}
|
|
246
|
+
else if (callee.getKind() === SyntaxKind.Identifier) {
|
|
247
|
+
isNav = NAV_FUNCS.has(callee.getText());
|
|
248
|
+
}
|
|
249
|
+
if (!isNav)
|
|
250
|
+
continue;
|
|
251
|
+
const arg = call.getArguments()[0];
|
|
252
|
+
if (!arg)
|
|
253
|
+
continue;
|
|
254
|
+
const target = literalTarget(arg);
|
|
255
|
+
if (target !== null)
|
|
256
|
+
literals.push(target);
|
|
257
|
+
else
|
|
258
|
+
dynamic++;
|
|
259
|
+
}
|
|
260
|
+
return { literals, dynamic };
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Extract the Next route tree for a repo (or workspace package), spanning BOTH
|
|
264
|
+
* the App Router and Pages Router when present (a migration). Returns `null` when
|
|
265
|
+
* neither route dir exists or holds route files. Fully deterministic (routes
|
|
266
|
+
* sorted by fileId; navEdges deduped + sorted) — snapshot-stable by construction.
|
|
267
|
+
*/
|
|
268
|
+
export function extractNextRouteTree(opts) {
|
|
269
|
+
const { repoDir } = opts;
|
|
270
|
+
const rootPath = opts.rootPath ?? '';
|
|
271
|
+
const { appDirAbs, pagesDirAbs } = findNextRouteDirs(repoDir, rootPath);
|
|
272
|
+
const dirs = [];
|
|
273
|
+
if (appDirAbs)
|
|
274
|
+
dirs.push({ abs: appDirAbs, rootId: toId(repoDir, appDirAbs), router: 'app' });
|
|
275
|
+
if (pagesDirAbs)
|
|
276
|
+
dirs.push({ abs: pagesDirAbs, rootId: toId(repoDir, pagesDirAbs), router: 'pages' });
|
|
277
|
+
if (dirs.length === 0)
|
|
278
|
+
return null;
|
|
279
|
+
// --- route nodes (paths + roles) from file paths -------------------------
|
|
280
|
+
const routes = [];
|
|
281
|
+
const rootIdByFile = new Map(); // fileId → its route-root id (nesting scope)
|
|
282
|
+
const layoutByDir = new Map(); // dir → layout fileId (lexical-first)
|
|
283
|
+
const allFiles = []; // every source file under a route dir (for callers)
|
|
284
|
+
for (const spec of dirs) {
|
|
285
|
+
for (const fileId of walkNextSourceFiles(spec.abs, repoDir)) {
|
|
286
|
+
allFiles.push(fileId);
|
|
287
|
+
const relToRoot = fileId.slice(spec.rootId.length + 1);
|
|
288
|
+
const info = nextRouteInfo(relToRoot, spec.router);
|
|
289
|
+
if (!info)
|
|
290
|
+
continue; // co-located component / _document — not a route node
|
|
291
|
+
routes.push({ routePath: info.routePath, fileId, role: info.role });
|
|
292
|
+
rootIdByFile.set(fileId, spec.rootId);
|
|
293
|
+
if (info.role === 'layout') {
|
|
294
|
+
const dir = dirOf(fileId);
|
|
295
|
+
if (!layoutByDir.has(dir))
|
|
296
|
+
layoutByDir.set(dir, fileId);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
if (routes.length === 0)
|
|
301
|
+
return null;
|
|
302
|
+
// --- nesting (parentFileId = nearest enclosing layout, within the same root) -
|
|
303
|
+
for (const node of routes) {
|
|
304
|
+
const rootId = rootIdByFile.get(node.fileId);
|
|
305
|
+
const fileDir = dirOf(node.fileId);
|
|
306
|
+
// A layout's own dir-layout is itself → its parent must be a STRICT ancestor.
|
|
307
|
+
const searchDirs = node.role === 'layout'
|
|
308
|
+
? ancestorDirs(fileDir, rootId).slice(1)
|
|
309
|
+
: ancestorDirs(fileDir, rootId);
|
|
310
|
+
for (const dir of searchDirs) {
|
|
311
|
+
const layoutId = layoutByDir.get(dir);
|
|
312
|
+
if (layoutId && layoutId !== node.fileId) {
|
|
313
|
+
node.parentFileId = layoutId;
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
routes.sort((a, b) => (a.fileId < b.fileId ? -1 : a.fileId > b.fileId ? 1 : 0));
|
|
319
|
+
// --- nav edges (statically-resolvable targets; reads source content) -----
|
|
320
|
+
const resolve = buildHrefResolver(routes);
|
|
321
|
+
const project = buildExtractionProject(repoDir);
|
|
322
|
+
const sfById = new Map();
|
|
323
|
+
for (const fileId of allFiles) {
|
|
324
|
+
try {
|
|
325
|
+
sfById.set(fileId, project.addSourceFileAtPath(join(repoDir, fileId)));
|
|
326
|
+
}
|
|
327
|
+
catch {
|
|
328
|
+
// Unreadable/unparseable — its nav edges are skipped (no crash).
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
const edgeKeys = new Set();
|
|
332
|
+
const navEdges = [];
|
|
333
|
+
let dynamicTargets = 0;
|
|
334
|
+
const unresolvedTargets = new Set();
|
|
335
|
+
for (const fileId of allFiles) {
|
|
336
|
+
const sf = sfById.get(fileId);
|
|
337
|
+
if (!sf)
|
|
338
|
+
continue;
|
|
339
|
+
const { literals, dynamic } = collectNavTargets(sf);
|
|
340
|
+
dynamicTargets += dynamic;
|
|
341
|
+
for (const href of literals) {
|
|
342
|
+
const targetFile = resolve(href);
|
|
343
|
+
if (!targetFile) {
|
|
344
|
+
unresolvedTargets.add(href);
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
if (targetFile === fileId)
|
|
348
|
+
continue; // self-nav — not a route→route edge
|
|
349
|
+
const key = `${fileId}→${targetFile}`;
|
|
350
|
+
if (edgeKeys.has(key))
|
|
351
|
+
continue;
|
|
352
|
+
edgeKeys.add(key);
|
|
353
|
+
navEdges.push({ fromFileId: fileId, toFileId: targetFile });
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
navEdges.sort((a, b) => a.fromFileId < b.fromFileId
|
|
357
|
+
? -1
|
|
358
|
+
: a.fromFileId > b.fromFileId
|
|
359
|
+
? 1
|
|
360
|
+
: a.toFileId < b.toFileId
|
|
361
|
+
? -1
|
|
362
|
+
: a.toFileId > b.toFileId
|
|
363
|
+
? 1
|
|
364
|
+
: 0);
|
|
365
|
+
// No silent caps: log every dynamic + unresolvable nav target once.
|
|
366
|
+
if (dynamicTargets > 0 || unresolvedTargets.size > 0) {
|
|
367
|
+
const parts = [];
|
|
368
|
+
if (dynamicTargets > 0)
|
|
369
|
+
parts.push(`${dynamicTargets} dynamic target(s)`);
|
|
370
|
+
if (unresolvedTargets.size > 0) {
|
|
371
|
+
parts.push(`${unresolvedTargets.size} unresolvable target(s): ${[...unresolvedTargets].sort().join(', ')}`);
|
|
372
|
+
}
|
|
373
|
+
console.log(` [next-router] skipped ${parts.join(' · ')} (logged, not silently dropped)`);
|
|
374
|
+
}
|
|
375
|
+
const rootDir = dirs[0].rootId; // informational; the first present route root
|
|
376
|
+
return { convention: NEXT_CONVENTION, rootDir, routes, navEdges };
|
|
377
|
+
}
|
|
378
|
+
//# sourceMappingURL=next-router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-router.js","sourceRoot":"","sources":["../../../src/framework/routing/next-router.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,2EAA2E;AAC3E,EAAE;AACF,iFAAiF;AACjF,2DAA2D;AAC3D,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AAC,GAAG,iBAAiB,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9G,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;IAC7F,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,8CAA8C;IAC9E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The role a route file plays. METADATA, not a Module-kind — the locked
|
|
3
|
+
* discipline ("fix the classifier, never weaken the Module-kind enum") holds:
|
|
4
|
+
* an adapter maps these onto an existing ModuleKind (a screen/page → `frontend`,
|
|
5
|
+
* an endpoint → `gateway`/`service`). The finer role is carried for the label.
|
|
6
|
+
*
|
|
7
|
+
* - `page` — a screen/file that renders UI for a concrete URL.
|
|
8
|
+
* - `route` — a routable node we recognize but can't confirm as page vs
|
|
9
|
+
* endpoint (the generic fallback; conventions that always know
|
|
10
|
+
* the answer, like Expo Router, don't emit it).
|
|
11
|
+
* - `layout` — wraps child routes (Expo `_layout`, Next `layout`, SvelteKit
|
|
12
|
+
* `+layout`). Its nesting is the parent pointer, never an edge.
|
|
13
|
+
* - `endpoint` — a server/API handler with no UI (Expo `+api`, Next `route.ts`,
|
|
14
|
+
* SvelteKit `+server`).
|
|
15
|
+
*/
|
|
16
|
+
export type RouteRole = 'route' | 'page' | 'layout' | 'endpoint';
|
|
17
|
+
export declare const ROUTE_ROLES: readonly RouteRole[];
|
|
18
|
+
/**
|
|
19
|
+
* One route file. `fileId` is the repo-relative posix path — the same file-id
|
|
20
|
+
* space the NormalizedGraph + contribute-step's `fileModuleMap` key on (so a
|
|
21
|
+
* consuming adapter resolves it to a module for free). `routePath` is the
|
|
22
|
+
* URL-shaped label (dynamic segments kept as `[id]`/`[...rest]`, route groups
|
|
23
|
+
* stripped). `parentFileId` is the nearest enclosing layout — the STRUCTURAL
|
|
24
|
+
* nesting pointer (NOT an edge); absent on the root layout / un-nested routes.
|
|
25
|
+
*/
|
|
26
|
+
export interface RouteNode {
|
|
27
|
+
routePath: string;
|
|
28
|
+
fileId: string;
|
|
29
|
+
role: RouteRole;
|
|
30
|
+
parentFileId?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A statically-resolvable navigation between two route files (a `<Link href>`,
|
|
34
|
+
* `router.push('…')`, `<Redirect href>`, `redirect('…')` whose target resolves
|
|
35
|
+
* to a route file). `from`/`to` are repo-relative posix file ids. Every navEdge
|
|
36
|
+
* becomes a `calls` edge when an adapter feeds it through contribute-step.
|
|
37
|
+
*/
|
|
38
|
+
export interface RouteNavEdge {
|
|
39
|
+
fromFileId: string;
|
|
40
|
+
toFileId: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A repo's (or workspace package's) file-based route tree for one convention.
|
|
44
|
+
*/
|
|
45
|
+
export interface RouteTree {
|
|
46
|
+
/** The convention that produced this tree (e.g. 'expo-router'). */
|
|
47
|
+
convention: string;
|
|
48
|
+
/** The repo-relative posix dir the routes were read from (e.g. 'app'). */
|
|
49
|
+
rootDir: string;
|
|
50
|
+
/** Route nodes, sorted by fileId (deterministic). */
|
|
51
|
+
routes: RouteNode[];
|
|
52
|
+
/** Resolvable nav edges, deduped + sorted by (from, to) (deterministic). */
|
|
53
|
+
navEdges: RouteNavEdge[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Normalize an href to an absolute, query/hash-free, single-slash path — or
|
|
57
|
+
* `null` when it isn't statically resolvable as an absolute URL.
|
|
58
|
+
*
|
|
59
|
+
* RELATIVE hrefs (`./x`, `../x`, bare `x`) return `null` (resolved against the
|
|
60
|
+
* current route — a Slice-2 refinement; logged + skipped for now, never guessed).
|
|
61
|
+
*/
|
|
62
|
+
export declare function normalizeHref(raw: string): string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Build a deterministic href→fileId resolver over a route tree's navigable
|
|
65
|
+
* nodes (roles `page` / `route` — layouts + endpoints are never `<Link>`
|
|
66
|
+
* targets). Resolution order: exact route-path match first (covers literal
|
|
67
|
+
* `/profile/[id]` and static `/home`), then the most-specific dynamic-pattern
|
|
68
|
+
* match (covers a concrete `/profile/42` → `/profile/[id]`). Unresolvable ⇒
|
|
69
|
+
* `null`. Specificity tiebreak: fewest dynamic segments, then non-catch-all,
|
|
70
|
+
* then lexical fileId — so the choice never depends on input order.
|
|
71
|
+
*/
|
|
72
|
+
export declare function buildHrefResolver(routes: RouteNode[]): (href: string) => string | null;
|
|
73
|
+
//# sourceMappingURL=route-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-tree.d.ts","sourceRoot":"","sources":["../../../src/framework/routing/route-tree.ts"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEjE,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAAqD,CAAC;AAElG;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,4EAA4E;IAC5E,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AAgBD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQxD;AAoBD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAkCtF"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// (Slice 1) — the CONVENTION-AGNOSTIC route-tree model.
|
|
2
|
+
//
|
|
3
|
+
// File-system routing frameworks (Expo Router, Next app/pages, Remix, Nuxt,
|
|
4
|
+
// SvelteKit, TanStack) encode the page/navigation graph IN THE DIRECTORY TREE —
|
|
5
|
+
// completely invisible to an import/call graph. This module is the shared shape
|
|
6
|
+
// every per-convention parser targets: a flat list of route nodes (each with a
|
|
7
|
+
// route-path label, a role, and a STRUCTURAL parent pointer) plus the
|
|
8
|
+
// statically-resolvable navigation edges between them.
|
|
9
|
+
//
|
|
10
|
+
// LOCKED design calls (orchestrator-decided 2026-06-26 — see the brief):
|
|
11
|
+
// * Navigation edges are `calls`, nothing else. A `navEdge` becomes a `calls`
|
|
12
|
+
// FrameworkEdge when an adapter feeds it through contribute-step (this module
|
|
13
|
+
// never emits FrameworkEdges itself — it stays decoupled from the framework
|
|
14
|
+
// contract so Next/Remix/… reuse it unchanged).
|
|
15
|
+
// * Route NESTING is NOT an edge. A layout wrapping a page has no taxonomy verb;
|
|
16
|
+
// nesting is carried as STRUCTURAL METADATA (routePath + parentFileId), never
|
|
17
|
+
// a graph edge — and there is NO "nesting"/"contains" verb anywhere.
|
|
18
|
+
// * Deterministic ids: every keyed value derives from the route path / file id,
|
|
19
|
+
// never an index — snapshots stay stable across re-ingest.
|
|
20
|
+
// * No silent caps: a dynamic/unresolvable nav target is LOGGED + skipped by the
|
|
21
|
+
// caller, never silently dropped.
|
|
22
|
+
//
|
|
23
|
+
// This module is PURE-ish: types + a reusable href→fileId resolver (the bracket
|
|
24
|
+
// `[param]` / `[...rest]` dynamic-segment syntax shared by Expo Router AND Next).
|
|
25
|
+
// It reads nothing and persists nothing.
|
|
26
|
+
export const ROUTE_ROLES = ['route', 'page', 'layout', 'endpoint'];
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
// Shared href resolution (bracket dynamic-segment syntax: `[param]` / `[...rest]`).
|
|
29
|
+
// Reused by Expo Router (this slice) and the Next.js adapter.
|
|
30
|
+
function isDynamicSeg(seg) {
|
|
31
|
+
return seg.startsWith('[') && seg.endsWith(']');
|
|
32
|
+
}
|
|
33
|
+
function isCatchAllSeg(seg) {
|
|
34
|
+
// `[...rest]` (Expo) and `[[...rest]]` (Next optional catch-all) both carry the
|
|
35
|
+
// `...` marker inside the brackets.
|
|
36
|
+
return isDynamicSeg(seg) && seg.includes('...');
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Normalize an href to an absolute, query/hash-free, single-slash path — or
|
|
40
|
+
* `null` when it isn't statically resolvable as an absolute URL.
|
|
41
|
+
*
|
|
42
|
+
* RELATIVE hrefs (`./x`, `../x`, bare `x`) return `null` (resolved against the
|
|
43
|
+
* current route — a Slice-2 refinement; logged + skipped for now, never guessed).
|
|
44
|
+
*/
|
|
45
|
+
export function normalizeHref(raw) {
|
|
46
|
+
let h = raw.trim();
|
|
47
|
+
h = h.split('?')[0].split('#')[0];
|
|
48
|
+
if (h === '')
|
|
49
|
+
return null;
|
|
50
|
+
if (!h.startsWith('/'))
|
|
51
|
+
return null; // relative / bare — deferred (logged + skipped)
|
|
52
|
+
h = h.replace(/\/{2,}/g, '/');
|
|
53
|
+
if (h.length > 1)
|
|
54
|
+
h = h.replace(/\/+$/, '');
|
|
55
|
+
return h === '' ? '/' : h;
|
|
56
|
+
}
|
|
57
|
+
function splitPath(routePath) {
|
|
58
|
+
return routePath === '/' ? [] : routePath.replace(/^\//, '').split('/');
|
|
59
|
+
}
|
|
60
|
+
// Does a dynamic-segment pattern match a concrete href's segments? A catch-all
|
|
61
|
+
// (always last by convention) absorbs ≥1 trailing segment; a `[param]` matches
|
|
62
|
+
// exactly one; a literal must equal.
|
|
63
|
+
function segMatch(pattern, href) {
|
|
64
|
+
for (let i = 0; i < pattern.length; i++) {
|
|
65
|
+
const p = pattern[i];
|
|
66
|
+
if (isCatchAllSeg(p))
|
|
67
|
+
return href.length - i >= 1;
|
|
68
|
+
if (i >= href.length)
|
|
69
|
+
return false;
|
|
70
|
+
if (isDynamicSeg(p))
|
|
71
|
+
continue;
|
|
72
|
+
if (p !== href[i])
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
return href.length === pattern.length;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Build a deterministic href→fileId resolver over a route tree's navigable
|
|
79
|
+
* nodes (roles `page` / `route` — layouts + endpoints are never `<Link>`
|
|
80
|
+
* targets). Resolution order: exact route-path match first (covers literal
|
|
81
|
+
* `/profile/[id]` and static `/home`), then the most-specific dynamic-pattern
|
|
82
|
+
* match (covers a concrete `/profile/42` → `/profile/[id]`). Unresolvable ⇒
|
|
83
|
+
* `null`. Specificity tiebreak: fewest dynamic segments, then non-catch-all,
|
|
84
|
+
* then lexical fileId — so the choice never depends on input order.
|
|
85
|
+
*/
|
|
86
|
+
export function buildHrefResolver(routes) {
|
|
87
|
+
const navigable = routes
|
|
88
|
+
.filter((r) => r.role === 'page' || r.role === 'route')
|
|
89
|
+
.sort((a, b) => (a.fileId < b.fileId ? -1 : a.fileId > b.fileId ? 1 : 0));
|
|
90
|
+
const exact = new Map();
|
|
91
|
+
const patterns = [];
|
|
92
|
+
for (const r of navigable) {
|
|
93
|
+
if (!exact.has(r.routePath))
|
|
94
|
+
exact.set(r.routePath, r.fileId);
|
|
95
|
+
const segs = splitPath(r.routePath);
|
|
96
|
+
patterns.push({
|
|
97
|
+
segs,
|
|
98
|
+
fileId: r.fileId,
|
|
99
|
+
dyn: segs.filter(isDynamicSeg).length,
|
|
100
|
+
catchAll: segs.some(isCatchAllSeg),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return (href) => {
|
|
104
|
+
const norm = normalizeHref(href);
|
|
105
|
+
if (norm === null)
|
|
106
|
+
return null;
|
|
107
|
+
const hit = exact.get(norm);
|
|
108
|
+
if (hit)
|
|
109
|
+
return hit;
|
|
110
|
+
const hrefSegs = splitPath(norm);
|
|
111
|
+
const candidates = patterns.filter((p) => segMatch(p.segs, hrefSegs));
|
|
112
|
+
if (candidates.length === 0)
|
|
113
|
+
return null;
|
|
114
|
+
candidates.sort((a, b) => a.dyn - b.dyn ||
|
|
115
|
+
Number(a.catchAll) - Number(b.catchAll) ||
|
|
116
|
+
(a.fileId < b.fileId ? -1 : a.fileId > b.fileId ? 1 : 0));
|
|
117
|
+
return candidates[0].fileId;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=route-tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-tree.js","sourceRoot":"","sources":["../../../src/framework/routing/route-tree.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,4EAA4E;AAC5E,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,sEAAsE;AACtE,uDAAuD;AACvD,EAAE;AACF,0EAA0E;AAC1E,gFAAgF;AAChF,kFAAkF;AAClF,gFAAgF;AAChF,oDAAoD;AACpD,mFAAmF;AACnF,kFAAkF;AAClF,yEAAyE;AACzE,kFAAkF;AAClF,+DAA+D;AAC/D,mFAAmF;AACnF,sCAAsC;AACtC,EAAE;AACF,gFAAgF;AAChF,kFAAkF;AAClF,yCAAyC;AAmBzC,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AA0ClG,8EAA8E;AAC9E,oFAAoF;A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