iptv-checker 0.29.0 → 0.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iptv-checker",
3
- "version": "0.29.0",
3
+ "version": "0.29.2",
4
4
  "description": "Node.js CLI tool for checking links in IPTV playlists",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -41,7 +41,8 @@
41
41
  "dateformat": "^5.0.3",
42
42
  "eslint": "^9.22.0",
43
43
  "get-stdin": "^9.0.0",
44
- "iptv-playlist-parser": "^0.14.0",
44
+ "iptv-playlist-parser": "^0.15.2",
45
+ "msw": "^2.7.3",
45
46
  "normalize-url": "^8.0.1",
46
47
  "progress": "^2.0.3",
47
48
  "socks-proxy-agent": "^8.0.5",
@@ -53,7 +54,6 @@
53
54
  "@jest/globals": "^29.7.0",
54
55
  "babel-jest": "^29.7.0",
55
56
  "fs-extra": "^11.3.0",
56
- "jest": "^29.7.0",
57
- "msw": "^2.7.3"
57
+ "jest": "^29.7.0"
58
58
  }
59
59
  }
@@ -9,7 +9,7 @@ export class Playlist {
9
9
 
10
10
  append(item) {
11
11
  const message = item?.status?.message || null
12
- const lines = item.raw.split('\r\n')
12
+ const lines = item.raw.split(/\r?\n/)
13
13
  const extinf = lines[0]
14
14
 
15
15
  if (message) {
@@ -14,11 +14,6 @@ export class PlaylistLoader {
14
14
 
15
15
  client.interceptors.response.use(
16
16
  response => {
17
- const contentType = response.headers?.['content-type'] || ''
18
- if (!/mpegurl/.test(contentType)) {
19
- throw new Error('URL is not an M3U playlist file')
20
- }
21
-
22
17
  return response.data
23
18
  },
24
19
  () => {
@@ -62,12 +62,6 @@ describe('checkPlaylist', () => {
62
62
  )
63
63
  })
64
64
 
65
- it(`should throw on invalid fetched input data`, async () => {
66
- await expect(checker.checkPlaylist(`https://github.com`)).rejects.toThrow(
67
- 'URL is not an M3U playlist file'
68
- )
69
- })
70
-
71
65
  it(`should process a playlist with rtp link`, async () => {
72
66
  const path = 'tests/__data__/input/rtp.m3u'
73
67
  const results = await checker.checkPlaylist(path)