update artifacts package

This commit is contained in:
Salman Chishti 2025-03-10 04:19:08 -07:00
parent d6f8f772f3
commit 395fc076c8
2 changed files with 16 additions and 18 deletions

17
dist/merge/index.js vendored
View file

@ -5620,22 +5620,21 @@ class ArtifactHttpClient {
* @param urlType The type of the URL (e.g., 'signed_upload_url', 'signed_download_url'). * @param urlType The type of the URL (e.g., 'signed_upload_url', 'signed_download_url').
*/ */
maskSigUrl(url, urlType) { maskSigUrl(url, urlType) {
const sigMatch = url.match(/[?&]sig=([^&]+)/); const sigIndex = url.indexOf('sig=');
if (sigMatch) { if (sigIndex !== -1) {
(0, core_1.setSecret)(sigMatch[1]); const sigValue = url.substring(sigIndex + 4).split('&')[0];
(0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`); (0, core_1.setSecret)(sigValue);
const maskedUrl = `${url.substring(0, sigIndex + 4)}***`;
(0, core_1.debug)(`Masked ${urlType}: ${maskedUrl}`);
} }
} }
maskSecretUrls(body) { maskSecretUrls(body) {
(0, core_1.debug)('body is passed to masksecreturls');
(0, core_1.debug)(`Body in mask urls: ${JSON.stringify(body, null, 2)}`);
if (typeof body === 'object' && body !== null) { if (typeof body === 'object' && body !== null) {
if ('signed_upload_url' in body && typeof body.signed_upload_url === 'string') { if ('signed_upload_url' in body &&
(0, core_1.debug)('entered that there is signed_upload_url'); typeof body.signed_upload_url === 'string') {
this.maskSigUrl(body.signed_upload_url, 'signed_upload_url'); this.maskSigUrl(body.signed_upload_url, 'signed_upload_url');
} }
if ('signed_url' in body && typeof body.signed_url === 'string') { if ('signed_url' in body && typeof body.signed_url === 'string') {
(0, core_1.debug)('entered that there is signed_url');
this.maskSigUrl(body.signed_url, 'signed_url'); this.maskSigUrl(body.signed_url, 'signed_url');
} }
} }

17
dist/upload/index.js vendored
View file

@ -5620,22 +5620,21 @@ class ArtifactHttpClient {
* @param urlType The type of the URL (e.g., 'signed_upload_url', 'signed_download_url'). * @param urlType The type of the URL (e.g., 'signed_upload_url', 'signed_download_url').
*/ */
maskSigUrl(url, urlType) { maskSigUrl(url, urlType) {
const sigMatch = url.match(/[?&]sig=([^&]+)/); const sigIndex = url.indexOf('sig=');
if (sigMatch) { if (sigIndex !== -1) {
(0, core_1.setSecret)(sigMatch[1]); const sigValue = url.substring(sigIndex + 4).split('&')[0];
(0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`); (0, core_1.setSecret)(sigValue);
const maskedUrl = `${url.substring(0, sigIndex + 4)}***`;
(0, core_1.debug)(`Masked ${urlType}: ${maskedUrl}`);
} }
} }
maskSecretUrls(body) { maskSecretUrls(body) {
(0, core_1.debug)('body is passed to masksecreturls');
(0, core_1.debug)(`Body in mask urls: ${JSON.stringify(body, null, 2)}`);
if (typeof body === 'object' && body !== null) { if (typeof body === 'object' && body !== null) {
if ('signed_upload_url' in body && typeof body.signed_upload_url === 'string') { if ('signed_upload_url' in body &&
(0, core_1.debug)('entered that there is signed_upload_url'); typeof body.signed_upload_url === 'string') {
this.maskSigUrl(body.signed_upload_url, 'signed_upload_url'); this.maskSigUrl(body.signed_upload_url, 'signed_upload_url');
} }
if ('signed_url' in body && typeof body.signed_url === 'string') { if ('signed_url' in body && typeof body.signed_url === 'string') {
(0, core_1.debug)('entered that there is signed_url');
this.maskSigUrl(body.signed_url, 'signed_url'); this.maskSigUrl(body.signed_url, 'signed_url');
} }
} }