Lines 947-987javascript
947 setup: commandSchema.optional(),
948 start: z4.string().min(1),
949 ready: z4.string().url(),
950 stop: commandSchema.optional(),
951 /** Rejected with a migration hint: zod would otherwise strip the key and silently drop the old timeout. */
952 timeoutMs: z4.never("`timeoutMs` was replaced by `readyTimeoutMs`, `commandTimeoutMs`, and per-agent `agents.<agent>.timeout` ({ globalMs, inactivityMs }); see the README's Timeouts section").optional(),
953 /** Max time for browser preflight and the app-ready wait, in milliseconds. */
954 readyTimeoutMs: z4.number().int().positive().default(12e4),
955 /** Max runtime for each install/setup/stop shell command, in milliseconds. */
956 commandTimeoutMs: z4.number().int().positive().default(10 * 6e4),
957 /** Verify the review browser can launch before spending any agent time. */
958 preflight: z4.boolean().default(true),
959 diff: diffConfigSchema.default(defaultDiffConfig),
960 agents: agentsSchema.prefault({})
962function defineConfig(config) {
965async function loadConfig(cwd, configPath) {
966 const absolutePath = path5.resolve(cwd, configPath ?? "revuiw.config.ts");
967 const jiti = createJiti(pathToFileURL(import.meta.url).href);
968 const loaded = await jiti.import(absolutePath, { default: true });
969 return uiReviewConfigSchema.parse(loaded);
MediumDynamic Require
Package source references dynamic require/import behavior.
dist/chunk-RJ7H7EUB.jsView on unpkg · L967 973import { readdir, readFile as readFile3, stat, writeFile as writeFile5 } from "fs/promises";
974import path6 from "path";
975var log6 = logger.child("report");
976var DEFAULT_MAX_IMAGE_BYTES = 5 * 1024 * 1024;
977var DEFAULT_MAX_TOTAL_BYTES = 50 * 1024 * 1024;
978var MIME_BY_EXTENSION = {
980 ".jpg": "image/jpeg",
981 ".jpeg": "image/jpeg",
982 ".webp": "image/webp",
985async function writeHtmlReport(options) {
986 const maxImageBytes = options.maxImageBytes ?? DEFAULT_MAX_IMAGE_BYTES;
987 const maxTotalBytes = options.maxTotalBytes ?? DEFAULT_MAX_TOTAL_BYTES;