Skip to content

Commit 33c6600

Browse files
Merge branch 'production'
2 parents 0d2bdf5 + 28308f0 commit 33c6600

File tree

1,226 files changed

+49937
-7825
lines changed

Some content is hidden

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

1,226 files changed

+49937
-7825
lines changed

.github/CODEOWNERS

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
/src/content/docs/analytics/ @46bit @bharatnc @jherre @jimhawkridge @soheiokamoto @victor-perov @angelampcosta @cloudflare/pcx-technical-writing
3333
/src/content/docs/data-localization/ @soheiokamoto @angelampcosta @cloudflare/pcx-technical-writing
34-
/src/content/docs/logs/ @bharatnc @jherre @soheiokamoto @victor-perov @angelampcosta @cloudflare/pcx-technical-writing
34+
/src/content/docs/logs/ @cmackenzie1 @bharatnc @jherre @soheiokamoto @victor-perov @angelampcosta @cloudflare/pcx-technical-writing
3535

3636
# API & Zones
3737

@@ -42,15 +42,15 @@
4242

4343
# Browser Rendering API
4444

45-
/src/content/docs/browser-rendering/ @tanushree-sharma @mchenco @cloudflare/pcx-technical-writing @celso @meddulla
45+
/src/content/docs/browser-rendering/ @mchenco @cloudflare/pcx-technical-writing @celso @meddulla
4646

4747
# Cloudflare One
4848

4949
/src/content/docs/cloudflare-one/ @ranbel @cloudflare/pcx-technical-writing
5050
/src/content/docs/cloudflare-one/applications/ @kennyj42 @ranbel @cloudflare/pcx-technical-writing
5151
/src/content/docs/cloudflare-one/identity/ @kennyj42 @ranbel @cloudflare/pcx-technical-writing
5252
/src/content/docs/cloudflare-one/policies/access/ @kennyj42 @ranbel @cloudflare/pcx-technical-writing
53-
/src/content/docs/cloudflare-one/connections/connect-devices/ @kkrum @dh-cf @ranbel @cloudflare/pcx-technical-writing
53+
/src/content/docs/cloudflare-one/connections/connect-devices/ @kkrum @ranbel @cloudflare/pcx-technical-writing
5454
/src/content/docs/cloudflare-one/connections/connect-networks/ @janani-cr @ranbel @cloudflare/pcx-technical-writing
5555
/src/content/docs/cloudflare-one/insights/ @abelinkinbio @ranbel @cloudflare/pcx-technical-writing
5656
/src/content/docs/cloudflare-one/applications/scan-apps/ @maxvp @cloudflare/pcx-technical-writing
@@ -59,7 +59,7 @@
5959
/src/content/docs/cloudflare-one/policies/data-loss-prevention/ @maxvp @cloudflare/pcx-technical-writing
6060
/src/content/docs/email-security/ @Maddy-Cloudflare @cloudflare/pcx-technical-writing
6161
/src/content/changelogs/access.yaml @ranbel @kennyj42 @cloudflare/pcx-technical-writing
62-
/src/content/changelogs/warp.yaml @ranbel @dh-cf @cloudflare/pcx-technical-writing
62+
/src/content/changelogs/warp.yaml @ranbel @cloudflare/pcx-technical-writing
6363

6464
# Consumer products
6565

