lavamoat-core
Version:
LavaMoat kernel and utils
33 lines • 1.19 kB
TypeScript
declare namespace _exports {
export { GeneratePolicyFromFilesOpts, PlatformRunScenarioOpts, PlatformRunScenario, FsPromiseApi };
}
declare const _exports: any;
export = _exports;
type GeneratePolicyFromFilesOpts = Partial<import("../src/parseForPolicy").ParseForPolicyOpts> & {
files: import("./scenario").NormalizedScenarioJSFile[];
};
/**
* Options for {@link PlatformRunScenario}
*/
type PlatformRunScenarioOpts<Result = unknown> = {
scenario: import("./scenario").NormalizedScenario<Result>;
runWithPrecompiledModules?: boolean | undefined;
log?: ((...args: any[]) => void) | undefined;
};
/**
* Scenario runner function provided by the consuming platform.
*
* Called by {@link runAndTestScenario}
*/
type PlatformRunScenario<Result = unknown> = (opts: PlatformRunScenarioOpts<Result>) => Promise<Result>;
/**
* The subset of the `fs/promises` module that is used by
* `prepareScenarioOnDisk`.
*/
type FsPromiseApi = {
mkdir: (dir: string, opts?: import("node:fs").MakeDirectoryOptions & {
recursive: true;
}) => Promise<string | undefined>;
writeFile: (filepath: string, data: any) => Promise<void>;
};
//# sourceMappingURL=util.d.ts.map