• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rokucommunity / roku-deploy / #1477

06 May 2025 04:12PM UTC coverage: 97.947% (-2.1%) from 100.0%
#1477

push

web-flow
Merge b93b688bd into 7eabfa61e

339 of 349 branches covered (97.13%)

Branch coverage included in aggregate %.

274 of 284 new or added lines in 11 files covered. (96.48%)

615 of 625 relevant lines covered (98.4%)

34.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.79
/src/commands/ExecCommand.ts
1
import { util } from '../util';
1✔
2
import type { RokuDeployOptions } from '../RokuDeployOptions';
3
import { rokuDeploy, type CloseChannelOptions, type ConvertToSquashfsOptions, type CreateSignedPackageOptions, type DeleteDevChannelOptions, type RekeyDeviceOptions, type SideloadOptions } from '../RokuDeploy';
1✔
4

5
export class ExecCommand {
1✔
6
    private actions: string[];
7

8
    // eslint-disable-next-line @typescript-eslint/ban-types
9
    private options: RokuDeployOptions;
10

11
    constructor(actions: string, rokuDeployOptions: RokuDeployOptions) {
12
        this.actions = actions.split('|');
5✔
13
        this.options = rokuDeployOptions;
5✔
14
    }
15

16
    async run() {
17
        //Load options from json, and overwrite with cli options
18
        this.options = {
5✔
19
            ...util.getOptionsFromJson(this.options),
20
            ...this.options
21
        };
22

23
        if (this.actions.includes('stage')) {
5!
24
            await rokuDeploy.stage(this.options);
5✔
25
        }
26

27
        if (this.actions.includes('zip')) {
5!
28
            await rokuDeploy.zip(this.options);
5✔
29
        }
30

31
        if (this.actions.includes('delete')) {
5!
NEW
32
            try {
×
NEW
33
                await rokuDeploy.deleteDevChannel(this.options as DeleteDevChannelOptions);
×
34
            } catch (e) {
35
                // note we don't report the error; as we don't actually care that we could not delete - it's just useless noise to log it.
36
            }
37
        }
38

39
        if (this.actions.includes('close')) {
5!
40
            await rokuDeploy.closeChannel(this.options as CloseChannelOptions);
5✔
41
        }
42

43
        if (this.actions.includes('sideload')) {
5!
44
            await rokuDeploy.sideload(this.options as SideloadOptions);
5✔
45
        }
46

47
        if (this.actions.includes('rekey')) {
5!
NEW
48
            await rokuDeploy.rekeyDevice(this.options as RekeyDeviceOptions);
×
49
        }
50

51
        if (this.actions.includes('squash')) {
5✔
52
            await rokuDeploy.convertToSquashfs(this.options as ConvertToSquashfsOptions);
1✔
53
        }
54

55
        if (this.actions.includes('sign')) {
5!
NEW
56
            await rokuDeploy.createSignedPackage(this.options as CreateSignedPackageOptions);
×
57
        }
58

59

60
    }
61
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc