Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

switch-dbi

vKolerts45ISC1.1.4

DBI backend server for nsp installing by usb

dbi, switch, nsp, usb

readme

DBI backend module

Node.JS port of https://github.com/lunixoid/dbibackend

Install

  npm i switch-dbi

Use:

  const eventListenerExample = (eventTitle, data) => {
    /*eventTitles = [
      'connected',
      'waitDevice',
      'proccessCmdExit',
      'proccessCmdList',
      'proccessCmdFileRange',
      'readFileRange',
      'unknownCmd',
      'error',
    ]*/
    console.log(eventTitle, data)
  };

  const DBI = require('switch-dbi');
  const dbi = new DBI(
    [
      'path/to/file1.nsp',
      'path/to/file2.nsp'
    ],
    eventListenerExample // optional
  );

  dbi
  .start() // async
  .catch(console.error);