2.0.0 ā€¢ Published 5 months ago

@dlenroc/roku-developer-server v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@dlenroc/roku-developer-server Ā· NPM Version

Client for host utilities provided via a web page at http://<ip>

Installation

npm install @dlenroc/roku-developer-server

Usage

import { DeveloperServerExecutor, installChannel } from '@dlenroc/roku-developer-server';
import fs from 'node:fs';

const ctx = new DeveloperServerExecutor({
  address: 'http://<ip>',
  username: '<username>',
  password: '<password>',
});

const app = fs.readFileSync('<path_to_channel>');
await installChannel(ctx, { content: app });

šŸ“ Retrieving content from methods returning file paths requires an extra request.

const path = await takeScreenshot(ctx);
const response = await ctx.execute(path);
const content = await response.arrayBuffer();

MethodDescription
convertToSquashfsCompress sideloaded channel using Squashfs
convertToZipCompress sideloaded channel using Zip
deleteChannelDelete sideloaded channel
deletePackageDelete sideloaded channel package
inspectPackageInspect channel package
installChannelSideload a channel from a zip file
packageChannelPackage sideloaded channel and return path to it
rekeyRekey device from existing package signed with desired key
saveProfilingDataSaves the profiling data and returns the path to it
takeScreenshotTakes a screenshot of the sideloaded channel and returns the path to the image