-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: set host from opt [] #139
Conversation
Maybe remove the docs for now and we try to find a different solution for them. PRs shouldn't be so big because of docs. |
880812e
to
a4a26d5
Compare
src/keys/get-management-token.ts
Outdated
@@ -145,7 +146,7 @@ export const getManagementToken = (privateKey: string, opts: GetManagementTokenO | |||
} | |||
return createGetManagementToken( | |||
createLogger({ filename: __filename }), | |||
createHttpClient(), | |||
createHttpClient({ prefixUrl: opts.host }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to provide a default value for it, or only set it if host
is defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
# [2.1.0](v2.0.4...v2.1.0) (2023-02-13) ### Features * set host from opt [] ([#139](#139)) ([4353c2b](4353c2b))
🎉 This PR is included in version 2.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What does it do?
Adds the option to change the host from the opts instead of changing the
process.env.BASE_URL
being the only way.Why?
We give the possibility to do this in other clients as https://github.com/contentful/contentful-management.js and it will enable us to use the package in a cleaner way
Risks
Defaults are left untouched, this only changes an optional override so nothing should break