ember-cli-deploy-sentry
ember-cli-deploy-sentry copied to clipboard
Add an option to be able to upload files with relative path
Reading through the Sentry doc and their forum, sometimes it's mandatory to upload files with ~
instead of the full path with host and protocol.
So instead of uploading the files like:
https://xxx.cloudfront.net/assets/vendor-7d31c95933a91ffe617f81efb6478c75.js
it should be uploaded as:
~/assets/vendor-7d31c95933a91ffe617f81efb6478c75.js
This allow to ignore the the host and protocol. This can be useful in some case for example, when you want to access assets from multiple origins.
So what you need is a mechanism/config option to replace part of the paths with something different?
Yes. It could be a simple useRelativePath
flag option I guess? In that case, you get the files from the distDir
and then you replace host and protocol by ~
if the flag is true
. By checking the code, that could be done in the _uploadFile
function?
@dschmidt I found the option --url-prefix
in Sentry documentation that could help: https://docs.sentry.io/learn/cli/releases/#upload-source-maps
Okay cool, but that seems to be a feature of the cli and not a documentation of the api endpoint we're using. Anyway this shouldn't be too hard to implement. Mind sending a PR?