fix: honor --auth option
๐ Thanks for submitting a pull request! ๐
Summary
Fixes https://linear.app/netlify/issue/FRB-1343/internal-server-error-on-netlify-builds-via-bitbucket-pipeline-missing
Our --auth CLI option handling seems a bit hit and miss. We had a lot of optional argument and @ts-expect-error around code that was dealing with tokens - this removes all of those, adjust types to require token from CLI toggle being passed in to helper functions (do note that this doesn't fully ensure type safety, because options.auth has type any, but at least it ensures that something is passed in instead of being optional)
For us to review and ship your PR efficiently, please perform the following steps:
- [ ] Open a bug/issue before writing your code ๐งโ๐ป. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire ๐ฅ (e.g. incident related), you can skip this step.
- [ ] Read the contribution guidelines ๐. This ensures your code follows our style guide and passes our tests.
- [ ] Update or add tests (if any source code was changed or added) ๐งช
- [ ] Update or add documentation (if features were changed or added) ๐
- [ ] Make sure the status checks below are successful โ
A picture of a cute animal (not mandatory, but encouraged)
@pieh is this something we want to get over the finish line?
This got really outdated and has so many merge conflicts that is not worth keeping open. There is a workaround with NETLIFY_AUTH_TOKEN=$NETLIFY_AUTH npx netlify deploy --build, so I'll close this PR to clean up PR list.