@delali/sirannon-db 0.2.3-next.38 → 0.3.0
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/dist/backup/index.d.ts +5 -5
- package/dist/backup/index.mjs +4 -4
- package/dist/backup-scheduler/index.d.ts +58 -8
- package/dist/backup-scheduler/index.mjs +3 -2
- package/dist/{change-tracker-BLKRX8ic.d.ts → change-tracker-uG9gWvsY.d.ts} +1 -1
- package/dist/chunk-2QCPVE67.mjs +143 -0
- package/dist/{chunk-P53I2G6J.mjs → chunk-63VBFSCS.mjs} +2 -2
- package/dist/{chunk-CR6HTXSC.mjs → chunk-7SC2TZAS.mjs} +1 -1
- package/dist/chunk-DVS4QSIZ.mjs +124 -0
- package/dist/{chunk-IPDHHIG2.mjs → chunk-DXXCLTFF.mjs} +205 -45
- package/dist/{chunk-G7AXGAEA.mjs → chunk-OJQHM4MT.mjs} +202 -100
- package/dist/{chunk-KSYFFYAP.mjs → chunk-U445A3C4.mjs} +1 -70
- package/dist/{chunk-GJ6SX53Z.mjs → chunk-W77EEVOT.mjs} +4 -120
- package/dist/client/index.d.ts +8 -8
- package/dist/client/topology.d.ts +4 -4
- package/dist/{client-base-DldBgJWS.d.ts → client-base-C-B8u5Lm.d.ts} +2 -2
- package/dist/core/index.d.ts +9 -9
- package/dist/core/index.mjs +14 -5
- package/dist/{database-DSbJl-k5.d.ts → database-BlhUdJAO.d.ts} +7 -6
- package/dist/{database-backup-CliAhaEm.d.ts → database-backup-C090lMHc.d.ts} +2 -2
- package/dist/driver/better-sqlite3.d.ts +1 -1
- package/dist/driver/better-sqlite3.mjs +7 -6
- package/dist/driver/bun.d.ts +1 -1
- package/dist/driver/expo.d.ts +1 -1
- package/dist/driver/node.d.ts +1 -1
- package/dist/driver/node.mjs +7 -6
- package/dist/driver/wa-sqlite.d.ts +1 -1
- package/dist/file-migrations/index.d.ts +1 -1
- package/dist/{protocol-BK0Yxu5P.d.ts → protocol-QekTGoKn.d.ts} +1 -1
- package/dist/replication/index.d.ts +7 -7
- package/dist/{restore-options-O5gYlr3n.d.ts → restore-options-C9MW9gpm.d.ts} +1 -1
- package/dist/server/index.d.ts +9 -9
- package/dist/server/index.mjs +5 -4
- package/dist/{server-options-CFgBQDLz.d.ts → server-options-DeK6ZG8u.d.ts} +1 -1
- package/dist/{sirannon-Bo0PX2Cj.d.ts → sirannon-C9cTgFrw.d.ts} +2 -2
- package/dist/transport/grpc.d.ts +3 -3
- package/dist/transport/memory.d.ts +3 -3
- package/dist/{types-CL8uxXIV.d.ts → types-C1yBGTdx.d.ts} +2 -2
- package/dist/{types-CopTgHG3.d.ts → types-DApb7dvw.d.ts} +151 -5
- package/package.json +8 -7
- package/dist/chunk-GBM4AU24.mjs +0 -42
package/dist/core/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { B as BackupCapabilities, a as BackupChainLocation, b as BackupRestorePlan, c as BackupSafeToDeleteOptions, d as backupPiecesSafeToDelete, p as planBackupRestore } from '../database-backup-
|
|
2
|
-
import {
|
|
3
|
-
export { A as AfterQueryHook,
|
|
4
|
-
import { B as BulkLoadDurability, a as BulkLoadResult } from '../server-options-
|
|
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-
|
|
6
|
-
export { C as ChangeTracker, a as ChangeTrackerOptions } from '../change-tracker-
|
|
7
|
-
import { D as Database } from '../database-
|
|
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-
|
|
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-
|
|
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';
|
package/dist/core/index.mjs
CHANGED
|
@@ -231,12 +231,13 @@ var DatabaseBackupController = class {
|
|
|
231
231
|
this.engine?.streamsToDestination() ?? false
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
backup(destPath) {
|
|
234
|
+
async backup(destPath) {
|
|
235
235
|
const engine = this.require();
|
|
236
|
-
|
|
236
|
+
const copy = await startCopyWithoutHoldingWriter(
|
|
237
237
|
this.runExclusive,
|
|
238
238
|
(onFirstStep) => engine.backup(this.acquireWriter(), destPath, onFirstStep)
|
|
239
239
|
);
|
|
240
|
+
return { ...copy, databaseId: this.databaseId, sourcePath: this.sourcePath };
|
|
240
241
|
}
|
|
241
242
|
backupTo(options) {
|
|
242
243
|
const engine = this.require();
|
|
@@ -252,7 +253,14 @@ var DatabaseBackupController = class {
|
|
|
252
253
|
}
|
|
253
254
|
schedule(options) {
|
|
254
255
|
const engine = this.require();
|
|
255
|
-
this.cancellers.push(
|
|
256
|
+
this.cancellers.push(
|
|
257
|
+
engine.schedule(this.acquireWriter(), {
|
|
258
|
+
...options,
|
|
259
|
+
databaseId: this.databaseId,
|
|
260
|
+
sourcePath: this.sourcePath,
|
|
261
|
+
runExclusive: this.runExclusive
|
|
262
|
+
})
|
|
263
|
+
);
|
|
256
264
|
}
|
|
257
265
|
/**
|
|
258
266
|
* Builds the cycle and starts it in the background. Its first turn copies the
|
|
@@ -2163,10 +2171,11 @@ var DatabaseBackups = class extends DatabaseLifecycle {
|
|
|
2163
2171
|
* runs in the gap between two steps rather than waiting for the whole copy.
|
|
2164
2172
|
*
|
|
2165
2173
|
* @param destPath - Path the copy is written to.
|
|
2174
|
+
* @returns The run identifier, the timings, the pages it moved, and the bytes the file holds.
|
|
2166
2175
|
*/
|
|
2167
2176
|
async backup(destPath) {
|
|
2168
2177
|
this.ensureOpen();
|
|
2169
|
-
|
|
2178
|
+
return this.runtime.backups.backup(destPath);
|
|
2170
2179
|
}
|
|
2171
2180
|
/**
|
|
2172
2181
|
* Copies this database to a destination you supply, in fixed-size pieces,
|
|
@@ -2200,7 +2209,7 @@ var DatabaseBackups = class extends DatabaseLifecycle {
|
|
|
2200
2209
|
/**
|
|
2201
2210
|
* Starts repeating backups on a cron schedule, keeping a bounded number of files.
|
|
2202
2211
|
*
|
|
2203
|
-
* @param options - Cron expression, destination directory, retention, time zone, and failure
|
|
2212
|
+
* @param options - Cron expression, destination directory, retention, and time zone, along with the callbacks Sirannon calls after each finished copy and after each failure.
|
|
2204
2213
|
*/
|
|
2205
2214
|
scheduleBackup(options) {
|
|
2206
2215
|
this.ensureOpen();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as DatabaseBackupController, B as BackupCapabilities, a as BackupChainLocation, b as BackupRestorePlan, c as BackupSafeToDeleteOptions } from './database-backup-
|
|
2
|
-
import { S as SQLiteDriver,
|
|
3
|
-
import { C as ChangeTracker } from './change-tracker-
|
|
1
|
+
import { D as DatabaseBackupController, B as BackupCapabilities, a as BackupChainLocation, b as BackupRestorePlan, c as BackupSafeToDeleteOptions } from './database-backup-C090lMHc.js';
|
|
2
|
+
import { S as SQLiteDriver, U as SynchronousLevel, ak as WorkerHostOptions, I as SQLiteConnection, T as Transaction, al as WriterContext, M as Migration, W as MigrationResult, X as RollbackResult, af as QueryHookContext, a2 as ConnectionHookContext, $ as BeforeSubscribeHook, a7 as HookConfig, a9 as MetricsConfig, ag as QueryMetrics, a3 as ConnectionMetrics, a0 as CDCMetrics, D as DatabaseOptions, p as BackupFileReport, y as BackupToDestinationOptions, f as BackupRunReport, O as BackupScheduleOptions, g as BackupChain, o as BackupCycleStatus, z as BackupVerifyResult, k as BackupChainRecord, b as BeforeQueryHook, A as AfterQueryHook } from './types-DApb7dvw.js';
|
|
3
|
+
import { C as ChangeTracker } from './change-tracker-uG9gWvsY.js';
|
|
4
4
|
import { C as ChangeEvent, S as Subscription, c as SubscriptionBuilder, P as Params, Q as QueryOptions, E as ExecuteResult } from './query-types-Cv8N7pXj.js';
|
|
5
5
|
import { H as HLCTimestamp, c as ReplicationChange, C as ConflictResolver, A as ApplyResult, R as ReplicationBatch } from './types-CjhxcjhA.js';
|
|
6
|
-
import { h as AppliedMigrationRow, b as BulkLoadOptions, a as BulkLoadResult } from './server-options-
|
|
6
|
+
import { h as AppliedMigrationRow, b as BulkLoadOptions, a as BulkLoadResult } from './server-options-DeK6ZG8u.js';
|
|
7
7
|
import { L as LiveQueryOptions, a as LiveQuery } from './types-BCejqzNA.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -612,8 +612,9 @@ declare class DatabaseBackups extends DatabaseLifecycle {
|
|
|
612
612
|
* runs in the gap between two steps rather than waiting for the whole copy.
|
|
613
613
|
*
|
|
614
614
|
* @param destPath - Path the copy is written to.
|
|
615
|
+
* @returns The run identifier, the timings, the pages it moved, and the bytes the file holds.
|
|
615
616
|
*/
|
|
616
|
-
backup(destPath: string): Promise<
|
|
617
|
+
backup(destPath: string): Promise<BackupFileReport>;
|
|
617
618
|
/**
|
|
618
619
|
* Copies this database to a destination you supply, in fixed-size pieces,
|
|
619
620
|
* while it stays open for reads and writes.
|
|
@@ -641,7 +642,7 @@ declare class DatabaseBackups extends DatabaseLifecycle {
|
|
|
641
642
|
/**
|
|
642
643
|
* Starts repeating backups on a cron schedule, keeping a bounded number of files.
|
|
643
644
|
*
|
|
644
|
-
* @param options - Cron expression, destination directory, retention, time zone, and failure
|
|
645
|
+
* @param options - Cron expression, destination directory, retention, and time zone, along with the callbacks Sirannon calls after each finished copy and after each failure.
|
|
645
646
|
*/
|
|
646
647
|
scheduleBackup(options: BackupScheduleOptions): void;
|
|
647
648
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as BackupChainBase, i as BackupChainChange, g as BackupChain, k as BackupChainRecord, B as BackupDestination,
|
|
1
|
+
import { h as BackupChainBase, i as BackupChainChange, g as BackupChain, k as BackupChainRecord, B as BackupDestination, I as SQLiteConnection, P as DriverCapabilities, Q as BackupEngine, p as BackupFileReport, y as BackupToDestinationOptions, f as BackupRunReport, O as BackupScheduleOptions, n as BackupCycleOptions, o as BackupCycleStatus, z as BackupVerifyResult } from './types-DApb7dvw.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* What one runtime supports of the backup operations, so a caller learns
|
|
@@ -117,7 +117,7 @@ declare class DatabaseBackupController {
|
|
|
117
117
|
private require;
|
|
118
118
|
private requireCycle;
|
|
119
119
|
capabilities(): BackupCapabilities;
|
|
120
|
-
backup(destPath: string): Promise<
|
|
120
|
+
backup(destPath: string): Promise<BackupFileReport>;
|
|
121
121
|
backupTo(options: BackupToDestinationOptions): Promise<BackupRunReport>;
|
|
122
122
|
schedule(options: BackupScheduleOptions): void;
|
|
123
123
|
/**
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { nodeResolveExtensionPath, nodeWriterContext, nodeBackupEngine, nodeStreamingSupport, WriterWorker, createStatementCache, loadThroughRuntime, narrowSafeBigInt, narrowRowIntegers, narrowRowsIntegers } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { nodeResolveExtensionPath, nodeWriterContext, nodeBackupEngine, nodeStreamingSupport, WriterWorker, createStatementCache, loadThroughRuntime, narrowSafeBigInt, narrowRowIntegers, narrowRowsIntegers } from '../chunk-OJQHM4MT.mjs';
|
|
2
|
+
import '../chunk-7SC2TZAS.mjs';
|
|
3
|
+
import '../chunk-DXXCLTFF.mjs';
|
|
4
4
|
import { defineDriver } from '../chunk-LXCGPZPA.mjs';
|
|
5
5
|
import '../chunk-W67A4H2E.mjs';
|
|
6
6
|
import '../chunk-YLAVDZCS.mjs';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-W77EEVOT.mjs';
|
|
8
|
+
import '../chunk-U445A3C4.mjs';
|
|
9
|
+
import '../chunk-2QCPVE67.mjs';
|
|
10
|
+
import '../chunk-DVS4QSIZ.mjs';
|
|
10
11
|
import { synchronousPragmaValue } from '../chunk-OUSWVNWT.mjs';
|
|
11
12
|
import '../chunk-YVF2ZJTE.mjs';
|
|
12
13
|
import '../chunk-V5FUJEYY.mjs';
|
package/dist/driver/bun.d.ts
CHANGED
package/dist/driver/expo.d.ts
CHANGED
package/dist/driver/node.d.ts
CHANGED
package/dist/driver/node.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { nodeResolveExtensionPath, nodeWriterContext, createStatementCache, nodeBackupEngine, nodeStreamingSupport, WriterWorker, loadThroughRuntime, narrowSafeBigInt, narrowRowIntegers, narrowRowsIntegers } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { nodeResolveExtensionPath, nodeWriterContext, createStatementCache, nodeBackupEngine, nodeStreamingSupport, WriterWorker, loadThroughRuntime, narrowSafeBigInt, narrowRowIntegers, narrowRowsIntegers } from '../chunk-OJQHM4MT.mjs';
|
|
2
|
+
import '../chunk-7SC2TZAS.mjs';
|
|
3
|
+
import '../chunk-DXXCLTFF.mjs';
|
|
4
4
|
import { defineDriver } from '../chunk-LXCGPZPA.mjs';
|
|
5
5
|
import '../chunk-W67A4H2E.mjs';
|
|
6
6
|
import '../chunk-YLAVDZCS.mjs';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-W77EEVOT.mjs';
|
|
8
|
+
import '../chunk-U445A3C4.mjs';
|
|
9
|
+
import '../chunk-2QCPVE67.mjs';
|
|
10
|
+
import '../chunk-DVS4QSIZ.mjs';
|
|
10
11
|
import { synchronousPragmaValue } from '../chunk-OUSWVNWT.mjs';
|
|
11
12
|
import '../chunk-YVF2ZJTE.mjs';
|
|
12
13
|
import '../chunk-V5FUJEYY.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { W as WriteConcern, R as ReadConcern, E as ExecuteResult } from './query-types-Cv8N7pXj.js';
|
|
2
|
-
import { B as BulkLoadDurability, a as BulkLoadResult } from './server-options-
|
|
2
|
+
import { B as BulkLoadDurability, a as BulkLoadResult } from './server-options-DeK6ZG8u.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Body of `POST /db/{id}/query`.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export { F as FieldMergeResolver, L as LWWResolver, P as PrimaryWinsResolver } from '../primary-wins-B0np8JS3.js';
|
|
2
|
-
import { l as HLC, D as Database } from '../database-
|
|
3
|
-
import {
|
|
2
|
+
import { l as HLC, D as Database } from '../database-BlhUdJAO.js';
|
|
3
|
+
import { r as BackupGroupSource, a1 as ClusterReadEndpointInfo, H as ClusterStatusInfo, I as SQLiteConnection, T as Transaction } from '../types-DApb7dvw.js';
|
|
4
4
|
import { C as ClusterCoordinator, c as ReplicationGroupState, e as CoordinatorWatchDisposer } from '../types-CMBcFPhb.js';
|
|
5
5
|
export { A as AcquireControllerLeaseInput, a as AcquireControllerLeaseResult, h as AdmitNodeToInSyncSetInput, f as CompareAndAdvancePrimaryTermInput, g as CompareAndAdvancePrimaryTermResult, j as CoordinatorCompatibilityMetadata, k as CoordinatorLease, b as CoordinatorNodeSession, l as CoordinatorPrimary, P as PromoteEligibleReplicaInput, R as RegisterNodeSessionInput, d as ReplicationGroupWatcher, S as SetReplicationGroupStateInput, U as UpdateInSyncSetInput, i as UpdateNodeMaintenanceInput } from '../types-CMBcFPhb.js';
|
|
6
|
-
import { R as ReplicationStatusInfo } from '../server-options-
|
|
7
|
-
import { C as CoordinatorRuntimeStatus, g as ReplicationStatus, h as SyncPhase, I as InFlightBatch, P as PeerState, a as ForwardedTransactionResult, b as SyncBatch, c as SyncComplete, d as SyncAck, S as SyncRequest, i as ReplicationConfig, j as SyncState, k as ReplicationErrorEvent, R as ReplicationAck, l as Topology, f as TopologyRole } from '../types-
|
|
8
|
-
export { F as ForwardedTransaction, N as NodeInfo, e as ReplicationTransport, T as TransportConfig } from '../types-
|
|
6
|
+
import { R as ReplicationStatusInfo } from '../server-options-DeK6ZG8u.js';
|
|
7
|
+
import { C as CoordinatorRuntimeStatus, g as ReplicationStatus, h as SyncPhase, I as InFlightBatch, P as PeerState, a as ForwardedTransactionResult, b as SyncBatch, c as SyncComplete, d as SyncAck, S as SyncRequest, i as ReplicationConfig, j as SyncState, k as ReplicationErrorEvent, R as ReplicationAck, l as Topology, f as TopologyRole } from '../types-C1yBGTdx.js';
|
|
8
|
+
export { F as ForwardedTransaction, N as NodeInfo, e as ReplicationTransport, T as TransportConfig } from '../types-C1yBGTdx.js';
|
|
9
9
|
import { EventEmitter } from 'node:events';
|
|
10
|
-
import { C as ChangeTracker } from '../change-tracker-
|
|
10
|
+
import { C as ChangeTracker } from '../change-tracker-uG9gWvsY.js';
|
|
11
11
|
import { P as Params, Q as QueryOptions, E as ExecuteResult } from '../query-types-Cv8N7pXj.js';
|
|
12
12
|
import { R as ReplicationBatch, C as ConflictResolver, A as ApplyResult, S as SyncTableManifest } from '../types-CjhxcjhA.js';
|
|
13
13
|
export { a as ConflictContext, b as ConflictResolution, H as HLCTimestamp, c as ReplicationChange } from '../types-CjhxcjhA.js';
|
|
14
14
|
import { S as SirannonError } from '../errors-Dei4GdBb.js';
|
|
15
|
-
import '../database-backup-
|
|
15
|
+
import '../database-backup-C090lMHc.js';
|
|
16
16
|
import '../types-BCejqzNA.js';
|
|
17
17
|
import '../operation-registry-C1FmwQWR.js';
|
|
18
18
|
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { g as BackupChain, k as BackupChainRecord, o as BackupCycleStatus,
|
|
2
|
-
import { b as BackupRestoreProgress, a as BackupRestoreReport } from '../restore-options-
|
|
3
|
-
import { a as TransactionStatement, Q as QueryResponse, E as ExecuteResponse, T as TransactionResponse, B as BatchResponse, L as LoadResponse, A as AckResponse } from '../protocol-
|
|
4
|
-
export { b as BatchRequest, c as ErrorResponse, d as ExecuteRequest, e as LoadRequest, f as QueryRequest, g as TransactionRequest, t as toExecuteResponse } from '../protocol-
|
|
5
|
-
import { S as Sirannon } from '../sirannon-
|
|
6
|
-
import { B as BulkLoadDurability, S as ServerOptions, W as WSHandlerOptions } from '../server-options-
|
|
1
|
+
import { g as BackupChain, k as BackupChainRecord, o as BackupCycleStatus, z as BackupVerifyResult } from '../types-DApb7dvw.js';
|
|
2
|
+
import { b as BackupRestoreProgress, a as BackupRestoreReport } from '../restore-options-C9MW9gpm.js';
|
|
3
|
+
import { a as TransactionStatement, Q as QueryResponse, E as ExecuteResponse, T as TransactionResponse, B as BatchResponse, L as LoadResponse, A as AckResponse } from '../protocol-QekTGoKn.js';
|
|
4
|
+
export { b as BatchRequest, c as ErrorResponse, d as ExecuteRequest, e as LoadRequest, f as QueryRequest, g as TransactionRequest, t as toExecuteResponse } from '../protocol-QekTGoKn.js';
|
|
5
|
+
import { S as Sirannon } from '../sirannon-C9cTgFrw.js';
|
|
6
|
+
import { B as BulkLoadDurability, S as ServerOptions, W as WSHandlerOptions } from '../server-options-DeK6ZG8u.js';
|
|
7
7
|
import { W as WriteConcern, R as ReadConcern } from '../query-types-Cv8N7pXj.js';
|
|
8
|
-
import '../database-
|
|
9
|
-
import '../database-backup-
|
|
10
|
-
import '../change-tracker-
|
|
8
|
+
import '../database-BlhUdJAO.js';
|
|
9
|
+
import '../database-backup-C090lMHc.js';
|
|
10
|
+
import '../change-tracker-uG9gWvsY.js';
|
|
11
11
|
import '../types-CjhxcjhA.js';
|
|
12
12
|
import '../types-BCejqzNA.js';
|
|
13
13
|
import '../operation-registry-C1FmwQWR.js';
|
package/dist/server/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { restoreBackup, MAX_RESTORE_BATCH_SIZE } from '../chunk-
|
|
1
|
+
import { restoreBackup, MAX_RESTORE_BATCH_SIZE } from '../chunk-63VBFSCS.mjs';
|
|
2
2
|
import { dumpSchema, tablesInFkOrder, dumpTablePages } from '../chunk-XF2HH5E6.mjs';
|
|
3
3
|
import { ChangeTracker, SubscriptionManager, ensureCdcEpoch, migrationChecksum, needsResync, filteredChange, TransactionGrouper, isBulkLoadDurability, PrimedSubscription } from '../chunk-ECEGYTVF.mjs';
|
|
4
4
|
import '../chunk-YNTDOFTN.mjs';
|
|
@@ -7,9 +7,10 @@ import '../chunk-2QLXDHAP.mjs';
|
|
|
7
7
|
import { encodeTaggedValues, MIGRATIONS_TABLE, decodeTaggedValues, encodeWireRowsInPlace, CHANGES_TABLE, DEVICE_CURSORS_TABLE, INTERNAL_TABLE_PREFIX } from '../chunk-7R4ER4FB.mjs';
|
|
8
8
|
import { createOperationSource, operationRegistryDigest, findRead, isRefusal, resolveArguments, findWrite } from '../chunk-TUD5CJ76.mjs';
|
|
9
9
|
import '../chunk-GVCNMPOS.mjs';
|
|
10
|
-
import { discardStagedChain } from '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
10
|
+
import { discardStagedChain } from '../chunk-W77EEVOT.mjs';
|
|
11
|
+
import '../chunk-U445A3C4.mjs';
|
|
12
|
+
import '../chunk-2QCPVE67.mjs';
|
|
13
|
+
import '../chunk-DVS4QSIZ.mjs';
|
|
13
14
|
import '../chunk-OUSWVNWT.mjs';
|
|
14
15
|
import '../chunk-YVF2ZJTE.mjs';
|
|
15
16
|
import '../chunk-V5FUJEYY.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as OperationRegistry } from './operation-registry-C1FmwQWR.js';
|
|
2
2
|
import { R as ReplicationBatch, C as ConflictResolver, A as ApplyResult } from './types-CjhxcjhA.js';
|
|
3
|
-
import { N as NodeHealth, T as Transaction,
|
|
3
|
+
import { N as NodeHealth, T as Transaction, H as ClusterStatusInfo } from './types-DApb7dvw.js';
|
|
4
4
|
import { P as Params, Q as QueryOptions, E as ExecuteResult } from './query-types-Cv8N7pXj.js';
|
|
5
5
|
|
|
6
6
|
interface AppliedMigrationRow {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as Database } from './database-
|
|
2
|
-
import { a as SirannonOptions, S as SQLiteDriver, D as DatabaseOptions, M as Migration, b as BeforeQueryHook, A as AfterQueryHook, c as BeforeConnectHook, d as DatabaseOpenHook, e as DatabaseCloseHook } from './types-
|
|
1
|
+
import { D as Database } from './database-BlhUdJAO.js';
|
|
2
|
+
import { a as SirannonOptions, S as SQLiteDriver, D as DatabaseOptions, M as Migration, b as BeforeQueryHook, A as AfterQueryHook, c as BeforeConnectHook, d as DatabaseOpenHook, e as DatabaseCloseHook } from './types-DApb7dvw.js';
|
|
3
3
|
|
|
4
4
|
/** What one database taken out of service produced.
|
|
5
5
|
* @internal
|
package/dist/transport/grpc.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
2
|
import { Client, ClientDuplexStream, CallOptions, Metadata, ServiceError, ClientUnaryCall, ChannelCredentials, ClientOptions, ServerDuplexStream, Server } from '@grpc/grpc-js';
|
|
3
3
|
import { HealthImplementation } from 'grpc-health-check';
|
|
4
|
-
import { R as ReplicationAck, F as ForwardedTransaction, a as ForwardedTransactionResult, N as NodeInfo, S as SyncRequest, b as SyncBatch, c as SyncComplete, d as SyncAck, e as ReplicationTransport, f as TopologyRole, T as TransportConfig } from '../types-
|
|
4
|
+
import { R as ReplicationAck, F as ForwardedTransaction, a as ForwardedTransactionResult, N as NodeInfo, S as SyncRequest, b as SyncBatch, c as SyncComplete, d as SyncAck, e as ReplicationTransport, f as TopologyRole, T as TransportConfig } from '../types-C1yBGTdx.js';
|
|
5
5
|
import { R as ReplicationBatch } from '../types-CjhxcjhA.js';
|
|
6
|
-
import '../change-tracker-
|
|
7
|
-
import '../types-
|
|
6
|
+
import '../change-tracker-uG9gWvsY.js';
|
|
7
|
+
import '../types-DApb7dvw.js';
|
|
8
8
|
import '../query-types-Cv8N7pXj.js';
|
|
9
9
|
import '../types-CMBcFPhb.js';
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as ReplicationAck, F as ForwardedTransaction, a as ForwardedTransactionResult, S as SyncRequest, b as SyncBatch, c as SyncComplete, d as SyncAck, N as NodeInfo, e as ReplicationTransport, T as TransportConfig } from '../types-
|
|
1
|
+
import { R as ReplicationAck, F as ForwardedTransaction, a as ForwardedTransactionResult, S as SyncRequest, b as SyncBatch, c as SyncComplete, d as SyncAck, N as NodeInfo, e as ReplicationTransport, T as TransportConfig } from '../types-C1yBGTdx.js';
|
|
2
2
|
import { R as ReplicationBatch } from '../types-CjhxcjhA.js';
|
|
3
|
-
import '../change-tracker-
|
|
4
|
-
import '../types-
|
|
3
|
+
import '../change-tracker-uG9gWvsY.js';
|
|
4
|
+
import '../types-DApb7dvw.js';
|
|
5
5
|
import '../query-types-Cv8N7pXj.js';
|
|
6
6
|
import '../types-CMBcFPhb.js';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChangeTracker } from './change-tracker-
|
|
2
|
-
import {
|
|
1
|
+
import { C as ChangeTracker } from './change-tracker-uG9gWvsY.js';
|
|
2
|
+
import { I as SQLiteConnection, N as NodeHealth } from './types-DApb7dvw.js';
|
|
3
3
|
import { S as SyncTableManifest, R as ReplicationBatch, C as ConflictResolver } from './types-CjhxcjhA.js';
|
|
4
4
|
import { C as ClusterCoordinator, j as CoordinatorCompatibilityMetadata, c as ReplicationGroupState } from './types-CMBcFPhb.js';
|
|
5
5
|
|
|
@@ -247,6 +247,32 @@ interface BackupSkip {
|
|
|
247
247
|
uncapturedLogBytes?: number;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Where a database's write-ahead log had reached at one moment.
|
|
252
|
+
*
|
|
253
|
+
* A full copy states this, so you can tell which run of the log the database
|
|
254
|
+
* was on when that copy finished. SQLite stamps a fresh pair of salts on the
|
|
255
|
+
* log at every restart, and a checkpoint that empties the log restarts it.
|
|
256
|
+
*
|
|
257
|
+
* The checkpoint cycle checkpoints after each capture, and no checkpoint falls
|
|
258
|
+
* between a full copy and the first change piece extending its chain, so those
|
|
259
|
+
* two state the same salts. A change piece states later salts than the piece
|
|
260
|
+
* before it whenever the checkpoint between the two emptied the log. A reader
|
|
261
|
+
* can hold a checkpoint off, which leaves the log on the run it was already on,
|
|
262
|
+
* so two consecutive change pieces may state the same salts.
|
|
263
|
+
*
|
|
264
|
+
* @public
|
|
265
|
+
*/
|
|
266
|
+
interface BackupLogPosition {
|
|
267
|
+
/** Checkpoint sequence of the log. SQLite adds one to it at every restart of the log. */
|
|
268
|
+
logSequence: number;
|
|
269
|
+
/** First salt of that log. The two salts together tell one run of the log from the next. */
|
|
270
|
+
salt1: number;
|
|
271
|
+
/** Second salt of it. */
|
|
272
|
+
salt2: number;
|
|
273
|
+
/** The last frame that commits a transaction, counted from one. A log holding none reports zero. */
|
|
274
|
+
lastFrame: number;
|
|
275
|
+
}
|
|
250
276
|
/** How far one backup run has moved, reported at step resolution.
|
|
251
277
|
* @public
|
|
252
278
|
*/
|
|
@@ -312,9 +338,52 @@ interface BackupRunReport {
|
|
|
312
338
|
restarts: number;
|
|
313
339
|
/** The stretch of log a change piece covers. A full copy has none. */
|
|
314
340
|
position?: BackupChainPosition;
|
|
341
|
+
/**
|
|
342
|
+
* Where the write-ahead log had reached when a full copy finished. Sirannon
|
|
343
|
+
* reads the log after the copy has moved every page, so a writer committing
|
|
344
|
+
* between those two steps would put a frame here that the copy does not hold.
|
|
345
|
+
* A change piece states the stretch of log it holds in
|
|
346
|
+
* {@link BackupRunReport.position}, and a database that keeps no write-ahead
|
|
347
|
+
* log states neither.
|
|
348
|
+
*/
|
|
349
|
+
logPosition?: BackupLogPosition;
|
|
315
350
|
/** SHA-256 of the copied file, unless the caller turned it off. */
|
|
316
351
|
fingerprint?: string;
|
|
317
352
|
}
|
|
353
|
+
/** What one finished copy to a local file produced.
|
|
354
|
+
* @public
|
|
355
|
+
*/
|
|
356
|
+
interface BackupFileReport {
|
|
357
|
+
/** Identifier this run is known by. */
|
|
358
|
+
runId: string;
|
|
359
|
+
/** Database the copy was taken from. */
|
|
360
|
+
databaseId: string;
|
|
361
|
+
/** File the copy was taken from. */
|
|
362
|
+
sourcePath: string;
|
|
363
|
+
/** Absolute path of the file the copy was written to. */
|
|
364
|
+
destPath: string;
|
|
365
|
+
/** Epoch milliseconds the copy started at. */
|
|
366
|
+
startedAt: number;
|
|
367
|
+
/** Epoch milliseconds it finished at. */
|
|
368
|
+
finishedAt: number;
|
|
369
|
+
/** Milliseconds it took. */
|
|
370
|
+
durationMs: number;
|
|
371
|
+
/** Pages it moved. */
|
|
372
|
+
pageCount: number;
|
|
373
|
+
/** Bytes one page holds. */
|
|
374
|
+
pageSize: number;
|
|
375
|
+
/** Bytes the file it wrote holds. */
|
|
376
|
+
byteLength: number;
|
|
377
|
+
/** Times the copy returned to page one. */
|
|
378
|
+
restarts: number;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* What one copy to a local file produced. The controller that owns the database
|
|
382
|
+
* adds its identifier and its path to build a {@link BackupFileReport}.
|
|
383
|
+
*
|
|
384
|
+
* @internal
|
|
385
|
+
*/
|
|
386
|
+
type BackupFileCopy = Omit<BackupFileReport, 'databaseId' | 'sourcePath'>;
|
|
318
387
|
/** How Sirannon runs one backup to a caller-supplied destination.
|
|
319
388
|
* @public
|
|
320
389
|
*/
|
|
@@ -486,6 +555,17 @@ interface BackupCycleError {
|
|
|
486
555
|
message: string;
|
|
487
556
|
/** Epoch milliseconds the cycle raised it. */
|
|
488
557
|
at: number;
|
|
558
|
+
/** Milliseconds from the start of the turn to the failure. */
|
|
559
|
+
durationMs: number;
|
|
560
|
+
/** The chain the cycle was extending, where it held one. */
|
|
561
|
+
chainId?: string;
|
|
562
|
+
/**
|
|
563
|
+
* How far the run had got when it failed. A turn that fails before its copy
|
|
564
|
+
* begins states none. A turn that fails part-way through states the run
|
|
565
|
+
* identifier, the pages it still had to move, and the pieces and bytes that
|
|
566
|
+
* had already reached the destination.
|
|
567
|
+
*/
|
|
568
|
+
progress?: BackupProgress;
|
|
489
569
|
}
|
|
490
570
|
/** What the cycle is doing now, and what its recent turns produced.
|
|
491
571
|
* @public
|
|
@@ -580,7 +660,7 @@ declare class BackupCycle {
|
|
|
580
660
|
private sendRefused;
|
|
581
661
|
private stopped;
|
|
582
662
|
private readonly request;
|
|
583
|
-
private readonly
|
|
663
|
+
private readonly turnLog;
|
|
584
664
|
/** @internal */
|
|
585
665
|
constructor(request: BackupCycleRequest);
|
|
586
666
|
/**
|
|
@@ -636,6 +716,14 @@ declare class BackupCycle {
|
|
|
636
716
|
* @returns The pieces read, the bytes they add up to, and the digest where the backup recorded one.
|
|
637
717
|
*/
|
|
638
718
|
verify(name: string): Promise<BackupVerifyResult>;
|
|
719
|
+
/**
|
|
720
|
+
* Runs one turn and passes whatever broke it to the operator. A deeper step
|
|
721
|
+
* announces some failures itself and then raises them, so this announces a
|
|
722
|
+
* failure only where no step has announced it already. The operator therefore
|
|
723
|
+
* hears each failure exactly once. Sirannon empties a log the turn has
|
|
724
|
+
* outgrown once all of that is done, and the report of writes reaching no
|
|
725
|
+
* backup replaces whatever failure the turn recorded.
|
|
726
|
+
*/
|
|
639
727
|
private runTurn;
|
|
640
728
|
/** What the stand-down path needs of this cycle to let go of its chain. */
|
|
641
729
|
private get standDownRequest();
|
|
@@ -648,7 +736,7 @@ declare class BackupCycle {
|
|
|
648
736
|
* it is, because the frames it has yet to capture are still in no backup.
|
|
649
737
|
*/
|
|
650
738
|
private takesTheTurn;
|
|
651
|
-
/** Passes a skipped turn on,
|
|
739
|
+
/** Passes a skipped turn on, where the cycle has a reason to give for it. */
|
|
652
740
|
private reportSkip;
|
|
653
741
|
private tick;
|
|
654
742
|
private verifyChain;
|
|
@@ -657,10 +745,22 @@ declare class BackupCycle {
|
|
|
657
745
|
* Runs one turn. A log that restarted before the capture reached it leaves a
|
|
658
746
|
* chain nothing can extend, so this starts a fresh one. The caller still gets
|
|
659
747
|
* the error: those writes are in no backup, and an operator has to hear that.
|
|
748
|
+
* Where the replacement chain also fails to start, Sirannon records that
|
|
749
|
+
* second failure against the chain the restart broke, because the cycle holds
|
|
750
|
+
* no chain of its own by then and an operator reading the status has to know
|
|
751
|
+
* which one they have lost.
|
|
660
752
|
*/
|
|
661
753
|
private turnOrStartOver;
|
|
662
754
|
private turn;
|
|
755
|
+
/**
|
|
756
|
+
* Passes a failure to the operator and records it as the turn's outcome.
|
|
757
|
+
*
|
|
758
|
+
* @param err - What the turn failed with.
|
|
759
|
+
* @param chainId - The chain to record it against, which defaults to the one the cycle holds now.
|
|
760
|
+
*/
|
|
663
761
|
private report;
|
|
762
|
+
/** Records a failure against a chain the cycle may already have let go of. */
|
|
763
|
+
private reportAgainstChain;
|
|
664
764
|
private replaceChain;
|
|
665
765
|
private captureAndCheckpoint;
|
|
666
766
|
/**
|
|
@@ -1071,10 +1171,56 @@ interface BackupScheduleOptions {
|
|
|
1071
1171
|
* When omitted, it uses the host's local time zone, which also sets the daylight saving rules that apply.
|
|
1072
1172
|
*/
|
|
1073
1173
|
timezone?: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* Called after every copy the schedule finishes, with the file it wrote and
|
|
1176
|
+
* what that copy moved. Use it to send the file somewhere durable, or to
|
|
1177
|
+
* record that the schedule is still running.
|
|
1178
|
+
*
|
|
1179
|
+
* Sirannon waits for the promise this returns, and it clears the older files
|
|
1180
|
+
* only once that promise settles, so it deletes no copy your upload is still
|
|
1181
|
+
* reading. Sirannon passes a failure to
|
|
1182
|
+
* {@link BackupScheduleOptions.onError}, which is where it reports a failed
|
|
1183
|
+
* copy as well. The deadline in
|
|
1184
|
+
* {@link BackupScheduleOptions.onBackupTimeoutMs} bounds that wait.
|
|
1185
|
+
*/
|
|
1186
|
+
onBackup?: (report: BackupFileReport) => void | Promise<void>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Milliseconds {@link BackupScheduleOptions.onBackup} may take before
|
|
1189
|
+
* Sirannon gives up waiting on it. It defaults to ten minutes, and zero
|
|
1190
|
+
* leaves the wait unbounded.
|
|
1191
|
+
*
|
|
1192
|
+
* Sirannon clears the older files and takes the next copy once this callback
|
|
1193
|
+
* settles or this deadline passes. Without a deadline, a callback left waiting
|
|
1194
|
+
* on a socket would hold the schedule still for good. Past the deadline
|
|
1195
|
+
* Sirannon reports the timeout through
|
|
1196
|
+
* {@link BackupScheduleOptions.onError} and goes on with the schedule. Your
|
|
1197
|
+
* callback keeps running while Sirannon counts that copy among the files it
|
|
1198
|
+
* may delete, so set this longer than your slowest upload takes.
|
|
1199
|
+
*/
|
|
1200
|
+
onBackupTimeoutMs?: number;
|
|
1074
1201
|
/** Called when a scheduled backup fails. Without this, errors are silently discarded. */
|
|
1075
1202
|
onError?: (error: Error) => void;
|
|
1076
1203
|
}
|
|
1077
1204
|
|
|
1205
|
+
/** Runs a backup while nothing else holds the writer, so that the copy never shares the writer connection with another write.
|
|
1206
|
+
* @public
|
|
1207
|
+
*/
|
|
1208
|
+
type RunExclusive = (op: () => Promise<void>) => Promise<void>;
|
|
1209
|
+
/**
|
|
1210
|
+
* What one repeating backup needs beyond the caller's own options, so that
|
|
1211
|
+
* every report it produces names the database the copy came from.
|
|
1212
|
+
*
|
|
1213
|
+
* @public
|
|
1214
|
+
*/
|
|
1215
|
+
interface BackupScheduleRequest extends BackupScheduleOptions {
|
|
1216
|
+
/** Database the copies are taken from. Defaults to the name of the file SQLite has open. */
|
|
1217
|
+
databaseId?: string;
|
|
1218
|
+
/** File the copies are taken from. Defaults to the file SQLite has open on the connection. */
|
|
1219
|
+
sourcePath?: string;
|
|
1220
|
+
/** Runs each copy with nothing else holding the writer. Defaults to running it with no lock of its own. */
|
|
1221
|
+
runExclusive?: RunExclusive;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1078
1224
|
interface WorkerHostOptions {
|
|
1079
1225
|
writeTimeoutMs?: number;
|
|
1080
1226
|
maxRestarts?: number;
|
|
@@ -1110,7 +1256,7 @@ interface WriterContext {
|
|
|
1110
1256
|
*/
|
|
1111
1257
|
interface BackupEngine {
|
|
1112
1258
|
/** Copies the database behind a connection to a destination path. */
|
|
1113
|
-
backup(conn: SQLiteConnection, destPath: string, onFirstStep?: () => void): Promise<
|
|
1259
|
+
backup(conn: SQLiteConnection, destPath: string, onFirstStep?: () => void): Promise<BackupFileCopy>;
|
|
1114
1260
|
/** Copies the database behind a connection to a caller-supplied destination. */
|
|
1115
1261
|
copyToDestination(conn: SQLiteConnection, request: BackupRunRequest): Promise<BackupRunReport>;
|
|
1116
1262
|
/** Reports whether a full copy reaches the destination without a local file. */
|
|
@@ -1118,7 +1264,7 @@ interface BackupEngine {
|
|
|
1118
1264
|
/** Builds the cycle that captures the write-ahead log and then checkpoints it. */
|
|
1119
1265
|
createCycle(request: BackupCycleRequest): BackupCycle;
|
|
1120
1266
|
/** Starts a repeating backup and returns a function that stops it. */
|
|
1121
|
-
schedule(conn: SQLiteConnection,
|
|
1267
|
+
schedule(conn: SQLiteConnection, request: BackupScheduleRequest): () => void;
|
|
1122
1268
|
}
|
|
1123
1269
|
/** What one step of a stepped database copy reported.
|
|
1124
1270
|
* @public
|
|
@@ -1342,4 +1488,4 @@ interface SQLiteDriver {
|
|
|
1342
1488
|
resolveExtensionPath?(extensionPath: string): string;
|
|
1343
1489
|
}
|
|
1344
1490
|
|
|
1345
|
-
export { type
|
|
1491
|
+
export { type BeforeSubscribeHook as $, type AfterQueryHook as A, type BackupDestination as B, DEFAULT_CHAIN_NAME as C, type DatabaseOptions as D, chainLogName as E, readBackupChains as F, verifyBackupRecord as G, type ClusterStatusInfo as H, type SQLiteConnection as I, type BackupFileCopy as J, type BackupRunRequest as K, type BackupScheduleRequest as L, type Migration as M, type NodeHealth as N, type BackupScheduleOptions as O, type DriverCapabilities as P, type BackupEngine as Q, type RunExclusive as R, type SQLiteDriver as S, Transaction as T, type SynchronousLevel as U, type LifecycleConfig as V, type MigrationResult as W, type RollbackResult as X, type AppliedMigration as Y, type AppliedMigrationEntry as Z, type BatchSummary as _, type SirannonOptions as a, type CDCMetrics as a0, type ClusterReadEndpointInfo as a1, type ConnectionHookContext as a2, type ConnectionMetrics as a3, type DatabaseCopyRequest as a4, type DatabaseCopyStep as a5, type DriverWorkerEntry as a6, type HookConfig as a7, MIGRATION_NAME_RE as a8, type MetricsConfig as a9, type MigrationBaseline as aa, type MigrationSource as ab, type NodeHealthReason as ac, type NodeHealthState as ad, type OpenOptions as ae, type QueryHookContext as af, type QueryMetrics as ag, type RunResult as ah, type SQLiteStatement as ai, type WriterWorkerOptions as aj, type WorkerHostOptions as ak, type WriterContext as al, type BeforeQueryHook as b, type BeforeConnectHook as c, type DatabaseOpenHook as d, type DatabaseCloseHook as e, type BackupRunReport as f, type BackupChain as g, type BackupChainBase as h, type BackupChainChange as i, type BackupChainPosition as j, type BackupChainRecord as k, BackupCycle as l, type BackupCycleError as m, type BackupCycleOptions as n, type BackupCycleStatus as o, type BackupFileReport as p, type BackupGroupMembership as q, type BackupGroupSource as r, type BackupLogPosition as s, type BackupNodePreference as t, type BackupPiece as u, type BackupProgress as v, type BackupSkip as w, type BackupSkipReason as x, type BackupToDestinationOptions as y, type BackupVerifyResult as z };
|