UNPKG

renovate

Version:

Automated dependency updates. Flexible so you don't need to be.

16 lines (15 loc) 630 B
import { findAll } from "../../../util/host-rules.js"; //#region lib/modules/manager/bundler/host-rules.ts function isAuthenticatable(rule) { return !!rule.resolvedHost && (!!rule.username && !!rule.password || !!rule.token); } function findAllAuthenticatable({ hostType }) { return findAll({ hostType }).filter(isAuthenticatable); } function getAuthenticationHeaderValue(hostRule) { if (hostRule.username) return `${encodeURIComponent(hostRule.username)}:${hostRule.password}`; return `${hostRule.token}`; } //#endregion export { findAllAuthenticatable, getAuthenticationHeaderValue }; //# sourceMappingURL=host-rules.js.map