fiddle icon indicating copy to clipboard operation
fiddle copied to clipboard

feat: register-local-version protocol command

Open samuelmaddock opened this issue 1 year ago • 3 comments

Implements protocol handler for electron-fiddle://register-local-version/ to allow registering local versions.

Example request:

electron-fiddle://register-local-version/?name=feat%3A+service+worker+preload+scripts&version=35.0.0-dist&path=%2FUsers%2Fsamuelmaddock%2F.electron_build_tools%2Fartifacts%2Fpr_44411_darwin_arm64

This is intended to be used by build-tools as a way to quickly download build artifacts and test them in Fiddle.

https://github.com/user-attachments/assets/e0a8f15b-fe16-4a12-a2d5-b6fc0c19b581

samuelmaddock avatar Nov 22 '24 00:11 samuelmaddock

Coverage Status

coverage: 87.628% (+0.02%) from 87.604% when pulling ec0aa344ed113afa408034d545a8961a5d9c37db on samuelmaddock:feat/register-local-version into 3452e12a67682aba8898019d1ae07df8e3194d61 on electron:main.

coveralls avatar Nov 22 '24 00:11 coveralls

@dsanders11 I've added a confirmation dialog. While testing I noticed that multiple requests will clobber the previous dialog. I've gone ahead and added a fix for that as well.

https://github.com/user-attachments/assets/7d320cad-d0ea-489d-9bf4-b613395f79e6

samuelmaddock avatar Nov 23 '24 00:11 samuelmaddock

This shouldn't be a protocol URL that can in theory be triggered by remote pages, make it a CLI argument to the fiddle binary instead and have build tools spawn fiddle, trigger the second instance event and handle that.

I feel like this gets exceedingly difficult when there are multiple installations or apps installed outside of the default directory (especially on Windows).

Also fiddle that confirm with the user they actually want to register this thing before it just Does What It Was Told

Added in the most recent commit.

samuelmaddock avatar Nov 23 '24 01:11 samuelmaddock