@delali/sirannon-db 0.2.3-next.37 → 0.2.3-next.39

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.
Files changed (42) hide show
  1. package/dist/backup/index.d.ts +6 -84
  2. package/dist/backup/index.mjs +6 -584
  3. package/dist/backup-scheduler/index.d.ts +58 -8
  4. package/dist/backup-scheduler/index.mjs +3 -2
  5. package/dist/{change-tracker-DXHPFe9J.d.ts → change-tracker-uG9gWvsY.d.ts} +1 -1
  6. package/dist/chunk-2QCPVE67.mjs +143 -0
  7. package/dist/chunk-63VBFSCS.mjs +525 -0
  8. package/dist/chunk-7SC2TZAS.mjs +41 -0
  9. package/dist/{chunk-72I5UI5C.mjs → chunk-DVS4QSIZ.mjs} +51 -23
  10. package/dist/{chunk-BQTVNI5H.mjs → chunk-DXXCLTFF.mjs} +205 -45
  11. package/dist/{chunk-BQFQ65OL.mjs → chunk-LXCGPZPA.mjs} +9 -1
  12. package/dist/{chunk-ZKDBGX7H.mjs → chunk-OJQHM4MT.mjs} +365 -357
  13. package/dist/chunk-U445A3C4.mjs +88 -0
  14. package/dist/chunk-W77EEVOT.mjs +156 -0
  15. package/dist/client/index.d.ts +8 -8
  16. package/dist/client/topology.d.ts +4 -4
  17. package/dist/{client-base-CGBpjZUB.d.ts → client-base-C-B8u5Lm.d.ts} +2 -2
  18. package/dist/core/index.d.ts +9 -9
  19. package/dist/core/index.mjs +228 -48
  20. package/dist/{database-955qag_W.d.ts → database-BlhUdJAO.d.ts} +46 -39
  21. package/dist/{chain-queries-D5aZ-8v2.d.ts → database-backup-C090lMHc.d.ts} +52 -2
  22. package/dist/driver/better-sqlite3.d.ts +1 -1
  23. package/dist/driver/better-sqlite3.mjs +9 -6
  24. package/dist/driver/bun.d.ts +1 -1
  25. package/dist/driver/expo.d.ts +1 -1
  26. package/dist/driver/node.d.ts +1 -1
  27. package/dist/driver/node.mjs +9 -6
  28. package/dist/driver/wa-sqlite.d.ts +1 -1
  29. package/dist/file-migrations/index.d.ts +1 -1
  30. package/dist/{protocol-BfiujBsE.d.ts → protocol-QekTGoKn.d.ts} +2 -2
  31. package/dist/replication/index.d.ts +7 -7
  32. package/dist/restore-options-C9MW9gpm.d.ts +83 -0
  33. package/dist/server/index.d.ts +102 -9
  34. package/dist/server/index.mjs +355 -3
  35. package/dist/{server-options-D4VmfTHw.d.ts → server-options-DeK6ZG8u.d.ts} +8 -1
  36. package/dist/{sirannon-DaGUawHs.d.ts → sirannon-C9cTgFrw.d.ts} +48 -5
  37. package/dist/transport/grpc.d.ts +3 -3
  38. package/dist/transport/memory.d.ts +3 -3
  39. package/dist/{types-BEjS69rs.d.ts → types-C1yBGTdx.d.ts} +2 -2
  40. package/dist/{types-Xb0L3o3w.d.ts → types-DApb7dvw.d.ts} +266 -23
  41. package/package.json +8 -7
  42. package/dist/chunk-GBM4AU24.mjs +0 -42
