wrld-pkg-installer
v0.1.0
Published
Manifest-driven installer for WRLD Components and Apps.
Readme
wrld-pkg-installer
Manifest-driven installer for WRLD Components and WRLD Apps.
Quick start
- Initialize a registry:
node .\\bin\\wrld-pkg.mjs registry init- Install a package from a registry:
node .\\bin\\wrld-pkg.mjs install component @wrld/some-component --registry .\\wrld-registry.json
node .\\bin\\wrld-pkg.mjs install app some-app --registry .\\wrld-registry.jsonBy default, packages install into ./.wrld/:
- Components:
./.wrld/components/<name>/... - Apps:
./.wrld/apps/<name>/...
Use --root <dir> to change the install root, or --global to install into a user-level location (Windows: %LOCALAPPDATA%\\wrld).
Install metadata
- Lockfile:
<root>/wrld-lock.json - Per-package marker:
<root>/(components|apps)/.../.wrld-installed.json
Registry format (wrld-registry.json)
{
"registryVersion": 1,
"packages": {
"component": {
"@wrld/example-component": {
"latest": "1.0.0",
"versions": {
"1.0.0": {
"source": { "kind": "dir", "path": "./path/to/package" }
// or: { "kind": "archive", "url": "https://host/pkg.zip", "sha256": "..." }
}
}
}
},
"app": {}
}
}Notes:
source.kind="dir"readswrld-package.jsonfrom that directory.source.kind="archive"downloads/copies the archive then extracts it (requirestaron PATH).- Relative
path/urlvalues resolve relative to the registry file location.
Package manifest (wrld-package.json)
{
"name": "@wrld/example-component",
"type": "component",
"version": "1.0.0",
"dependencies": [
{ "type": "component", "name": "@wrld/core", "version": "latest" }
]
}Dependencies are optional and installed from the same registry by default (use --no-deps to skip).
Packing an archive
node .\\bin\\wrld-pkg.mjs pack .\\path\\to\\package --out .\\out\\package.ziptar chooses the archive format based on the output filename, so prefer .zip or .tar.gz.
Electron GUI
Run the desktop GUI:
npm install
npm run gui