diff --git a/dist/merge/index.js b/dist/merge/index.js index 86233fd..0d8e05f 100644 --- a/dist/merge/index.js +++ b/dist/merge/index.js @@ -5617,25 +5617,26 @@ class ArtifactHttpClient { /** * Masks the `sig` parameter in a URL and sets it as a secret. * @param url The URL containing the `sig` parameter. - * @param urlType The type of the URL (e.g., 'signed_upload_url', 'signed_download_url'). + * @returns A masked URL where the sig parameter value is replaced with '***' if found, + * or the original URL if no sig parameter is present. */ - maskSigUrl(url, urlType) { + maskSigUrl(url) { const sigIndex = url.indexOf('sig='); if (sigIndex !== -1) { const sigValue = url.substring(sigIndex + 4); (0, core_1.setSecret)(sigValue); - const maskedUrl = `${url.substring(0, sigIndex + 4)}***`; - (0, core_1.debug)(`Masked ${urlType}: ${maskedUrl}`); + return `${url.substring(0, sigIndex + 4)}***`; } + return url; } maskSecretUrls(body) { if (typeof body === 'object' && body !== null) { if ('signed_upload_url' in body && typeof body.signed_upload_url === 'string') { - this.maskSigUrl(body.signed_upload_url, 'signed_upload_url'); + this.maskSigUrl(body.signed_upload_url); } if ('signed_url' in body && typeof body.signed_url === 'string') { - this.maskSigUrl(body.signed_url, 'signed_url'); + this.maskSigUrl(body.signed_url); } } else { diff --git a/dist/upload/index.js b/dist/upload/index.js index 6e223aa..119703a 100644 --- a/dist/upload/index.js +++ b/dist/upload/index.js @@ -5617,25 +5617,26 @@ class ArtifactHttpClient { /** * Masks the `sig` parameter in a URL and sets it as a secret. * @param url The URL containing the `sig` parameter. - * @param urlType The type of the URL (e.g., 'signed_upload_url', 'signed_download_url'). + * @returns A masked URL where the sig parameter value is replaced with '***' if found, + * or the original URL if no sig parameter is present. */ - maskSigUrl(url, urlType) { + maskSigUrl(url) { const sigIndex = url.indexOf('sig='); if (sigIndex !== -1) { const sigValue = url.substring(sigIndex + 4); (0, core_1.setSecret)(sigValue); - const maskedUrl = `${url.substring(0, sigIndex + 4)}***`; - (0, core_1.debug)(`Masked ${urlType}: ${maskedUrl}`); + return `${url.substring(0, sigIndex + 4)}***`; } + return url; } maskSecretUrls(body) { if (typeof body === 'object' && body !== null) { if ('signed_upload_url' in body && typeof body.signed_upload_url === 'string') { - this.maskSigUrl(body.signed_upload_url, 'signed_upload_url'); + this.maskSigUrl(body.signed_upload_url); } if ('signed_url' in body && typeof body.signed_url === 'string') { - this.maskSigUrl(body.signed_url, 'signed_url'); + this.maskSigUrl(body.signed_url); } } else {