From ab344f59dddf920b1e5cc8f03ede991529650edf Mon Sep 17 00:00:00 2001 From: James Ross Date: Tue, 1 Oct 2024 18:00:51 +0100 Subject: [PATCH 1/9] chore: core formatting checks --- .github/workflows/ci.yml | 4 ++-- package.json | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c24df4d685f2a1b..eb28b818ee79c65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,8 +37,8 @@ jobs: - run: npm ci - run: npm run check - ## TODO: formatting checks - + - run: npm run format:core:check + ## TODO: content formatting checks - run: npm run build env: NODE_OPTIONS: "--max-old-space-size=4192" diff --git a/package.json b/package.json index 419d1669d02d532..e131751e6ecd942 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,11 @@ "check:astro": "npm run sync && astro check", "check:functions": "npx tsc --noEmit -p ./functions/tsconfig.json", "dev": "npx astro dev", - "format": "npx prettier --write \"**/*.{js,jsx,ts,tsx,mjs,astro,css,json,yaml,yml}\"", + "format": "npm run format:core && npm run format:content && npm run format:data", + "format:core": "npx prettier --write \"**/*.{js,jsx,ts,tsx,mjs,css}\"", + "format:core:check": "npm run format:core -- --check", + "format:content": "npx prettier --write \"**/*.{md,mdx,astro}\"", + "format:data": "npx prettier --write \"**/*.{json,yaml,yml}\"", "postinstall": "npx patch-package && npm run sync", "preview": "npx astro preview", "start": "npx astro dev", From abcd051b59f9a2d7ae73c036c894826d8676f1ca Mon Sep 17 00:00:00 2001 From: James Ross Date: Tue, 1 Oct 2024 18:01:00 +0100 Subject: [PATCH 2/9] chore: format left-over files --- .github/workflows/semgrep.yml | 5 +- .prettierignore | 1 + src/asides.css | 3 +- .../changelogs/magic-network-monitoring.yaml | 2 +- src/content/changelogs/rules.yaml | 6 +- src/content/changelogs/security-center.yaml | 4 +- src/content/changelogs/zaraz.yaml | 249 +++++++++--------- src/content/glossary/durable-objects.yaml | 94 +++---- src/content/plans/index.json | 56 ++-- src/content/products/images.yaml | 3 +- src/content/products/key-transparency.yaml | 3 +- src/schemas/types/badge.ts | 19 +- 12 files changed, 223 insertions(+), 222 deletions(-) diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index c821e5a54456c42..94b394b02744375 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -1,13 +1,12 @@ - on: pull_request: {} workflow_dispatch: {} - push: + push: branches: - main - master schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" name: Semgrep config jobs: semgrep: diff --git a/.prettierignore b/.prettierignore index 502980c2b41d488..dd5da9e52bb9dd1 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,3 +4,4 @@ dist .github/CODEOWNERS public/_redirects public/analytics/static/downloads/main.css +src/content/workers-ai-models/*.json diff --git a/src/asides.css b/src/asides.css index 71751b68cc447f1..2760fbcdb7aa94f 100644 --- a/src/asides.css +++ b/src/asides.css @@ -8,7 +8,6 @@ &.starlight-aside--caution { background-color: rgb(255, 248, 228); - } .starlight-aside__title { @@ -33,4 +32,4 @@ .starlight-aside--caution { background-color: rgb(98, 73, 10); } -} \ No newline at end of file +} diff --git a/src/content/changelogs/magic-network-monitoring.yaml b/src/content/changelogs/magic-network-monitoring.yaml index 4e751d11d258311..b93b4ee236d8aeb 100644 --- a/src/content/changelogs/magic-network-monitoring.yaml +++ b/src/content/changelogs/magic-network-monitoring.yaml @@ -8,4 +8,4 @@ entries: - publish_date: "2024-09-24" title: Magic Network Monitoring free version available to all customers description: |- - The free version of Magic Network Monitoring (MNM) is now available to everyone with a Cloudflare account by default. \ No newline at end of file + The free version of Magic Network Monitoring (MNM) is now available to everyone with a Cloudflare account by default. diff --git a/src/content/changelogs/rules.yaml b/src/content/changelogs/rules.yaml index 466c3a9ec759832..72898033d01b0e3 100644 --- a/src/content/changelogs/rules.yaml +++ b/src/content/changelogs/rules.yaml @@ -5,11 +5,11 @@ productLink: "/rules/" productArea: Application performance productAreaLink: /fundamentals/reference/changelog/performance/ entries: - - publish_date: "2024-09-20" + - publish_date: "2024-09-20" title: Automatic DNS Validation for Cloudflare Rules - description: |- + description: |- The Cloudflare dashboard now automatically validates [DNS records](/dns/manage-dns-records/reference/proxied-dns-records/) and [Cloudflare for SaaS custom hostnames](/cloudflare-for-platforms/cloudflare-for-saas/domain-support/) for rules targeting specific hostnames or URLs. To prevent misconfigured rules and ensure smoother deployments, you will get proactive warnings for missing or misconfigured DNS records and custom hostnames. - + - publish_date: "2024-09-17" title: Compression Rules available to all plans with Zstandard support description: |- diff --git a/src/content/changelogs/security-center.yaml b/src/content/changelogs/security-center.yaml index 28c72f8e3781246..25767c4fa67b51f 100644 --- a/src/content/changelogs/security-center.yaml +++ b/src/content/changelogs/security-center.yaml @@ -11,8 +11,8 @@ entries: - publish_date: "2024-09-19" description: |- - - Customers can now create a `security.txt` file file to provide the security research team with a standardized way to report vulnerabilities. + - Customers can now create a `security.txt` file file to provide the security research team with a standardized way to report vulnerabilities. - publish_date: "2024-09-23" description: |- - - Customers can now export all matches from a saved query. Select your **Query name** > select the three dots > **Export matches**. \ No newline at end of file + - Customers can now export all matches from a saved query. Select your **Query name** > select the three dots > **Export matches**. diff --git a/src/content/changelogs/zaraz.yaml b/src/content/changelogs/zaraz.yaml index 32ede559bad3823..4bd133694cb09dc 100644 --- a/src/content/changelogs/zaraz.yaml +++ b/src/content/changelogs/zaraz.yaml @@ -5,128 +5,127 @@ productLink: "/zaraz/" productArea: Developer platform productAreaLink: /workers/platform/changelog/platform/ entries: -- publish_date: '2024-09-17' - description: | - * **Automatic Actions**: E-commerce support is now integrated with Automatic Actions - * **Consent Management**: Support styling the Consent Modal when CSP is enabled - * **Consent Management**: Fix an issue that could cause tools to load before consent was granted when TCF is enabled - * **Zaraz Debugger**: Remove redundant messages related to empty values - * **Amplitude Managed Component**: Respect the EU endpoint setting -- publish_date: '2024-08-23' - description: | - * **Automatic Actions**: Automatic Event Tracking is now fully available - * **Consent Management**: Fixed issues with rendering the Consent modal on iOS - * **Zaraz Debugger**: Remove redundant messages related to `__zarazEcommerce` - * **Zaraz Debugger**: Fixed bug that prevented the debugger to load when certain Custom HTML tools were used -- publish_date: '2024-08-15' - description: | - * **Automatic Actions**: Automatic Pageview tracking is now fully available - * **Google Analytics 4**: Support Google Consent signals when using e-commerce tracking - * **HTTP Events API**: Ignore bot score detection on the HTTP Events API endpoint - * **Zaraz Debugger**: Show client-side network requests initiated by Managed Components -- publish_date: '2024-08-12' - description: | - * **Automatic Actions**: New tools now support Automatic Pageview tracking - * **HTTP Events API**: Respect Google consent signals -- publish_date: '2024-07-23' - description: |- - * **Embeds**: Add support for server-side rendering of X (Twitter) and Instagram embeds - * **CSP Compliance**: Remove `eval` dependency - * **Google Analytics 4 Managed Component**: Allow customizing the document title and client ID fields - * **Custom HTML Managed Component**: Scripts included in a Custom HTML will preserve their running order - * **Google Ads Managed Component**: Allow linking data with Google Analytics 4 instances - * **TikTok Managed Component**: Use the new TikTok Events API v2 - * **Reddit Managed Component**: Support custom events - * **Twitter Managed Component**: Support setting the `event_id`, using custom fields, and improve conversion tracking - * **Bugfix**: Cookie life-time cannot exceed one year anymore - * **Bugfix**: Zaraz Debugger UI does not break when presenting really long lines of information -- publish_date: '2024-06-21' - description: |- - * **Dashboard**: Add an option to disable the automatic `Pageview` event -- publish_date: '2024-06-18' - description: |- - * **Amplitude Managed Component**: Allow users to choose data center - * **Bing Managed Component**: Fix e-commerce events handling - * **Google Analytics 4 Managed Component**: Mark e-commerce events as conversions - * **Consent Management**: Fix IAB Consent Mode tools not showing with purposes -- publish_date: '2024-05-03' - description: |- - * **Dashboard**: Add setting for Google Consent mode default - * **Bugfix**: Cookie values are now decoded - * **Bugfix**: Ensure context enricher worker can access the `context.system.consent` object - * **Google Ads Managed Component**: Add conversion linker on pageviews without sending a pageview event - * **Pinterest Conversion API Managed Component**: Bugfix handling of partial e-commerce event payloads -- publish_date: '2024-04-19' - description: |- - * **Instagram Managed Component**: Improve performance of Instagram embeds - * **Mixpanel Managed Component**: Include `gclid` and `fbclid` values in Mixpanel requests if available - * **Consent Management**: Ensure consent platform is enabled when using IAB TCF compliant mode when there's at least one TCF-approved vendor configured - * **Bugfix**: Ensure track data payload keys take priority over preset-keys when using enrich-payload feature for custom actions -- publish_date: '2024-04-08' - description: |- - * **Consent Management**: Add `consent` object to `context.system` for finer control over consent preferences - * **Consent Management**: Add support for IAB-compliant consent mode - * **Consent Management**: Add "zarazConsentChoicesUpdated" event - * **Consent Management**: Modal now respects system dark mode prefs when present - * **Google Analytics 4 Managed Component**: Add support for Google Consent Mode v2 - * **Google Ads Managed Component**: Add support for Google Consent Mode v2 - * **Twitter Managed Component**: Enable tweet embeds - * **Bing Managed Component**: Support running without setting cookies - * **Bugfix**: `client.get` for Custom Managed Components fixed - * **Bugfix**: Prevent duplicate pageviews in monitoring after consent granting - * **Bugfix**: Prevent Managed Component routes from blocking origin routes unintentionally -- publish_date: '2024-02-15' - - description: |- - * **Single Page Applications**: Introduce `zaraz.spaPageview()` for manually triggering SPA pageviews - * **Pinterest Managed Component**: Add ecommerce support - * **Google Ads Managed Component**: Append url and rnd params to pagead/landing endpoint - * **Bugfix**: Add noindex robots headers for Zaraz GET endpoint responses - * **Bugfix**: Gracefully handle responses from custom Managed Components without mapped endpoints -- publish_date: '2024-02-05' - description: |- - * **Dashboard**: rename "tracks" to "events" for consistency - * **Pinterest Conversion API Managed Component**: update parameters sent to api - * **HTTP Managed Component**: update _settings prefix usage handling - * **Bugfix**: better minification of client-side js - * **Bugfix**: fix bug where anchor link click events were not bubbling when using click listener triggers - * **API update**: begin migration support from deprecated `tool.neoEvents` array to `tool.actions` object config schema migration -- publish_date: '2023-12-19' - description: |- - * **Google Analytics 4 Managed Component**: Fix Google Analytics 4 average engagement time metric. -- publish_date: '2023-11-13' - description: |- - * **HTTP Request Managed Component**: Re-added `__zarazTrack` property. -- publish_date: '2023-10-31' - description: |- - * **Google Analytics 4 Managed Component**: Remove `debug_mode` key if falsy or `false`. -- publish_date: '2023-10-26' - description: |- - * **Custom HTML**: Added support for non-JavaScript script tags. -- publish_date: '2023-10-20' - description: |- - * **Bing Managed Component**: Fixed an issue where some events were not being sent to Bing even after being triggered. - * **Dashboard**: Improved welcome screen for new Zaraz users. -- publish_date: '2023-10-03' - description: |- - * **Bugfix**: Fixed an issue that prevented some server-side requests from arriving to their destination - * **Google Analytics 4 Managed Component**: Add support for `dbg` and `ir` fields. -- publish_date: '2023-09-13' - description: |- - * **Consent Management**: Add support for custom button translations. - * **Consent Management**: Modal stays fixed when scrolling. - * **Google Analytics 4 Managed Component**: `hideOriginalIP` and `ga-audiences` can be set from tool event. -- publish_date: '2023-09-11' - description: |- - * **Reddit Managed Component**: Support new "Account ID" formats (e.g. "ax_xxxxx"). -- publish_date: '2023-09-06' - description: |- - * **Consent Management**: Consent cookie name can now be customized. -- publish_date: '2023-09-05' - description: |- - * **Segment Managed Component**: API Endpoint can be customized. -- publish_date: '2023-08-21' - description: |- - * **TikTok Managed Component**: Support setting `ttp` and `event_id`. - * **Consent Management**: Accessibility improvements. - * **Facebook Managed Component**: Support for using "Limited Data Use" features. + - publish_date: "2024-09-17" + description: | + * **Automatic Actions**: E-commerce support is now integrated with Automatic Actions + * **Consent Management**: Support styling the Consent Modal when CSP is enabled + * **Consent Management**: Fix an issue that could cause tools to load before consent was granted when TCF is enabled + * **Zaraz Debugger**: Remove redundant messages related to empty values + * **Amplitude Managed Component**: Respect the EU endpoint setting + - publish_date: "2024-08-23" + description: | + * **Automatic Actions**: Automatic Event Tracking is now fully available + * **Consent Management**: Fixed issues with rendering the Consent modal on iOS + * **Zaraz Debugger**: Remove redundant messages related to `__zarazEcommerce` + * **Zaraz Debugger**: Fixed bug that prevented the debugger to load when certain Custom HTML tools were used + - publish_date: "2024-08-15" + description: | + * **Automatic Actions**: Automatic Pageview tracking is now fully available + * **Google Analytics 4**: Support Google Consent signals when using e-commerce tracking + * **HTTP Events API**: Ignore bot score detection on the HTTP Events API endpoint + * **Zaraz Debugger**: Show client-side network requests initiated by Managed Components + - publish_date: "2024-08-12" + description: | + * **Automatic Actions**: New tools now support Automatic Pageview tracking + * **HTTP Events API**: Respect Google consent signals + - publish_date: "2024-07-23" + description: |- + * **Embeds**: Add support for server-side rendering of X (Twitter) and Instagram embeds + * **CSP Compliance**: Remove `eval` dependency + * **Google Analytics 4 Managed Component**: Allow customizing the document title and client ID fields + * **Custom HTML Managed Component**: Scripts included in a Custom HTML will preserve their running order + * **Google Ads Managed Component**: Allow linking data with Google Analytics 4 instances + * **TikTok Managed Component**: Use the new TikTok Events API v2 + * **Reddit Managed Component**: Support custom events + * **Twitter Managed Component**: Support setting the `event_id`, using custom fields, and improve conversion tracking + * **Bugfix**: Cookie life-time cannot exceed one year anymore + * **Bugfix**: Zaraz Debugger UI does not break when presenting really long lines of information + - publish_date: "2024-06-21" + description: |- + * **Dashboard**: Add an option to disable the automatic `Pageview` event + - publish_date: "2024-06-18" + description: |- + * **Amplitude Managed Component**: Allow users to choose data center + * **Bing Managed Component**: Fix e-commerce events handling + * **Google Analytics 4 Managed Component**: Mark e-commerce events as conversions + * **Consent Management**: Fix IAB Consent Mode tools not showing with purposes + - publish_date: "2024-05-03" + description: |- + * **Dashboard**: Add setting for Google Consent mode default + * **Bugfix**: Cookie values are now decoded + * **Bugfix**: Ensure context enricher worker can access the `context.system.consent` object + * **Google Ads Managed Component**: Add conversion linker on pageviews without sending a pageview event + * **Pinterest Conversion API Managed Component**: Bugfix handling of partial e-commerce event payloads + - publish_date: "2024-04-19" + description: |- + * **Instagram Managed Component**: Improve performance of Instagram embeds + * **Mixpanel Managed Component**: Include `gclid` and `fbclid` values in Mixpanel requests if available + * **Consent Management**: Ensure consent platform is enabled when using IAB TCF compliant mode when there's at least one TCF-approved vendor configured + * **Bugfix**: Ensure track data payload keys take priority over preset-keys when using enrich-payload feature for custom actions + - publish_date: "2024-04-08" + description: |- + * **Consent Management**: Add `consent` object to `context.system` for finer control over consent preferences + * **Consent Management**: Add support for IAB-compliant consent mode + * **Consent Management**: Add "zarazConsentChoicesUpdated" event + * **Consent Management**: Modal now respects system dark mode prefs when present + * **Google Analytics 4 Managed Component**: Add support for Google Consent Mode v2 + * **Google Ads Managed Component**: Add support for Google Consent Mode v2 + * **Twitter Managed Component**: Enable tweet embeds + * **Bing Managed Component**: Support running without setting cookies + * **Bugfix**: `client.get` for Custom Managed Components fixed + * **Bugfix**: Prevent duplicate pageviews in monitoring after consent granting + * **Bugfix**: Prevent Managed Component routes from blocking origin routes unintentionally + - publish_date: "2024-02-15" + description: |- + * **Single Page Applications**: Introduce `zaraz.spaPageview()` for manually triggering SPA pageviews + * **Pinterest Managed Component**: Add ecommerce support + * **Google Ads Managed Component**: Append url and rnd params to pagead/landing endpoint + * **Bugfix**: Add noindex robots headers for Zaraz GET endpoint responses + * **Bugfix**: Gracefully handle responses from custom Managed Components without mapped endpoints + - publish_date: "2024-02-05" + description: |- + * **Dashboard**: rename "tracks" to "events" for consistency + * **Pinterest Conversion API Managed Component**: update parameters sent to api + * **HTTP Managed Component**: update _settings prefix usage handling + * **Bugfix**: better minification of client-side js + * **Bugfix**: fix bug where anchor link click events were not bubbling when using click listener triggers + * **API update**: begin migration support from deprecated `tool.neoEvents` array to `tool.actions` object config schema migration + - publish_date: "2023-12-19" + description: |- + * **Google Analytics 4 Managed Component**: Fix Google Analytics 4 average engagement time metric. + - publish_date: "2023-11-13" + description: |- + * **HTTP Request Managed Component**: Re-added `__zarazTrack` property. + - publish_date: "2023-10-31" + description: |- + * **Google Analytics 4 Managed Component**: Remove `debug_mode` key if falsy or `false`. + - publish_date: "2023-10-26" + description: |- + * **Custom HTML**: Added support for non-JavaScript script tags. + - publish_date: "2023-10-20" + description: |- + * **Bing Managed Component**: Fixed an issue where some events were not being sent to Bing even after being triggered. + * **Dashboard**: Improved welcome screen for new Zaraz users. + - publish_date: "2023-10-03" + description: |- + * **Bugfix**: Fixed an issue that prevented some server-side requests from arriving to their destination + * **Google Analytics 4 Managed Component**: Add support for `dbg` and `ir` fields. + - publish_date: "2023-09-13" + description: |- + * **Consent Management**: Add support for custom button translations. + * **Consent Management**: Modal stays fixed when scrolling. + * **Google Analytics 4 Managed Component**: `hideOriginalIP` and `ga-audiences` can be set from tool event. + - publish_date: "2023-09-11" + description: |- + * **Reddit Managed Component**: Support new "Account ID" formats (e.g. "ax_xxxxx"). + - publish_date: "2023-09-06" + description: |- + * **Consent Management**: Consent cookie name can now be customized. + - publish_date: "2023-09-05" + description: |- + * **Segment Managed Component**: API Endpoint can be customized. + - publish_date: "2023-08-21" + description: |- + * **TikTok Managed Component**: Support setting `ttp` and `event_id`. + * **Consent Management**: Accessibility improvements. + * **Facebook Managed Component**: Support for using "Limited Data Use" features. diff --git a/src/content/glossary/durable-objects.yaml b/src/content/glossary/durable-objects.yaml index 9e50d215c757821..9beb9a1fa00da83 100644 --- a/src/content/glossary/durable-objects.yaml +++ b/src/content/glossary/durable-objects.yaml @@ -1,65 +1,65 @@ --- productName: Durable Objects entries: -- term: "Durable Objects" - general_definition: |- - The product name, or the collective noun referring to more than one Durable Object instance. + - term: "Durable Objects" + general_definition: |- + The product name, or the collective noun referring to more than one Durable Object instance. -- term: "Namespace" - general_definition: |- - A container for a collection of Durable Objects that all share the same Durable Object (class) definition. A single Namespace can have (tens of) millions of Durable Objects. Metrics are scoped per Namespace. + - term: "Namespace" + general_definition: |- + A container for a collection of Durable Objects that all share the same Durable Object (class) definition. A single Namespace can have (tens of) millions of Durable Objects. Metrics are scoped per Namespace. -- term: "Durable Object" - general_definition: |- - An individual Durable Object. A Durable Object is globally unique (referenced by ID), provides a global point of coordination for all methods/requests sent to it, and has private, persistent storage that is not shared with other Durable Objects within a Namespace. + - term: "Durable Object" + general_definition: |- + An individual Durable Object. A Durable Object is globally unique (referenced by ID), provides a global point of coordination for all methods/requests sent to it, and has private, persistent storage that is not shared with other Durable Objects within a Namespace. -- term: "Stub" - general_definition: |- - An object that refers to a unique Durable Object within a Namespace and allows you to call into that Durable Object via RPC methods or the `fetch` API. For example, `let stub = env.MY_DURABLE_OBJECT.get(id)` + - term: "Stub" + general_definition: |- + An object that refers to a unique Durable Object within a Namespace and allows you to call into that Durable Object via RPC methods or the `fetch` API. For example, `let stub = env.MY_DURABLE_OBJECT.get(id)` -- term: "actor" - general_definition: |- - A term referring to a unique Durable Object. + - term: "actor" + general_definition: |- + A term referring to a unique Durable Object. -- term: "instance" - general_definition: |- - See 'actor'. + - term: "instance" + general_definition: |- + See 'actor'. -- term: "Durable Object class" - general_definition: |- - The JavaScript class that defines the methods (RPC) and handlers (`fetch`, `alarm`) as part of your Durable Object, and/or an optional `constructor`. All Durable Objects within a single Namespace share the same class definition. + - term: "Durable Object class" + general_definition: |- + The JavaScript class that defines the methods (RPC) and handlers (`fetch`, `alarm`) as part of your Durable Object, and/or an optional `constructor`. All Durable Objects within a single Namespace share the same class definition. -- term: "Storage Backend" - general_definition: |- - By default, a Durable Object class can use Storage API that leverages a key-value storage backend. New Durable Object classes can opt-in to using a [SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend). + - term: "Storage Backend" + general_definition: |- + By default, a Durable Object class can use Storage API that leverages a key-value storage backend. New Durable Object classes can opt-in to using a [SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend). -- term: "Storage API" - general_definition: |- - The transactional and strongly consistent (serializable) [Storage API](/durable-objects/api/storage-api/) for persisting data within each Durable Object instance. State stored within a unique DO instance is "private" to that Durable Object, and not accessible from other Durable Objects. + - term: "Storage API" + general_definition: |- + The transactional and strongly consistent (serializable) [Storage API](/durable-objects/api/storage-api/) for persisting data within each Durable Object instance. State stored within a unique DO instance is "private" to that Durable Object, and not accessible from other Durable Objects. - Storage API includes key-value (KV) API, SQL API, and point-in-time-recovery (PITR) API. + Storage API includes key-value (KV) API, SQL API, and point-in-time-recovery (PITR) API. - - Durable Object classes with the key-value storage backend can use KV API. - - Durable Object classes with the SQLite storage backend can use KV API, SQL API, and PITR API. + - Durable Object classes with the key-value storage backend can use KV API. + - Durable Object classes with the SQLite storage backend can use KV API, SQL API, and PITR API. -- term: "KV API" - general_definition: |- - API methods part of Storage API that support persisting key-value data. + - term: "KV API" + general_definition: |- + API methods part of Storage API that support persisting key-value data. -- term: "SQL API" - general_definition: |- - API methods part of Storage API that support SQL querying. + - term: "SQL API" + general_definition: |- + API methods part of Storage API that support SQL querying. -- term: Migration - general_definition: |- - A Durable Object migration is a mapping process from a class name to a runtime state. - Initiate a Durable Object migration when you need to: + - term: Migration + general_definition: |- + A Durable Object migration is a mapping process from a class name to a runtime state. + Initiate a Durable Object migration when you need to: - - Create a new Durable Object class. - - Rename a Durable Object class. - - Delete a Durable Object class. - - Transfer an existing Durable Objects class. + - Create a new Durable Object class. + - Rename a Durable Object class. + - Delete a Durable Object class. + - Transfer an existing Durable Objects class. -- term: Alarm - general_definition: |- - A Durable Object alarm is a mechanism that allows you to schedule the Durable Object to be woken up at a time in the future. + - term: Alarm + general_definition: |- + A Durable Object alarm is a mechanism that allows you to schedule the Durable Object to be woken up at a time in the future. diff --git a/src/content/plans/index.json b/src/content/plans/index.json index 5b90eeb90c36ada..73ea13543dc07cf 100644 --- a/src/content/plans/index.json +++ b/src/content/plans/index.json @@ -2730,34 +2730,34 @@ "ent": "Yes" } } - }, - "client_certificates": { - "title": "Client Certificates", - "link": "/ssl/client-certificates/", - "properties": { - "availability": { - "title": "Availability", - "summary": "Available on all plans.", - "free": "Yes", - "pro": "Yes", - "biz": "Yes", - "ent": "Yes" - }, - "quantity": { - "title": "Client Certificates included, issued by a Cloudflare Managed CA", - "free": 100, - "pro": 100, - "biz": 100, - "ent": "100 (default), but can allocate more quota." - }, - "byo_ca": { - "title": "[Bring your own CA](/ssl/client-certificates/byo-ca/)", - "free": "No", - "pro": "No", - "biz": "No", - "ent": "Yes" - } - } + }, + "client_certificates": { + "title": "Client Certificates", + "link": "/ssl/client-certificates/", + "properties": { + "availability": { + "title": "Availability", + "summary": "Available on all plans.", + "free": "Yes", + "pro": "Yes", + "biz": "Yes", + "ent": "Yes" + }, + "quantity": { + "title": "Client Certificates included, issued by a Cloudflare Managed CA", + "free": 100, + "pro": 100, + "biz": 100, + "ent": "100 (default), but can allocate more quota." + }, + "byo_ca": { + "title": "[Bring your own CA](/ssl/client-certificates/byo-ca/)", + "free": "No", + "pro": "No", + "biz": "No", + "ent": "Yes" + } + } } }, "support": { diff --git a/src/content/products/images.yaml b/src/content/products/images.yaml index 35ef23265409eed..c46eb843df34f24 100644 --- a/src/content/products/images.yaml +++ b/src/content/products/images.yaml @@ -10,8 +10,7 @@ product: meta: title: Cloudflare Images docs - description: - Store, transform, optimize, and deliver images at scale. + description: Store, transform, optimize, and deliver images at scale. author: "@cloudflare" resources: diff --git a/src/content/products/key-transparency.yaml b/src/content/products/key-transparency.yaml index 4bd1a6ad33b55bf..b4c4ed2c66ee184 100644 --- a/src/content/products/key-transparency.yaml +++ b/src/content/products/key-transparency.yaml @@ -7,8 +7,7 @@ product: meta: title: Key Transparency Auditor - description: - Key Transparency Auditor docs + description: Key Transparency Auditor docs author: "@cloudflare" externals: diff --git a/src/schemas/types/badge.ts b/src/schemas/types/badge.ts index 31967cf0805ddd7..187c0add88a2f57 100644 --- a/src/schemas/types/badge.ts +++ b/src/schemas/types/badge.ts @@ -1,8 +1,10 @@ // Vendored from https://github.com/withastro/starlight/blob/a171a996b842f1fdb37a0bdbb2c9d86e1073e1a4/packages/starlight/schemas/badge.ts# -import { z } from 'astro:schema'; +import { z } from "astro:schema"; const badgeBaseSchema = z.object({ - variant: z.enum(['note', 'danger', 'success', 'caution', 'tip', 'default']).default('default'), + variant: z + .enum(["note", "danger", "success", "caution", "tip", "default"]) + .default("default"), class: z.string().optional(), }); @@ -16,7 +18,7 @@ const i18nBadgeSchema = badgeBaseSchema.extend({ export const BadgeComponentSchema = badgeSchema .extend({ - size: z.enum(['small', 'medium', 'large']).default('small'), + size: z.enum(["small", "medium", "large"]).default("small"), }) .passthrough(); @@ -26,15 +28,18 @@ export const BadgeConfigSchema = () => z .union([z.string(), badgeSchema]) .transform((badge) => { - if (typeof badge === 'string') { - return { variant: 'default' as const, text: badge }; + if (typeof badge === "string") { + return { variant: "default" as const, text: badge }; } return badge; }) .optional(); -export const I18nBadgeConfigSchema = () => z.union([z.string(), i18nBadgeSchema]).optional(); +export const I18nBadgeConfigSchema = () => + z.union([z.string(), i18nBadgeSchema]).optional(); export type Badge = z.output; export type I18nBadge = z.output; -export type I18nBadgeConfig = z.output>; +export type I18nBadgeConfig = z.output< + ReturnType +>; From a1c7d78dc11e801207dd8e8f227028eef72f9910 Mon Sep 17 00:00:00 2001 From: James Ross Date: Sat, 19 Oct 2024 17:51:34 +0100 Subject: [PATCH 3/9] chore: more formatting --- src/components/index.ts | 2 +- src/tooltips.css | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/index.ts b/src/components/index.ts index 88ff2baf89c1201..6ab9d98bcb329bb 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -50,7 +50,7 @@ export { default as ThreeCardGrid } from "./ThreeCardGrid.astro"; export { default as TroubleshootingList } from "./TroubleshootingList.astro"; export { default as TunnelCalculator } from "./TunnelCalculator.astro"; export { default as Type } from "./Type.astro"; -export { default as TypeScriptExample } from "./TypeScriptExample.astro" +export { default as TypeScriptExample } from "./TypeScriptExample.astro"; export { default as WorkersArchitectureDiagram } from "./WorkersArchitectureDiagram.astro"; export { default as WorkersIsolateDiagram } from "./WorkersIsolateDiagram.astro"; export { default as WorkerStarter } from "./WorkerStarter.astro"; diff --git a/src/tooltips.css b/src/tooltips.css index 7a732a06f29d4e0..fb22d581fcfec49 100644 --- a/src/tooltips.css +++ b/src/tooltips.css @@ -5,8 +5,8 @@ } .tippy-box { - background-color: var(--sl-color-bg-nav); - border-color: var(--sl-color-text); - border: 0.1em solid; - color: var(--sl-color-white); -} \ No newline at end of file + background-color: var(--sl-color-bg-nav); + border-color: var(--sl-color-text); + border: 0.1em solid; + color: var(--sl-color-white); +} From 6ce7a4b6db99cbdc1fdd432ebfa338f2a15e92f1 Mon Sep 17 00:00:00 2001 From: James Ross Date: Sat, 19 Oct 2024 17:56:03 +0100 Subject: [PATCH 4/9] chore: more formatting --- src/components/WorkersIsolateDiagram.astro | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/WorkersIsolateDiagram.astro b/src/components/WorkersIsolateDiagram.astro index ec476c03d58b152..269a89d1d6d7452 100644 --- a/src/components/WorkersIsolateDiagram.astro +++ b/src/components/WorkersIsolateDiagram.astro @@ -262,7 +262,11 @@ let range = (n: number) => [...Array(n).keys()]; right: 0; bottom: 0; left: 0; - background: color-mix(in srgb, var(--sl-color-accent-high) 25%, transparent); + background: color-mix( + in srgb, + var(--sl-color-accent-high) 25%, + transparent + ); } .ArchitectureDiagram--user-code { @@ -270,7 +274,11 @@ let range = (n: number) => [...Array(n).keys()]; z-index: 1; width: var(--user-code-size); height: var(--user-code-size); - background: color-mix(in srgb, var(--sl-color-accent-high) 90%, transparent); + background: color-mix( + in srgb, + var(--sl-color-accent-high) 90%, + transparent + ); } .ArchitectureDiagram--process-overhead-background, From 195e631265f0d116d7da003a40827f3b207c5a51 Mon Sep 17 00:00:00 2001 From: James Ross Date: Fri, 25 Oct 2024 16:34:23 +0100 Subject: [PATCH 5/9] chore: format more --- .github/workflows/semgrep.yml | 3 +- .prettierignore | 1 + src/components/Flex.astro | 4 +- src/components/Stream.astro | 13 ++- src/content/changelogs/logs.yaml | 4 - src/content/changelogs/magic-firewall.yaml | 2 +- src/content/changelogs/spectrum.yaml | 6 +- src/content/changelogs/workers.yaml | 2 +- src/content/glossary/cloudflare-one.yaml | 2 +- src/content/glossary/durable-objects.yaml | 94 +++++++++---------- src/content/glossary/workflows.yaml | 30 +++--- src/content/plans/index.json | 2 +- .../products/google-tag-first-party-mode.yaml | 5 +- src/content/products/workflows.yaml | 2 +- src/content/videos/index.yaml | 8 +- 15 files changed, 86 insertions(+), 92 deletions(-) diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index b56dd23c14d67e0..641dea1cbb7aa78 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -1,9 +1,8 @@ - on: pull_request: {} workflow_dispatch: {} schedule: - - cron: '0 4 * * *' + - cron: "0 4 * * *" name: Semgrep config jobs: semgrep: diff --git a/.prettierignore b/.prettierignore index dd5da9e52bb9dd1..02240f63ff088dc 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,3 +5,4 @@ dist public/_redirects public/analytics/static/downloads/main.css src/content/workers-ai-models/*.json +tests/fixtures/*.json diff --git a/src/components/Flex.astro b/src/components/Flex.astro index ba0b5ad2c706b0c..e3d03f3928a2f62 100644 --- a/src/components/Flex.astro +++ b/src/components/Flex.astro @@ -1,3 +1,3 @@
- -
\ No newline at end of file + + diff --git a/src/components/Stream.astro b/src/components/Stream.astro index b68eab31d535a91..3deeda6e54d2ac3 100644 --- a/src/components/Stream.astro +++ b/src/components/Stream.astro @@ -14,11 +14,13 @@ const url = new URL(`${videoId}/iframe`, baseUrl); url.searchParams.set("preload", "true"); url.searchParams.set("letterboxColor", "transparent"); - // full url option if (thumbnailTimeOrURL !== undefined) { if (!thumbnailTimeOrURL.startsWith("http")) { - const thumbnailUrl = new URL(`${videoId}/thumbnails/thumbnail.jpg`, baseUrl); + const thumbnailUrl = new URL( + `${videoId}/thumbnails/thumbnail.jpg`, + baseUrl, + ); thumbnailUrl.searchParams.set("fit", "crop"); thumbnailUrl.searchParams.set("time", thumbnailTimeOrURL); @@ -27,7 +29,6 @@ if (thumbnailTimeOrURL !== undefined) { url.searchParams.set("poster", thumbnailTimeOrURL); } } - ---
@@ -37,9 +38,11 @@ if (thumbnailTimeOrURL !== undefined) { allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true" title={videoTitle} - id={videoId}> + id={videoId}>
-Watch more videos on our Developer Channel +Watch more videos on our Developer Channel