Skip to content

Commit e52f901

Browse files
Merge branch 'production' into patricia/pcx15359-auto-provisioning
2 parents 760a724 + 5a4141e commit e52f901

File tree

451 files changed

+113989
-106447
lines changed

Some content is hidden

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

451 files changed

+113989
-106447
lines changed

.github/CODEOWNERS

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
# More dev-specific files
66

7-
/.github/ @pedrosousa @haleycode @kristianfreeman @GregBrimble @KianNH @maxvp @marciocloudflare @WalshyDev
7+
/.github/ @kodster28 @pedrosousa @haleycode @kristianfreeman @GregBrimble @KianNH @maxvp @marciocloudflare @WalshyDev
88
/.github/CODEOWNERS @cloudflare/pcx-technical-writing
99
/.github/actions/assign-issue/index.js @cloudflare/pcx-technical-writing
1010
/.github/actions/assign-pr/index.js @cloudflare/pcx-technical-writing
1111
/.github/styles/cloudflare/spelling-exceptions.txt @cloudflare/pcx-technical-writing
12-
/src/components/ @cloudflare/developer-advocacy @kristianfreeman @pedrosousa @marciocloudflare @haleycode @maxvp @GregBrimble @KianNH @WalshyDev
13-
/functions/ @cloudflare/developer-advocacy @kristianfreeman @pedrosousa @haleycode @marciocloudflare @maxvp @GregBrimble @KianNH @WalshyDev
14-
*.js @cloudflare/developer-advocacy @kristianfreeman @pedrosousa @haleycode @maxvp @marciocloudflare @GregBrimble @KianNH @WalshyDev
15-
*.ts @cloudflare/developer-advocacy @kristianfreeman @pedrosousa @haleycode @maxvp @marciocloudflare @GregBrimble @KianNH @WalshyDev
12+
/src/components/ @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @marciocloudflare @haleycode @maxvp @GregBrimble @KianNH @WalshyDev
13+
/functions/ @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @haleycode @marciocloudflare @maxvp @GregBrimble @KianNH @WalshyDev
14+
*.js @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @haleycode @maxvp @marciocloudflare @GregBrimble @KianNH @WalshyDev
15+
*.ts @cloudflare/developer-advocacy @kristianfreeman @kodster28 @pedrosousa @haleycode @maxvp @marciocloudflare @GregBrimble @KianNH @WalshyDev
1616
/src/content/workers-ai-models/ @craigsdennis @pedrosousa @cloudflare/pcx-technical-writing
1717
/public/_redirects @GregBrimble @KianNH @pedrosousa @WalshyDev @cloudflare/pcx-technical-writing
1818

@@ -77,7 +77,7 @@
7777
/src/content/docs/china-network/ @pedrosousa @cloudflare/pcx-technical-writing
7878
/src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/ @RebeccaTamachiro @cloudflare/pcx-technical-writing
7979
/src/content/docs/dns/ @RebeccaTamachiro @cloudflare/pcx-technical-writing
80-
/src/content/docs/fundamentals/ @cloudflare/pcx-technical-writing
80+
/src/content/docs/fundamentals/ @dcpena @cloudflare/pcx-technical-writing
8181
/src/content/docs/fundamentals/account-and-billing/ @dcpena @cloudflare/pcx-technical-writing
8282
/src/content/docs/learning-paths/ @cloudflare/pcx-technical-writing
8383
/src/content/docs/network-error-logging/ @dcpena @cloudflare/pcx-technical-writing
@@ -150,8 +150,8 @@
150150

151151
# Docs team areas
152152

153-
/src/content/docs/docs-guide/ @crwaters16 @cloudflare/pcx-technical-writing
154-
/src/content/docs/style-guide/ @crwaters16 @cloudflare/pcx-technical-writing
153+
/src/content/docs/docs-guide/ @dcpena @cloudflare/pcx-technical-writing
154+
/src/content/docs/style-guide/ @dcpena @cloudflare/pcx-technical-writing
155155

156156
# Magic products
157157

@@ -163,8 +163,8 @@
163163

164164
# Migration guides
165165

166-
/src/content/docs/migration-guides/ @kimj15 @crwaters16 @cloudflare/pcx-technical-writing
167-
/src/assets/images/migration-guides/ @kimj15 @crwaters16 @cloudflare/pcx-technical-writing
166+
/src/content/docs/migration-guides/ @kimj15 @cloudflare/pcx-technical-writing
167+
/src/assets/images/migration-guides/ @kimj15 @cloudflare/pcx-technical-writing
168168

169169
# Performance products
170170

@@ -189,8 +189,8 @@
189189

190190
# Reference architecture
191191

192-
/src/content/docs/reference-architecture/ @securitypedant @crwaters16 @cloudflare/pcx-technical-writing
193-
/src/assets/images/reference-architecture/ @securitypedant @crwaters16 @cloudflare/pcx-technical-writing
192+
/src/content/docs/reference-architecture/ @securitypedant @haleycode @cloudflare/pcx-technical-writing
193+
/src/assets/images/reference-architecture/ @securitypedant @haleycode @cloudflare/pcx-technical-writing
194194

195195
# Security products
196196

.github/workflows/api-links-crawl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
compile:
1414
name: Compiles
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-22.04
1616
steps:
1717
- uses: actions/checkout@v4
1818
with:

.hyperlint/config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
content_dir: /src/content
22
authorized_users:
3-
- crwaters16
43
- dcpena
54
- kodster28
65
- KianNH

