histoire
Version:
A fast story book powered by Vite
39 lines • 2.22 kB
TypeScript
import type { PluginConfigContext } from '@histoire/shared';
import type { Context } from '../context.js';
import type { ScreenshotSetupOwner } from './browser/setup/types.js';
import type { ExecutionService } from './execution-service.js';
/** Returns the registry belonging to the exact context object, including fixtures. */
export declare function getContextRegistry(ctx: Context): {
/** Reverse-order acquired-resource ownership. */
cleanup: {
readonly isClosing: boolean;
add(cleanup: import("./cleanup.js").RuntimeCleanup): void;
close(): Promise<void>;
};
/** Internal, context-scoped publication channel. */
events: {
on<K extends keyof import("./events.js").ProjectEvents>(event: K, handler: (value: import("./events.js").ProjectEvents[K]) => unknown): () => void;
emit<K extends keyof import("./events.js").ProjectEvents>(event: K, value: import("./events.js").ProjectEvents[K]): void;
clear(): void;
};
/** Isolated mutable plugin and optimizer output. */
tempDir: string;
/** Trusted root/cleanup access available during configuration hooks. */
pluginContext: PluginConfigContext;
/** At most one filesystem story watcher per context, without process exclusion. */
storyWatcher: object | undefined;
/** Dev owner captured before Vite plugins configure finite execution routes. */
execution: {
service: ExecutionService;
isActive: () => boolean;
} | undefined;
/** One browser setup owner for this exact captured context/configuration. */
screenshotSetup: ScreenshotSetupOwner | undefined;
};
/** Returns the lazily acquired browser setup owner scoped to this Context. */
export declare function getContextScreenshotSetup(ctx: Context, isActive?: () => boolean): ScreenshotSetupOwner;
/** Creates a Context-configured owner whose caller controls its narrower lifetime. */
export declare function createContextScreenshotSetup(ctx: Context, isActive?: () => boolean): ScreenshotSetupOwner;
/** Releases captured context resources once, including partially resolved plugins. */
export declare function closeContext(ctx: Context): Promise<void>;
//# sourceMappingURL=registry.d.ts.map