Commit Graph
55 Commits
Author SHA1 Message Date
tben ed788dff97 Add SSR bundle minify config 2026-10-17 15:03:30 +01:00
tben 5dc783fe97 Fix memory leak in dev server 2026-10-16 14:25:18 +01:00
tbenandClaude Opus 5.5 23a309005a Add disable_seo config to keep preview deployments out of search engines
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 05:29:08 +01:00
tbenandClaude Opus 5.5 3a75880ae4 Date sitemap lastmod from the build pipeline; warn on skipped pages
- bunext build records when each page's client bundle hash last changed
  in .bunext/page-lastmod.json (sitemap.lastmod_file to relocate). The
  hash covers the page's whole import graph, so component edits re-date
  every page that uses them. The sitemap uses these dates as lastmod
- Add sitemap.default_lastmod
- BREAKING: use_file_lastmod now defaults to false (file mtimes are reset
  by checkouts); it is a fallback after the build record
- Warn when a page or __root.tsx is skipped because its default export
  is not at the start of a line (e.g. export { Page as default })
- Replace leaking module mocks in tests (log, grab-root-file-path) with
  spies and fixtures

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 18:25:38 +01:00
tbenandClaude Opus 5.5 be4bebaa22 Add robots.txt generation and sitemap chunking
- bunext sitemap now writes public/robots.txt (configurable via the
  robots config key; robots: false or --no-robots to skip). Hand-written
  robots.txt files are never overwritten without a robots config
- Large sitemaps are split into public/sitemap-chunks/sitemap-N.xml
  (sitemap.chunk_size, default 10,000, max 50,000; 50MB per file) with
  sitemap.xml as a sitemap index; stale chunks are cleaned up
- Export bunextGenerateRobotsTxt
- Run tests in publish.sh

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 18:02:52 +01:00
tbenandClaude Opus 5.5 d9de858439 Add sitemap generation and bunext sitemap command
- Add generateSitemap util (exported as bunext.bunextGenerateSitemap)
  that builds sitemap.xml from static pages, with exclude patterns,
  additional paths (array or sync/async function), lastmod from file
  mtime, trailing slash, and default changefreq/priority options
- Let page .server.ts files export a `sitemap` function to list URLs
  for dynamic routes, or override a static page's entry
- Add `bunext sitemap` command reading `sitemap` from bunext.config.ts,
  writing public/sitemap.xml by default, with --output/--origin flags
- Fix handle-routes test leaking a grab-router module mock into
  bunext-req-handler tests; set global.BUNEXT_ROUTER instead
- Ignore /.tmp
- Document sitemap usage in README and CLAUDE.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 17:41:21 +01:00
tben 3025b1681d Fix module watcher errors 2026-10-14 12:30:41 +01:00
tbenandClaude Opus 5.5 74103a19c9 Fix security vulnerabilities and request handling bugs
- Move page cache out of the publicly served .bunext/public dir and hash cache keys
- Skip caching credentialed requests, non-2xx and Set-Cookie responses; cap entries
- Enforce API body size limit while reading; keep req body readable for handlers
- Hide error messages from clients in production
- Escape inline script JSON; strip cookies from HMR payloads
- Only trust X-Forwarded-Proto with trust_proxy config
- Fix console race in SSR, dotted page paths, middleware rewrites,
  excluded path status, encoded static file names, symlinked dirs