@@ -0,0 +1,88 @@
1
+ import { SirannonError } from './chunk-PBRXXISQ.mjs';
2
+ import { createHash } from 'crypto';
3
+
4
+ // src/core/backup/checkpoint.ts
5
+ var CHECKPOINT_ATTEMPTS = 3;
6
+ var CHECKPOINT_RETRY_DELAY_MS = 50;
7
+ function delay(ms) {
8
+ return new Promise((resolve) => setTimeout(resolve, ms));
9
+ }
10
+ async function checkpointLog(conn) {
11
+ let last = { busy: true, framesInLog: 0, framesCheckpointed: 0, emptied: false };
12
+ for (let attempt = 0; attempt < CHECKPOINT_ATTEMPTS; attempt++) {
13
+ if (attempt > 0) await delay(attempt * CHECKPOINT_RETRY_DELAY_MS);
14
+ const stmt = await conn.prepare("PRAGMA wal_checkpoint(TRUNCATE)");
15
+ const row = await stmt.get();
16
+ if (!row) return last;
17
+ const busy = Number(row.busy) !== 0;
18
+ const framesInLog = Number(row.log);
19
+ last = {
20
+ busy,
21
+ framesInLog,
22
+ framesCheckpointed: Number(row.checkpointed),
23
+ emptied: !busy && framesInLog === 0
24
+ };
25
+ if (last.emptied) return last;
26
+ }
27
+ return last;
28
+ }
29
+ function destinationError(message, err) {
30
+ if (err instanceof SirannonError) return err;
31
+ const detail = err instanceof Error ? `: ${err.message}` : "";
32
+ return new SirannonError(`${message}${detail}`, "BACKUP_DESTINATION_ERROR");
33
+ }
34
+ function assertNoPieceIsMissing(pieces, file) {
35
+ if (pieces.length === 0) {
36
+ throw destinationError(`The destination holds no pieces named '${file.name}'`);
37
+ }
38
+ for (let expected = 0; expected < file.pieceCount; expected++) {
39
+ if (pieces[expected]?.index !== expected) {
40
+ throw destinationError(
41
+ `The destination is missing piece ${expected} of '${file.name}', so the file cannot be assembled`
42
+ );
43
+ }
44
+ }
45
+ if (pieces.length > file.pieceCount) {
46
+ throw destinationError(
47
+ `The destination holds ${pieces.length} pieces of '${file.name}' where the run wrote ${file.pieceCount}, so a later piece belongs to a different run`
48
+ );
49
+ }
50
+ }
51
+ async function listStoredFilePieces(destination, file) {
52
+ let listed;
53
+ try {
54
+ listed = [...await destination.listPieces(file.name)];
55
+ } catch (err) {
56
+ throw destinationError(`The destination could not list the pieces of '${file.name}'`, err);
57
+ }
58
+ listed.sort((left, right) => left.index - right.index);
59
+ assertNoPieceIsMissing(listed, file);
60
+ return listed;
61
+ }
62
+ async function fetchStoredFile(destination, file, pieces, take) {
63
+ const digest = file.fingerprint === void 0 ? null : createHash("sha256");
64
+ let bytesFetched = 0;
65
+ for (const piece of pieces) {
66
+ let bytes;
67
+ try {
68
+ bytes = await destination.readPiece(file.name, piece.index);
69
+ } catch (err) {
70
+ throw destinationError(`The destination could not return piece ${piece.index} of '${file.name}'`, err);
71
+ }
72
+ digest?.update(bytes);
73
+ bytesFetched += bytes.byteLength;
74
+ await take(piece.index, bytes);
75
+ }
76
+ const fingerprint = digest?.digest("hex");
77
+ if (bytesFetched !== file.bytesWritten) {
78
+ throw destinationError(
79
+ `The pieces of '${file.name}' hold ${bytesFetched} bytes where the run wrote ${file.bytesWritten}`
80
+ );
81
+ }
82
+ if (fingerprint !== void 0 && fingerprint !== file.fingerprint) {
83
+ throw destinationError(`The pieces of '${file.name}' do not match the fingerprint the run recorded`);
84
+ }
85
+ return { bytesFetched, pieceCount: pieces.length, ...fingerprint === void 0 ? {} : { fingerprint } };
86
+ }
87
+
88
+ export { checkpointLog, fetchStoredFile, listStoredFilePieces };
@@ -0,0 +1,156 @@
1
+ import { checkpointLog } from './chunk-U445A3C4.mjs';
2
+ import { readLogFileHeader, sameLog, cursorChecksum, scanLogFrames, copyLogRange } from './chunk-2QCPVE67.mjs';
3
+ import { logFrameOffset } from './chunk-DVS4QSIZ.mjs';
4
+ import { isBackupChainPosition } from './chunk-YVF2ZJTE.mjs';
5
+ import { randomHex } from './chunk-V5FUJEYY.mjs';
6
+ import { SirannonError } from './chunk-PBRXXISQ.mjs';
7
+ import { readFile, mkdir, writeFile, rename, rm, readdir } from 'fs/promises';
8
+ import { dirname, join } from 'path';
9
+
10
+ var STATE_FILE_NAME = "cycle.json";
11
+ function isWholeNumber(value) {
12
+ return typeof value === "number" && Number.isInteger(value) && value >= 0;
13
+ }
14
+ function isCursor(value) {
15
+ const cursor = value;
16
+ return isWholeNumber(cursor?.logSequence) && isWholeNumber(cursor.salt1) && isWholeNumber(cursor.salt2) && isWholeNumber(cursor.lastFrame) && isWholeNumber(cursor.checksum1) && isWholeNumber(cursor.checksum2) && typeof cursor.checkpointed === "boolean";
17
+ }
18
+ function isPendingCapture(value) {
19
+ const pending = value;
20
+ return typeof pending?.name === "string" && typeof pending.runId === "string" && isWholeNumber(pending.sequence) && pending.sequence >= 1 && isBackupChainPosition(pending.position) && isCursor(pending.cursor) && isWholeNumber(pending.startedAt) && isWholeNumber(pending.capturedAt) && isWholeNumber(pending.copyMs) && isWholeNumber(pending.frameCount) && isWholeNumber(pending.byteLength) && isWholeNumber(pending.pageSize);
21
+ }
22
+ function isCycleState(value) {
23
+ const state = value;
24
+ return typeof state?.chainName === "string" && typeof state.chainId === "string" && isWholeNumber(state.chainStartedAt) && (state.headIndex === void 0 || isWholeNumber(state.headIndex)) && isWholeNumber(state.records) && (state.cursor === null || isCursor(state.cursor)) && (state.pending === null || isPendingCapture(state.pending)) && typeof state.closedCleanly === "boolean";
25
+ }
26
+ function cycleStatePath(stagingDir) {
27
+ return join(stagingDir, STATE_FILE_NAME);
28
+ }
29
+ async function readCycleState(stagingDir) {
30
+ try {
31
+ const text = await readFile(cycleStatePath(stagingDir), "utf8");
32
+ const state = JSON.parse(text);
33
+ return isCycleState(state) ? state : void 0;
34
+ } catch {
35
+ return void 0;
36
+ }
37
+ }
38
+ async function writeCycleState(stagingDir, state) {
39
+ const path = cycleStatePath(stagingDir);
40
+ await mkdir(dirname(path), { recursive: true });
41
+ const staged = `${path}.writing`;
42
+ await writeFile(staged, JSON.stringify(state), "utf8");
43
+ await rename(staged, path);
44
+ }
45
+ async function removeCycleState(stagingDir) {
46
+ await rm(cycleStatePath(stagingDir), { force: true });
47
+ }
48
+
49
+ // src/core/backup/cycle-capture.ts
50
+ var STAGED_CAPTURE_PREFIX = "capture-";
51
+ var STAGED_CAPTURE_SUFFIX = ".wal";
52
+ function stagedCapturePath(stagingDir, sequence) {
53
+ return join(stagingDir, `${STAGED_CAPTURE_PREFIX}${sequence}${STAGED_CAPTURE_SUFFIX}`);
54
+ }
55
+ function rewoundError(request, detail) {
56
+ return new SirannonError(
57
+ `The write-ahead log of '${request.sourcePath}' ${detail}, so the frames written before it did are in no backup. Another connection checkpointed the log, or the database file was replaced. Route every write and every checkpoint through Sirannon, and take a fresh full copy so a new chain starts from a known state.`,
58
+ "BACKUP_LOG_REWOUND"
59
+ );
60
+ }
61
+ async function captureLogFrames(request) {
62
+ const startedAt = Date.now();
63
+ const cursor = request.cursor;
64
+ const header = await readLogFileHeader(request.logPath);
65
+ const holdsEveryCapturedFrame = cursor !== null && header !== void 0 && sameLog(header, cursor);
66
+ const newLogAllowed = cursor === null || cursor.checkpointed || request.expectNewLog;
67
+ if (!holdsEveryCapturedFrame && !newLogAllowed && cursor) {
68
+ throw rewoundError(
69
+ request,
70
+ header ? `restarted at checkpoint sequence ${header.logSequence} while the chain reaches frame ${cursor.lastFrame} of sequence ${cursor.logSequence}` : `holds no frames while the chain reaches frame ${cursor.lastFrame} of sequence ${cursor.logSequence}`
71
+ );
72
+ }
73
+ if (!header) return void 0;
74
+ const from = cursor && holdsEveryCapturedFrame ? { frame: cursor.lastFrame, checksum: cursorChecksum(cursor) } : { frame: 0, checksum: header.checksum };
75
+ const scan = await scanLogFrames(request.logPath, header, from);
76
+ if (scan.lastCommitFrame <= from.frame) {
77
+ if (from.frame > 0 && scan.lastCommitFrame < from.frame) {
78
+ throw rewoundError(
79
+ request,
80
+ `now ends at frame ${scan.lastCommitFrame} while the chain reaches frame ${from.frame}`
81
+ );
82
+ }
83
+ return void 0;
84
+ }
85
+ const firstFrame = from.frame + 1;
86
+ const startOffset = firstFrame === 1 ? 0 : logFrameOffset(firstFrame, header.frameBytes);
87
+ const byteLength = await copyLogRange(
88
+ request.logPath,
89
+ startOffset,
90
+ scan.endOffset,
91
+ stagedCapturePath(request.stagingDir, request.sequence)
92
+ );
93
+ const capturedAt = Date.now();
94
+ return {
95
+ name: `${request.namePrefix}-${request.chainId}-${String(request.sequence).padStart(6, "0")}.wal`,
96
+ runId: randomHex(8),
97
+ sequence: request.sequence,
98
+ position: {
99
+ logSequence: header.logSequence,
100
+ salt1: header.salt1,
101
+ salt2: header.salt2,
102
+ firstFrame,
103
+ lastFrame: scan.lastCommitFrame
104
+ },
105
+ cursor: {
106
+ logSequence: header.logSequence,
107
+ salt1: header.salt1,
108
+ salt2: header.salt2,
109
+ lastFrame: scan.lastCommitFrame,
110
+ checksum1: scan.checksum.first,
111
+ checksum2: scan.checksum.second,
112
+ checkpointed: false
113
+ },
114
+ startedAt,
115
+ capturedAt,
116
+ copyMs: capturedAt - startedAt,
117
+ frameCount: scan.lastCommitFrame - from.frame,
118
+ byteLength,
119
+ pageSize: header.pageSize
120
+ };
121
+ }
122
+ async function captureAndCheckpointTurn(turn) {
123
+ const { request, state, stagingDir } = turn;
124
+ await request.runExclusive(async () => {
125
+ const captured = await captureLogFrames({
126
+ sourcePath: request.sourcePath,
127
+ logPath: turn.logPath,
128
+ stagingDir,
129
+ chainId: state.chainId,
130
+ namePrefix: turn.namePrefix,
131
+ sequence: state.records,
132
+ cursor: state.cursor,
133
+ expectNewLog: state.closedCleanly
134
+ });
135
+ if (captured) {
136
+ state.pending = captured;
137
+ await writeCycleState(stagingDir, state);
138
+ }
139
+ const checkpointed = (await checkpointLog(request.acquireWriter())).emptied;
140
+ const cursor = captured?.cursor ?? state.cursor;
141
+ if (cursor) cursor.checkpointed = checkpointed;
142
+ state.closedCleanly = false;
143
+ await writeCycleState(stagingDir, state);
144
+ });
145
+ }
146
+ async function discardStagedChain(stagingDir) {
147
+ await removeCycleState(stagingDir);
148
+ const entries = await readdir(stagingDir).catch(() => []);
149
+ for (const entry of entries) {
150
+ if (entry.startsWith(STAGED_CAPTURE_PREFIX) && entry.endsWith(STAGED_CAPTURE_SUFFIX)) {
151
+ await rm(join(stagingDir, entry), { force: true });
152
+ }
153
+ }
154
+ }
155
+
156
+ export { captureAndCheckpointTurn, discardStagedChain, readCycleState, removeCycleState, stagedCapturePath, writeCycleState };
@@ -1,17 +1,17 @@
1
1
  export { F as FieldMergeResolver, L as LWWResolver, P as PrimaryWinsResolver } from '../primary-wins-B0np8JS3.js';
