From 61c11ed268a9d620beb9d702009e8ac2924792b2 Mon Sep 17 00:00:00 2001 From: Andy Jessop Date: Tue, 4 Feb 2025 09:35:15 +0100 Subject: [PATCH 1/6] chore: move Local Development up to top level in Workers docs --- .idea/codeStyles/Project.xml | 62 ++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 + .idea/prettier.xml | 6 + .idea/vcs.xml | 6 + .idea/workspace.xml | 112 ++++++++++++++++++ src/content/docs/workers/ci-cd/index.mdx | 2 +- .../docs/workers/configuration/index.mdx | 2 +- src/content/docs/workers/databases/index.mdx | 2 +- src/content/docs/workers/demos.mdx | 2 +- src/content/docs/workers/examples/index.mdx | 2 +- src/content/docs/workers/frameworks/index.mdx | 2 +- src/content/docs/workers/glossary.mdx | 2 +- src/content/docs/workers/languages/index.mdx | 2 +- .../{testing => }/local-development.mdx | 2 +- .../docs/workers/observability/index.mdx | 2 +- src/content/docs/workers/platform/index.mdx | 2 +- src/content/docs/workers/playground.mdx | 2 +- src/content/docs/workers/reference/index.mdx | 2 +- .../docs/workers/runtime-apis/index.mdx | 2 +- .../docs/workers/static-assets/index.mdx | 2 +- src/content/docs/workers/testing/index.mdx | 2 +- src/content/docs/workers/tutorials/index.mdx | 2 +- 22 files changed, 208 insertions(+), 17 deletions(-) create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/prettier.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml rename src/content/docs/workers/{testing => }/local-development.mdx (99%) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 000000000000000..3d4f1e1fe6ac896 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 000000000000000..79ee123c2b23e06 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml new file mode 100644 index 000000000000000..b0c1c68fbbad6b1 --- /dev/null +++ b/.idea/prettier.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000000000..35eb1ddfbbc029b --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 000000000000000..396a796737e98e1 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + "lastFilter": { + "state": "OPEN", + "assignee": "andyjessop" + } +} + { + "selectedUrlAndAccountId": { + "url": "git@github.com:cloudflare/cloudflare-docs.git", + "accountId": "b27fdc60-e604-48ac-ba60-f57217c27162" + } +} + { + "associatedIndex": 4 +} + + + + + + + + + + + + + + + + + + + + 1734593858363 + + + + + + + \ No newline at end of file diff --git a/src/content/docs/workers/ci-cd/index.mdx b/src/content/docs/workers/ci-cd/index.mdx index ae936ee0273a91e..b819b3d0bc98828 100644 --- a/src/content/docs/workers/ci-cd/index.mdx +++ b/src/content/docs/workers/ci-cd/index.mdx @@ -3,7 +3,7 @@ pcx_content_type: concept title: CI/CD description: Set up continuous integration and continuous deployment for your Workers. sidebar: - order: 8 + order: 9 --- You can set up continuous integration and continuous deployment (CI/CD) for your Workers by using either the integrated build system, [Workers Builds](#workers-builds), or using [external providers](#external-cicd) to optimize your development workflow. diff --git a/src/content/docs/workers/configuration/index.mdx b/src/content/docs/workers/configuration/index.mdx index d970bb963befade..ac54c931a9bef06 100644 --- a/src/content/docs/workers/configuration/index.mdx +++ b/src/content/docs/workers/configuration/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Configuration sidebar: - order: 7 + order: 8 group: hideIndex: true --- diff --git a/src/content/docs/workers/databases/index.mdx b/src/content/docs/workers/databases/index.mdx index d3d01ad139b6f26..df58c580329c337 100644 --- a/src/content/docs/workers/databases/index.mdx +++ b/src/content/docs/workers/databases/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Databases sidebar: - order: 12 + order: 13 group: hideIndex: true --- diff --git a/src/content/docs/workers/demos.mdx b/src/content/docs/workers/demos.mdx index d6ac6d70ce42362..b2d57d598b45917 100644 --- a/src/content/docs/workers/demos.mdx +++ b/src/content/docs/workers/demos.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Demos and architectures sidebar: - order: 5 + order: 6 --- diff --git a/src/content/docs/workers/examples/index.mdx b/src/content/docs/workers/examples/index.mdx index d9d3b9628e60267..b50b6d5b2022ad0 100644 --- a/src/content/docs/workers/examples/index.mdx +++ b/src/content/docs/workers/examples/index.mdx @@ -4,7 +4,7 @@ hideChildren: true pcx_content_type: navigation title: Examples sidebar: - order: 3 + order: 4 --- import { GlossaryTooltip, ListExamples } from "~/components"; diff --git a/src/content/docs/workers/frameworks/index.mdx b/src/content/docs/workers/frameworks/index.mdx index d039d2914b6d77e..9d3a79524465e1d 100644 --- a/src/content/docs/workers/frameworks/index.mdx +++ b/src/content/docs/workers/frameworks/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Frameworks sidebar: - order: 11 + order: 12 group: badge: Beta head: [] diff --git a/src/content/docs/workers/glossary.mdx b/src/content/docs/workers/glossary.mdx index 9eeddd269612bc5..e7b8fd54d4643a8 100644 --- a/src/content/docs/workers/glossary.mdx +++ b/src/content/docs/workers/glossary.mdx @@ -2,7 +2,7 @@ title: Glossary pcx_content_type: glossary sidebar: - order: 19 + order: 20 --- import { Glossary } from "~/components"; diff --git a/src/content/docs/workers/languages/index.mdx b/src/content/docs/workers/languages/index.mdx index 22067b572d16250..45550457d559d93 100644 --- a/src/content/docs/workers/languages/index.mdx +++ b/src/content/docs/workers/languages/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Languages sidebar: - order: 16 + order: 17 head: [] description: Languages supported on Workers, a polyglot platform. --- diff --git a/src/content/docs/workers/testing/local-development.mdx b/src/content/docs/workers/local-development.mdx similarity index 99% rename from src/content/docs/workers/testing/local-development.mdx rename to src/content/docs/workers/local-development.mdx index 00e608b7c078201..e03a65a80f18018 100644 --- a/src/content/docs/workers/testing/local-development.mdx +++ b/src/content/docs/workers/local-development.mdx @@ -2,7 +2,7 @@ title: Local development pcx_content_type: concept sidebar: - order: 2 + order: 5 head: [] description: Develop your Workers locally via Wrangler. --- diff --git a/src/content/docs/workers/observability/index.mdx b/src/content/docs/workers/observability/index.mdx index 0c039e33a104cd7..d68b9994d389212 100644 --- a/src/content/docs/workers/observability/index.mdx +++ b/src/content/docs/workers/observability/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Observability sidebar: - order: 14 + order: 15 group: hideIndex: true --- diff --git a/src/content/docs/workers/platform/index.mdx b/src/content/docs/workers/platform/index.mdx index effff15d9332d18..50de4fc6f988f23 100644 --- a/src/content/docs/workers/platform/index.mdx +++ b/src/content/docs/workers/platform/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Platform sidebar: - order: 17 + order: 18 --- import { DirectoryListing } from "~/components"; diff --git a/src/content/docs/workers/playground.mdx b/src/content/docs/workers/playground.mdx index 89432cff235dcd6..b4a4e8a2afd1332 100644 --- a/src/content/docs/workers/playground.mdx +++ b/src/content/docs/workers/playground.mdx @@ -2,7 +2,7 @@ pcx_content_type: concept title: Playground sidebar: - order: 6 + order: 7 --- import { LinkButton } from "~/components"; diff --git a/src/content/docs/workers/reference/index.mdx b/src/content/docs/workers/reference/index.mdx index 8cae0bc593d94e5..d33d40e1816bbe4 100644 --- a/src/content/docs/workers/reference/index.mdx +++ b/src/content/docs/workers/reference/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Reference sidebar: - order: 18 + order: 19 group: hideIndex: true --- diff --git a/src/content/docs/workers/runtime-apis/index.mdx b/src/content/docs/workers/runtime-apis/index.mdx index 99c391ce54a35bc..81c7e15ac4fefb2 100644 --- a/src/content/docs/workers/runtime-apis/index.mdx +++ b/src/content/docs/workers/runtime-apis/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Runtime APIs sidebar: - order: 9 + order: 10 --- import { DirectoryListing } from "~/components"; diff --git a/src/content/docs/workers/static-assets/index.mdx b/src/content/docs/workers/static-assets/index.mdx index 42fb9d2f6e519ee..0bd35098d9ba550 100644 --- a/src/content/docs/workers/static-assets/index.mdx +++ b/src/content/docs/workers/static-assets/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Static Assets sidebar: - order: 10 + order: 11 group: badge: Beta head: [] diff --git a/src/content/docs/workers/testing/index.mdx b/src/content/docs/workers/testing/index.mdx index 559425debea07e7..af144d0de844c5a 100644 --- a/src/content/docs/workers/testing/index.mdx +++ b/src/content/docs/workers/testing/index.mdx @@ -2,7 +2,7 @@ pcx_content_type: navigation title: Testing sidebar: - order: 13 + order: 14 --- import { DirectoryListing, Render } from "~/components"; diff --git a/src/content/docs/workers/tutorials/index.mdx b/src/content/docs/workers/tutorials/index.mdx index 245c739fe0f97d3..1ca3d21f9bec3fe 100644 --- a/src/content/docs/workers/tutorials/index.mdx +++ b/src/content/docs/workers/tutorials/index.mdx @@ -4,7 +4,7 @@ hideChildren: true pcx_content_type: navigation title: Tutorials sidebar: - order: 4 + order: 5 --- import { GlossaryTooltip, ListTutorials } from "~/components"; From 9159cd519b0a6fe3654b1f6c99881cb818df41ad Mon Sep 17 00:00:00 2001 From: Andy Jessop Date: Tue, 4 Feb 2025 09:53:28 +0100 Subject: [PATCH 2/6] chore: add redirect --- .idea/workspace.xml | 21 +++------------------ public/_redirects | 1 + 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 396a796737e98e1..81368f141a606c5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,23 +5,8 @@ - - - - - - - - - - - - - - - - - + + diff --git a/public/_redirects b/public/_redirects index 6a998490ad72bab..e23b5a4608e8a83 100644 --- a/public/_redirects +++ b/public/_redirects @@ -1354,6 +1354,7 @@ /workers/platform/routes/ /workers/configuration/routing/ 301 /workers/about/tips/debugging/ /workers/observability/ 301 /workers/testing/debugging-tools/ /workers/observability/dev-tools/ 301 +/workers/testing/local-development/ /workers/local-development/ 301 /workers/about/tips/signing-requests/ /workers/examples/signing-requests/ 301 /workers/about/using-cache/ /workers/reference/how-the-cache-works/ 301 /workers/learning/how-the-cache-works/ /workers/reference/how-the-cache-works/ 301 From 93a542c3423b523a5acfd6418b8e625db298503c Mon Sep 17 00:00:00 2001 From: Andy Jessop Date: Tue, 4 Feb 2025 09:55:38 +0100 Subject: [PATCH 3/6] remove .idea --- .idea/codeStyles/Project.xml | 62 ------------------ .idea/codeStyles/codeStyleConfig.xml | 5 -- .idea/prettier.xml | 6 -- .idea/vcs.xml | 6 -- .idea/workspace.xml | 97 ---------------------------- 5 files changed, 176 deletions(-) delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/codeStyles/codeStyleConfig.xml delete mode 100644 .idea/prettier.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 3d4f1e1fe6ac896..000000000000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123c2b23e06..000000000000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml deleted file mode 100644 index b0c1c68fbbad6b1..000000000000000 --- a/.idea/prettier.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfbbc029b..000000000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 81368f141a606c5..000000000000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - { - "lastFilter": { - "state": "OPEN", - "assignee": "andyjessop" - } -} - { - "selectedUrlAndAccountId": { - "url": "git@github.com:cloudflare/cloudflare-docs.git", - "accountId": "b27fdc60-e604-48ac-ba60-f57217c27162" - } -} - { - "associatedIndex": 4 -} - - - - - - - - - - - - - - - - - - - - 1734593858363 - - - - - - - \ No newline at end of file From 4d46dd61d686a7742e547fe23167b2bb677168a7 Mon Sep 17 00:00:00 2001 From: Andy Jessop Date: Tue, 4 Feb 2025 10:07:12 +0100 Subject: [PATCH 4/6] better linking to remote docs --- src/content/docs/workers/local-development.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/workers/local-development.mdx b/src/content/docs/workers/local-development.mdx index e03a65a80f18018..25e57018d88fe01 100644 --- a/src/content/docs/workers/local-development.mdx +++ b/src/content/docs/workers/local-development.mdx @@ -7,7 +7,7 @@ head: [] description: Develop your Workers locally via Wrangler. --- -Cloudflare Workers and most connected resources can be fully developed and tested locally - providing confidence that the applications you build locally will work the same way in production. This allows you to be more efficient and effective by providing a faster feedback loop and removing the need to test against remote resources. Local development runs against the same production runtime used by Cloudflare Workers, [workerd](https://github.com/cloudflare/workerd). +Cloudflare Workers and most connected resources can be fully developed and tested locally - providing confidence that the applications you build locally will work the same way in production. This allows you to be more efficient and effective by providing a faster feedback loop and removing the need to [test against remote resources](#develop-using-remote-resources-and-bindings). Local development runs against the same production runtime used by Cloudflare Workers, [workerd](https://github.com/cloudflare/workerd). In addition to testing Workers locally with [`wrangler dev`](/workers/wrangler/commands/#dev), the use of Miniflare allows you to test other Developer Platform products locally, such as [R2](/r2/), [KV](/kv/), [D1](/d1/), and [Durable Objects](/durable-objects/). @@ -50,7 +50,7 @@ npx wrangler dev | Vectorize | ✅[^2] | ✅ | | Workflows | ✅ | ❌ | -With any bindings that are not supported locally, you will need to use the `--remote` command in wrangler, such as `wrangler dev --remote`. +With any bindings that are not supported locally, you will need to use the [`--remote` command](#develop-using-remote-resources-and-bindings) in wrangler, such as `wrangler dev --remote`. [^1]: Using Workers AI always accesses your Cloudflare account in order to run AI models and will incur usage charges even in local development. From cd0f69e84028fa7f512ba409e96dff68025468f3 Mon Sep 17 00:00:00 2001 From: Andy Jessop Date: Tue, 4 Feb 2025 10:46:09 +0100 Subject: [PATCH 5/6] Fix broken links --- .idea/workspace.xml | 109 ++++++++++++++++++ public/_redirects | 2 +- .../docs/d1/observability/debug-d1.mdx | 2 +- src/content/docs/pages/functions/bindings.mdx | 4 +- .../functions/wrangler-configuration.mdx | 6 +- .../docs/workers/local-development.mdx | 2 +- .../observability/dev-tools/breakpoints.mdx | 2 +- .../observability/dev-tools/cpu-usage.mdx | 2 +- .../workers/observability/dev-tools/index.mdx | 2 +- .../observability/dev-tools/memory-usage.mdx | 2 +- .../observability/logs/real-time-logs.mdx | 4 +- .../observability/logs/tail-workers.mdx | 2 +- .../static-assets/compatibility-matrix.mdx | 2 +- .../docs/workers/wrangler/commands.mdx | 2 +- .../docs/workers/wrangler/configuration.mdx | 6 +- 15 files changed, 129 insertions(+), 20 deletions(-) create mode 100644 .idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 000000000000000..b969f25ad1016e4 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + { + "lastFilter": { + "state": "OPEN", + "assignee": "andyjessop" + } +} + { + "selectedUrlAndAccountId": { + "url": "git@github.com:cloudflare/cloudflare-docs.git", + "accountId": "b27fdc60-e604-48ac-ba60-f57217c27162" + } +} + { + "associatedIndex": 4 +} + + + + + + + + + + + + + + + + + + + + 1734593858363 + + + + + + + \ No newline at end of file diff --git a/public/_redirects b/public/_redirects index e23b5a4608e8a83..13cef2b0f4925b4 100644 --- a/public/_redirects +++ b/public/_redirects @@ -1545,7 +1545,7 @@ /workers/runtime-apis/mtls/ /workers/runtime-apis/bindings/mtls/ 301 /workers/runtime-apis/queues/ /workers/runtime-apis/bindings/bindings/queues/ 301 /workers/runtime-apis/service-bindings/ /workers/runtime-apis/bindings/service-bindings/ 301 -/workers/observability/local-development-and-testing/ /workers/testing/local-development/ 301 +/workers/observability/local-development-and-testing/ /workers/local-development/ 301 /workers/observability/sentry-integration/ /workers/observability/integrations/sentry 301 /workers/configuration/deployments/ /workers/configuration/versions-and-deployments/ 301 /workers/configuration/continuous-integration/ /workers/ci-cd/ 301 diff --git a/src/content/docs/d1/observability/debug-d1.mdx b/src/content/docs/d1/observability/debug-d1.mdx index 194dab503230095..afcb4b9ae3ff249 100644 --- a/src/content/docs/d1/observability/debug-d1.mdx +++ b/src/content/docs/d1/observability/debug-d1.mdx @@ -94,4 +94,4 @@ You should include as much of the following in any bug report: * Learn [how to debug Workers](/workers/observability/). * Understand how to [access logs](/workers/observability/logs/) generated from your Worker and D1. -* Use [`wrangler dev`](/workers/wrangler/commands/#dev) to run your Worker and D1 locally and [debug issues before deploying](/workers/testing/local-development/). +* Use [`wrangler dev`](/workers/wrangler/commands/#dev) to run your Worker and D1 locally and [debug issues before deploying](/workers/local-development/). diff --git a/src/content/docs/pages/functions/bindings.mdx b/src/content/docs/pages/functions/bindings.mdx index 976cc4dcc29fe51..c21c65311083934 100644 --- a/src/content/docs/pages/functions/bindings.mdx +++ b/src/content/docs/pages/functions/bindings.mdx @@ -196,7 +196,7 @@ You can interact with your R2 bucket bindings locally in one of two ways: :::note -By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/testing/local-development/). +By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/local-development/). ::: @@ -277,7 +277,7 @@ Interact with this binding by using `context.env` (for example, `context.env.NOR :::note -By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/testing/local-development/). +By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/local-development/). ::: diff --git a/src/content/docs/pages/functions/wrangler-configuration.mdx b/src/content/docs/pages/functions/wrangler-configuration.mdx index 460b0cd99dcc033..00afd598fbf7441 100644 --- a/src/content/docs/pages/functions/wrangler-configuration.mdx +++ b/src/content/docs/pages/functions/wrangler-configuration.mdx @@ -431,7 +431,7 @@ A [binding](/pages/functions/bindings/) enables your Pages Functions to interact :::note -When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production database. Refer to [Local development](/workers/testing/local-development/) for more details. +When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production database. Refer to [Local development](/workers/local-development/) for more details. ::: @@ -471,7 +471,7 @@ When using Wrangler in the default local development mode, files will be written :::note -When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production namespace. Refer to [Local development](/workers/testing/local-development/) for more details. +When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production namespace. Refer to [Local development](/workers/local-development/) for more details. ::: @@ -497,7 +497,7 @@ You cannot currently configure a [queues consumer](/queues/reference/how-queues- :::note -When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production bucket. Refer to [Local development](/workers/testing/local-development/) for more details. +When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production bucket. Refer to [Local development](/workers/local-development/) for more details. ::: diff --git a/src/content/docs/workers/local-development.mdx b/src/content/docs/workers/local-development.mdx index 25e57018d88fe01..3b5e14d45b9be4b 100644 --- a/src/content/docs/workers/local-development.mdx +++ b/src/content/docs/workers/local-development.mdx @@ -62,7 +62,7 @@ When running `wrangler dev`, resources such as KV, Durable Objects, D1, and R2 w ### Use bindings in Wrangler configuration files -[Wrangler](/workers/wrangler/) will automatically create local versions of bindings found in the [`wrangler.toml / wrangler.json` file](/workers/wrangler/configuration/). These local resources will not have data in them initially, so you will need to add data manually via Wrangler commands and the [`--local` flag](/workers/testing/local-development/#use---local-flag). +[Wrangler](/workers/wrangler/) will automatically create local versions of bindings found in the [`wrangler.toml / wrangler.json` file](/workers/wrangler/configuration/). These local resources will not have data in them initially, so you will need to add data manually via Wrangler commands and the [`--local` flag](/workers/local-development/#use---local-flag). When you run `wrangler dev` Wrangler stores local resources in a `.wrangler/state` folder, which is automatically created. diff --git a/src/content/docs/workers/observability/dev-tools/breakpoints.mdx b/src/content/docs/workers/observability/dev-tools/breakpoints.mdx index e1e6a6f7996d566..0a86c8dd4d3ea35 100644 --- a/src/content/docs/workers/observability/dev-tools/breakpoints.mdx +++ b/src/content/docs/workers/observability/dev-tools/breakpoints.mdx @@ -60,4 +60,4 @@ The `.vscode/launch.json` file only applies to a single workspace. If you prefer ## Related resources -- [Local Development](/workers/testing/local-development/) - Develop your Workers and connected resources locally via Wrangler and [`workerd`](https://github.com/cloudflare/workerd), for a fast, accurate feedback loop. +- [Local Development](/workers/local-development/) - Develop your Workers and connected resources locally via Wrangler and [`workerd`](https://github.com/cloudflare/workerd), for a fast, accurate feedback loop. diff --git a/src/content/docs/workers/observability/dev-tools/cpu-usage.mdx b/src/content/docs/workers/observability/dev-tools/cpu-usage.mdx index cd45571f0b1381e..b6aa18ff83acb00 100644 --- a/src/content/docs/workers/observability/dev-tools/cpu-usage.mdx +++ b/src/content/docs/workers/observability/dev-tools/cpu-usage.mdx @@ -17,7 +17,7 @@ for security purposes. However, measuring CPU execution times is possible in loc When using DevTools to monitor CPU usage, it may be difficult to replicate specific behavior you are seeing in production. To mimic production behavior, make sure the requests you send to the local Worker are similar to requests in production. This might mean sending a large volume of requests, making requests -to specific routes, or using production-like data with the [--remote flag](/workers/testing/local-development/#develop-using-remote-resources-and-bindings). +to specific routes, or using production-like data with the [--remote flag](/workers/local-development/#develop-using-remote-resources-and-bindings). ## Taking a profile diff --git a/src/content/docs/workers/observability/dev-tools/index.mdx b/src/content/docs/workers/observability/dev-tools/index.mdx index 5db135d0af7d230..f451ad70b9492a6 100644 --- a/src/content/docs/workers/observability/dev-tools/index.mdx +++ b/src/content/docs/workers/observability/dev-tools/index.mdx @@ -31,4 +31,4 @@ DevTools can be used in a variety of situations. For more information, see the d ## Related resources -- [Local development](/workers/testing/local-development/) - Develop your Workers and connected resources locally via Wrangler and workerd, for a fast, accurate feedback loop. +- [Local development](/workers/local-development/) - Develop your Workers and connected resources locally via Wrangler and workerd, for a fast, accurate feedback loop. diff --git a/src/content/docs/workers/observability/dev-tools/memory-usage.mdx b/src/content/docs/workers/observability/dev-tools/memory-usage.mdx index f7cd1dcd6731fcf..8ef523e8e5b62c9 100644 --- a/src/content/docs/workers/observability/dev-tools/memory-usage.mdx +++ b/src/content/docs/workers/observability/dev-tools/memory-usage.mdx @@ -16,7 +16,7 @@ objects in memory. When using DevTools to profile memory, it may be difficult to replicate specific behavior you are seeing in production. To mimic production behavior, make sure the requests you send to the local Worker are similar to requests in production. This might mean sending a large volume of requests, making requests -to specific routes, or using production-like data with the [--remote flag](/workers/testing/local-development/#develop-using-remote-resources-and-bindings). +to specific routes, or using production-like data with the [--remote flag](/workers/local-development/#develop-using-remote-resources-and-bindings). ## Taking a snapshot diff --git a/src/content/docs/workers/observability/logs/real-time-logs.mdx b/src/content/docs/workers/observability/logs/real-time-logs.mdx index 1fb1b361f92f2de..8e02d4b48293746 100644 --- a/src/content/docs/workers/observability/logs/real-time-logs.mdx +++ b/src/content/docs/workers/observability/logs/real-time-logs.mdx @@ -28,7 +28,7 @@ To view real-time logs associated with any deployed Worker using the Cloudflare 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account. 2. In Account Home, go to **Workers & Pages**. 3. In **Overview**, select your **Worker**. -4. Select **Logs**. +4. Select **Logs**. 5. In the right-hand navigation bar, select **Live**. @@ -97,7 +97,7 @@ Logs can be persisted, filtered, and analyzed with [Workers Logs](/workers/obser ## Related resources - [Errors and exceptions](/workers/observability/errors/) - Review common Workers errors. -- [Local development and testing](/workers/testing/local-development/) - Develop and test you Workers locally. +- [Local development and testing](/workers/local-development/) - Develop and test you Workers locally. - [Workers Logs](/workers/observability/logs/workers-logs) - Collect, store, filter and analyze logging data emitted from Cloudflare Workers. - [Logpush](/workers/observability/logs/logpush/) - Learn how to push Workers Trace Event Logs to supported destinations. - [Tail Workers](/workers/observability/logs/tail-workers/) - Learn how to attach Tail Workers to transform your logs and send them to HTTP endpoints. diff --git a/src/content/docs/workers/observability/logs/tail-workers.mdx b/src/content/docs/workers/observability/logs/tail-workers.mdx index fceb06aad8c0460..60181cfa19c392a 100644 --- a/src/content/docs/workers/observability/logs/tail-workers.mdx +++ b/src/content/docs/workers/observability/logs/tail-workers.mdx @@ -105,5 +105,5 @@ The Worker that you add a `tail_consumers` binding to must have a `tail()` handl * [`tail()`](/workers/runtime-apis/handlers/tail/) Handler API docs - Learn how to set up a `tail()` handler in your Worker. - [Errors and exceptions](/workers/observability/errors/) - Review common Workers errors. -- [Local development and testing](/workers/testing/local-development/) - Develop and test you Workers locally. +- [Local development and testing](/workers/local-development/) - Develop and test you Workers locally. - [Source maps and stack traces](/workers/observability/source-maps) - Learn how to enable source maps and generate stack traces for Workers. diff --git a/src/content/docs/workers/static-assets/compatibility-matrix.mdx b/src/content/docs/workers/static-assets/compatibility-matrix.mdx index f2573c17762fa6a..a69615c60cf2c3b 100644 --- a/src/content/docs/workers/static-assets/compatibility-matrix.mdx +++ b/src/content/docs/workers/static-assets/compatibility-matrix.mdx @@ -34,7 +34,7 @@ We plan to bridge the gaps between Workers and Pages and provide ways to migrate | [Gradual Deployments](/workers/configuration/versions-and-deployments/) | ✅ | ❌ | | [Preview URLs](/workers/configuration/previews) | ✅ | ✅ | | [Testing tools](/workers/testing) | ✅ | ✅ | -| [Local Development](/workers/testing/local-development/) | ✅ | ✅ | +| [Local Development](/workers/local-development/) | ✅ | ✅ | | [Remote Development (`--remote`)](/workers/wrangler/commands/) | ✅ | ❌ | | [Quick Editor in Dashboard](https://blog.cloudflare.com/improved-quick-edit) | ✅ | ❌ | | **Static Assets** | | | diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx index 4d4fe6b7462e5cf..7e3b062cfda0ff7 100644 --- a/src/content/docs/workers/wrangler/commands.mdx +++ b/src/content/docs/workers/wrangler/commands.mdx @@ -517,7 +517,7 @@ As of Wrangler v3.2.0, `wrangler dev` is supported by any Linux distributions pr -`wrangler dev` is a way to [locally test](/workers/testing/local-development/) your Worker while developing. With `wrangler dev` running, send HTTP requests to `localhost:8787` and your Worker should execute as expected. You will also see `console.log` messages and exceptions appearing in your terminal. +`wrangler dev` is a way to [locally test](/workers/local-development/) your Worker while developing. With `wrangler dev` running, send HTTP requests to `localhost:8787` and your Worker should execute as expected. You will also see `console.log` messages and exceptions appearing in your terminal. --- diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index ca16a75f7f97d61..b7e6ceb386791e7 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -483,7 +483,7 @@ To bind D1 databases to your Worker, assign an array of the below object to the :::note -When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production database. Refer to [Local development and testing](/workers/testing/local-development/) for more details. +When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production database. Refer to [Local development and testing](/workers/local-development/) for more details. ::: @@ -680,7 +680,7 @@ To bind KV namespaces to your Worker, assign an array of the below object to the :::note -When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production namespace. Refer to [Local development and testing](/workers/testing/local-development/) for more details. +When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production namespace. Refer to [Local development and testing](/workers/local-development/) for more details. ::: @@ -805,7 +805,7 @@ To bind R2 buckets to your Worker, assign an array of the below object to the `r :::note -When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production bucket. Refer to [Local development and testing](/workers/testing/local-development/) for more details. +When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production bucket. Refer to [Local development and testing](/workers/local-development/) for more details. ::: From 16b7c357f19065cccdf2293f5e9083b5f2e20d5d Mon Sep 17 00:00:00 2001 From: Andy Jessop Date: Tue, 4 Feb 2025 14:26:55 +0100 Subject: [PATCH 6/6] fix ordering and spacing --- .idea/workspace.xml | 109 ------------------ src/content/docs/workers/examples/index.mdx | 2 +- .../docs/workers/local-development.mdx | 2 +- .../static-assets/compatibility-matrix.mdx | 2 +- src/content/docs/workers/tutorials/index.mdx | 2 +- 5 files changed, 4 insertions(+), 113 deletions(-) delete mode 100644 .idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index b969f25ad1016e4..000000000000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - { - "lastFilter": { - "state": "OPEN", - "assignee": "andyjessop" - } -} - { - "selectedUrlAndAccountId": { - "url": "git@github.com:cloudflare/cloudflare-docs.git", - "accountId": "b27fdc60-e604-48ac-ba60-f57217c27162" - } -} - { - "associatedIndex": 4 -} - - - - - - - - - - - - - - - - - - - - 1734593858363 - - - - - - - \ No newline at end of file diff --git a/src/content/docs/workers/examples/index.mdx b/src/content/docs/workers/examples/index.mdx index b50b6d5b2022ad0..d9d3b9628e60267 100644 --- a/src/content/docs/workers/examples/index.mdx +++ b/src/content/docs/workers/examples/index.mdx @@ -4,7 +4,7 @@ hideChildren: true pcx_content_type: navigation title: Examples sidebar: - order: 4 + order: 3 --- import { GlossaryTooltip, ListExamples } from "~/components"; diff --git a/src/content/docs/workers/local-development.mdx b/src/content/docs/workers/local-development.mdx index 3b5e14d45b9be4b..026b51bcee39497 100644 --- a/src/content/docs/workers/local-development.mdx +++ b/src/content/docs/workers/local-development.mdx @@ -62,7 +62,7 @@ When running `wrangler dev`, resources such as KV, Durable Objects, D1, and R2 w ### Use bindings in Wrangler configuration files -[Wrangler](/workers/wrangler/) will automatically create local versions of bindings found in the [`wrangler.toml / wrangler.json` file](/workers/wrangler/configuration/). These local resources will not have data in them initially, so you will need to add data manually via Wrangler commands and the [`--local` flag](/workers/local-development/#use---local-flag). +[Wrangler](/workers/wrangler/) will automatically create local versions of bindings found in the [`wrangler.toml / wrangler.json` file](/workers/wrangler/configuration/). These local resources will not have data in them initially, so you will need to add data manually via Wrangler commands and the [`--local` flag](#use---local-flag). When you run `wrangler dev` Wrangler stores local resources in a `.wrangler/state` folder, which is automatically created. diff --git a/src/content/docs/workers/static-assets/compatibility-matrix.mdx b/src/content/docs/workers/static-assets/compatibility-matrix.mdx index a69615c60cf2c3b..d16ad3d8d7559d3 100644 --- a/src/content/docs/workers/static-assets/compatibility-matrix.mdx +++ b/src/content/docs/workers/static-assets/compatibility-matrix.mdx @@ -34,7 +34,7 @@ We plan to bridge the gaps between Workers and Pages and provide ways to migrate | [Gradual Deployments](/workers/configuration/versions-and-deployments/) | ✅ | ❌ | | [Preview URLs](/workers/configuration/previews) | ✅ | ✅ | | [Testing tools](/workers/testing) | ✅ | ✅ | -| [Local Development](/workers/local-development/) | ✅ | ✅ | +| [Local Development](/workers/local-development/) | ✅ | ✅ | | [Remote Development (`--remote`)](/workers/wrangler/commands/) | ✅ | ❌ | | [Quick Editor in Dashboard](https://blog.cloudflare.com/improved-quick-edit) | ✅ | ❌ | | **Static Assets** | | | diff --git a/src/content/docs/workers/tutorials/index.mdx b/src/content/docs/workers/tutorials/index.mdx index 1ca3d21f9bec3fe..245c739fe0f97d3 100644 --- a/src/content/docs/workers/tutorials/index.mdx +++ b/src/content/docs/workers/tutorials/index.mdx @@ -4,7 +4,7 @@ hideChildren: true pcx_content_type: navigation title: Tutorials sidebar: - order: 5 + order: 4 --- import { GlossaryTooltip, ListTutorials } from "~/components";