@web3os-core/3pm

Manage installed packages

Author:
License:
  • MIT

Methods

# (async, static) install(urlnon-null, argsopt) → {Promise.<(boolean|ModInfo)>}

Install a package

Parameters:
Name Type Attributes Description
url string

The package URL (or just package name to use default registry)

args Object <optional>

The arguments for the installation

Properties
Name Type Attributes Default Description
warn boolean <optional>
true

Show the installation warning if the user has never seen it

Returns:

ModInfo or false on error

Type
Promise.<(boolean|ModInfo)>

# (async, static) run(term, context) → {any}

Run the 3pm CLI

Parameters:
Name Type Description
term Web3osTerminal

The terminal to attach to

context string

The arguments string to parse

Returns:

result of the command

Type
any

# (async, static) uninstall(namenon-null) → {boolean}

Uninstall a package

Parameters:
Name Type Description
name string

The name of the package to uninstall

Returns:

true if the package was uninstalled

Type
boolean

Type Definitions

# ModInfo

ModInfo Object

Properties
Name Type Description
name string

Module name

description string

Module description

help string

Module help information

url string

Module URL

pkgJson string

Module package.json

Properties
Name Type Description
web3osData string

Data specific to web3os