(left: string, right: string)
| 2946 | const originPort = (url: URL): string => url.port || (url.protocol === "https:" ? "443" : "80"); |
| 2947 | |
| 2948 | const sameServerOrigin = (left: string, right: string): boolean => { |
| 2949 | const leftUrl = new URL(normalizeExecutorServerConnection({ origin: left }).origin); |
| 2950 | const rightUrl = new URL(normalizeExecutorServerConnection({ origin: right }).origin); |
| 2951 | if (leftUrl.toString() === rightUrl.toString()) return true; |
| 2952 | return ( |
| 2953 | leftUrl.protocol === rightUrl.protocol && |
| 2954 | originPort(leftUrl) === originPort(rightUrl) && |
| 2955 | LOCAL_SERVICE_HOSTS.has(leftUrl.hostname.toLowerCase()) && |
| 2956 | LOCAL_SERVICE_HOSTS.has(rightUrl.hostname.toLowerCase()) |
| 2957 | ); |
| 2958 | }; |
| 2959 | |
| 2960 | const hasReachableCliDaemonManifest = (input: { |
| 2961 | readonly origin: string; |
no test coverage detected