Skip to content

Commit 884dba0

Browse files
committed
Merge remote-tracking branch 'upstream/production' into chore/formatting
2 parents abcd051 + 1a18f9d commit 884dba0

File tree

131 files changed

+1296
-611
lines changed

Some content is hidden

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

131 files changed

+1296
-611
lines changed

.github/ISSUE_TEMPLATE/engineering.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Cloudflare docs website error(s)
22
description: Report an issue with the live documentation website; for example, issues with content display, buggy browser behavior, etc.
33
labels: ["engineering"]
44
assignees:
5-
- kodster28
65
- KianNH
76
body:
87
- type: textarea

.github/actions/assign-pr/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async function list(
8080
}
8181

8282
if (assignees.size === 0) {
83-
assignees.add("kodster28");
83+
assignees.add("haleycode");
8484
}
8585

8686
// don't self-assign

.github/workflows/semgrep.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ name: Semgrep config
1111
jobs:
1212
semgrep:
1313
name: semgrep/ci
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-latest
1515
env:
1616
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
1717
SEMGREP_URL: https://cloudflare.semgrep.dev
1818
SEMGREP_APP_URL: https://cloudflare.semgrep.dev
1919
SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version
2020
container:
21-
image: returntocorp/semgrep
21+
image: semgrep/semgrep
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- run: semgrep ci

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ This spawns a server that will be accessible via `http://localhost:1111` in your
3535

3636
### Recommendations
3737

