-
Type:
Task
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
When the driver reports no server address, the fallback uses uri. isLocalhost and isDigitalOcean expect a hostname, not a URI.
- Add extractHostname, which strips the port from a host:port address and unwraps IPv6, returning undefined for hostname-less values like '' and ':27017'.
- Add getResolvedHostname, which prefers resolvedHostname and falls back to connectionString.hosts[0].