Improved caching system

This commit is contained in:
DrMint 2024-06-19 08:58:28 +02:00
parent 7f1f4a7f89
commit 3e4d1bff26
9 changed files with 414 additions and 764 deletions

View File

@ -1,14 +1,15 @@
## DOD ## DOD
- Jugment - Jugment chapter 1
- Scans
- Gallery (add the magazine cover)
- Magnitude negative - Magnitude negative
- Tags for Chapter 2 and up
- Soundtrack
- Missing tags - Missing tags
- Missing scans booklet / images - Soundtrack vol1
- Missing vol2 cd - Missing scans
- booklet?
- Soundtrack vol2
- Missing cd
- Missing scans
- booklet?
- https://v3.accords-library.com/en/pages/song-of-fourteen-years - https://v3.accords-library.com/en/pages/song-of-fourteen-years
- missing source to https://web.archive.org/web/20151104092843/http://kho-dazat.tumblr.com/post/73835598260/you-are-the-light-the-light-that-illuminates-my - missing source to https://web.archive.org/web/20151104092843/http://kho-dazat.tumblr.com/post/73835598260/you-are-the-light-the-light-that-illuminates-my
- missing parent collectible - missing parent collectible

View File

@ -9,6 +9,11 @@
## Short term ## Short term
- [Feat] [caching] Use getURLs for precaching + precache everything
- [Feat] [caching] Refresh payload cache (wordings, languages...) when receiving webhook
- [Bugs] Make sure uploads name are slug-like and with an extension.
- [Bugs] Nyupun can't upload subtitles files
- [Bugs] https://v3.accords-library.com/en/collectibles/dod-original-soundtrack/scans obi is way too big
- [Feat] 404, 500 pages - [Feat] 404, 500 pages
- [Feat] [RichTextContent] Handle relationship - [Feat] [RichTextContent] Handle relationship
- [Feat] [Timeline] Improve layout/spacing on mobile - [Feat] [Timeline] Improve layout/spacing on mobile

View File

