summaryrefslogtreecommitdiff
path: root/packages/integrations/cloudflare/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-09-19fix(@astrojs/cloudflare): support for nodejs_compat (#8595)Gravatar Alexander Niebuhr 1-0/+24
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2023-09-18feat(@astro/cloudflare): improve DX for runtime typing (#8560)Gravatar Alexander Niebuhr 2-5/+4
2023-09-13config: migrate us to moduleResolution: 'node16' (#8519)Gravatar Erika 1-2/+2
2023-09-11[ci] formatGravatar lilnasy 1-3/+3
2023-09-11feat(@astrojs/cloudflare): add runtime support to `astro dev` (#8426)Gravatar Alexander Niebuhr 4-35/+276
* add necessary libs * cleanup stale code * add base feature-set of runtime to `astro dev` * fix lockfile * remove future code Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com> * remove future code Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com> * remove future code Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com> * remove future code Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com> * remove future code Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com> * address review comments * fix linting issue * add docs & tests * fix test paths * add changeset * update README.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * fix docs & make adapter options optional * fix package resolve mode * fix pnpm-lock --------- Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-08-28refactor: use new Astro internals (#8254)Gravatar Emanuele Stoppa 1-45/+0
* refactor: use new Astro internals * chore: update tests --------- Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2023-08-24Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 3-4/+7
2023-08-23docs: better documentation for `runtime` (#8190)Gravatar Emanuele Stoppa 3-4/+7
2023-08-17feature(@astrojs/cloudflare): port functionPerRoute (#8078)Gravatar Alexander Niebuhr 1-4/+18
* port functionPerRoute to cloudflare * add changeset * port bugfix to next * update changeset * Update packages/astro/src/core/build/generate.ts Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * update changeset * update README * add TODO comment * Update .changeset/wise-cameras-agree.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/wise-cameras-agree.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/nasty-garlics-listen.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * update README * Update .changeset/wise-cameras-agree.md Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com> * Update packages/integrations/cloudflare/README.md Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com> --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-08-15Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 4-20/+74
2023-08-14fix(@astrojs/cloudflare): unsynced astro asset support flag (#8079)Gravatar Alexander Niebuhr 1-1/+1
* fix astro assets support in cloudflare * add changeset
2023-08-10[ci] formatGravatar natemoo-re 3-15/+15
2023-08-10feat(@astrojs/cloudfalre): add cloudflare envs to `Astro.locals` (#7541)Gravatar Alexander Niebuhr 4-28/+82
* add support for advanced mode * add support for directory mode * use asset fallback as in cloudflare's docs * update locals * come up with new runtime in `Astro.locals` * add overwrite protection * minor cleanup * changeset * address review comments * move overwrite protection to adapter * fix types * fix comment * resolve review comments * update changeset * add test * redo ts * fix integration test port * updated tests, add new port * add TODO comment * update changeset * add JSDoc * Update packages/integrations/cloudflare/src/runtime.ts --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-10Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 1-3/+87
2023-08-10more efficient _routes.json for cloudflare integration (#7846)Gravatar Marco Schumacher 1-3/+87
* more efficient _routes.json for cloudflare integration * added tests * updated pnpm-lock.yaml * added changeset * cleaned up test * fix: convert window path separators * updated docs * handle more cases * Apply suggestions from code review Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * incorporate feedback from code review * used other pnpm version * better fallback for empty include array * adjust test case to changed fallback for empty include array * updated docs --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2023-08-08feat: astro features (#7815)Gravatar Emanuele Stoppa 1-0/+20
2023-07-20Fix organize-imports-cli with satisfies operator (#7727)Gravatar Bjorn Lu 2-2/+2
2023-07-18nit: use `node:` prefix everywhere (#7692)Gravatar Erika 1-4/+4
* nit: use `node:` prefix everywhere * nit: fs/promises too * test: workaround issue in node builtin detection
2023-07-17[ci] formatGravatar matthewp 2-25/+26
2023-07-17fix(@astrojs/cloudflare): SSR split file renaming misses ts endpoints (#7568)Gravatar Alexander Niebuhr 2-34/+51
* fix bug, where ts files where not renamed correctly * try to make rename logic more robust * remove log * update tests * update changeset * cleanup * fix lint * debug windows tests * fix windows support * fix cloudflare directory code * use EventContext type * improve for loop * change changeset Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * change changeset Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2023-07-17Fix cloudflare runtime env var handling (#7679)Gravatar Bjorn Lu 1-0/+8
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2023-07-13feat(@astrojs/netlify): add `build.split` support (#7615)Gravatar Emanuele Stoppa 1-2/+6
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-07-03feat: use typescript-eslint@v6's reworked configs (#7425)Gravatar Josh Goldberg ✨ 1-2/+2
2023-06-30[ci] formatGravatar ematipico 1-13/+11
2023-06-30feature(astrojs/cloudflare): add support for `splitted` SSR bundles (#7464)Gravatar Alexander Niebuhr 2-44/+103
* initial commit * try to fix windows * output files directly into the correct folder * allow for rest parameters * use fixed hook * improve tests * apply doc's team suggestions for README Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * try to fix prerendering * apply doc's team suggestion for changeset Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * bump to minor * readme update * resolve review comments * optimize memory allocation * resolve review comments * add removed link, to make sure old docs keep same * resolve comment Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-06-20[ci] formatGravatar ematipico 2-2/+2
2023-06-20fix: cloudflare waitUntil not working as inteded with getRuntime (#7419)Gravatar Torbjørn Holtmon 2-3/+10
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-06-13[ci] formatGravatar matthewp 2-2/+2
2023-06-13[Cloudflare integration] Expose cf metadata and Cloudflare caches API (#7386)Gravatar beynar 3-3/+19
* Add cf and cache properties to runtime * add changeset * reorder import * fix types and add tests * fix package name * test
2023-06-05[ci] formatGravatar matthewp 1-3/+3
2023-06-05Redirects (#7067)Gravatar Matthew Phillips 1-1/+16
* Redirects spike * Allow redirects in static mode * Support in Netlify as well * Adding a changeset * Rename file * Fix build problem * Refactor to be more modular * Fix location ref * Late test should only run in SSR * Support redirects in Netlify SSR configuration (#7167) * Implement support for dynamic routes in redirects (#7173) * Implement support for dynamic routes in redirects * Remove the .only * No need to special-case redirects in static build * Implement support for redirects config in the Vercel adapter (#7182) * Implement support for redirects config in the Vercel adapter * Remove unused condition * Move to a internal helper package * Add support for the object notation in redirects * Use status 308 for non-GET redirects (#7186) * Implement redirects in Cloudflare (#7198) * Implement redirects in Cloudflare * Fix build * Update tests b/c of new ordering * Debug issue * Use posix.join * Update packages/underscore-redirects/package.json Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Update based on review comments * Update broken test --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Test that redirects can come from middleware (#7213) * Test that redirects can come from middleware * Allow non-promise returns for middleware * Implement priority (#7210) * Refactor * Fix netlify test ordering * Fix ordering again * Redirects: Allow preventing the output of the static HTML file (#7245) * Do a simple push for priority * Adding changesets * Put the implementation behind a flag. * Self review * Update .changeset/chatty-actors-stare.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/astro/src/@types/astro.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/astro/src/@types/astro.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/astro/src/@types/astro.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/astro/src/@types/astro.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update docs on dynamic restrictions. * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Code review changes * Document netlify static adapter * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Slight reword * Update .changeset/twenty-suns-vanish.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Add a note about public/_redirects file * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-05-17feat: hybrid output (#6991)Gravatar Happydev 1-1/+1
* 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-17Build edge/worker runtime with webworker ssr target (#7101)Gravatar Bjorn Lu 1-4/+4
2023-05-16[ci] formatGravatar bluwy 1-1/+1
2023-05-16Add `workerd` and `worker` to cloudflare adapter bundling (#7092)Gravatar Johannes Spohr 1-0/+1
2023-04-27[ci] formatGravatar AirBorne04 1-1/+1
2023-04-27esbuild respects `vite.build.minify` option (#6222)Gravatar Daniel 1-2/+2
* esbuild respects `vite.build.minify` option * Docs update --------- Co-authored-by: AirBorne04 <> Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-03-16[ci] formatGravatar bluwy 1-3/+1
2023-03-16fix(cloudflare): base strip logic (#6550)Gravatar Richard Simpson 1-1/+1
2023-03-13[ci] formatGravatar bluwy 1-1/+3
2023-03-13fix: rebase _routes.json for Cloudflare when config.base set (#6473)Gravatar Richard Simpson 1-1/+6
2023-03-13[ci] formatGravatar matthewp 1-1/+1
2023-03-13Remove false-positive warnings from Cloudflare's build (#6531)Gravatar Matthew Phillips 1-0/+3
2023-02-13Fix 6206: Cloudflare function path resolving one step above (#6208)Gravatar Marvin Frachet 1-1/+2
* Fix 6206: Cloudflare function path resolving one step above
2023-02-03fix: use the root of the project as the functions location (#6075)Gravatar Nacho Vazquez 1-1/+1
* fix: use the root of the project as the functions location * test: add test to check where the functions folder is added
2023-01-30Fix Cloudflare directory mode regression (#6046)Gravatar Matthew Phillips 1-6/+8
* Fix Cloudflare directory mode regression * Adding a changeset
2023-01-26[ci] formatGravatar matthewp 4-4/+5
2023-01-26Support for prerendering in the Cloudflare integration (#5993)Gravatar Matthew Phillips 4-6/+24
* Cloudflare prerender branch * Add prerendered routes to Cloudflare routes.json * Adding changeset * Prevent process proxy from running during prerender phase
2023-01-26Re-enable streaming on Cloudflare Pages (#5914)Gravatar Angus 2-2/+2
* Support streaming on Cloudflare Pages * Create tidy-ties-repeat.md Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-01-03Remove deprecated APIs (#5707)Gravatar Bjorn Lu 1-10/+0
* Remove deprecated Astro globals * Remove deprecated hook param * Fix test * Add changeset * Add TODO