chore: add type:module, fix npm audit, rename CJS files, document module structure

- package.json: add type: module to silence ESM warnings
- server: npm audit fix (0 vulnerabilities, ws vuln resolved)
- Rename 4 CJS files to .cjs: build-extension, test-content-video-finder,
  test-locales, website/build
- Update eslint.config.mjs for .cjs glob patterns
- extension/README.md + server/README.md: document module structure
This commit is contained in:
Timo
2026-06-16 13:22:45 +02:00
parent 3bc68a5713
commit 101761e984
10 changed files with 37 additions and 16 deletions
+12
View File
@@ -38,3 +38,15 @@ If you modify `shared/constants.js`, you must synchronize the changes by running
node scripts/build-extension.js
```
This ensures that the `extension/shared` folder is updated with the latest protocol constants.
## Module Structure
| File | Purpose |
|---|---|
| `background.js` | Service worker: message routing, tab listeners, startup |
| `content.js` | Video detection, audio processing, episode transition (IIFE) |
| `popup.js` | Popup UI: join/create, tabs, status, settings |
| `bridge.js` | Landing page bridge (injected into sync.koalastuff.net) |
| `episode-utils.js` | Shared `extractEpisodeId()` / `sameEpisode()` — used by background.js, injected into content.js at build time |
| `i18n.js` | Translation loader |
| `shared/` | Constants, blacklist, name generator |