Skip to content

Commit

Permalink
update and fix getPlatformProxy incorrect changeset (#7841)
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz authored Jan 21, 2025
1 parent 6b11123 commit 229d00f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .changeset/thick-dots-sit.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"wrangler": patch
"wrangler": minor
---

add support for assets bindings to `getPlatformProxy`
Expand All @@ -26,14 +26,12 @@ example:
```js
import { getPlatformProxy } from "wrangler";

const { env } = await getPlatformProxy();
const { env, dispose } = await getPlatformProxy();

if (env.ASSETS) {
const text = await (
await p.env.ASSETS.fetch("http://0.0.0.0/file.txt")
).text();
const text = await (await env.ASSETS.fetch("http://0.0.0.0/file.txt")).text();
console.log(text); // logs the content of file.txt
}

p.dispose();
await dispose();
```

0 comments on commit 229d00f

Please sign in to comment.