(left: string, right: string)
| 2800 | const originPort = (url: URL): string => url.port || (url.protocol === "https:" ? "443" : "80"); |
| 2801 | |
| 2802 | const sameServerOrigin = (left: string, right: string): boolean => { |
| 2803 | const leftUrl = new URL(normalizeExecutorServerConnection({ origin: left }).origin); |
| 2804 | const rightUrl = new URL(normalizeExecutorServerConnection({ origin: right }).origin); |
| 2805 | if (leftUrl.toString() === rightUrl.toString()) return true; |
| 2806 | return ( |
| 2807 | leftUrl.protocol === rightUrl.protocol && |
| 2808 | originPort(leftUrl) === originPort(rightUrl) && |
| 2809 | LOCAL_SERVICE_HOSTS.has(leftUrl.hostname.toLowerCase()) && |
| 2810 | LOCAL_SERVICE_HOSTS.has(rightUrl.hostname.toLowerCase()) |
| 2811 | ); |
| 2812 | }; |
| 2813 | |
| 2814 | const hasReachableCliDaemonManifest = (input: { |
| 2815 | readonly origin: string; |
no test coverage detected