@ -21,7 +21,7 @@ export default defineConfig({
name: "on-server-start", name: "on-server-start",
hooks: { hooks: {
"astro:config:done": () => { "astro:config:done": () => {
console.log("Running on startup script in 10s...") console.log("Running on startup script in 10s...");
setTimeout(() => fetch(`http://${ASTRO_HOST}:${ASTRO_PORT}/en/api/on-startup`), 10_000); setTimeout(() => fetch(`http://${ASTRO_HOST}:${ASTRO_PORT}/en/api/on-startup`), 10_000);
}, },
}, },

640
package-lock.json generated
View File

@ -1,17 +1,17 @@
{ {
"name": "v3.accords-library.com", "name": "v3.accords-library.com",
"version": "3.0.0-beta.3", "version": "3.0.0-beta.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "v3.accords-library.com", "name": "v3.accords-library.com",
"version": "3.0.0-beta.3", "version": "3.0.0-beta.5",
"dependencies": { "dependencies": {
"@astrojs/check": "^0.7.0", "@astrojs/check": "^0.7.0",
"@astrojs/node": "^8.3.0", "@astrojs/node": "^8.3.1",
"accept-language": "^3.0.18", "accept-language": "^3.0.18",
"astro": "4.10.2", "astro": "4.10.3",
"astro-icon": "^1.1.0", "astro-icon": "^1.1.0",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
"ua-parser-js": "^1.0.38" "ua-parser-js": "^1.0.38"
@ -253,9 +253,9 @@
} }
}, },
"node_modules/@astrojs/node": { "node_modules/@astrojs/node": {
"version": "8.3.0", "version": "8.3.1",
"resolved": "https://registry.npmjs.org/@astrojs/node/-/node-8.3.0.tgz", "resolved": "https://registry.npmjs.org/@astrojs/node/-/node-8.3.1.tgz",
"integrity": "sha512-XskynbRTrpY9nqzc4NDrulNWoynRvVO+8UmEKjw6KZABUYUmjZqN88sa/RXtXl0CPI2sPZ5Gzi3WXH8y2PKd5Q==", "integrity": "sha512-JwJzE1zyNcb2Tnk1PJIiIV2vGadR/h0C7h3WeN50H7S/DbNpkGrfwKrOxxpZwhkujnudddToA9U4yv+IPlCf0g==",
"dependencies": { "dependencies": {
"send": "^0.18.0", "send": "^0.18.0",
"server-destroy": "^1.0.1" "server-destroy": "^1.0.1"
@ -1669,9 +1669,9 @@
} }
}, },
"node_modules/@esbuild/aix-ppc64": { "node_modules/@esbuild/aix-ppc64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
"integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@ -1684,9 +1684,9 @@
} }
}, },
"node_modules/@esbuild/android-arm": { "node_modules/@esbuild/android-arm": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
"integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -1699,9 +1699,9 @@
} }
}, },
"node_modules/@esbuild/android-arm64": { "node_modules/@esbuild/android-arm64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
"integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -1714,9 +1714,9 @@
} }
}, },
"node_modules/@esbuild/android-x64": { "node_modules/@esbuild/android-x64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
"integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1729,9 +1729,9 @@
} }
}, },
"node_modules/@esbuild/darwin-arm64": { "node_modules/@esbuild/darwin-arm64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
"integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -1744,9 +1744,9 @@
} }
}, },
"node_modules/@esbuild/darwin-x64": { "node_modules/@esbuild/darwin-x64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
"integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1759,9 +1759,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-arm64": { "node_modules/@esbuild/freebsd-arm64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
"integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -1774,9 +1774,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-x64": { "node_modules/@esbuild/freebsd-x64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
"integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1789,9 +1789,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm": { "node_modules/@esbuild/linux-arm": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
"integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -1804,9 +1804,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm64": { "node_modules/@esbuild/linux-arm64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
"integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -1819,9 +1819,9 @@
} }
}, },
"node_modules/@esbuild/linux-ia32": { "node_modules/@esbuild/linux-ia32": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
"integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@ -1834,9 +1834,9 @@
} }
}, },
"node_modules/@esbuild/linux-loong64": { "node_modules/@esbuild/linux-loong64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
"integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
"cpu": [ "cpu": [
"loong64" "loong64"
], ],
@ -1849,9 +1849,9 @@
} }
}, },
"node_modules/@esbuild/linux-mips64el": { "node_modules/@esbuild/linux-mips64el": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
"integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
"cpu": [ "cpu": [
"mips64el" "mips64el"
], ],
@ -1864,9 +1864,9 @@
} }
}, },
"node_modules/@esbuild/linux-ppc64": { "node_modules/@esbuild/linux-ppc64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
"integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@ -1879,9 +1879,9 @@
} }
}, },
"node_modules/@esbuild/linux-riscv64": { "node_modules/@esbuild/linux-riscv64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
"integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@ -1894,9 +1894,9 @@
} }
}, },
"node_modules/@esbuild/linux-s390x": { "node_modules/@esbuild/linux-s390x": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
"integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@ -1909,9 +1909,9 @@
} }
}, },
"node_modules/@esbuild/linux-x64": { "node_modules/@esbuild/linux-x64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
"integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1924,9 +1924,9 @@
} }
}, },
"node_modules/@esbuild/netbsd-x64": { "node_modules/@esbuild/netbsd-x64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
"integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1939,9 +1939,9 @@
} }
}, },
"node_modules/@esbuild/openbsd-x64": { "node_modules/@esbuild/openbsd-x64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
"integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1954,9 +1954,9 @@
} }
}, },
"node_modules/@esbuild/sunos-x64": { "node_modules/@esbuild/sunos-x64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
"integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1969,9 +1969,9 @@
} }
}, },
"node_modules/@esbuild/win32-arm64": { "node_modules/@esbuild/win32-arm64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
"integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -1984,9 +1984,9 @@
} }
}, },
"node_modules/@esbuild/win32-ia32": { "node_modules/@esbuild/win32-ia32": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
"integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@ -1999,9 +1999,9 @@
} }
}, },
"node_modules/@esbuild/win32-x64": { "node_modules/@esbuild/win32-x64": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
"integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -2769,9 +2769,9 @@
] ]
}, },
"node_modules/@shikijs/core": { "node_modules/@shikijs/core": {
"version": "1.6.4", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.6.4.tgz", "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.7.0.tgz",
"integrity": "sha512-WTU9rzZae1p2v6LOxMf6LhtmZOkIHYYW160IuahUyJy7YXPPjyWZLR1ag+SgD22ZMxZtz1gfU6Tccc8t0Il/XA==" "integrity": "sha512-O6j27b7dGmJbR3mjwh/aHH8Ld+GQvA0OQsNO43wKWnqbAae3AYXrhFyScHGX8hXZD6vX2ngjzDFkZY5srtIJbQ=="
}, },
"node_modules/@trysound/sax": { "node_modules/@trysound/sax": {
"version": "0.2.0", "version": "0.2.0",
@ -3035,9 +3035,9 @@
} }
}, },
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.11.3", "version": "8.12.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
"integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
}, },
@ -3147,9 +3147,9 @@
} }
}, },
"node_modules/astro": { "node_modules/astro": {
"version": "4.10.2", "version": "4.10.3",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.10.2.tgz", "resolved": "https://registry.npmjs.org/astro/-/astro-4.10.3.tgz",
"integrity": "sha512-SBdkoOanPsxKlKVU4uu/XG0G7NYAFoqmfBtq9SPMJ34B7Hr1MxVdEugERs8IwYN6UaxdDVcqA++9PvH6Onq2cg==", "integrity": "sha512-TWCJM+Vg+y0UoEz/H75rfp/u2N8yxeQQ2UrU9+fMcbjlzQJtGGDq3ApdundqPZgAuCryRuJnrKytStMZCFnlvQ==",
"dependencies": { "dependencies": {
"@astrojs/compiler": "^2.8.0", "@astrojs/compiler": "^2.8.0",
"@astrojs/internal-helpers": "0.4.0", "@astrojs/internal-helpers": "0.4.0",
@ -3163,7 +3163,7 @@
"@babel/types": "^7.24.7", "@babel/types": "^7.24.7",
"@types/babel__core": "^7.20.5", "@types/babel__core": "^7.20.5",
"@types/cookie": "^0.6.0", "@types/cookie": "^0.6.0",
"acorn": "^8.11.3", "acorn": "^8.12.0",
"aria-query": "^5.3.0", "aria-query": "^5.3.0",
"axobject-query": "^4.0.0", "axobject-query": "^4.0.0",
"boxen": "^7.1.1", "boxen": "^7.1.1",
@ -3202,13 +3202,13 @@
"rehype": "^13.0.1", "rehype": "^13.0.1",
"resolve": "^1.22.8", "resolve": "^1.22.8",
"semver": "^7.6.2", "semver": "^7.6.2",
"shiki": "^1.6.3", "shiki": "^1.6.5",
"string-width": "^7.1.0", "string-width": "^7.1.0",
"strip-ansi": "^7.1.0", "strip-ansi": "^7.1.0",
"tsconfck": "^3.1.0", "tsconfck": "^3.1.0",
"unist-util-visit": "^5.0.0", "unist-util-visit": "^5.0.0",
"vfile": "^6.0.1", "vfile": "^6.0.1",
"vite": "^5.2.13", "vite": "^5.3.1",
"vitefu": "^0.2.5", "vitefu": "^0.2.5",
"which-pm": "^2.2.0", "which-pm": "^2.2.0",
"yargs-parser": "^21.1.1", "yargs-parser": "^21.1.1",
@ -3246,388 +3246,6 @@
"astro": "^4.0.0" "astro": "^4.0.0"
} }
}, },
"node_modules/astro/node_modules/@esbuild/aix-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
"integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
"cpu": [
"ppc64"
],
"optional": true,
"os": [
"aix"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/android-arm": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
"integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/android-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
"integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/android-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
"integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/darwin-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
"integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/darwin-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
"integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/freebsd-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
"integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/freebsd-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
"integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/linux-arm": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
"integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/linux-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
"integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/linux-ia32": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
"integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/linux-loong64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
"integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
"cpu": [
"loong64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/linux-mips64el": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
"integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
"cpu": [
"mips64el"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/linux-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
"integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
"cpu": [
"ppc64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/linux-riscv64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
"integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
"cpu": [
"riscv64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/linux-s390x": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
"integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
"cpu": [
"s390x"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/linux-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
"integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/netbsd-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
"integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/openbsd-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
"integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/sunos-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
"integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/win32-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
"integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/win32-ia32": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
"integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/@esbuild/win32-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
"integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/astro/node_modules/esbuild": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
"integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
"node": ">=12"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.21.5",
"@esbuild/android-arm": "0.21.5",
"@esbuild/android-arm64": "0.21.5",
"@esbuild/android-x64": "0.21.5",
"@esbuild/darwin-arm64": "0.21.5",
"@esbuild/darwin-x64": "0.21.5",
"@esbuild/freebsd-arm64": "0.21.5",
"@esbuild/freebsd-x64": "0.21.5",
"@esbuild/linux-arm": "0.21.5",
"@esbuild/linux-arm64": "0.21.5",
"@esbuild/linux-ia32": "0.21.5",
"@esbuild/linux-loong64": "0.21.5",
"@esbuild/linux-mips64el": "0.21.5",
"@esbuild/linux-ppc64": "0.21.5",
"@esbuild/linux-riscv64": "0.21.5",
"@esbuild/linux-s390x": "0.21.5",
"@esbuild/linux-x64": "0.21.5",
"@esbuild/netbsd-x64": "0.21.5",
"@esbuild/openbsd-x64": "0.21.5",
"@esbuild/sunos-x64": "0.21.5",
"@esbuild/win32-arm64": "0.21.5",
"@esbuild/win32-ia32": "0.21.5",
"@esbuild/win32-x64": "0.21.5"
}
},
"node_modules/autoprefixer": { "node_modules/autoprefixer": {
"version": "10.4.19", "version": "10.4.19",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz",
@ -3762,11 +3380,11 @@
} }
}, },
"node_modules/braces": { "node_modules/braces": {
"version": "3.0.2", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dependencies": { "dependencies": {
"fill-range": "^7.0.1" "fill-range": "^7.1.1"
}, },
"engines": { "engines": {
"node": ">=8" "node": ">=8"
@ -4604,9 +4222,9 @@
"integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==" "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg=="
}, },
"node_modules/esbuild": { "node_modules/esbuild": {
"version": "0.20.2", "version": "0.21.5",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
"integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
"hasInstallScript": true, "hasInstallScript": true,
"bin": { "bin": {
"esbuild": "bin/esbuild" "esbuild": "bin/esbuild"
@ -4615,29 +4233,29 @@
"node": ">=12" "node": ">=12"
}, },
"optionalDependencies": { "optionalDependencies": {
"@esbuild/aix-ppc64": "0.20.2", "@esbuild/aix-ppc64": "0.21.5",
"@esbuild/android-arm": "0.20.2", "@esbuild/android-arm": "0.21.5",
"@esbuild/android-arm64": "0.20.2", "@esbuild/android-arm64": "0.21.5",
"@esbuild/android-x64": "0.20.2", "@esbuild/android-x64": "0.21.5",
"@esbuild/darwin-arm64": "0.20.2", "@esbuild/darwin-arm64": "0.21.5",
"@esbuild/darwin-x64": "0.20.2", "@esbuild/darwin-x64": "0.21.5",
"@esbuild/freebsd-arm64": "0.20.2", "@esbuild/freebsd-arm64": "0.21.5",
"@esbuild/freebsd-x64": "0.20.2", "@esbuild/freebsd-x64": "0.21.5",
"@esbuild/linux-arm": "0.20.2", "@esbuild/linux-arm": "0.21.5",
"@esbuild/linux-arm64": "0.20.2", "@esbuild/linux-arm64": "0.21.5",
"@esbuild/linux-ia32": "0.20.2", "@esbuild/linux-ia32": "0.21.5",
"@esbuild/linux-loong64": "0.20.2", "@esbuild/linux-loong64": "0.21.5",
"@esbuild/linux-mips64el": "0.20.2", "@esbuild/linux-mips64el": "0.21.5",
"@esbuild/linux-ppc64": "0.20.2", "@esbuild/linux-ppc64": "0.21.5",
"@esbuild/linux-riscv64": "0.20.2", "@esbuild/linux-riscv64": "0.21.5",
"@esbuild/linux-s390x": "0.20.2", "@esbuild/linux-s390x": "0.21.5",
"@esbuild/linux-x64": "0.20.2", "@esbuild/linux-x64": "0.21.5",
"@esbuild/netbsd-x64": "0.20.2", "@esbuild/netbsd-x64": "0.21.5",
"@esbuild/openbsd-x64": "0.20.2", "@esbuild/openbsd-x64": "0.21.5",
"@esbuild/sunos-x64": "0.20.2", "@esbuild/sunos-x64": "0.21.5",
"@esbuild/win32-arm64": "0.20.2", "@esbuild/win32-arm64": "0.21.5",
"@esbuild/win32-ia32": "0.20.2", "@esbuild/win32-ia32": "0.21.5",
"@esbuild/win32-x64": "0.20.2" "@esbuild/win32-x64": "0.21.5"
} }
}, },
"node_modules/escalade": { "node_modules/escalade": {
@ -4797,9 +4415,9 @@
} }
}, },
"node_modules/fill-range": { "node_modules/fill-range": {
"version": "7.0.1", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dependencies": { "dependencies": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
}, },
@ -8556,11 +8174,11 @@
} }
}, },
"node_modules/shiki": { "node_modules/shiki": {
"version": "1.6.4", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.4.tgz", "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.7.0.tgz",
"integrity": "sha512-X88chM7w8jnadoZtjPTi5ahCJx9pc9f8GfEkZAEYUTlcUZIEw2D/RY86HI/LkkE7Nj8TQWkiBfaFTJ3VJT6ESg==", "integrity": "sha512-H5pMn4JA7ayx8H0qOz1k2qANq6mZVCMl1gKLK6kWIrv1s2Ial4EmD4s4jE8QB5Dw03d/oCQUxc24sotuyR5byA==",
"dependencies": { "dependencies": {
"@shikijs/core": "1.6.4" "@shikijs/core": "1.7.0"
} }
}, },
"node_modules/signal-exit": { "node_modules/signal-exit": {
@ -9186,11 +8804,11 @@
} }
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "5.2.13", "version": "5.3.1",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.13.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz",
"integrity": "sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==", "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==",
"dependencies": { "dependencies": {
"esbuild": "^0.20.1", "esbuild": "^0.21.3",
"postcss": "^8.4.38", "postcss": "^8.4.38",
"rollup": "^4.13.0" "rollup": "^4.13.0"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "v3.accords-library.com", "name": "v3.accords-library.com",
"version": "3.0.0-beta.4", "version": "3.0.0-beta.5",
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",
"start": "astro dev", "start": "astro dev",
@ -20,9 +20,9 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.7.0", "@astrojs/check": "^0.7.0",
"@astrojs/node": "^8.3.0", "@astrojs/node": "^8.3.1",
"accept-language": "^3.0.18", "accept-language": "^3.0.18",
"astro": "4.10.2", "astro": "4.10.3",
"astro-icon": "^1.1.0", "astro-icon": "^1.1.0",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
"ua-parser-js": "^1.0.38" "ua-parser-js": "^1.0.38"

View File

@ -1,16 +1,6 @@
import type { APIRoute } from "astro"; import type { APIRoute } from "astro";
import { import type { AfterOperationWebHookMessage } from "src/shared/payload/payload-sdk";
Collections, import { invalidateDataCache } from "src/utils/payload";
WebHookOperationType,
type WebHookMessage,
} from "src/shared/payload/payload-sdk";
import {
invalidateDataCache,
refreshCurrencies,
refreshLocales,
refreshWebsiteConfig,
refreshWordings,
} from "src/utils/payload";
export const POST: APIRoute = async ({ request }) => { export const POST: APIRoute = async ({ request }) => {
const auth = request.headers.get("Authorization"); const auth = request.headers.get("Authorization");
@ -19,30 +9,13 @@ export const POST: APIRoute = async ({ request }) => {
return new Response(null, { status: 403, statusText: "Forbidden" }); return new Response(null, { status: 403, statusText: "Forbidden" });
} }
const { collection, operation, id } = (await request.json()) as WebHookMessage; const message = (await request.json()) as AfterOperationWebHookMessage;
console.log("[Webhook] Received message from CMS:", { collection, Collections, id }); console.log("[Webhook] Received messages from CMS:", message);
if (id && operation !== WebHookOperationType.create) { await invalidateDataCache(
await invalidateDataCache(id); [...(message.id ? [message.id] : []), ...message.addedDependantIds],
} message.urls
);
switch (collection) { return new Response(null, { status: 202, statusText: "Accepted" });
case Collections.Wordings:
await refreshWordings();
break;
case Collections.Currencies:
await refreshCurrencies();
break;
case Collections.Languages:
await refreshLocales();
break;
case Collections.WebsiteConfig:
await refreshWebsiteConfig();
break;
}
return new Response(null, { status: 200, statusText: "Ok" });
}; };

View File

@ -1,177 +1,177 @@
{ {
"disclaimer": "Usage subject to terms: https://openexchangerates.org/terms", "disclaimer": "Usage subject to terms: https://openexchangerates.org/terms",
"license": "https://openexchangerates.org/license", "license": "https://openexchangerates.org/license",
"timestamp": 1718449213, "timestamp": 1718769601,
"base": "USD", "base": "USD",
"rates": { "rates": {
"AED": 3.673, "AED": 3.673,
"AFN": 70.629925, "AFN": 70.163141,
"ALL": 93.766029, "ALL": 93.552377,
"AMD": 387.09398, "AMD": 388.086509,
"ANG": 1.79792, "ANG": 1.802556,
"AOA": 855.5, "AOA": 854.494667,
"ARS": 901.78997, "ARS": 905.759291,
"AUD": 1.513088, "AUD": 1.501458,
"AWG": 1.80125, "AWG": 1.8,
"AZN": 1.7, "AZN": 1.7,
"BAM": 1.825818, "BAM": 1.821501,
"BBD": 2, "BBD": 2,
"BDT": 117.237829, "BDT": 117.292047,
"BGN": 1.828515, "BGN": 1.8212,
"BHD": 0.376276, "BHD": 0.376891,
"BIF": 2867.428126, "BIF": 2869.980338,
"BMD": 1, "BMD": 1,
"BND": 1.350399, "BND": 1.35155,
"BOB": 6.893272, "BOB": 6.897451,
"BRL": 5.3773, "BRL": 5.4413,
"BSD": 1, "BSD": 1,
"BTC": 0.000015094941, "BTC": 0.000015288954,
"BTN": 83.342478, "BTN": 83.247452,
"BWP": 13.582319, "BWP": 13.517364,
"BYN": 3.264326, "BYN": 3.26637,
"BZD": 2.010911, "BZD": 2.012145,
"CAD": 1.37535, "CAD": 1.372048,
"CDF": 2819.794327, "CDF": 2835.224044,
"CHF": 0.89102, "CHF": 0.884319,
"CLF": 0.033781, "CLF": 0.033902,
"CLP": 932.13, "CLP": 935.45,
"CNH": 7.27105, "CNH": 7.273883,
"CNY": 7.2548, "CNY": 7.2559,
"COP": 4140.0662, "COP": 4122.284393,
"CRC": 525.947274, "CRC": 525.542692,
"CUC": 1, "CUC": 1,
"CUP": 25.75, "CUP": 25.75,
"CVE": 102.825557, "CVE": 102.693429,
"CZK": 23.0983, "CZK": 23.131,
"DJF": 177.628631, "DJF": 177.73558,
"DKK": 6.9657, "DKK": 6.947223,
"DOP": 59.234388, "DOP": 59.183449,
"DZD": 134.823, "DZD": 134.598577,
"EGP": 47.71, "EGP": 47.7088,
"ERN": 15, "ERN": 15,
"ETB": 57.057587, "ETB": 57.520491,
"EUR": 0.933053, "EUR": 0.931299,
"FJD": 2.2387, "FJD": 2.25895,
"FKP": 0.789079, "FKP": 0.786911,
"GBP": 0.789079, "GBP": 0.786911,
"GEL": 2.87, "GEL": 2.84,
"GGP": 0.789079, "GGP": 0.786911,
"GHS": 15.01562, "GHS": 15.02333,
"GIP": 0.789079, "GIP": 0.786911,
"GMD": 67.75, "GMD": 67.75,
"GNF": 8588.587525, "GNF": 8593.158878,
"GTQ": 7.749335, "GTQ": 7.745895,
"GYD": 208.737801, "GYD": 208.758212,
"HKD": 7.81055, "HKD": 7.808162,
"HNL": 24.65706, "HNL": 25.078995,
"HRK": 7.03975, "HRK": 7.016854,
"HTG": 132.335527, "HTG": 132.267879,
"HUF": 372.07, "HUF": 366.849287,
"IDR": 16486.5, "IDR": 16349.509717,
"ILS": 3.7242, "ILS": 3.716955,
"IMP": 0.789079, "IMP": 0.786911,
"INR": 83.55155, "INR": 83.381051,
"IQD": 1306.849431, "IQD": 1306.660001,
"IRR": 42100, "IRR": 42087.5,
"ISK": 139.040389, "ISK": 139.04,
"JEP": 0.789079, "JEP": 0.786911,
"JMD": 155.257148, "JMD": 155.440387,
"JOD": 0.7089, "JOD": 0.7089,
"JPY": 157.42503042, "JPY": 157.859,
"KES": 129.202198, "KES": 129.27,
"KGS": 87.1182, "KGS": 87.6016,
"KHR": 4108.729824, "KHR": 4112.767316,
"KMF": 457.499995, "KMF": 458.849846,
"KPW": 900, "KPW": 900,
"KRW": 1383.27, "KRW": 1382.002686,
"KWD": 0.306225, "KWD": 0.306682,
"KYD": 0.831445, "KYD": 0.831866,
"KZT": 451.01908, "KZT": 459.016771,
"LAK": 21788.785264, "LAK": 21889.130162,
"LBP": 89337.02505, "LBP": 89643.929605,
"LKR": 303.408359, "LKR": 304.461947,
"LRD": 193.537555, "LRD": 193.81036,
"LSL": 18.318086, "LSL": 18.097846,
"LYD": 4.83704, "LYD": 4.840137,
"MAD": 10.025552, "MAD": 9.975878,
"MDL": 17.730591, "MDL": 17.828505,
"MGA": 4440.702811, "MGA": 4470.377749,
"MKD": 57.457919, "MKD": 57.384069,
"MMK": 2201.379322, "MMK": 2096.43,
"MNT": 3450, "MNT": 3450,
"MOP": 8.026577, "MOP": 8.027251,
"MRU": 39.295939, "MRU": 39.448914,
"MUR": 46.775637, "MUR": 46.666698,
"MVR": 15.41, "MVR": 15.395,
"MWK": 1729.752588, "MWK": 1730.787269,
"MXN": 18.4648, "MXN": 18.4099,
"MYR": 4.719499, "MYR": 4.708,
"MZN": 63.899991, "MZN": 63.885,
"NAD": 18.318086, "NAD": 18.097846,
"NGN": 1495.5, "NGN": 1484.33,
"NIO": 36.723084, "NIO": 36.741079,
"NOK": 10.68245, "NOK": 10.573511,
"NPR": 133.348263, "NPR": 133.44253,
"NZD": 1.627075, "NZD": 1.63038,
"OMR": 0.384948, "OMR": 0.384941,
"PAB": 1, "PAB": 1,
"PEN": 3.770504, "PEN": 3.789035,
"PGK": 3.887723, "PGK": 3.890178,
"PHP": 58.700001, "PHP": 58.671002,
"PKR": 277.884288, "PKR": 278.046054,
"PLN": 4.092232, "PLN": 4.041156,
"PYG": 7503.069605, "PYG": 7507.477573,
"QAR": 3.638178, "QAR": 3.640673,
"RON": 4.653, "RON": 4.6337,
"RSD": 109.359, "RSD": 109.022,
"RUB": 89.307513, "RUB": 85.747634,
"RWF": 1308.992161, "RWF": 1305.577777,
"SAR": 3.752179, "SAR": 3.751877,
"SBD": 8.4616, "SBD": 8.471937,
"SCR": 13.560479, "SCR": 13.937,
"SDG": 586, "SDG": 601,
"SEK": 10.63185, "SEK": 10.433372,
"SGD": 1.3535, "SGD": 1.350881,
"SHP": 0.789079, "SHP": 0.786911,
"SLL": 20969.5, "SLL": 20969.5,
"SOS": 570.149738, "SOS": 571.352636,
"SRD": 31.572, "SRD": 31.231,
"SSP": 130.26, "SSP": 130.26,
"STD": 22281.8, "STD": 22281.8,
"STN": 22.847018, "STN": 22.817654,
"SVC": 8.729426, "SVC": 8.734971,
"SYP": 2512.53, "SYP": 2512.53,
"SZL": 18.307455, "SZL": 18.092071,
"THB": 36.630765, "THB": 36.730254,
"TJS": 10.669464, "TJS": 10.681083,
"TMT": 3.5, "TMT": 3.5,
"TND": 3.122488, "TND": 3.125274,
"TOP": 2.35645, "TOP": 2.361474,
"TRY": 32.7375, "TRY": 32.617701,
"TTD": 6.779503, "TTD": 6.781034,
"TWD": 32.3458, "TWD": 32.385,
"TZS": 2619.02838, "TZS": 2615,
"UAH": 40.593838, "UAH": 40.591421,
"UGX": 3705.886831, "UGX": 3711.377309,
"USD": 1, "USD": 1,
"UYU": 39.291418, "UYU": 39.353278,
"UZS": 12584.375498, "UZS": 12604.759961,
"VES": 36.372315, "VES": 36.348426,
"VND": 25455.008685, "VND": 25451.768898,
"VUV": 118.722, "VUV": 118.722,
"WST": 2.8, "WST": 2.8,
"XAF": 612.042932, "XAF": 610.891881,
"XAG": 0.03380837, "XAG": 0.03397836,
"XAU": 0.00042863, "XAU": 0.00042947,
"XCD": 2.70255, "XCD": 2.70255,
"XDR": 0.756096, "XDR": 0.757639,
"XOF": 612.042932, "XOF": 610.891881,
"XPD": 0.00113108, "XPD": 0.00113672,
"XPF": 111.342892, "XPF": 111.133493,
"XPT": 0.00104433, "XPT": 0.00102682,
"YER": 250.33747, "YER": 250.350066,
"ZAR": 18.35321, "ZAR": 18.039756,
"ZMW": 26.168747, "ZMW": 25.779293,
"ZWL": 322 "ZWL": 322
} }
} }

View File

@ -1278,18 +1278,11 @@ export enum AttributeTypes {
/* WEB HOOKS */ /* WEB HOOKS */
export interface WebHookMessage { export type AfterOperationWebHookMessage = {
collection: Collections;
operation: WebHookOperationType;
id?: string; id?: string;
} addedDependantIds: string[];
urls: string[];
export enum WebHookOperationType { };
create = "create",
update = "update",
delete = "delete",
}
/* RICH TEXT */ /* RICH TEXT */
export type RichTextContent = { export type RichTextContent = {
@ -2024,6 +2017,7 @@ export type EndpointAllPaths = {
audios: string[]; audios: string[];
images: string[]; images: string[];
recorders: string[]; recorders: string[];
chronologyEvents: string[];
}; };
// SDK // SDK
@ -2044,6 +2038,31 @@ type GetPayloadSDKParams = {
const logResponse = (res: Response) => console.log(res.status, res.statusText, res.url); const logResponse = (res: Response) => console.log(res.status, res.statusText, res.url);
export const getSDKEndpoint = {
getConfigEndpoint: () => `/globals/${Collections.WebsiteConfig}/config`,
getFolderEndpoint: (slug: string) => `/${Collections.Folders}/slug/${slug}`,
getLanguagesEndpoint: () => `/${Collections.Languages}/all`,
getCurrenciesEndpoint: () => `/${Collections.Currencies}/all`,
getWordingsEndpoint: () => `/${Collections.Wordings}/all`,
getPageEndpoint: (slug: string) => `/${Collections.Pages}/slug/${slug}`,
getCollectibleEndpoint: (slug: string) => `/${Collections.Collectibles}/slug/${slug}`,
getCollectibleScansEndpoint: (slug: string) => `/${Collections.Collectibles}/slug/${slug}/scans`,
getCollectibleScanPageEndpoint: (slug: string, index: string) =>
`/${Collections.Collectibles}/slug/${slug}/scans/${index}`,
getCollectibleGalleryEndpoint: (slug: string) =>
`/${Collections.Collectibles}/slug/${slug}/gallery`,
getCollectibleGalleryImageEndpoint: (slug: string, index: string) =>
`/${Collections.Collectibles}/slug/${slug}/gallery/${index}`,
getChronologyEventsEndpoint: () => `/${Collections.ChronologyEvents}/all`,
getChronologyEventByIDEndpoint: (id: string) => `/${Collections.ChronologyEvents}/id/${id}`,
getImageByIDEndpoint: (id: string) => `/${Collections.Images}/id/${id}`,
getAudioByIDEndpoint: (id: string) => `/${Collections.Audios}/id/${id}`,
getVideoByIDEndpoint: (id: string) => `/${Collections.Videos}/id/${id}`,
getRecorderByIDEndpoint: (id: string) => `/${Collections.Recorders}/id/${id}`,
getAllPathsEndpoint: () => `/all-paths`,
getLoginEndpoint: () => `/${Collections.Recorders}/login`,
};
export const getPayloadSDK = ({ export const getPayloadSDK = ({
apiURL, apiURL,
email, email,
@ -2052,7 +2071,7 @@ export const getPayloadSDK = ({
responseCache, responseCache,
}: GetPayloadSDKParams) => { }: GetPayloadSDKParams) => {
const refreshToken = async () => { const refreshToken = async () => {
const loginUrl = `${apiURL}/${Collections.Recorders}/login`; const loginUrl = `${apiURL}${getSDKEndpoint.getLoginEndpoint()}`;
const loginResult = await fetch(loginUrl, { const loginResult = await fetch(loginUrl, {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
@ -2072,13 +2091,13 @@ export const getPayloadSDK = ({
return token; return token;
}; };
const request = async (url: string): Promise<any> => { const request = async (endpoint: string): Promise<any> => {
const cachedResponse = responseCache?.get(url); const cachedResponse = responseCache?.get(endpoint);
if (cachedResponse) { if (cachedResponse) {
return cachedResponse; return cachedResponse;
} }
const result = await fetch(url, { const result = await fetch(`${apiURL}${endpoint}`, {
headers: { headers: {
Authorization: `JWT ${tokenCache?.get() ?? (await refreshToken())}`, Authorization: `JWT ${tokenCache?.get() ?? (await refreshToken())}`,
}, },
@ -2090,52 +2109,53 @@ export const getPayloadSDK = ({
} }
const data = await result.json(); const data = await result.json();
responseCache?.set(url, data); responseCache?.set(endpoint, data);
return data; return data;
}; };
return { return {
getConfig: async (): Promise<EndpointWebsiteConfig> => getConfig: async (): Promise<EndpointWebsiteConfig> =>
await request(`${apiURL}/globals/${Collections.WebsiteConfig}/config`), await request(getSDKEndpoint.getConfigEndpoint()),
getFolder: async (slug: string): Promise<EndpointFolder> => getFolder: async (slug: string): Promise<EndpointFolder> =>
await request(`${apiURL}/${Collections.Folders}/slug/${slug}`), await request(getSDKEndpoint.getFolderEndpoint(slug)),
getLanguages: async (): Promise<Language[]> => getLanguages: async (): Promise<Language[]> =>
await request(`${apiURL}/${Collections.Languages}/all`), await request(getSDKEndpoint.getLanguagesEndpoint()),
getCurrencies: async (): Promise<Currency[]> => getCurrencies: async (): Promise<Currency[]> =>
await request(`${apiURL}/${Collections.Currencies}/all`), await request(getSDKEndpoint.getCurrenciesEndpoint()),
getWordings: async (): Promise<EndpointWording[]> => getWordings: async (): Promise<EndpointWording[]> =>
await request(`${apiURL}/${Collections.Wordings}/all`), await request(getSDKEndpoint.getWordingsEndpoint()),
getPage: async (slug: string): Promise<EndpointPage> => getPage: async (slug: string): Promise<EndpointPage> =>
await request(`${apiURL}/${Collections.Pages}/slug/${slug}`), await request(getSDKEndpoint.getPageEndpoint(slug)),
getCollectible: async (slug: string): Promise<EndpointCollectible> => getCollectible: async (slug: string): Promise<EndpointCollectible> =>
await request(`${apiURL}/${Collections.Collectibles}/slug/${slug}`), await request(getSDKEndpoint.getCollectibleEndpoint(slug)),
getCollectibleScans: async (slug: string): Promise<EndpointCollectibleScans> => getCollectibleScans: async (slug: string): Promise<EndpointCollectibleScans> =>
await request(`${apiURL}/${Collections.Collectibles}/slug/${slug}/scans`), await request(getSDKEndpoint.getCollectibleScansEndpoint(slug)),
getCollectibleScanPage: async ( getCollectibleScanPage: async (
slug: string, slug: string,
index: string index: string
): Promise<EndpointCollectibleScanPage> => ): Promise<EndpointCollectibleScanPage> =>
await request(`${apiURL}/${Collections.Collectibles}/slug/${slug}/scans/${index}`), await request(getSDKEndpoint.getCollectibleScanPageEndpoint(slug, index)),
getCollectibleGallery: async (slug: string): Promise<EndpointCollectibleGallery> => getCollectibleGallery: async (slug: string): Promise<EndpointCollectibleGallery> =>
await request(`${apiURL}/${Collections.Collectibles}/slug/${slug}/gallery`), await request(getSDKEndpoint.getCollectibleGalleryEndpoint(slug)),
getCollectibleGalleryImage: async ( getCollectibleGalleryImage: async (
slug: string, slug: string,
index: string index: string
): Promise<EndpointCollectibleGalleryImage> => ): Promise<EndpointCollectibleGalleryImage> =>
await request(`${apiURL}/${Collections.Collectibles}/slug/${slug}/gallery/${index}`), await request(getSDKEndpoint.getCollectibleGalleryImageEndpoint(slug, index)),
getChronologyEvents: async (): Promise<EndpointChronologyEvent[]> => getChronologyEvents: async (): Promise<EndpointChronologyEvent[]> =>
await request(`${apiURL}/${Collections.ChronologyEvents}/all`), await request(getSDKEndpoint.getChronologyEventsEndpoint()),
getChronologyEventByID: async (id: string): Promise<EndpointChronologyEvent> => getChronologyEventByID: async (id: string): Promise<EndpointChronologyEvent> =>
await request(`${apiURL}/${Collections.ChronologyEvents}/id/${id}`), await request(getSDKEndpoint.getChronologyEventByIDEndpoint(id)),
getImageByID: async (id: string): Promise<EndpointImage> => getImageByID: async (id: string): Promise<EndpointImage> =>
await request(`${apiURL}/${Collections.Images}/id/${id}`), await request(getSDKEndpoint.getImageByIDEndpoint(id)),
getAudioByID: async (id: string): Promise<EndpointAudio> => getAudioByID: async (id: string): Promise<EndpointAudio> =>
await request(`${apiURL}/${Collections.Audios}/id/${id}`), await request(getSDKEndpoint.getAudioByIDEndpoint(id)),
getVideoByID: async (id: string): Promise<EndpointVideo> => getVideoByID: async (id: string): Promise<EndpointVideo> =>
await request(`${apiURL}/${Collections.Videos}/id/${id}`), await request(getSDKEndpoint.getVideoByIDEndpoint(id)),
getRecorderByID: async (id: string): Promise<EndpointRecorder> => getRecorderByID: async (id: string): Promise<EndpointRecorder> =>
await request(`${apiURL}/${Collections.Recorders}/id/${id}`), await request(getSDKEndpoint.getRecorderByIDEndpoint(id)),
getAllPaths: async (): Promise<EndpointAllPaths> => await request(`${apiURL}/all-paths`), getAllPaths: async (): Promise<EndpointAllPaths> =>
request: async (url: string): Promise<any> => await request(url), await request(getSDKEndpoint.getAllPathsEndpoint()),
request: async (pathname: string): Promise<any> => await request(pathname),
}; };
}; };

View File

@ -60,18 +60,23 @@ export const payload = getPayloadSDK({
}, },
}); });
export const invalidateDataCache = async (id: string) => { export const invalidateDataCache = async (ids: string[], urls: string[]) => {
const responsesToInvalidate = idsCacheMap.get(id); const urlsToInvalidate = new Set<string>(urls);
if (!responsesToInvalidate) return;
idsCacheMap.delete(id);
for (const url of responsesToInvalidate) { ids.forEach((id) => {
const urlsForThisId = idsCacheMap.get(id);
if (!urlsForThisId) return;
idsCacheMap.delete(id);
[...urlsForThisId].forEach((url) => urlsToInvalidate.add(url));
});
for (const url of urlsToInvalidate) {
responseCache.delete(url); responseCache.delete(url);
console.log("[ResponseCaching][Invalidation] Deleted cache for", url);
try { try {
await payload.request(url); await payload.request(url);
console.log("[ResponseCaching][Invalidation] Success for", url);
} catch (e) { } catch (e) {
console.log("[ResponseCaching][Invalidation] Failure for", url); console.log("[ResponseCaching][Revalidation] Failure for", url);
} }
} }
@ -116,44 +121,72 @@ export const initPayload = async () => {
const result = await payload.getAllPaths(); const result = await payload.getAllPaths();
for (const slug of result.pages) { for (const slug of result.pages) {
await payload.getPage(slug); try {
await payload.getPage(slug);
} catch (e) {
console.warn("[Precaching] Couldn't precache page", slug, e);
}
} }
for (const slug of result.folders) { for (const slug of result.folders) {
await payload.getFolder(slug); try {
await payload.getFolder(slug);
} catch (e) {
console.warn("[Precaching] Couldn't precache folder", slug, e);
}
} }
for (const slug of result.collectibles) { for (const slug of result.collectibles) {
const collectible = await payload.getCollectible(slug); try {
if (collectible.scans) { const collectible = await payload.getCollectible(slug);
await payload.getCollectibleScans(slug); if (collectible.scans) {
} await payload.getCollectibleScans(slug);
if (collectible.gallery) { }
await payload.getCollectibleGallery(slug); if (collectible.gallery) {
await payload.getCollectibleGallery(slug);
}
} catch (e) {
console.warn("[Precaching] Couldn't precache collectible", slug, e);
} }
} }
for (const id of result.recorders) { for (const id of result.recorders) {
await payload.getRecorderByID(id); try {
} await payload.getRecorderByID(id);
} catch (e) {
for (const id of result.recorders) { console.warn("[Precaching] Couldn't precache recorder", id, e);
await payload.getRecorderByID(id); }
} }
for (const id of result.audios) { for (const id of result.audios) {
await payload.getAudioByID(id); try {
await payload.getAudioByID(id);
} catch (e) {
console.warn("[Precaching] Couldn't precache audio", id, e);
}
} }
for (const id of result.videos) { for (const id of result.videos) {
await payload.getVideoByID(id); try {
await payload.getVideoByID(id);
} catch (e) {
console.warn("[Precaching] Couldn't precache video", id, e);
}
} }
for (const id of result.images) { for (const id of result.images) {
await payload.getImageByID(id); try {
await payload.getImageByID(id);
} catch (e) {
console.warn("[Precaching] Couldn't precache image", id, e);
}
} }
await payload.getChronologyEvents(); try {
await payload.getChronologyEvents();
} catch (e) {
console.warn("[Precaching] Couldn't precache chronology events", e);
}
payloadInitialized = true; payloadInitialized = true;
console.log("[ResponseCaching] Precaching completed!", responseCache.size, "responses cached"); console.log("[ResponseCaching] Precaching completed!", responseCache.size, "responses cached");