Keysat 2c655dc9ee Module split: extract cookies state + helpers + routes to server/cookies.js
• initCookies({ dataDir, envPath })  — boot-time setup; reads .env's
                                         YT_COOKIES_FROM and probes for
                                         cookies.txt
  • ytCookieArgs() / ytExtraArgs()     — yt-dlp arg builders
  • ytCookieMethod()                   — human-readable active method
  • setupCookieRoutes(app)             — registers the four /api/cookies/*
                                         routes (upload / delete / test /
                                         status)

Module owns its private state (browser-name, file-exists, file-path).
Upload and delete routes flip the file-exists flag inside the same
module, so subsequent yt-dlp calls reflect the change immediately
without callers re-reading.

server/index.js: 2614 → 2510 lines.

Smoke tested: server boots; /api/license-status and /api/health
respond. /api/cookies/status returns the existing license-gated 402
for unlicensed callers (unchanged behavior).
2026-05-08 16:57:03 -05:00
2026-05-08 16:38:44 -05:00
2026-04-09 15:03:31 -05:00
2026-04-09 15:03:31 -05:00
2026-04-09 15:03:31 -05:00
2026-04-09 15:03:31 -05:00
2026-04-09 15:03:31 -05:00
S
Description
No description provided
52 MiB
Languages
JavaScript 45.6%
HTML 39.3%
TypeScript 13.4%
Shell 1.2%
Makefile 0.3%
Other 0.2%