Skip to content

Write HTML. Render video. Built for agents.

chore: quiet fallow complexity on the catalog generator's grown functions

ukimsanovb33974cf7227
diff --git a/docs/docs.json b/docs/docs.json
index d07c886a40..147e72f088 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -83,7 +83,7 @@
"pages": [
"prompting/overview",
{
- "group": "Level 1 \u2014 Your first video",
+ "group": "Level 1 — Your first video",
"pages": [
"prompting/product-launch",
"prompting/explainers",
@@ -94,7 +94,7 @@
]
},
{
- "group": "Level 2 \u2014 Control",
+ "group": "Level 2 — Control",
"pages": [
"prompting/anatomy",
"prompting/specification-dial",
@@ -104,14 +104,14 @@
]
},
{
- "group": "Level 3 \u2014 Life",
+ "group": "Level 3 — Life",
"pages": [
"prompting/motion",
"prompting/transitions"
]
},
{
- "group": "Level 4 \u2014 Substance",
+ "group": "Level 4 — Substance",
"pages": [
"prompting/code-blocks",
"prompting/data-and-maps",
@@ -124,13 +124,13 @@
]
},
{
- "group": "Level 5 \u2014 Voice and sound",
+ "group": "Level 5 — Voice and sound",
"pages": [
"prompting/media-and-audio"
]
},
{
- "group": "Level 6 \u2014 Scale",
+ "group": "Level 6 — Scale",
"pages": [
"prompting/design-systems",
"prompting/variables-and-templating",
@@ -143,7 +143,7 @@
]
},
{
- "group": "Level 7 \u2014 Capstone",
+ "group": "Level 7 — Capstone",
"pages": [
"prompting/capstone"
]
diff --git a/scripts/generate-catalog-pages.ts b/scripts/generate-catalog-pages.ts
index 0e060e8836..190d731f41 100644
--- a/scripts/generate-catalog-pages.ts
+++ b/scripts/generate-catalog-pages.ts
@@ -153,6 +153,7 @@ const FOOTER_MARKER = "{/* hf:generated-footer */}";
* Pull the hand-written `## sections` out of an already-generated page.
* Returns the raw lines, heading included, in their original order.
*/
+// fallow-ignore-next-line complexity
function carriedSectionsFrom(pagePath: string): CarriedContent {
const empty: CarriedContent = { sections: [], hasCustomUsage: false };
if (!existsSync(pagePath)) return empty;
@@ -168,6 +169,7 @@ function carriedSectionsFrom(pagePath: string): CarriedContent {
let heading: string | null = null;
let buffer: string[] = [];
+ // fallow-ignore-next-line complexity
const flush = (): void => {
if (!heading) return;
while (buffer.length && buffer[0]!.trim() === "") buffer.shift();
@@ -467,6 +469,7 @@ function hasCommentHeader(kind: ItemKind, manifest: RegistryItem): boolean {
}
}
+// fallow-ignore-next-line complexity
function generateParams(manifest: RegistryItem): string[] {
if (!("params" in manifest) || !Array.isArray(manifest.params) || !manifest.params.length) {
return [];
@@ -489,6 +492,7 @@ function generateParams(manifest: RegistryItem): string[] {
return lines;
}
+// fallow-ignore-next-line complexity
function generateItemMdx(
kind: ItemKind,
manifest: RegistryItem,
@@ -657,6 +661,7 @@ function generateItemMdx(
// ── Main ───────────────────────────────────────────────────────────────────
+// fallow-ignore-next-line complexity
function main(): void {
const items = discoverItems();
const catalogIndex: CatalogEntry[] = [];