feat(podcast): Add Podcast 2.0 support and remove external feed dependency; implement internal RSS/Atom/JSON generators and update tests/README

This commit is contained in:
2025-10-31 21:04:50 +00:00
parent 90eb13ee17
commit 31c4460b34
16 changed files with 1667 additions and 81 deletions

View File

@@ -25,6 +25,7 @@ tap.test('should create a podcast feed', async () => {
},
itunesImage: 'https://example.com/podcast-artwork.jpg',
itunesExplicit: false,
podcastGuid: 'test-podcast-guid-001',
});
expect(testPodcast).toBeInstanceOf(smartfeed.PodcastFeed);
@@ -46,6 +47,7 @@ tap.test('should create podcast feed with episodic type', async () => {
itunesOwner: { name: 'Comedian', email: 'comedian@example.com' },
itunesImage: 'https://example.com/comedy.jpg',
itunesExplicit: true,
podcastGuid: 'test-podcast-guid-002',
itunesType: 'episodic',
});
@@ -67,6 +69,7 @@ tap.test('should create podcast feed with serial type', async () => {
itunesOwner: { name: 'Detective', email: 'detective@example.com' },
itunesImage: 'https://example.com/crime.jpg',
itunesExplicit: false,
podcastGuid: 'test-podcast-guid-003',
itunesType: 'serial',
});
@@ -109,6 +112,7 @@ tap.test('should add multiple episodes', async () => {
itunesOwner: { name: 'Teacher', email: 'teacher@example.com' },
itunesImage: 'https://example.com/edu.jpg',
itunesExplicit: false,
podcastGuid: 'test-podcast-guid-004',
});
for (let i = 1; i <= 5; i++) {
@@ -145,6 +149,7 @@ tap.test('should add episode with trailer type', async () => {
itunesOwner: { name: 'Reporter', email: 'reporter@example.com' },
itunesImage: 'https://example.com/news.jpg',
itunesExplicit: false,
podcastGuid: 'test-podcast-guid-005',
});
podcast.addEpisode({
@@ -179,6 +184,7 @@ tap.test('should add episode with bonus type', async () => {
itunesOwner: { name: 'Entrepreneur', email: 'entrepreneur@example.com' },
itunesImage: 'https://example.com/business.jpg',
itunesExplicit: false,
podcastGuid: 'test-podcast-guid-006',
});
podcast.addEpisode({
@@ -212,6 +218,7 @@ tap.test('should support M4A audio format', async () => {
itunesOwner: { name: 'Musician', email: 'musician@example.com' },
itunesImage: 'https://example.com/music.jpg',
itunesExplicit: false,
podcastGuid: 'test-podcast-guid-007',
});
podcast.addEpisode({