dexie-cloud-addon 4.4.8 → 4.4.10
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/modern/DexieCloudOptions.d.ts +5 -1
- package/dist/modern/dexie-cloud-addon.js +35 -14
- package/dist/modern/dexie-cloud-addon.js.map +1 -1
- package/dist/modern/dexie-cloud-addon.min.js +1 -1
- package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
- package/dist/modern/service-worker.js +35 -14
- package/dist/modern/service-worker.js.map +1 -1
- package/dist/modern/service-worker.min.js +1 -1
- package/dist/modern/service-worker.min.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.js +36 -15
- package/dist/umd/dexie-cloud-addon.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.min.js +1 -1
- package/dist/umd/dexie-cloud-addon.min.js.map +1 -1
- package/dist/umd/service-worker.js +36 -15
- package/dist/umd/service-worker.js.map +1 -1
- package/dist/umd/service-worker.min.js +1 -1
- package/dist/umd/service-worker.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ==========================================================================
|
|
10
10
|
*
|
|
11
|
-
* Version 4.4.
|
|
11
|
+
* Version 4.4.10, Sat Apr 04 2026
|
|
12
12
|
*
|
|
13
13
|
* https://dexie.org
|
|
14
14
|
*
|
|
@@ -14493,7 +14493,7 @@
|
|
|
14493
14493
|
*
|
|
14494
14494
|
* ==========================================================================
|
|
14495
14495
|
*
|
|
14496
|
-
* Version 4.4.0,
|
|
14496
|
+
* Version 4.4.0, Sat Apr 04 2026
|
|
14497
14497
|
*
|
|
14498
14498
|
* https://dexie.org
|
|
14499
14499
|
*
|
|
@@ -15606,7 +15606,7 @@
|
|
|
15606
15606
|
return __awaiter(this, arguments, void 0, function* (db, options, schema, { isInitialSync, cancelToken, justCheckIfNeeded, purpose } = {
|
|
15607
15607
|
isInitialSync: false,
|
|
15608
15608
|
}) {
|
|
15609
|
-
var _a, _b, _c;
|
|
15609
|
+
var _a, _b, _c, _d, _e;
|
|
15610
15610
|
if (!justCheckIfNeeded) {
|
|
15611
15611
|
console.debug('SYNC STARTED', { isInitialSync, purpose });
|
|
15612
15612
|
}
|
|
@@ -15680,7 +15680,7 @@
|
|
|
15680
15680
|
// Offload large blobs to blob storage before sync
|
|
15681
15681
|
//
|
|
15682
15682
|
let processedChangeSet = clientChangeSet;
|
|
15683
|
-
const maxStringLength = (_c = (_b = db.cloud.options) === null || _b === void 0 ? void 0 : _b.
|
|
15683
|
+
const maxStringLength = (_e = (_c = (_b = db.cloud.options) === null || _b === void 0 ? void 0 : _b.largeStringThreshold) !== null && _c !== void 0 ? _c : (_d = db.cloud.options) === null || _d === void 0 ? void 0 : _d.maxStringLength) !== null && _e !== void 0 ? _e : 32768;
|
|
15684
15684
|
const hasLargeBlobs = hasLargeBlobsInOperations(clientChangeSet, maxStringLength);
|
|
15685
15685
|
if (hasLargeBlobs) {
|
|
15686
15686
|
processedChangeSet = yield offloadBlobsInOperations(clientChangeSet, databaseUrl, () => loadCachedAccessToken(db), maxStringLength);
|
|
@@ -17172,8 +17172,20 @@
|
|
|
17172
17172
|
* each onNext callback, ensuring cursor.value is always available.
|
|
17173
17173
|
*/
|
|
17174
17174
|
function createBlobResolvingCursor(cursor, table, blobSavingQueue, db) {
|
|
17175
|
-
// Create wrapped cursor using Object.create() - inherits everything
|
|
17175
|
+
// Create wrapped cursor using Object.create() - inherits everything.
|
|
17176
|
+
// Important: .key and .primaryKey must be explicitly overridden with
|
|
17177
|
+
// closure-based getters to prevent native IDBCursorWithValue getters from
|
|
17178
|
+
// being reached through the prototype chain with a wrong `this`, which
|
|
17179
|
+
// throws "Illegal invocation" in Chrome 146+.
|
|
17176
17180
|
const wrappedCursor = Object.create(cursor, {
|
|
17181
|
+
key: {
|
|
17182
|
+
get() { return cursor.key; },
|
|
17183
|
+
configurable: true,
|
|
17184
|
+
},
|
|
17185
|
+
primaryKey: {
|
|
17186
|
+
get() { return cursor.primaryKey; },
|
|
17187
|
+
configurable: true,
|
|
17188
|
+
},
|
|
17177
17189
|
value: {
|
|
17178
17190
|
value: cursor.value,
|
|
17179
17191
|
enumerable: true,
|
|
@@ -19730,7 +19742,7 @@
|
|
|
19730
19742
|
const downloading$ = createDownloadingState();
|
|
19731
19743
|
dexie.cloud = {
|
|
19732
19744
|
// @ts-ignore
|
|
19733
|
-
version: "4.4.
|
|
19745
|
+
version: "4.4.10",
|
|
19734
19746
|
options: Object.assign({}, DEFAULT_OPTIONS),
|
|
19735
19747
|
schema: null,
|
|
19736
19748
|
get currentUserId() {
|
|
@@ -19758,18 +19770,27 @@
|
|
|
19758
19770
|
invites: getInvitesObservable(dexie),
|
|
19759
19771
|
roles: getGlobalRolesObservable(dexie),
|
|
19760
19772
|
configure(options) {
|
|
19761
|
-
// Validate
|
|
19762
|
-
// a finite number between 100
|
|
19773
|
+
// Validate largeStringThreshold (preferred) or maxStringLength (deprecated) —
|
|
19774
|
+
// Infinity disables offloading, otherwise must be a finite number between 100
|
|
19775
|
+
// and the server limit (32768).
|
|
19763
19776
|
// Minimum 100 prevents accidental offloading of primary keys and short strings
|
|
19764
19777
|
// that would break sync.
|
|
19765
19778
|
const MIN_STRING_LENGTH = 100;
|
|
19766
19779
|
const MAX_SERVER_STRING_LENGTH = 32768;
|
|
19767
|
-
if (options.maxStringLength !== undefined
|
|
19768
|
-
|
|
19769
|
-
|
|
19770
|
-
|
|
19771
|
-
options.
|
|
19772
|
-
|
|
19780
|
+
if (options.maxStringLength !== undefined) {
|
|
19781
|
+
console.warn('maxStringLength is deprecated, use largeStringThreshold instead');
|
|
19782
|
+
// If largeStringThreshold is not explicitly set, migrate to new name
|
|
19783
|
+
if (options.largeStringThreshold === undefined) {
|
|
19784
|
+
options = Object.assign(Object.assign({}, options), { largeStringThreshold: options.maxStringLength });
|
|
19785
|
+
}
|
|
19786
|
+
}
|
|
19787
|
+
const thresholdValue = options.largeStringThreshold;
|
|
19788
|
+
if (thresholdValue !== undefined &&
|
|
19789
|
+
thresholdValue !== Infinity &&
|
|
19790
|
+
(!Number.isFinite(thresholdValue) ||
|
|
19791
|
+
thresholdValue < MIN_STRING_LENGTH ||
|
|
19792
|
+
thresholdValue > MAX_SERVER_STRING_LENGTH)) {
|
|
19793
|
+
throw new Error(`largeStringThreshold must be Infinity or a finite number in [${MIN_STRING_LENGTH}, ${MAX_SERVER_STRING_LENGTH}]. Got: ${thresholdValue}`);
|
|
19773
19794
|
}
|
|
19774
19795
|
options = dexie.cloud.options = Object.assign(Object.assign({}, dexie.cloud.options), options);
|
|
19775
19796
|
configuredProgramatically = true;
|
|
@@ -20166,7 +20187,7 @@
|
|
|
20166
20187
|
}
|
|
20167
20188
|
}
|
|
20168
20189
|
// @ts-ignore
|
|
20169
|
-
dexieCloud.version = "4.4.
|
|
20190
|
+
dexieCloud.version = "4.4.10";
|
|
20170
20191
|
Dexie.Cloud = dexieCloud;
|
|
20171
20192
|
|
|
20172
20193
|
exports.default = dexieCloud;
|