2
2
  import { C as ConflictResolver, R as ReplicationBatch } from '../types-CjhxcjhA.js';
3
3
  export { a as ConflictContext, b as ConflictResolution } from '../types-CjhxcjhA.js';
4
- import { C as ClientOptions, B as BulkLoadDurability } from '../server-options-D4VmfTHw.js';
5
- import { D as DatabaseClient, T as Transport, L as LiveHandlers, R as RemoteSubscription, a as RemoteSubscriptionBuilder, S as SubscribeOptions, b as RegistryDigestSource } from '../client-base-CGBpjZUB.js';
6
- export { c as LoadAllOptions, d as RemoteDatabase, e as RemoteError, f as SQL_REFUSED_MESSAGE, g as ServerCapabilities, h as ServerCapabilityCheck } from '../client-base-CGBpjZUB.js';
4
+ import { C as ClientOptions, B as BulkLoadDurability } from '../server-options-DeK6ZG8u.js';
5
+ import { D as DatabaseClient, T as Transport, L as LiveHandlers, R as RemoteSubscription, a as RemoteSubscriptionBuilder, S as SubscribeOptions, b as RegistryDigestSource } from '../client-base-C-B8u5Lm.js';
6
+ export { c as LoadAllOptions, d as RemoteDatabase, e as RemoteError, f as SQL_REFUSED_MESSAGE, g as ServerCapabilities, h as ServerCapabilityCheck } from '../client-base-C-B8u5Lm.js';
7
7
  import { a as LiveQuery, b as LiveQueryState, c as LiveUpdate } from '../types-BCejqzNA.js';
