@endo/compartment-mapper
Version:
The compartment mapper assembles Node applications in a sandbox
294 lines (69 loc) • 8.38 kB
JavaScript
/**
* These types describe the schema of a `compartment-map.json`, which
* in turn describes how to load and link an application from storage, like a
* file system, web host, or zip archive.
*
* @module
*/
/* eslint-disable no-use-before-define */
/**
* The type of a {@link CompartmentMapDescriptor.compartments} property.
*/
/**
* A compartment map describes how to construct an application as a graph of
* Compartments, each corresponding to Node.js style packaged modules.
*/
/**
* The type of a {@link PackageCompartmentMapDescriptor.compartments} property.
*/
/**
* The {@link CompartmentDescriptor} type in the
* {@link PackageCompartmentMapDescriptor} returned by `mapNodeModules()`
*/
/**
* The entry descriptor of a compartment map denotes the root module of an
* application and the compartment that contains it.
*/
/**
* Keys of {@link PackageCompartmentMapDescriptor.compartments}
*/
/**
* A compartment descriptor corresponds to a single Compartment
* of an assembled Application and describes how to construct
* one for a given library or application `package.json`.
*/
/**
* A compartment descriptor digested by `digestCompartmentMap()`
*/
/**
* For every module explicitly mentioned in an `exports` field of a
* `package.json`, there is a corresponding `ModuleConfiguration`.
*/
/**
* This module configuration is a reference to another module in a a compartment descriptor (it may be the same compartment descriptor)
*/
/**
* A module configuration representing an exit module
*/
/**
* A module configuration representing a file on disk
*/
/**
* Scope descriptors link all names under a prefix to modules in another
* compartment, like a wildcard.
* These are employed to link any module not explicitly mentioned
* in a `package.json` file, when that `package.json` file does not have
* an explicit `exports` map.
*/
/**
* Natively-recognized and custom languages
*/
/**
* Languages natively recognized by `compartment-mapper`
*/
/**
* Mapping of file extension to {@link Language Languages}.
*/
/**
* Mapping of module specifier to {@link Language Languages}.
*/