Skip to content

Commit

Permalink
Improve static asset upload messaging (#6838)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregBrimble authored Oct 3, 2024
1 parent 27e8385 commit 7dbd0c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/rude-steaks-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

fix: Improve static asset upload messaging
2 changes: 1 addition & 1 deletion packages/wrangler/e2e/deployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ describe("Workers + Assets deployment", { timeout: TIMEOUT }, () => {
expect(normalize(output.stdout)).toMatchInlineSnapshot(`
"🌀 Building list of assets...
🌀 Starting asset upload...
🌀 Found 3 new or modified files to upload. Proceeding with upload...
🌀 Found 3 new or modified static assets to upload. Proceeding with upload...
+ /404.html
+ /index.html
+ /[boop].html
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/e2e/versions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
expect(normalize(upload.stdout)).toMatchInlineSnapshot(`
"🌀 Building list of assets...
🌀 Starting asset upload...
🌀 Found 1 new or modified file to upload. Proceeding with upload...
🌀 Found 1 new or modified static asset to upload. Proceeding with upload...
+ /asset.txt
Uploaded 1 of 1 assets
✨ Success! Uploaded 1 file (TIMINGS)
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const syncAssets = async (
// 3. fill buckets and upload assets
const numberFilesToUpload = initializeAssetsResponse.buckets.flat().length;
logger.info(
`🌀 Found ${numberFilesToUpload} new or modified file${numberFilesToUpload > 1 ? "s" : ""} to upload. Proceeding with upload...`
`🌀 Found ${numberFilesToUpload} new or modified static asset${numberFilesToUpload > 1 ? "s" : ""} to upload. Proceeding with upload...`
);

// Create the buckets outside of doUpload so we can retry without losing track of potential duplicate files
Expand Down

0 comments on commit 7dbd0c8

Please sign in to comment.