fix(playlists): bundle community playlist index

The index was scraped from the Flashpoint Datahub wiki on every request.
That page now sits behind a Cloudflare managed challenge that no plain
HTTP client can pass, so the endpoint answered 500 for every caller.

Ship the list instead, extracted from a saved copy of the page into
data/community-playlists.json: 104 playlists across 9 categories. Only
entries whose download URL is on the allowlist are kept, so everything
the modal offers can also be imported. That drops the Old Default
Playlists section, hosted off the allowlist and still in the
pre-Flashpoint 10 format.

The modal now fetches only while open rather than on every render of the
playlists page, and shows when the snapshot was captured. Drops cheerio,
whose only consumer was the scrape.
This commit is contained in:
Darkraise
2026-08-13 13:57:52 +07:00
parent e9613362c2
commit 049779a78a
13 changed files with 973 additions and 456 deletions
+1 -250
View File
@@ -36,7 +36,6 @@
"axios": "^1.13.2",
"bcrypt": "^6.0.0",
"better-sqlite3": "^12.6.0",
"cheerio": "^1.1.2",
"compression": "^1.7.4",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
@@ -944,10 +943,6 @@
"node": "*"
}
},
"backend/node_modules/boolbase": {
"version": "1.0.0",
"license": "ISC"
},
"backend/node_modules/brace-expansion": {
"version": "2.0.2",
"dev": true,
@@ -1000,44 +995,6 @@
"node": "*"
}
},
"backend/node_modules/cheerio": {
"version": "1.1.2",
"license": "MIT",
"dependencies": {
"cheerio-select": "^2.1.0",
"dom-serializer": "^2.0.0",
"domhandler": "^5.0.3",
"domutils": "^3.2.2",
"encoding-sniffer": "^0.2.1",
"htmlparser2": "^10.0.0",
"parse5": "^7.3.0",
"parse5-htmlparser2-tree-adapter": "^7.1.0",
"parse5-parser-stream": "^7.1.2",
"undici": "^7.12.0",
"whatwg-mimetype": "^4.0.0"
},
"engines": {
"node": ">=20.18.1"
},
"funding": {
"url": "https://github.com/cheeriojs/cheerio?sponsor=1"
}
},
"backend/node_modules/cheerio-select": {
"version": "2.1.0",
"license": "BSD-2-Clause",
"dependencies": {
"boolbase": "^1.0.0",
"css-select": "^5.1.0",
"css-what": "^6.1.0",
"domelementtype": "^2.3.0",
"domhandler": "^5.0.3",
"domutils": "^3.0.1"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"backend/node_modules/compressible": {
"version": "2.0.18",
"license": "MIT",
@@ -1093,30 +1050,6 @@
"node": ">= 8"
}
},
"backend/node_modules/css-select": {
"version": "5.2.2",
"license": "BSD-2-Clause",
"dependencies": {
"boolbase": "^1.0.0",
"css-what": "^6.1.0",
"domhandler": "^5.0.2",
"domutils": "^3.0.1",
"nth-check": "^2.0.1"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"backend/node_modules/css-what": {
"version": "6.2.2",
"license": "BSD-2-Clause",
"engines": {
"node": ">= 6"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"backend/node_modules/debug": {
"version": "4.4.3",
"dev": true,
@@ -1179,84 +1112,6 @@
"node": ">=6.0.0"
}
},
"backend/node_modules/dom-serializer": {
"version": "2.0.0",
"license": "MIT",
"dependencies": {
"domelementtype": "^2.3.0",
"domhandler": "^5.0.2",
"entities": "^4.2.0"
},
"funding": {
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
}
},
"backend/node_modules/domelementtype": {
"version": "2.3.0",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fb55"
}
],
"license": "BSD-2-Clause"
},
"backend/node_modules/domhandler": {
"version": "5.0.3",
"license": "BSD-2-Clause",
"dependencies": {
"domelementtype": "^2.3.0"
},
"engines": {
"node": ">= 4"
},
"funding": {
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
"backend/node_modules/domutils": {
"version": "3.2.2",
"license": "BSD-2-Clause",
"dependencies": {
"dom-serializer": "^2.0.0",
"domelementtype": "^2.3.0",
"domhandler": "^5.0.3"
},
"funding": {
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
"backend/node_modules/encoding-sniffer": {
"version": "0.2.1",
"license": "MIT",
"dependencies": {
"iconv-lite": "^0.6.3",
"whatwg-encoding": "^3.1.1"
},
"funding": {
"url": "https://github.com/fb55/encoding-sniffer?sponsor=1"
}
},
"backend/node_modules/encoding-sniffer/node_modules/iconv-lite": {
"version": "0.6.3",
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"backend/node_modules/entities": {
"version": "4.5.0",
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"backend/node_modules/escape-string-regexp": {
"version": "4.0.0",
"dev": true,
@@ -1579,33 +1434,6 @@
"node": ">=16.0.0"
}
},
"backend/node_modules/htmlparser2": {
"version": "10.0.0",
"funding": [
"https://github.com/fb55/htmlparser2?sponsor=1",
{
"type": "github",
"url": "https://github.com/sponsors/fb55"
}
],
"license": "MIT",
"dependencies": {
"domelementtype": "^2.3.0",
"domhandler": "^5.0.3",
"domutils": "^3.2.1",
"entities": "^6.0.0"
}
},
"backend/node_modules/htmlparser2/node_modules/entities": {
"version": "6.0.1",
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"backend/node_modules/http-proxy": {
"version": "1.18.1",
"license": "MIT",
@@ -1901,16 +1729,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"backend/node_modules/nth-check": {
"version": "2.1.1",
"license": "BSD-2-Clause",
"dependencies": {
"boolbase": "^1.0.0"
},
"funding": {
"url": "https://github.com/fb55/nth-check?sponsor=1"
}
},
"backend/node_modules/on-headers": {
"version": "1.1.0",
"license": "MIT",
@@ -1987,47 +1805,6 @@
"node": ">=6"
}
},
"backend/node_modules/parse5": {
"version": "7.3.0",
"license": "MIT",
"dependencies": {
"entities": "^6.0.0"
},
"funding": {
"url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
"backend/node_modules/parse5-htmlparser2-tree-adapter": {
"version": "7.1.0",
"license": "MIT",
"dependencies": {
"domhandler": "^5.0.3",
"parse5": "^7.0.0"
},
"funding": {
"url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
"backend/node_modules/parse5-parser-stream": {
"version": "7.1.2",
"license": "MIT",
"dependencies": {
"parse5": "^7.0.0"
},
"funding": {
"url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
"backend/node_modules/parse5/node_modules/entities": {
"version": "6.0.1",
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"backend/node_modules/path-exists": {
"version": "4.0.0",
"dev": true,
@@ -2270,13 +2047,6 @@
"dev": true,
"license": "MIT"
},
"backend/node_modules/undici": {
"version": "7.18.2",
"license": "MIT",
"engines": {
"node": ">=20.18.1"
}
},
"backend/node_modules/uri-js": {
"version": "4.4.1",
"dev": true,
@@ -2480,26 +2250,6 @@
}
}
},
"backend/node_modules/whatwg-encoding": {
"version": "3.1.1",
"license": "MIT",
"dependencies": {
"iconv-lite": "0.6.3"
},
"engines": {
"node": ">=18"
}
},
"backend/node_modules/whatwg-encoding/node_modules/iconv-lite": {
"version": "0.6.3",
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"backend/node_modules/which": {
"version": "2.0.2",
"dev": true,
@@ -17480,6 +17230,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",
"integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=18"