d10f91815e
* add manual middleware config option with getMiddlewareContext() * refactor requestInfo to action object * set action error response status from render context * update automatic middleware to plain POST handler * fix missing Locals type * test: add separate POST and cookie forwarding tests * remove actions.middleware flag * add docs on actionResultAlreadySet * test: use Astro.rewrite instead of middleware next(). TODO: fix next() * fix type errors from rebase * test: remove middleware handler * test: use cookie forwarding for 'lots of fields' * refactor: _isPrerendered -> ctx.isPrerendered * expose getOriginPathname as middleware utility * add support for handling RPC action results from middleware * test: RPC security middleware * refactor POST route handler to use getMiddlewareContext() * remove unused actionRedirect flag * changeset * test: add expectedd rewrite failure for Ema to debug * fix e2e test * nit: form -> from Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * rename getMiddlewareContext -> getActionContext * rename form-action -> form * move /_actions/ route pattern to const * move type defs to user-accessible ActionMiddlewareContext type * export action middleware context type * strip omitted fields for Action API Context * add satisfies to type for good measure * move getOriginPathname to shared ctx.originPathname * remove `next()` rewrite because it isn't supported * fix empty forms raising a 415 * fix missing async on cookie example * nit: ctx -> context * fix json parse error when content length is 0 * refactor body parsing to function * edit: migration -> updating your HTML form actions Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * update changeset to match docs v5 guide * add absolute urls to changeset links --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> |
||
---|---|---|
.changeset | ||
.devcontainer | ||
.github | ||
.gitpod | ||
.vscode | ||
benchmark | ||
examples | ||
packages | ||
scripts | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitignore | ||
.gitpod.yml | ||
.npmrc | ||
.nvmrc | ||
.prettierignore | ||
biome.jsonc | ||
CONTRIBUTING.md | ||
eslint.config.js | ||
LICENSE | ||
package.json | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml | ||
prettier.config.js | ||
README.md | ||
SECURITY.md | ||
SECURITY_CONTACTS | ||
STYLE_GUIDE.md | ||
tsconfig.base.json | ||
tsconfig.eslint.json | ||
tsconfig.json | ||
turbo.json |
Astro is a website build tool for the modern web —
powerful developer experience meets lightweight output.
Install
The recommended way to install the latest version of Astro is by running the command below:
npm create astro@latest
You can also install Astro manually by running this command instead:
npm install --save-dev astro
Looking for help? Start with our Getting Started guide.
Looking for quick examples? Open a starter project right in your browser.
Documentation
Visit our official documentation.
Support
Having trouble? Get help in the official Astro Discord.
Contributing
New contributors welcome! Check out our Contributors Guide for help getting started.
Join us on Discord to meet other maintainers. We'll help you get your first contribution in no time!
Directory
Several official projects are maintained outside of this repo:
Project | Repository |
---|---|
@astrojs/compiler | withastro/compiler |
Astro Language Tools | withastro/language-tools |
Links
Sponsors
Astro is free, open source software made possible by these wonderful sponsors.