Description:
The current codebase contains various usage of user-agent headers in multiple fetch functions for different package managers.
To address this issue, we propose refactoring the code to centralise the declaration of user-agent headers in a single fetch.js file. This will not only make the code more maintainable and easier to update, but also improve consistency across the project.
Additionally, we need to add tests to ensure that the code changes do not introduce any regressions and that the user-agent headers are being correctly applied in all fetch requests.