mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 01:16:15 -08:00
Introduce a shared database schema library for Drizzle ORM and configure its TypeScript build settings. Move the canonical schema into libs/shared/database/src/lib/schema.ts and expose strong typing and table definitions for playlists, categories, content, recently_viewed and favorites. Add tsconfig.lib.json to set outDir, declaration output and node types for the shared lib. Keep apps/electron-backend compatibility by re-exporting the schema and types from the new shared library (apps/electron-backend now imports the shared definitions rather than duplicating them). These changes centralize the database schema as a single source of truth, prevent duplication, and enable read-only consumers (e.g. agent-backend) to depend on compiled type declarations.
24 lines
783 B
JSON
24 lines
783 B
JSON
{
|
|
"name": "database",
|
|
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "libs/shared/database/src",
|
|
"projectType": "library",
|
|
"tags": ["scope:shared", "type:data-access"],
|
|
"targets": {
|
|
"build": {
|
|
"executor": "@nx/esbuild:esbuild",
|
|
"outputs": ["{options.outputPath}"],
|
|
"options": {
|
|
"outputPath": "dist/libs/shared/database",
|
|
"main": "libs/shared/database/src/index.ts",
|
|
"tsConfig": "libs/shared/database/tsconfig.lib.json",
|
|
"assets": ["libs/shared/database/*.md"],
|
|
"format": ["cjs"]
|
|
}
|
|
},
|
|
"lint": {
|
|
"command": "eslint libs/shared/database/**/*.ts"
|
|
}
|
|
}
|
|
}
|