MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / buildLintMetaCatalog

Function buildLintMetaCatalog

apps/docs/scripts/docs-catalog-lib.mjs:65–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65export function buildLintMetaCatalog() {
66 const uiRoot = resolveTemplateRoot("BORINGSTACK_UI_DIR", "ui");
67 const apiRoot = resolveTemplateRoot("BORINGSTACK_API_DIR", "api");
68
69 if (!existsSync(uiRoot)) {
70 throw new Error(`apps/ui not found at ${uiRoot}`);
71 }
72
73 if (!existsSync(apiRoot)) {
74 throw new Error(`apps/api not found at ${apiRoot}`);
75 }
76
77 for (const [label, root, relPath] of [
78 ["ui", uiRoot, "scripts/lint-meta/export-catalog.ts"],
79 ["api", apiRoot, "scripts/lint-meta/export-catalog.ts"],
80 ]) {
81 if (!existsSync(join(root, relPath))) {
82 throw new Error(
83 `${label} is missing ${relPath}. Ensure apps/ui and apps/api export scripts exist (monorepo checkout).`
84 );
85 }
86 }
87
88 return {
89 ui: runJsonExport(uiRoot, "bun", [
90 "run",
91 "scripts/lint-meta/export-catalog.ts",
92 ]),
93 api: runJsonExport(apiRoot, "bun", [
94 "run",
95 "scripts/lint-meta/export-catalog.ts",
96 ]),
97 };
98}
99
100function parseMarkdownTableSection(text, heading) {
101 const sectionRegex = new RegExp(

Callers 1

Calls 2

resolveTemplateRootFunction · 0.85
runJsonExportFunction · 0.85

Tested by

no test coverage detected