Skip to content

Commit

Permalink
Rename syncPeriod to syncInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
penberg committed Mar 6, 2024
1 parent b4b4540 commit 27353e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/libsql-client/src/sqlite3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions packages/libsql-core/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
8 changes: 4 additions & 4 deletions packages/libsql-core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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(
Expand All @@ -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,
Expand Down Expand Up @@ -122,7 +122,7 @@ export function expandConfig(config: Config, preferHttp: boolean): ExpandedConfi
authToken,
encryptionKey,
syncUrl,
syncPeriod,
syncInterval,
intMode,
fetch: config.fetch,
};
Expand Down

0 comments on commit 27353e6

Please sign in to comment.