| 143 | // Filter out routes that are not able to work on the arm64 architecture |
| 144 | // and log a message as to why that is (can't run Chrome on non-apple arm64) |
| 145 | protected filterNonMacArm64Browsers( |
| 146 | route: |
| 147 | | HTTPRoute |
| 148 | | BrowserHTTPRoute |
| 149 | | WebSocketRoute |
| 150 | | BrowserWebsocketRoute, |
| 151 | ) { |
| 152 | if ( |
| 153 | isArm64 && |
| 154 | !isMacOS && |
| 155 | 'browser' in route && |
| 156 | route.browser && |
| 157 | unavailableARM64Browsers.some((b) => |
| 158 | route.browser.name.toLowerCase().includes(b), |
| 159 | ) |
| 160 | ) { |
| 161 | this.logger.warn( |
| 162 | `Ignoring route "${route.path}" because it is not supported on arm64 platforms (route requires browser "${route.browser.name}").`, |
| 163 | ); |
| 164 | return false; |
| 165 | } |
| 166 | return true; |
| 167 | } |
| 168 | |
| 169 | protected async loadPwVersions(): Promise<void> { |
| 170 | // Consumer's package.json wins — downstream projects can declare their |