(port: number, path: string, host = "127.0.0.1")
| 291 | } |
| 292 | |
| 293 | function absolutePreviewUrl(port: number, path: string, host = "127.0.0.1"): string { |
| 294 | if (/^https?:\/\//.test(path)) return path; |
| 295 | return `${previewBaseUrl(port, host)}${path.startsWith("/") ? path : `/${path}`}`; |
| 296 | } |
| 297 | |
| 298 | function hasExplicitPreviewPort(argv: string[]): boolean { |
| 299 | return argv.some((arg) => arg === "--port" || arg.startsWith("--port=")); |
no test coverage detected