Skip to content

Commit

Permalink
Export Cloudflare runtime types (#5230)
Browse files Browse the repository at this point in the history
* Export Cloudflare runtime types

* Adding a changeset
  • Loading branch information
matthewp authored Oct 28, 2022
1 parent a609a89 commit 69a532a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/new-pumas-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/cloudflare': patch
---

Exports new runtime entrypoint's types
5 changes: 4 additions & 1 deletion packages/integrations/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions packages/integrations/cloudflare/runtime.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export type {
WorkerRuntime,
PagesRuntime
} from './dist/runtime';

export {
getRuntime
} from './dist/runtime';

0 comments on commit 69a532a

Please sign in to comment.