Lines 1366-1406javascript
1366 /** Rejected with a migration hint: zod would otherwise strip the key and silently drop the old timeout. */
1367 timeoutMs: z6.never("`timeoutMs` was replaced by `readyTimeoutMs`, `commandTimeoutMs`, and per-agent `agents.<agent>.timeout` ({ globalMs, inactivityMs }); see the README's Timeouts section").optional(),
1368 /** Max time for browser preflight and the app-ready wait, in milliseconds. */
1369 readyTimeoutMs: z6.number().int().positive().default(12e4),
1370 /** Max runtime for each install/setup/stop shell command, in milliseconds. */
1371 commandTimeoutMs: z6.number().int().positive().default(10 * 6e4),
1372 /** Verify the review browser can launch before spending any agent time. */
1373 preflight: z6.boolean().default(true),
1374 diff: diffConfigSchema.default(defaultDiffConfig),
1375 agents: agentsSchema.prefault({}),
1376 comment: commentConfigSchema.prefault({}),
1377 suggestions: suggestionsConfigSchema.prefault({}),
1378 /** Review only commits since the last completed review, carrying previous findings forward. Falls back to a full-PR review when no previous state exists or history was rewritten. */
1379 incremental: z6.boolean().default(true)
1381function defineConfig(config) {
1384async function loadConfig(cwd, configPath) {
1385 const absolutePath = path5.resolve(cwd, configPath ?? "revuiw.config.ts");
1386 const jiti = createJiti(pathToFileURL(import.meta.url).href);
1387 const loaded = await jiti.import(absolutePath, { default: true });
1388 return uiReviewConfigSchema.parse(loaded);
MediumDynamic Require
Package source references dynamic require/import behavior.
dist/chunk-PEPGQ2VM.jsView on unpkg · L1386 1391// src/html-report.ts
1392import { readdir, readFile as readFile3, stat, writeFile as writeFile6 } from "fs/promises";
1393import path6 from "path";
1394var log6 = logger.child("report");
1395var DEFAULT_MAX_IMAGE_BYTES = 5 * 1024 * 1024;
1396var DEFAULT_MAX_TOTAL_BYTES = 50 * 1024 * 1024;
1397var MIME_BY_EXTENSION = {
1398 ".png": "image/png",
1399 ".jpg": "image/jpeg",
1400 ".jpeg": "image/jpeg",
1401 ".webp": "image/webp",
1404async function writeHtmlReport(options) {
1405 const maxImageBytes = options.maxImageBytes ?? DEFAULT_MAX_IMAGE_BYTES;
1406 const maxTotalBytes = options.maxTotalBytes ?? DEFAULT_MAX_TOTAL_BYTES;