feat(providers): phases 7.3/7.4/7.6/8.1 — provenance, health, NDJSON, contrat unique
CI / build-and-test (push) Successful in 14m43s

7.3: capturedAt/source au registre + 6 adaptateurs + module provenance.ts + ?debug=1 (search-transport.mjs). 7.4: ProviderHealthService + badge source degradee. 7.6: squelettes par provider + snapshots progressifs + transport NDJSON /api/search. 8.1: ProviderAdapter unifie (search enveloppe + channelContent/channelMeta/capabilities) via getProviderAdapter + test de contrat offline.
This commit is contained in:
2026-09-30 07:57:11 -04:00
parent 37681c4f53
commit 665a0f0ebd
87 changed files with 8850 additions and 550 deletions
+6 -2
View File
@@ -60,9 +60,13 @@ logOk('periodMs / durationBounds');
// ---------- Lectures de métadonnées ----------
eq(itemDurationSec({ duration: 120 }), 120, 'numeric duration');
eq(itemDurationSec({ duration: 'PT1H2M' }), 0, 'ISO duration ignored (not a field format)');
// Phase 2.2 : une durée illisible vaut `undefined` (« inconnue »), plus 0.
// 0 faisait passer une vidéo sans info pour une vidéo de 0 s : affichage "0:00"
// et règle « verticale sans durée => pas un short » neutralisée.
eq(itemDurationSec({ duration: 'PT1H2M' }), undefined, 'ISO duration ignored (not a field format) -> undefined');
eq(itemDurationSec({ duration: '1:02:03' }), 3723, 'hh:mm:ss duration parsed');
eq(itemDurationSec({}), 0, 'missing duration -> 0');
eq(itemDurationSec({}), undefined, 'missing duration -> undefined');
eq(itemDurationSec({ duration: 0 }), undefined, 'explicit 0 -> undefined (not a 0 s video)');
expect(itemPublishedTs({ publishedAt: new Date().toISOString() }) > 0, 'ISO publishedAt parsed');
expect(itemPublishedTs({ timestamp: 1700000000 }) === 1700000000000, 'yt-dlp seconds timestamps up-scaled');
eq(itemPublishedTs({}), 0, 'missing date -> 0');