feedback-vos 1.0.37 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -743,8 +743,7 @@ async function uploadFileToRepo(token, owner, repo, file, folderPath, defaultBra
743
743
  }
744
744
  async function uploadScreenshotToRepo(token, owner, repo, screenshot, screenshotPath) {
745
745
  const compressedScreenshot = await compressScreenshot(screenshot, 1920, 0.7);
746
- const base64Data = compressedScreenshot.split(",")[1];
747
- const binaryData = Uint8Array.from(atob(base64Data), (c) => c.charCodeAt(0));
746
+ const base64Content = compressedScreenshot.includes(",") ? compressedScreenshot.split(",")[1] : compressedScreenshot;
748
747
  const repoResponse = await fetch(
749
748
  `https://api.github.com/repos/${owner}/${repo}`,
750
749
  {
@@ -765,7 +764,6 @@ async function uploadScreenshotToRepo(token, owner, repo, screenshot, screenshot
765
764
  const randomId = Math.random().toString(36).substring(2, 9);
766
765
  const filename = `feedback-${timestamp}-${randomId}.jpg`;
767
766
  const path = `${folderPath}/${filename}`;
768
- const base64Content = btoa(String.fromCharCode(...binaryData));
769
767
  const folderCheckUrl = `https://api.github.com/repos/${owner}/${repo}/contents/${folderPath}`;
770
768
  try {
771
769
  const folderCheck = await fetch(folderCheckUrl, {