@mdrv/db-config 0.2.0 → 0.2.1
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/index.ts +6 -6
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -55,13 +55,13 @@ export interface DbConfig {
|
|
|
55
55
|
[key: string]: unknown
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export interface
|
|
58
|
+
export interface MdrvDbConfig {
|
|
59
59
|
defaults?: { durability?: Durability; verify?: string }
|
|
60
60
|
sched?: { data_root?: string; backup_root?: string }
|
|
61
61
|
db: Record<string, DbConfig>
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export interface
|
|
64
|
+
export interface MdrvDbEvent {
|
|
65
65
|
seq: number
|
|
66
66
|
type: string
|
|
67
67
|
member_id: string
|
|
@@ -69,10 +69,10 @@ export interface MdrvEvent {
|
|
|
69
69
|
created_at: number
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export interface
|
|
73
|
-
onEvent?: (evt:
|
|
72
|
+
export interface MdrvDbHooks {
|
|
73
|
+
onEvent?: (evt: MdrvDbEvent, mdrv: unknown) => void | Promise<void>
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
export function loadConfig(text: string):
|
|
77
|
-
return parse(text) as unknown as
|
|
76
|
+
export function loadConfig(text: string): MdrvDbConfig {
|
|
77
|
+
return parse(text) as unknown as MdrvDbConfig
|
|
78
78
|
}
|