diff --git a/src/RokuDeploy.spec.ts b/src/RokuDeploy.spec.ts index 59eec4f..eda8994 100644 --- a/src/RokuDeploy.spec.ts +++ b/src/RokuDeploy.spec.ts @@ -2016,7 +2016,7 @@ describe('index', () => { }); }); - describe('takeScreenshot', () => { + describe('captureScreenshot', () => { let onHandler: any; let screenshotAddress: any; diff --git a/src/RokuDeploy.ts b/src/RokuDeploy.ts index 29055ab..777aedc 100644 --- a/src/RokuDeploy.ts +++ b/src/RokuDeploy.ts @@ -614,7 +614,7 @@ export class RokuDeploy { /** * Gets a screenshot from the device. A side-loaded channel must be running or an error will be thrown. */ - public async captureScreenshot(options: TakeScreenshotOptions) { + public async captureScreenshot(options: CaptureScreenshotOptions) { options = this.getOptions(options); options.screenshotFile = options.screenshotFile ?? `screenshot-${dayjs().format('YYYY-MM-DD-HH.mm.ss.SSS')}`; let saveFilePath: string; @@ -916,7 +916,7 @@ export interface HttpResponse { body: any; } -export interface TakeScreenshotOptions { +export interface CaptureScreenshotOptions { /** * The IP address or hostname of the target Roku device. * @example '192.168.1.21' diff --git a/src/cli.spec.ts b/src/cli.spec.ts index f599044..06ce457 100644 --- a/src/cli.spec.ts +++ b/src/cli.spec.ts @@ -10,7 +10,7 @@ import { ConvertToSquashfsCommand } from './commands/ConvertToSquashfsCommand'; import { RekeyDeviceCommand } from './commands/RekeyDeviceCommand'; import { CreateSignedPackageCommand } from './commands/CreateSignedPackageCommand'; import { DeleteDevChannelCommand } from './commands/DeleteDevChannelCommand'; -import { TakeScreenshotCommand } from './commands/TakeScreenshotCommand'; +import { CaptureScreenshotCommand } from './commands/CaptureScreenshotCommand'; import { GetDeviceInfoCommand } from './commands/GetDeviceInfoCommand'; import { GetDevIdCommand } from './commands/GetDevIdCommand'; @@ -185,7 +185,7 @@ describe('cli', () => { return Promise.resolve(''); }); - const command = new TakeScreenshotCommand(); + const command = new CaptureScreenshotCommand(); await command.run({ host: '1.2.3.4', password: '5536' diff --git a/src/cli.ts b/src/cli.ts index 360ec35..d2e5a9b 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -9,7 +9,7 @@ import { ConvertToSquashfsCommand } from './commands/ConvertToSquashfsCommand'; import { RekeyDeviceCommand } from './commands/RekeyDeviceCommand'; import { CreateSignedPackageCommand } from './commands/CreateSignedPackageCommand'; import { DeleteDevChannelCommand } from './commands/DeleteDevChannelCommand'; -import { TakeScreenshotCommand } from './commands/TakeScreenshotCommand'; +import { CaptureScreenshotCommand } from './commands/CaptureScreenshotCommand'; import { GetDeviceInfoCommand } from './commands/GetDeviceInfoCommand'; import { GetDevIdCommand } from './commands/GetDevIdCommand'; import { ZipCommand } from './commands/ZipCommand'; @@ -167,7 +167,7 @@ void yargs .option('host', { type: 'string', description: 'The IP Address of the host Roku', demandOption: false }) .option('password', { type: 'string', description: 'The password of the host Roku', demandOption: false }); }, (args: any) => { - return new TakeScreenshotCommand().run(args); + return new CaptureScreenshotCommand().run(args); }) .command(['getDeviceInfo', 'deviceinfo'], 'Get the `device-info` response from a Roku device', (builder) => { diff --git a/src/commands/TakeScreenshotCommand.ts b/src/commands/CaptureScreenshotCommand.ts similarity index 85% rename from src/commands/TakeScreenshotCommand.ts rename to src/commands/CaptureScreenshotCommand.ts index c77ef61..6a75ed5 100644 --- a/src/commands/TakeScreenshotCommand.ts +++ b/src/commands/CaptureScreenshotCommand.ts @@ -1,6 +1,6 @@ import { rokuDeploy, util } from '../index'; -export class TakeScreenshotCommand { +export class CaptureScreenshotCommand { async run(args) { let options = { ...util.getOptionsFromJson(args),