latest changes

This commit is contained in:
Salman Chishti 2025-03-10 06:55:22 -07:00
parent e9322adf31
commit 9f58c48839
2 changed files with 14 additions and 12 deletions

13
dist/merge/index.js vendored
View file

@ -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 {

13
dist/upload/index.js vendored
View file

@ -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 {