@@ -118,24 +118,24 @@
118118
/src/content/changelogs/workers.yaml @cloudflare/workers-docs @GregBrimble @WalshyDev @aninibread @cloudflare/deploy-config @cloudflare/pcx-technical-writing @irvinebroque
119119
/src/content/docs/zaraz/ @bjesus @jonnyparris @simonabadoiu @cloudflare/pcx-technical-writing
120120
/src/content/changelogs/zaraz.yaml @bjesus @jonnyparris @simonabadoiu @cloudflare/pcx-technical-writing
121-
/src/content/docs/workers/ci-cd/ @irvinebroque @aninibread @GregBrimble @cloudflare/pcx-technical-writing
122-
/src/content/docs/workers/runtime-apis/ @irvinebroque @jasnell @mikenomitch @GregBrimble @cloudflare/pcx-technical-writing
123-
/src/content/docs/workers/runtime-apis/bindings/ @irvinebroque @mikenomitch @GregBrimble @cloudflare/pcx-technical-writing
124-
/src/content/docs/workers/platform/ @irvinebroque @tanushree-sharma @GregBrimble @cloudflare/deploy-config @cloudflare/pcx-technical-writing
125-
/src/content/docs/workers/configuration/compatibility-dates/ @irvinebroque @mikenomitch @GregBrimble @cloudflare/deploy-config @cloudflare/pcx-technical-writing
126-
/src/content/docs/workers/configuration/compatibility-flags/ @irvinebroque @mikenomitch @GregBrimble @cloudflare/deploy-config @cloudflare/pcx-technical-writing
127-
128-
/src/content/docs/workers/reference/migrate-to-module-workers/ @irvinebroque @GregBrimble @cloudflare/deploy-config @cloudflare/pcx-technical-writing
129-
/src/content/docs/workers/reference/security-model/ @irvinebroque @GregBrimble @cloudflare/pcx-technical-writing
130-
/src/content/compatibility-dates/ @irvinebroque @kflansburg @mikenomitch @GregBrimble @cloudflare/pcx-technical-writing
131-
/src/content/docs/workers/wrangler/ @penalosa @petebacondarwin @dario-piotrowicz @irvinebroque @GregBrimble @cloudflare/pcx-technical-writing
132-
/src/content/docs/workers/frameworks/ @igorminar @dario-piotrowicz @jculvey @aninibread @GregBrimble @cloudflare/pcx-technical-writing
133-
/src/content/docs/pages/framework-guides/ @igorminar @dario-piotrowicz @jculvey @aninibread @GregBrimble @tanushree-sharma @cloudflare/pcx-technical-writing
121+
/src/content/docs/workers/ci-cd/ @irvinebroque @aninibread @GregBrimble @ToriLindsay @cloudflare/pcx-technical-writing
122+
/src/content/docs/workers/runtime-apis/ @irvinebroque @jasnell @mikenomitch @GregBrimble @ToriLindsay @cloudflare/pcx-technical-writing
123+
/src/content/docs/workers/runtime-apis/bindings/ @irvinebroque @mikenomitch @GregBrimble @ToriLindsay @cloudflare/pcx-technical-writing
124+
/src/content/docs/workers/platform/ @irvinebroque @GregBrimble @cloudflare/deploy-config @cloudflare/pcx-technical-writing
125+
/src/content/docs/workers/configuration/compatibility-dates/ @irvinebroque @mikenomitch @GregBrimble @ToriLindsay @cloudflare/deploy-config @cloudflare/pcx-technical-writing
126+
/src/content/docs/workers/configuration/compatibility-flags/ @irvinebroque @mikenomitch @GregBrimble @ToriLindsay @cloudflare/deploy-config @cloudflare/pcx-technical-writing
127+
128+
/src/content/docs/workers/reference/migrate-to-module-workers/ @irvinebroque @GregBrimble @ToriLindsay @cloudflare/deploy-config @cloudflare/pcx-technical-writing
129+
/src/content/docs/workers/reference/security-model/ @irvinebroque @GregBrimble @ToriLindsay @cloudflare/pcx-technical-writing
130+
/src/content/compatibility-flags/ @irvinebroque @mikenomitch @GregBrimble @cloudflare/pcx-technical-writing
131+
/src/content/docs/workers/wrangler/ @cloudflare/wrangler @cloudflare/wrangler-friends @irvinebroque @ToriLindsay @cloudflare/pcx-technical-writing
132+
/src/content/docs/workers/frameworks/ @igorminar @dario-piotrowicz @jculvey @aninibread @GregBrimble @ToriLindsay @cloudflare/pcx-technical-writing
133+
/src/content/docs/pages/framework-guides/ @igorminar @dario-piotrowicz @jculvey @aninibread @GregBrimble @ToriLindsay @cloudflare/pcx-technical-writing
134134
/src/content/docs/analytics/analytics-engine/ @irvinebroque @elithrar @cloudflare/pcx-technical-writing
135-
/cloudflare-for-platforms/workers-for-platforms/ @irvinebroque @tanushree-sharma @angelampcosta @GregBrimble @cloudflare/deploy-config @cloudflare/pcx-technical-writing
136-
/src/content/docs/workers/observability/ @irvinebroque @mikenomitch @rohinlohe @cloudflare/pcx-technical-writing
137-
/src/content/docs/workers/static-assets @irvinebroque @tanushree-sharma @GregBrimble @WalshyDev @cloudflare/deploy-config @cloudflare/pcx-technical-writing
138-
/src/content/docs/workflows/ @elithrar @celso @sidharthachatterjee @cloudflare/pcx-technical-writing
135+
/cloudflare-for-platforms/workers-for-platforms/ @irvinebroque @angelampcosta @GregBrimble @cloudflare/deploy-config @cloudflare/pcx-technical-writing
136+
/src/content/docs/workers/observability/ @irvinebroque @mikenomitch @rohinlohe @ToriLindsay @cloudflare/pcx-technical-writing
137+
/src/content/docs/workers/static-assets @irvinebroque @GregBrimble @WalshyDev @ToriLindsay @cloudflare/deploy-config @cloudflare/pcx-technical-writing
138+
/src/content/docs/workflows/ @ToriLindsay @elithrar @celso @sidharthachatterjee @cloudflare/pcx-technical-writing
139139

