indexeddbshim 15.0.4 → 15.2.0
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/CFG.d.ts +3 -36
- package/dist/CFG.d.ts.map +1 -1
- package/dist/DOMException.d.ts +1 -1
- package/dist/DOMException.d.ts.map +1 -1
- package/dist/DOMStringList.d.ts +1 -1
- package/dist/DOMStringList.d.ts.map +1 -1
- package/dist/Event.d.ts.map +1 -1
- package/dist/IDBCursor.d.ts +21 -21
- package/dist/IDBCursor.d.ts.map +1 -1
- package/dist/IDBDatabase.d.ts +13 -11
- package/dist/IDBDatabase.d.ts.map +1 -1
- package/dist/IDBFactory.d.ts +4 -4
- package/dist/IDBFactory.d.ts.map +1 -1
- package/dist/IDBIndex.d.ts +17 -17
- package/dist/IDBIndex.d.ts.map +1 -1
- package/dist/IDBKeyRange.d.ts +7 -7
- package/dist/IDBKeyRange.d.ts.map +1 -1
- package/dist/IDBObjectStore.d.ts +33 -33
- package/dist/IDBObjectStore.d.ts.map +1 -1
- package/dist/IDBRequest.d.ts +6 -19
- package/dist/IDBRequest.d.ts.map +1 -1
- package/dist/IDBTransaction.d.ts +13 -13
- package/dist/IDBTransaction.d.ts.map +1 -1
- package/dist/Key.d.ts +10 -10
- package/dist/Key.d.ts.map +1 -1
- package/dist/Sca.d.ts +1 -1
- package/dist/Sca.d.ts.map +1 -1
- package/dist/UnicodeIdentifiers.d.ts +2 -2
- package/dist/UnicodeIdentifiers.d.ts.map +1 -1
- package/dist/cmp.d.ts +1 -1
- package/dist/indexeddbshim-Key.js +3 -2
- package/dist/indexeddbshim-Key.js.map +1 -1
- package/dist/indexeddbshim-Key.min.js +1 -1
- package/dist/indexeddbshim-Key.min.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +75 -63
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +85 -74
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +2 -2
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +75 -63
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +85 -74
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +2 -2
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +85 -74
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +2 -2
- package/dist/indexeddbshim.min.js.map +1 -1
- package/dist/node-UnicodeIdentifiers.d.ts +1 -1
- package/dist/node-UnicodeIdentifiers.d.ts.map +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/setGlobalVars.d.ts +4 -5
- package/dist/setGlobalVars.d.ts.map +1 -1
- package/dist/util.d.ts +3 -2
- package/dist/util.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/IDBFactory.js +1 -0
- package/src/IDBIndex.js +18 -4
- package/src/IDBObjectStore.js +1 -3
- package/src/Key.js +2 -1
- package/src/util.js +2 -1
- package/src/Key.d.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim - v15.0
|
|
1
|
+
/*! indexeddbshim - v15.2.0 - 9/11/2024 */
|
|
2
2
|
|
|
3
3
|
(function (factory) {
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -1851,12 +1851,13 @@
|
|
|
1851
1851
|
}
|
|
1852
1852
|
|
|
1853
1853
|
/**
|
|
1854
|
+
* @todo Didn't need to escape `%`. Do we still need this escape?
|
|
1854
1855
|
* @param {string} str
|
|
1855
1856
|
* @returns {string}
|
|
1856
1857
|
*/
|
|
1857
1858
|
function sqlLIKEEscape(str) {
|
|
1858
1859
|
// https://www.sqlite.org/lang_expr.html#like
|
|
1859
|
-
return
|
|
1860
|
+
return str.replaceAll('^', '^^');
|
|
1860
1861
|
}
|
|
1861
1862
|
|
|
1862
1863
|
/**
|
|
@@ -4049,6 +4050,7 @@
|
|
|
4049
4050
|
continue;
|
|
4050
4051
|
}
|
|
4051
4052
|
if (key.length === 1) {
|
|
4053
|
+
// eslint-disable-next-line sonarjs/updated-loop-counter -- Convenient
|
|
4052
4054
|
key = key[0];
|
|
4053
4055
|
} else {
|
|
4054
4056
|
var nested = findMultiEntryMatches(key, range);
|
|
@@ -4275,7 +4277,7 @@
|
|
|
4275
4277
|
*
|
|
4276
4278
|
* @param {SQLTransaction} tx
|
|
4277
4279
|
* @param {import('./IDBObjectStore.js').IDBObjectStoreFull} store
|
|
4278
|
-
* @param {
|
|
4280
|
+
* @param {Key} key
|
|
4279
4281
|
* @param {(num?: Integer) => void} successCb
|
|
4280
4282
|
* @param {SQLFailureCallback} sqlFailCb
|
|
4281
4283
|
* @returns {void}
|
|
@@ -5897,8 +5899,8 @@
|
|
|
5897
5899
|
p = [],
|
|
5898
5900
|
d = [],
|
|
5899
5901
|
v = !("cyclic" in u) || u.cyclic,
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
+
m = u.encapsulateObserver,
|
|
5903
|
+
b = function finish(e) {
|
|
5902
5904
|
var t = Object.values(f);
|
|
5903
5905
|
if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
|
|
5904
5906
|
if (t.length) {
|
|
@@ -5923,7 +5925,7 @@
|
|
|
5923
5925
|
});
|
|
5924
5926
|
return !u.returnTypeNames && e;
|
|
5925
5927
|
},
|
|
5926
|
-
|
|
5928
|
+
h = _async(function (t, r) {
|
|
5927
5929
|
return _await(Promise.all(r.map(function (e) {
|
|
5928
5930
|
return e[1].p;
|
|
5929
5931
|
})), function (n) {
|
|
@@ -5946,11 +5948,11 @@
|
|
|
5946
5948
|
}(function () {
|
|
5947
5949
|
if (s && v) return _await(d.p, function (e) {
|
|
5948
5950
|
f[y] = e;
|
|
5949
|
-
var r =
|
|
5951
|
+
var r = h(t, o);
|
|
5950
5952
|
return a = !0, r;
|
|
5951
5953
|
});
|
|
5952
5954
|
}, function (e) {
|
|
5953
|
-
return a ? e : (s ? f[y] = d : t = v ? d.p : d,
|
|
5955
|
+
return a ? e : (s ? f[y] = d : t = v ? d.p : d, h(t, o));
|
|
5954
5956
|
});
|
|
5955
5957
|
}))), function () {
|
|
5956
5958
|
return t;
|
|
@@ -5968,13 +5970,13 @@
|
|
|
5968
5970
|
});
|
|
5969
5971
|
},
|
|
5970
5972
|
O = function _encapsulate(t, r, i, c, l, d, v) {
|
|
5971
|
-
var
|
|
5972
|
-
|
|
5973
|
+
var b,
|
|
5974
|
+
h = {},
|
|
5973
5975
|
O = _typeof(r),
|
|
5974
|
-
_ =
|
|
5976
|
+
_ = m ? function (n) {
|
|
5975
5977
|
var a,
|
|
5976
5978
|
o = null !== (a = null != v ? v : c.type) && void 0 !== a ? a : getJSONType(r);
|
|
5977
|
-
|
|
5979
|
+
m(Object.assign(null != n ? n : h, {
|
|
5978
5980
|
keypath: t,
|
|
5979
5981
|
value: r,
|
|
5980
5982
|
cyclic: i,
|
|
@@ -5986,9 +5988,9 @@
|
|
|
5986
5988
|
type: o
|
|
5987
5989
|
}));
|
|
5988
5990
|
} : null;
|
|
5989
|
-
if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (
|
|
5990
|
-
replaced:
|
|
5991
|
-
}) :
|
|
5991
|
+
if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (b = c.replaced ? r : w(t, r, c, l, !1, d, _)) !== r && (h = {
|
|
5992
|
+
replaced: b
|
|
5993
|
+
}) : b = r, _ && _(), b;
|
|
5992
5994
|
if (null === r) return _ && _(), r;
|
|
5993
5995
|
if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
|
|
5994
5996
|
var A = y.indexOf(r);
|
|
@@ -6002,14 +6004,14 @@
|
|
|
6002
6004
|
T = isPlainObject(r),
|
|
6003
6005
|
I = o(r),
|
|
6004
6006
|
N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : w(t, r, c, l, T || I, null, _);
|
|
6005
|
-
if (N !== r ? (
|
|
6007
|
+
if (N !== r ? (b = N, h = {
|
|
6006
6008
|
replaced: N
|
|
6007
|
-
}) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]),
|
|
6009
|
+
}) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), b = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), h = {
|
|
6008
6010
|
clone: S
|
|
6009
|
-
}) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ?
|
|
6011
|
+
}) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? b = r : (S = {}, c.addLength && (S.length = r.length), h = {
|
|
6010
6012
|
clone: S
|
|
6011
|
-
}), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j :
|
|
6012
|
-
if (!S) return
|
|
6013
|
+
}), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : b;
|
|
6014
|
+
if (!S) return b;
|
|
6013
6015
|
if (c.iterateIn) {
|
|
6014
6016
|
var P = function _loop(n) {
|
|
6015
6017
|
var o = {
|
|
@@ -6075,12 +6077,12 @@
|
|
|
6075
6077
|
i && i({
|
|
6076
6078
|
replacing: !0
|
|
6077
6079
|
});
|
|
6078
|
-
var
|
|
6080
|
+
var m = void 0;
|
|
6079
6081
|
if (l || !y.replaceAsync) {
|
|
6080
6082
|
if (void 0 === y.replace) throw new TypeError("Missing replacer");
|
|
6081
|
-
|
|
6082
|
-
} else
|
|
6083
|
-
return O(e,
|
|
6083
|
+
m = y.replace(t, r);
|
|
6084
|
+
} else m = y.replaceAsync(t, r);
|
|
6085
|
+
return O(e, m, v && "readonly", r, n, o, p);
|
|
6084
6086
|
}
|
|
6085
6087
|
}
|
|
6086
6088
|
return t;
|
|
@@ -6088,9 +6090,9 @@
|
|
|
6088
6090
|
_ = O("", t, v, null != r ? r : {}, d);
|
|
6089
6091
|
if (d.length) return l && u.throwOnBadSyncType ? function () {
|
|
6090
6092
|
throw new TypeError("Sync method requested but async result obtained");
|
|
6091
|
-
}() : Promise.resolve(
|
|
6093
|
+
}() : Promise.resolve(h(_, d)).then(b);
|
|
6092
6094
|
if (!l && u.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
|
|
6093
|
-
return u.stringification && l ? [
|
|
6095
|
+
return u.stringification && l ? [b(_)] : l ? b(_) : Promise.resolve(b(_));
|
|
6094
6096
|
}
|
|
6095
6097
|
}, {
|
|
6096
6098
|
key: "encapsulateSync",
|
|
@@ -6145,7 +6147,7 @@
|
|
|
6145
6147
|
return hasConstructorOf(e, s) ? void 0 : e;
|
|
6146
6148
|
}
|
|
6147
6149
|
var v,
|
|
6148
|
-
|
|
6150
|
+
m = function revivePlainObjects() {
|
|
6149
6151
|
var r = [];
|
|
6150
6152
|
if (!u) throw new Error("Found bad `types`");
|
|
6151
6153
|
if (Object.entries(u).forEach(function (e) {
|
|
@@ -6177,29 +6179,29 @@
|
|
|
6177
6179
|
c === i && (t = c);
|
|
6178
6180
|
}, void 0);
|
|
6179
6181
|
}();
|
|
6180
|
-
return hasConstructorOf(
|
|
6182
|
+
return hasConstructorOf(m, e) ? v = m.then(function () {
|
|
6181
6183
|
return t;
|
|
6182
6184
|
}) : (v = function _revive(t, r, a, i, c) {
|
|
6183
6185
|
if (!y || "$types" !== t) {
|
|
6184
6186
|
var f = u[t],
|
|
6185
6187
|
v = o(r);
|
|
6186
6188
|
if (v || isPlainObject(r)) {
|
|
6187
|
-
var
|
|
6189
|
+
var m = v ? new Array(r.length) : {};
|
|
6188
6190
|
for (n(r).forEach(function (n) {
|
|
6189
|
-
var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a :
|
|
6191
|
+
var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : m, m, n),
|
|
6190
6192
|
i = function set(e) {
|
|
6191
|
-
return hasConstructorOf(e, s) ?
|
|
6193
|
+
return hasConstructorOf(e, s) ? m[n] = void 0 : void 0 !== e && (m[n] = e), e;
|
|
6192
6194
|
};
|
|
6193
6195
|
hasConstructorOf(o, e) ? d.push(o.then(function (e) {
|
|
6194
6196
|
return i(e);
|
|
6195
6197
|
})) : i(o);
|
|
6196
|
-
}), r =
|
|
6197
|
-
var
|
|
6198
|
-
|
|
6199
|
-
g =
|
|
6200
|
-
O =
|
|
6201
|
-
w =
|
|
6202
|
-
_ = getByKeyPath(
|
|
6198
|
+
}), r = m; l.length;) {
|
|
6199
|
+
var b = _slicedToArray(l[0], 4),
|
|
6200
|
+
h = b[0],
|
|
6201
|
+
g = b[1],
|
|
6202
|
+
O = b[2],
|
|
6203
|
+
w = b[3],
|
|
6204
|
+
_ = getByKeyPath(h, g);
|
|
6203
6205
|
if (void 0 === _) break;
|
|
6204
6206
|
O[w] = _, l.splice(0, 1);
|
|
6205
6207
|
}
|
|
@@ -6353,7 +6355,7 @@
|
|
|
6353
6355
|
}
|
|
6354
6356
|
}
|
|
6355
6357
|
},
|
|
6356
|
-
|
|
6358
|
+
m = {
|
|
6357
6359
|
bigintObject: {
|
|
6358
6360
|
test: function test(e) {
|
|
6359
6361
|
return "object" == _typeof$2(e) && hasConstructorOf(e, BigInt);
|
|
@@ -6364,7 +6366,7 @@
|
|
|
6364
6366
|
}
|
|
6365
6367
|
}
|
|
6366
6368
|
},
|
|
6367
|
-
|
|
6369
|
+
b = {
|
|
6368
6370
|
bigint: {
|
|
6369
6371
|
test: function test(e) {
|
|
6370
6372
|
return "bigint" == typeof e;
|
|
@@ -6385,7 +6387,7 @@
|
|
|
6385
6387
|
for (var _r = 0; _r < e.length; _r++) t[_r] = e.charCodeAt(_r);
|
|
6386
6388
|
return t.buffer;
|
|
6387
6389
|
}
|
|
6388
|
-
var
|
|
6390
|
+
var h = {
|
|
6389
6391
|
blob: {
|
|
6390
6392
|
test: function test(e) {
|
|
6391
6393
|
return "Blob" === toStringTag(e);
|
|
@@ -6955,7 +6957,7 @@
|
|
|
6955
6957
|
}
|
|
6956
6958
|
}
|
|
6957
6959
|
},
|
|
6958
|
-
|
|
6960
|
+
Y = {
|
|
6959
6961
|
regexp: {
|
|
6960
6962
|
test: function test(e) {
|
|
6961
6963
|
return "RegExp" === toStringTag(e);
|
|
@@ -6966,14 +6968,14 @@
|
|
|
6966
6968
|
flags: (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.sticky ? "y" : "") + (e.unicode ? "u" : "")
|
|
6967
6969
|
};
|
|
6968
6970
|
},
|
|
6969
|
-
revive: function revive(
|
|
6970
|
-
var e =
|
|
6971
|
-
t =
|
|
6971
|
+
revive: function revive(_ref12) {
|
|
6972
|
+
var e = _ref12.source,
|
|
6973
|
+
t = _ref12.flags;
|
|
6972
6974
|
return new RegExp(e, t);
|
|
6973
6975
|
}
|
|
6974
6976
|
}
|
|
6975
6977
|
},
|
|
6976
|
-
|
|
6978
|
+
H = {
|
|
6977
6979
|
set: {
|
|
6978
6980
|
test: function test(e) {
|
|
6979
6981
|
return "Set" === toStringTag(e);
|
|
@@ -6986,11 +6988,11 @@
|
|
|
6986
6988
|
}
|
|
6987
6989
|
}
|
|
6988
6990
|
},
|
|
6989
|
-
|
|
6991
|
+
Q = {};
|
|
6990
6992
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
|
|
6991
6993
|
return function create$1(e) {
|
|
6992
6994
|
var t = e.name;
|
|
6993
|
-
|
|
6995
|
+
Q[t.toLowerCase()] = {
|
|
6994
6996
|
test: function test(e) {
|
|
6995
6997
|
return toStringTag(e) === t;
|
|
6996
6998
|
},
|
|
@@ -7003,18 +7005,18 @@
|
|
|
7003
7005
|
};
|
|
7004
7006
|
}(e);
|
|
7005
7007
|
});
|
|
7006
|
-
var
|
|
7008
|
+
var X = {};
|
|
7007
7009
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
|
|
7008
7010
|
return function create(e) {
|
|
7009
7011
|
var t = e.name;
|
|
7010
|
-
|
|
7012
|
+
X[t.toLowerCase()] = {
|
|
7011
7013
|
test: function test(e) {
|
|
7012
7014
|
return toStringTag(e) === t;
|
|
7013
7015
|
},
|
|
7014
|
-
replace: function replace(
|
|
7015
|
-
var e =
|
|
7016
|
-
t =
|
|
7017
|
-
r =
|
|
7016
|
+
replace: function replace(_ref13, n) {
|
|
7017
|
+
var e = _ref13.buffer,
|
|
7018
|
+
t = _ref13.byteOffset,
|
|
7019
|
+
r = _ref13.length;
|
|
7018
7020
|
n.buffers || (n.buffers = []);
|
|
7019
7021
|
var a = n.buffers.indexOf(e);
|
|
7020
7022
|
return a > -1 ? {
|
|
@@ -7043,7 +7045,7 @@
|
|
|
7043
7045
|
};
|
|
7044
7046
|
}(e);
|
|
7045
7047
|
});
|
|
7046
|
-
var
|
|
7048
|
+
var Z = {
|
|
7047
7049
|
undef: {
|
|
7048
7050
|
test: function test(e, t) {
|
|
7049
7051
|
return void 0 === e && (t.ownKeys || !("ownKeys" in t));
|
|
@@ -7056,7 +7058,7 @@
|
|
|
7056
7058
|
}
|
|
7057
7059
|
}
|
|
7058
7060
|
},
|
|
7059
|
-
|
|
7061
|
+
ee = {
|
|
7060
7062
|
userObject: {
|
|
7061
7063
|
test: function test(e) {
|
|
7062
7064
|
return isUserObject(e);
|
|
@@ -7069,7 +7071,7 @@
|
|
|
7069
7071
|
}
|
|
7070
7072
|
}
|
|
7071
7073
|
},
|
|
7072
|
-
|
|
7074
|
+
te = [{
|
|
7073
7075
|
arrayNonindexKeys: {
|
|
7074
7076
|
testPlainObjects: !0,
|
|
7075
7077
|
test: function test(e, t) {
|
|
@@ -7083,10 +7085,10 @@
|
|
|
7083
7085
|
revive: function revive(e) {
|
|
7084
7086
|
if (Array.isArray(e)) return e;
|
|
7085
7087
|
var t = [];
|
|
7086
|
-
return Object.entries(e).forEach(function (
|
|
7087
|
-
var
|
|
7088
|
-
e =
|
|
7089
|
-
r =
|
|
7088
|
+
return Object.entries(e).forEach(function (_ref14) {
|
|
7089
|
+
var _ref15 = _slicedToArray$1(_ref14, 2),
|
|
7090
|
+
e = _ref15[0],
|
|
7091
|
+
r = _ref15[1];
|
|
7090
7092
|
t[e] = r;
|
|
7091
7093
|
}), t;
|
|
7092
7094
|
}
|
|
@@ -7102,9 +7104,9 @@
|
|
|
7102
7104
|
revive: function revive() {}
|
|
7103
7105
|
}
|
|
7104
7106
|
}],
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7107
|
+
re = [K, U, F, $],
|
|
7108
|
+
ce = [ee, Z, te, V, re, A, Y, k, B, E, C, h, P, x].concat("function" == typeof Map ? D : [], "function" == typeof Set ? H : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? X : [], "function" == typeof DataView ? _ : [], "undefined" != typeof crypto ? w : [], "undefined" != typeof BigInt ? [b, m] : [], "undefined" != typeof DOMException ? S : [], "undefined" != typeof DOMRect ? N : [], "undefined" != typeof DOMPoint ? T : [], "undefined" != typeof DOMQuad ? I : [], "undefined" != typeof DOMMatrix ? j : []),
|
|
7109
|
+
se = ce.concat({
|
|
7108
7110
|
checkDataCloneException: {
|
|
7109
7111
|
test: function test(e) {
|
|
7110
7112
|
var t = {}.toString.call(e).slice(8, -1);
|
|
@@ -7116,7 +7118,7 @@
|
|
|
7116
7118
|
|
|
7117
7119
|
// See: http://stackoverflow.com/questions/42170826/categories-for-rejection-by-the-structured-cloning-algorithm
|
|
7118
7120
|
|
|
7119
|
-
var typeson = new c().register(
|
|
7121
|
+
var typeson = new c().register(se);
|
|
7120
7122
|
|
|
7121
7123
|
/**
|
|
7122
7124
|
* @param {(preset: import('typeson-registry').Preset) =>
|
|
@@ -7124,7 +7126,7 @@
|
|
|
7124
7126
|
* @returns {void}
|
|
7125
7127
|
*/
|
|
7126
7128
|
function register(func) {
|
|
7127
|
-
typeson = new c().register(func(
|
|
7129
|
+
typeson = new c().register(func(se));
|
|
7128
7130
|
}
|
|
7129
7131
|
|
|
7130
7132
|
/**
|
|
@@ -7576,6 +7578,7 @@
|
|
|
7576
7578
|
IDBIndex.__updateIndexList = function (store, tx, success, failure) {
|
|
7577
7579
|
/** @type {IndexList} **/
|
|
7578
7580
|
var indexList = {};
|
|
7581
|
+
// eslint-disable-next-line sonarjs/prefer-for-of -- Implement iterability?
|
|
7579
7582
|
for (var i = 0; i < store.indexNames.length; i++) {
|
|
7580
7583
|
var idx = store.__indexes[store.indexNames[i]];
|
|
7581
7584
|
indexList[idx.name] = {
|
|
@@ -7968,8 +7971,11 @@
|
|
|
7968
7971
|
return rowKey.includes(check);
|
|
7969
7972
|
}) ||
|
|
7970
7973
|
// More precise than our SQL
|
|
7971
|
-
isMultiEntryMatch(
|
|
7972
|
-
|
|
7974
|
+
isMultiEntryMatch(
|
|
7975
|
+
// Added `JSON.stringify` as was having problems with
|
|
7976
|
+
// `JSON.stringify` encoding added to nested
|
|
7977
|
+
// array keys
|
|
7978
|
+
JSON.stringify(encodedKey).slice(1, -1), row[escapedIndexNameForKeyCol]))) {
|
|
7973
7979
|
recordCount++;
|
|
7974
7980
|
record = row;
|
|
7975
7981
|
} else if (!hasKey && !multiChecks) {
|
|
@@ -8045,7 +8051,13 @@
|
|
|
8045
8051
|
sql.push(')');
|
|
8046
8052
|
} else if (index.multiEntry) {
|
|
8047
8053
|
sql.push('AND', escapeIndexNameForSQL(index.name), "LIKE ? ESCAPE '^'");
|
|
8048
|
-
|
|
8054
|
+
if (Array.isArray(range)) {
|
|
8055
|
+
// Todo: For nesting deeper than one level, we probably need to
|
|
8056
|
+
// run `JSON.stringify` again
|
|
8057
|
+
sqlValues.push('%' + sqlLIKEEscape(JSON.stringify(/** @type {string} */_encode(range, index.multiEntry)).slice(1, -1)) + '%');
|
|
8058
|
+
} else {
|
|
8059
|
+
sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */_encode(range, index.multiEntry)) + '%');
|
|
8060
|
+
}
|
|
8049
8061
|
} else {
|
|
8050
8062
|
var convertedRange = convertValueToKeyRange(range, nullDisallowed);
|
|
8051
8063
|
setSQLForKeyRange(convertedRange, escapeIndexNameForSQL(index.name), sql, sqlValues, true, false);
|
|
@@ -8469,7 +8481,6 @@
|
|
|
8469
8481
|
if (me.autoIncrement) {
|
|
8470
8482
|
// If auto-increment and no valid primaryKey found on the keyPath, get and set the new value, and use
|
|
8471
8483
|
if (key === undefined) {
|
|
8472
|
-
// @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
|
|
8473
8484
|
generateKeyForStore(tx, me, function (failure, key, oldCn) {
|
|
8474
8485
|
if (failure) {
|
|
8475
8486
|
failCb(createDOMException('ConstraintError', 'The key generator\'s current number has reached the maximum safe integer limit'));
|
|
@@ -8483,7 +8494,6 @@
|
|
|
8483
8494
|
success(key, oldCn);
|
|
8484
8495
|
}, failCb);
|
|
8485
8496
|
} else {
|
|
8486
|
-
// @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
|
|
8487
8497
|
possiblyUpdateKeyGenerator(tx, me, key, keyCloneThenSuccess, failCb);
|
|
8488
8498
|
}
|
|
8489
8499
|
// Not auto-increment
|
|
@@ -8618,6 +8628,7 @@
|
|
|
8618
8628
|
return false;
|
|
8619
8629
|
});
|
|
8620
8630
|
return undefined;
|
|
8631
|
+
// eslint-disable-next-line sonarjs/no-invariant-returns -- Convenient
|
|
8621
8632
|
})["catch"](function (err) {
|
|
8622
8633
|
/**
|
|
8623
8634
|
* @returns {void}
|
|
@@ -8628,7 +8639,6 @@
|
|
|
8628
8639
|
error(err);
|
|
8629
8640
|
}
|
|
8630
8641
|
if (typeof oldCn === 'number') {
|
|
8631
|
-
// @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
|
|
8632
8642
|
assignCurrentNumber(tx, me, oldCn, fail, fail);
|
|
8633
8643
|
return null;
|
|
8634
8644
|
}
|
|
@@ -9748,6 +9758,7 @@
|
|
|
9748
9758
|
}
|
|
9749
9759
|
req.addEventListener('success', removeFromQueue);
|
|
9750
9760
|
req.addEventListener('error', removeFromQueue);
|
|
9761
|
+
req.addEventListener('blocked', removeFromQueue);
|
|
9751
9762
|
cb(req);
|
|
9752
9763
|
}
|
|
9753
9764
|
|
|
@@ -10564,7 +10575,7 @@
|
|
|
10564
10575
|
* @param {import('./Key.js').Key} key1
|
|
10565
10576
|
* @param {import('./Key.js').Key} key2
|
|
10566
10577
|
* @throws {TypeError}
|
|
10567
|
-
* @returns {
|
|
10578
|
+
* @returns {number}
|
|
10568
10579
|
*/
|
|
10569
10580
|
IDBFactory.prototype.cmp = function (key1, key2) {
|
|
10570
10581
|
if (!(this instanceof IDBFactory)) {
|
|
@@ -11611,7 +11622,7 @@
|
|
|
11611
11622
|
/**
|
|
11612
11623
|
* @typedef {(
|
|
11613
11624
|
* prop: import('./CFG.js').KeyofConfigValues
|
|
11614
|
-
* ) => import('
|
|
11625
|
+
* ) => import('./CFG.js').ConfigValue} GetConfig
|
|
11615
11626
|
*/
|
|
11616
11627
|
|
|
11617
11628
|
/**
|