Lines 881-921javascript
881 maxFileChangedLines: z4.number().int().positive().default(defaultDiffLimits.maxFileChangedLines),
882 maxTotalBytes: z4.number().int().positive().default(defaultDiffLimits.maxTotalBytes)
884var uiReviewConfigSchema = z4.object({
885 install: commandSchema.optional(),
886 setup: commandSchema.optional(),
887 start: z4.string().min(1),
888 ready: z4.string().url(),
889 stop: commandSchema.optional(),
890 timeoutMs: z4.number().int().positive().default(12e4),
891 /** Verify the review browser can launch before spending any agent time. */
892 preflight: z4.boolean().default(true),
893 diff: diffConfigSchema.default(defaultDiffConfig),
894 agents: agentsSchema.default({ reviewer: { adapter: "claude-code" } })
896function defineConfig(config) {
899async function loadConfig(cwd, configPath) {
900 const absolutePath = path5.resolve(cwd, configPath ?? "revuiw.config.ts");
901 const jiti = createJiti(pathToFileURL(import.meta.url).href);
902 const loaded = await jiti.import(absolutePath, { default: true });
903 return uiReviewConfigSchema.parse(loaded);
MediumDynamic Require
Package source references dynamic require/import behavior.
dist/chunk-EUVXWYTH.jsView on unpkg · L901 907import { readdir, readFile as readFile3, stat, writeFile as writeFile5 } from "fs/promises";
908import path6 from "path";
909var log6 = logger.child("report");
910var DEFAULT_MAX_IMAGE_BYTES = 5 * 1024 * 1024;
911var DEFAULT_MAX_TOTAL_BYTES = 50 * 1024 * 1024;
912var MIME_BY_EXTENSION = {
914 ".jpg": "image/jpeg",
915 ".jpeg": "image/jpeg",
916 ".webp": "image/webp",
919async function writeHtmlReport(options) {
920 const maxImageBytes = options.maxImageBytes ?? DEFAULT_MAX_IMAGE_BYTES;
921 const maxTotalBytes = options.maxTotalBytes ?? DEFAULT_MAX_TOTAL_BYTES;