140140
# DDoS Protection
141141

@@ -203,7 +203,8 @@
203203

204204
# Support
205205

206-
/src/content/docs/support/ @shanecloudflare @zeinjaber @TracyCloudflare @ngayerie @cloudflare/pcx-technical-writing
206+
/src/content/docs/support/ @shanecloudflare @zeinjaber @TracyCloudflare @ngayerie @cloudflare/pcx-technical-writing @cloudflare/customer-support
207+
/src/assets/images/support/ @shanecloudflare @zeinjaber @TracyCloudflare @ngayerie @cloudflare/pcx-technical-writing @cloudflare/customer-support
207208

208209
# Turnstile
209210

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ jobs:
3030
- run: npm ci
3131
- run: npm run check
3232

33-
## TODO: formatting checks
34-
33+
- run: npm run format:core:check
34+
## TODO: content formatting checks
3535
- run: npm run build
3636
env:
3737
NODE_OPTIONS: "--max-old-space-size=4192"
3838
RUN_LINK_CHECK: true
3939

40+
- run: npm run check:worker
41+
4042
- uses: actions/cache/save@v4
4143
with:
4244
path: |

.github/workflows/semgrep.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
21
on:
3-
pull_request: {}
42
workflow_dispatch: {}
53
schedule:
6-
- cron: '0 4 * * *'
4+
- cron: "0 4 * * *"
75
name: Semgrep config
86
jobs:
97
semgrep:

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ dist
44
.github/CODEOWNERS
55
public/_redirects
66
public/analytics/static/downloads/main.css
7+
src/content/workers-ai-models/*.json
8+
tests/fixtures/openapi.json

.prettierrc.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-check
12
/** @type {import("prettier").Config} */
23
export default {
34
plugins: ["prettier-plugin-astro"],

CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,46 @@ If we require more information to address your pull request, the `more-informati
3333
- [npm](https://nodejs.org/en/learn/getting-started/an-introduction-to-the-npm-package-manager#introduction-to-npm) is the recommended package manager that must be used in installing dependencies.
3434
- The generated `package-lock.json` file must be committed to git.
3535

36+
## Wrangler config
37+
38+
If you're adding a code snippet to the docs that represents a Wrangler config file (`wrangler.toml` or `wrangler.json`) make sure you wrap it with the `<WranglerConfig>` component, which ensure it's rendered as both JSON and TOML e.g.
39+
40+
````
41+
42+
import { WranglerConfig } from "~/components";
43+
44+
<WranglerConfig>
45+
46+
```toml
47+
# Top-level configuration
48+
name = "my-worker"
49+
main = "src/index.js"
50+
compatibility_date = "2022-07-12"
51+
52+
workers_dev = false
53+
route = { pattern = "example.org/*", zone_name = "example.org" }
54+
55+
kv_namespaces = [
56+
{ binding = "<MY_NAMESPACE>", id = "<KV_ID>" }
57+
]
58+
59+
[env.staging]
60+
name = "my-worker-staging"
61+
route = { pattern = "staging.example.org/*", zone_name = "example.org" }
62+
63+
kv_namespaces = [
64+
{ binding = "<MY_NAMESPACE>", id = "<STAGING_KV_ID>" }
65+
]
66+
```
67+
68+
</WranglerConfig>
69+
70+
````
3671

3772
## Workers Playground
73+
3874
If you are adding a code snippet to the docs that is:
75+
3976
1. A fully contained, valid Worker (i.e. it does not require external dependencies or specific bindings)
4077
2. Only JavaScript
4178

@@ -58,6 +95,7 @@ export default {
5895
};
5996
```
6097
````
98+
6199
would render as
62100

63101
<img width="870" alt="Screenshot 2024-02-20 at 14 29 22" src="https://github.com/cloudflare/cloudflare-docs/assets/28503158/56aa8016-b3b6-4d64-8213-b1a26f16534a">

astro.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ const autolinkConfig: rehypeAutolinkHeadingsOptions = {
7373
// https://astro.build/config
7474
export default defineConfig({
7575
site: "https://developers.cloudflare.com",
76-
smartypants: false,
7776
markdown: {
77+
smartypants: false,
7878
rehypePlugins: [
7979
[
8080
rehypeMermaid,
@@ -158,6 +158,7 @@ export default defineConfig({
158158
PageTitle: "./src/components/overrides/PageTitle.astro",
159159
SocialIcons: "./src/components/overrides/SocialIcons.astro",
160160
SkipLink: "./src/components/overrides/SkipLink.astro",
161+
TableOfContents: "./src/components/overrides/TableOfContents.astro",
161162
},
162163
sidebar: await autogenSections(),
163164
customCss: [

bin/fetch-ai-models.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fetch("https://ai.cloudflare.com/api/models")
77
const fileName = model.name.split("/")[2];
88
fs.writeFileSync(
99
`./src/content/workers-ai-models/${fileName}.json`,
10-
JSON.stringify(model),
10+
JSON.stringify(model, null, 4),
1111
"utf-8",
1212
);
1313
});

ec.config.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-check
12
import darkTheme from "solarflare-theme/themes/cloudflare-dark-color-theme.json" with { type: "json" };
23
import lightTheme from "solarflare-theme/themes/cloudflare-light-color-theme.json" with { type: "json" };
34

@@ -6,6 +7,9 @@ import { h } from "@expressive-code/core/hast";
67

78
import lzstring from "lz-string";
89

10+
/**
11+
* @param {string} code
12+
*/
913
export function serialiseWorker(code) {
1014
const formData = new FormData();
1115

@@ -29,6 +33,9 @@ export function serialiseWorker(code) {
2933
return formData;
3034
}
3135

36+
/**
37+
* @param {FormData} worker
38+
*/
3239
export async function compressWorker(worker) {
3340
const serialisedWorker = new Response(worker);
3441
return lzstring.compressToEncodedURIComponent(
@@ -92,7 +99,10 @@ function outputCodeblocks() {
9299
},
93100
postprocessRenderedBlock: async (context) => {
94101
if (!context.codeBlock.meta.includes("output")) return;
95-
context.renderData.blockAst.properties.className.push("code-output");
102+
context.renderData.blockAst.properties.className ??= [];
103+
if (Array.isArray(context.renderData.blockAst.properties.className)) {
104+
context.renderData.blockAst.properties.className.push("code-output");
105+
}
96106
context.addStyles(`
97107
div.expressive-code:has(figure.code-output) {
98108
margin-top: 0 !important;

0 commit comments

Comments
 (0)