Skip to content

refactor(core): replace getAddress with placeholder-based address injection#7

Merged
aminevg merged 2 commits intomainfrom
refactor-address-handling
Mar 16, 2026
Merged

refactor(core): replace getAddress with placeholder-based address injection#7
aminevg merged 2 commits intomainfrom
refactor-address-handling

Conversation

@aminevg
Copy link
Contributor

@aminevg aminevg commented Mar 16, 2026

Summary

  • Removes getAddress callback from MightyDevOptions — the address is now passed per-request via MightyRenderDevRequest.address
  • Internally uses a hardcoded placeholder (http://mighty-placeholder.test) during setup/render, then replaces it with the real address via replaceAll on the final HTML
  • Simplifies the Hono adapter by removing mutable rootAddress state and computing the address fresh per-request
  • Inlines rewriteFsUrls into setup.ts and deletes the utility file

Test plan

  • pnpm ci:biome passes
  • pnpm typecheck passes in both packages/core and packages/hono
  • pnpm test — all 47 tests pass

@aminevg aminevg merged commit 6bcd50a into main Mar 16, 2026
3 checks passed
@aminevg aminevg deleted the refactor-address-handling branch March 16, 2026 04:55
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.

1 participant