diff --git a/package.json b/package.json index 4c3aca8c..8d1f97d4 100644 --- a/package.json +++ b/package.json @@ -1,51 +1,59 @@ { "name": "epg", "scripts": { - "channels:validate": "node scripts/commands/channels/validate.js", - "channels:lint": "node scripts/commands/channels/lint.js", - "channels:parse": "node scripts/commands/channels/parse.js", - "channels:editor": "node scripts/commands/channels/editor.js", - "api:load": "./scripts/commands/api/load.sh", - "lint": "npx eslint ./scripts/**/*.js", - "test": "TZ=Pacific/Nauru npx jest --runInBand", - "test:commands": "npx jest --runInBand -- commands", - "test:sites": "TZ=Pacific/Nauru npx jest --runInBand -- sites", - "check": "npm run api:load && npm run channels:lint sites/**/*.js && npm run channels:validate sites/**/*.xml", - "grab": "node scripts/commands/epg/grab.js", + "api:load": "ts-node scripts/commands/api/load.ts", + "channels:lint": "ts-node scripts/commands/channels/lint.ts", + "channels:parse": "ts-node scripts/commands/channels/parse.ts", + "channels:editor": "ts-node scripts/commands/channels/editor.ts", + "channels:validate": "ts-node scripts/commands/channels/validate.ts", + "grab": "ts-node scripts/commands/epg/grab.ts", "serve": "npx serve", + "lint": "npx eslint ./scripts/**/*.ts ./sites/**/*.js ./tests/**/*.ts ./tests/**/*.js", + "test": "TZ=Pacific/Nauru npx jest --runInBand", "postinstall": "npm run api:load" }, "private": true, "author": "Arhey", "license": "MIT", "jest": { - "modulePathIgnorePatterns": [ - "/.jenkins/" - ], - "testRegex": "(sites|tests)/(.*?/)?.*test.js$", - "setupFilesAfterEnv": [ - "@alex_neo/jest-expect-message" - ] + "transform": { + "^.+\\.(ts|js)$": "ts-jest" + }, + "testRegex": "(tests|sites)/(.*?/)?.*test.(js|ts)$" }, "dependencies": { "@alex_neo/jest-expect-message": "^1.0.5", + "@freearhey/core": "^0.2.1", "@octokit/core": "^4.1.0", - "axios": "^0.21.1", + "@types/cli-progress": "^3.11.3", + "@types/fs-extra": "^11.0.2", + "@types/inquirer": "^9.0.3", + "@types/jest": "^29.5.5", + "@types/lodash": "^4.14.199", + "@types/node-cleanup": "^2.1.2", + "@types/numeral": "^2.0.3", + "@typescript-eslint/eslint-plugin": "^6.7.3", + "axios": "^1.5.1", + "axios-cookiejar-support": "^4.0.7", "chalk": "^4.1.2", "cheerio": "^1.0.0-rc.10", + "cli-progress": "^3.12.0", "commander": "^8.2.0", "consola": "^3.2.3", - "cron": "^2.3.1", + "cron": "^2.4.3", "csv-parser": "^3.0.0", + "cwait": "^1.1.2", "dayjs": "^1.11.7", - "epg-grabber": "^0.32.0", + "epg-grabber": "^0.34.0", "epg-parser": "^0.2.0", + "eslint": "^8.17.0", + "eslint-config-prettier": "^9.0.0", "form-data": "^4.0.0", "fs-extra": "^10.0.1", "glob": "^7.2.0", "iconv-lite": "^0.4.24", - "inquirer": "^8.2.0", - "jest": "^29.5.0", + "inquirer": "^8.2.6", + "jest": "^29.7.0", "langs": "^2.0.0", "libxmljs2": "^0.32.0", "lodash": "^4.17.21", @@ -55,6 +63,7 @@ "nedb-promises": "^6.0.3", "node-cleanup": "^2.1.2", "node-gzip": "^1.1.2", + "numeral": "^2.0.6", "parse-duration": "^1.0.0", "pdf-parse": "^1.1.1", "serve": "^14.2.0", @@ -62,11 +71,11 @@ "srcset": "^4.0.0", "table2array": "^0.0.2", "tabletojson": "^2.0.7", + "tough-cookie": "^4.1.3", "transliteration": "^2.2.0", + "ts-jest": "^29.1.1", + "ts-node": "^10.9.1", "unzipit": "^1.4.0", "wildcard-match": "^5.1.2" - }, - "devDependencies": { - "eslint": "^8.17.0" } }