Conversation
There was a problem hiding this comment.
Pull request overview
This PR carries forward recent CLI argument/behavior changes (from #202) into the underlying RokuDeploy.ts API and command implementations, aligning option names and expanding sideload() behavior.
Changes:
- Renames options across the API to match CLI (
remotePort→ecpPort,ZipOptions.stagingDir→dir,rekeySignedPackage→pkg). - Moves/centralizes path resolution logic into command classes and
RokuDeploy.sideload(). - Updates docs/changelog to reflect the new option names and
sideloadclose behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/commands/ZipCommand.ts | Adds cwd defaulting and resolves --out/--dir paths before calling zip(). |
| src/commands/StageCommand.ts | Maps --out to stagingDir for stage(). |
| src/commands/SideloadCommand.ts | Resolves zip/rootDir/outZip paths and forwards options to sideload(). |
| src/commands/RekeyDeviceCommand.ts | Adds cwd defaulting and resolves --pkg to an absolute path. |
| src/commands/CreateSignedPackageCommand.ts | Adds cwd defaulting and parses --out into outDir/outFile. |
| src/commands/CaptureScreenshotCommand.ts | Adds cwd defaulting and parses --out into screenshotDir/screenshotFile. |
| src/cli.ts | Removes inline argument post-processing; updates sideload flag to --close/--no-close; switches to ecpPort. |
| src/RokuDeployOptions.ts | Renames remotePort → ecpPort and rekeySignedPackage → pkg. |
| src/RokuDeploy.ts | Implements ZipOptions.dir; switches ECP usage to ecpPort; enhances sideload() (zip/rootDir support + channel close). |
| src/RokuDeploy.spec.ts | Updates tests for renamed options (pkg, dir, ecpPort). |
| README.md | Updates CLI/API docs for renamed options and new sideload behavior. |
| CHANGELOG.md | Adds 4.0.0-alpha.3 breaking-change notes covering the renames and sideload changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…h the actual file extension.
…a bit to better align with cli
…oad in rokudeploy
|
@copilot Can you take a look at these changes and make sure it:
|
…eSignedPackageOptions, add missing tests Agent-Logs-Url: https://github.com/rokucommunity/roku-deploy/sessions/634b6c5a-0fb7-4407-8625-8c25cf7f84ce Co-authored-by: MilapNaik <7122945+MilapNaik@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rokucommunity/roku-deploy/sessions/634b6c5a-0fb7-4407-8625-8c25cf7f84ce Co-authored-by: MilapNaik <7122945+MilapNaik@users.noreply.github.com>
I reviewed the CLI and programmatic flows and found the following issues, which I've fixed in commit
|
|
|
||
| if (imageUrlOnDevice) { | ||
| saveFilePath = util.standardizePath(path.join(options.screenshotDir, options.screenshotFile + imageExt)); | ||
| const userExt = ['.jpg', '.png'].includes(path.extname(options.screenshotFile).toLowerCase()) ? path.extname(options.screenshotFile) : undefined; |
There was a problem hiding this comment.
Let's have a flag called autoExtension. The default is false. When false, use the filename EXACTLY as provided by the user. no extnesion comparing or swapping, etc.
When true:
- if the user supplied name ends with the extension from the device, use their name completely
- if the user supplied name doees not end with the extension from the deviec but is either .png or jpeg, swap the file extension
- otherwise, append the device extension to the end of the user supplied filename
Extend CLI changes from #202 to Rokudeploy.ts. Done mostly by Claude Code.