Replace LF with CRLF

This commit is contained in:
freearhey
2025-10-09 03:20:46 +03:00
parent 4861c60b74
commit 60fde4cc8c
30 changed files with 3590 additions and 3588 deletions

View File

@@ -1,11 +1,11 @@
export const ROOT_DIR = process.env.ROOT_DIR || './'
export const STREAMS_DIR = process.env.STREAMS_DIR || './streams'
export const PUBLIC_DIR = process.env.PUBLIC_DIR || './.gh-pages'
export const README_DIR = process.env.README_DIR || './.readme'
export const API_DIR = process.env.API_DIR || './.api'
export const DATA_DIR = process.env.DATA_DIR || './temp/data'
export const LOGS_DIR = process.env.LOGS_DIR || './temp/logs'
export const TESTING = process.env.NODE_ENV === 'test' ? true : false
export const OWNER = 'iptv-org'
export const REPO = 'iptv'
export const EOL = '\r\n'
export const ROOT_DIR = process.env.ROOT_DIR || './'
export const STREAMS_DIR = process.env.STREAMS_DIR || './streams'
export const PUBLIC_DIR = process.env.PUBLIC_DIR || './.gh-pages'
export const README_DIR = process.env.README_DIR || './.readme'
export const API_DIR = process.env.API_DIR || './.api'
export const DATA_DIR = process.env.DATA_DIR || './temp/data'
export const LOGS_DIR = process.env.LOGS_DIR || './temp/logs'
export const TESTING = process.env.NODE_ENV === 'test' ? true : false
export const OWNER = 'iptv-org'
export const REPO = 'iptv'
export const EOL = '\r\n'

View File

@@ -1,14 +1,14 @@
export type LogItem = {
type: string
filepath: string
count: number
}
export class LogParser {
parse(content: string): LogItem[] {
if (!content) return []
const lines = content.split('\n')
return lines.map(line => (line ? JSON.parse(line) : null)).filter(l => l)
}
}
export type LogItem = {
type: string
filepath: string
count: number
}
export class LogParser {
parse(content: string): LogItem[] {
if (!content) return []
const lines = content.split('\n')
return lines.map(line => (line ? JSON.parse(line) : null)).filter(l => l)
}
}

View File

@@ -1,10 +1,10 @@
export default class NumberParser {
async parse(number: string) {
const parsed = parseInt(number)
if (isNaN(parsed)) {
throw new Error('numberParser:parse() Input value is not a number')
}
return parsed
}
}
export default class NumberParser {
async parse(number: string) {
const parsed = parseInt(number)
if (isNaN(parsed)) {
throw new Error('numberParser:parse() Input value is not a number')
}
return parsed
}
}

View File

@@ -1,31 +1,31 @@
import { URL } from 'node:url'
interface ProxyParserResult {
protocol: string | null
auth?: {
username?: string
password?: string
}
host: string
port: number | null
}
export class ProxyParser {
parse(_url: string): ProxyParserResult {
const parsed = new URL(_url)
const result: ProxyParserResult = {
protocol: parsed.protocol.replace(':', '') || null,
host: parsed.hostname,
port: parsed.port ? parseInt(parsed.port) : null
}
if (parsed.username || parsed.password) {
result.auth = {}
if (parsed.username) result.auth.username = parsed.username
if (parsed.password) result.auth.password = parsed.password
}
return result
}
}
import { URL } from 'node:url'
interface ProxyParserResult {
protocol: string | null
auth?: {
username?: string
password?: string
}
host: string
port: number | null
}
export class ProxyParser {
parse(_url: string): ProxyParserResult {
const parsed = new URL(_url)
const result: ProxyParserResult = {
protocol: parsed.protocol.replace(':', '') || null,
host: parsed.hostname,
port: parsed.port ? parseInt(parsed.port) : null
}
if (parsed.username || parsed.password) {
result.auth = {}
if (parsed.username) result.auth.username = parsed.username
if (parsed.password) result.auth.password = parsed.password
}
return result
}
}

View File

@@ -1,3 +1,3 @@
export interface Generator {
generate(): Promise<void>
}
export interface Generator {
generate(): Promise<void>
}

View File

@@ -1,19 +1,19 @@
import { IssueData } from '../core'
type IssueProps = {
number: number
labels: string[]
data: IssueData
}
export class Issue {
number: number
labels: string[]
data: IssueData
constructor({ number, labels, data }: IssueProps) {
this.number = number
this.labels = labels
this.data = data
}
}
import { IssueData } from '../core'
type IssueProps = {
number: number
labels: string[]
data: IssueData
}
export class Issue {
number: number
labels: string[]
data: IssueData
constructor({ number, labels, data }: IssueProps) {
this.number = number
this.labels = labels
this.data = data
}
}

View File

@@ -1,4 +1,4 @@
export * from './categoriesTable'
export * from './countriesTable'
export * from './languagesTable'
export * from './regionsTable'
export * from './categoriesTable'
export * from './countriesTable'
export * from './languagesTable'
export * from './regionsTable'