dexie 4.4.2-pr2297.2 → 4.4.2-pr2297.4
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/dexie.d.ts +1 -1
- package/dist/dexie.js +30 -9
- package/dist/dexie.js.map +1 -1
- package/dist/dexie.min.js +1 -1
- package/dist/dexie.min.js.map +1 -1
- package/dist/dexie.mjs +30 -9
- package/dist/dexie.mjs.map +1 -1
- package/dist/modern/dexie.min.mjs +1 -1
- package/dist/modern/dexie.min.mjs.map +1 -1
- package/dist/modern/dexie.mjs +25 -9
- package/dist/modern/dexie.mjs.map +1 -1
- package/package.json +1 -1
package/dist/dexie.d.ts
CHANGED
package/dist/dexie.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* By David Fahlander, david.fahlander@gmail.com
|
|
6
6
|
*
|
|
7
|
-
* Version 4.4.2-pr2297.
|
|
7
|
+
* Version 4.4.2-pr2297.4, Thu Apr 16 2026
|
|
8
8
|
*
|
|
9
9
|
* https://dexie.org
|
|
10
10
|
*
|
|
@@ -1174,13 +1174,13 @@
|
|
|
1174
1174
|
}
|
|
1175
1175
|
var rejection = DexiePromise.reject;
|
|
1176
1176
|
|
|
1177
|
-
function isWebKitInjectKeyError(ex) {
|
|
1177
|
+
function isWebKitInjectKeyError$1(ex) {
|
|
1178
1178
|
return ((ex === null || ex === void 0 ? void 0 : ex.name) === 'UnknownError' &&
|
|
1179
1179
|
typeof (ex === null || ex === void 0 ? void 0 : ex.message) === 'string' &&
|
|
1180
1180
|
ex.message.includes('inject key'));
|
|
1181
1181
|
}
|
|
1182
|
-
var WEBKIT_INJECT_KEY_MAX_RETRIES = 7;
|
|
1183
|
-
var WEBKIT_INJECT_KEY_BASE_DELAY_MS = 100;
|
|
1182
|
+
var WEBKIT_INJECT_KEY_MAX_RETRIES$1 = 7;
|
|
1183
|
+
var WEBKIT_INJECT_KEY_BASE_DELAY_MS$1 = 100;
|
|
1184
1184
|
function tempTransaction(db, mode, storeNames, fn, _webkitRetry) {
|
|
1185
1185
|
if (_webkitRetry === void 0) { _webkitRetry = 0; }
|
|
1186
1186
|
if (!db.idbdb || (!db._state.openComplete && !PSD.letThrough && !db._vip)) {
|
|
@@ -1230,9 +1230,9 @@
|
|
|
1230
1230
|
: trans._completion.then(function () { return result; });
|
|
1231
1231
|
})
|
|
1232
1232
|
.catch(function (ex) {
|
|
1233
|
-
if (isWebKitInjectKeyError(ex) &&
|
|
1234
|
-
_webkitRetry < WEBKIT_INJECT_KEY_MAX_RETRIES) {
|
|
1235
|
-
var delay_1 = WEBKIT_INJECT_KEY_BASE_DELAY_MS * Math.pow(1.5, _webkitRetry);
|
|
1233
|
+
if (isWebKitInjectKeyError$1(ex) &&
|
|
1234
|
+
_webkitRetry < WEBKIT_INJECT_KEY_MAX_RETRIES$1) {
|
|
1235
|
+
var delay_1 = WEBKIT_INJECT_KEY_BASE_DELAY_MS$1 * Math.pow(1.5, _webkitRetry);
|
|
1236
1236
|
if (_webkitRetry === 0) {
|
|
1237
1237
|
console.warn('Dexie: WebKit "Cannot inject key" workaround — retrying transaction');
|
|
1238
1238
|
}
|
|
@@ -1245,7 +1245,7 @@
|
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
1247
|
|
|
1248
|
-
var DEXIE_VERSION = '4.4.2-pr2297.
|
|
1248
|
+
var DEXIE_VERSION = '4.4.2-pr2297.4';
|
|
1249
1249
|
var maxString = String.fromCharCode(65535);
|
|
1250
1250
|
var minKey = -Infinity;
|
|
1251
1251
|
var INVALID_KEY_ARGUMENT = 'Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.';
|
|
@@ -4697,6 +4697,13 @@
|
|
|
4697
4697
|
return step(callNext)();
|
|
4698
4698
|
}
|
|
4699
4699
|
|
|
4700
|
+
function isWebKitInjectKeyError(ex) {
|
|
4701
|
+
return ((ex === null || ex === void 0 ? void 0 : ex.name) === 'UnknownError' &&
|
|
4702
|
+
typeof (ex === null || ex === void 0 ? void 0 : ex.message) === 'string' &&
|
|
4703
|
+
ex.message.includes('inject key'));
|
|
4704
|
+
}
|
|
4705
|
+
var WEBKIT_INJECT_KEY_MAX_RETRIES = 7;
|
|
4706
|
+
var WEBKIT_INJECT_KEY_BASE_DELAY_MS = 100;
|
|
4700
4707
|
function extractTransactionArgs(mode, _tableArgs_, scopeFunc) {
|
|
4701
4708
|
var i = arguments.length;
|
|
4702
4709
|
if (i < 2)
|
|
@@ -4708,7 +4715,8 @@
|
|
|
4708
4715
|
var tables = flatten(args);
|
|
4709
4716
|
return [mode, tables, scopeFunc];
|
|
4710
4717
|
}
|
|
4711
|
-
function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc) {
|
|
4718
|
+
function enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc, _webkitRetry) {
|
|
4719
|
+
if (_webkitRetry === void 0) { _webkitRetry = 0; }
|
|
4712
4720
|
return DexiePromise.resolve().then(function () {
|
|
4713
4721
|
var transless = PSD.transless || PSD;
|
|
4714
4722
|
var trans = db._createTransaction(mode, storeNames, db._dbSchema, parentTransaction);
|
|
@@ -4774,6 +4782,19 @@
|
|
|
4774
4782
|
return trans._completion.then(function () { return x; });
|
|
4775
4783
|
})
|
|
4776
4784
|
.catch(function (e) {
|
|
4785
|
+
if (!parentTransaction &&
|
|
4786
|
+
isWebKitInjectKeyError(e) &&
|
|
4787
|
+
_webkitRetry < WEBKIT_INJECT_KEY_MAX_RETRIES) {
|
|
4788
|
+
var delay_1 = WEBKIT_INJECT_KEY_BASE_DELAY_MS * Math.pow(1.5, _webkitRetry);
|
|
4789
|
+
if (_webkitRetry === 0) {
|
|
4790
|
+
console.warn('Dexie: WebKit "Cannot inject key" workaround — retrying transaction');
|
|
4791
|
+
}
|
|
4792
|
+
return new DexiePromise(function (resolve) {
|
|
4793
|
+
return setTimeout(resolve, delay_1);
|
|
4794
|
+
}).then(function () {
|
|
4795
|
+
return enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc, _webkitRetry + 1);
|
|
4796
|
+
});
|
|
4797
|
+
}
|
|
4777
4798
|
trans._reject(e);
|
|
4778
4799
|
return rejection(e);
|
|
4779
4800
|
});
|