@anfenn/dync 1.0.31 → 1.0.32
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/README.md +5 -5
- package/dist/capacitor.d.cts +1 -1
- package/dist/capacitor.d.ts +1 -1
- package/dist/{dexie-q17SmbBw.d.cts → dexie-3VOQSn1s.d.cts} +1 -1
- package/dist/{dexie-ImxmapkS.d.ts → dexie-D85rTx4g.d.ts} +1 -1
- package/dist/dexie.d.cts +2 -2
- package/dist/dexie.d.ts +2 -2
- package/dist/expoSqlite.d.cts +1 -1
- package/dist/expoSqlite.d.ts +1 -1
- package/dist/index.cjs +2 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +2 -11
- package/dist/index.js.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react/index.d.cts +3 -3
- package/dist/react/index.d.ts +3 -3
- package/dist/{types-DeiRXWKl.d.cts → types-6-NyRQ0D.d.cts} +1 -5
- package/dist/{types-DeiRXWKl.d.ts → types-6-NyRQ0D.d.ts} +1 -5
- package/dist/{types-B7xq90Kc.d.cts → types-BszcepJK.d.cts} +1 -1
- package/dist/{types-CfvYBKI_.d.ts → types-Dhx9MuUp.d.ts} +1 -1
- package/dist/wa-sqlite.d.cts +1 -1
- package/dist/wa-sqlite.d.ts +1 -1
- package/package.json +1 -1
- package/src/index.shared.ts +3 -12
- package/src/storage/sqlite/types.ts +0 -5
package/dist/node.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as better_sqlite3 from 'better-sqlite3';
|
|
2
|
-
import { S as SQLiteDatabaseDriver, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-
|
|
2
|
+
import { S as SQLiteDatabaseDriver, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-6-NyRQ0D.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Options for configuring the BetterSQLite3Driver.
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as better_sqlite3 from 'better-sqlite3';
|
|
2
|
-
import { S as SQLiteDatabaseDriver, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-
|
|
2
|
+
import { S as SQLiteDatabaseDriver, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-6-NyRQ0D.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Options for configuring the BetterSQLite3Driver.
|
package/dist/react/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as SyncApi, k as SyncState } from '../types-
|
|
2
|
-
import '../dexie-
|
|
1
|
+
import { a as SyncApi, k as SyncState } from '../types-BszcepJK.cjs';
|
|
2
|
+
import '../dexie-3VOQSn1s.cjs';
|
|
3
3
|
import 'dexie';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-6-NyRQ0D.cjs';
|
|
5
5
|
|
|
6
6
|
/** Minimal database interface for React hooks */
|
|
7
7
|
interface DyncLike {
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as SyncApi, k as SyncState } from '../types-
|
|
2
|
-
import '../dexie-
|
|
1
|
+
import { a as SyncApi, k as SyncState } from '../types-Dhx9MuUp.js';
|
|
2
|
+
import '../dexie-D85rTx4g.js';
|
|
3
3
|
import 'dexie';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-6-NyRQ0D.js';
|
|
5
5
|
|
|
6
6
|
/** Minimal database interface for React hooks */
|
|
7
7
|
interface DyncLike {
|
|
@@ -28,10 +28,6 @@ interface SQLiteVersionMigration {
|
|
|
28
28
|
up?: SQLiteMigrationHandler;
|
|
29
29
|
down?: SQLiteMigrationHandler;
|
|
30
30
|
}
|
|
31
|
-
interface SQLiteVersionConfigurator {
|
|
32
|
-
up(handler: SQLiteMigrationHandler): void;
|
|
33
|
-
down(handler: SQLiteMigrationHandler): void;
|
|
34
|
-
}
|
|
35
31
|
interface SQLiteSchemaDefinitionOptions {
|
|
36
32
|
migrations?: SQLiteVersionMigration;
|
|
37
33
|
}
|
|
@@ -39,4 +35,4 @@ interface StorageSchemaDefinitionOptions {
|
|
|
39
35
|
sqlite?: SQLiteSchemaDefinitionOptions;
|
|
40
36
|
}
|
|
41
37
|
|
|
42
|
-
export type { SQLiteDatabaseDriver as S, SQLiteRunResult as a, SQLiteQueryResult as b,
|
|
38
|
+
export type { SQLiteDatabaseDriver as S, SQLiteRunResult as a, SQLiteQueryResult as b, SQLiteVersionMigration as c, StorageSchemaDefinitionOptions as d, SQLiteAdapterOptions as e };
|
|
@@ -28,10 +28,6 @@ interface SQLiteVersionMigration {
|
|
|
28
28
|
up?: SQLiteMigrationHandler;
|
|
29
29
|
down?: SQLiteMigrationHandler;
|
|
30
30
|
}
|
|
31
|
-
interface SQLiteVersionConfigurator {
|
|
32
|
-
up(handler: SQLiteMigrationHandler): void;
|
|
33
|
-
down(handler: SQLiteMigrationHandler): void;
|
|
34
|
-
}
|
|
35
31
|
interface SQLiteSchemaDefinitionOptions {
|
|
36
32
|
migrations?: SQLiteVersionMigration;
|
|
37
33
|
}
|
|
@@ -39,4 +35,4 @@ interface StorageSchemaDefinitionOptions {
|
|
|
39
35
|
sqlite?: SQLiteSchemaDefinitionOptions;
|
|
40
36
|
}
|
|
41
37
|
|
|
42
|
-
export type { SQLiteDatabaseDriver as S, SQLiteRunResult as a, SQLiteQueryResult as b,
|
|
38
|
+
export type { SQLiteDatabaseDriver as S, SQLiteRunResult as a, SQLiteQueryResult as b, SQLiteVersionMigration as c, StorageSchemaDefinitionOptions as d, SQLiteAdapterOptions as e };
|
package/dist/wa-sqlite.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SQLiteDatabaseDriver, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-
|
|
1
|
+
import { S as SQLiteDatabaseDriver, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-6-NyRQ0D.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Virtual File System (VFS) options for wa-sqlite.
|
package/dist/wa-sqlite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SQLiteDatabaseDriver, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-
|
|
1
|
+
import { S as SQLiteDatabaseDriver, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-6-NyRQ0D.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Virtual File System (VFS) options for wa-sqlite.
|
package/package.json
CHANGED
package/src/index.shared.ts
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from './types';
|
|
20
20
|
import { addVisibilityChangeListener } from './addVisibilityChangeListener';
|
|
21
21
|
import { type StorageAdapter, type StorageTable, type TransactionMode } from './storage/types';
|
|
22
|
-
import type { StorageSchemaDefinitionOptions,
|
|
22
|
+
import type { StorageSchemaDefinitionOptions, SQLiteVersionMigration } from './storage/sqlite/types';
|
|
23
23
|
import type { TableSchemaDefinition, SQLiteTableDefinition } from './storage/sqlite/schema';
|
|
24
24
|
import { enhanceSyncTable, setupEnhancedTables as setupEnhancedTablesHelper, wrapWithMutationEmitter } from './core/tableEnhancers';
|
|
25
25
|
import { pullAll as runPullAll, pullAllBatch as runPullAllBatch } from './core/pullOperations';
|
|
@@ -205,21 +205,12 @@ class DyncBase<_TStoreMap extends Record<string, any> = Record<string, any>> {
|
|
|
205
205
|
|
|
206
206
|
return builder;
|
|
207
207
|
},
|
|
208
|
-
sqlite(
|
|
208
|
+
sqlite(migrations: SQLiteVersionMigration) {
|
|
209
209
|
if (!storesDefined) {
|
|
210
210
|
throw new Error('Call stores() before registering sqlite migrations');
|
|
211
211
|
}
|
|
212
212
|
const sqliteOptions = (schemaOptions.sqlite ??= {});
|
|
213
|
-
|
|
214
|
-
const configurator: SQLiteVersionConfigurator = {
|
|
215
|
-
up(handler) {
|
|
216
|
-
migrations.up = handler;
|
|
217
|
-
},
|
|
218
|
-
down(handler) {
|
|
219
|
-
migrations.down = handler;
|
|
220
|
-
},
|
|
221
|
-
};
|
|
222
|
-
configure(configurator);
|
|
213
|
+
sqliteOptions.migrations = migrations;
|
|
223
214
|
return builder;
|
|
224
215
|
},
|
|
225
216
|
};
|
|
@@ -141,11 +141,6 @@ export interface SQLiteVersionMigration {
|
|
|
141
141
|
down?: SQLiteMigrationHandler;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
export interface SQLiteVersionConfigurator {
|
|
145
|
-
up(handler: SQLiteMigrationHandler): void;
|
|
146
|
-
down(handler: SQLiteMigrationHandler): void;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
144
|
export interface SQLiteSchemaDefinitionOptions {
|
|
150
145
|
migrations?: SQLiteVersionMigration;
|
|
151
146
|
}
|