content icon indicating copy to clipboard operation
content copied to clipboard

fix: add sql dump validation and reset the wrong dump when decompression fails

Open royorange opened this issue 8 months ago • 1 comments

🔗 Linked issue

#3341

❓ Type of change

  • [ ] 📖 Documentation (updates to the documentation or readme)
  • [x] 🐞 Bug fix (a non-breaking change that fixes an issue)
  • [ ] 👌 Enhancement (improving an existing functionality like performance)
  • [ ] ✨ New feature (a non-breaking change that adds functionality)
  • [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

  • Add validation for the sql_dump after prerender is done, and terminate the process when the validation fails. This issue is always triggered when server middleware executes during the build process.
  • Reset the sql dump in localStorage when decompression fails. Otherwise, the site will not refetch the latest dump when the wrong data is cached but the checksum hasn't changed.

Resolves #3341

📝 Checklist

  • [x] I have linked an issue or discussion.
  • [ ] I have updated the documentation accordingly.

royorange avatar May 09 '25 10:05 royorange

npm i https://pkg.pr.new/@nuxt/content@3342

commit: 1280e30

pkg-pr-new[bot] avatar May 09 '25 10:05 pkg-pr-new[bot]