Skip to content

v4.127.1

Choose a tag to compare

@github-actions github-actions released this 25 Oct 03:23
· 64 commits to main since this release

Fixes for building Astro sites on Run402.

CLI (run402)

  • run402 deploy --dir scans your Astro source, not the build. The pre-deploy source scan walked the --dir build output, so it read the bundled @run402/astro server entry (whose doc comment mentions getUser()) and refused every Astro deploy with R402_AUTH_PREFLIGHT_FAILED, and it never saw a // run402-allow-admin-db: comment the bundler had stripped. With --dir it now scans the Astro app the build belongs to (the --manifest directory, or the nearest directory above the build with a package.json).
  • Comments are not code. Every scanner pattern (run402 doctor, up, deploy) ignores names inside //, /* */ and Astro <!-- --> comments; allow-comments are still read from the source.
  • A global run402 finds the project's @run402/astro. run402 deploy --dir now loads @run402/astro/release-slice from the app's own node_modules instead of next to the CLI, so a globally installed CLI works without adding run402 as a devDependency. The error's details name app_root.
  • run402 init astro scaffolds current versions: astro ^7.4.2, @run402/astro ^2.6.1, @run402/functions ^4.12.2.

Docs

  • R402_ASTRO_MIDDLEWARE_UNSUPPORTED is reserved and never raised: src/middleware.ts is supported and is the place for an auth or membership gate (auth.user() + auth.role({ from })).

Pairs with @run402/astro 2.6.2 (cookies set through Astro.cookies now reach the browser; a project id is needed only to upload images).