Closed fumer-fubotv closed 8 months ago
I have a few suggestions:
- This stuff in this file getting a bit large, so let's move all this new logic out of BrightScriptCommands.ts into a separate src/commands/RekeyAndPackageCommands.ts file.
- There seem to be a few bugs around picking a json file for the "Rekey device" flow. When I pick a rokudeploy.json with only
rekeySignedPackage
,devId
,signingPassword
,convertToSquashFS
, it fails with an error "A system error occurred (getaddrinfo ENOTFOUND :80). I'm assuming it's because the logic currently assumes that everything was supposed to be included in the json. That's not how it should work. We should load any values we find in the json, but then still walk through the manual prompts to allow the user to confirm those are the values they want, and fill in any missing values.- When running "Rekey Device", and choosing "enter manually". after I enter my signing password, it just pops up a new file picker dialog, but there was no messaging around WHAT I'm supposed to pick. I think we need another intermediary dropdown with instructions saying "pick your pkg" so they know why the file picker appears.
- After running the manual rekey for our internal app, I get this error at the end.
Most of the suggestions are addressed in the update. However i was not able to reproduce the error in #4 you mentioned
@fumer-fubotv I finally got a chance to look over this. I've pushed some changes to optimize the flow a bit....somehow I had these sitting in an uncommited branch since November!
The biggest change here is that we really need to prompt the user for all the details every time (either from json or from input boxes). We can't use values like the last password or last host used, because that might not be the device they want to rekey.
One thing we need to tweak, is for the file picker modal, we should add information showing the currently selected zip (if there is one from rokudeploy.json), and add another button in that case saying "I want to change it". I see it having 2 flows:
It would be great if you could run through this workflow a few times to test it out, and iron out any rough edges. Then It should probably be good to go.
Host and create package flows have been updated as per feedback
I tried to reproduce the scenarios mentioned above and below are the findings:
Added support for the following commands:
Rekey Device: Rekey specified device based on the signing password ("brightscript.remoteControl.signingPassword") and package file ("brightscript.remoteControl.signedPackagePath") provided.
Create Package: This will present user a list of available launch configs to choose from. Once selected it will create a .zip file and .pkg file based on the config and will save them to the ${workspacefolder}/out
Rekey Device and Create Package: This will first rekey device and then create package for the selected launch config
Here's a demo of the "Rekey Device" command:
https://github.com/user-attachments/assets/47c40787-c1d7-4ea8-88af-f90df71be0b4