8
- import { k as DeviceSyncPort, D as Database } from '../database-955qag_W.js';
8
+ import { k as DeviceSyncPort, D as Database } from '../database-BlhUdJAO.js';
9
9
  import { C as ChangeEvent, P as Params, R as ReadConcern, W as WriteConcern } from '../query-types-Cv8N7pXj.js';
10
- import { Q as QueryResponse, E as ExecuteResponse, a as TransactionResponse, B as BatchResponse, L as LoadResponse, A as AckResponse } from '../protocol-BfiujBsE.js';
10
+ import { Q as QueryResponse, E as ExecuteResponse, T as TransactionResponse, B as BatchResponse, L as LoadResponse, A as AckResponse } from '../protocol-QekTGoKn.js';
11
11
  import '../operation-registry-C1FmwQWR.js';
12
- import '../types-Xb0L3o3w.js';
13
- import '../chain-queries-D5aZ-8v2.js';
14
- import '../change-tracker-DXHPFe9J.js';
12
+ import '../types-DApb7dvw.js';
13
+ import '../database-backup-C090lMHc.js';
14
+ import '../change-tracker-uG9gWvsY.js';
15
15
 
16
16
  /**
17
17
  * @public
@@ -1,11 +1,11 @@
1
1
  import { a as ReadConcernLevel } from '../query-types-Cv8N7pXj.js';
2
- import { C as ClientOptions } from '../server-options-D4VmfTHw.js';
3
- import { T as Transport, D as DatabaseClient } from '../client-base-CGBpjZUB.js';
2
+ import { C as ClientOptions } from '../server-options-DeK6ZG8u.js';
3
+ import { T as Transport, D as DatabaseClient } from '../client-base-C-B8u5Lm.js';
4
4
  import '../operation-registry-C1FmwQWR.js';
5
5
  import '../types-CjhxcjhA.js';
6
- import '../types-Xb0L3o3w.js';
6
+ import '../types-DApb7dvw.js';
7
7
  import '../types-BCejqzNA.js';
8
- import '../protocol-BfiujBsE.js';
8
+ import '../protocol-QekTGoKn.js';
9
9
 
10
10
  interface TopologyRouting {
11
11
  _getReadEndpoint(databaseId?: string, readConcern?: ReadConcernLevel): Promise<string>;
@@ -1,8 +1,8 @@
1
- import { B as BulkLoadDurability, a as BulkLoadResult, C as ClientOptions } from './server-options-D4VmfTHw.js';
1
+ import { B as BulkLoadDurability, a as BulkLoadResult, C as ClientOptions } from './server-options-DeK6ZG8u.js';
2
2
  import { R as ResultOp, a as LiveQuery } from './types-BCejqzNA.js';
3
3
  import { O as OperationRef, b as OperationArguments } from './operation-registry-C1FmwQWR.js';
4
4
  import { P as Params, R as ReadConcern, W as WriteConcern, C as ChangeEvent, Q as QueryOptions } from './query-types-Cv8N7pXj.js';
5
- import { Q as QueryResponse, E as ExecuteResponse, a as TransactionResponse, B as BatchResponse, L as LoadResponse } from './protocol-BfiujBsE.js';
5
+ import { Q as QueryResponse, E as ExecuteResponse, T as TransactionResponse, B as BatchResponse, L as LoadResponse } from './protocol-QekTGoKn.js';
6
6
 
7
7
  /**
8
8
  * Message a client raises when the server accepts no SQL over the network.
@@ -1,15 +1,15 @@
1
- export { B as BackupCapabilities, a as BackupRestorePlan, b as BackupSafeToDeleteOptions, c as backupPiecesSafeToDelete, p as planBackupRestore } from '../chain-queries-D5aZ-8v2.js';
2
- import { i as SQLiteConnection, F as SynchronousLevel, a as SQLiteDriver, D as DatabaseOptions, L as LifecycleConfig, M as Migration, G as MigrationResult, R as RollbackResult } from '../types-Xb0L3o3w.js';
3
- export { A as AfterQueryHook, H as AppliedMigration, I as AppliedMigrationEntry, g as BackupChain, e as BackupChainBase, f as BackupChainChange, l as BackupChainPosition, h as BackupChainRecord, n as BackupCycleOptions, j as BackupDestination, o as BackupGroupMembership, p as BackupGroupSource, q as BackupNodePreference, r as BackupPiece, s as BackupProgress, k as BackupRunReport, E as BackupScheduleOptions, t as BackupSkip, u as BackupSkipReason, v as BackupToDestinationOptions, J as BatchSummary, b as BeforeConnectHook, B as BeforeQueryHook, K as BeforeSubscribeHook, O as CDCMetrics, P as ClusterReadEndpointInfo, C as ClusterStatusInfo, Q as ConnectionHookContext, U as ConnectionMetrics, w as DEFAULT_CHAIN_NAME, d as DatabaseCloseHook, V as DatabaseCopyRequest, W as DatabaseCopyStep, c as DatabaseOpenHook, X as DriverCapabilities, Y as DriverWorkerEntry, Z as HookConfig, _ as MIGRATION_NAME_RE, $ as MetricsConfig, a0 as MigrationBaseline, a1 as MigrationSource, N as NodeHealth, a2 as NodeHealthReason, a3 as NodeHealthState, a4 as OpenOptions, a5 as QueryHookContext, a6 as QueryMetrics, a7 as RunResult, a8 as SQLiteStatement, S as SirannonOptions, T as Transaction, a9 as WriterWorkerOptions, y as readBackupChains } from '../types-Xb0L3o3w.js';
4
- import { B as BulkLoadDurability, a as BulkLoadResult } from '../server-options-D4VmfTHw.js';
5
- export { A as AuthenticateHook, b as BulkLoadOptions, C as ClientOptions, c as ClusterStatusAuthorizer, d as CorsOptions, R as ReplicationStatusInfo, e as RequestContext, f as ServerExecutionTarget, g as ServerExecutionTargetResolver, S as ServerOptions, W as WSHandlerOptions } from '../server-options-D4VmfTHw.js';
6
- export { C as ChangeTracker, a as ChangeTrackerOptions } from '../change-tracker-DXHPFe9J.js';
7
- import { D as Database } from '../database-955qag_W.js';
8
- export { C as ConnectionPool, a as ConnectionPoolOptions, b as DatabaseBackups, c as DatabaseLifecycle, H as HookDispose, d as HookEvent, e as HookEventContextMap, f as HookHandler, g as HookRegistry, M as MetricsCollector, S as SubscribeHookContext, h as execute, i as executeBatch, q as query, j as queryOne } from '../database-955qag_W.js';
1
+ export { B as BackupCapabilities, a as BackupChainLocation, b as BackupRestorePlan, c as BackupSafeToDeleteOptions, d as backupPiecesSafeToDelete, p as planBackupRestore } from '../database-backup-C090lMHc.js';
2
+ import { I as SQLiteConnection, U as SynchronousLevel, S as SQLiteDriver, D as DatabaseOptions, V as LifecycleConfig, M as Migration, W as MigrationResult, X as RollbackResult } from '../types-DApb7dvw.js';
3
+ export { A as AfterQueryHook, Y as AppliedMigration, Z as AppliedMigrationEntry, g as BackupChain, h as BackupChainBase, i as BackupChainChange, j as BackupChainPosition, k as BackupChainRecord, m as BackupCycleError, n as BackupCycleOptions, o as BackupCycleStatus, B as BackupDestination, p as BackupFileReport, q as BackupGroupMembership, r as BackupGroupSource, s as BackupLogPosition, t as BackupNodePreference, u as BackupPiece, v as BackupProgress, f as BackupRunReport, O as BackupScheduleOptions, w as BackupSkip, x as BackupSkipReason, y as BackupToDestinationOptions, z as BackupVerifyResult, _ as BatchSummary, c as BeforeConnectHook, b as BeforeQueryHook, $ as BeforeSubscribeHook, a0 as CDCMetrics, a1 as ClusterReadEndpointInfo, H as ClusterStatusInfo, a2 as ConnectionHookContext, a3 as ConnectionMetrics, C as DEFAULT_CHAIN_NAME, e as DatabaseCloseHook, a4 as DatabaseCopyRequest, a5 as DatabaseCopyStep, d as DatabaseOpenHook, P as DriverCapabilities, a6 as DriverWorkerEntry, a7 as HookConfig, a8 as MIGRATION_NAME_RE, a9 as MetricsConfig, aa as MigrationBaseline, ab as MigrationSource, N as NodeHealth, ac as NodeHealthReason, ad as NodeHealthState, ae as OpenOptions, af as QueryHookContext, ag as QueryMetrics, ah as RunResult, ai as SQLiteStatement, a as SirannonOptions, T as Transaction, aj as WriterWorkerOptions, F as readBackupChains } from '../types-DApb7dvw.js';
4
+ import { B as BulkLoadDurability, a as BulkLoadResult } from '../server-options-DeK6ZG8u.js';
5
+ export { A as AuthenticateHook, b as BulkLoadOptions, C as ClientOptions, c as ClusterStatusAuthorizer, d as CorsOptions, R as ReplicationStatusInfo, e as RequestContext, f as ServerExecutionTarget, g as ServerExecutionTargetResolver, S as ServerOptions, W as WSHandlerOptions } from '../server-options-DeK6ZG8u.js';
6
+ export { C as ChangeTracker, a as ChangeTrackerOptions } from '../change-tracker-uG9gWvsY.js';
7
+ import { D as Database } from '../database-BlhUdJAO.js';
8
+ export { C as ConnectionPool, a as ConnectionPoolOptions, b as DatabaseBackups, c as DatabaseLifecycle, H as HookDispose, d as HookEvent, e as HookEventContextMap, f as HookHandler, g as HookRegistry, M as MetricsCollector, S as SubscribeHookContext, h as execute, i as executeBatch, q as query, j as queryOne } from '../database-BlhUdJAO.js';
9
9
  export { B as BackupError, C as CDCError, a as ConnectionPoolError, D as DatabaseAlreadyExistsError, b as DatabaseNotFoundError, E as ExtensionError, F as ForbiddenSqlError, H as HookDeniedError, M as MaxDatabasesError, c as MigrationError, Q as QueryError, R as ReadOnlyError, d as RequestDeniedError, S as SirannonError, T as TransactionError, W as WriteOverloadError } from '../errors-Dei4GdBb.js';
10
10
  export { a as LiveQuery, L as LiveQueryOptions, b as LiveQueryState, c as LiveUpdate, R as ResultOp } from '../types-BCejqzNA.js';
11
11
  import { B as BaselineFileOption } from '../baseline-D93hcIEE.js';
12
- export { S as Sirannon } from '../sirannon-DaGUawHs.js';
12
+ export { S as Sirannon } from '../sirannon-C9cTgFrw.js';
13
13
  export { C as ChangeEvent, b as ChangeOperation, E as ExecuteResult, P as Params, Q as QueryOptions, R as ReadConcern, a as ReadConcernLevel, S as Subscription, c as SubscriptionBuilder, W as WriteConcern, d as WriteConcernLevel } from '../query-types-Cv8N7pXj.js';
14
14
  export { D as DatabaseOperations, b as OperationArguments, O as OperationRef, a as OperationRegistry, c as OperationStatement, R as ReadOperation, W as WriteOperation, o as operationName, d as operationRef } from '../operation-registry-C1FmwQWR.js';
15
15
  import '../types-CjhxcjhA.js';