(left: string, right: string)
| 2721 | const originPort = (url: URL): string => url.port || (url.protocol === "https:" ? "443" : "80"); |
| 2722 | |
| 2723 | const sameServerOrigin = (left: string, right: string): boolean => { |
| 2724 | const leftUrl = new URL(normalizeExecutorServerConnection({ origin: left }).origin); |
| 2725 | const rightUrl = new URL(normalizeExecutorServerConnection({ origin: right }).origin); |
| 2726 | if (leftUrl.toString() === rightUrl.toString()) return true; |
| 2727 | return ( |
| 2728 | leftUrl.protocol === rightUrl.protocol && |
| 2729 | originPort(leftUrl) === originPort(rightUrl) && |
| 2730 | LOCAL_SERVICE_HOSTS.has(leftUrl.hostname.toLowerCase()) && |
| 2731 | LOCAL_SERVICE_HOSTS.has(rightUrl.hostname.toLowerCase()) |
| 2732 | ); |
| 2733 | }; |
| 2734 | |
| 2735 | const hasReachableCliDaemonManifest = (input: { |
| 2736 | readonly origin: string; |
no test coverage detected