Skip to content

Commit ae78d2f

Browse files
ranbelKianNH
andauthored
[ZT] WARP app center replacement (#19286)
* [Docs Site] Add WARPReleases component and collection * reformat Downloads page * add sample windows content * experimenting with macOS styling * add support note * undo experiment, keep collapsed beta * load releases from API * update Windows GA release notes * update macOS GA release notes * update macOS beta release notes * update Windows beta release notes * update beta page * update WARPRelease header * backfill releases * edit download link text * linux GA releases * Remove dashboard reference The dashboard link will just direct users to this page. * optional date on linux, fix date rendering * fix comma in lockfile * fix check error --------- Co-authored-by: Kian Newman-Hazel <[email protected]> Co-authored-by: Kian <[email protected]>
1 parent 5e5cd8b commit ae78d2f

File tree

210 files changed

+6327
-12
lines changed

Some content is hidden

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

210 files changed

+6327
-12
lines changed

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+
}

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"playwright": "^1.49.1",
7474
"prettier": "^3.4.2",
7575
"prettier-plugin-astro": "^0.14.1",
76+
"pretty-bytes": "6.1.1",
7677
"prettier-plugin-tailwindcss": "^0.6.9",
7778
"puppeteer": "^24.0.0",
7879
"react": "^18.3.1",

src/components/WARPRelease.astro

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
import Details from "./Details.astro";
3+
import { marked } from "marked";
4+
import { z } from "astro:schema";
5+
import prettyBytes from "pretty-bytes";
6+
import { warpReleasesSchema } from "~/schemas";
7+
8+
type Props = z.infer<typeof props>;
9+
10+
const props = z.object({
11+
header: z.string(),
12+
open: z.boolean().optional(),
13+
release: warpReleasesSchema,
14+
});
15+
16+
const { header, open, release } = props.parse(Astro.props);
17+
---
18+
19+
<Details header={header} open={open}>
20+
<p>
21+
<div class="flex gap-2">
22+
<span>
23+
<strong>Version: </strong>
24+
{release.platformName}
25+
{release.version}
26+
</span>
27+
<span>
28+
<strong>Date: </strong>
29+
{release.releaseDate.toISOString().split("T")[0]}
30+
</span>
31+
{
32+
release.packageSize && (
33+
<span>
34+
<strong>Size: </strong>
35+
{prettyBytes(release.packageSize)}
36+
</span>
37+
)
38+
}
39+
</div>
40+
<span>
41+
<a href={release.packageURL}>Download</a>
42+
</span>
43+
</p>
44+
<p>
45+
<span>
46+
<h4>Release notes</h4>
47+
</span>
48+
<Fragment set:html={marked.parse(release.releaseNotes)} />
49+
</p>
50+
</Details>

src/components/WARPReleases.astro

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
import WARPRelease from "./WARPRelease.astro";
3+
import Details from "./Details.astro";
4+
import { getCollection } from "astro:content";
5+
import { z } from "astro:schema";
6+
import { sub } from "date-fns";
7+
8+
type Props = z.infer<typeof props>;
9+
10+
const props = z.object({
11+
track: z.enum([
12+
"windows/ga",
13+
"windows/beta",
14+
"macos/ga",
15+
"macos/beta",
16+
"linux/ga",
17+
]),
18+
});
19+
20+
const { track } = props.parse(Astro.props);
21+
22+
const sortByDate = (a: any, b: any) =>
23+
b.releaseDate.getTime() - a.releaseDate.getTime();
24+
25+
const entries = await getCollection("warp-releases", (release) => {
26+
if (!release.id.startsWith(track)) return false;
27+
28+
const oneYearAgo = sub(new Date(), {
29+
years: 1,
30+
});
31+
32+
if (release.data.releaseDate.getTime() < oneYearAgo.getTime()) return false;
33+
34+
return true;
35+
});
36+
37+
const releases = entries.map((x) => x.data);
38+
39+
releases.sort(sortByDate);
40+
41+
const latestRelease = releases.at(0);
42+
43+
if (!latestRelease) {
44+
throw new Error();
45+
}
46+
47+
const platform = latestRelease.platformName;
48+
---
49+
50+
<WARPRelease header="Latest release" open={true} release={latestRelease} />
51+
52+
<Details header=`Previous version history (${releases.length - 1})`>
53+
{
54+
releases
55+
.slice(1)
56+
.sort(sortByDate)
57+
.map((release) => (
58+
<WARPRelease
59+
header={`${platform} ${release.version}`}
60+
release={release}
61+
/>
62+
))
63+
}
64+
</Details>

src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export { default as TunnelCalculator } from "./TunnelCalculator.astro";
5454
export { default as Type } from "./Type.astro";
5555
export { default as TypeScriptExample } from "./TypeScriptExample.astro";
5656
export { default as WranglerConfig } from "./WranglerConfig.astro";
57+
export { default as WARPReleases } from "./WARPReleases.astro";
5758
export { default as WorkersArchitectureDiagram } from "./WorkersArchitectureDiagram.astro";
5859
export { default as WorkersIsolateDiagram } from "./WorkersIsolateDiagram.astro";
5960
export { default as WorkerStarter } from "./WorkerStarter.astro";

