From 6345299135eb7024064b219c608e4fbe77cc9231 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Thu, 23 Apr 2026 09:14:26 +0300 Subject: [PATCH 1/3] Update dependencies --- package-lock.json | 95 ++++++++++++++++++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 87 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1bd09f7176..8b0a69599d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "dependencies": { "@eslint/eslintrc": "^3.3.5", "@eslint/js": "^9.39.3", - "@freearhey/core": "^0.15.2", + "@freearhey/core": "^0.16.1", "@freearhey/storage-js": "^0.2.0", "@iptv-org/sdk": "^1.3.0", "@joi/date": "^2.1.1", @@ -260,16 +260,17 @@ } }, "node_modules/@freearhey/core": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@freearhey/core/-/core-0.15.2.tgz", - "integrity": "sha512-I9ENnz1HQMS7/fVLLeB8Iuf5dbW7sE9yzU0nGloLcFmkiBO5Q2o93l1/jeRfAge8wYJEO9cRuqDCEPJVf0e3qg==", + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@freearhey/core/-/core-0.16.1.tgz", + "integrity": "sha512-3Wdv+rYYvEKOJbYIbXYZ9bgRfDSukrzOyQvLLvwc1X9ZmffBbcahDBtq+jyKuCCvUbRKL3w1o2jXOepYagNbbw==", + "license": "MIT", "dependencies": { "@types/lodash": "^4.14.198", "@types/pako": "^2.0.3", "consola": "^3.4.2", "dayjs": "^1.11.13", "glob": "^11.0.1", - "lodash": "^4.17.21", + "lodash": "^4.18.1", "natural-orderby": "^5.0.0", "normalize-url": "^8.1.0", "object-treeify": "^2.1.1", @@ -452,6 +453,49 @@ "dayjs": "^1.11.18" } }, + "node_modules/@iptv-org/sdk/node_modules/@freearhey/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@freearhey/core/-/core-0.15.2.tgz", + "integrity": "sha512-I9ENnz1HQMS7/fVLLeB8Iuf5dbW7sE9yzU0nGloLcFmkiBO5Q2o93l1/jeRfAge8wYJEO9cRuqDCEPJVf0e3qg==", + "license": "MIT", + "dependencies": { + "@types/lodash": "^4.14.198", + "@types/pako": "^2.0.3", + "consola": "^3.4.2", + "dayjs": "^1.11.13", + "glob": "^11.0.1", + "lodash": "^4.17.21", + "natural-orderby": "^5.0.0", + "normalize-url": "^8.1.0", + "object-treeify": "^2.1.1", + "pako": "^2.1.0", + "timer-node": "^5.0.9" + } + }, + "node_modules/@iptv-org/sdk/node_modules/glob": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "BlueOak-1.0.0", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@isaacs/cliui": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz", @@ -4418,16 +4462,16 @@ } }, "@freearhey/core": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@freearhey/core/-/core-0.15.2.tgz", - "integrity": "sha512-I9ENnz1HQMS7/fVLLeB8Iuf5dbW7sE9yzU0nGloLcFmkiBO5Q2o93l1/jeRfAge8wYJEO9cRuqDCEPJVf0e3qg==", + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@freearhey/core/-/core-0.16.1.tgz", + "integrity": "sha512-3Wdv+rYYvEKOJbYIbXYZ9bgRfDSukrzOyQvLLvwc1X9ZmffBbcahDBtq+jyKuCCvUbRKL3w1o2jXOepYagNbbw==", "requires": { "@types/lodash": "^4.14.198", "@types/pako": "^2.0.3", "consola": "^3.4.2", "dayjs": "^1.11.13", "glob": "^11.0.1", - "lodash": "^4.17.21", + "lodash": "^4.18.1", "natural-orderby": "^5.0.0", "normalize-url": "^8.1.0", "object-treeify": "^2.1.1", @@ -4553,6 +4597,39 @@ "@ntlab/sfetch": "^1.2.0", "axios": "^1.15.0", "dayjs": "^1.11.18" + }, + "dependencies": { + "@freearhey/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@freearhey/core/-/core-0.15.2.tgz", + "integrity": "sha512-I9ENnz1HQMS7/fVLLeB8Iuf5dbW7sE9yzU0nGloLcFmkiBO5Q2o93l1/jeRfAge8wYJEO9cRuqDCEPJVf0e3qg==", + "requires": { + "@types/lodash": "^4.14.198", + "@types/pako": "^2.0.3", + "consola": "^3.4.2", + "dayjs": "^1.11.13", + "glob": "^11.0.1", + "lodash": "^4.17.21", + "natural-orderby": "^5.0.0", + "normalize-url": "^8.1.0", + "object-treeify": "^2.1.1", + "pako": "^2.1.0", + "timer-node": "^5.0.9" + } + }, + "glob": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "requires": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + } + } } }, "@isaacs/cliui": { diff --git a/package.json b/package.json index bca61eb102..7de436fdbb 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "dependencies": { "@eslint/eslintrc": "^3.3.5", "@eslint/js": "^9.39.3", - "@freearhey/core": "^0.15.2", + "@freearhey/core": "^0.16.1", "@freearhey/storage-js": "^0.2.0", "@iptv-org/sdk": "^1.3.0", "@joi/date": "^2.1.1", From c3d281f1f13f733f1dd8767a5e3df6cb52c0b8a2 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Thu, 23 Apr 2026 09:14:39 +0300 Subject: [PATCH 2/3] Update tests/__data__ --- .../input/db/update/data/countries.csv | 3 +- .../input/db/update/data/timezones.csv | 3 +- tests/__data__/input/db/update/issues.js | 158 ++++++++++++++++++ 3 files changed, 162 insertions(+), 2 deletions(-) diff --git a/tests/__data__/input/db/update/data/countries.csv b/tests/__data__/input/db/update/data/countries.csv index f9b1633fd2..c713ac8e58 100644 --- a/tests/__data__/input/db/update/data/countries.csv +++ b/tests/__data__/input/db/update/data/countries.csv @@ -10,4 +10,5 @@ Spain,ES,spa;cat;eus;glg,πŸ‡ͺπŸ‡Έ Uruguay,UY,spa,πŸ‡ΊπŸ‡Ύ Turkiye,TR,tur,πŸ‡ΉπŸ‡· Afghanistan,AF,pus;prd;tuk,πŸ‡¦πŸ‡« -United States,US,eng;spa,πŸ‡ΊπŸ‡Έ \ No newline at end of file +United States,US,eng;spa,πŸ‡ΊπŸ‡Έ +Sweden,SE,swe,πŸ‡ΈπŸ‡ͺ \ No newline at end of file diff --git a/tests/__data__/input/db/update/data/timezones.csv b/tests/__data__/input/db/update/data/timezones.csv index 1f4169ad88..15c21d0e49 100644 --- a/tests/__data__/input/db/update/data/timezones.csv +++ b/tests/__data__/input/db/update/data/timezones.csv @@ -6,4 +6,5 @@ Atlantic/Bermuda,-04:00,BM Europe/London,+00:00,UK;GG;IM;JE Africa/Johannesburg,+02:00,ZA;LS;SZ Africa/Kigali,+02:00,RW -America/Sao_Paulo,-03:00,BR \ No newline at end of file +America/Sao_Paulo,-03:00,BR +Europe/Stockholm,+01:00,SE \ No newline at end of file diff --git a/tests/__data__/input/db/update/issues.js b/tests/__data__/input/db/update/issues.js index 7f78e11b58..2ea72b836c 100644 --- a/tests/__data__/input/db/update/issues.js +++ b/tests/__data__/input/db/update/issues.js @@ -2479,5 +2479,163 @@ module.exports = [ timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/23575/timeline', performed_via_github_app: null, state_reason: null + }, + { + url: 'https://api.github.com/repos/iptv-org/database/issues/27096', + repository_url: 'https://api.github.com/repos/iptv-org/database', + labels_url: 'https://api.github.com/repos/iptv-org/database/issues/27096/labels{/name}', + comments_url: 'https://api.github.com/repos/iptv-org/database/issues/27096/comments', + events_url: 'https://api.github.com/repos/iptv-org/database/issues/27096/events', + html_url: 'https://github.com/iptv-org/database/issues/27096', + id: 3627496814, + node_id: 'I_kwDOG1Kwp85y_x4L', + number: 27096, + title: 'Add: Canal+ Hits', + user: { + login: 'AntiPontifex', + id: 81566772, + node_id: 'MDQ6VXNlcjgxNTY2Nzcy', + avatar_url: 'https://avatars.githubusercontent.com/u/81566772?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/AntiPontifex', + html_url: 'https://github.com/AntiPontifex', + followers_url: 'https://api.github.com/users/AntiPontifex/followers', + following_url: 'https://api.github.com/users/AntiPontifex/following{/other_user}', + gists_url: 'https://api.github.com/users/AntiPontifex/gists{/gist_id}', + starred_url: 'https://api.github.com/users/AntiPontifex/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/AntiPontifex/subscriptions', + organizations_url: 'https://api.github.com/users/AntiPontifex/orgs', + repos_url: 'https://api.github.com/users/AntiPontifex/repos', + events_url: 'https://api.github.com/users/AntiPontifex/events{/privacy}', + received_events_url: 'https://api.github.com/users/AntiPontifex/received_events', + type: 'User', + site_admin: false + }, + labels: [ + { + id: 5303575699, + node_id: 'LA_kwDOG1Kwp88AAAABPB4kkw', + url: 'https://api.github.com/repos/iptv-org/database/labels/channels:add', + name: 'channels:add', + color: '017ff8', + default: false, + description: 'Request to add a channel into the database' + }, + { + id: 5366738347, + node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw', + url: 'https://api.github.com/repos/iptv-org/database/labels/approved', + name: 'approved', + color: '85DDDE', + default: false, + description: '' + } + ], + state: 'open', + locked: false, + assignee: null, + assignees: [], + milestone: null, + comments: 0, + created_at: '2023-10-06T02:10:41Z', + updated_at: '2023-10-06T02:52:02Z', + closed_at: null, + author_association: 'CONTRIBUTOR', + active_lock_reason: null, + body: '### Channel Name\n\nCanal+ Hits\n\n### Alternative Names (optional)\n\n_No response_\n\n### Network (optional)\n\n_No response_\n\n### Owners (optional)\n\n_No response_\n\n### Country\n\nSE\n\n### Categories (optional)\n\n_No response_\n\n### NSFW\n\nFALSE\n\n### Launched (optional)\n\n_No response_\n\n### Closed (optional)\n\n_No response_\n\n### Replaced By (optional)\n\nCanalMoreHits.se\n\n### Website (optional)\n\n_No response_\n\n### Logo URL\n\nhttps://i.imgur.com/ziiYOND.png\n\n### Feed Name\n\nSD\n\n### Broadcast Area\n\nc/ES\n\n### Languages\n\nswe\n\n### Timezones\n\nEurope/Stockholm\n\n### Format\n\n576i\n\n### Notes\n\n_No response_', + reactions: { + url: 'https://api.github.com/repos/iptv-org/database/issues/27096/reactions', + total_count: 0, + '+1': 0, + '-1': 0, + laugh: 0, + hooray: 0, + confused: 0, + heart: 0, + rocket: 0, + eyes: 0 + }, + timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/27096/timeline', + performed_via_github_app: null, + state_reason: null + }, + { + url: 'https://api.github.com/repos/iptv-org/database/issues/27098', + repository_url: 'https://api.github.com/repos/iptv-org/database', + labels_url: 'https://api.github.com/repos/iptv-org/database/issues/27098/labels{/name}', + comments_url: 'https://api.github.com/repos/iptv-org/database/issues/27098/comments', + events_url: 'https://api.github.com/repos/iptv-org/database/issues/27098/events', + html_url: 'https://github.com/iptv-org/database/issues/27098', + id: 3627496814, + node_id: 'I_kwDOG1Kwp85y_x4L', + number: 27098, + title: 'Add: Canal+ Film 2', + user: { + login: 'AntiPontifex', + id: 81566772, + node_id: 'MDQ6VXNlcjgxNTY2Nzcy', + avatar_url: 'https://avatars.githubusercontent.com/u/81566772?v=4', + gravatar_id: '', + url: 'https://api.github.com/users/AntiPontifex', + html_url: 'https://github.com/AntiPontifex', + followers_url: 'https://api.github.com/users/AntiPontifex/followers', + following_url: 'https://api.github.com/users/AntiPontifex/following{/other_user}', + gists_url: 'https://api.github.com/users/AntiPontifex/gists{/gist_id}', + starred_url: 'https://api.github.com/users/AntiPontifex/starred{/owner}{/repo}', + subscriptions_url: 'https://api.github.com/users/AntiPontifex/subscriptions', + organizations_url: 'https://api.github.com/users/AntiPontifex/orgs', + repos_url: 'https://api.github.com/users/AntiPontifex/repos', + events_url: 'https://api.github.com/users/AntiPontifex/events{/privacy}', + received_events_url: 'https://api.github.com/users/AntiPontifex/received_events', + type: 'User', + site_admin: false + }, + labels: [ + { + id: 5303575699, + node_id: 'LA_kwDOG1Kwp88AAAABPB4kkw', + url: 'https://api.github.com/repos/iptv-org/database/labels/channels:add', + name: 'channels:add', + color: '017ff8', + default: false, + description: 'Request to add a channel into the database' + }, + { + id: 5366738347, + node_id: 'LA_kwDOG1Kwp88AAAABP-Htqw', + url: 'https://api.github.com/repos/iptv-org/database/labels/approved', + name: 'approved', + color: '85DDDE', + default: false, + description: '' + } + ], + state: 'open', + locked: false, + assignee: null, + assignees: [], + milestone: null, + comments: 0, + created_at: '2023-10-06T02:10:41Z', + updated_at: '2023-10-06T02:52:02Z', + closed_at: null, + author_association: 'CONTRIBUTOR', + active_lock_reason: null, + body: '### Channel Name\n\nCanal+ Film 2\n\n### Alternative Names (optional)\n\n_No response_\n\n### Network (optional)\n\n_No response_\n\n### Owners (optional)\n\n_No response_\n\n### Country\n\nSE\n\n### Categories (optional)\n\n_No response_\n\n### NSFW\n\nFALSE\n\n### Launched (optional)\n\n_No response_\n\n### Closed (optional)\n\n_No response_\n\n### Replaced By (optional)\n\nCanalPlusHits.se\n\n### Website (optional)\n\n_No response_\n\n### Logo URL\n\nhttps://i.imgur.com/ziiYOND.png\n\n### Feed Name\n\nSD\n\n### Broadcast Area\n\nc/ES\n\n### Languages\n\nswe\n\n### Timezones\n\nEurope/Stockholm\n\n### Format\n\n576i\n\n### Notes\n\n_No response_', + reactions: { + url: 'https://api.github.com/repos/iptv-org/database/issues/27098/reactions', + total_count: 0, + '+1': 0, + '-1': 0, + laugh: 0, + hooray: 0, + confused: 0, + heart: 0, + rocket: 0, + eyes: 0 + }, + timeline_url: 'https://api.github.com/repos/iptv-org/database/issues/27098/timeline', + performed_via_github_app: null, + state_reason: null } ] From 054e9cf26e47e059c5c5256eaf575b8689ac1068 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Thu, 23 Apr 2026 09:14:54 +0300 Subject: [PATCH 3/3] Update scripts --- scripts/commands/db/update.ts | 11 ++++++----- scripts/core/db.ts | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/scripts/commands/db/update.ts b/scripts/commands/db/update.ts index 169821fced..40eb2c6f3b 100644 --- a/scripts/commands/db/update.ts +++ b/scripts/commands/db/update.ts @@ -205,7 +205,7 @@ async function addChannel(issue: Issue) { channel: newChannel.id, id: createFeedId(feedName), name: feedName, - alt_names: issueData.getArray('feed_alt_names'), + alt_names: issueData.getArray('feed_alt_names') || [], is_main: true, broadcast_area: broadcastArea, timezones: timezones, @@ -221,8 +221,8 @@ async function addChannel(issue: Issue) { const newLogo = new Logo({ channel: newChannel.id, feed: null, - in_use: issueData.getBoolean('in_use'), - tags: issueData.getArray('tags'), + in_use: issueData.getBoolean('in_use') === false ? false : true, + tags: issueData.getArray('tags') || [], width: imageInfo.width, height: imageInfo.height, format: imageInfo.format, @@ -395,8 +395,8 @@ async function addFeed(issue: Issue) { const newLogo = new Logo({ channel: channelId, feed: feedId, - in_use: issueData.getBoolean('in_use'), - tags: issueData.getArray('tags'), + in_use: issueData.getBoolean('in_use') === false ? false : true, + tags: issueData.getArray('tags') || [], width: imageInfo.width, height: imageInfo.height, format: imageInfo.format, @@ -555,6 +555,7 @@ async function addLogo(issue: Issue) { channel: channelId, feed: feedId, url: logoUrl, + in_use: issueData.getBoolean('in_use') === false ? false : true, tags: issueData.getArray('tags') || [], width: imageInfo.width, height: imageInfo.height, diff --git a/scripts/core/db.ts b/scripts/core/db.ts index 63bd50253b..ed9c04e36a 100644 --- a/scripts/core/db.ts +++ b/scripts/core/db.ts @@ -185,16 +185,16 @@ function cacheData() { cities: data.cities.clone(), countries: data.countries.clone(), logos: data.logos.clone(), - citiesKeyByCode: data.citiesKeyByCode, - feedsGroupedByChannelId: data.feedsGroupedByChannelId, - feedsKeyByStreamId: data.feedsKeyByStreamId, - channelsKeyById: data.channelsKeyById, - countriesKeyByCode: data.countriesKeyByCode, - subdivisionsKeyByCode: data.subdivisionsKeyByCode, - categoriesKeyById: data.categoriesKeyById, - regionsKeyByCode: data.regionsKeyByCode, - timezonesKeyById: data.timezonesKeyById, - languagesKeyByCode: data.languagesKeyByCode + citiesKeyByCode: data.citiesKeyByCode.clone(), + feedsGroupedByChannelId: data.feedsGroupedByChannelId.clone(), + feedsKeyByStreamId: data.feedsKeyByStreamId.clone(), + channelsKeyById: data.channelsKeyById.clone(), + countriesKeyByCode: data.countriesKeyByCode.clone(), + subdivisionsKeyByCode: data.subdivisionsKeyByCode.clone(), + categoriesKeyById: data.categoriesKeyById.clone(), + regionsKeyByCode: data.regionsKeyByCode.clone(), + timezonesKeyById: data.timezonesKeyById.clone(), + languagesKeyByCode: data.languagesKeyByCode.clone() } }