From c30eb5542ed4090e4f6242819e96a6034bde5134 Mon Sep 17 00:00:00 2001
From: Salman Chishti <salmanmkc@GitHub.com>
Date: Fri, 7 Mar 2025 08:06:30 -0800
Subject: [PATCH] debugging

---
 dist/restore-only/index.js | 6 +++++-
 dist/restore/index.js      | 6 +++++-
 dist/save-only/index.js    | 6 +++++-
 dist/save/index.js         | 6 +++++-
 4 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/dist/restore-only/index.js b/dist/restore-only/index.js
index a5df35c..b9e2e7d 100644
--- a/dist/restore-only/index.js
+++ b/dist/restore-only/index.js
@@ -5739,17 +5739,21 @@ class CacheServiceClient {
      */
     maskSigUrl(url, urlType) {
         const sigMatch = url.match(/[?&]sig=([^&]+)/);
+        (0, core_1.debug)(`Sigmatch is ${sigMatch}`);
         if (sigMatch) {
             (0, core_1.setSecret)(sigMatch[1]);
-            (0, core_1.setSecret)(url);
             (0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`);
         }
     }
     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 ('signedUploadUrl' in body && body.signedUploadUrl) {
+            (0, core_1.debug)('entered that there is signedupload url');
             this.maskSigUrl(body.signedUploadUrl, 'signed_upload_url');
         }
         if ('signedDownloadUrl' in body && body.signedDownloadUrl) {
+            (0, core_1.debug)('entered that there is signed download url');
             this.maskSigUrl(body.signedDownloadUrl, 'signed_download_url');
         }
     }
diff --git a/dist/restore/index.js b/dist/restore/index.js
index 44ea41b..1967d67 100644
--- a/dist/restore/index.js
+++ b/dist/restore/index.js
@@ -5739,17 +5739,21 @@ class CacheServiceClient {
      */
     maskSigUrl(url, urlType) {
         const sigMatch = url.match(/[?&]sig=([^&]+)/);
+        (0, core_1.debug)(`Sigmatch is ${sigMatch}`);
         if (sigMatch) {
             (0, core_1.setSecret)(sigMatch[1]);
-            (0, core_1.setSecret)(url);
             (0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`);
         }
     }
     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 ('signedUploadUrl' in body && body.signedUploadUrl) {
+            (0, core_1.debug)('entered that there is signedupload url');
             this.maskSigUrl(body.signedUploadUrl, 'signed_upload_url');
         }
         if ('signedDownloadUrl' in body && body.signedDownloadUrl) {
+            (0, core_1.debug)('entered that there is signed download url');
             this.maskSigUrl(body.signedDownloadUrl, 'signed_download_url');
         }
     }
diff --git a/dist/save-only/index.js b/dist/save-only/index.js
index 60ffd41..848ac52 100644
--- a/dist/save-only/index.js
+++ b/dist/save-only/index.js
@@ -5739,17 +5739,21 @@ class CacheServiceClient {
      */
     maskSigUrl(url, urlType) {
         const sigMatch = url.match(/[?&]sig=([^&]+)/);
+        (0, core_1.debug)(`Sigmatch is ${sigMatch}`);
         if (sigMatch) {
             (0, core_1.setSecret)(sigMatch[1]);
-            (0, core_1.setSecret)(url);
             (0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`);
         }
     }
     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 ('signedUploadUrl' in body && body.signedUploadUrl) {
+            (0, core_1.debug)('entered that there is signedupload url');
             this.maskSigUrl(body.signedUploadUrl, 'signed_upload_url');
         }
         if ('signedDownloadUrl' in body && body.signedDownloadUrl) {
+            (0, core_1.debug)('entered that there is signed download url');
             this.maskSigUrl(body.signedDownloadUrl, 'signed_download_url');
         }
     }
diff --git a/dist/save/index.js b/dist/save/index.js
index d887a0b..9c5d7db 100644
--- a/dist/save/index.js
+++ b/dist/save/index.js
@@ -5739,17 +5739,21 @@ class CacheServiceClient {
      */
     maskSigUrl(url, urlType) {
         const sigMatch = url.match(/[?&]sig=([^&]+)/);
+        (0, core_1.debug)(`Sigmatch is ${sigMatch}`);
         if (sigMatch) {
             (0, core_1.setSecret)(sigMatch[1]);
-            (0, core_1.setSecret)(url);
             (0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`);
         }
     }
     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 ('signedUploadUrl' in body && body.signedUploadUrl) {
+            (0, core_1.debug)('entered that there is signedupload url');
             this.maskSigUrl(body.signedUploadUrl, 'signed_upload_url');
         }
         if ('signedDownloadUrl' in body && body.signedDownloadUrl) {
+            (0, core_1.debug)('entered that there is signed download url');
             this.maskSigUrl(body.signedDownloadUrl, 'signed_download_url');
         }
     }