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

Function compositionEntryErrorMessage

packages/cli/src/utils/renderArgs.ts:179–203  ·  view source on GitHub ↗
(error: CompositionEntryParseError)

Source from the content-addressed store, hash-verified

177}
178
179function compositionEntryErrorMessage(error: CompositionEntryParseError): {
180 title: string;
181 message: string;
182 hint?: string;
183} {
184 switch (error.kind) {
185 case "outside-project":
186 return {
187 title: "Invalid composition path",
188 message: `Entry file must stay inside the project directory: ${error.entryFile}`,
189 };
190 case "not-found":
191 return {
192 title: "Composition not found",
193 message: `"${error.entryFile}" does not exist in the project directory.`,
194 hint: "Pass a path to a .html file relative to the project root (e.g. compositions/intro.html).",
195 };
196 case "not-a-file":
197 return {
198 title: "Invalid composition path",
199 message: `"${error.entryFile}" is a directory, not an .html file.`,
200 hint: "Pass a path to a .html file (e.g. compositions/intro.html), or omit --composition to render index.html.",
201 };
202 }
203}
204
205/**
206 * Side-effecting wrapper around `parseCompositionEntryArg`. Exits the

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected