Issue 21 — event infrastructure: - NormalizedEvent<T> + payload types in packages/shared-types/src/events/ - Bus.onPublish() hook for side-effect bridges - NATS JetStream adapter (services/api/src/events/nats.ts): connects when NATS_URL is set, creates signals.> and feedback.> streams, bridges all in-process bus publishes to JetStream — no-ops gracefully when NATS is absent - NATS service added to docker-compose (profile: events|full, port 4222/8222) Issue 22 — Todoist background sync: - services/api/src/signals/scheduler.ts: queries all active-token users every 15 min (TODOIST_SYNC_INTERVAL_MS), fan-out via todoistSource.fetchSignals() which emits signals.task.synced; on-demand fetch remains as freshness fallback - NATS_URL + TODOIST_SYNC_INTERVAL_MS added to config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
47 lines
1.2 KiB
JSON
47 lines
1.2 KiB
JSON
{
|
|
"name": "@oo/api",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"dev": "tsx watch src/index.ts",
|
|
"start": "node dist/index.js",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"type-check": "tsc --noEmit",
|
|
"clean": "rm -rf dist"
|
|
},
|
|
"dependencies": {
|
|
"@oo/shared-types": "workspace:*",
|
|
"better-sqlite3": "^11.8.1",
|
|
"cookie-parser": "^1.4.7",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^16.4.7",
|
|
"drizzle-orm": "^0.38.3",
|
|
"express": "^4.21.2",
|
|
"express-session": "^1.18.1",
|
|
"nanoid": "^5.1.0",
|
|
"nats": "^2.29.3",
|
|
"node-fetch": "^3.3.2",
|
|
"openid-client": "^6.3.4",
|
|
"web-push": "^3.6.7",
|
|
"zod": "^3.24.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "^7.6.12",
|
|
"@types/cookie-parser": "^1.4.8",
|
|
"@types/cors": "^2.8.17",
|
|
"@types/express": "^5.0.0",
|
|
"@types/express-session": "^1.18.1",
|
|
"@types/web-push": "^3.6.4",
|
|
"@vitest/coverage-v8": "^4.1.4",
|
|
"drizzle-kit": "^0.30.4",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^5.7.3",
|
|
"vitest": "^4.1.4"
|
|
}
|
|
}
|