summaryrefslogtreecommitdiff
path: root/packages/integrations/node/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-11-30Merge branch 'main' into nextGravatar bluwy 6-2/+23
2023-11-29Switch `app.render` signature (#9199)Gravatar Arsh 1-3/+3
* feat(app): app.render optional object * tests * update vercel and node * update changeset * deprecation notice and loggin * clarify changeset * add node, vercel changeset * deduplicate code
2023-11-28[ci] formatGravatar Matthew Phillips 1-2/+2
2023-11-28Support immutable cache headers for _astro assets (#9125)Gravatar Matthew Phillips 6-2/+23
* Support immutable cache headers for _astro assets * Update .changeset/twelve-fishes-fail.md Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * Update packages/integrations/node/src/http-server.ts * Update expected max-age * Add teh docs * Update .changeset/twelve-fishes-fail.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/integrations/node/README.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-11-21Update all dependencies (#9138)Gravatar Bjorn Lu 1-2/+1
Co-authored-by: delucis <delucis@users.noreply.github.com>
2023-11-15[ci] formatGravatar pilcrowOnPaper 1-2/+2
2023-11-16Cancel response stream when connection closes (#9071)Gravatar pilcrowOnPaper 2-232/+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-10-04[ci] formatGravatar bluwy 1-1/+1
2023-10-04chore: remove undici polyfill (#8729)Gravatar Arsh 1-12/+5
2023-09-29feat: resolve images through the file systems on applicable runtimes (#8698)Gravatar Erika 1-1/+4
* feat: add a node image endpoint * test: fix
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 5-7/+7
2023-08-28[ci] formatGravatar ematipico 3-3/+3
2023-08-28refactor: use new Astro internals (#8254)Gravatar Emanuele Stoppa 4-14/+16
* refactor: use new Astro internals * chore: update tests --------- Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2023-08-22Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 1-5/+12
2023-08-21fix(@astrojs/node): handler should work with `express` (#8176)Gravatar Emanuele Stoppa 1-5/+12
2023-08-21Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 1-9/+1
2023-08-18fix(node): delegate preview's not found and error handling to core/app (#8141)Gravatar Arsh 1-9/+1
* fix(node): delegate preview's not found and error handling to core/app * add changeset --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-15Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 3-4/+70
2023-08-10[ci] formatGravatar natemoo-re 3-27/+33
2023-08-10Support `--host` for Node adapter preview (#6928)Gravatar Jerry_wu 3-4/+64
* supporting a network address access a website when an user set host = true in Node environment * fix bug * sumbit test code * optimism * delect white space * test * fix test * fix test error * test * test * test * fix test error * Optimizing code based on the comments * optimize test * fix: rebase issues * chore: format * chore: add changeset * chore: format * chore: format * chore: lint --------- Co-authored-by: wuls <linsheng.wu@beantechs.com> Co-authored-by: Nate Moore <nate@astro.build>
2023-08-08chore: update prettier to `3.0` (#7957)Gravatar Emanuele Stoppa 2-5/+3
2023-08-08Remove undici dep (#7980)Gravatar Bjorn Lu 1-4/+3
2023-08-08feat: astro features (#7815)Gravatar Emanuele Stoppa 1-0/+10
2023-08-08feat: remove webapi in favor of a smaller polyfill (#7840)Gravatar Erika 1-6/+2
* feat: remove webapi in favor of a smaller polyfill * test: remove old test * test: 🤦‍♀️ * chore: changeset
2023-08-01Fix "res.writeHead is not a function" in Express/node middleware (#7708)Gravatar DixCouleur 2-8/+29
* 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 5-9/+9
* nit: use `node:` prefix everywhere * nit: fs/promises too * test: workaround issue in node builtin detection
2023-07-03feat: use typescript-eslint@v6's reworked configs (#7425)Gravatar Josh Goldberg ✨ 2-3/+1
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 3-32/+34
2023-06-06#7226 - fixes NodeJS adapter for multiple set-cookie headers (and other ↵Gravatar Alex Sherwin 2-2/+47
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-06-06fix:query not considered in directory redirection (#7243)Gravatar Riki 1-1/+8
* fix:query not considered in directory redirection * feat: req.url may be empty * test(node): add redirect + query param tests * refactor(node): cleanup query param logic * chore: remove log * chore: add changeset --------- Co-authored-by: Riki <947968273@qq.com> Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-05-17feat: hybrid output (#6991)Gravatar Happydev 1-1/+3
* update config schema * adapt default route `prerender` value * adapt error message for hybrid output * core hybrid output support * add JSDocs for hybrid output * dev server hybrid output support * defer hybrid output check * update endpoint request warning * support `output=hybrid` in integrations * put constant variable out of for loop * revert: reapply back ssr plugin in ssr mode * change `prerender` option default * apply `prerender` by default in hybrid mode * simplfy conditional * update config schema * add `isHybridOutput` helper * more readable prerender condition * set default prerender value if no export is found * only add `pagesVirtualModuleId` ro rollup input in `output=static` * don't export vite plugin * remove unneeded check * don't prerender when it shouldn't * extract fallback `prerender` meta Extract the fallback `prerender` module meta out of the `scan` function. It shouldn't be its responsibility to handle that * pass missing argument to function * test: update cloudflare integration tests * test: update tests of vercel integration * test: update tests of node integration * test: update tests of netlify func integration * test: update tests of netlify edge integration * throw when `hybrid` mode is malconfigured * update node integraiton `output` warning * test(WIP): skip node prerendering tests for now * remove non-existant import * test: bring back prerendering tests * remove outdated comments * test: refactor test to support windows paths * remove outdated comments * apply sarah review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * docs: `experiment.hybridOutput` jsodcs * test: prevent import from being cached * refactor: extract hybrid output check to function * add `hybrid` to output warning in adapter hooks * chore: changeset * add `.js` extension to import * chore: use spaces instead of tabs for gh formating * resolve merge conflict * chore: move test to another file for consitency --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2023-05-12[ci] formatGravatar matthewp 1-4/+4
2023-05-12Correct handle directory finds when using base in the Node adapter (#7076)Gravatar Matthew Phillips 1-1/+7
2023-05-03feat(astro): experimental middleware (#6721)Gravatar Emanuele Stoppa 3-2/+2
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-01[ci] formatGravatar matthewp 1-2/+2
2023-05-01Catch errors that occur within the stream in the Node adapter (#6935)Gravatar Matthew Phillips 1-2/+7
* Catch errors that occur within the stream in the Node adapter * Adding a changeset * Better error message on completely uncaught errors within the stream * Update test
2023-04-04fix(node): Fix malformed URLs crashing the server in certain cases (#6746)Gravatar Erika 1-3/+19
2023-03-20feat(all): Migrate to TypeScript 5.0 (#6579)Gravatar Erika 1-0/+2
2023-03-10fix: Enforce the usage of type imports when possible (#6502)Gravatar Erika 1-1/+1
2023-03-07chore: use directive `@ts-expect-error` instead of `@ts-ignore` (#6429)Gravatar Emanuele Stoppa 1-1/+1
2023-02-03[ci] formatGravatar matthewp 3-3/+3
2023-02-02Node adapter: handle prerendering and serving with query params (#6110)Gravatar Matthew Phillips 4-3/+11
* Node adapter: handle prerendering and serving with query params * Adding a changeset
2023-02-01Fix incorrent encoded when path has other language characters (#6088)Gravatar Shiina 1-1/+1
* fix: Incorrent encoded when path has Chinese * chore: exec changeset
2023-01-26Fix `Astro.url.protocol` when using the @astrojs/node SSR adapter with HTTPS ↵Gravatar HiDeoo 1-1/+3
(#5992)
2023-01-11Add support for serving well-known URIs with the @astrojs/node SSR adapter ↵Gravatar HiDeoo 1-2/+3
(#5832)
2023-01-11can jump 404 when that page does not exist (#5701)Gravatar wulinsheng123 3-6/+7