MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / absolutePreviewUrl

Function absolutePreviewUrl

packages/cli/src/commands/preview.ts:293–296  ·  view source on GitHub ↗
(port: number, path: string, host = "127.0.0.1")

Source from the content-addressed store, hash-verified

291}
292
293function 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
298function hasExplicitPreviewPort(argv: string[]): boolean {
299 return argv.some((arg) => arg === "--port" || arg.startsWith("--port="));

Callers 2

printCurrentSelectionFunction · 0.85
printCurrentContextFunction · 0.85

Calls 1

previewBaseUrlFunction · 0.85

Tested by

no test coverage detected