histoire
Version:
A fast story book powered by Vite
10 lines (9 loc) • 559 B
JavaScript
import { measureWireValue } from '@histoire/protocol';
import { boundInspectionResult } from '../runtime/inspection/result.js';
/** Add source metadata on a detached copy, preserving the original retained result. */
export function createProjectInspectionResult(output, source, durationMs) {
const result = { ...structuredClone(output), mode: 'isolated', source: { ...source }, observedAt: new Date().toISOString(), durationMs };
boundInspectionResult(result);
measureWireValue(result, { maxBytes: 60 * 1024, maxDepth: 32 });
return result;
}