Skip to content

feat: add adapter detection via config file content#14

Merged
HarshMN2345 merged 8 commits into
mainfrom
fix/vcs-adapter-detection
Jun 17, 2026
Merged

feat: add adapter detection via config file content#14
HarshMN2345 merged 8 commits into
mainfrom
fix/vcs-adapter-detection

Conversation

@HarshMN2345

Copy link
Copy Markdown
Member

Summary

  • Adds getConfigFiles() and getAdapter() methods to the Framework base class
  • Implements adapter detection for dual-adapter frameworks: TanStack Start, SvelteKit, Astro, Remix
  • Each framework reads its config file and detects whether the project is configured for SSR or static output

Detection logic

Framework Config file(s) Static signal Default
TanStack Start vite.config.ts/js/mjs prerender keyword ssr
SvelteKit svelte.config.js/ts or package.json @sveltejs/adapter-static ssr
Astro astro.config.mjs/js/ts output: 'server' or 'hybrid' static
Remix package.json always ssr (static is edge case) ssr

Test plan

  • Verify detection returns correct adapter for SSR and static variants of each framework
  • Verify fallback to empty string works when no config file is present

@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown

Greptile Summary

  • Adds base framework APIs for listing adapter config files and detecting SSR/static adapters from config content.
  • Implements adapter detection for Astro, Remix, SvelteKit, and TanStack Start.
  • Adds unit tests covering adapter detection behavior and config edge cases.

Confidence Score: 5/5

The changes are narrowly scoped to framework adapter detection and accompanying unit coverage.

No code issues were identified in the reviewed changes, and the implementation is covered by targeted tests for the new detection behavior.

T-Rex T-Rex Logs

What T-Rex did

  • Baseline checks confirmed that the base commit’s framework classes do not implement getConfigFiles or getAdapter, which explains the METHOD_ABSENT observations in the initial run.
  • The head commit introduces getConfigFiles and getAdapter on the framework classes and yields the expected config files and adapter values across all checked scenarios.
  • The React fallback case is verified to produce an empty configFiles array and an empty adapter string as part of the head-commit behavior.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (6): Last reviewed commit: "fix: handle quoted prerender key in TanS..." | Re-trigger Greptile

Comment thread src/Detection/Framework/SvelteKit.php
Comment thread src/Detection/Framework/Remix.php
Comment thread src/Detection/Framework/Astro.php
Comment thread src/Detection/Framework/Astro.php Outdated
Comment thread src/Detection/Framework/TanStackStart.php
Comment thread src/Detection/Framework/SvelteKit.php
Comment thread src/Detection/Framework/Astro.php Outdated
Comment thread src/Detection/Framework/TanStackStart.php Outdated
Comment thread src/Detection/Framework/SvelteKit.php
Comment thread src/Detection/Framework/Astro.php Outdated
Comment thread src/Detection/Framework/TanStackStart.php Outdated
@HarshMN2345 HarshMN2345 merged commit 20f7e2e into main Jun 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants