clients
clients copied to clipboard
[PS-1265] fix on install hook
Type of change
- [ ] Bug fix
- [x] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
Objective
Fix oninstall hook for manifest v3.
I'm also trying out a way of organizing Manifest V3 factories for command initialization. In effect, it's hiding the initialization specifics within a factory method and forcing only the minimum required parameters for all dependent services to be provided.
This is a reasonable pattern until services are decoupled to the point that we just want simple initializers.
Code changes
Most of the changes are with creating factories. Other changes are:
- background: add onInstall listener
- main.background: use factories
- onInstallListener: Copied from runtime.background (It still exists there for mv2 usage).
Screenshots
Before you submit
- [x] I have checked for **linting** errors (`npm run lint`) (required)
- [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required)
- [ ] This change requires a **documentation update** (notify the documentation team)
- [ ] This change has particular **deployment requirements** (notify the DevOps team)