src/content/config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
glossarySchema,
1313
learningPathsSchema,
1414
videosSchema,
15+
warpReleasesSchema,
1516
workersAiSchema,
1617
changelogsNextSchema,
1718
fieldsSchema,
@@ -77,6 +78,10 @@ export const collections = {
7778
schema: appsSchema,
7879
type: "data",
7980
}),
81+
"warp-releases": defineCollection({
82+
schema: warpReleasesSchema,
83+
type: "data",
84+
}),
8085
"changelogs-next": defineCollection({
8186
schema: changelogsNextSchema,
8287
}),
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
pcx_content_type: reference
3+
title: Beta releases
4+
sidebar:
5+
order: 3
6+
---
7+
8+
import { Render, Details, WARPReleases } from "~/components";
9+
10+
Cloudflare tests new WARP features and improvements in an unstable beta release before adding them to the stable release. To get early access to new features, download the latest beta client from the links below.
11+
12+
## Windows
13+
14+
<Render file="warp/system-requirements/windows" />
15+
16+
<WARPReleases track="windows/beta" />
17+
18+
## macOS
19+
20+
<Render file="warp/system-requirements/macos" />
21+
22+
<WARPReleases track="macos/beta" />

src/content/docs/cloudflare-one/connections/connect-devices/warp/download-warp/index.mdx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,30 @@ pcx_content_type: reference
33
title: Download WARP
44
sidebar:
55
order: 2
6+
label: Stable releases
67
---
78

8-
import { Render } from "~/components";
9+
import { Render, Details, WARPReleases } from "~/components";
910

10-
You can download the WARP client from Zero Trust. To do that, go to **Settings** > **Resources** and scroll down to **Download the WARP client**.
11-
12-
Alternatively, download the client from one of the following links after checking requirements:
11+
Download the WARP client from one of the following links after checking requirements.
1312

1413
## Windows
1514

1615
<Render file="warp/system-requirements/windows" />
1716

18-
**[Latest Windows Release](https://downloads.cloudflareclient.com/v1/download/windows/ga)**
19-
20-
**[Latest Windows Beta](https://downloads.cloudflareclient.com/v1/download/windows/beta)**
17+
<WARPReleases track="windows/ga" />
2118

2219
## macOS
2320

2421
<Render file="warp/system-requirements/macos" />
2522

26-
**[Latest macOS Release](https://downloads.cloudflareclient.com/v1/download/macos/ga)**
27-
28-
**[Latest macOS Beta](https://downloads.cloudflareclient.com/v1/download/macos/beta)**
23+
<WARPReleases track="macos/ga" />
2924

3025
## Linux
3126

3227
<Render file="warp/system-requirements/linux" />
3328

34-
**[Package repository](https://pkg.cloudflareclient.com/)**
29+
<WARPReleases track="linux/ga" />
3530

3631
## iOS
3732

@@ -44,6 +39,7 @@ Alternatively, download the client from one of the following links after checkin
4439
:::note[Migrate from 1.1.1.1]
4540

4641
The legacy iOS client, [1.1.1.1: Faster Internet](https://apps.apple.com/us/app/1-1-1-1-faster-internet/id1423538627), has been replaced by the Cloudflare One Agent. Learn more in our [migration guide](/cloudflare-one/connections/connect-devices/warp/download-warp/cloudflare-one-agent-migration/).
42+
4743
:::
4844

4945
## Android
@@ -57,6 +53,7 @@ The legacy iOS client, [1.1.1.1: Faster Internet](https://apps.apple.com/us/app/
5753
:::note[Migrate from 1.1.1.1]
5854

5955
The legacy Android client, [1.1.1.1 + WARP: Safer Internet](https://play.google.com/store/apps/details?id=com.cloudflare.onedotonedotonedotone), has been replaced by the Cloudflare One Agent. Learn more in our [migration guide](/cloudflare-one/connections/connect-devices/warp/download-warp/cloudflare-one-agent-migration/).
56+
6057
:::
6158

6259
## ChromeOS
@@ -65,4 +62,4 @@ The legacy Android client, [1.1.1.1 + WARP: Safer Internet](https://play.google.
6562
| -------------- | ----------------------------------- |
6663
| **OS version** | Chromebooks manufactured after 2019 |
6764

68-
Chromebooks are supported by our Android app. All Chromebooks made after 2019 should fully support our Android app. If you have a Chromebook made before 2019, [refer to this list](https://www.chromium.org/chromium-os/chrome-os-systems-supporting-android-apps/) to verify that your device is supported.
65+
Chromebooks are supported by our [Android app](#android). All Chromebooks made after 2019 should fully support our Android app. If you have a Chromebook made before 2019, [refer to this list](https://www.chromium.org/chromium-os/chrome-os-systems-supporting-android-apps/) to verify that your device is supported.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
releaseNotes: |
2+
This release contains reliability improvements and general bug fixes.
3+
4+
**Changes and improvements**
5+
- Fixed an issue where SSH sessions and other connections ould drop when a device that is using MASQUE changes its primary network interface.
6+
- Device posture client certificate checks now support PKCS#1.
7+
- Fixed an issue to ensure the Cloudflare root certificate (or custom certificate) is installed in the trust store if not already there.
8+
- Reduced unnecessary log messages when `resolv.conf` has no owner.
9+
- Fixed an issue with `warp-diag` printing benign TLS certificate errors.
10+
- Fixed an issue with the WARP client becoming unresponsive during startup.
11+
- Extended diagnostics collection time in `warp-diag` to ensure logs are captured reliably.
12+
- Fixed an issue that was preventing proper operation of DNS-over-TLS (DoT) for consumer users.
13+
14+
version: 2024.11.309.0
15+
releaseDate: 2024-11-18
16+
packageURL: https://pkg.cloudflareclient.com/
17+
platformName: Linux

0 commit comments

Comments
 (0)