0.5.0 • Published 7 years ago

node-opkg v0.5.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

node-opkg

A simple command-line wrapper around the openwrt opkg package manager.

Allows to usage with a Node API.

Information: https://wiki.openwrt.org/doc/techref/opkg

Installation

Available as npm module:

npm install node-opkg

Usage

All methods return Promises. Command line options can be defined in the following ways:

{forceDepends: null, V: 4}
[--force-depends, -V4]

You can also get the output streams via the options argument:

{
  forceDepends: null,
  _stdout: (stdout) => {},
  _stderr: (stderr) => {}
}

Functions

update ⇒ Promise

Update package lists (update)

ParamTypeDescription
optsArray | ObjectCommand-line options

upgrade ⇒ Promise

Upgrade package(s) (upgrade)

ParamTypeDescription
pkgString | Array.<String>Package(s)
optsArray | ObjectCommand-line options

install ⇒ Promise

Install package(s) (install)

ParamTypeDescription
pkgString | Array.<String>Package(s)
optsArray | ObjectCommand-line options

configure ⇒ Promise

Configure package(s) (configure)

ParamTypeDescription
pkgString | Array.<String>Package(s)
optsArray | ObjectCommand-line options

remove ⇒ Promise

Remove package(s) (remove)

ParamTypeDescription
pkgString | Array.<String>Package(s)
optsArray | ObjectCommand-line options

flag ⇒ Promise

Flag package(s) (flag)

ParamTypeDescription
flagStringFlag
pkgString | Array.<String>Package(s)
optsArray | ObjectCommand-line options

list ⇒ Promise

Lists packages (list)

ParamTypeDescription
listStringList type ('available', 'installed', 'upgradable')
pkgString | Array.<String>Argument for 'available'
optsArray | ObjectCommand-line options

listPackages ⇒ Promise

Lists available packages (list)

ParamTypeDescription
pkgString | Array.<String>Package name(s)
optsArray | ObjectCommand-line options

listPackages ⇒ Promise

Lists installed packages (list)

ParamTypeDescription
optsArray | ObjectCommand-line options

listPackages ⇒ Promise

Lists upgradable packages (list)

ParamTypeDescription
optsArray | ObjectCommand-line options

changedConffiles ⇒ Promise

Lists changed config files (list-changed-conffiles)

ParamTypeDescription
optsArray | ObjectCommand-line options

files ⇒ Promise

Shows package files (files)

ParamTypeDescription
pkgString | Array.<String>Package name(s)
optsArray | ObjectCommand-line options

status ⇒ Promise

Find package providing given file

ParamTypeDescription
qStringQuery
optsArray | ObjectCommand-line options

info ⇒ Promise

Shows package info (info)

ParamTypeDescription
pkgString | Array.<String>Package name(s)
optsArray | ObjectCommand-line options

status ⇒ Promise

Shows package status(es) (status)

ParamTypeDescription
pkgString | Array.<String>Package name(s)
optsArray | ObjectCommand-line options

find ⇒ Promise

Finds a package by query string

ParamTypeDescription
qStringQuery string

setExecPath

Sets the opkg executable path

ParamTypeDescription
pathStringPath to executable

Changelog

  • 0.5.0 - Initial release