Constructs virtual package file system.
Root package URI. package:root
by default.
URI of the root package.
Registers virtual package with automatically generated URI.
Replaces package under the same URI.
Replaces package with the same name and version, unless allowDuplicate
parameter is set.
package.json
contents.
Optional
options: VirtualPackageOptionsAdded package options.
this
instance.
Registers virtual package at the given URI.
Replaces package under the same URI.
Replaces package with the same name and version, unless allowDuplicate
parameter is set.
Package URI.
package.json
contents.
Optional
options: VirtualPackageOptionsAdded package options.
this
instance.
Registers root virtual package.
Replaces existing root package.
Replaces package with the same name and version, unless allowDuplicate
parameter is set.
package.json
contents.
Optional
options: VirtualPackageOptionsAdded package options.
this
instance.
Dereferences package entry.
Host package which entry to resolve.
Package or its entry import specifier.
Promise resolved to either module URI, or undefined
if nothing to dereference.
Searches for package directory containing the given file or URI.
URI of the target file or directory.
Promise resolved to either enclosing package directory, or undefined
if not found.
Tries to load package info from the given directory.
By default, detects package info by the loaded package.json
contents.
Source directory.
Promise resolved to either loaded package info contents, or undefined
if directory does not contain
valid package.json
file.
Recognizes import specifier and parses it accordingly.
In contrast to recognizeImport, this method may recognize imports specific to file system.
By default, calls recognizeImport function.
Import specifier to recognize. May be recognized already.
Recognized import specifier.
Extracts package URI from compatible URI import specifier.
Absolute URI import specifier.
Either package URI, or undefined
if the URI can not be used to access packages.
Resolves a package by name against another one.
Note that returned URI is not necessary the one of package directory. Call findPackageDir in order to find one.
Package to resolve another one against.
Package name to resolve.
Promise resolved to either module URI, or undefined
if the name can not be resolved.
Resolves path relatively to package.
By default, uses URI resolution.
The base to resolve the path
against.
Path or URI to resolve.
URI of the resolved path.
Generated using TypeDoc
Virtual package file system.
Serves packages registered with addPackage method.
Package URIs has to have
package:
scheme.Can be used e.g. for testing.