diff --git a/.changeset/puny-coins-dream.md b/.changeset/puny-coins-dream.md new file mode 100644 index 0000000000..40fdd839ce --- /dev/null +++ b/.changeset/puny-coins-dream.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +switch zone route warning to an info message diff --git a/packages/wrangler/src/__tests__/deploy.test.ts b/packages/wrangler/src/__tests__/deploy.test.ts index a09a541f0a..ae9beed092 100644 --- a/packages/wrangler/src/__tests__/deploy.test.ts +++ b/packages/wrangler/src/__tests__/deploy.test.ts @@ -1419,24 +1419,22 @@ describe("deploy", () => { }); await runWrangler("deploy ./index"); + expect(std.info).toMatchInlineSnapshot(` + "The current authentication token does not have 'All Zones' permissions. + Falling back to using the zone-based API endpoint to update each route individually. + Note that there is no access to routes associated with zones that the API token does not have permission for. + Existing routes for this Worker in such zones will not be deleted." + `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` - "▲ [WARNING] The current authentication token does not have 'All Zones' permissions. - - Falling back to using the zone-based API endpoint to update each route individually. - Note that there is no access to routes associated with zones that the API token does not have - permission for. - Existing routes for this Worker in such zones will not be deleted. - - - ▲ [WARNING] Previously deployed routes: + "▲ [WARNING] Previously deployed routes: - The following routes were already associated with this worker, and have not been deleted: - - \\"foo.example.com/other-route\\" - If these routes are not wanted then you can remove them in the dashboard. + The following routes were already associated with this worker, and have not been deleted: + - \\"foo.example.com/other-route\\" + If these routes are not wanted then you can remove them in the dashboard. - " - `); + " + `); expect(std.out).toMatchInlineSnapshot(` "Total Upload: xx KiB / gzip: xx KiB Worker Startup Time: 100 ms @@ -5250,7 +5248,6 @@ addEventListener('fetch', event => {});` ["Q29udGVudCBvZiBmaWxlLTM="], "ff5016e92f039aa743a4ff7abb3180fa", { - // TODO: this should be "text/plain; charset=utf-8", but msw? is stripping the charset part type: "text/plain", } ) @@ -14037,7 +14034,7 @@ expect.extend({ }; } - if (!equals(received.type, expected.type)) { + if (!equals(received.type, expect.stringMatching(expected.type))) { return { pass: false, message: () => diff --git a/packages/wrangler/src/deploy/deploy.ts b/packages/wrangler/src/deploy/deploy.ts index e3e13666c6..9d44d29157 100644 --- a/packages/wrangler/src/deploy/deploy.ts +++ b/packages/wrangler/src/deploy/deploy.ts @@ -1068,7 +1068,7 @@ async function publishRoutesFallback( { telemetryMessage: true } ); } - logger.warn( + logger.info( "The current authentication token does not have 'All Zones' permissions.\n" + "Falling back to using the zone-based API endpoint to update each route individually.\n" + "Note that there is no access to routes associated with zones that the API token does not have permission for.\n" +