@hasna/microservices 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -138
- package/bin/index.js +703 -12728
- package/bin/mcp.js +250 -9726
- package/dist/index.js +170 -9407
- package/package.json +25 -25
- package/microservices/microservice-ads/package.json +0 -27
- package/microservices/microservice-ads/src/cli/index.ts +0 -605
- package/microservices/microservice-ads/src/db/campaigns.ts +0 -797
- package/microservices/microservice-ads/src/db/database.ts +0 -93
- package/microservices/microservice-ads/src/db/migrations.ts +0 -60
- package/microservices/microservice-ads/src/index.ts +0 -39
- package/microservices/microservice-ads/src/mcp/index.ts +0 -480
- package/microservices/microservice-analytics/package.json +0 -27
- package/microservices/microservice-analytics/src/cli/index.ts +0 -373
- package/microservices/microservice-analytics/src/db/analytics.ts +0 -564
- package/microservices/microservice-analytics/src/db/database.ts +0 -93
- package/microservices/microservice-analytics/src/db/migrations.ts +0 -50
- package/microservices/microservice-analytics/src/index.ts +0 -37
- package/microservices/microservice-analytics/src/mcp/index.ts +0 -334
- package/microservices/microservice-assets/package.json +0 -27
- package/microservices/microservice-assets/src/cli/index.ts +0 -375
- package/microservices/microservice-assets/src/db/assets.ts +0 -370
- package/microservices/microservice-assets/src/db/database.ts +0 -93
- package/microservices/microservice-assets/src/db/migrations.ts +0 -51
- package/microservices/microservice-assets/src/index.ts +0 -32
- package/microservices/microservice-assets/src/mcp/index.ts +0 -346
- package/microservices/microservice-bookkeeping/package.json +0 -27
- package/microservices/microservice-bookkeeping/src/cli/index.ts +0 -386
- package/microservices/microservice-bookkeeping/src/db/bookkeeping.ts +0 -591
- package/microservices/microservice-bookkeeping/src/db/database.ts +0 -93
- package/microservices/microservice-bookkeeping/src/db/migrations.ts +0 -52
- package/microservices/microservice-bookkeeping/src/index.ts +0 -32
- package/microservices/microservice-bookkeeping/src/mcp/index.ts +0 -284
- package/microservices/microservice-calendar/package.json +0 -27
- package/microservices/microservice-calendar/src/cli/index.ts +0 -287
- package/microservices/microservice-calendar/src/db/calendar.ts +0 -328
- package/microservices/microservice-calendar/src/db/database.ts +0 -82
- package/microservices/microservice-calendar/src/db/migrations.ts +0 -47
- package/microservices/microservice-calendar/src/index.ts +0 -24
- package/microservices/microservice-calendar/src/mcp/index.ts +0 -226
- package/microservices/microservice-company/package.json +0 -27
- package/microservices/microservice-company/src/cli/index.ts +0 -1126
- package/microservices/microservice-company/src/db/company.ts +0 -854
- package/microservices/microservice-company/src/db/database.ts +0 -93
- package/microservices/microservice-company/src/db/migrations.ts +0 -214
- package/microservices/microservice-company/src/db/workflow-migrations.ts +0 -44
- package/microservices/microservice-company/src/index.ts +0 -60
- package/microservices/microservice-company/src/lib/audit.ts +0 -168
- package/microservices/microservice-company/src/lib/finance.ts +0 -299
- package/microservices/microservice-company/src/lib/settings.ts +0 -85
- package/microservices/microservice-company/src/lib/workflows.ts +0 -698
- package/microservices/microservice-company/src/mcp/index.ts +0 -991
- package/microservices/microservice-compliance/package.json +0 -27
- package/microservices/microservice-compliance/src/cli/index.ts +0 -467
- package/microservices/microservice-compliance/src/db/compliance.ts +0 -633
- package/microservices/microservice-compliance/src/db/database.ts +0 -93
- package/microservices/microservice-compliance/src/db/migrations.ts +0 -63
- package/microservices/microservice-compliance/src/index.ts +0 -46
- package/microservices/microservice-compliance/src/mcp/index.ts +0 -438
- package/microservices/microservice-contacts/package.json +0 -27
- package/microservices/microservice-contacts/src/cli/index.ts +0 -393
- package/microservices/microservice-contacts/src/db/companies.ts +0 -167
- package/microservices/microservice-contacts/src/db/contacts.ts +0 -249
- package/microservices/microservice-contacts/src/db/database.ts +0 -93
- package/microservices/microservice-contacts/src/db/migrations.ts +0 -71
- package/microservices/microservice-contacts/src/db/relationships.ts +0 -53
- package/microservices/microservice-contacts/src/index.ts +0 -42
- package/microservices/microservice-contacts/src/mcp/index.ts +0 -303
- package/microservices/microservice-contracts/package.json +0 -27
- package/microservices/microservice-contracts/src/cli/index.ts +0 -770
- package/microservices/microservice-contracts/src/db/contracts.ts +0 -925
- package/microservices/microservice-contracts/src/db/database.ts +0 -93
- package/microservices/microservice-contracts/src/db/migrations.ts +0 -141
- package/microservices/microservice-contracts/src/index.ts +0 -43
- package/microservices/microservice-contracts/src/mcp/index.ts +0 -617
- package/microservices/microservice-crm/package.json +0 -27
- package/microservices/microservice-crm/src/cli/index.ts +0 -396
- package/microservices/microservice-crm/src/db/database.ts +0 -82
- package/microservices/microservice-crm/src/db/migrations.ts +0 -66
- package/microservices/microservice-crm/src/db/pipeline.ts +0 -397
- package/microservices/microservice-crm/src/index.ts +0 -34
- package/microservices/microservice-crm/src/mcp/index.ts +0 -294
- package/microservices/microservice-documents/package.json +0 -27
- package/microservices/microservice-documents/src/cli/index.ts +0 -246
- package/microservices/microservice-documents/src/db/database.ts +0 -82
- package/microservices/microservice-documents/src/db/documents.ts +0 -316
- package/microservices/microservice-documents/src/db/migrations.ts +0 -49
- package/microservices/microservice-documents/src/index.ts +0 -24
- package/microservices/microservice-documents/src/mcp/index.ts +0 -202
- package/microservices/microservice-domains/package.json +0 -27
- package/microservices/microservice-domains/src/cli/index.ts +0 -1111
- package/microservices/microservice-domains/src/db/database.ts +0 -93
- package/microservices/microservice-domains/src/db/domains.ts +0 -1164
- package/microservices/microservice-domains/src/db/migrations.ts +0 -60
- package/microservices/microservice-domains/src/index.ts +0 -65
- package/microservices/microservice-domains/src/lib/brandsight.ts +0 -350
- package/microservices/microservice-domains/src/lib/godaddy.ts +0 -338
- package/microservices/microservice-domains/src/lib/namecheap.ts +0 -262
- package/microservices/microservice-domains/src/lib/registrar.ts +0 -355
- package/microservices/microservice-domains/src/mcp/index.ts +0 -781
- package/microservices/microservice-expenses/package.json +0 -27
- package/microservices/microservice-expenses/src/cli/index.ts +0 -267
- package/microservices/microservice-expenses/src/db/database.ts +0 -82
- package/microservices/microservice-expenses/src/db/expenses.ts +0 -345
- package/microservices/microservice-expenses/src/db/migrations.ts +0 -45
- package/microservices/microservice-expenses/src/index.ts +0 -25
- package/microservices/microservice-expenses/src/mcp/index.ts +0 -196
- package/microservices/microservice-habits/package.json +0 -27
- package/microservices/microservice-habits/src/cli/index.ts +0 -315
- package/microservices/microservice-habits/src/db/database.ts +0 -93
- package/microservices/microservice-habits/src/db/habits.ts +0 -451
- package/microservices/microservice-habits/src/db/migrations.ts +0 -46
- package/microservices/microservice-habits/src/index.ts +0 -31
- package/microservices/microservice-habits/src/mcp/index.ts +0 -313
- package/microservices/microservice-health/package.json +0 -27
- package/microservices/microservice-health/src/cli/index.ts +0 -484
- package/microservices/microservice-health/src/db/database.ts +0 -93
- package/microservices/microservice-health/src/db/health.ts +0 -708
- package/microservices/microservice-health/src/db/migrations.ts +0 -70
- package/microservices/microservice-health/src/index.ts +0 -63
- package/microservices/microservice-health/src/mcp/index.ts +0 -437
- package/microservices/microservice-hiring/package.json +0 -27
- package/microservices/microservice-hiring/src/cli/index.ts +0 -741
- package/microservices/microservice-hiring/src/db/database.ts +0 -93
- package/microservices/microservice-hiring/src/db/hiring.ts +0 -1085
- package/microservices/microservice-hiring/src/db/migrations.ts +0 -89
- package/microservices/microservice-hiring/src/index.ts +0 -80
- package/microservices/microservice-hiring/src/lib/scoring.ts +0 -206
- package/microservices/microservice-hiring/src/mcp/index.ts +0 -709
- package/microservices/microservice-inventory/package.json +0 -27
- package/microservices/microservice-inventory/src/cli/index.ts +0 -365
- package/microservices/microservice-inventory/src/db/database.ts +0 -82
- package/microservices/microservice-inventory/src/db/inventory.ts +0 -393
- package/microservices/microservice-inventory/src/db/migrations.ts +0 -54
- package/microservices/microservice-inventory/src/index.ts +0 -28
- package/microservices/microservice-inventory/src/mcp/index.ts +0 -250
- package/microservices/microservice-invoices/dashboard/dist/assets/index-Bngq7FNM.css +0 -1
- package/microservices/microservice-invoices/dashboard/dist/assets/index-aHW4ARZR.js +0 -124
- package/microservices/microservice-invoices/dashboard/dist/index.html +0 -13
- package/microservices/microservice-invoices/dashboard/index.html +0 -12
- package/microservices/microservice-invoices/dashboard/package.json +0 -29
- package/microservices/microservice-invoices/dashboard/tsconfig.json +0 -14
- package/microservices/microservice-invoices/dashboard/vite.config.ts +0 -15
- package/microservices/microservice-invoices/package.json +0 -30
- package/microservices/microservice-invoices/src/cli/index.ts +0 -308
- package/microservices/microservice-invoices/src/db/business.ts +0 -241
- package/microservices/microservice-invoices/src/db/clients.ts +0 -127
- package/microservices/microservice-invoices/src/db/database.ts +0 -82
- package/microservices/microservice-invoices/src/db/invoices.ts +0 -345
- package/microservices/microservice-invoices/src/db/migrations.ts +0 -184
- package/microservices/microservice-invoices/src/index.ts +0 -56
- package/microservices/microservice-invoices/src/mcp/index.ts +0 -242
- package/microservices/microservice-invoices/src/server/index.ts +0 -162
- package/microservices/microservice-leads/package.json +0 -27
- package/microservices/microservice-leads/src/cli/index.ts +0 -596
- package/microservices/microservice-leads/src/db/database.ts +0 -93
- package/microservices/microservice-leads/src/db/leads.ts +0 -520
- package/microservices/microservice-leads/src/db/lists.ts +0 -151
- package/microservices/microservice-leads/src/db/migrations.ts +0 -93
- package/microservices/microservice-leads/src/index.ts +0 -65
- package/microservices/microservice-leads/src/lib/enrichment.ts +0 -202
- package/microservices/microservice-leads/src/lib/scoring.ts +0 -134
- package/microservices/microservice-leads/src/mcp/index.ts +0 -533
- package/microservices/microservice-notes/package.json +0 -27
- package/microservices/microservice-notes/src/cli/index.ts +0 -63
- package/microservices/microservice-notes/src/db/database.ts +0 -93
- package/microservices/microservice-notes/src/db/migrations.ts +0 -40
- package/microservices/microservice-notes/src/db/notes.ts +0 -114
- package/microservices/microservice-notes/src/index.ts +0 -2
- package/microservices/microservice-notes/src/mcp/index.ts +0 -37
- package/microservices/microservice-notifications/package.json +0 -27
- package/microservices/microservice-notifications/src/cli/index.ts +0 -349
- package/microservices/microservice-notifications/src/db/database.ts +0 -93
- package/microservices/microservice-notifications/src/db/migrations.ts +0 -62
- package/microservices/microservice-notifications/src/db/notifications.ts +0 -509
- package/microservices/microservice-notifications/src/index.ts +0 -41
- package/microservices/microservice-notifications/src/mcp/index.ts +0 -422
- package/microservices/microservice-payments/package.json +0 -27
- package/microservices/microservice-payments/src/cli/index.ts +0 -609
- package/microservices/microservice-payments/src/db/database.ts +0 -93
- package/microservices/microservice-payments/src/db/migrations.ts +0 -81
- package/microservices/microservice-payments/src/db/payments.ts +0 -1204
- package/microservices/microservice-payments/src/index.ts +0 -51
- package/microservices/microservice-payments/src/mcp/index.ts +0 -683
- package/microservices/microservice-payroll/package.json +0 -27
- package/microservices/microservice-payroll/src/cli/index.ts +0 -643
- package/microservices/microservice-payroll/src/db/database.ts +0 -93
- package/microservices/microservice-payroll/src/db/migrations.ts +0 -95
- package/microservices/microservice-payroll/src/db/payroll.ts +0 -1377
- package/microservices/microservice-payroll/src/index.ts +0 -48
- package/microservices/microservice-payroll/src/mcp/index.ts +0 -666
- package/microservices/microservice-products/package.json +0 -27
- package/microservices/microservice-products/src/cli/index.ts +0 -416
- package/microservices/microservice-products/src/db/categories.ts +0 -154
- package/microservices/microservice-products/src/db/database.ts +0 -93
- package/microservices/microservice-products/src/db/migrations.ts +0 -58
- package/microservices/microservice-products/src/db/pricing-tiers.ts +0 -66
- package/microservices/microservice-products/src/db/products.ts +0 -452
- package/microservices/microservice-products/src/index.ts +0 -53
- package/microservices/microservice-products/src/mcp/index.ts +0 -453
- package/microservices/microservice-projects/package.json +0 -27
- package/microservices/microservice-projects/src/cli/index.ts +0 -480
- package/microservices/microservice-projects/src/db/database.ts +0 -93
- package/microservices/microservice-projects/src/db/migrations.ts +0 -65
- package/microservices/microservice-projects/src/db/projects.ts +0 -715
- package/microservices/microservice-projects/src/index.ts +0 -57
- package/microservices/microservice-projects/src/mcp/index.ts +0 -501
- package/microservices/microservice-proposals/package.json +0 -27
- package/microservices/microservice-proposals/src/cli/index.ts +0 -400
- package/microservices/microservice-proposals/src/db/database.ts +0 -93
- package/microservices/microservice-proposals/src/db/migrations.ts +0 -52
- package/microservices/microservice-proposals/src/db/proposals.ts +0 -532
- package/microservices/microservice-proposals/src/index.ts +0 -37
- package/microservices/microservice-proposals/src/mcp/index.ts +0 -375
- package/microservices/microservice-reading/package.json +0 -27
- package/microservices/microservice-reading/src/cli/index.ts +0 -464
- package/microservices/microservice-reading/src/db/database.ts +0 -93
- package/microservices/microservice-reading/src/db/migrations.ts +0 -59
- package/microservices/microservice-reading/src/db/reading.ts +0 -524
- package/microservices/microservice-reading/src/index.ts +0 -51
- package/microservices/microservice-reading/src/mcp/index.ts +0 -368
- package/microservices/microservice-shipping/package.json +0 -27
- package/microservices/microservice-shipping/src/cli/index.ts +0 -606
- package/microservices/microservice-shipping/src/db/database.ts +0 -93
- package/microservices/microservice-shipping/src/db/migrations.ts +0 -69
- package/microservices/microservice-shipping/src/db/shipping.ts +0 -1093
- package/microservices/microservice-shipping/src/index.ts +0 -53
- package/microservices/microservice-shipping/src/mcp/index.ts +0 -533
- package/microservices/microservice-social/package.json +0 -28
- package/microservices/microservice-social/src/cli/index.ts +0 -1583
- package/microservices/microservice-social/src/db/database.ts +0 -93
- package/microservices/microservice-social/src/db/migrations.ts +0 -160
- package/microservices/microservice-social/src/db/social.ts +0 -1076
- package/microservices/microservice-social/src/index.ts +0 -46
- package/microservices/microservice-social/src/lib/audience.ts +0 -353
- package/microservices/microservice-social/src/lib/content-ai.ts +0 -278
- package/microservices/microservice-social/src/lib/media.ts +0 -311
- package/microservices/microservice-social/src/lib/mentions.ts +0 -434
- package/microservices/microservice-social/src/lib/metrics-sync.ts +0 -264
- package/microservices/microservice-social/src/lib/publisher.ts +0 -377
- package/microservices/microservice-social/src/lib/scheduler.ts +0 -229
- package/microservices/microservice-social/src/lib/sentiment.ts +0 -256
- package/microservices/microservice-social/src/lib/threads.ts +0 -291
- package/microservices/microservice-social/src/mcp/index.ts +0 -1425
- package/microservices/microservice-social/src/server/index.ts +0 -441
- package/microservices/microservice-subscriptions/package.json +0 -27
- package/microservices/microservice-subscriptions/src/cli/index.ts +0 -715
- package/microservices/microservice-subscriptions/src/db/database.ts +0 -93
- package/microservices/microservice-subscriptions/src/db/migrations.ts +0 -125
- package/microservices/microservice-subscriptions/src/db/subscriptions.ts +0 -1256
- package/microservices/microservice-subscriptions/src/index.ts +0 -41
- package/microservices/microservice-subscriptions/src/mcp/index.ts +0 -631
- package/microservices/microservice-timesheets/package.json +0 -27
- package/microservices/microservice-timesheets/src/cli/index.ts +0 -373
- package/microservices/microservice-timesheets/src/db/database.ts +0 -82
- package/microservices/microservice-timesheets/src/db/locale.ts +0 -217
- package/microservices/microservice-timesheets/src/db/migrations.ts +0 -74
- package/microservices/microservice-timesheets/src/db/timesheets.ts +0 -447
- package/microservices/microservice-timesheets/src/index.ts +0 -44
- package/microservices/microservice-timesheets/src/mcp/index.ts +0 -269
- package/microservices/microservice-transcriber/package.json +0 -28
- package/microservices/microservice-transcriber/src/cli/index.ts +0 -1593
- package/microservices/microservice-transcriber/src/db/annotations.ts +0 -37
- package/microservices/microservice-transcriber/src/db/comments.ts +0 -166
- package/microservices/microservice-transcriber/src/db/database.ts +0 -82
- package/microservices/microservice-transcriber/src/db/migrations.ts +0 -118
- package/microservices/microservice-transcriber/src/db/proofread.ts +0 -119
- package/microservices/microservice-transcriber/src/db/transcripts.ts +0 -395
- package/microservices/microservice-transcriber/src/index.ts +0 -43
- package/microservices/microservice-transcriber/src/lib/config.ts +0 -77
- package/microservices/microservice-transcriber/src/lib/diff.ts +0 -91
- package/microservices/microservice-transcriber/src/lib/downloader.ts +0 -638
- package/microservices/microservice-transcriber/src/lib/feeds.ts +0 -62
- package/microservices/microservice-transcriber/src/lib/live.ts +0 -94
- package/microservices/microservice-transcriber/src/lib/notion.ts +0 -129
- package/microservices/microservice-transcriber/src/lib/proofread.ts +0 -296
- package/microservices/microservice-transcriber/src/lib/providers.ts +0 -713
- package/microservices/microservice-transcriber/src/lib/summarizer.ts +0 -147
- package/microservices/microservice-transcriber/src/lib/translator.ts +0 -75
- package/microservices/microservice-transcriber/src/lib/webhook.ts +0 -37
- package/microservices/microservice-transcriber/src/mcp/index.ts +0 -1330
- package/microservices/microservice-transcriber/src/server/index.ts +0 -199
- package/microservices/microservice-travel/package.json +0 -27
- package/microservices/microservice-travel/src/cli/index.ts +0 -505
- package/microservices/microservice-travel/src/db/database.ts +0 -93
- package/microservices/microservice-travel/src/db/migrations.ts +0 -77
- package/microservices/microservice-travel/src/db/travel.ts +0 -802
- package/microservices/microservice-travel/src/index.ts +0 -60
- package/microservices/microservice-travel/src/mcp/index.ts +0 -495
- package/microservices/microservice-wiki/package.json +0 -27
- package/microservices/microservice-wiki/src/cli/index.ts +0 -345
- package/microservices/microservice-wiki/src/db/database.ts +0 -93
- package/microservices/microservice-wiki/src/db/migrations.ts +0 -55
- package/microservices/microservice-wiki/src/db/wiki.ts +0 -395
- package/microservices/microservice-wiki/src/index.ts +0 -32
- package/microservices/microservice-wiki/src/mcp/index.ts +0 -344
|
@@ -1,524 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reading CRUD operations — books, highlights, reading sessions
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { getDatabase } from "./database.js";
|
|
6
|
-
|
|
7
|
-
// ============ Types ============
|
|
8
|
-
|
|
9
|
-
export interface Book {
|
|
10
|
-
id: string;
|
|
11
|
-
title: string;
|
|
12
|
-
author: string | null;
|
|
13
|
-
isbn: string | null;
|
|
14
|
-
status: "to_read" | "reading" | "completed" | "abandoned";
|
|
15
|
-
rating: number | null;
|
|
16
|
-
category: string | null;
|
|
17
|
-
pages: number | null;
|
|
18
|
-
current_page: number;
|
|
19
|
-
started_at: string | null;
|
|
20
|
-
finished_at: string | null;
|
|
21
|
-
cover_url: string | null;
|
|
22
|
-
metadata: Record<string, unknown>;
|
|
23
|
-
created_at: string;
|
|
24
|
-
updated_at: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
interface BookRow {
|
|
28
|
-
id: string;
|
|
29
|
-
title: string;
|
|
30
|
-
author: string | null;
|
|
31
|
-
isbn: string | null;
|
|
32
|
-
status: string;
|
|
33
|
-
rating: number | null;
|
|
34
|
-
category: string | null;
|
|
35
|
-
pages: number | null;
|
|
36
|
-
current_page: number;
|
|
37
|
-
started_at: string | null;
|
|
38
|
-
finished_at: string | null;
|
|
39
|
-
cover_url: string | null;
|
|
40
|
-
metadata: string;
|
|
41
|
-
created_at: string;
|
|
42
|
-
updated_at: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function rowToBook(row: BookRow): Book {
|
|
46
|
-
return {
|
|
47
|
-
...row,
|
|
48
|
-
status: row.status as Book["status"],
|
|
49
|
-
metadata: JSON.parse(row.metadata || "{}"),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface Highlight {
|
|
54
|
-
id: string;
|
|
55
|
-
book_id: string;
|
|
56
|
-
text: string;
|
|
57
|
-
page: number | null;
|
|
58
|
-
chapter: string | null;
|
|
59
|
-
color: string;
|
|
60
|
-
notes: string | null;
|
|
61
|
-
created_at: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface ReadingSession {
|
|
65
|
-
id: string;
|
|
66
|
-
book_id: string;
|
|
67
|
-
pages_read: number | null;
|
|
68
|
-
duration_min: number | null;
|
|
69
|
-
logged_at: string;
|
|
70
|
-
created_at: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// ============ Book CRUD ============
|
|
74
|
-
|
|
75
|
-
export interface CreateBookInput {
|
|
76
|
-
title: string;
|
|
77
|
-
author?: string;
|
|
78
|
-
isbn?: string;
|
|
79
|
-
status?: "to_read" | "reading" | "completed" | "abandoned";
|
|
80
|
-
rating?: number;
|
|
81
|
-
category?: string;
|
|
82
|
-
pages?: number;
|
|
83
|
-
current_page?: number;
|
|
84
|
-
started_at?: string;
|
|
85
|
-
finished_at?: string;
|
|
86
|
-
cover_url?: string;
|
|
87
|
-
metadata?: Record<string, unknown>;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export function createBook(input: CreateBookInput): Book {
|
|
91
|
-
const db = getDatabase();
|
|
92
|
-
const id = crypto.randomUUID();
|
|
93
|
-
const metadata = JSON.stringify(input.metadata || {});
|
|
94
|
-
|
|
95
|
-
db.prepare(
|
|
96
|
-
`INSERT INTO books (id, title, author, isbn, status, rating, category, pages, current_page, started_at, finished_at, cover_url, metadata)
|
|
97
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`
|
|
98
|
-
).run(
|
|
99
|
-
id,
|
|
100
|
-
input.title,
|
|
101
|
-
input.author || null,
|
|
102
|
-
input.isbn || null,
|
|
103
|
-
input.status || "to_read",
|
|
104
|
-
input.rating ?? null,
|
|
105
|
-
input.category || null,
|
|
106
|
-
input.pages ?? null,
|
|
107
|
-
input.current_page ?? 0,
|
|
108
|
-
input.started_at || null,
|
|
109
|
-
input.finished_at || null,
|
|
110
|
-
input.cover_url || null,
|
|
111
|
-
metadata
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
return getBook(id)!;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export function getBook(id: string): Book | null {
|
|
118
|
-
const db = getDatabase();
|
|
119
|
-
const row = db.prepare("SELECT * FROM books WHERE id = ?").get(id) as BookRow | null;
|
|
120
|
-
return row ? rowToBook(row) : null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export interface ListBooksOptions {
|
|
124
|
-
search?: string;
|
|
125
|
-
status?: string;
|
|
126
|
-
category?: string;
|
|
127
|
-
author?: string;
|
|
128
|
-
limit?: number;
|
|
129
|
-
offset?: number;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export function listBooks(options: ListBooksOptions = {}): Book[] {
|
|
133
|
-
const db = getDatabase();
|
|
134
|
-
const conditions: string[] = [];
|
|
135
|
-
const params: unknown[] = [];
|
|
136
|
-
|
|
137
|
-
if (options.search) {
|
|
138
|
-
conditions.push("(title LIKE ? OR author LIKE ? OR isbn LIKE ? OR category LIKE ?)");
|
|
139
|
-
const q = `%${options.search}%`;
|
|
140
|
-
params.push(q, q, q, q);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (options.status) {
|
|
144
|
-
conditions.push("status = ?");
|
|
145
|
-
params.push(options.status);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (options.category) {
|
|
149
|
-
conditions.push("category = ?");
|
|
150
|
-
params.push(options.category);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (options.author) {
|
|
154
|
-
conditions.push("author LIKE ?");
|
|
155
|
-
params.push(`%${options.author}%`);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
let sql = "SELECT * FROM books";
|
|
159
|
-
if (conditions.length > 0) {
|
|
160
|
-
sql += " WHERE " + conditions.join(" AND ");
|
|
161
|
-
}
|
|
162
|
-
sql += " ORDER BY updated_at DESC";
|
|
163
|
-
|
|
164
|
-
if (options.limit) {
|
|
165
|
-
sql += " LIMIT ?";
|
|
166
|
-
params.push(options.limit);
|
|
167
|
-
}
|
|
168
|
-
if (options.offset) {
|
|
169
|
-
sql += " OFFSET ?";
|
|
170
|
-
params.push(options.offset);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const rows = db.prepare(sql).all(...params) as BookRow[];
|
|
174
|
-
return rows.map(rowToBook);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export interface UpdateBookInput {
|
|
178
|
-
title?: string;
|
|
179
|
-
author?: string;
|
|
180
|
-
isbn?: string;
|
|
181
|
-
status?: "to_read" | "reading" | "completed" | "abandoned";
|
|
182
|
-
rating?: number;
|
|
183
|
-
category?: string;
|
|
184
|
-
pages?: number;
|
|
185
|
-
current_page?: number;
|
|
186
|
-
started_at?: string;
|
|
187
|
-
finished_at?: string;
|
|
188
|
-
cover_url?: string;
|
|
189
|
-
metadata?: Record<string, unknown>;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export function updateBook(id: string, input: UpdateBookInput): Book | null {
|
|
193
|
-
const db = getDatabase();
|
|
194
|
-
const existing = getBook(id);
|
|
195
|
-
if (!existing) return null;
|
|
196
|
-
|
|
197
|
-
const sets: string[] = [];
|
|
198
|
-
const params: unknown[] = [];
|
|
199
|
-
|
|
200
|
-
if (input.title !== undefined) { sets.push("title = ?"); params.push(input.title); }
|
|
201
|
-
if (input.author !== undefined) { sets.push("author = ?"); params.push(input.author); }
|
|
202
|
-
if (input.isbn !== undefined) { sets.push("isbn = ?"); params.push(input.isbn); }
|
|
203
|
-
if (input.status !== undefined) { sets.push("status = ?"); params.push(input.status); }
|
|
204
|
-
if (input.rating !== undefined) { sets.push("rating = ?"); params.push(input.rating); }
|
|
205
|
-
if (input.category !== undefined) { sets.push("category = ?"); params.push(input.category); }
|
|
206
|
-
if (input.pages !== undefined) { sets.push("pages = ?"); params.push(input.pages); }
|
|
207
|
-
if (input.current_page !== undefined) { sets.push("current_page = ?"); params.push(input.current_page); }
|
|
208
|
-
if (input.started_at !== undefined) { sets.push("started_at = ?"); params.push(input.started_at); }
|
|
209
|
-
if (input.finished_at !== undefined) { sets.push("finished_at = ?"); params.push(input.finished_at); }
|
|
210
|
-
if (input.cover_url !== undefined) { sets.push("cover_url = ?"); params.push(input.cover_url); }
|
|
211
|
-
if (input.metadata !== undefined) { sets.push("metadata = ?"); params.push(JSON.stringify(input.metadata)); }
|
|
212
|
-
|
|
213
|
-
if (sets.length === 0) return existing;
|
|
214
|
-
|
|
215
|
-
sets.push("updated_at = datetime('now')");
|
|
216
|
-
params.push(id);
|
|
217
|
-
|
|
218
|
-
db.prepare(`UPDATE books SET ${sets.join(", ")} WHERE id = ?`).run(...params);
|
|
219
|
-
|
|
220
|
-
return getBook(id);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export function deleteBook(id: string): boolean {
|
|
224
|
-
const db = getDatabase();
|
|
225
|
-
const result = db.prepare("DELETE FROM books WHERE id = ?").run(id);
|
|
226
|
-
return result.changes > 0;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
export function searchBooks(query: string): Book[] {
|
|
230
|
-
return listBooks({ search: query });
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export function countBooks(): number {
|
|
234
|
-
const db = getDatabase();
|
|
235
|
-
const row = db.prepare("SELECT COUNT(*) as count FROM books").get() as { count: number };
|
|
236
|
-
return row.count;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// ============ Status Transitions ============
|
|
240
|
-
|
|
241
|
-
export function startBook(id: string): Book | null {
|
|
242
|
-
return updateBook(id, {
|
|
243
|
-
status: "reading",
|
|
244
|
-
started_at: new Date().toISOString(),
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export function finishBook(id: string, rating?: number): Book | null {
|
|
249
|
-
const book = getBook(id);
|
|
250
|
-
if (!book) return null;
|
|
251
|
-
|
|
252
|
-
const input: UpdateBookInput = {
|
|
253
|
-
status: "completed",
|
|
254
|
-
finished_at: new Date().toISOString(),
|
|
255
|
-
current_page: book.pages ?? book.current_page,
|
|
256
|
-
};
|
|
257
|
-
if (rating !== undefined) input.rating = rating;
|
|
258
|
-
|
|
259
|
-
return updateBook(id, input);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export function abandonBook(id: string): Book | null {
|
|
263
|
-
return updateBook(id, { status: "abandoned" });
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export function getCurrentlyReading(): Book[] {
|
|
267
|
-
return listBooks({ status: "reading" });
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// ============ Highlights ============
|
|
271
|
-
|
|
272
|
-
export interface CreateHighlightInput {
|
|
273
|
-
book_id: string;
|
|
274
|
-
text: string;
|
|
275
|
-
page?: number;
|
|
276
|
-
chapter?: string;
|
|
277
|
-
color?: string;
|
|
278
|
-
notes?: string;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export function createHighlight(input: CreateHighlightInput): Highlight {
|
|
282
|
-
const db = getDatabase();
|
|
283
|
-
const id = crypto.randomUUID();
|
|
284
|
-
|
|
285
|
-
db.prepare(
|
|
286
|
-
`INSERT INTO highlights (id, book_id, text, page, chapter, color, notes)
|
|
287
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)`
|
|
288
|
-
).run(
|
|
289
|
-
id,
|
|
290
|
-
input.book_id,
|
|
291
|
-
input.text,
|
|
292
|
-
input.page ?? null,
|
|
293
|
-
input.chapter || null,
|
|
294
|
-
input.color || "yellow",
|
|
295
|
-
input.notes || null
|
|
296
|
-
);
|
|
297
|
-
|
|
298
|
-
return getHighlight(id)!;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
export function getHighlight(id: string): Highlight | null {
|
|
302
|
-
const db = getDatabase();
|
|
303
|
-
return db.prepare("SELECT * FROM highlights WHERE id = ?").get(id) as Highlight | null;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export function listHighlights(bookId: string): Highlight[] {
|
|
307
|
-
const db = getDatabase();
|
|
308
|
-
return db
|
|
309
|
-
.prepare("SELECT * FROM highlights WHERE book_id = ? ORDER BY page ASC, created_at ASC")
|
|
310
|
-
.all(bookId) as Highlight[];
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
export function deleteHighlight(id: string): boolean {
|
|
314
|
-
const db = getDatabase();
|
|
315
|
-
const result = db.prepare("DELETE FROM highlights WHERE id = ?").run(id);
|
|
316
|
-
return result.changes > 0;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
export function searchHighlights(query: string): (Highlight & { book_title: string })[] {
|
|
320
|
-
const db = getDatabase();
|
|
321
|
-
const q = `%${query}%`;
|
|
322
|
-
return db
|
|
323
|
-
.prepare(
|
|
324
|
-
`SELECT h.*, b.title as book_title
|
|
325
|
-
FROM highlights h
|
|
326
|
-
JOIN books b ON h.book_id = b.id
|
|
327
|
-
WHERE h.text LIKE ? OR h.notes LIKE ?
|
|
328
|
-
ORDER BY h.created_at DESC`
|
|
329
|
-
)
|
|
330
|
-
.all(q, q) as (Highlight & { book_title: string })[];
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
// ============ Reading Sessions ============
|
|
334
|
-
|
|
335
|
-
export interface CreateReadingSessionInput {
|
|
336
|
-
book_id: string;
|
|
337
|
-
pages_read?: number;
|
|
338
|
-
duration_min?: number;
|
|
339
|
-
logged_at: string;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
export function createReadingSession(input: CreateReadingSessionInput): ReadingSession {
|
|
343
|
-
const db = getDatabase();
|
|
344
|
-
const id = crypto.randomUUID();
|
|
345
|
-
|
|
346
|
-
db.prepare(
|
|
347
|
-
`INSERT INTO reading_sessions (id, book_id, pages_read, duration_min, logged_at)
|
|
348
|
-
VALUES (?, ?, ?, ?, ?)`
|
|
349
|
-
).run(
|
|
350
|
-
id,
|
|
351
|
-
input.book_id,
|
|
352
|
-
input.pages_read ?? null,
|
|
353
|
-
input.duration_min ?? null,
|
|
354
|
-
input.logged_at
|
|
355
|
-
);
|
|
356
|
-
|
|
357
|
-
// Update book's current_page if pages_read is provided
|
|
358
|
-
if (input.pages_read) {
|
|
359
|
-
const book = getBook(input.book_id);
|
|
360
|
-
if (book) {
|
|
361
|
-
const newPage = book.current_page + input.pages_read;
|
|
362
|
-
updateBook(input.book_id, { current_page: newPage });
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
return getReadingSession(id)!;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
export function getReadingSession(id: string): ReadingSession | null {
|
|
370
|
-
const db = getDatabase();
|
|
371
|
-
return db.prepare("SELECT * FROM reading_sessions WHERE id = ?").get(id) as ReadingSession | null;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
export function listReadingSessions(bookId: string): ReadingSession[] {
|
|
375
|
-
const db = getDatabase();
|
|
376
|
-
return db
|
|
377
|
-
.prepare("SELECT * FROM reading_sessions WHERE book_id = ? ORDER BY logged_at DESC")
|
|
378
|
-
.all(bookId) as ReadingSession[];
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
export function deleteReadingSession(id: string): boolean {
|
|
382
|
-
const db = getDatabase();
|
|
383
|
-
const result = db.prepare("DELETE FROM reading_sessions WHERE id = ?").run(id);
|
|
384
|
-
return result.changes > 0;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
// ============ Stats ============
|
|
388
|
-
|
|
389
|
-
export interface ReadingStats {
|
|
390
|
-
books_read: number;
|
|
391
|
-
pages_read: number;
|
|
392
|
-
total_sessions: number;
|
|
393
|
-
avg_rating: number | null;
|
|
394
|
-
by_category: Record<string, number>;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export function getReadingStats(year?: number): ReadingStats {
|
|
398
|
-
const db = getDatabase();
|
|
399
|
-
|
|
400
|
-
let yearCondition = "";
|
|
401
|
-
const yearParams: unknown[] = [];
|
|
402
|
-
if (year) {
|
|
403
|
-
yearCondition = " AND strftime('%Y', finished_at) = ?";
|
|
404
|
-
yearParams.push(String(year));
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
// Books read (completed)
|
|
408
|
-
const booksRow = db
|
|
409
|
-
.prepare(`SELECT COUNT(*) as count FROM books WHERE status = 'completed'${yearCondition}`)
|
|
410
|
-
.get(...yearParams) as { count: number };
|
|
411
|
-
|
|
412
|
-
// Avg rating
|
|
413
|
-
const ratingRow = db
|
|
414
|
-
.prepare(`SELECT AVG(rating) as avg FROM books WHERE status = 'completed' AND rating IS NOT NULL${yearCondition}`)
|
|
415
|
-
.get(...yearParams) as { avg: number | null };
|
|
416
|
-
|
|
417
|
-
// Pages read from sessions
|
|
418
|
-
let sessionYearCondition = "";
|
|
419
|
-
const sessionYearParams: unknown[] = [];
|
|
420
|
-
if (year) {
|
|
421
|
-
sessionYearCondition = " WHERE strftime('%Y', logged_at) = ?";
|
|
422
|
-
sessionYearParams.push(String(year));
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
const pagesRow = db
|
|
426
|
-
.prepare(`SELECT COALESCE(SUM(pages_read), 0) as total FROM reading_sessions${sessionYearCondition}`)
|
|
427
|
-
.get(...sessionYearParams) as { total: number };
|
|
428
|
-
|
|
429
|
-
const sessionsRow = db
|
|
430
|
-
.prepare(`SELECT COUNT(*) as count FROM reading_sessions${sessionYearCondition}`)
|
|
431
|
-
.get(...sessionYearParams) as { count: number };
|
|
432
|
-
|
|
433
|
-
// By category
|
|
434
|
-
const categoryRows = db
|
|
435
|
-
.prepare(
|
|
436
|
-
`SELECT category, COUNT(*) as count FROM books WHERE status = 'completed' AND category IS NOT NULL${yearCondition} GROUP BY category ORDER BY count DESC`
|
|
437
|
-
)
|
|
438
|
-
.all(...yearParams) as { category: string; count: number }[];
|
|
439
|
-
|
|
440
|
-
const by_category: Record<string, number> = {};
|
|
441
|
-
for (const row of categoryRows) {
|
|
442
|
-
by_category[row.category] = row.count;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
return {
|
|
446
|
-
books_read: booksRow.count,
|
|
447
|
-
pages_read: pagesRow.total,
|
|
448
|
-
total_sessions: sessionsRow.count,
|
|
449
|
-
avg_rating: ratingRow.avg ? Math.round(ratingRow.avg * 10) / 10 : null,
|
|
450
|
-
by_category,
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
export interface ReadingPace {
|
|
455
|
-
pages_per_day: number;
|
|
456
|
-
books_per_month: number;
|
|
457
|
-
avg_session_pages: number;
|
|
458
|
-
avg_session_minutes: number | null;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export function getReadingPace(): ReadingPace {
|
|
462
|
-
const db = getDatabase();
|
|
463
|
-
|
|
464
|
-
// Get first and last session dates to calculate span
|
|
465
|
-
const rangeRow = db
|
|
466
|
-
.prepare(
|
|
467
|
-
`SELECT MIN(logged_at) as first_session, MAX(logged_at) as last_session,
|
|
468
|
-
COALESCE(SUM(pages_read), 0) as total_pages,
|
|
469
|
-
COUNT(*) as total_sessions,
|
|
470
|
-
AVG(pages_read) as avg_pages,
|
|
471
|
-
AVG(duration_min) as avg_min
|
|
472
|
-
FROM reading_sessions`
|
|
473
|
-
)
|
|
474
|
-
.get() as {
|
|
475
|
-
first_session: string | null;
|
|
476
|
-
last_session: string | null;
|
|
477
|
-
total_pages: number;
|
|
478
|
-
total_sessions: number;
|
|
479
|
-
avg_pages: number | null;
|
|
480
|
-
avg_min: number | null;
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
if (!rangeRow.first_session || rangeRow.total_sessions === 0) {
|
|
484
|
-
return { pages_per_day: 0, books_per_month: 0, avg_session_pages: 0, avg_session_minutes: null };
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
const first = new Date(rangeRow.first_session);
|
|
488
|
-
const last = new Date(rangeRow.last_session!);
|
|
489
|
-
const daySpan = Math.max(1, Math.ceil((last.getTime() - first.getTime()) / (1000 * 60 * 60 * 24)));
|
|
490
|
-
|
|
491
|
-
const pagesPerDay = Math.round((rangeRow.total_pages / daySpan) * 10) / 10;
|
|
492
|
-
|
|
493
|
-
// Books completed in this period
|
|
494
|
-
const booksRow = db
|
|
495
|
-
.prepare(`SELECT COUNT(*) as count FROM books WHERE status = 'completed'`)
|
|
496
|
-
.get() as { count: number };
|
|
497
|
-
|
|
498
|
-
const monthSpan = Math.max(1, daySpan / 30);
|
|
499
|
-
const booksPerMonth = Math.round((booksRow.count / monthSpan) * 10) / 10;
|
|
500
|
-
|
|
501
|
-
return {
|
|
502
|
-
pages_per_day: pagesPerDay,
|
|
503
|
-
books_per_month: booksPerMonth,
|
|
504
|
-
avg_session_pages: Math.round((rangeRow.avg_pages || 0) * 10) / 10,
|
|
505
|
-
avg_session_minutes: rangeRow.avg_min ? Math.round(rangeRow.avg_min * 10) / 10 : null,
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
export interface BookProgress {
|
|
510
|
-
current_page: number;
|
|
511
|
-
total_pages: number | null;
|
|
512
|
-
percentage: number | null;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
export function getBookProgress(bookId: string): BookProgress | null {
|
|
516
|
-
const book = getBook(bookId);
|
|
517
|
-
if (!book) return null;
|
|
518
|
-
|
|
519
|
-
return {
|
|
520
|
-
current_page: book.current_page,
|
|
521
|
-
total_pages: book.pages,
|
|
522
|
-
percentage: book.pages ? Math.round((book.current_page / book.pages) * 100) : null,
|
|
523
|
-
};
|
|
524
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* microservice-reading — Reading tracker microservice
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
createBook,
|
|
7
|
-
getBook,
|
|
8
|
-
listBooks,
|
|
9
|
-
updateBook,
|
|
10
|
-
deleteBook,
|
|
11
|
-
searchBooks,
|
|
12
|
-
countBooks,
|
|
13
|
-
startBook,
|
|
14
|
-
finishBook,
|
|
15
|
-
abandonBook,
|
|
16
|
-
getCurrentlyReading,
|
|
17
|
-
getBookProgress,
|
|
18
|
-
type Book,
|
|
19
|
-
type CreateBookInput,
|
|
20
|
-
type UpdateBookInput,
|
|
21
|
-
type ListBooksOptions,
|
|
22
|
-
type BookProgress,
|
|
23
|
-
} from "./db/reading.js";
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
createHighlight,
|
|
27
|
-
getHighlight,
|
|
28
|
-
listHighlights,
|
|
29
|
-
deleteHighlight,
|
|
30
|
-
searchHighlights,
|
|
31
|
-
type Highlight,
|
|
32
|
-
type CreateHighlightInput,
|
|
33
|
-
} from "./db/reading.js";
|
|
34
|
-
|
|
35
|
-
export {
|
|
36
|
-
createReadingSession,
|
|
37
|
-
getReadingSession,
|
|
38
|
-
listReadingSessions,
|
|
39
|
-
deleteReadingSession,
|
|
40
|
-
type ReadingSession,
|
|
41
|
-
type CreateReadingSessionInput,
|
|
42
|
-
} from "./db/reading.js";
|
|
43
|
-
|
|
44
|
-
export {
|
|
45
|
-
getReadingStats,
|
|
46
|
-
getReadingPace,
|
|
47
|
-
type ReadingStats,
|
|
48
|
-
type ReadingPace,
|
|
49
|
-
} from "./db/reading.js";
|
|
50
|
-
|
|
51
|
-
export { getDatabase, closeDatabase } from "./db/database.js";
|