(left: string, right: string)
| 2897 | const originPort = (url: URL): string => url.port || (url.protocol === "https:" ? "443" : "80"); |
| 2898 | |
| 2899 | const sameServerOrigin = (left: string, right: string): boolean => { |
| 2900 | const leftUrl = new URL(normalizeExecutorServerConnection({ origin: left }).origin); |
| 2901 | const rightUrl = new URL(normalizeExecutorServerConnection({ origin: right }).origin); |
| 2902 | if (leftUrl.toString() === rightUrl.toString()) return true; |
| 2903 | return ( |
| 2904 | leftUrl.protocol === rightUrl.protocol && |
| 2905 | originPort(leftUrl) === originPort(rightUrl) && |
| 2906 | LOCAL_SERVICE_HOSTS.has(leftUrl.hostname.toLowerCase()) && |
| 2907 | LOCAL_SERVICE_HOSTS.has(rightUrl.hostname.toLowerCase()) |
| 2908 | ); |
| 2909 | }; |
| 2910 | |
| 2911 | const hasReachableCliDaemonManifest = (input: { |
| 2912 | readonly origin: string; |
no test coverage detected