aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-11-14main: Add better error printingTeddy Wing
Print errors in a consistent way instead of using `log`, which was just for rapid development. Also exit using codes that make sense.
2023-11-14Add `--debug` flagTeddy Wing
Condition printing debug output on the presence of this flag.
2023-11-14main: Print errors to standard errorTeddy Wing
2023-11-14swextreload.reloadExtension: Return errorsTeddy Wing
Add our own errors and return these instead of logging them.
2023-11-14swextreload.Reload: Accept a list of extension IDsTeddy Wing
Run the reload on multiple extensions.
2023-11-14main: Change hard-coded exit codes to sysexits namesTeddy Wing
2023-11-14main: Print errors on `--socket-url` and extension IDs missingTeddy Wing
In order to print a custom error message for missing extension IDs, I needed to set a default value for it. Looks like the type assertions are necessary. Not the cleanest, but no matter.
2023-11-14main: Add basic command line argument parsingTeddy Wing
Found Claw from a search for "argument parser" on https://godocs.io. I did a quick comparison with a few other argument parsing libraries I found in a GitHub search: * https://github.com/alexflint/go-arg * https://github.com/docopt/docopt.go * https://github.com/fred1268/go-clap Claw ended up being the most straightforward to me.
2023-11-14swextreload.Reload: Extract argumentsTeddy Wing
2023-11-14Move `main.go` to `cmd/swextreload/main.go`Teddy Wing
Put the executable in a cmd/ directory.
2023-11-14Move code from `main()` to `swextreload.Reload()`Teddy Wing
Move everything to our library.
2023-11-14internal/swextreload: Get rid of option interface, use plain argumentsTeddy Wing
2023-11-14Move swextreload.go to internal/Teddy Wing
Don't make this a public API. I'd rather do something simple and bad to get this finished quickly.
2023-11-14swextreload: Idea for a library APITeddy Wing
An idea for a library function to reload an extension.
2023-11-13Ideas for Extreload tab reloading for Manifest V3Teddy Wing
I was having a hard time jiggering the Extreload code to get tab reloading working with Manifest V3 extensions. This is an experiment using a better API to interact with the Chrome DevTools Protocol. It does correctly reload a Manifest V3 extension's current tab, by sleeping briefly to wait for the service worker to reinstall, then executing the tab reload call.