histoire
Version:
A fast story book powered by Vite
22 lines • 971 B
TypeScript
import type { Plugin as VitePlugin } from 'vite';
import type { BrowserCollectedStoryResult } from './types.js';
/** HTTP endpoint the generated browser specs post their collection results to. */
export declare const BROWSER_COLLECTION_ENDPOINT = "/__histoire_browser_collect__";
/**
* Creates the HTTP channel the browser collection reports its results through.
*
* Results cannot come back through Vitest's own reporting: the collected story
* data is far too large for a test name/error payload, so the generated specs
* POST it to a middleware installed on the run's own Vite server instead.
* Results are keyed by run token so a stale run can never leak into a new one.
*/
export declare function createCollectionChannel(): {
plugin: VitePlugin<any>;
read(token: string): {
results: Map<string, BrowserCollectedStoryResult>;
failures: Map<string, {
error: string;
}>;
};
};
//# sourceMappingURL=channel.d.ts.map