diff --git a/packages/libsql-client/src/sqlite3.ts b/packages/libsql-client/src/sqlite3.ts index a8b6a69..f5d2393 100644 --- a/packages/libsql-client/src/sqlite3.ts +++ b/packages/libsql-client/src/sqlite3.ts @@ -52,7 +52,7 @@ export function _createClient(config: ExpandedConfig): Client { authToken: config.authToken, encryptionKey: config.encryptionKey, syncUrl: config.syncUrl, - syncPeriod: config.syncPeriod, + syncInterval: config.syncInterval, }; const db = new Database(path, options); diff --git a/packages/libsql-core/src/api.ts b/packages/libsql-core/src/api.ts index 610e1ae..1424bc7 100644 --- a/packages/libsql-core/src/api.ts +++ b/packages/libsql-core/src/api.ts @@ -18,8 +18,8 @@ export interface Config { /** URL of a remote server to synchronize database with. */ syncUrl?: string; - /** Sync period in seconds. */ - syncPeriod?: number; + /** Sync interval in seconds. */ + syncInterval?: number; /** Enables or disables TLS for `libsql:` URLs. * diff --git a/packages/libsql-core/src/config.ts b/packages/libsql-core/src/config.ts index ac170b8..a1d6374 100644 --- a/packages/libsql-core/src/config.ts +++ b/packages/libsql-core/src/config.ts @@ -12,7 +12,7 @@ export interface ExpandedConfig { authToken: string | undefined; encryptionKey: string | undefined; syncUrl: string | undefined; - syncPeriod: number | undefined; + syncInterval: number | undefined; intMode: IntMode; fetch: Function | undefined; } @@ -30,7 +30,7 @@ export function expandConfig(config: Config, preferHttp: boolean): ExpandedConfi let authToken = config.authToken; let encryptionKey = config.encryptionKey; let syncUrl = config.syncUrl; - let syncPeriod = config.syncPeriod; + let syncInterval = config.syncInterval; const intMode = ""+(config.intMode ?? "number"); if (intMode !== "number" && intMode !== "bigint" && intMode !== "string") { throw new TypeError( @@ -45,7 +45,7 @@ export function expandConfig(config: Config, preferHttp: boolean): ExpandedConfi path: ':memory:', scheme: 'file', syncUrl, - syncPeriod, + syncInterval, intMode, fetch: config.fetch, tls: false, @@ -122,7 +122,7 @@ export function expandConfig(config: Config, preferHttp: boolean): ExpandedConfi authToken, encryptionKey, syncUrl, - syncPeriod, + syncInterval, intMode, fetch: config.fetch, };