(left: string, right: string)
| 2769 | const originPort = (url: URL): string => url.port || (url.protocol === "https:" ? "443" : "80"); |
| 2770 | |
| 2771 | const sameServerOrigin = (left: string, right: string): boolean => { |
| 2772 | const leftUrl = new URL(normalizeExecutorServerConnection({ origin: left }).origin); |
| 2773 | const rightUrl = new URL(normalizeExecutorServerConnection({ origin: right }).origin); |
| 2774 | if (leftUrl.toString() === rightUrl.toString()) return true; |
| 2775 | return ( |
| 2776 | leftUrl.protocol === rightUrl.protocol && |
| 2777 | originPort(leftUrl) === originPort(rightUrl) && |
| 2778 | LOCAL_SERVICE_HOSTS.has(leftUrl.hostname.toLowerCase()) && |
| 2779 | LOCAL_SERVICE_HOSTS.has(rightUrl.hostname.toLowerCase()) |
| 2780 | ); |
| 2781 | }; |
| 2782 | |
| 2783 | const hasReachableCliDaemonManifest = (input: { |
| 2784 | readonly origin: string; |
no test coverage detected