- Upgrade vulnerable deps, remove micromatch, pin bun versions, delete dead code

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 15:48:08 +01:00
tben 39a5e91eeb Add build info JSON file after builds 2026-09-23 05:18:53 +01:00
tben 22d3dedab2 Update page server types 2026-08-14 06:49:12 +01:00
tben 87948340b0 Add public envs 2026-08-03 08:42:33 +01:00
tben 86ea86e7bd Updates 2026-08-01 05:25:47 +01:00
tben 596b9de047 Add request cookie to HMR reload pipeline 2026-07-31 07:21:52 +01:00
tben b702e26bf6 Security fixes pass #2 2026-04-19 16:00:59 +01:00
tben 95fcee36b2 Fix server component stale caching. Add server components to SSR bundler 2026-04-19 09:04:55 +01:00
tben 41e28d7a3e Updates 2026-04-18 18:06:21 +01:00
tben b2e92e5792 Updates 2026-04-18 11:17:13 +01:00
tben 9a427412f3 Refactor start and dev commands. Start in child processes. Handle errors better 2026-04-17 08:47:36 +01:00
tben f0aae8a8fa Refactor SSR strategy. Redirect before bundling any page component. Additional bugfixes for dev environment 2026-04-12 16:20:16 +01:00
tben 532d0d6b56 Update excluded pages paths logic. Add HMR retries on errors. 2026-04-12 05:47:12 +01:00
tben e0c2ab5872 Update pages server function(s) 2026-04-11 16:29:53 +01:00
tben 35f7a6fc85 Persist Request accorss hydration refreshes 2026-04-11 12:52:56 +01:00
tben af8c207ac1 Add retries to page component function error. Reload for all 404 pages 2026-04-11 08:48:01 +01:00
tben 5a0972beb8 Update API routes function pass #3 2026-04-10 11:54:17 +01:00
tben 349b99bacf Fix types error 2026-04-10 11:42:22 +01:00
tben 972f6945c2 Fix types error 2026-04-10 11:39:50 +01:00
tben 6477f446d1 Update API routes function 2026-04-10 11:34:22 +01:00
tben eb0721f94b Updates 2026-04-09 07:47:38 +01:00
tben 68d88bce4a Try local react imports 2026-03-31 06:22:26 +01:00
tben 86d4bb8d6c Imporve HMR Post-build function speed 2026-03-30 05:44:34 +01:00
tben 950bdc3dca Add error logs for server functions. Add cache dynamic function. 2026-03-27 05:22:31 +01:00
tben dad5cffaac Remove react/jsx-dev-runtime dynamic browser import 2026-03-25 15:48:05 +01:00
tben f6c7f6b78c Refactor bundler function 2026-03-24 20:42:47 +01:00
tben 7dd8d87be8 Change server paradigm 2026-03-24 05:24:14 +01:00
tben 6f1db7c01f Add more features. Customize HTML. Add server logic and other page module exports to __root 2026-03-23 19:14:56 +01:00
tben 1634eeb213 Major Refactoring. Test update 2026-03-22 16:45:12 +01:00
tben c3e1341ff8 Update HMR. Make page reload when __root.tsx file is changed. 2026-03-22 12:09:24 +01:00
tben a9af20a8b2 Major Bugfix. Fix server component client compatibility 2026-03-22 10:34:30 +01:00
tben 32056b5cb6 Update HMR logic. Refresh on server props update. 2026-03-21 18:03:36 +01:00
tben cf010ad4f5 Update watcher function. Add tests 2026-03-21 09:03:26 +01:00
tben 98d3cf7da7 Add features: custom server and websocket. Minor refactoring 2026-03-21 07:42:38 +01:00
tben 7ef114ee70 Handle browser Errors. 2026-03-21 06:34:32 +01:00
tben 71f3598709 Refactor HMR server-side watcher. Move to fs.watch instead of the inbuild esbuild.watch 2026-03-21 05:21:51 +01:00
tben 52dde6c0ab Update HMR. Make it true HMR. Add URL to page server props 2026-03-20 11:19:22 +01:00
tben 7804a34951 Add url to server response 2026-03-19 06:33:47 +01:00
tben ef53ab5f2a Bugfix and major refactor. Update server-side page rendering logic. 2026-03-19 05:26:20 +01:00
tben 32e914fdc1 Add Caching 2026-03-17 21:47:12 +01:00
tben 35930857fd Update API routes function. Add middleware. Update README.md 2026-03-17 19:38:06 +01:00
tben ee1fb5897e Add More Features to pages main component 2026-03-17 18:53:27 +01:00
tben 12de7ff891 Resolve page errors gracefully 2026-03-17 17:00:08 +01:00