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

Function resolveTemplateList

packages/cli/src/templates/generators.ts:32–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 * examples fetched from the registry. Offline / unreachable → bundled only.
31 */
32export async function resolveTemplateList(): Promise<TemplateOption[]> {
33 const bundled = [...BUNDLED_TEMPLATES];
34 const bundledIds = new Set(bundled.map((t) => t.id));
35
36 const entries = await listRegistryItems({ type: "hyperframes:example" });
37 const items = await loadAllItems(entries);
38
39 const remoteOptions: TemplateOption[] = items
40 .filter((item) => !bundledIds.has(item.name))
41 .map((item) => ({
42 id: item.name,
43 label: item.title,
44 hint: item.description,
45 source: "remote" as const,
46 }));
47
48 return [...bundled, ...remoteOptions];
49}

Callers 1

runFunction · 0.85

Calls 2

listRegistryItemsFunction · 0.85
loadAllItemsFunction · 0.85

Tested by

no test coverage detected