Skip to content

Commit

Permalink
fix(create-cloudflare): make DNS poling copy more user friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmenPopoviciu committed Feb 21, 2025
1 parent 1427535 commit 41c8e89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/large-hotels-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-cloudflare": patch
---

This change makes the user facing message C3 displays while waiting for DNS propagation, more friendly/informative. The idea is to inform users that DNS propagation might sometimes take even up to 2 minutes. This will hopefully prevent confusion around whether how long the process will take, or whether the process is stuck, etc.
6 changes: 4 additions & 2 deletions packages/create-cloudflare/src/helpers/poll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const poll = async (url: string): Promise<boolean> => {
const domain = new URL(url).host;
const s = spinner();

s.start("Waiting for DNS to propagate");
s.start("Waiting for DNS to propagate. This might take up to two minutes.");

// Start out by sleeping for 10 seconds since it's unlikely DNS changes will
// have propogated before then
Expand All @@ -47,7 +47,9 @@ const pollDns = async (
s: ReturnType<typeof spinner>,
) => {
while (Date.now() - start < TIMEOUT) {
s.update(`Waiting for DNS to propagate (${secondsSince(start)}s)`);
s.update(
`Waiting for DNS to propagate. This might take up to two minutes. (${secondsSince(start)}s)`,
);
if (await isDomainResolvable(domain)) {
s.stop(`${brandColor("DNS propagation")} ${dim("complete")}.`);
return;
Expand Down

0 comments on commit 41c8e89

Please sign in to comment.