Skip to content

Commit 2b65180

Browse files
committed
Cleaning up references to wrangler.toml.
1 parent 0ac7046 commit 2b65180

File tree

188 files changed

+699
-778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+699
-778
lines changed

src/content/changelogs/queues.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ entries:
6464
description: |-
6565
Queue consumers will soon automatically scale up concurrently as a queues' backlog grows in order to keep overall message processing latency down. Concurrency will be enabled on all existing queues by 2023-03-28.
6666
67-
**To opt-out, or to configure a fixed maximum concurrency**, set `max_concurrency = 1` in your `wrangler.toml` file or via [the queues dashboard](https://dash.cloudflare.com/?to=/:account/queues).
67+
**To opt-out, or to configure a fixed maximum concurrency**, set `max_concurrency = 1` in your Wrangler configuration file or via [the queues dashboard](https://dash.cloudflare.com/?to=/:account/queues).
6868
6969
**To opt-in, you do not need to take any action**: your consumer will begin to scale out as needed to keep up with your message backlog. It will scale back down as the backlog shrinks, and/or if a consumer starts to generate a higher rate of errors. To learn more about how consumers scale, refer to the [consumer concurrency](/queues/configuration/consumer-concurrency/) documentation.
7070
- publish_date: "2023-03-02"

src/content/docs/ai-gateway/integrations/aig-workers-ai-binding.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Running `npm create cloudflare@latest` will prompt you to install the create-clo
3535
This will create a new `hello-ai` directory. Your new `hello-ai` directory will include:
3636

3737
- A "Hello World" Worker at `src/index.ts`.
38-
- A `wrangler.toml` configuration file.
38+
- A `wrangler.json` configuration file.
3939

4040
Go to your application directory:
4141

@@ -47,7 +47,7 @@ cd hello-ai
4747

4848
You must create an AI binding for your Worker to connect to Workers AI. Bindings allow your Workers to interact with resources, like Workers AI, on the Cloudflare Developer Platform.
4949

50-
To bind Workers AI to your Worker, add the following to the end of your `wrangler.toml` file:
50+
To bind Workers AI to your Worker, add the following to the end of your `wrangler.json` file:
5151

5252
import { WranglerConfig } from "~/components";
5353

@@ -72,7 +72,7 @@ Update the `index.ts` file in your `hello-ai` application directory with the fol
7272

7373
```typescript title="src/index.ts" {78-81}
7474
export interface Env {
75-
// If you set another name in wrangler.toml as the value for 'binding',
75+
// If you set another name in the Wrangler configuration file as the value for 'binding',
7676
// replace "AI" with the variable name you defined.
7777
AI: Ai;
7878
}

src/content/docs/analytics/analytics-engine/get-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { DirectoryListing } from "~/components"
1313

1414
## 1. Name your dataset and add it to your Worker
1515

16-
Add the following to your `wrangler.toml` file to create a [binding](/workers/runtime-apis/bindings/) to a Workers Analytics Engine dataset. A dataset is like a table in SQL: the rows and columns should have consistent meaning.
16+
Add the following to your Wrangler configuration file to create a [binding](/workers/runtime-apis/bindings/) to a Workers Analytics Engine dataset. A dataset is like a table in SQL: the rows and columns should have consistent meaning.
1717

1818
import { WranglerConfig } from "~/components";
1919

src/content/docs/analytics/analytics-engine/worker-querying.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The following is a sample Worker which executes a query against a dataset of wea
4646

4747
First the environment variables are set up with the account ID and API token.
4848

49-
The account ID is set in `wrangler.toml`:
49+
The account ID is set in the Wrangler configuration file:
5050

5151
import { WranglerConfig } from "~/components";
5252

src/content/docs/browser-rendering/get-started/browser-rendering-with-DO.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ wrangler r2 bucket list
6969

7070
After running the `list` command, you will see all bucket names, including the ones you have just created.
7171

72-
## 5. Configure `wrangler.toml`
72+
## 5. Configure Wrangler configuration file
7373

74-
Configure your `browser-worker` project's [`wrangler.toml`](/workers/wrangler/configuration/) file by adding a browser [binding](/workers/runtime-apis/bindings/) and a [Node.js compatibility flag](/workers/configuration/compatibility-flags/#nodejs-compatibility-flag). Browser bindings allow for communication between a Worker and a headless browser which allows you to do actions such as taking a screenshot, generating a PDF and more.
74+
Configure your `browser-worker` project's [Wrangler configuration file](/workers/wrangler/configuration/) by adding a browser [binding](/workers/runtime-apis/bindings/) and a [Node.js compatibility flag](/workers/configuration/compatibility-flags/#nodejs-compatibility-flag). Browser bindings allow for communication between a Worker and a headless browser which allows you to do actions such as taking a screenshot, generating a PDF and more.
7575

76-
Update your `wrangler.toml` configuration file with the Browser Rendering API binding, the R2 bucket you created and a Durable Object:
76+
Update your Wrangler configuration file with the Browser Rendering API binding, the R2 bucket you created and a Durable Object:
7777

7878
import { WranglerConfig } from "~/components";
7979

src/content/docs/browser-rendering/get-started/reuse-sessions.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 3
66
---
77

8-
import { Render, PackageManagers } from "~/components";
8+
import { Render, PackageManagers, WranglerConfig } from "~/components";
99

1010
The best way to improve the performance of your browser rendering worker is to reuse sessions. One way to do that is via [Durable Objects](/browser-rendering/get-started/browser-rendering-with-do/), which allows you to keep a long running connection from a worker to a browser. Another way is to keep the browser open after you've finished with it, and connect to that session each time you have a new request.
1111

@@ -41,16 +41,18 @@ In your `browser-worker` directory, install Cloudflare’s [fork of Puppeteer](/
4141
npm install @cloudflare/puppeteer --save-dev
4242
```
4343

44-
## 3. Configure `wrangler.toml`
44+
## 3. Configure the Wrangler configuration file
4545

46-
```
46+
<WranglerConfig>
47+
```toml
4748
name = "browser-worker"
4849
main = "src/index.ts"
4950
compatibility_date = "2023-03-14"
5051
compatibility_flags = [ "nodejs_compat" ]
5152

5253
browser = { binding = "MYBROWSER" }
5354
```
55+
</WranglerConfig>
5456

5557
## 4. Code
5658

src/content/docs/browser-rendering/get-started/screenshots.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ npx wrangler kv:namespace create BROWSER_KV_DEMO --preview
5656

5757
Take note of the IDs for the next step.
5858

59-
## 4. Configure `wrangler.toml`
59+
## 4. Configure the Wrangler configuration file
6060

61-
Configure your `browser-worker` project's [`wrangler.toml`](/workers/wrangler/configuration/) file by adding a browser [binding](/workers/runtime-apis/bindings/) and a [Node.js compatibility flag](/workers/configuration/compatibility-flags/#nodejs-compatibility-flag). Bindings allow your Workers to interact with resources on the Cloudflare developer platform. Your browser `binding` name is set by you, this guide uses the name `MYBROWSER`. Browser bindings allow for communication between a Worker and a headless browser which allows you to do actions such as taking a screenshot, generating a PDF and more.
61+
Configure your `browser-worker` project's [Wrangler configuration file](/workers/wrangler/configuration/) by adding a browser [binding](/workers/runtime-apis/bindings/) and a [Node.js compatibility flag](/workers/configuration/compatibility-flags/#nodejs-compatibility-flag). Bindings allow your Workers to interact with resources on the Cloudflare developer platform. Your browser `binding` name is set by you, this guide uses the name `MYBROWSER`. Browser bindings allow for communication between a Worker and a headless browser which allows you to do actions such as taking a screenshot, generating a PDF and more.
6262

63-
Update your `wrangler.toml` configuration file with the Browser Rendering API binding and the KV namespaces you created:
63+
Update your Wrangler configuration file with the Browser Rendering API binding and the KV namespaces you created:
6464

6565
import { WranglerConfig } from "~/components";
6666

src/content/docs/browser-rendering/how-to/ai.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ sidebar:
44
order: 2
55
---
66

7-
import { Aside } from "~/components";
7+
import { Aside, WranglerConfig } from "~/components";
88

9-
The ability to browse websites can be crucial when building workflows with AI. Here, we provide an example where we use Browser Rendering to visit
9+
The ability to browse websites can be crucial when building workflows with AI. Here, we provide an example where we use Browser Rendering to visit
1010
`https://news.ycombinator.com/` and then, using a machine learning model available in [Workers AI](/workers-ai/), extract the first post as JSON with a specified schema.
1111

1212
## Prerequisites
@@ -30,16 +30,20 @@ npm i zod
3030
npm i zod-to-json-schema
3131
```
3232

33-
3. Activate the nodejs compatibility flag and add your Browser Rendering binding to your new `wrangler.toml` configuration:
33+
3. Activate the nodejs compatibility flag and add your Browser Rendering binding to your new Wrangler configuration:
3434

35+
<WranglerConfig>
3536
```toml
3637
compatibility_flags = [ "nodejs_compat" ]
3738
```
39+
</WranglerConfig>
3840

41+
<WranglerConfig>
3942
```toml
4043
[browser]
4144
binding = "MY_BROWSER"
4245
```
46+
</WranglerConfig>
4347

4448
4. In order to use [Workers AI](/workers-ai/), you need to get your [Account ID and API token](/workers-ai/get-started/rest-api/#1-get-api-token-and-account-id).
4549
Once you have those, create a [`.dev.vars`](/workers/configuration/environment-variables/#add-environment-variables-via-wrangler) file and set them there:

src/content/docs/browser-rendering/how-to/pdf-generation.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 1
66
---
77

8-
import { Aside } from "~/components";
8+
import { Aside, WranglerConfig } from "~/components";
99

1010
As seen in the [Getting Started guide](/browser-rendering/get-started/screenshots/), Browser Rendering can be used to generate screenshots for any given URL. Alongside screenshots, you can also generate full PDF documents for a given webpage, and can also provide the webpage markup and style ourselves.
1111

@@ -23,11 +23,13 @@ npm create cloudflare@latest -- browser-worker
2323
npm install @cloudflare/puppeteer --save-dev
2424
```
2525

26-
3. Add your Browser Rendering binding to your new `wrangler.toml` configuration:
26+
3. Add your Browser Rendering binding to your new Wrangler configuration:
2727

28+
<WranglerConfig>
2829
```toml
2930
browser = { binding = "BROWSER" }
3031
```
32+
</WranglerConfig>
3133

3234
4. Replace the contents of `src/index.ts` (or `src/index.js` for JavaScript projects) with the following skeleton script:
3335

src/content/docs/browser-rendering/platform/wrangler.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ To install Wrangler, refer to [Install and Update Wrangler](/workers/wrangler/in
1919

2020
[Bindings](/workers/runtime-apis/bindings/) allow your Workers to interact with resources on the Cloudflare developer platform. A browser binding will provide your Worker with an authenticated endpoint to interact with a dedicated Chromium browser instance.
2121

22-
To deploy a Browser Rendering Worker, you must declare a [browser binding](/workers/runtime-apis/bindings/) in your Worker's `wrangler.toml` configuration file.
22+
To deploy a Browser Rendering Worker, you must declare a [browser binding](/workers/runtime-apis/bindings/) in your Worker's Wrangler configuration file.
2323

2424
<Render file="nodejs-compat-howto" product="workers" />
2525

0 commit comments

Comments
 (0)