summaryrefslogtreecommitdiff
path: root/packages/integrations/node/test (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-06-06[ci] formatGravatar natemoo-re 2-200/+197
2023-06-06#7226 - fixes NodeJS adapter for multiple set-cookie headers (and other ↵Gravatar Alex Sherwin 19-0/+339
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-0/+36
* 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-06-05Unflag hybrid output (#7260)Gravatar Nate Moore 1-6/+0
* feat(hybrid): unflag hybrid output * chore: cleanup rebase errors
2023-05-31Revert "feat(hybrid): unflag hybrid output (#7255)" (#7259)Gravatar Nate Moore 1-0/+6
This reverts commit bc5d6ed39faf2f73eab161774bf66ebc5fd00db2.
2023-05-31feat(hybrid): unflag hybrid output (#7255)Gravatar Nate Moore 1-6/+0
2023-05-17feat: hybrid output (#6991)Gravatar Happydev 2-9/+139
* 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-15Fix double prepended forward slash in certain cases (#7091)Gravatar Happydev 1-43/+90
* test: add test with no base * fix: don't always prepend a forward slash * chore: changeset * `'/' + base` ------> `prependForwardSlash(base)`
2023-05-12[ci] formatGravatar matthewp 1-1/+1
2023-05-12Correct handle directory finds when using base in the Node adapter (#7076)Gravatar Matthew Phillips 1-3/+12
2023-05-01Catch errors that occur within the stream in the Node adapter (#6935)Gravatar Matthew Phillips 3-0/+55
* 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-13Ensure unique workspace name (#6836)Gravatar Bjorn Lu 1-1/+1
2023-04-04fix(node): Fix malformed URLs crashing the server in certain cases (#6746)Gravatar Erika 3-0/+56
2023-02-02Node adapter: handle prerendering and serving with query params (#6110)Gravatar Matthew Phillips 4-0/+90
* Node adapter: handle prerendering and serving with query params * Adding a changeset
2023-01-26Fix `Astro.url.protocol` when using the @astrojs/node SSR adapter with HTTPS ↵Gravatar HiDeoo 3-0/+93
(#5992)
2023-01-12[ci] formatGravatar natemoo-re 1-1/+1
2023-01-12fix(core): handle encoded characters when matching routes (#5836)Gravatar Nate Moore 5-1/+71
Co-authored-by: Nate Moore <nate@astro.build>
2023-01-11Add support for serving well-known URIs with the @astrojs/node SSR adapter ↵Gravatar HiDeoo 4-0/+58
(#5832)
2023-01-10[ci] formatGravatar bluwy 2-5/+5
2023-01-11can jump 404 when that page does not exist (#5701)Gravatar wulinsheng123 5-3/+76
2023-01-06Drop Node 14 in CI for Node 16 and add Node 18 to the matrix (#5768)Gravatar Erika 1-2/+11
* ci(node): Move CI to Node 16 and add Node 18 to the matrix * fix(netlify): Fix set-cookie not working on Node 18 * fix(netlify): Handle if `set-cookie` is already somehow an array (apparently it can?) * test(node): Fix `toPromise` to match Astro's * fix(tests): Use the actual underlying ArrayBuffer instance to create the buffer in toPromise * chore: changeset
2022-10-12Node.js standalone mode + support for astro preview (#5056)Gravatar Matthew Phillips 1-1/+1
* wip * Deprecate buildConfig and move to config.build * Implement the standalone server * Stay backwards compat * Add changesets * correctly merge URLs * Get config earlier * update node tests * Return the preview server * update remaining tests * swap usage and config ordering * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/metal-pumas-walk.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/metal-pumas-walk.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/stupid-points-refuse.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/stupid-points-refuse.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Link to build.server config Co-authored-by: Fred K. Schott <fkschott@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-07-26Fixes binary data request bodies in the Node adapter (#4055)Gravatar Matthew Phillips 2-0/+27
* Fixes binary data request bodies in the Node adapter * Fix type
2022-07-25Add the `output` option (#4015)Gravatar Matthew Phillips 1-3/+1
* Start of work on astroConfig.mode === 'server' * Add tests and more * adapter -> deploy in some places * Add fallback for `adapter` config * Update more tests * Update image tests * Fix clientAddress test * Updates based on PR review * Add a changeset * Update integrations tests + readme * Oops * Remove old option * Rename `mode` to `output` * Update Node adapter test * Update test * fred pass * fred pass * fred pass * fix test Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-07-22[ci] formatGravatar matthewp 2-5/+4
2022-07-22Fixes Node adapter receiving a request body (#4023)Gravatar Matthew Phillips 4-0/+111
* Fixes Node adapter receiving a request body * Updated lockfile