* feat: support authentication on Libraries.io requests * feat: wire up libraries.io config and api provider instantiation * feat: create libraries.io and bower base classes * refactor: tweak libraries/bower service classes and tests * rename request fetcher function/arg * throw exception when no tokens available * cleanup old value Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
14 lines
467 B
JavaScript
14 lines
467 B
JavaScript
import LibrariesIoApiProvider from './librariesio-api-provider.js'
|
|
|
|
// Convenience class with all the stuff related to the Libraries.io API and its
|
|
// authorization tokens, to simplify server initialization.
|
|
export default class LibrariesIoConstellation {
|
|
constructor({ private: { librariesio_tokens: tokens } }) {
|
|
this.apiProvider = new LibrariesIoApiProvider({
|
|
baseUrl: 'https://libraries.io/api',
|
|
tokens,
|
|
defaultRateLimit: 60,
|
|
})
|
|
}
|
|
}
|