summaryrefslogtreecommitdiff
path: root/packages/integrations/node/src/nodeMiddleware.ts (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-11-15[ci] formatGravatar pilcrowOnPaper 1-2/+2
2023-11-16Cancel response stream when connection closes (#9071)Gravatar pilcrowOnPaper 1-4/+8
* cancel stream on close * add changeset * add test * Update .changeset/modern-ways-develop.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: lilnasy <69170106+lilnasy@users.noreply.github.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-09-20[ci] formatGravatar ematipico 1-3/+3
2023-09-20fix(node): report render error to the terminal (#8599)Gravatar Arsh 1-0/+3
2023-09-13config: migrate us to moduleResolution: 'node16' (#8519)Gravatar Erika 1-3/+3
2023-08-21fix(@astrojs/node): handler should work with `express` (#8176)Gravatar Emanuele Stoppa 1-5/+12
2023-08-01Fix "res.writeHead is not a function" in Express/node middleware (#7708)Gravatar DixCouleur 1-8/+18
* fix: res.writeHead is not a function * fix: handler params type added * fix: handler function params error * Update packages/integrations/node/src/nodeMiddleware.ts --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-01Refactor 404 and 500 approach (#7754)Gravatar Nate Moore 1-5/+6
* fix(app): refactor 404 and 500 approach * chore: refactor logic * fix: always treat error as page * test: migrate ssr-prerender-404 to node adapter * feat: merge original response metadata with error response * chore: update lockfile * chore: trigger ci * chore(lint): fix lint issue * fix: ensure merged request has proper status * fix(node): prerender test * chore: update test label * fix(node): improve 404 behavior in middleware mode * fix(vercel): improve 404 behavior * fix(netlify): improve 404 behavior * chore: update test labels * chore: force ci * chore: fix lint * fix: avoid infinite loops * test: fix failing test in Node 18 * chore: remove volta
2023-07-18nit: use `node:` prefix everywhere (#7692)Gravatar Erika 1-1/+1
* nit: use `node:` prefix everywhere * nit: fs/promises too * test: workaround issue in node builtin detection
2023-06-21feat: expose locals to render api and from requests in dev mode (#7385)Gravatar Emanuele Stoppa 1-2/+3
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: wrapperup <wrapperup4@gmail.com>
2023-06-06[ci] formatGravatar natemoo-re 1-7/+7
2023-06-06#7226 - fixes NodeJS adapter for multiple set-cookie headers (and other ↵Gravatar Alex Sherwin 1-2/+7
header issues) (#7227) * Utilizes the new standard WebAPI Fetch Headers.getSetCookie() function to safely handle multiple set-cookie headers when converting from a WebAPI Response to a NodeJS ServerResponse Modifies the existing nodeMiddleware logic which first set AstroCookies on ServerResponse.setHeader(...) and then called ServerResponse.writeHead(status, Response.headers) which means any that if the WebAPI Response had any set-cookie headers on it, they would replace anything from AstroCookies. The new logic delegates appending AstroCookie values onto the WebAPI Response Headers object, so that a single unified function safely converts the WebAPI Response Headers into a NodeJS compatible OutgoingHttpHeaders object utilizing the new standard Headers.getSetCookie() function provided by the undici WebAPI polyfills. Plus extensive test coverage. * #7226 - changeset for NodeJS adapter set-cookie fix * fixing all double quotes to single quotes --------- Co-authored-by: Alex Sherwin <alex.sherwin@acadia.inc> Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-05-03feat(astro): experimental middleware (#6721)Gravatar Emanuele Stoppa 1-0/+64
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>