Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commands to rekey device and create packages #509

Merged
merged 30 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
52c6de5
Add ability to capture device screenshots
fumer-fubotv Oct 9, 2023
a564c7b
Add ability to capture device screenshots
fumer-fubotv Oct 9, 2023
323c4f1
Merge branch 'master' into ROKU-1008
fumer-fubotv Oct 9, 2023
ab5629e
Feature request: add ability to rekey/sign apps
fumer-fubotv Oct 13, 2023
a83dc75
Conflict resoluiton
fumer-fubotv Oct 13, 2023
273d71c
remove stale code
fumer-fubotv Oct 13, 2023
53ee647
remove redundent code
fumer-fubotv Oct 13, 2023
01b9ac6
TBD-126
fumer-fubotv Oct 20, 2023
b83a203
TBD-126
fumer-fubotv Oct 27, 2023
1a1320e
Update BrightScriptCommands.ts
fumer-fubotv Oct 27, 2023
ddb09fc
Merge branch 'master' of https://github.com/rokucommunity/vscode-brig…
TwitchBronBron Nov 8, 2023
6aed36a
Refined the flow a bit
TwitchBronBron Jan 29, 2024
ac5dc9b
Merge branch 'master' of https://github.com/rokucommunity/vscode-brig…
TwitchBronBron Jan 29, 2024
7255903
TBD-126:
fumer-fubotv Feb 6, 2024
c000830
Merge branch 'master' into TBD-126
TwitchBronBron Feb 6, 2024
af5fb8b
TBD-126
fumer-fubotv Feb 8, 2024
cc1d493
Merge branch 'TBD-126' of https://github.com/rokucommunity/vscode-bri…
fumer-fubotv Feb 8, 2024
18ffa58
TBD-126
fumer-fubotv Feb 12, 2024
b4c9e93
Merge branch 'master' into TBD-126
fumer-fubotv Feb 13, 2024
7e4d3bb
Update RekeyAndPackageCommand.ts
fumer-fubotv Feb 14, 2024
f1d28ed
Merge branch 'TBD-126' of https://github.com/rokucommunity/vscode-bri…
fumer-fubotv Feb 14, 2024
a9f1f6b
TBD-126
fumer-fubotv Feb 16, 2024
804c139
Use `open` to open folder instead of custom function
TwitchBronBron Mar 12, 2024
c131512
Normalize a few file paths
TwitchBronBron Mar 12, 2024
d947737
Better rekeySignedPackage handling when empty string
TwitchBronBron Mar 12, 2024
efabd97
simplify default config
TwitchBronBron Mar 12, 2024
b0ddb52
Show .pkg in summary
TwitchBronBron Mar 12, 2024
63d251c
Use correct file paths in more dialogs
TwitchBronBron Mar 12, 2024
2f75871
Merge branch 'master' of https://github.com/rokucommunity/vscode-brig…
TwitchBronBron Mar 12, 2024
c65fa35
Remove unused funcs in BrightScriptCommands.ts
TwitchBronBron Mar 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 39 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"net": "^1.0.2",
"node-cache": "^4.2.0",
"node-ssdp": "^4.0.0",
"open": "^8.4.2",
"postman-request": "^2.88.1-postman.32",
"pretty-bytes": "^5.6.0",
"roku-debug": "^0.21.6",
Expand Down Expand Up @@ -175,7 +176,10 @@
"onCommand:extension.brightscript.sendRemoteText",
"onCommand:brighterscript.showPreview",
"onCommand:brighterscript.showPreviewToSide",
"onCommand:extension.brightscript.captureScreenshot"
"onCommand:extension.brightscript.captureScreenshot",
"onCommand:extension.brightscript.rekeyDevice",
"onCommand:extension.brightscript.createPackage",
"onCommand:extension.brightscript.rekeyAndPackage"
],
"contributes": {
"viewsContainers": {
Expand Down Expand Up @@ -2986,6 +2990,21 @@
"category": "BrighterScript",
"icon": "./images/icons/inspect-active.svg"
},
{
"command": "extension.brightscript.rekeyDevice",
"title": "Rekey Device",
"category": "BrightScript"
},
{
"command": "extension.brightscript.createPackage",
"title": "Create Package",
"category": "BrightScript"
},
{
"command": "extension.brightscript.rekeyAndPackage",
"title": "Rekey Device and Create Package",
"category": "BrightScript"
},
{
"command": "extension.brightscript.captureScreenshot",
"title": "Capture Screenshot",
Expand Down
10 changes: 6 additions & 4 deletions src/BrightScriptCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import BrightScriptFileUtils from './BrightScriptFileUtils';
import { GlobalStateManager } from './GlobalStateManager';
import { brighterScriptPreviewCommand } from './commands/BrighterScriptPreviewCommand';
import { captureScreenshotCommand } from './commands/CaptureScreenshotCommand';
import { rekeyAndPackageCommand } from './commands/RekeyAndPackageCommand';
import { languageServerInfoCommand } from './commands/LanguageServerInfoCommand';
import { util } from './util';
import { util as rokuDebugUtil } from 'roku-debug/dist/util';
Expand Down Expand Up @@ -37,6 +38,7 @@ export class BrightScriptCommands {
brighterScriptPreviewCommand.register(this.context);
languageServerInfoCommand.register(this.context);
captureScreenshotCommand.register(this.context, this);
rekeyAndPackageCommand.register(this.context, this, this.userInputManager);

this.registerGeneralCommands();

Expand Down Expand Up @@ -394,13 +396,13 @@ export class BrightScriptCommands {
}
}

public async getRemoteHost() {
public async getRemoteHost(showPrompt = true) {
this.host = await this.context.workspaceState.get('remoteHost');
if (!this.host) {
let config = vscode.workspace.getConfiguration('brightscript.remoteControl', null);
this.host = config.get('host');
// eslint-disable-next-line no-template-curly-in-string
if (!this.host || this.host === '${promptForHost}') {
if ((!this.host || this.host === '${promptForHost}') && showPrompt) {
this.host = await vscode.window.showInputBox({
placeHolder: 'The IP address of your Roku device',
value: ''
Expand All @@ -423,13 +425,13 @@ export class BrightScriptCommands {
return this.host;
}

public async getRemotePassword() {
public async getRemotePassword(showPrompt = true) {
this.password = await this.context.workspaceState.get('remotePassword');
if (!this.password) {
let config = vscode.workspace.getConfiguration('brightscript.remoteControl', null);
this.password = config.get('password');
// eslint-disable-next-line no-template-curly-in-string
if (!this.password || this.password === '${promptForPassword}') {
if ((!this.password || this.password === '${promptForPassword}') && showPrompt) {
this.password = await vscode.window.showInputBox({
placeHolder: 'The developer account password for your Roku device',
value: ''
Expand Down
Loading