-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add options from json ability to each command to each command
- Loading branch information
Showing
18 changed files
with
111 additions
and
753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class ConvertToSquashfsCommand { | ||
async run(args) { | ||
await rokuDeploy.convertToSquashfs({ | ||
host: args.host, | ||
password: args.password | ||
}); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.convertToSquashfs(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class CreateSignedPackageCommand { | ||
async run(args) { | ||
await rokuDeploy.createSignedPackage({ | ||
host: args.host, | ||
password: args.password, | ||
signingPassword: args.signingPassword, | ||
stagingDir: args.stagingDir | ||
}); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.createSignedPackage(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class DeleteDevChannelCommand { | ||
async run(args) { | ||
await rokuDeploy.deleteDevChannel({ | ||
host: args.host, | ||
password: args.password | ||
}); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.deleteDevChannel(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class GetDevIdCommand { | ||
async run(args) { | ||
await rokuDeploy.getDevId({ | ||
host: args.host | ||
}); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.getDevId(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class GetOutputPkgFilePathCommand { | ||
run(args) { | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/dot-notation | ||
const outputPath = rokuDeploy['getOutputPkgPath']({ | ||
outFile: args.outFile, | ||
outDir: args.outDir | ||
}); | ||
const outputPath = rokuDeploy['getOutputPkgPath'](options); //TODO fix this? | ||
console.log(outputPath); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class GetOutputZipFilePathCommand { | ||
run(args) { | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/dot-notation | ||
const outputPath = rokuDeploy['getOutputZipFilePath']({ | ||
outFile: args.outFile, | ||
outDir: args.outDir | ||
}); | ||
const outputPath = rokuDeploy['getOutputZipFilePath'](options); | ||
console.log(outputPath); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class KeyDownCommand { | ||
async run(args) { | ||
await rokuDeploy.keyDown(args.text); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.keyDown(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class KeyPressCommand { | ||
async run(args) { | ||
await rokuDeploy.keyPress(args.text); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.keyPress(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class KeyUpCommand { | ||
async run(args) { | ||
await rokuDeploy.keyUp(args.text); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.keyUp(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class PrepublishCommand { | ||
async run(args) { | ||
await rokuDeploy.stage({ | ||
stagingDir: args.stagingDir, | ||
rootDir: args.rootDir | ||
}); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.stage(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class PublishCommand { | ||
async run(args) { | ||
await rokuDeploy.sideload({ | ||
host: args.host, | ||
password: args.password, | ||
outDir: args.outDir, | ||
outFile: args.outFile | ||
}); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.sideload(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class RekeyDeviceCommand { | ||
async run(args) { | ||
await rokuDeploy.rekeyDevice({ | ||
host: args.host, | ||
password: args.password, | ||
rekeySignedPackage: args.rekeySignedPackage, | ||
signingPassword: args.signingPassword, | ||
rootDir: args.rootDir, | ||
devId: args.devId | ||
}); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.rekeyDevice(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class SendTextCommand { | ||
// this.options = getDefaultArgsFromJson(this.configPath ?? `${cwd}/rokudeploy.json`);TODO | ||
async run(args) { | ||
await rokuDeploy.sendText(args.text); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.sendText(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class TakeScreenshotCommand { | ||
async run(args) { | ||
await rokuDeploy.captureScreenshot({ | ||
host: args.host, | ||
password: args.password | ||
}); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.captureScreenshot(options); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { rokuDeploy } from '../index'; | ||
import { rokuDeploy, util } from '../index'; | ||
|
||
export class ZipCommand { | ||
async run(args) { | ||
await rokuDeploy.zip({ | ||
stagingDir: args.stagingDir, | ||
outDir: args.outDir | ||
}); | ||
let options = { | ||
...util.getOptionsFromJson(args), | ||
...args | ||
}; | ||
await rokuDeploy.zip(options); | ||
} | ||
} |
Oops, something went wrong.