Skip to content

Commit

Permalink
Change publish to sideload everywhere else
Browse files Browse the repository at this point in the history
  • Loading branch information
MilapNaik committed Mar 15, 2024
1 parent fad56b9 commit b51c3fc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/RokuDeploy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ describe('index', () => {
outFile: 'fileThatDoesNotExist.zip',
deleteDevChannel: false
});
}, `Cannot publish because file does not exist at '${rokuDeploy['getOutputZipFilePath']({
}, `Cannot sideload because file does not exist at '${rokuDeploy['getOutputZipFilePath']({
outFile: 'fileThatDoesNotExist.zip',
outDir: outDir
})}'`);
Expand Down
2 changes: 1 addition & 1 deletion src/RokuDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export class RokuDeploy {
let readStream: ReadStream;
try {
if ((await fsExtra.pathExists(zipFilePath)) === false) {
throw new Error(`Cannot publish because file does not exist at '${zipFilePath}'`);
throw new Error(`Cannot sideload because file does not exist at '${zipFilePath}'`);
}
readStream = fsExtra.createReadStream(zipFilePath);
//wait for the stream to open (no harm in doing this, and it helps solve an issue in the tests)
Expand Down
4 changes: 2 additions & 2 deletions src/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as fsExtra from 'fs-extra';
import { expect } from 'chai';
import { createSandbox } from 'sinon';
import { rokuDeploy } from './index';
import { PublishCommand } from './commands/PublishCommand';
import { SideloadCommand } from './commands/SideloadCommand';
import { ConvertToSquashfsCommand } from './commands/ConvertToSquashfsCommand';
import { RekeyDeviceCommand } from './commands/RekeyDeviceCommand';
import { CreateSignedPackageCommand } from './commands/CreateSignedPackageCommand';
Expand Down Expand Up @@ -73,7 +73,7 @@ describe('cli', () => {
});
});

const command = new PublishCommand();
const command = new SideloadCommand();
await command.run({
host: '1.2.3.4',
password: '5536',
Expand Down
6 changes: 3 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ExecCommand } from './commands/ExecCommand';
import { SendTextCommand } from './commands/SendTextCommand';
import { PrepublishCommand } from './commands/PrepublishCommand';
import { ZipPackageCommand } from './commands/ZipPackageCommand';
import { PublishCommand } from './commands/PublishCommand';
import { SideloadCommand } from './commands/SideloadCommand';
import { ConvertToSquashfsCommand } from './commands/ConvertToSquashfsCommand';
import { RekeyDeviceCommand } from './commands/RekeyDeviceCommand';
import { CreateSignedPackageCommand } from './commands/CreateSignedPackageCommand';
Expand Down Expand Up @@ -141,14 +141,14 @@ void yargs
return new ZipPackageCommand().run(args);
})

.command('publish', 'Publish a pre-existing packaged zip file to a remote Roku', (builder) => {
.command('sideload', 'Sideload a pre-existing packaged zip file to a remote Roku', (builder) => {
return builder
.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 })
.option('outDir', { type: 'string', description: 'The output directory', demandOption: false })
.option('outFile', { type: 'string', description: 'The output file', demandOption: false });
}, (args: any) => {
return new PublishCommand().run(args);
return new SideloadCommand().run(args);
})

.command(['squash', 'convertToSquashfs'], 'Convert a pre-existing packaged zip file to a squashfs file', (builder) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { rokuDeploy, util } from '../index';

export class PublishCommand {
export class SideloadCommand {
async run(args) {
let options = {
...util.getOptionsFromJson(args),
Expand Down

0 comments on commit b51c3fc

Please sign in to comment.