From 9aa3aedc46635cd5597d7c50307dd032ab23eb8b Mon Sep 17 00:00:00 2001 From: Dominik G Date: Tue, 16 Aug 2022 18:47:51 +0200 Subject: [PATCH] fix: actually expose platform.caches (#5887) --- .changeset/smooth-bags-sell.md | 5 +++++ packages/adapter-cloudflare-workers/files/entry.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/smooth-bags-sell.md diff --git a/.changeset/smooth-bags-sell.md b/.changeset/smooth-bags-sell.md new file mode 100644 index 000000000000..e7a5114c537d --- /dev/null +++ b/.changeset/smooth-bags-sell.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/adapter-cloudflare-workers': patch +--- + +expose caches on platform diff --git a/packages/adapter-cloudflare-workers/files/entry.js b/packages/adapter-cloudflare-workers/files/entry.js index cd784e5d33c6..0646c7acc380 100644 --- a/packages/adapter-cloudflare-workers/files/entry.js +++ b/packages/adapter-cloudflare-workers/files/entry.js @@ -67,7 +67,7 @@ export default { // dynamically-generated pages return await server.respond(req, { - platform: { env, context }, + platform: { env, context, caches }, getClientAddress() { return req.headers.get('cf-connecting-ip'); }