(left: string, right: string)
| 2829 | const originPort = (url: URL): string => url.port || (url.protocol === "https:" ? "443" : "80"); |
| 2830 | |
| 2831 | const sameServerOrigin = (left: string, right: string): boolean => { |
| 2832 | const leftUrl = new URL(normalizeExecutorServerConnection({ origin: left }).origin); |
| 2833 | const rightUrl = new URL(normalizeExecutorServerConnection({ origin: right }).origin); |
| 2834 | if (leftUrl.toString() === rightUrl.toString()) return true; |
| 2835 | return ( |
| 2836 | leftUrl.protocol === rightUrl.protocol && |
| 2837 | originPort(leftUrl) === originPort(rightUrl) && |
| 2838 | LOCAL_SERVICE_HOSTS.has(leftUrl.hostname.toLowerCase()) && |
| 2839 | LOCAL_SERVICE_HOSTS.has(rightUrl.hostname.toLowerCase()) |
| 2840 | ); |
| 2841 | }; |
| 2842 | |
| 2843 | const hasReachableCliDaemonManifest = (input: { |
| 2844 | readonly origin: string; |
no test coverage detected