summaryrefslogtreecommitdiff
path: root/packages/integrations/cloudflare/test (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-16chore(cloudflare): remove adapter (#8758)Gravatar Alexander Niebuhr 82-1636/+0
2023-10-02feat(cloudflare): add local mockings for CF bindings (#8655)Gravatar Alexander Niebuhr 8-10/+181
* feat(cloudflare): add D1 database binding * feat(cloudflare): add local mocking for R2 bindings (#8656) * feat(cloudflare): add local mocking for KV bindings (#8657) * feat(cloudflare): add local mocking for Caches bindings (#8664) * feat(cloudflare): add local mocking for DO bindings (#8690) --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-09-24fix(cloudflare): added config for _routes.json generation (#8459)Gravatar Marco Schumacher 16-81/+223
* added config for _routes.json generation * added changeset * renamed test file * updated comments * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * worked on tests * worked on docs * worked on docs * worked on tests * updated pnpm-lock.yaml * worked on tests * moved the _worker.js in cloudflareSpecialFiles statement --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Alexander Niebuhr <alexander@nbhr.io>
2023-09-22[ci] formatGravatar ematipico 1-2/+6
2023-09-22feat(@astrojs/cloudflare): Add support for wasm module imports (#8542)Gravatar Adrian Lyjak 26-71/+473
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-09-11feat(@astrojs/cloudflare): add runtime support to `astro dev` (#8426)Gravatar Alexander Niebuhr 4-9/+42
* 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-09-05Skip cloudflare CLI tests if fail to start (#8417)Gravatar Bjorn Lu 4-10/+26
* Skip cloudflare CLI tests if fail to start * Fix port --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-28refactor: use new Astro internals (#8254)Gravatar Emanuele Stoppa 1-2/+1
* refactor: use new Astro internals * chore: update tests --------- Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2023-08-23Update non-major dependencies (#8199)Gravatar Bjorn Lu 1-1/+1
2023-08-17feature(@astrojs/cloudflare): port functionPerRoute (#8078)Gravatar Alexander Niebuhr 14-16/+19
* 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-17Merge branch 'main' into nextGravatar Matthew Phillips 8-22/+42
2023-08-16Fix flaky Cloudflare test (#8103)Gravatar Nate Moore 5-8/+5
* chore: fix flaky CF test * chore: increase wrangler timeout
2023-08-16feat: unflag experimental.assets (#7921)Gravatar Erika 2-5/+5
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2023-08-15[ci] formatGravatar natemoo-re 2-9/+19
2023-08-15Update wrangler (#8081)Gravatar Nate Moore 6-16/+29
* chore: update wrangler * chore(cloudflare): update tests to support wrangler@3 * chore(cloudflare): update debug message * chore: force ci
2023-08-15Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 5-1/+71
2023-08-10feat(@astrojs/cloudfalre): add cloudflare envs to `Astro.locals` (#7541)Gravatar Alexander Niebuhr 5-1/+71
* 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 13-12/+137
2023-08-10more efficient _routes.json for cloudflare integration (#7846)Gravatar Marco Schumacher 13-12/+137
* 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-1/+1
2023-07-19Remove experimental flag for redirects config (#7686)Gravatar Matthew Phillips 1-3/+0
* Remove experimental flag for redirects config * Remove experimental from tests * Remove experimental CLI flag * Add changeset * Removing redirect test that is no longer relevant * Remove experimental label" * Update .changeset/dry-beers-grow.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/dry-beers-grow.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Remove old function --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-07-18nit: use `node:` prefix everywhere (#7692)Gravatar Erika 1-2/+2
* nit: use `node:` prefix everywhere * nit: fs/promises too * test: workaround issue in node builtin detection
2023-07-17fix(@astrojs/cloudflare): SSR split file renaming misses ts endpoints (#7568)Gravatar Alexander Niebuhr 4-0/+3
* 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-1/+1
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2023-07-17Handle flaky tests (#7651)Gravatar Bjorn Lu 4-41/+49
2023-07-03feat: use typescript-eslint@v6's reworked configs (#7425)Gravatar Josh Goldberg ✨ 1-2/+0
2023-06-30[ci] formatGravatar ematipico 1-2/+2
2023-06-30feature(astrojs/cloudflare): add support for `splitted` SSR bundles (#7464)Gravatar Alexander Niebuhr 10-0/+212
* 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-23Remove slash package (#7440)Gravatar Bjorn Lu 1-3/+2
2023-06-21Update safe dependencies (#7430)Gravatar Bjorn Lu 5-11/+15
2023-06-13[Cloudflare integration] Expose cf metadata and Cloudflare caches API (#7386)Gravatar beynar 5-2/+68
* Add cf and cache properties to runtime * add changeset * reorder import * fix types and add tests * fix package name * test
2023-06-05Unflag hybrid output (#7260)Gravatar Nate Moore 1-3/+0
* feat(hybrid): unflag hybrid output * chore: cleanup rebase errors
2023-06-05[ci] formatGravatar matthewp 1-4/+2
2023-06-05Redirects (#7067)Gravatar Matthew Phillips 1-0/+18
* 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-31Revert "feat(hybrid): unflag hybrid output (#7255)" (#7259)Gravatar Nate Moore 1-0/+3
This reverts commit bc5d6ed39faf2f73eab161774bf66ebc5fd00db2.
2023-05-31feat(hybrid): unflag hybrid output (#7255)Gravatar Nate Moore 1-3/+0
2023-05-17feat: hybrid output (#6991)Gravatar Happydev 3-3/+48
* 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-16[ci] formatGravatar bluwy 1-2/+2
2023-05-16Add `workerd` and `worker` to cloudflare adapter bundling (#7092)Gravatar Johannes Spohr 6-277/+65
2023-05-08Fix generation for routes defined using getStaticPaths (#7029)Gravatar Reuben Tier 1-0/+277
* Fix static site dynamic routes for sitemap integration * Add changeset * Update pnpm-lock * Remove console.log
2023-02-13Fix 6206: Cloudflare function path resolving one step above (#6208)Gravatar Marvin Frachet 1-0/+1
* 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-5/+6
* fix: use the root of the project as the functions location * test: add test to check where the functions folder is added
2023-01-30[ci] formatGravatar matthewp 1-1/+1
2023-01-30Fix Cloudflare directory mode regression (#6046)Gravatar Matthew Phillips 1-0/+20
* Fix Cloudflare directory mode regression * Adding a changeset
2023-01-26Support for prerendering in the Cloudflare integration (#5993)Gravatar Matthew Phillips 5-0/+54
* Cloudflare prerender branch * Add prerendered routes to Cloudflare routes.json * Adding changeset * Prevent process proxy from running during prerender phase
2022-11-08Support environment variables in Cloudflare and Netlify Edge functions (#5301)Gravatar Bjorn Lu 4-0/+9
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-08-02chore: skip cloudflare test for now (#4117)Gravatar Nate Moore 1-1/+1
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-29Prevent hydration scripts from being rendered in the wrong order (#4080)Gravatar Matthew Phillips 2-6/+1
* Prevent hydration scripts from being rendered in the wrong order * Remove comment * Update jsx * Remove promise for stop * Try skipping lit tests * Stringify these chunks too * Unskip lit
2022-07-27[ci] formatGravatar matthewp 2-12/+16
2022-07-27Fixes cloudflare throwing over process (#4072)Gravatar Matthew Phillips 5-0/+108
* Fixes cloudflare throwing over process * Up the timeout for slower CI servers * Fix linting * Up the timeout a bit