@litebackup/sdk 0.3.21 → 0.3.22
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/src/client.d.ts +2 -2
- package/dist/src/client.js +2 -2
- package/dist/src/generated/client.d.ts +3 -3
- package/dist/src/helpers.d.ts +1 -1
- package/dist/src/helpers.js +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.js +1 -1
- package/package.json +5 -5
package/dist/src/client.d.ts
CHANGED
|
@@ -132,11 +132,11 @@ export declare class Litebackup {
|
|
|
132
132
|
backup(source: BackupSource, options?: BackupOptions): Backup;
|
|
133
133
|
/**
|
|
134
134
|
* Runs a database on several identical machines: the first to take the
|
|
135
|
-
* write lock is the origin, the others keep live
|
|
135
|
+
* write lock is the origin, the others keep live readonly replicas at the
|
|
136
136
|
* same path and take over when the origin's lease runs out.
|
|
137
137
|
*/
|
|
138
138
|
failover(path: string, options?: FailoverOptions): Promise<Failover>;
|
|
139
|
-
/** Keeps a live
|
|
139
|
+
/** Keeps a live readonly replica of a database and resolves once its first version is local. */
|
|
140
140
|
replicate(name: string, options?: ReplicateOptions): Promise<DatabaseStatus>;
|
|
141
141
|
/** Writes a version of a database to a new file and checks it. An existing file is never overwritten (exists). */
|
|
142
142
|
restore(name: string, options: RestoreOptions): Promise<RestoreResult>;
|
package/dist/src/client.js
CHANGED
|
@@ -111,13 +111,13 @@ export class Litebackup {
|
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Runs a database on several identical machines: the first to take the
|
|
114
|
-
* write lock is the origin, the others keep live
|
|
114
|
+
* write lock is the origin, the others keep live readonly replicas at the
|
|
115
115
|
* same path and take over when the origin's lease runs out.
|
|
116
116
|
*/
|
|
117
117
|
failover(path, options = {}) {
|
|
118
118
|
return Failover.start(this, path, options);
|
|
119
119
|
}
|
|
120
|
-
/** Keeps a live
|
|
120
|
+
/** Keeps a live readonly replica of a database and resolves once its first version is local. */
|
|
121
121
|
async replicate(name, options = {}) {
|
|
122
122
|
const body = { name };
|
|
123
123
|
if (options.to) {
|
|
@@ -233,7 +233,7 @@ export interface paths {
|
|
|
233
233
|
};
|
|
234
234
|
get?: never;
|
|
235
235
|
put?: never;
|
|
236
|
-
/** @description Run a database on several identical machines. The machine that holds the write lock is the origin and backs the file up; the others keep live
|
|
236
|
+
/** @description Run a database on several identical machines. The machine that holds the write lock is the origin and backs the file up; the others keep live readonly replicas at the same path. Each replica asks for the lock about once a second, so one of them takes over once the origin's lease runs out. */
|
|
237
237
|
post: operations["startFailover"];
|
|
238
238
|
delete?: never;
|
|
239
239
|
options?: never;
|
|
@@ -250,7 +250,7 @@ export interface paths {
|
|
|
250
250
|
};
|
|
251
251
|
get?: never;
|
|
252
252
|
put?: never;
|
|
253
|
-
/** @description Keep a live
|
|
253
|
+
/** @description Keep a live readonly replica of a database, or of every database under a prefix, that streams from the server. A single replica returns once its first version is local. */
|
|
254
254
|
post: operations["startReplica"];
|
|
255
255
|
delete?: never;
|
|
256
256
|
options?: never;
|
|
@@ -375,7 +375,7 @@ export interface components {
|
|
|
375
375
|
name: string;
|
|
376
376
|
path: string;
|
|
377
377
|
/**
|
|
378
|
-
* @description origin when this machine writes the database and backs it up; replica for a live
|
|
378
|
+
* @description origin when this machine writes the database and backs it up; replica for a live readonly copy
|
|
379
379
|
* @enum {string}
|
|
380
380
|
*/
|
|
381
381
|
role: "origin" | "replica";
|
package/dist/src/helpers.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare function sharedClient(options?: SharedClientOptions): Promise<Lit
|
|
|
22
22
|
export declare function backup(source: BackupSource, options?: BackupOptions): Backup;
|
|
23
23
|
/** Runs a database on several identical machines; see Litebackup.failover. */
|
|
24
24
|
export declare function failover(path: string, options?: FailoverOptions): Promise<Failover>;
|
|
25
|
-
/** Keeps a live
|
|
25
|
+
/** Keeps a live readonly replica of a database; resolves once its first version is local. */
|
|
26
26
|
export declare function replicate(name: string, options?: ReplicateOptions & SharedClientOptions): Promise<DatabaseStatus>;
|
|
27
27
|
/** Writes a version of a database to a new file and checks it. */
|
|
28
28
|
export declare function restore(name: string, options: RestoreOptions & SharedClientOptions): Promise<RestoreResult>;
|
package/dist/src/helpers.js
CHANGED
|
@@ -45,7 +45,7 @@ export function backup(source, options = {}) {
|
|
|
45
45
|
export async function failover(path, options = {}) {
|
|
46
46
|
return (await sharedClient(options)).failover(path, options);
|
|
47
47
|
}
|
|
48
|
-
/** Keeps a live
|
|
48
|
+
/** Keeps a live readonly replica of a database; resolves once its first version is local. */
|
|
49
49
|
export async function replicate(name, options = {}) {
|
|
50
50
|
return (await sharedClient(options)).replicate(name, options);
|
|
51
51
|
}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export type LitebackupEvent = Camelize<Schemas["Event"]>;
|
|
|
28
28
|
export type EventList = Camelize<Schemas["EventList"]>;
|
|
29
29
|
export type ShutdownResult = Camelize<Schemas["ShutdownResult"]>;
|
|
30
30
|
/** The SDK version sent with every call. */
|
|
31
|
-
export declare const sdkVersion = "0.3.
|
|
31
|
+
export declare const sdkVersion = "0.3.22";
|
|
32
32
|
/** An error the Litebackup daemon answered with, carrying its code. */
|
|
33
33
|
export declare class LitebackupError extends Error {
|
|
34
34
|
/** Such as name_in_use, exists, in_use, not_found, still_open, timeout, or sdk_unsupported. */
|
package/dist/src/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The SDK version sent with every call. */
|
|
2
|
-
export const sdkVersion = "0.3.
|
|
2
|
+
export const sdkVersion = "0.3.22";
|
|
3
3
|
/** An error the Litebackup daemon answered with, carrying its code. */
|
|
4
4
|
export class LitebackupError extends Error {
|
|
5
5
|
/** Such as name_in_use, exists, in_use, not_found, still_open, timeout, or sdk_unsupported. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litebackup/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.22",
|
|
4
4
|
"description": "Back up, replicate, and restore SQLite databases with Litebackup",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"prepack": "npm run build"
|
|
26
26
|
},
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"@litebackup/bin-darwin-arm64": "0.3.
|
|
29
|
-
"@litebackup/bin-darwin-x64": "0.3.
|
|
30
|
-
"@litebackup/bin-linux-arm64": "0.3.
|
|
31
|
-
"@litebackup/bin-linux-x64": "0.3.
|
|
28
|
+
"@litebackup/bin-darwin-arm64": "0.3.22",
|
|
29
|
+
"@litebackup/bin-darwin-x64": "0.3.22",
|
|
30
|
+
"@litebackup/bin-linux-arm64": "0.3.22",
|
|
31
|
+
"@litebackup/bin-linux-x64": "0.3.22"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "24.19.2",
|