@dlenroc/roku-odc
    TypeScript icon, indicating that this package has built-in type declarations

    1.4.0 • Public • Published

    @dlenroc/roku-odc · NPM Version

    Client for runtime utilities

    Installation

    npm install @dlenroc/roku-odc

    Usage

    ⚠️ extend(app) must be used to inject backend into your application

    import fs from 'fs';
    import SDK, { DeveloperServer, ODC } from '@dlenroc/roku';
    
    const app = fs.readFileSync('<path_to_channel>');
    
    // SDK
    const sdk = new SDK('<ip>', '<username>', '<password>');
    const patchedApp = await sdk.odc.extend(app);
    await sdk.developerServer.install(patchedApp);
    await sdk.odc.getRegistry();
    
    // ODC
    const odc = new ODC('<ip>');
    const developerServer = new DeveloperServer('<ip>', '<username>', '<password>');
    const patchedApp = await odc.extend(app);
    await developerServer.install(patchedApp);
    await odc.getRegistry();

    extend(app: Buffer): Promise<Buffer>
    getAppUI(fields?: Record<string, string[]>): Promise<string>
    getRegistry(): Promise<Record<string, Record<string, string>>>
    patchRegistry(changes: Record<string, null | Record<string, any>>): Promise<void>
    clearRegistry(): Promise<void>
    getFiles(path: string): Promise<(File | Directory)[]>
    pullFile(path: string): Promise<Buffer>
    pushFile(path: string, content: string | Buffer): Promise<void>

    Launch parameters

    All of the above commands require the application to be up and running, but some of them can also be run using ECP during startup

    await ecp.launch('dev', { odc_clear_registry: true })
    await ecp.launch('dev', { odc_registry: /* state */ })
    await ecp.launch('dev', { odc_entry_point: 'channel' | 'screensaver' | 'screensaver-settings' })

    Keywords

    Install

    npm i @dlenroc/roku-odc

    DownloadsWeekly Downloads

    57

    Version

    1.4.0

    License

    MIT

    Unpacked Size

    72.4 kB

    Total Files

    52

    Last publish

    Collaborators

    • dlenroc