chore: upgrade applesauce packages to v4.0.0

- Update all applesauce packages from 3.1.0 to 4.0.0
- Add applesauce-factory dependency
- Version 4.0.0 includes app-data helpers needed for NIP-78
This commit is contained in:
Gigi
2025-10-05 02:35:28 +01:00
parent 1b381a0f8c
commit 1b8c276529
229 changed files with 2533 additions and 7592 deletions

View File

@@ -146,19 +146,19 @@ function* parse(content) {
if (prevIndex !== u - prefixLen) {
yield { type: "text", text: content.substring(prevIndex, u - prefixLen) };
}
if (url.pathname.endsWith(".png") || url.pathname.endsWith(".jpg") || url.pathname.endsWith(".jpeg") || url.pathname.endsWith(".gif") || url.pathname.endsWith(".webp")) {
if (/\.(png|jpe?g|gif|webp)$/i.test(url.pathname)) {
yield { type: "image", url: url.toString() };
index = end;
prevIndex = index;
continue;
}
if (url.pathname.endsWith(".mp4") || url.pathname.endsWith(".avi") || url.pathname.endsWith(".webm") || url.pathname.endsWith(".mkv")) {
if (/\.(mp4|avi|webm|mkv)$/i.test(url.pathname)) {
yield { type: "video", url: url.toString() };
index = end;
prevIndex = index;
continue;
}
if (url.pathname.endsWith(".mp3") || url.pathname.endsWith(".aac") || url.pathname.endsWith(".ogg") || url.pathname.endsWith(".opus")) {
if (/\.(mp3|aac|ogg|opus)$/i.test(url.pathname)) {
yield { type: "audio", url: url.toString() };
index = end;
prevIndex = index;