mirror of
https://github.com/chrisbenincasa/tunarr.git
synced 2026-04-18 09:03:35 -04:00
Now that we are fully relying on our own internal DB relations for program hierarchies (shows, seasons, albums, artists), we cannot use eventual consistency for saving these relations when upserting programs. This creates issues like #825, when sometimes groupings aren't fully available after successfully creating a lineup. This includes the following changes to speed things up and synchronously save program_groupings: * Completely remove usages of mikro-orm on the upsert programs path. Everything is handled by lower level query builders via kysely * Save program_grouping and critical program_grouping_external_ids with immediate consistency * Defer saving PLEX_GUID type external IDs to the background * Properly defer saving non-critical external IDs until after the request is returned * Stop validating requests/responses client-side via Zod. The backend already does this so we were duplicating work here and slowing things down considerably. * Moves upsertContentPrograms to ProgramDB * Removes kysely types that were generated with kysely-codegen because it oversimplified all underlying DB types Fixes #825
142 lines
4.8 KiB
JSON
142 lines
4.8 KiB
JSON
{
|
|
"name": "@tunarr/server",
|
|
"version": "0.12.3",
|
|
"description": "Create LiveTV channels from your Plex media",
|
|
"license": "Zlib",
|
|
"private": true,
|
|
"author": "chrisbenincasa",
|
|
"type": "module",
|
|
"main": "src/index.ts",
|
|
"bin": "dist/index.js",
|
|
"scripts": {
|
|
"build": "NODE_OPTIONS=--max-old-space-size=8192 tsc -p tsconfig.build.json",
|
|
"build-dev": "NODE_ENV=development tsc -p tsconfig.build.json --noEmit --watch",
|
|
"typecheck": "tsc -p tsconfig.build.json --noEmit",
|
|
"bundle": "dotenv -- tsx scripts/bundle.ts",
|
|
"clean": "rimraf ./build/",
|
|
"debug": "dotenv -e .env.development -- tsx watch --tsconfig ./tsconfig.build.json --ignore 'src/streams' --inspect-brk ./src",
|
|
"dev": "dotenv -e .env.development -- tsx watch --tsconfig ./tsconfig.build.json --ignore 'build' --ignore 'src/streams' ./src",
|
|
"make-exec": "tsx scripts/makeExecutable.ts",
|
|
"make-exec:linux": "tsx scripts/makeScriptPackage.ts --target linux-x64",
|
|
"make-exec:linux-arm64": "tsx scripts/makeExecutable.ts --target linux-arm64",
|
|
"make-exec:macos": "tsx scripts/makeScriptPackage.ts --target macos-x64 --target macos-arm64",
|
|
"make-exec:macos-arm": "tsx scripts/makeScriptPackage.ts --target macos-arm64",
|
|
"make-exec:windows": "tsx scripts/makeScriptPackage.ts --target windows-x64",
|
|
"generate-db-migration": "dotenv -e .env.development -- tsx --tsconfig ./tsconfig.build.json src/index.ts db generate-migration",
|
|
"generate-db-cache": "dotenv -e .env.development -- tsx scripts/generateDbCache.ts",
|
|
"generate-db-types": "dotenv -e .env.development -- tsx scripts/genDbTypes.ts",
|
|
"mikro-orm": "mikro-orm-esm",
|
|
"preinstall": "npx only-allow pnpm",
|
|
"run-fixer": "dotenv -e .env.development -- tsx src/index.ts fixer",
|
|
"tunarr": "dotenv -e .env.development -- tsx src/index.ts",
|
|
"test": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@fastify/cors": "^8.4.1",
|
|
"@fastify/multipart": "^8.3.0",
|
|
"@fastify/static": "^6.12.0",
|
|
"@fastify/swagger": "^8.12.1",
|
|
"@fastify/swagger-ui": "^4.0.0",
|
|
"@iptv/xmltv": "^1.0.1",
|
|
"@mikro-orm/better-sqlite": "^6.3.3",
|
|
"@mikro-orm/core": "^6.3.3",
|
|
"@mikro-orm/migrations": "6.3.3",
|
|
"@tunarr/shared": "workspace:*",
|
|
"@tunarr/types": "workspace:*",
|
|
"archiver": "^7.0.1",
|
|
"async-mutex": "^0.5.0",
|
|
"async-retry": "^1.3.3",
|
|
"axios": "^1.6.0",
|
|
"better-sqlite3": "^9.1.1",
|
|
"chalk": "^5.3.0",
|
|
"chokidar": "^3.6.0",
|
|
"cron-parser": "^4.9.0",
|
|
"dayjs": "^1.11.10",
|
|
"fast-xml-parser": "^4.3.5",
|
|
"fastify": "^4.26.0",
|
|
"fastify-graceful-shutdown": "^4.0.1",
|
|
"fastify-plugin": "^4.5.1",
|
|
"fastify-print-routes": "^3.2.0",
|
|
"fastify-type-provider-zod": "^1.1.9",
|
|
"kysely": "^0.27.4",
|
|
"lodash-es": "^4.17.21",
|
|
"lowdb": "^7.0.0",
|
|
"node-cache": "^5.1.2",
|
|
"node-schedule": "^2.1.1",
|
|
"node-ssdp": "^4.0.0",
|
|
"p-queue": "^8.0.1",
|
|
"pino": "^9.0.0",
|
|
"pino-pretty": "^11.2.2",
|
|
"pino-roll": "^1.1.0",
|
|
"random-js": "2.1.0",
|
|
"reflect-metadata": "^0.2.2",
|
|
"retry": "^0.13.1",
|
|
"ts-pattern": "^5.4.0",
|
|
"tslib": "^2.6.2",
|
|
"uuid": "^9.0.1",
|
|
"yargs": "^17.7.2",
|
|
"zod": "^3.22.4"
|
|
},
|
|
"devDependencies": {
|
|
"@mikro-orm/cli": "^6.3.3",
|
|
"@mikro-orm/reflection": "^6.3.3",
|
|
"@types/archiver": "^6.0.2",
|
|
"@types/async-retry": "^1.4.8",
|
|
"@types/better-sqlite3": "^7.6.8",
|
|
"@types/express": "^4.17.20",
|
|
"@types/express-fileupload": "^1.4.3",
|
|
"@types/fluent-ffmpeg": "^2.1.23",
|
|
"@types/lodash-es": "^4.17.10",
|
|
"@types/morgan": "^1.9.7",
|
|
"@types/node": "^20.8.9",
|
|
"@types/node-schedule": "^2.1.3",
|
|
"@types/retry": "^0.12.5",
|
|
"@types/serve-static": "^1.15.4",
|
|
"@types/temp": "^0.9.4",
|
|
"@types/tmp": "^0.2.6",
|
|
"@types/unzip-stream": "^0.3.4",
|
|
"@types/uuid": "^9.0.6",
|
|
"@types/yargs": "^17.0.29",
|
|
"@yao-pkg/pkg": "^5.11.5",
|
|
"copyfiles": "^2.2.0",
|
|
"del-cli": "^3.0.0",
|
|
"dotenv-cli": "^7.4.1",
|
|
"envinfo": "^7.13.0",
|
|
"esbuild": "^0.21.5",
|
|
"esbuild-plugin-copy": "^2.1.1",
|
|
"esbuild-plugin-pino": "^2.2.0",
|
|
"eslint-plugin-unused-imports": "^3.1.0",
|
|
"fast-check": "^3.17.1",
|
|
"fast-glob": "^3.3.2",
|
|
"globals": "^15.0.0",
|
|
"kysely-codegen": "^0.16.0",
|
|
"nexe": "5.0.0-beta.1",
|
|
"pkg": "^5.8.1",
|
|
"postject": "1.0.0-alpha.6",
|
|
"prettier": "^3.0.3",
|
|
"rimraf": "^5.0.5",
|
|
"tar": "^7.4.0",
|
|
"temp": "^0.9.4",
|
|
"thread-stream": "^3.1.0",
|
|
"tmp": "^0.2.1",
|
|
"tmp-promise": "^3.0.3",
|
|
"ts-essentials": "^9.4.2",
|
|
"ts-node": "^10.9.2",
|
|
"tsconfig-paths": "^4.2.0",
|
|
"tsify": "^5.0.4",
|
|
"tsup": "^8.0.2",
|
|
"tsx": "^4.7.1",
|
|
"typed-emitter": "^2.1.0",
|
|
"typescript": "5.4.3",
|
|
"typescript-eslint": "^7.5.0",
|
|
"unzip-stream": "^0.3.4",
|
|
"vitest": "^2.0.5"
|
|
},
|
|
"mikro-orm": {
|
|
"configPaths": [
|
|
"./mikro-orm.config.ts",
|
|
"./build/mikro-orm.config.js"
|
|
]
|
|
}
|
|
}
|