Repository navigation
v4.127.1
Fixes for building Astro sites on Run402.
CLI (run402)
run402 deploy --dirscans your Astro source, not the build. The pre-deploy source scan walked the--dirbuild output, so it read the bundled@run402/astroserver entry (whose doc comment mentionsgetUser()) and refused every Astro deploy withR402_AUTH_PREFLIGHT_FAILED, and it never saw a// run402-allow-admin-db:comment the bundler had stripped. With--dirit now scans the Astro app the build belongs to (the--manifestdirectory, or the nearest directory above the build with apackage.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
run402finds the project's@run402/astro.run402 deploy --dirnow loads@run402/astro/release-slicefrom the app's ownnode_modulesinstead of next to the CLI, so a globally installed CLI works without addingrun402as a devDependency. The error's details nameapp_root. run402 init astroscaffolds current versions:astro^7.4.2,@run402/astro^2.6.1,@run402/functions^4.12.2.
Docs
R402_ASTRO_MIDDLEWARE_UNSUPPORTEDis reserved and never raised:src/middleware.tsis 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).