@lunora/replica 1.0.0-alpha.5 → 1.0.0-alpha.6
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/adapters/better-sqlite3.d.mts +14 -14
- package/dist/adapters/better-sqlite3.d.ts +14 -14
- package/dist/adapters/sqlite-wasm.d.mts +25 -25
- package/dist/adapters/sqlite-wasm.d.ts +25 -25
- package/dist/adapters/sqljs.d.mts +10 -10
- package/dist/adapters/sqljs.d.ts +10 -10
- package/dist/index.d.mts +621 -622
- package/dist/index.d.ts +621 -622
- package/dist/packem_shared/local-mirror.d-CyGOpUES.d.ts +530 -0
- package/dist/packem_shared/local-mirror.d-DTavX_y0.d.mts +530 -0
- package/dist/packem_shared/{types.d-BuAWjEY5.d.mts → types.d-CkMkSwLJ.d.mts} +10 -10
- package/dist/packem_shared/{types.d-BuAWjEY5.d.ts → types.d-CkMkSwLJ.d.ts} +10 -10
- package/dist/react.d.mts +59 -59
- package/dist/react.d.ts +59 -59
- package/package.json +1 -1
- package/dist/packem_shared/local-mirror.d-ByIjd7sW.d.ts +0 -530
- package/dist/packem_shared/local-mirror.d-DL1XJBB3.d.mts +0 -530
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { S as SqliteAdapter } from "../packem_shared/types.d-
|
|
1
|
+
import { S as SqliteAdapter } from "../packem_shared/types.d-CkMkSwLJ.mjs";
|
|
2
2
|
/**
|
|
3
|
-
* Create a {@link SqliteAdapter} backed by [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
|
|
4
|
-
* (a synchronous SQLite3 binding for Node.js).
|
|
5
|
-
*
|
|
6
|
-
* The adapter takes a structural projection of better-sqlite3's `Database` so
|
|
7
|
-
* the package never imports from `better-sqlite3` directly — consumers install
|
|
8
|
-
* it themselves and pass in their database instance.
|
|
9
|
-
* @param database An already-initialised better-sqlite3 `Database` instance.
|
|
10
|
-
* @param database.close Tear down the database connection.
|
|
11
|
-
* @param database.exec Execute one or more SQL statements (no params, no results).
|
|
12
|
-
* @param database.prepare Prepare a SQL statement for repeated execution.
|
|
13
|
-
* @param database.transaction Wrap a function so its statements run in a transaction.
|
|
14
|
-
* @experimental
|
|
15
|
-
*/
|
|
3
|
+
* Create a {@link SqliteAdapter} backed by [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
|
|
4
|
+
* (a synchronous SQLite3 binding for Node.js).
|
|
5
|
+
*
|
|
6
|
+
* The adapter takes a structural projection of better-sqlite3's `Database` so
|
|
7
|
+
* the package never imports from `better-sqlite3` directly — consumers install
|
|
8
|
+
* it themselves and pass in their database instance.
|
|
9
|
+
* @param database An already-initialised better-sqlite3 `Database` instance.
|
|
10
|
+
* @param database.close Tear down the database connection.
|
|
11
|
+
* @param database.exec Execute one or more SQL statements (no params, no results).
|
|
12
|
+
* @param database.prepare Prepare a SQL statement for repeated execution.
|
|
13
|
+
* @param database.transaction Wrap a function so its statements run in a transaction.
|
|
14
|
+
* @experimental
|
|
15
|
+
*/
|
|
16
16
|
declare const createBetterSqlite3Adapter: (database: {
|
|
17
17
|
close: () => void;
|
|
18
18
|
exec: (sql: string) => void;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { S as SqliteAdapter } from "../packem_shared/types.d-
|
|
1
|
+
import { S as SqliteAdapter } from "../packem_shared/types.d-CkMkSwLJ.js";
|
|
2
2
|
/**
|
|
3
|
-
* Create a {@link SqliteAdapter} backed by [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
|
|
4
|
-
* (a synchronous SQLite3 binding for Node.js).
|
|
5
|
-
*
|
|
6
|
-
* The adapter takes a structural projection of better-sqlite3's `Database` so
|
|
7
|
-
* the package never imports from `better-sqlite3` directly — consumers install
|
|
8
|
-
* it themselves and pass in their database instance.
|
|
9
|
-
* @param database An already-initialised better-sqlite3 `Database` instance.
|
|
10
|
-
* @param database.close Tear down the database connection.
|
|
11
|
-
* @param database.exec Execute one or more SQL statements (no params, no results).
|
|
12
|
-
* @param database.prepare Prepare a SQL statement for repeated execution.
|
|
13
|
-
* @param database.transaction Wrap a function so its statements run in a transaction.
|
|
14
|
-
* @experimental
|
|
15
|
-
*/
|
|
3
|
+
* Create a {@link SqliteAdapter} backed by [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
|
|
4
|
+
* (a synchronous SQLite3 binding for Node.js).
|
|
5
|
+
*
|
|
6
|
+
* The adapter takes a structural projection of better-sqlite3's `Database` so
|
|
7
|
+
* the package never imports from `better-sqlite3` directly — consumers install
|
|
8
|
+
* it themselves and pass in their database instance.
|
|
9
|
+
* @param database An already-initialised better-sqlite3 `Database` instance.
|
|
10
|
+
* @param database.close Tear down the database connection.
|
|
11
|
+
* @param database.exec Execute one or more SQL statements (no params, no results).
|
|
12
|
+
* @param database.prepare Prepare a SQL statement for repeated execution.
|
|
13
|
+
* @param database.transaction Wrap a function so its statements run in a transaction.
|
|
14
|
+
* @experimental
|
|
15
|
+
*/
|
|
16
16
|
declare const createBetterSqlite3Adapter: (database: {
|
|
17
17
|
close: () => void;
|
|
18
18
|
exec: (sql: string) => void;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { S as SqliteAdapter } from "../packem_shared/types.d-
|
|
1
|
+
import { S as SqliteAdapter } from "../packem_shared/types.d-CkMkSwLJ.mjs";
|
|
2
2
|
/**
|
|
3
|
-
* Create a {@link SqliteAdapter} backed by the [official SQLite Wasm](https://www.npmjs.com/package/@sqlite.org/sqlite-wasm)
|
|
4
|
-
* (a WebAssembly build of SQLite that runs in browsers and Node.js).
|
|
5
|
-
*
|
|
6
|
-
* The adapter takes a structural projection of the OO API (`sqlite3.oo1.DB`) so
|
|
7
|
-
* the package never imports from `@sqlite.org/sqlite-wasm` directly — consumers
|
|
8
|
-
* install it themselves and pass in their database instance.
|
|
9
|
-
*
|
|
10
|
-
* IMPORTANT (REPLICA-01): the real `oo1.DB.exec()` does NOT return sql.js's
|
|
11
|
-
* `{ columns, values }[]` result shape — with `rowMode: "object"` and
|
|
12
|
-
* `returnValue: "resultRows"` it returns the rows directly, as
|
|
13
|
-
* `Record<string, unknown>[]`. This adapter is written against that real
|
|
14
|
-
* shape; `lastInsertRowId` uses the driver's `selectValue()` convenience
|
|
15
|
-
* method (a single-scalar query helper) rather than parsing a result-row
|
|
16
|
-
* array.
|
|
17
|
-
* @param database An already-initialised `sqlite3.oo1.DB` instance.
|
|
18
|
-
* @param database.close Tear down the database connection.
|
|
19
|
-
* @param database.exec Execute SQL with optional bind params. With
|
|
20
|
-
* `{ returnValue: "resultRows", rowMode: "object" }` it returns the matched
|
|
21
|
-
* rows directly (`Record<string, unknown>[]`); otherwise (DDL/DML/BEGIN/
|
|
22
|
-
* COMMIT/ROLLBACK) its return value is unused here.
|
|
23
|
-
* @param database.selectValue Run a query and return the first column of the
|
|
24
|
-
* first row as a single scalar — used for `SELECT last_insert_rowid()`.
|
|
25
|
-
* @experimental
|
|
26
|
-
*/
|
|
3
|
+
* Create a {@link SqliteAdapter} backed by the [official SQLite Wasm](https://www.npmjs.com/package/@sqlite.org/sqlite-wasm)
|
|
4
|
+
* (a WebAssembly build of SQLite that runs in browsers and Node.js).
|
|
5
|
+
*
|
|
6
|
+
* The adapter takes a structural projection of the OO API (`sqlite3.oo1.DB`) so
|
|
7
|
+
* the package never imports from `@sqlite.org/sqlite-wasm` directly — consumers
|
|
8
|
+
* install it themselves and pass in their database instance.
|
|
9
|
+
*
|
|
10
|
+
* IMPORTANT (REPLICA-01): the real `oo1.DB.exec()` does NOT return sql.js's
|
|
11
|
+
* `{ columns, values }[]` result shape — with `rowMode: "object"` and
|
|
12
|
+
* `returnValue: "resultRows"` it returns the rows directly, as
|
|
13
|
+
* `Record<string, unknown>[]`. This adapter is written against that real
|
|
14
|
+
* shape; `lastInsertRowId` uses the driver's `selectValue()` convenience
|
|
15
|
+
* method (a single-scalar query helper) rather than parsing a result-row
|
|
16
|
+
* array.
|
|
17
|
+
* @param database An already-initialised `sqlite3.oo1.DB` instance.
|
|
18
|
+
* @param database.close Tear down the database connection.
|
|
19
|
+
* @param database.exec Execute SQL with optional bind params. With
|
|
20
|
+
* `{ returnValue: "resultRows", rowMode: "object" }` it returns the matched
|
|
21
|
+
* rows directly (`Record<string, unknown>[]`); otherwise (DDL/DML/BEGIN/
|
|
22
|
+
* COMMIT/ROLLBACK) its return value is unused here.
|
|
23
|
+
* @param database.selectValue Run a query and return the first column of the
|
|
24
|
+
* first row as a single scalar — used for `SELECT last_insert_rowid()`.
|
|
25
|
+
* @experimental
|
|
26
|
+
*/
|
|
27
27
|
declare const createSqliteWasmAdapter: (database: {
|
|
28
28
|
close: () => void;
|
|
29
29
|
exec: (sql: string, options?: {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { S as SqliteAdapter } from "../packem_shared/types.d-
|
|
1
|
+
import { S as SqliteAdapter } from "../packem_shared/types.d-CkMkSwLJ.js";
|
|
2
2
|
/**
|
|
3
|
-
* Create a {@link SqliteAdapter} backed by the [official SQLite Wasm](https://www.npmjs.com/package/@sqlite.org/sqlite-wasm)
|
|
4
|
-
* (a WebAssembly build of SQLite that runs in browsers and Node.js).
|
|
5
|
-
*
|
|
6
|
-
* The adapter takes a structural projection of the OO API (`sqlite3.oo1.DB`) so
|
|
7
|
-
* the package never imports from `@sqlite.org/sqlite-wasm` directly — consumers
|
|
8
|
-
* install it themselves and pass in their database instance.
|
|
9
|
-
*
|
|
10
|
-
* IMPORTANT (REPLICA-01): the real `oo1.DB.exec()` does NOT return sql.js's
|
|
11
|
-
* `{ columns, values }[]` result shape — with `rowMode: "object"` and
|
|
12
|
-
* `returnValue: "resultRows"` it returns the rows directly, as
|
|
13
|
-
* `Record<string, unknown>[]`. This adapter is written against that real
|
|
14
|
-
* shape; `lastInsertRowId` uses the driver's `selectValue()` convenience
|
|
15
|
-
* method (a single-scalar query helper) rather than parsing a result-row
|
|
16
|
-
* array.
|
|
17
|
-
* @param database An already-initialised `sqlite3.oo1.DB` instance.
|
|
18
|
-
* @param database.close Tear down the database connection.
|
|
19
|
-
* @param database.exec Execute SQL with optional bind params. With
|
|
20
|
-
* `{ returnValue: "resultRows", rowMode: "object" }` it returns the matched
|
|
21
|
-
* rows directly (`Record<string, unknown>[]`); otherwise (DDL/DML/BEGIN/
|
|
22
|
-
* COMMIT/ROLLBACK) its return value is unused here.
|
|
23
|
-
* @param database.selectValue Run a query and return the first column of the
|
|
24
|
-
* first row as a single scalar — used for `SELECT last_insert_rowid()`.
|
|
25
|
-
* @experimental
|
|
26
|
-
*/
|
|
3
|
+
* Create a {@link SqliteAdapter} backed by the [official SQLite Wasm](https://www.npmjs.com/package/@sqlite.org/sqlite-wasm)
|
|
4
|
+
* (a WebAssembly build of SQLite that runs in browsers and Node.js).
|
|
5
|
+
*
|
|
6
|
+
* The adapter takes a structural projection of the OO API (`sqlite3.oo1.DB`) so
|
|
7
|
+
* the package never imports from `@sqlite.org/sqlite-wasm` directly — consumers
|
|
8
|
+
* install it themselves and pass in their database instance.
|
|
9
|
+
*
|
|
10
|
+
* IMPORTANT (REPLICA-01): the real `oo1.DB.exec()` does NOT return sql.js's
|
|
11
|
+
* `{ columns, values }[]` result shape — with `rowMode: "object"` and
|
|
12
|
+
* `returnValue: "resultRows"` it returns the rows directly, as
|
|
13
|
+
* `Record<string, unknown>[]`. This adapter is written against that real
|
|
14
|
+
* shape; `lastInsertRowId` uses the driver's `selectValue()` convenience
|
|
15
|
+
* method (a single-scalar query helper) rather than parsing a result-row
|
|
16
|
+
* array.
|
|
17
|
+
* @param database An already-initialised `sqlite3.oo1.DB` instance.
|
|
18
|
+
* @param database.close Tear down the database connection.
|
|
19
|
+
* @param database.exec Execute SQL with optional bind params. With
|
|
20
|
+
* `{ returnValue: "resultRows", rowMode: "object" }` it returns the matched
|
|
21
|
+
* rows directly (`Record<string, unknown>[]`); otherwise (DDL/DML/BEGIN/
|
|
22
|
+
* COMMIT/ROLLBACK) its return value is unused here.
|
|
23
|
+
* @param database.selectValue Run a query and return the first column of the
|
|
24
|
+
* first row as a single scalar — used for `SELECT last_insert_rowid()`.
|
|
25
|
+
* @experimental
|
|
26
|
+
*/
|
|
27
27
|
declare const createSqliteWasmAdapter: (database: {
|
|
28
28
|
close: () => void;
|
|
29
29
|
exec: (sql: string, options?: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { S as SqliteAdapter } from "../packem_shared/types.d-
|
|
1
|
+
import { S as SqliteAdapter } from "../packem_shared/types.d-CkMkSwLJ.mjs";
|
|
2
2
|
/**
|
|
3
|
-
* Create a {@link SqliteAdapter} backed by [sql.js](https://sql.js.org)
|
|
4
|
-
* (a WebAssembly build of SQLite that runs in browsers, Node, and
|
|
5
|
-
* React Native).
|
|
6
|
-
* @param database An already-initialised sql.js database instance.
|
|
7
|
-
* @param database.run Execute a parameterised SQL statement (no results).
|
|
8
|
-
* @param database.exec Execute SQL and return result rows.
|
|
9
|
-
* @param database.close Tear down the database connection.
|
|
10
|
-
* @experimental
|
|
11
|
-
*/
|
|
3
|
+
* Create a {@link SqliteAdapter} backed by [sql.js](https://sql.js.org)
|
|
4
|
+
* (a WebAssembly build of SQLite that runs in browsers, Node, and
|
|
5
|
+
* React Native).
|
|
6
|
+
* @param database An already-initialised sql.js database instance.
|
|
7
|
+
* @param database.run Execute a parameterised SQL statement (no results).
|
|
8
|
+
* @param database.exec Execute SQL and return result rows.
|
|
9
|
+
* @param database.close Tear down the database connection.
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
12
12
|
declare const createSqlJsAdapter: (database: {
|
|
13
13
|
close: () => void;
|
|
14
14
|
exec: (sql: string, params?: unknown[]) => {
|
package/dist/adapters/sqljs.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { S as SqliteAdapter } from "../packem_shared/types.d-
|
|
1
|
+
import { S as SqliteAdapter } from "../packem_shared/types.d-CkMkSwLJ.js";
|
|
2
2
|
/**
|
|
3
|
-
* Create a {@link SqliteAdapter} backed by [sql.js](https://sql.js.org)
|
|
4
|
-
* (a WebAssembly build of SQLite that runs in browsers, Node, and
|
|
5
|
-
* React Native).
|
|
6
|
-
* @param database An already-initialised sql.js database instance.
|
|
7
|
-
* @param database.run Execute a parameterised SQL statement (no results).
|
|
8
|
-
* @param database.exec Execute SQL and return result rows.
|
|
9
|
-
* @param database.close Tear down the database connection.
|
|
10
|
-
* @experimental
|
|
11
|
-
*/
|
|
3
|
+
* Create a {@link SqliteAdapter} backed by [sql.js](https://sql.js.org)
|
|
4
|
+
* (a WebAssembly build of SQLite that runs in browsers, Node, and
|
|
5
|
+
* React Native).
|
|
6
|
+
* @param database An already-initialised sql.js database instance.
|
|
7
|
+
* @param database.run Execute a parameterised SQL statement (no results).
|
|
8
|
+
* @param database.exec Execute SQL and return result rows.
|
|
9
|
+
* @param database.close Tear down the database connection.
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
12
12
|
declare const createSqlJsAdapter: (database: {
|
|
13
13
|
close: () => void;
|
|
14
14
|
exec: (sql: string, params?: unknown[]) => {
|