(cwd, command, args)
| 36 | const JSON_EXPORT_TIMEOUT_MS = 60_000; |
| 37 | |
| 38 | function runJsonExport(cwd, command, args) { |
| 39 | let stdout; |
| 40 | |
| 41 | try { |
| 42 | stdout = execFileSync(command, args, { |
| 43 | cwd, |
| 44 | encoding: "utf8", |
| 45 | stdio: ["ignore", "pipe", "pipe"], |
| 46 | timeout: JSON_EXPORT_TIMEOUT_MS, |
| 47 | }); |
| 48 | } catch (error) { |
| 49 | const stderr = |
| 50 | error !== null && typeof error === "object" && "stderr" in error |
| 51 | ? String(error.stderr ?? "").trim() |
| 52 | : ""; |
| 53 | const reason = error instanceof Error ? error.message : String(error); |
| 54 | |
| 55 | throw new Error( |
| 56 | `[docs] ${command} ${args.join(" ")} failed in ${cwd}: ${reason}${ |
| 57 | stderr === "" ? "" : `\n--- child stderr ---\n${stderr}` |
| 58 | }` |
| 59 | ); |
| 60 | } |
| 61 | |
| 62 | return JSON.parse(stdout); |
| 63 | } |
| 64 | |
| 65 | export function buildLintMetaCatalog() { |
| 66 | const uiRoot = resolveTemplateRoot("BORINGSTACK_UI_DIR", "ui"); |
no outgoing calls
no test coverage detected