(left: string, right: string)
| 2917 | const originPort = (url: URL): string => url.port || (url.protocol === "https:" ? "443" : "80"); |
| 2918 | |
| 2919 | const sameServerOrigin = (left: string, right: string): boolean => { |
| 2920 | const leftUrl = new URL(normalizeExecutorServerConnection({ origin: left }).origin); |
| 2921 | const rightUrl = new URL(normalizeExecutorServerConnection({ origin: right }).origin); |
| 2922 | if (leftUrl.toString() === rightUrl.toString()) return true; |
| 2923 | return ( |
| 2924 | leftUrl.protocol === rightUrl.protocol && |
| 2925 | originPort(leftUrl) === originPort(rightUrl) && |
| 2926 | LOCAL_SERVICE_HOSTS.has(leftUrl.hostname.toLowerCase()) && |
| 2927 | LOCAL_SERVICE_HOSTS.has(rightUrl.hostname.toLowerCase()) |
| 2928 | ); |
| 2929 | }; |
| 2930 | |
| 2931 | const hasReachableCliDaemonManifest = (input: { |
| 2932 | readonly origin: string; |
no test coverage detected