UNPKG

@endo/compartment-mapper

Version:

The compartment mapper assembles Node applications in a sandbox

24 lines 1.54 kB
/** * Synchronous import for dynamic requires. * * @param {ReadNowPowers} readPowers * @param {string} baseLocation * @param {MakeImportNowHookMakerOptions} options * @returns {ImportNowHookMaker} */ export function makeImportNowHookMaker(readPowers: ReadNowPowers, baseLocation: string, { sources, compartmentDescriptors, computeSha512, searchSuffixes, archiveOnly, sourceMapHook, importNowHook: exitModuleImportNowHook, }: MakeImportNowHookMakerOptions): ImportNowHookMaker; export function exitModuleImportHookMaker({ modules, exitModuleImportHook, entryCompartmentName, }: { modules?: Record<string, any> | undefined; exitModuleImportHook?: ExitModuleImportHook | undefined; entryCompartmentName: string; }): ExitModuleImportHook | undefined; export function makeImportHookMaker(readPowers: ReadFn | ReadPowers, baseLocation: string, { sources, compartmentDescriptors, archiveOnly, computeSha512, searchSuffixes, sourceMapHook, entryCompartmentName, entryModuleSpecifier, importHook: exitModuleImportHook, }: MakeImportHookMakerOptions): ImportHookMaker; import type { ReadNowPowers } from './types.js'; import type { MakeImportNowHookMakerOptions } from './types.js'; import type { ImportNowHookMaker } from './types.js'; import type { ExitModuleImportHook } from './types.js'; import type { ReadFn } from './types.js'; import type { ReadPowers } from './types.js'; import type { MakeImportHookMakerOptions } from './types.js'; import type { ImportHookMaker } from './types.js'; //# sourceMappingURL=import-hook.d.ts.map