Module Descriptor
December 6, 2017 ยท View on GitHub
Interfaces
interface RemoteSourceDescriptor {
base?: string;
proxy?: string;
default?: string;
auth?: "none" | "basic";
origin?: string;
origins?: { [name: string]: string };
}
interface RemoteRelativeDescriptor {
path: string;
}
interface ModuleDescriptor extends ComponentDescriptor {
remote?: RemoteSourceDescriptor | RemoteRelativeDescriptor;
lookup?: { [name: string]: string };
modules?: Array<ModuleDescriptor> | FugaziMap<ModuleDescriptor>;
types?: url | Array<TypeDescriptor> | FugaziMap<TypeDescriptor>;
commands?: url | Array<CommandDescriptor> | FugaziMap<CommandDescriptor>;
converters?: url | Array<ConverterDescriptor> | FugaziMap<ConverterDescriptor>;
constraints?: url | Array<ConstraintDescriptor> | FugaziMap<ConstraintDescriptor>;
}
Properties
RemoteSourceDescriptor
-
base
optionalstring
The base path which should be added to the origin for all requests.
-
proxy
optionalstring
Required only if serving remote requests which don't support
CORS(MDN | Wikipedia).
The path relative to the endpoint which serves the source for the proxy frame. -
default
optionalstring
The name of the default origin to use.
If not specified then the first one is assumed to be the default. -
auth
optionalnone|basic
Should http requests be authenticated.
Currently only basic authentication is supported. -
origin
optionalstring
The base url to which all http requests from this module will be issued.
-
origins
optionalmapof name (string) to origin (string)
The base urls to which all http requests from this module will be issued.
RemoteRelativeDescriptor
-
path
requiredstring
The url path addition to add to all http requests in this module.
ModuleDescriptor
-
remote
optionalRemoteSourceDescriptororRemoteRelativeDescriptor
The http endpoints configuration
-
modules
optionalarrayormapofModuleDescriptor
A collection of inner modules, in case of
mapthe key will be used as the inner module name -
types
optionalstringorarrayormapofTypeDescriptor
A collection of module types.
When a
stringis used the types will be loaded from a different descriptor.
If a relative pass is used then it will be relative to the url of the containing descriptor.
The descriptor will be loaded as a json using a http request.If a
mapis used then the key will be used as the type name. -
commands
optionalstringorarrayormapofCommandDescriptor
A collection of module commands.
When a
stringis used the types will be loaded from a different descriptor.
If a relative pass is used then it will be relative to the url of the containing descriptor. The descriptor will be loaded asjavascriptusing thescripttag.If a
mapis used then the key will be used as the command name. -
converters
optionalstringorarrayormapofConverterDescriptor
A collection of module converters.
When a
stringis used the types will be loaded from a different descriptor.
If a relative pass is used then it will be relative to the url of the containing descriptor.
The descriptor will be loaded asjavascriptusing thescripttag.If a
mapis used then the key will be used as the converter name. -
constraints
optionalstringorarrayormapofConstraintDescriptor
A collection of module constraints.
When a
stringis used the types will be loaded from a different descriptor.
If a relative pass is used then it will be relative to the url of the containing descriptor. The descriptor will be loaded asjavascriptusing thescripttag.If a
mapis used then the key will be used as the constraint name.