🔑 Store tokens in Sqllite, moved queries, other fixes

- Create cache dir if missing
- Moved Sqlite queries to queries.ts
- Updated dependencies
- Added pino-pretty to dev-dependencies
- Changed Sqlite to store tokens as separate rows
- Removed in-memory storage of tokens
- isValidToken function
- Throw Exception if refresh token is present but invalid
- Fixed fetch query in smn http file
This commit is contained in:
2025-01-22 21:00:04 +01:00
parent 3bf354b4bf
commit 4a773e4b43
6 changed files with 2326 additions and 1839 deletions

View File

@ -12,25 +12,26 @@
"author": "",
"license": "ISC",
"dependencies": {
"@actual-app/api": "^24.12.0",
"@dotenvx/dotenvx": "^1.31.3",
"better-sqlite3": "^11.7.0",
"cron": "^3.3.1",
"@actual-app/api": "^25.1.0",
"@dotenvx/dotenvx": "^1.33.0",
"better-sqlite3": "^11.8.1",
"cron": "^3.5.0",
"dayjs": "^1.11.13",
"dotenv": "^16.4.7",
"pino": "^9.5.0",
"pino": "^9.6.0",
"prettier": "^3.4.2"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@types/better-sqlite3": "^7.6.12",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@types/node": "^22.10.7",
"jest": "^29.7.0",
"pino-pretty": "^13.0.0",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"prettier": {
"semi": false,