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

Function readScript

packages/studio-server/src/routes/storyboard.ts:30–40  ·  view source on GitHub ↗

Read the companion SCRIPT.md narration doc if it exists alongside the storyboard.

(projectDir: string)

Source from the content-addressed store, hash-verified

28
29/** Read the companion SCRIPT.md narration doc if it exists alongside the storyboard. */
30function readScript(projectDir: string): { exists: boolean; path: string; content: string } {
31 const abs = resolveWithinProject(projectDir, SCRIPT_FILENAME);
32 if (abs && existsSync(abs)) {
33 try {
34 return { exists: true, path: SCRIPT_FILENAME, content: readFileSync(abs, "utf-8") };
35 } catch {
36 /* fall through to absent */
37 }
38 }
39 return { exists: false, path: SCRIPT_FILENAME, content: "" };
40}
41
42export function registerStoryboardRoutes(api: Hono, adapter: StudioApiAdapter): void {
43 // Parsed storyboard manifest for a project. Markdown (STORYBOARD.md) stays

Callers 1

registerStoryboardRoutesFunction · 0.85

Calls 1

resolveWithinProjectFunction · 0.85

Tested by

no test coverage detected