38-
Part of our application accesses the GitHub API (to populate the [Wrangler changelog](https://github.com/cloudflare/cloudflare-docs/blob/production/layouts/partials/wrangler-changelog.html)).
38+
Part of our application accesses the GitHub API (to populate the [Wrangler changelog](https://developers.cloudflare.com/workers/platform/changelog/wrangler/)).
3939

40+
<!--
4041
Since GitHub gives a higher request limit to authenticated requests, you may want to add a [classic token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#personal-access-tokens-classic) with permissions for `repos:public_repo` to `/assets/secrets/github_token.txt`. The token value should be the only thing in your file.
42+
-->
4143

4244
## Deployment
4345

@@ -61,12 +63,12 @@ Please note that we may use AI tools to help us review technical documentation,
6163

6264
All commands are run from the root of the project, from a terminal:
6365

64-
| Command | Action |
65-
| :------------------------ | :----------------------------------------------- |
66-
| `npm install` | Installs dependencies |
67-
| `npm run dev` | Starts local dev server at `localhost:4321` |
68-
| `npx astro build` | Build your production site to `./dist/` |
69-
| `npm run astro -- --help` | Get help using the Astro CLI |
66+
| Command | Action |
67+
|:--------------------------|:--------------------------------------------|
68+
| `npm install` | Installs dependencies |
69+
| `npm run dev` | Starts local dev server at `localhost:1111` |
70+
| `npx astro build` | Build your production site to `./dist/` |
71+
| `npm run astro -- --help` | Get help using the Astro CLI |
7072

7173
## 👀 Want to learn more?
7274

package-lock.json

Lines changed: 36 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
"@cloudflare/workers-types": "^4.20240903.0",
3434
"@codingheads/sticky-header": "^1.0.2",
3535
"@stoplight/json-schema-tree": "^4.0.0",
36+
"@types/dompurify": "^3.0.5",
37+
"@types/he": "^1.2.3",
3638
"@types/node": "^20.16.1",
3739
"@types/react": "^18.3.5",
3840
"@types/react-dom": "^18.3.0",
@@ -42,15 +44,17 @@
4244
"astro-icon": "^1.1.1",
4345
"astro-live-code": "^0.0.3",
4446
"date-fns": "^3.6.0",
47+
"dompurify": "3.1.6",
4548
"dot-prop": "^9.0.0",
4649
"github-slugger": "^2.0.0",
4750
"hastscript": "^9.0.0",
51+
"he": "^1.2.0",
4852
"instantsearch.css": "^8.5.0",
4953
"instantsearch.js": "^4.74.0",
5054
"littlefoot": "^4.1.1",
5155
"lz-string": "^1.5.0",
5256
"marked": "^14.1.1",
53-
"mermaid": "^11.1.1",
57+
"mermaid": "^11.3.0",
5458
"node-html-parser": "^6.1.13",
5559
"patch-package": "^8.0.0",
5660
"prettier": "^3.3.3",

src/components/overrides/Head.astro

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,40 @@ if (Astro.props.entry.data.external_link) {
175175
<script>
176176
import mermaid from "mermaid";
177177

178-
mermaid.initialize({ startOnLoad: true, theme: "neutral" });
178+
const diagrams = document.querySelectorAll<HTMLPreElement>("pre.mermaid");
179+
180+
let init = false;
181+
182+
async function render() {
183+
const theme =
184+
document.documentElement.getAttribute("data-theme") === "light"
185+
? "neutral"
186+
: "dark";
187+
188+
for (const diagram of diagrams) {
189+
if (!init) {
190+
diagram.setAttribute("data-diagram", diagram.textContent as string);
191+
}
192+
193+
const def = diagram.getAttribute("data-diagram") as string;
194+
195+
mermaid.initialize({ startOnLoad: false, theme });
196+
await mermaid
197+
.render(`mermaid-${crypto.randomUUID()}`, def)
198+
.then(({ svg }) => (diagram.innerHTML = svg));
199+
200+
diagram.setAttribute("data-processed", "true");
201+
}
202+
203+
init = true;
204+
}
205+
206+
const obs = new MutationObserver(() => render());
207+
208+
obs.observe(document.documentElement, {
209+
attributes: true,
210+
attributeFilter: ["data-theme"],
211+
});
179212
</script>
180213
<script src="src/scripts/analytics.ts"></script>
181214
<Default {...Astro.props}><slot /></Default>

src/components/overrides/PageSidebar.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Default from "@astrojs/starlight/components/PageSidebar.astro";
44
import type { CollectionEntry } from "astro:content";
55
import { entryToString } from "~/util/container";
66
import { parse } from "node-html-parser";
7+
import he from "he";
78
89
let rangeBetween = (x: number, y: number) =>
910
Array.from({ length: y - x + 1 }, (_, i) => i + x);
@@ -48,9 +49,11 @@ if (Astro.props.toc) {
4849
for (const header of headers) {
4950
const depth = headerDepth(header);
5051
52+
const title = he.decode(header.innerText);
53+
5154
if (depth === 2) {
5255
Astro.props.toc.items.push({
53-
text: header.innerText,
56+
text: title,
5457
slug: header.id,
5558
depth,
5659
children: [],
@@ -60,7 +63,7 @@ if (Astro.props.toc) {
6063
}
6164
6265
Astro.props.toc.items.at(-1)?.children.push({
63-
text: header.innerText,
66+
text: title,
6467
slug: header.id,
6568
depth,
6669
children: [],

src/content/changelogs/ai-gateway.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ entries:
2323
- publish_date: "2024-09-26"
2424
title: Evaluations
2525
description: |-
26-
* **Configurations**: Use AI Gateway’s [Evaluations](/ai-gateway/observability/evaluations/index.mdx) to make informed decisions on how to optimize your AI application.
26+
* **Configurations**: Use AI Gateway’s [Evaluations](/ai-gateway/evaluations) to make informed decisions on how to optimize your AI application.
2727
2828
- publish_date: "2024-09-10"
2929
title: Custom costs

src/content/changelogs/durable-objects.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ entries:
1919
2020
During the initial beta, Storage API billing is not enabled for Durable Object classes using SQLite storage backend. SQLite-backed Durable Objects will incur [charges for requests and duration](/durable-objects/platform/pricing/#billing-metrics). We plan to enable Storage API billing for Durable Objects using SQLite storage backend in the first half of 2025 after advance notice with the following [pricing](/durable-objects/platform/pricing/#sqlite-storage-backend).
2121
22+
- publish_date: "2024-09-07"
23+
title: New error message for overloaded Durable Objects
24+
description: |-
25+
Introduced a new overloaded error message for Durable Objects: "Durable Object is overloaded. Too many requests for the same object within a 10 second window."
26+
27+
This error message does not replace other types of overload messages that you may encounter for your Durable Object, and is only returned at more extreme levels of overload.
28+
2229
- publish_date: "2024-06-24"
2330
description: |-
2431
[Exceptions](/durable-objects/best-practices/error-handling) thrown from Durable Object internal operations and tunneled to the caller may now be populated with a `.retryable: true` property if the exception was likely due to a transient failure, or populated with an `.overloaded: true` property if the exception was due to [overload](/durable-objects/observability/troubleshooting/#durable-object-is-overloaded).

0 commit comments

Comments
 (0)