From 4c8f801822ddf22a45c7bedefdfde45ba84317bb Mon Sep 17 00:00:00 2001 From: yomna Date: Mon, 8 Sep 2025 21:37:32 -0400 Subject: [PATCH 1/3] adding changelog for Wrangler interactive improvement for Assets deployment --- ...2025-09-09-interactive-wrangler-assets.mdx | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx diff --git a/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx b/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx new file mode 100644 index 00000000000..f6c9d4c2ab0 --- /dev/null +++ b/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx @@ -0,0 +1,63 @@ +--- +title: Interactive deployment flow for static assets in Wrangler +description: Wrangler now guides you through deploying static assets with interactive prompts and automatic configuration generation when no wrangler.jsonc file exists. +products: + - workers +date: 2025-09-09 +--- + +Deploying static assets to Workers is now significantly easier. When you run `wrangler deploy [directory]` or `wrangler deploy --assets [directory]` without an existing configuration file, Wrangler will now guide you through the deployment process with interactive prompts. + +## What's new + +**Interactive prompts for missing configuration:** +- Wrangler detects when you're trying to deploy a directory of static assets +- Prompts you to confirm the deployment type +- Asks for a project name (with smart defaults) +- Automatically sets the compatibility date to today + +**Automatic configuration generation:** +- Creates a `wrangler.jsonc` file with your deployment settings +- Stores your choices for future deployments +- Eliminates the need to remember complex command-line flags + +## Example workflow + +```bash +# Deploy your built static site +wrangler deploy dist + +# Wrangler will prompt: +✔ It looks like you are trying to deploy a directory of static assets only. Is this correct? … yes +✔ What do you want to name your project? … my-astro-site + +# Automatically generates wrangler.jsonc: +{ + "name": "my-astro-site", + "compatibility_date": "2025-09-09", + "assets": { + "directory": "dist" + } +} + +# Future deployments are now simplified: +wrangler deploy +``` + +## Before and after + +**Before:** Required remembering multiple flags and parameters +```bash +wrangler deploy --assets ./dist --compatibility-date 2025-09-09 --name my-project +``` + +**After:** Simple directory deployment with guided setup +```bash +wrangler deploy dist +# Interactive prompts handle the rest as shown in the example flow above +``` + +## Requirements + +- **Wrangler 4.24.4 or higher** is required for this functionality + From a942be8a95b4c6a177db554b77bfd55e7f839d0e Mon Sep 17 00:00:00 2001 From: Yomna Shousha Date: Tue, 9 Sep 2025 09:18:46 -0400 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Brendan Irvine-Broque --- .../workers/2025-09-09-interactive-wrangler-assets.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx b/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx index f6c9d4c2ab0..4489bcc0051 100644 --- a/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx +++ b/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx @@ -1,12 +1,12 @@ --- -title: Interactive deployment flow for static assets in Wrangler +title: Deploy static sites to Workers without a configuration file description: Wrangler now guides you through deploying static assets with interactive prompts and automatic configuration generation when no wrangler.jsonc file exists. products: - workers date: 2025-09-09 --- -Deploying static assets to Workers is now significantly easier. When you run `wrangler deploy [directory]` or `wrangler deploy --assets [directory]` without an existing configuration file, Wrangler will now guide you through the deployment process with interactive prompts. +Deploying static site to Workers is now easier. When you run `wrangler deploy [directory]` or `wrangler deploy --assets [directory]` without an existing [configuration file](/workers/wrangler/configuration/), [Wrangler CLI](/workers/wrangler/) now guides you through the deployment process with interactive prompts. ## What's new @@ -31,7 +31,7 @@ wrangler deploy dist ✔ It looks like you are trying to deploy a directory of static assets only. Is this correct? … yes ✔ What do you want to name your project? … my-astro-site -# Automatically generates wrangler.jsonc: +# Automatically generates a wrangler.jsonc file and adds it to your project: { "name": "my-astro-site", "compatibility_date": "2025-09-09", @@ -40,7 +40,7 @@ wrangler deploy dist } } -# Future deployments are now simplified: +# Next time you run wrangler deploy, this will use the configuration in your newly generated wrangler.jsonc file wrangler deploy ``` @@ -59,5 +59,5 @@ wrangler deploy dist ## Requirements -- **Wrangler 4.24.4 or higher** is required for this functionality +- You must use Wrangler version 4.24.4 or later in order to use this feature From ea433c22b0bc8cf427e0902a46bbbb79eb2e0d78 Mon Sep 17 00:00:00 2001 From: yomna Date: Tue, 9 Sep 2025 09:22:31 -0400 Subject: [PATCH 3/3] Address review: bringing up before and after --- ...2025-09-09-interactive-wrangler-assets.mdx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx b/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx index 4489bcc0051..6be3b71930d 100644 --- a/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx +++ b/src/content/changelog/workers/2025-09-09-interactive-wrangler-assets.mdx @@ -8,6 +8,19 @@ date: 2025-09-09 Deploying static site to Workers is now easier. When you run `wrangler deploy [directory]` or `wrangler deploy --assets [directory]` without an existing [configuration file](/workers/wrangler/configuration/), [Wrangler CLI](/workers/wrangler/) now guides you through the deployment process with interactive prompts. +## Before and after + +**Before:** Required remembering multiple flags and parameters +```bash +wrangler deploy --assets ./dist --compatibility-date 2025-09-09 --name my-project +``` + +**After:** Simple directory deployment with guided setup +```bash +wrangler deploy dist +# Interactive prompts handle the rest as shown in the example flow above +``` + ## What's new **Interactive prompts for missing configuration:** @@ -44,19 +57,6 @@ wrangler deploy dist wrangler deploy ``` -## Before and after - -**Before:** Required remembering multiple flags and parameters -```bash -wrangler deploy --assets ./dist --compatibility-date 2025-09-09 --name my-project -``` - -**After:** Simple directory deployment with guided setup -```bash -wrangler deploy dist -# Interactive prompts handle the rest as shown in the example flow above -``` - ## Requirements - You must use Wrangler version 4.24.4 or later in order to use this feature