mirror of
https://github.com/iptv-org/iptv
synced 2025-12-16 02:16:47 -05:00
use cross-env to send parameters in an easier manner
This commit is contained in:
3524
package-lock.json
generated
3524
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
54
package.json
54
package.json
@@ -38,48 +38,44 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint/eslintrc": "^3.3.0",
|
"@eslint/eslintrc": "^3.3.1",
|
||||||
"@eslint/js": "^9.21.0",
|
"@eslint/js": "^9.32.0",
|
||||||
"@freearhey/core": "^0.9.0",
|
"@freearhey/core": "^0.10.2",
|
||||||
"@freearhey/search-js": "^0.1.2",
|
"@freearhey/search-js": "^0.1.2",
|
||||||
"@inquirer/prompts": "^7.4.1",
|
"@inquirer/prompts": "^7.8.0",
|
||||||
"@octokit/core": "^6.1.4",
|
"@octokit/core": "^7.0.3",
|
||||||
"@octokit/plugin-paginate-rest": "^11.4.3",
|
"@octokit/plugin-paginate-rest": "^13.1.1",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^7.1.3",
|
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
|
||||||
"@octokit/types": "^11.1.0",
|
"@octokit/types": "^14.1.0",
|
||||||
"@swc/jest": "^0.2.38",
|
"@swc/jest": "^0.2.39",
|
||||||
"@types/cli-progress": "^3.11.3",
|
"@types/cli-progress": "^3.11.6",
|
||||||
"@types/fs-extra": "^11.0.4",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^30.0.0",
|
||||||
"@types/lodash": "^4.14.198",
|
"@types/lodash": "^4.17.20",
|
||||||
"@types/numeral": "^2.0.3",
|
"@types/numeral": "^2.0.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.18.1",
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
||||||
"@typescript-eslint/parser": "^8.18.1",
|
"@typescript-eslint/parser": "^8.38.0",
|
||||||
"async-es": "^3.2.6",
|
"async-es": "^3.2.6",
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.11.0",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^5.4.1",
|
||||||
"cli-progress": "^3.12.0",
|
"cli-progress": "^3.12.0",
|
||||||
"command-exists": "^1.2.9",
|
"command-exists": "^1.2.9",
|
||||||
"commander": "^8.3.0",
|
"commander": "^14.0.0",
|
||||||
"console-table-printer": "^2.12.1",
|
"console-table-printer": "^2.14.6",
|
||||||
"eslint": "^9.17.0",
|
"cross-env": "^10.0.0",
|
||||||
"glob": "^11.0.2",
|
"eslint": "^9.32.0",
|
||||||
"globals": "^16.0.0",
|
"glob": "^11.0.3",
|
||||||
|
"globals": "^16.3.0",
|
||||||
"iptv-checker": "^0.29.1",
|
"iptv-checker": "^0.29.1",
|
||||||
"iptv-playlist-parser": "^0.15.0",
|
"iptv-playlist-parser": "^0.15.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^30.0.5",
|
||||||
"jest-expect-message": "^1.1.3",
|
"jest-expect-message": "^1.1.3",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"m3u-linter": "^0.4.2",
|
"m3u-linter": "^0.4.2",
|
||||||
"markdown-include": "^0.4.3",
|
"markdown-include": "^0.4.3",
|
||||||
"node-cleanup": "^2.1.2",
|
"node-cleanup": "^2.1.2",
|
||||||
"numeral": "^2.0.6",
|
"numeral": "^2.0.6",
|
||||||
"tsx": "^4.6.2",
|
"tsx": "^4.20.3",
|
||||||
"valid-url": "^1.0.9"
|
"valid-url": "^1.0.9"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"jest": {
|
|
||||||
"glob": "11.0.2"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
import { pathToFileURL } from 'node:url'
|
import { pathToFileURL } from 'node:url'
|
||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import os from 'os'
|
|
||||||
|
|
||||||
let ENV_VAR =
|
const ENV_VAR =
|
||||||
'DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/input/api_generate API_DIR=tests/__data__/output/.api'
|
'cross-env DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/input/api_generate API_DIR=tests/__data__/output/.api'
|
||||||
if (os.platform() === 'win32') {
|
|
||||||
ENV_VAR =
|
|
||||||
'SET "DATA_DIR=tests/__data__/input/data" && SET "STREAMS_DIR=tests/__data__/input/api_generate" && SET "API_DIR=tests/__data__/output/.api" &&'
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fs.emptyDirSync('tests/__data__/output')
|
fs.emptyDirSync('tests/__data__/output')
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import os from 'os'
|
|
||||||
|
|
||||||
type ExecError = {
|
type ExecError = {
|
||||||
status: number
|
status: number
|
||||||
stdout: string
|
stdout: string
|
||||||
}
|
}
|
||||||
|
|
||||||
let ENV_VAR = 'DATA_DIR=tests/__data__/input/data'
|
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data'
|
||||||
if (os.platform() === 'win32') {
|
|
||||||
ENV_VAR = 'SET "DATA_DIR=tests/__data__/input/data" &&'
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fs.emptyDirSync('tests/__data__/output')
|
fs.emptyDirSync('tests/__data__/output')
|
||||||
|
|||||||
@@ -2,13 +2,8 @@ import { pathToFileURL } from 'node:url'
|
|||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import * as fs from 'fs-extra'
|
import * as fs from 'fs-extra'
|
||||||
import { glob } from 'glob'
|
import { glob } from 'glob'
|
||||||
import os from 'os'
|
|
||||||
|
|
||||||
let ENV_VAR = 'STREAMS_DIR=tests/__data__/output/streams DATA_DIR=tests/__data__/input/data'
|
const ENV_VAR = 'cross-env STREAMS_DIR=tests/__data__/output/streams DATA_DIR=tests/__data__/input/data'
|
||||||
if (os.platform() === 'win32') {
|
|
||||||
ENV_VAR =
|
|
||||||
'SET "STREAMS_DIR=tests/__data__/output/streams" && SET "DATA_DIR=tests/__data__/input/data" &&'
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fs.emptyDirSync('tests/__data__/output')
|
fs.emptyDirSync('tests/__data__/output')
|
||||||
@@ -29,7 +24,7 @@ describe('playlist:format', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
files.forEach(filepath => {
|
files.forEach(filepath => {
|
||||||
expect(content(`tests/__data__/output/streams/${filepath}`), filepath).toBe(
|
expect(content(`tests/__data__/output/streams/${filepath}`)).toBe(
|
||||||
content(`tests/__data__/expected/playlist_format/${filepath}`)
|
content(`tests/__data__/expected/playlist_format/${filepath}`)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
import { pathToFileURL } from 'node:url'
|
import { pathToFileURL } from 'node:url'
|
||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import os, { EOL } from 'node:os'
|
import { EOL } from 'node:os'
|
||||||
import * as fs from 'fs-extra'
|
import * as fs from 'fs-extra'
|
||||||
import * as glob from 'glob'
|
import * as glob from 'glob'
|
||||||
|
|
||||||
let ENV_VAR =
|
const ENV_VAR = 'cross-env STREAMS_DIR=tests/__data__/input/playlist_generate DATA_DIR=tests/__data__/input/data PUBLIC_DIR=tests/__data__/output/.gh-pages LOGS_DIR=tests/__data__/output/logs'
|
||||||
'STREAMS_DIR=tests/__data__/input/playlist_generate DATA_DIR=tests/__data__/input/data PUBLIC_DIR=tests/__data__/output/.gh-pages LOGS_DIR=tests/__data__/output/logs'
|
|
||||||
if (os.platform() === 'win32') {
|
|
||||||
ENV_VAR =
|
|
||||||
'SET "STREAMS_DIR=tests/__data__/input/playlist_generate" && SET "DATA_DIR=tests/__data__/input/data" && SET "PUBLIC_DIR=tests/__data__/output/.gh-pages" && SET "LOGS_DIR=tests/__data__/output/logs" &&'
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fs.emptyDirSync('tests/__data__/output')
|
fs.emptyDirSync('tests/__data__/output')
|
||||||
@@ -31,7 +26,7 @@ describe('playlist:generate', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
playlists.forEach((filepath: string) => {
|
playlists.forEach((filepath: string) => {
|
||||||
expect(content(`tests/__data__/output/${filepath}`), filepath).toBe(
|
expect(content(`tests/__data__/output/${filepath}`)).toBe(
|
||||||
content(`tests/__data__/expected/playlist_generate/${filepath}`)
|
content(`tests/__data__/expected/playlist_generate/${filepath}`)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import os from 'node:os'
|
|
||||||
|
|
||||||
type ExecError = {
|
type ExecError = {
|
||||||
status: number
|
status: number
|
||||||
stdout: string
|
stdout: string
|
||||||
}
|
}
|
||||||
|
|
||||||
let ENV_VAR = 'ROOT_DIR=tests/__data__/input DATA_DIR=tests/__data__/input/data'
|
const ENV_VAR = 'cross-env ROOT_DIR=tests/__data__/input DATA_DIR=tests/__data__/input/data'
|
||||||
if (os.platform() === 'win32') {
|
|
||||||
ENV_VAR = 'SET "ROOT_DIR=tests/__data__/input" && SET "DATA_DIR=tests/__data__/input/data" &&'
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('playlist:test', () => {
|
describe('playlist:test', () => {
|
||||||
it('shows an error if the playlist contains a broken link', () => {
|
it('shows an error if the playlist contains a broken link', () => {
|
||||||
|
|||||||
@@ -2,13 +2,8 @@ import { pathToFileURL } from 'node:url'
|
|||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import * as fs from 'fs-extra'
|
import * as fs from 'fs-extra'
|
||||||
import { glob } from 'glob'
|
import { glob } from 'glob'
|
||||||
import os from 'os'
|
|
||||||
|
|
||||||
let ENV_VAR = 'DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/output/streams'
|
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/output/streams'
|
||||||
if (os.platform() === 'win32') {
|
|
||||||
ENV_VAR =
|
|
||||||
'SET "DATA_DIR=tests/__data__/input/data" && SET "STREAMS_DIR=tests/__data__/output/streams" &&'
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fs.emptyDirSync('tests/__data__/output')
|
fs.emptyDirSync('tests/__data__/output')
|
||||||
@@ -29,7 +24,7 @@ describe('playlist:update', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
files.forEach(filepath => {
|
files.forEach(filepath => {
|
||||||
expect(content(`tests/__data__/output/streams/${filepath}`), filepath).toBe(
|
expect(content(`tests/__data__/output/streams/${filepath}`)).toBe(
|
||||||
content(`tests/__data__/expected/playlist_update/${filepath}`)
|
content(`tests/__data__/expected/playlist_update/${filepath}`)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import os from 'os'
|
|
||||||
|
|
||||||
type ExecError = {
|
type ExecError = {
|
||||||
status: number
|
status: number
|
||||||
stdout: string
|
stdout: string
|
||||||
}
|
}
|
||||||
|
|
||||||
let ENV_VAR = 'DATA_DIR=tests/__data__/input/data ROOT_DIR=tests/__data__/input/playlist_validate'
|
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data ROOT_DIR=tests/__data__/input/playlist_validate'
|
||||||
if (os.platform() === 'win32') {
|
|
||||||
ENV_VAR =
|
|
||||||
'SET "DATA_DIR=tests/__data__/input/data" && SET "ROOT_DIR=tests/__data__/input/playlist_validate" &&'
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('playlist:validate', () => {
|
describe('playlist:validate', () => {
|
||||||
it('show an error if channel id in the blocklist', () => {
|
it('show an error if channel id in the blocklist', () => {
|
||||||
|
|||||||
@@ -1,14 +1,8 @@
|
|||||||
import { pathToFileURL } from 'node:url'
|
import { pathToFileURL } from 'node:url'
|
||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import os from 'os'
|
|
||||||
|
|
||||||
let ENV_VAR =
|
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data LOGS_DIR=tests/__data__/input/readme_update README_DIR=tests/__data__/output/.readme'
|
||||||
'DATA_DIR=tests/__data__/input/data LOGS_DIR=tests/__data__/input/readme_update README_DIR=tests/__data__/output/.readme'
|
|
||||||
if (os.platform() === 'win32') {
|
|
||||||
ENV_VAR =
|
|
||||||
'SET "DATA_DIR=tests/__data__/input/data" && SET "LOGS_DIR=tests/__data__/input/readme_update" && SET "README_DIR=tests/__data__/output/.readme" &&'
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fs.emptyDirSync('tests/__data__/output')
|
fs.emptyDirSync('tests/__data__/output')
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import os from 'os'
|
|
||||||
|
|
||||||
let ENV_VAR = 'DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/input/report_create'
|
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/input/report_create'
|
||||||
if (os.platform() === 'win32') {
|
|
||||||
ENV_VAR =
|
|
||||||
'SET "DATA_DIR=tests/__data__/input/data" && SET "STREAMS_DIR=tests/__data__/input/report_create" &&'
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('report:create', () => {
|
describe('report:create', () => {
|
||||||
it('can create report', () => {
|
it('can create report', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user