export function sanitizeUrl(url) { try { const urlObj = new URL(url); urlObj.username = ''; urlObj.password = ''; return urlObj.toString(); } catch { return url; } } export function sanitizeError(error, authUrl, cleanUrl) { const message = error.message || String(error); return new Error(message.replaceAll(authUrl, cleanUrl)); } export function buildAuthUrl(url, auth) { const urlObj = new URL(url); const [username, password] = Buffer.from(auth, 'base64').toString('utf-8').split(':'); urlObj.username = encodeURIComponent(username); urlObj.password = encodeURIComponent(password); return { authUrl: urlObj.toString(), cleanUrl: sanitizeUrl(urlObj.toString()) }; } //# sourceMappingURL=gitUrl.js.map