Expand description
package.json parsing and pre-processing for Components.js metadata.
Reads the lsd:* fields that Components.js adds to package.json:
| Field | Meaning |
|---|---|
lsd:module | true (auto-expand) or an explicit module IRI string |
lsd:components | relative path to components.jsonld |
lsd:contexts | map of context IRI → relative path to the context file |
lsd:importPaths | map of IRI prefix → relative directory for import resolution |
lsd:basePath | optional path prefix applied to all relative paths above |
preprocess_package_json handles the lsd:module: true shorthand: it expands the
module IRI to https://linkedsoftwaredependencies.org/bundles/npm/<name> and
auto-detects the standard components/ and config/ directories.
Structs§
- Package
Json - Parsed package.json with CJS-specific fields.
Enums§
- LsdModule
lsd:modulecan be eithertrueor a string IRI.
Functions§
- get_
module_ iri - Get the resolved module IRI from a PackageJson (after preprocessing).
- preprocess_
all - Preprocess all package.json files.
- preprocess_
package_ json - Preprocess a package.json: expand
lsd:module: trueinto full IRI, auto-detect components and config directories. MirrorsModuleStateBuilder.preprocessPackageJson. - read_
package_ jsons - Read package.json files from all given module directory URLs.