@litebackup/sdk 0.3.20 → 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.
@@ -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 read-only replicas at the
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 read-only replica of a database and resolves once its first version is local. */
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>;
@@ -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 read-only replicas at the
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 read-only replica of a database and resolves once its first version is local. */
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 read-only 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. */
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 read-only 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. */
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 read-only copy
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";
@@ -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 read-only replica of a database; resolves once its first version is local. */
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>;
@@ -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 read-only replica of a database; resolves once its first version is local. */
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
  }
@@ -19,7 +19,7 @@ const downloadArchitectures = { x64: "amd64", arm64: "arm64" };
19
19
  /** The one line that installs the litebackup command on this platform. */
20
20
  export function installCommand() {
21
21
  const architecture = downloadArchitectures[process.arch] ?? process.arch;
22
- return `sudo curl -fsSL -o /usr/local/bin/litebackup https://litebackup.com/packages/cli/channels/stable/litebackup-${process.platform}-${architecture} && sudo chmod +x /usr/local/bin/litebackup`;
22
+ return `sudo curl -fsSL -o /usr/local/bin/litebackup https://litebackup.com/pkg/cli/stable/litebackup-${process.platform}-${architecture} && sudo chmod +x /usr/local/bin/litebackup`;
23
23
  }
24
24
  /** Finds litebackup on PATH, or returns undefined. */
25
25
  function onPath(environment) {
@@ -32,7 +32,7 @@ export declare class SignatureError extends Error {
32
32
  constructor();
33
33
  }
34
34
  /**
35
- * Reads package metadata, as https://litebackup.com/packages/metadata serves
35
+ * Reads package metadata, as https://litebackup.com/pkg/metadata serves
36
36
  * it, and returns the selected release taken from its signed document, never
37
37
  * the unsigned listing. Throws SignatureError when the signature does not verify.
38
38
  */
@@ -42,7 +42,7 @@ function verifyRelease(signed, keys) {
42
42
  }
43
43
  }
44
44
  /**
45
- * Reads package metadata, as https://litebackup.com/packages/metadata serves
45
+ * Reads package metadata, as https://litebackup.com/pkg/metadata serves
46
46
  * it, and returns the selected release taken from its signed document, never
47
47
  * the unsigned listing. Throws SignatureError when the signature does not verify.
48
48
  */
@@ -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.20";
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.20";
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.20",
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.20",
29
- "@litebackup/bin-darwin-x64": "0.3.20",
30
- "@litebackup/bin-linux-arm64": "0.3.20",
31
- "@litebackup/bin-linux-x64": "0.3.20"
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",