Reverses to previous versions of dependencies

This commit is contained in:
freearhey committed 2026-10-21 18:54:15 +03:00
1 parent 07801a4bf5
commit af7e9171a0
8 files changed
+4881 -10185

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": false,
"decorators": true
},
"target": "es2022"
},
"module": {
"type": "commonjs"
}
}
+4788 -10119
View File
File diff suppressed because it is too large. Load diff
+47 -43
View File
@@ -4,18 +4,18 @@
"act:check": "act pull_request -W .github/workflows/check.yml", "act:check": "act pull_request -W .github/workflows/check.yml",
"act:format": "act workflow_dispatch -W .github/workflows/format.yml", "act:format": "act workflow_dispatch -W .github/workflows/format.yml",
"act:update": "act workflow_dispatch -W .github/workflows/update.yml", "act:update": "act workflow_dispatch -W .github/workflows/update.yml",
"api:load": "tsx scripts/commands/api/load.ts", "api:load": "node -r @swc-node/register scripts/commands/api/load.ts",
"channels:lint": "tsx scripts/commands/channels/lint.mts", "channels:lint": "node -r @swc-node/register scripts/commands/channels/lint.mts",
"channels:parse": "tsx scripts/commands/channels/parse.ts", "channels:parse": "node -r @swc-node/register scripts/commands/channels/parse.ts",
"channels:format": "tsx scripts/commands/channels/format.ts", "channels:format": "node -r @swc-node/register scripts/commands/channels/format.ts",
"channels:edit": "tsx scripts/commands/channels/edit.ts", "channels:edit": "node -r @swc-node/register scripts/commands/channels/edit.ts",
"channels:validate": "tsx scripts/commands/channels/validate.ts", "channels:validate": "node -r @swc-node/register scripts/commands/channels/validate.ts",
"sites:init": "tsx scripts/commands/sites/init.ts", "sites:init": "node -r @swc-node/register scripts/commands/sites/init.ts",
"sites:update": "tsx scripts/commands/sites/update.ts", "sites:update": "node -r @swc-node/register scripts/commands/sites/update.ts",
"guides:update": "tsx scripts/commands/guides/update.ts", "guides:update": "node -r @swc-node/register scripts/commands/guides/update.ts",
"guides:export": "tsx scripts/commands/guides/export.ts", "guides:export": "node -r @swc-node/register scripts/commands/guides/export.ts",
"workers:load": "tsx scripts/commands/workers/load.ts", "workers:load": "node -r @swc-node/register scripts/commands/workers/load.ts",
"grab": "tsx scripts/commands/epg/grab.ts", "grab": "node -r @swc-node/register scripts/commands/epg/grab.ts",
"lint": "npx eslint \"{scripts,tests,sites}/**/*.{ts,mts,js}\"", "lint": "npx eslint \"{scripts,tests,sites}/**/*.{ts,mts,js}\"",
"test": "cross-env TZ=Pacific/Nauru npx jest --runInBand", "test": "cross-env TZ=Pacific/Nauru npx jest --runInBand",
"postinstall": "npm run api:load", "postinstall": "npm run api:load",
@@ -38,11 +38,12 @@
}, },
"dependencies": { "dependencies": {
"@eslint/eslintrc": "^3.3.6", "@eslint/eslintrc": "^3.3.6",
"@eslint/js": "^10.0.1", "@eslint/js": "^9.18.0",
"@freearhey/chronos": "^0.0.1", "@freearhey/chronos": "^0.0.1",
"@freearhey/core": "^0.16.1", "@freearhey/core": "^0.16.1",
"@freearhey/search-js": "^0.3.0", "@freearhey/search-js": "^0.3.0",
"@freearhey/storage-js": "^0.2.0", "@freearhey/storage-js": "^0.2.0",
"@inquirer/prompts": "^8.7.4",
"@iptv-org/sdk": "^1.5.0", "@iptv-org/sdk": "^1.5.0",
"@ntlab/awswaf": "^1.0.1", "@ntlab/awswaf": "^1.0.1",
"@ntlab/sfetch": "^1.5.0", "@ntlab/sfetch": "^1.5.0",
@@ -50,41 +51,40 @@
"@octokit/plugin-paginate-rest": "^14.0.0", "@octokit/plugin-paginate-rest": "^14.0.0",
"@octokit/plugin-rest-endpoint-methods": "^17.0.0", "@octokit/plugin-rest-endpoint-methods": "^17.0.0",
"@stylistic/eslint-plugin": "^5.10.0", "@stylistic/eslint-plugin": "^5.10.0",
"@swc/core": "^1.15.47", "@swc/jest": "^0.2.36",
"@swc/jest": "^0.2.39",
"@types/cli-progress": "^3.11.6", "@types/cli-progress": "^3.11.6",
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"@types/inquirer": "^9.0.10", "@types/inquirer": "^9.0.10",
"@types/jest": "^30.0.0", "@types/jest": "^29.5.12",
"@types/langs": "^2.0.5", "@types/langs": "^2.0.5",
"@types/lodash.merge": "^4.6.9", "@types/lodash.merge": "^4.6.9",
"@types/lodash.orderby": "^4.6.9", "@types/lodash.orderby": "^4.6.9",
"@types/lodash.sortby": "^4.7.9", "@types/lodash.sortby": "^4.7.9",
"@types/lodash.startcase": "^4.4.9", "@types/lodash.startcase": "^4.4.9",
"@types/lodash.uniqby": "^4.7.9", "@types/lodash.uniqby": "^4.7.9",
"@types/node": "^26.1.2", "@types/node": "^18.19.0",
"@types/pako": "^2.0.4", "@types/pako": "^2.0.4",
"axios": "^1.19.0", "axios": "^1.7.9",
"chalk": "^5.6.2", "chalk": "^5.3.0",
"cheerio": "^1.2.0", "cheerio": "^1.0.0",
"cli-progress": "^3.12.0", "cli-progress": "^3.12.0",
"commander": "^14.0.3", "commander": "^12.1.0",
"consola": "^3.4.2", "consola": "^3.4.2",
"cross-env": "^10.1.0", "cross-env": "^7.0.3",
"csv-parser": "^3.2.1", "csv-parser": "^3.0.0",
"curl-generator": "^0.5.0", "curl-generator": "^0.5.0",
"dayjs": "^1.11.21", "dayjs": "^1.11.13",
"epg-grabber": "^0.48.0", "epg-grabber": "^0.48.0",
"epg-parser": "^0.5.0", "epg-parser": "^0.5.0",
"eslint": "^10.8.0", "eslint": "^9.18.0",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^9.1.0",
"fs-extra": "^11.4.0", "fs-extra": "^11.3.0",
"glob": "^13.0.6", "glob": "^10.4.5",
"globals": "^17.8.0", "globals": "^15.14.0",
"husky": "^9.1.7", "husky": "^9.1.7",
"iconv-lite": "^0.7.3", "iconv-lite": "^0.6.3",
"inquirer": "^14.0.2", "inquirer": "^9.3.7",
"jest": "^30.4.2", "jest": "^29.7.0",
"langs": "^2.0.0", "langs": "^2.0.0",
"libxml2-wasm": "^0.7.1", "libxml2-wasm": "^0.7.1",
"lodash.merge": "^4.6.2", "lodash.merge": "^4.6.2",
@@ -92,21 +92,25 @@
"lodash.sortby": "^4.7.0", "lodash.sortby": "^4.7.0",
"lodash.startcase": "^4.4.0", "lodash.startcase": "^4.4.0",
"lodash.uniqby": "^4.7.0", "lodash.uniqby": "^4.7.0",
"p-limit": "^7.3.1", "p-limit": "^5.0.0",
"pako": "^3.0.1", "pako": "^2.1.0",
"parse-duration": "^2.1.8", "parse-duration": "^2.1.8",
"pm2": "^7.0.3", "pm2": "^5.4.2",
"serve": "^14.2.6", "serve": "^14.2.4",
"socks-proxy-agent": "^10.1.0", "socks-proxy-agent": "^8.0.4",
"srcset": "^5.0.3", "srcset": "^5.0.3",
"table2array": "^0.0.2", "table2array": "^0.0.2",
"tabletojson": "^4.1.12", "tabletojson": "^4.1.12",
"tough-cookie": "^6.0.2", "tough-cookie": "^4.1.4",
"tsx": "^4.23.1", "typescript": "^5.5.4",
"typescript": "^6.0.3", "typescript-eslint": "^8.20.0",
"typescript-eslint": "^8.65.0" "@swc-node/register": "^1.12.1",
"@swc/core": "^1.16.18"
},
"overrides": {
"esbuild": "0.23.1"
}, },
"engines": { "engines": {
"node": ">=20.20.0" "node": ">=18.18.0"
} }
} }
+2 -1
View File
@@ -1,4 +1,5 @@
import { XmlDocument, XsdValidator, XmlValidateError, ErrorDetail } from 'libxml2-wasm' import { XmlDocument, XsdValidator, XmlValidateError } from 'libxml2-wasm'
import type { ErrorDetail } from 'libxml2-wasm'
import { Storage, File } from '@freearhey/storage-js' import { Storage, File } from '@freearhey/storage-js'
import { program } from 'commander' import { program } from 'commander'
import chalk from 'chalk' import chalk from 'chalk'
+2 -3
View File
@@ -1,8 +1,7 @@
import { Storage, File } from '@freearhey/storage-js' import { Storage, File } from '@freearhey/storage-js'
import { Collection, Logger } from '@freearhey/core' import { Collection, Logger } from '@freearhey/core'
import epgGrabber, { EPGGrabber } from 'epg-grabber' import epgGrabber, { EPGGrabber } from 'epg-grabber'
import { generateChannelsXML } from '../../core' import { generateChannelsXML, loadJs } from '../../core'
import { pathToFileURL } from 'node:url'
import { Channel } from '../../models' import { Channel } from '../../models'
import { Command } from 'commander' import { Command } from 'commander'
@@ -45,7 +44,7 @@ async function main() {
const logger = new Logger() const logger = new Logger()
const file = new File(options.config) const file = new File(options.config)
const dir = file.dirname() const dir = file.dirname()
const config = (await import(pathToFileURL(options.config).toString())).default const config = await loadJs(options.config)
const outputFilepath = options.output || `${dir}/${config.site}.channels.xml` const outputFilepath = options.output || `${dir}/${config.site}.channels.xml`
const args: Record<string, string> = {} const args: Record<string, string> = {}
+15 -11
View File
@@ -5,9 +5,9 @@ import { Collection } from '@freearhey/core'
import { Channel } from '../models/channel' import { Channel } from '../models/channel'
import { AxiosProxyConfig } from 'axios' import { AxiosProxyConfig } from 'axios'
import { Octokit } from '@octokit/core' import { Octokit } from '@octokit/core'
import { pathToFileURL } from 'url'
import { Issue } from '../models' import { Issue } from '../models'
import { URL } from 'node:url' import { URL, fileURLToPath } from 'node:url'
import path from 'node:path'
export function generateChannelsXML(channels: Collection<Channel>): string { export function generateChannelsXML(channels: Collection<Channel>): string {
let output = `<?xml version="1.0" encoding="UTF-8"?>${EOL}<channels>${EOL}` let output = `<?xml version="1.0" encoding="UTF-8"?>${EOL}<channels>${EOL}`
@@ -33,13 +33,13 @@ export function escapeString(value: string, defaultValue = '') {
const regex = new RegExp( const regex = new RegExp(
'((?:[\0-\x08\x0B\f\x0E-\x1F\uFFFD\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))|([\\x7F-\\x84]|[\\x86-\\x9F]|[\\uFDD0-\\uFDEF]|(?:\\uD83F[\\uDFFE\\uDFFF])|(?:\\uD87F[\\uDF' + '((?:[\0-\x08\x0B\f\x0E-\x1F\uFFFD\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))|([\\x7F-\\x84]|[\\x86-\\x9F]|[\\uFDD0-\\uFDEF]|(?:\\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\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|' +
'(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))', '(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))',
'g' 'g'
) )
@@ -73,9 +73,13 @@ export function parseProxy(string: string): AxiosProxyConfig {
} }
export async function loadJs(filepath: string) { export async function loadJs(filepath: string) {
const fileUrl = pathToFileURL(filepath).toString() const resolvedPath = filepath.startsWith('file://')
? fileURLToPath(filepath)
: path.resolve(filepath)
return (await import(fileUrl)).default const mod = require(resolvedPath)
return mod.default || mod
} }
export async function loadIssues(props?: { labels: string[] | string }) { export async function loadIssues(props?: { labels: string[] | string }) {
+6 -6
View File
@@ -100,11 +100,11 @@ describe('epg:grab', () => {
) )
const outputString = pako.ungzip(fs.readFileSync('tests/__data__/output/guides/guide.xml.gz'), { const outputString = pako.ungzip(fs.readFileSync('tests/__data__/output/guides/guide.xml.gz'), {
toText: true to: 'string'
}) })
const expectedString = pako.ungzip( const expectedString = pako.ungzip(
fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'), fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'),
{ toText: true } { to: 'string' }
) )
const output = new Set(outputString.split('\r\n')) const output = new Set(outputString.split('\r\n'))
@@ -125,11 +125,11 @@ describe('epg:grab', () => {
) )
const outputString = pako.ungzip(fs.readFileSync('tests/__data__/output/guides/guide.xml.gz'), { const outputString = pako.ungzip(fs.readFileSync('tests/__data__/output/guides/guide.xml.gz'), {
toText: true to: 'string'
}) })
const expectedString = pako.ungzip( const expectedString = pako.ungzip(
fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'), fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'),
{ toText: true } { to: 'string' }
) )
const output = new Set(outputString.split('\r\n')) const output = new Set(outputString.split('\r\n'))
@@ -152,12 +152,12 @@ describe('epg:grab', () => {
const outputString = pako.ungzip( const outputString = pako.ungzip(
fs.readFileSync('tests/__data__/output/guides/custom.xml.gz'), fs.readFileSync('tests/__data__/output/guides/custom.xml.gz'),
{ {
toText: true to: 'string'
} }
) )
const expectedString = pako.ungzip( const expectedString = pako.ungzip(
fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'), fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'),
{ toText: true } { to: 'string' }
) )
const output = new Set(outputString.split('\r\n')) const output = new Set(outputString.split('\r\n'))
+8 -2
View File
@@ -13,6 +13,12 @@
"allowJs": true, "allowJs": true,
"outDir": "./dist" "outDir": "./dist"
}, },
"include": ["scripts/**/*", "tests/**/*"], "include": [
"exclude": ["node_modules", "dist"] "scripts/**/*",
"tests/**/*"
],
"exclude": [
"node_modules",
"dist"
]
} }