Files
oikos/package.json
T
Ulas Kalayci 18310dbfe5 feat(cardav): add Migration 30 for CardDAV contacts schema
Add comprehensive database schema for CardDAV multi-account contacts sync:

New tables:
- cardav_accounts: Store CardDAV server credentials
- cardav_addressbook_selection: Per-account addressbook enable/disable
- contact_phones: Multiple phone numbers per contact with labels
- contact_emails: Multiple email addresses per contact with labels
- contact_addresses: Multiple postal addresses per contact with labels

Extended contacts table with 9 new columns:
- organization, job_title, birthday, website, photo, nickname
- cardav_account_id (FK to cardav_accounts, ON DELETE SET NULL)
- cardav_uid (vCard UID from server)
- cardav_addressbook_url (source addressbook URL)

Features:
- UNIQUE constraints on (cardav_url, username) and (account_id, addressbook_url)
- CASCADE delete for addressbook selection and contact sub-tables
- Performance indices for cardav_uid and email lookups
- Support for manual contacts (NULL cardav_account_id)
- is_primary flag for phone/email/address selection

Test coverage:
- 23 comprehensive tests verify all tables, constraints, indices
- FK CASCADE delete behavior validated
- UNIQUE constraints enforced
- Data integrity scenarios tested

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 10:47:16 +02:00

54 lines
2.6 KiB
JSON

{
"name": "oikos",
"version": "0.44.0",
"description": "Self-hosted family planner - calendar, tasks, shopping, meal planning, budget and more. Private, open-source, no subscription.",
"main": "server/index.js",
"type": "module",
"engines": {
"node": ">=22.0.0"
},
"scripts": {
"start": "node --import dotenv/config server/index.js",
"dev": "node --import dotenv/config --watch server/index.js",
"setup": "node --import dotenv/config setup.js",
"test:db": "node --experimental-sqlite test-db.js",
"test:dashboard": "node --experimental-sqlite test-dashboard.js",
"test:tasks": "node --experimental-sqlite test-tasks.js",
"test:shopping": "node --experimental-sqlite test-shopping.js",
"test:meals": "node --experimental-sqlite test-meals.js",
"test:calendar": "node --experimental-sqlite test-calendar.js",
"test:ncb": "node --experimental-sqlite test-notes-contacts-budget.js",
"test:ux-utils": "node test-ux-utils.js",
"test:modal-utils": "node --loader ./test-browser-loader.mjs test-modal-utils.js",
"test:kitchen-tabs": "node --loader ./test-browser-loader.mjs test-kitchen-tabs.js",
"test:reminders": "node --experimental-sqlite test-reminders.js",
"test:api": "node test-api.js",
"test:setup": "node test-setup.js",
"test:ics-parser": "node test-ics-parser.js",
"test:ics-sub": "node --experimental-sqlite test-ics-subscription.js",
"test:backup-scheduler": "node --experimental-sqlite test-backup-scheduler.js",
"test:caldav": "node --experimental-sqlite test-caldav-sync.js",
"test:cardav": "node --experimental-sqlite test-cardav.js",
"test": "node --experimental-sqlite test-db.js && node --experimental-sqlite test-dashboard.js && node --experimental-sqlite test-tasks.js && node --experimental-sqlite test-shopping.js && node --experimental-sqlite test-meals.js && node --experimental-sqlite test-calendar.js && node --experimental-sqlite test-notes-contacts-budget.js && npm run test:ux-utils && npm run test:modal-utils && npm run test:reminders && npm run test:api && npm run test:ics-parser && npm run test:ics-sub && npm run test:setup && npm run test:kitchen-tabs && npm run test:backup-scheduler && npm run test:caldav && npm run test:cardav"
},
"dependencies": {
"bcrypt": "^6.0.0",
"better-sqlite3": "^12.9.0",
"dotenv": "^17.4.2",
"express": "^5.2.1",
"express-rate-limit": "^8.4.1",
"express-session": "^1.19.0",
"helmet": "^8.1.0",
"node-cron": "^4.2.1",
"node-fetch": "^3.3.2"
},
"optionalDependencies": {
"googleapis": "^171.4.0",
"tsdav": "^2.1.8"
},
"license": "MIT",
"devDependencies": {
"sharp": "^0.34.5"
}
}