- Implemented `getAppConfig` and `upsertAppConfig` functions in `config.ts` for managing application settings in the database. - Updated `mod.ts` to export the new configuration functions. - Refactored `ComicConfig.ts` to load and update comic watch paths using the new configuration functions. - Modified `comic_watcher.ts` to accept paths as parameters for creating watchers. - Created a new settings router in `settings.ts` for managing application settings via HTTP requests. - Integrated the settings router into the main server in `server.ts`. - Updated the settings management to use the new database-backed configuration. - Removed legacy configuration management code from `configRW.ts`. - Added integration tests for the settings router and error handling. - Updated `vitest` configuration for testing. - Cleaned up unused type definitions in `pnpm-lock.yaml`.
40 lines
938 B
JSON
40 lines
938 B
JSON
{
|
|
"name": "server",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "build/app.js",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "tsx watch src/app.ts",
|
|
"start": "tsx src/app.ts",
|
|
"migrate": "tsx tools/migration.ts",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"author": "",
|
|
"license": "ISC",
|
|
"dependencies": {
|
|
"@elysiajs/cors": "^1.3.3",
|
|
"@elysiajs/html": "^1.3.1",
|
|
"@elysiajs/static": "^1.3.0",
|
|
"@std/async": "npm:@jsr/std__async@^1.0.13",
|
|
"@zip.js/zip.js": "^2.7.62",
|
|
"better-sqlite3": "^9.6.0",
|
|
"chokidar": "^3.6.0",
|
|
"dbtype": "workspace:dbtype",
|
|
"dotenv": "^16.5.0",
|
|
"elysia": "^1.3.20",
|
|
"jose": "^5.10.0",
|
|
"kysely": "^0.27.6",
|
|
"natural-orderby": "^2.0.3",
|
|
"tiny-async-pool": "^1.3.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/node": "^22.15.33",
|
|
"@types/tiny-async-pool": "^1.0.5",
|
|
"tsx": "^4.20.3",
|
|
"typescript": "^5.8.3",
|
|
"vitest": "^2.1.3"
|
|
}
|
|
}
|