From 943f10f607136f486ddba0846bc782bb99b21d19 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 28 Oct 2022 08:05:54 -0400 Subject: [PATCH 1/2] Export Cloudflare runtime types --- packages/integrations/cloudflare/package.json | 5 ++++- packages/integrations/cloudflare/runtime.d.ts | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 packages/integrations/cloudflare/runtime.d.ts diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index 46f588908542..bdb1bb48d7ed 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -19,7 +19,10 @@ "homepage": "https://docs.astro.build/en/guides/integrations-guide/cloudflare/", "exports": { ".": "./dist/index.js", - "./runtime": "./dist/runtime.js", + "./runtime": { + "types": "./runtime.d.ts", + "default": "./dist/runtime.js" + }, "./server.advanced.js": "./dist/server.advanced.js", "./server.directory.js": "./dist/server.directory.js", "./package.json": "./package.json" diff --git a/packages/integrations/cloudflare/runtime.d.ts b/packages/integrations/cloudflare/runtime.d.ts new file mode 100644 index 000000000000..3b415153c0cc --- /dev/null +++ b/packages/integrations/cloudflare/runtime.d.ts @@ -0,0 +1,8 @@ +export type { + WorkerRuntime, + PagesRuntime +} from './dist/runtime'; + +export { + getRuntime +} from './dist/runtime'; From be1a1e46d4060ee8c88985b2588b2fcf5ae53910 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 28 Oct 2022 08:06:42 -0400 Subject: [PATCH 2/2] Adding a changeset --- .changeset/new-pumas-begin.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/new-pumas-begin.md diff --git a/.changeset/new-pumas-begin.md b/.changeset/new-pumas-begin.md new file mode 100644 index 000000000000..f7f1d558a2b2 --- /dev/null +++ b/.changeset/new-pumas-begin.md @@ -0,0 +1,5 @@ +--- +'@astrojs/cloudflare': patch +--- + +Exports new runtime entrypoint's types