astro.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export default defineConfig({
193193
"/products/",
194194
"/rules/snippets/examples/?operation=*",
195195
"/rules/transform/examples/?operation=*",
196+
"/ruleset-engine/rules-language/fields/reference/**",
196197
"/workers/examples/?languages=*",
197198
"/workers/examples/?tags=*",
198199
"/workers-ai/models/**",

bin/crawl-api-links.js

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ async function checkLinks() {
2121
});
2222
const page = await browser.newPage();
2323

24-
const sitemapUrl = "https://developers.cloudflare.com/sitemap.xml";
24+
// skip image requests
25+
await page.setRequestInterception(true);
26+
page.on("request", (request) => {
27+
if (request.resourceType() === "image") request.abort();
28+
else request.continue();
29+
});
30+
31+
const sitemapUrl = "https://developers.cloudflare.com/sitemap-0.xml";
2532
await page.goto(sitemapUrl, { timeout: navigationTimeout });
2633

2734
const sitemapLinks = await page.$$eval("url loc", (elements) =>
@@ -36,10 +43,17 @@ async function checkLinks() {
3643
continue; // Skip if the link is empty
3744
}
3845

39-
await page.goto(link, {
40-
waitUntil: "networkidle0",
41-
timeout: navigationTimeout,
42-
});
46+
try {
47+
await page.goto(link, {
48+
waitUntil: "networkidle0",
49+
timeout: navigationTimeout,
50+
});
51+
} catch (e) {
52+
console.log(
53+
` WARNING: Error loading Dev Docs page: ${e.message}... Skipping.`,
54+
);
55+
continue;
56+
}
4357

4458
const pageLinks = await page.$$eval("a", (elements) =>
4559
elements.map((el) => el.href),
@@ -51,23 +65,32 @@ async function checkLinks() {
5165
}
5266

5367
if (
54-
pageLink.includes("developers.cloudflare.com/api/operations/") ||
55-
pageLink.startsWith("/api/operations/")
68+
pageLink.includes("developers.cloudflare.com/api/resources/") ||
69+
pageLink.startsWith("/api/resources/")
5670
) {
5771
console.log(`Evaluating link: ${pageLink}`);
58-
await page.goto(pageLink, {
59-
waitUntil: "networkidle0",
60-
timeout: navigationTimeout,
61-
});
62-
visitedLinks.push(pageLink);
63-
64-
const statusCode = await page.evaluate(() => {
65-
return {
66-
url: window.location.href,
67-
};
68-
});
69-
if (statusCode.url === "https://developers.cloudflare.com/api/") {
70-
brokenLinks.push(pageLink);
72+
73+
let response = null;
74+
75+
try {
76+
response = await page.goto(pageLink, {
77+
waitUntil: "networkidle0",
78+
timeout: navigationTimeout,
79+
});
80+
visitedLinks.push(pageLink);
81+
} catch (e) {
82+
console.log(
83+
` WARNING: Error loading API page: ${e.message}... Skipping.`,
84+
);
85+
continue;
86+
}
87+
88+
if (response) {
89+
if (response.status() === 404) {
90+
brokenLinks.push(pageLink);
91+
}
92+
} else {
93+
console.log(" WARNING: Didn't receive a response... skipping.");
7194
}
7295
}
7396
}

bin/fetch-warp-releases.js

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import fs from "fs";
2+
import YAML from "yaml";
3+
import { marked } from "marked";
4+
5+
const tracks = ["windows/ga", "windows/beta", "macos/ga", "macos/beta"];
6+
7+
const linesToRemove = [
8+
"For related Cloudflare for Teams documentation please see: https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp",
9+
"For Zero Trust documentation please see: https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp",
10+
"For related Consumer documentation please see: https://developers.cloudflare.com/warp-client/",
11+
"For Consumer documentation please see: https://developers.cloudflare.com/warp-client/",
12+
];
13+
14+
for (const track of tracks) {
15+
fetch(`https://downloads.cloudflareclient.com/v1/update/json/${track}`)
16+
.then((res) => res.json())
17+
.then((data) => {
18+
data.items.forEach((item) => {
19+
const path = `./src/content/warp-releases/${track}/${item.version}.yaml`;
20+
21+
if (fs.existsSync(path)) {
22+
console.log(`${track} ${item.version} already exists.`);
23+
return;
24+
}
25+
26+
console.log(`Saving ${track} ${item.version}.`);
27+
28+
let markdown = item.releaseNotes;
29+
30+
markdown.replace(/\r\n/g, "\n");
31+
32+
for (const line of linesToRemove) {
33+
markdown = markdown.replace(line, "");
34+
}
35+
36+
markdown = markdown.trim();
37+
38+
const tokens = marked.lexer(markdown);
39+
40+
marked.walkTokens(tokens, (token) => {
41+
if (token.type === "heading") {
42+
token.type = "strong";
43+
token.raw = `**${token.text}**\n`;
44+
45+
delete token.depth;
46+
}
47+
});
48+
49+
const releaseNotes = tokens.reduce((s, t) => s + t.raw, "");
50+
51+
fs.writeFileSync(
52+
`./src/content/warp-releases/${track}/${item.version}.yaml`,
53+
YAML.stringify({
54+
...item,
55+
releaseNotes,
56+
platformName: data.platformName,
57+
}),
58+
"utf-8",
59+
);
60+
});
61+
});
62+
}

0 commit comments

Comments
 (0)