@anfenn/dync 1.0.31 → 1.0.33
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/README.md
CHANGED
|
@@ -128,13 +128,13 @@ And see how Dync compares to the alternatives [below](#hasnt-this-already-been-d
|
|
|
128
128
|
},
|
|
129
129
|
},
|
|
130
130
|
})
|
|
131
|
-
.sqlite(
|
|
132
|
-
|
|
131
|
+
.sqlite({
|
|
132
|
+
up: async (ctx) => {
|
|
133
133
|
await ctx.execute('ALTER TABLE "items" ADD COLUMN "priority" INTEGER DEFAULT 0');
|
|
134
|
-
}
|
|
135
|
-
|
|
134
|
+
},
|
|
135
|
+
down: async (ctx) => {
|
|
136
136
|
await ctx.run('UPDATE "items" SET "priority" = NULL');
|
|
137
|
-
}
|
|
137
|
+
},
|
|
138
138
|
});
|
|
139
139
|
```
|
|
140
140
|
|
package/dist/capacitor.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
|
interface CapacitorSQLiteDriverOptions {
|
|
4
4
|
encrypted?: boolean;
|
package/dist/capacitor.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
|
interface CapacitorSQLiteDriverOptions {
|
|
4
4
|
encrypted?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dexie from 'dexie';
|
|
2
|
-
import { d as StorageSchemaDefinitionOptions, S as SQLiteDatabaseDriver, e as SQLiteAdapterOptions, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-
|
|
2
|
+
import { d as StorageSchemaDefinitionOptions, S as SQLiteDatabaseDriver, e as SQLiteAdapterOptions, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-6-NyRQ0D.cjs';
|
|
3
3
|
|
|
4
4
|
type TableSchemaDefinition = string | SQLiteTableDefinition;
|
|
5
5
|
interface SQLiteTableDefinition {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dexie from 'dexie';
|
|
2
|
-
import { d as StorageSchemaDefinitionOptions, S as SQLiteDatabaseDriver, e as SQLiteAdapterOptions, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-
|
|
2
|
+
import { d as StorageSchemaDefinitionOptions, S as SQLiteDatabaseDriver, e as SQLiteAdapterOptions, a as SQLiteRunResult, b as SQLiteQueryResult } from './types-6-NyRQ0D.js';
|
|
3
3
|
|
|
4
4
|
type TableSchemaDefinition = string | SQLiteTableDefinition;
|
|
5
5
|
interface SQLiteTableDefinition {
|
package/dist/dexie.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { e as DexieAdapter, D as DexieQueryContext, d as StorageAdapter } from './dexie-
|
|
1
|
+
export { e as DexieAdapter, D as DexieQueryContext, d as StorageAdapter } from './dexie-3VOQSn1s.cjs';
|
|
2
2
|
import 'dexie';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-6-NyRQ0D.cjs';
|
package/dist/dexie.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { e as DexieAdapter, D as DexieQueryContext, d as StorageAdapter } from './dexie-
|
|
1
|
+
export { e as DexieAdapter, D as DexieQueryContext, d as StorageAdapter } from './dexie-D85rTx4g.js';
|
|
2
2
|
import 'dexie';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-6-NyRQ0D.js';
|
package/dist/expoSqlite.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
|
declare class ExpoSQLiteDriver implements SQLiteDatabaseDriver {
|
|
4
4
|
readonly type = "ExpoSQLiteDriver";
|
package/dist/expoSqlite.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
|
declare class ExpoSQLiteDriver implements SQLiteDatabaseDriver {
|
|
4
4
|
readonly type = "ExpoSQLiteDriver";
|
package/dist/index.cjs
CHANGED
|
@@ -1438,21 +1438,12 @@ var DyncBase = class {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
return builder;
|
|
1440
1440
|
},
|
|
1441
|
-
sqlite(
|
|
1441
|
+
sqlite(migrations) {
|
|
1442
1442
|
if (!storesDefined) {
|
|
1443
1443
|
throw new Error("Call stores() before registering sqlite migrations");
|
|
1444
1444
|
}
|
|
1445
1445
|
const sqliteOptions = schemaOptions.sqlite ??= {};
|
|
1446
|
-
|
|
1447
|
-
const configurator = {
|
|
1448
|
-
up(handler) {
|
|
1449
|
-
migrations.up = handler;
|
|
1450
|
-
},
|
|
1451
|
-
down(handler) {
|
|
1452
|
-
migrations.down = handler;
|
|
1453
|
-
}
|
|
1454
|
-
};
|
|
1455
|
-
configure(configurator);
|
|
1446
|
+
sqliteOptions.migrations = migrations;
|
|
1456
1447
|
return builder;
|
|
1457
1448
|
}
|
|
1458
1449
|
};
|