indexeddbshim 11.0.0-beta.0 → 12.0.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/badges/licenses-badge-dev.svg +1 -1
- package/badges/licenses-badge.svg +1 -1
- package/dist/indexeddbshim-Key.js +13 -4
- package/dist/indexeddbshim-Key.js.map +1 -1
- package/dist/indexeddbshim-Key.min.js +2 -2
- package/dist/indexeddbshim-Key.min.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +148 -150
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +132 -49
- 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 +148 -150
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +132 -49
- 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 +132 -49
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +2 -2
- package/dist/indexeddbshim.min.js.map +1 -1
- package/package.json +29 -29
- package/src/Key.js +6 -0
- package/src/unicode-regex.js +7 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim -
|
|
1
|
+
/*! indexeddbshim - v11.0.0 - 4/29/2023 */
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -6,86 +6,6 @@ var fs$1 = require('node:fs');
|
|
|
6
6
|
var path = require('path');
|
|
7
7
|
var customOpenDatabase = require('websql/custom/index.js');
|
|
8
8
|
|
|
9
|
-
function ownKeys$1(object, enumerableOnly) {
|
|
10
|
-
var keys = Object.keys(object);
|
|
11
|
-
if (Object.getOwnPropertySymbols) {
|
|
12
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
13
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
14
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
15
|
-
})), keys.push.apply(keys, symbols);
|
|
16
|
-
}
|
|
17
|
-
return keys;
|
|
18
|
-
}
|
|
19
|
-
function _objectSpread2$1(target) {
|
|
20
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
21
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
22
|
-
i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
|
|
23
|
-
_defineProperty$1(target, key, source[key]);
|
|
24
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
|
|
25
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
}
|
|
30
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
31
|
-
try {
|
|
32
|
-
var info = gen[key](arg);
|
|
33
|
-
var value = info.value;
|
|
34
|
-
} catch (error) {
|
|
35
|
-
reject(error);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (info.done) {
|
|
39
|
-
resolve(value);
|
|
40
|
-
} else {
|
|
41
|
-
Promise.resolve(value).then(_next, _throw);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function _asyncToGenerator(fn) {
|
|
45
|
-
return function () {
|
|
46
|
-
var self = this,
|
|
47
|
-
args = arguments;
|
|
48
|
-
return new Promise(function (resolve, reject) {
|
|
49
|
-
var gen = fn.apply(self, args);
|
|
50
|
-
function _next(value) {
|
|
51
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
52
|
-
}
|
|
53
|
-
function _throw(err) {
|
|
54
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
55
|
-
}
|
|
56
|
-
_next(undefined);
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function _defineProperty$1(obj, key, value) {
|
|
61
|
-
key = _toPropertyKey$1(key);
|
|
62
|
-
if (key in obj) {
|
|
63
|
-
Object.defineProperty(obj, key, {
|
|
64
|
-
value: value,
|
|
65
|
-
enumerable: true,
|
|
66
|
-
configurable: true,
|
|
67
|
-
writable: true
|
|
68
|
-
});
|
|
69
|
-
} else {
|
|
70
|
-
obj[key] = value;
|
|
71
|
-
}
|
|
72
|
-
return obj;
|
|
73
|
-
}
|
|
74
|
-
function _toPrimitive(input, hint) {
|
|
75
|
-
if (typeof input !== "object" || input === null) return input;
|
|
76
|
-
var prim = input[Symbol.toPrimitive];
|
|
77
|
-
if (prim !== undefined) {
|
|
78
|
-
var res = prim.call(input, hint || "default");
|
|
79
|
-
if (typeof res !== "object") return res;
|
|
80
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
81
|
-
}
|
|
82
|
-
return (hint === "string" ? String : Number)(input);
|
|
83
|
-
}
|
|
84
|
-
function _toPropertyKey$1(arg) {
|
|
85
|
-
var key = _toPrimitive(arg, "string");
|
|
86
|
-
return typeof key === "symbol" ? key : String(key);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
9
|
function _typeof$1(obj) {
|
|
90
10
|
"@babel/helpers - typeof";
|
|
91
11
|
|
|
@@ -929,7 +849,11 @@ const CFG = {};
|
|
|
929
849
|
});
|
|
930
850
|
});
|
|
931
851
|
|
|
852
|
+
function getDefaultExportFromCjs$1(x) {
|
|
853
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
854
|
+
}
|
|
932
855
|
var regex = /[\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD9-\xDD\xE0-\xE5\xE7-\xEF\xF1-\xF6\xF9-\xFD\xFF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0344\u0385\u0386\u0388-\u038A\u038C\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEE\u1FF2-\u1FF4\u1FF6-\u1FFC\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2ADC\u304C\u304E\u3050\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4\u30F7-\u30FA\u30FE\uAC00-\uD7A3\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;
|
|
856
|
+
var regex$1 = /*@__PURE__*/getDefaultExportFromCjs$1(regex);
|
|
933
857
|
|
|
934
858
|
function escapeUnmatchedSurrogates(arg) {
|
|
935
859
|
// http://stackoverflow.com/a/6701665/271577
|
|
@@ -986,7 +910,7 @@ function escapeDatabaseNameForSQLAndFiles(db) {
|
|
|
986
910
|
db = 'D' + escapeNameForSQLiteIdentifier(db);
|
|
987
911
|
if (CFG.escapeNFDForDatabaseNames !== false) {
|
|
988
912
|
// ES6 copying of regex with different flags
|
|
989
|
-
db = db.replace(new RegExp(regex, 'gu'), function (expandable) {
|
|
913
|
+
db = db.replace(new RegExp(regex$1, 'gu'), function (expandable) {
|
|
990
914
|
return '^4' + expandable.codePointAt().toString(16).padStart(6, '0');
|
|
991
915
|
});
|
|
992
916
|
}
|
|
@@ -1661,6 +1585,10 @@ Object.defineProperty(IDBOpenDBRequest, 'prototype', {
|
|
|
1661
1585
|
writable: false
|
|
1662
1586
|
});
|
|
1663
1587
|
|
|
1588
|
+
function getDefaultExportFromCjs (x) {
|
|
1589
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1664
1592
|
// Since [immediate](https://github.com/calvinmetcalf/immediate) is
|
|
1665
1593
|
// not doing the trick for our WebSQL transactions (at least in Node),
|
|
1666
1594
|
// we are forced to make the promises run fully synchronously.
|
|
@@ -1809,6 +1737,7 @@ SyncPromise.reject = function (val) {
|
|
|
1809
1737
|
});
|
|
1810
1738
|
};
|
|
1811
1739
|
var syncPromiseCommonjs = SyncPromise;
|
|
1740
|
+
var SyncPromise$1 = /*@__PURE__*/getDefaultExportFromCjs(syncPromiseCommonjs);
|
|
1812
1741
|
|
|
1813
1742
|
/**
|
|
1814
1743
|
* Compares two keys.
|
|
@@ -2107,13 +2036,13 @@ function flipBase32(encoded) {
|
|
|
2107
2036
|
function pow32(mantissa, exponent) {
|
|
2108
2037
|
exponent = Number.parseInt(exponent, 32);
|
|
2109
2038
|
if (exponent < 0) {
|
|
2110
|
-
return roundToPrecision(Number.parseInt(mantissa, 32) *
|
|
2039
|
+
return roundToPrecision(Number.parseInt(mantissa, 32) * 32 ** (exponent - 10));
|
|
2111
2040
|
}
|
|
2112
2041
|
if (exponent < 11) {
|
|
2113
2042
|
let whole = mantissa.slice(0, exponent);
|
|
2114
2043
|
whole = Number.parseInt(whole, 32);
|
|
2115
2044
|
let fraction = mantissa.slice(exponent);
|
|
2116
|
-
fraction = Number.parseInt(fraction, 32) *
|
|
2045
|
+
fraction = Number.parseInt(fraction, 32) * 32 ** (exponent - 11);
|
|
2117
2046
|
return roundToPrecision(whole + fraction);
|
|
2118
2047
|
}
|
|
2119
2048
|
const expansion = mantissa + zeros(exponent - 11);
|
|
@@ -2254,6 +2183,15 @@ function convertValueToKeyValueDecoded(input, seen, multiEntry, fullKeys) {
|
|
|
2254
2183
|
invalid: true
|
|
2255
2184
|
};
|
|
2256
2185
|
}
|
|
2186
|
+
|
|
2187
|
+
// https://github.com/w3c/IndexedDB/issues/375
|
|
2188
|
+
// https://github.com/w3c/IndexedDB/pull/386
|
|
2189
|
+
if (Object.is(input, -0)) {
|
|
2190
|
+
return {
|
|
2191
|
+
type,
|
|
2192
|
+
value: 0
|
|
2193
|
+
};
|
|
2194
|
+
}
|
|
2257
2195
|
return ret;
|
|
2258
2196
|
}
|
|
2259
2197
|
case 'string':
|
|
@@ -3621,14 +3559,14 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
|
|
|
3621
3559
|
bubbles: true,
|
|
3622
3560
|
cancelable: true
|
|
3623
3561
|
});
|
|
3624
|
-
return new
|
|
3562
|
+
return new SyncPromise$1(function (resolve) {
|
|
3625
3563
|
setTimeout(() => {
|
|
3626
3564
|
q.req.dispatchEvent(reqEvt); // No need to catch errors
|
|
3627
3565
|
resolve();
|
|
3628
3566
|
});
|
|
3629
3567
|
});
|
|
3630
3568
|
});
|
|
3631
|
-
},
|
|
3569
|
+
}, SyncPromise$1.resolve()).then(function () {
|
|
3632
3570
|
// Also works when there are no pending requests
|
|
3633
3571
|
const evt = createEvent('abort', err, {
|
|
3634
3572
|
bubbles: true,
|
|
@@ -4119,7 +4057,7 @@ var u = function () {
|
|
|
4119
4057
|
type: o
|
|
4120
4058
|
}));
|
|
4121
4059
|
} : null;
|
|
4122
|
-
if (["string", "boolean", "number", "undefined"].includes(m)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY ? (h = s.replaced ? r : replace(t, r, s, u, !1, d, O)) !== r && (g = {
|
|
4060
|
+
if (["string", "boolean", "number", "undefined"].includes(m)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (h = s.replaced ? r : replace(t, r, s, u, !1, d, O)) !== r && (g = {
|
|
4123
4061
|
replaced: h
|
|
4124
4062
|
}) : h = r, O && O(), h;
|
|
4125
4063
|
if (null === r) return O && O(), r;
|
|
@@ -4131,14 +4069,14 @@ var u = function () {
|
|
|
4131
4069
|
!0 === a && (y.push(r), p.push(t));
|
|
4132
4070
|
}
|
|
4133
4071
|
var _,
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
j = (
|
|
4072
|
+
A = isPlainObject(r),
|
|
4073
|
+
w = i(r),
|
|
4074
|
+
j = (A || w) && (!l.plainObjectReplacers.length || s.replaced) || s.iterateIn ? r : replace(t, r, s, u, A || w, null, O);
|
|
4137
4075
|
if (j !== r ? (h = j, g = {
|
|
4138
4076
|
replaced: j
|
|
4139
|
-
}) : "" === t && hasConstructorOf(r, e) ? (u.push([t, r, a, s, void 0, void 0, s.type]), h = r) :
|
|
4077
|
+
}) : "" === t && hasConstructorOf(r, e) ? (u.push([t, r, a, s, void 0, void 0, s.type]), h = r) : w && "object" !== s.iterateIn || "array" === s.iterateIn ? (_ = new Array(r.length), g = {
|
|
4140
4078
|
clone: _
|
|
4141
|
-
}) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !
|
|
4079
|
+
}) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !A && "object" !== s.iterateIn ? h = r : (_ = {}, s.addLength && (_.length = r.length), g = {
|
|
4142
4080
|
clone: _
|
|
4143
4081
|
}), O && O(), n.iterateNone) return _ || h;
|
|
4144
4082
|
if (!_) return h;
|
|
@@ -4171,7 +4109,7 @@ var u = function () {
|
|
|
4171
4109
|
end: !0
|
|
4172
4110
|
});
|
|
4173
4111
|
if (s.iterateUnsetNumeric) {
|
|
4174
|
-
for (var
|
|
4112
|
+
for (var N = r.length, P = function _loop2(n) {
|
|
4175
4113
|
if (!(n in r)) {
|
|
4176
4114
|
var o = t + (t ? "." : "") + n;
|
|
4177
4115
|
_adaptBuiltinStateObjectProperties(s, {
|
|
@@ -4181,7 +4119,7 @@ var u = function () {
|
|
|
4181
4119
|
hasConstructorOf(t, e) ? u.push([o, t, Boolean(a), s, _, n, s.type]) : void 0 !== t && (_[n] = t);
|
|
4182
4120
|
});
|
|
4183
4121
|
}
|
|
4184
|
-
},
|
|
4122
|
+
}, E = 0; E < N; E++) P(E);
|
|
4185
4123
|
O && O({
|
|
4186
4124
|
endIterateUnsetNumeric: !0,
|
|
4187
4125
|
end: !0
|
|
@@ -4502,27 +4440,22 @@ const O = {
|
|
|
4502
4440
|
})
|
|
4503
4441
|
}
|
|
4504
4442
|
};
|
|
4505
|
-
const
|
|
4443
|
+
const A = {
|
|
4506
4444
|
cryptokey: {
|
|
4507
4445
|
test: e => "CryptoKey" === toStringTag(e) && e.extractable,
|
|
4508
|
-
replaceAsync: t => new e(
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
usages: t.usages
|
|
4520
|
-
});
|
|
4446
|
+
replaceAsync: t => new e(async (e, r) => {
|
|
4447
|
+
let n;
|
|
4448
|
+
try {
|
|
4449
|
+
n = await crypto.subtle.exportKey("jwk", t);
|
|
4450
|
+
} catch (e) {
|
|
4451
|
+
return void r(e);
|
|
4452
|
+
}
|
|
4453
|
+
e({
|
|
4454
|
+
jwk: n,
|
|
4455
|
+
algorithm: t.algorithm,
|
|
4456
|
+
usages: t.usages
|
|
4521
4457
|
});
|
|
4522
|
-
|
|
4523
|
-
return _ref.apply(this, arguments);
|
|
4524
|
-
};
|
|
4525
|
-
}()),
|
|
4458
|
+
}),
|
|
4526
4459
|
revive: ({
|
|
4527
4460
|
jwk: e,
|
|
4528
4461
|
algorithm: t,
|
|
@@ -4530,7 +4463,7 @@ const w = {
|
|
|
4530
4463
|
}) => crypto.subtle.importKey("jwk", e, t, !0, r)
|
|
4531
4464
|
}
|
|
4532
4465
|
},
|
|
4533
|
-
|
|
4466
|
+
w = {
|
|
4534
4467
|
dataview: {
|
|
4535
4468
|
test: e => "DataView" === toStringTag(e),
|
|
4536
4469
|
replace({
|
|
@@ -4573,16 +4506,68 @@ const w = {
|
|
|
4573
4506
|
revive: e => "NaN" === e ? new Date(Number.NaN) : new Date(e)
|
|
4574
4507
|
}
|
|
4575
4508
|
},
|
|
4509
|
+
T = {
|
|
4510
|
+
error: {
|
|
4511
|
+
test: e => "Error" === toStringTag(e),
|
|
4512
|
+
replace: ({
|
|
4513
|
+
name: e,
|
|
4514
|
+
message: t,
|
|
4515
|
+
cause: r,
|
|
4516
|
+
stack: n,
|
|
4517
|
+
fileName: a,
|
|
4518
|
+
lineNumber: o,
|
|
4519
|
+
columnNumber: i
|
|
4520
|
+
}) => ({
|
|
4521
|
+
name: e,
|
|
4522
|
+
message: t,
|
|
4523
|
+
cause: r,
|
|
4524
|
+
stack: n,
|
|
4525
|
+
fileName: a,
|
|
4526
|
+
lineNumber: o,
|
|
4527
|
+
columnNumber: i
|
|
4528
|
+
}),
|
|
4529
|
+
revive(e) {
|
|
4530
|
+
const t = new Error(e.message);
|
|
4531
|
+
return ["name", "cause", "stack", "fileName", "lineNumber", "columnNumber"].forEach(r => {
|
|
4532
|
+
t[r] = e[r];
|
|
4533
|
+
}), t;
|
|
4534
|
+
}
|
|
4535
|
+
}
|
|
4536
|
+
},
|
|
4576
4537
|
I = {};
|
|
4577
4538
|
function create$2(e) {
|
|
4578
4539
|
I[e.name.toLowerCase()] = {
|
|
4579
4540
|
test: t => hasConstructorOf(t, e),
|
|
4580
|
-
replace:
|
|
4581
|
-
|
|
4541
|
+
replace: ({
|
|
4542
|
+
name: e,
|
|
4543
|
+
message: t,
|
|
4544
|
+
cause: r,
|
|
4545
|
+
stack: n,
|
|
4546
|
+
fileName: a,
|
|
4547
|
+
lineNumber: o,
|
|
4548
|
+
columnNumber: i,
|
|
4549
|
+
errors: c
|
|
4550
|
+
}) => ({
|
|
4551
|
+
name: e,
|
|
4552
|
+
message: t,
|
|
4553
|
+
cause: r,
|
|
4554
|
+
stack: n,
|
|
4555
|
+
fileName: a,
|
|
4556
|
+
lineNumber: o,
|
|
4557
|
+
columnNumber: i,
|
|
4558
|
+
errors: c
|
|
4559
|
+
}),
|
|
4560
|
+
revive(t) {
|
|
4561
|
+
const r = "undefined" != typeof AggregateError && e === AggregateError,
|
|
4562
|
+
n = r ? new e(t.errors, t.message) : new e(t.message);
|
|
4563
|
+
return ["name", "cause", "stack", "fileName", "lineNumber", "columnNumber"].forEach(e => {
|
|
4564
|
+
n[e] = t[e];
|
|
4565
|
+
}), r && (n.errors = t.errors), n;
|
|
4566
|
+
}
|
|
4582
4567
|
};
|
|
4583
4568
|
}
|
|
4584
|
-
[TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(e => create$2(e)), "function" == typeof InternalError && create$2(InternalError);
|
|
4585
|
-
const
|
|
4569
|
+
[TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(e => create$2(e)), "undefined" != typeof AggregateError && create$2(AggregateError), "function" == typeof InternalError && create$2(InternalError);
|
|
4570
|
+
const N = {
|
|
4586
4571
|
file: {
|
|
4587
4572
|
test: e => "File" === toStringTag(e),
|
|
4588
4573
|
replace(e) {
|
|
@@ -4619,8 +4604,8 @@ const P = {
|
|
|
4619
4604
|
})
|
|
4620
4605
|
}
|
|
4621
4606
|
},
|
|
4622
|
-
|
|
4623
|
-
file:
|
|
4607
|
+
P = {
|
|
4608
|
+
file: N.file,
|
|
4624
4609
|
filelist: {
|
|
4625
4610
|
test: e => "FileList" === toStringTag(e),
|
|
4626
4611
|
replace(e) {
|
|
@@ -4644,7 +4629,7 @@ const P = {
|
|
|
4644
4629
|
}
|
|
4645
4630
|
}
|
|
4646
4631
|
},
|
|
4647
|
-
|
|
4632
|
+
E = {
|
|
4648
4633
|
imagebitmap: {
|
|
4649
4634
|
test: e => "ImageBitmap" === toStringTag(e) || e && e.dataset && "ImageBitmap" === e.dataset.toStringTag,
|
|
4650
4635
|
replace(e) {
|
|
@@ -4669,7 +4654,7 @@ const P = {
|
|
|
4669
4654
|
}
|
|
4670
4655
|
}
|
|
4671
4656
|
},
|
|
4672
|
-
|
|
4657
|
+
C = {
|
|
4673
4658
|
imagedata: {
|
|
4674
4659
|
test: e => "ImageData" === toStringTag(e),
|
|
4675
4660
|
replace: e => ({
|
|
@@ -4726,7 +4711,14 @@ const P = {
|
|
|
4726
4711
|
revive: e => Number.NEGATIVE_INFINITY
|
|
4727
4712
|
}
|
|
4728
4713
|
},
|
|
4729
|
-
|
|
4714
|
+
F = {
|
|
4715
|
+
negativeZero: {
|
|
4716
|
+
test: e => Object.is(e, -0),
|
|
4717
|
+
replace: e => 0,
|
|
4718
|
+
revive: e => -0
|
|
4719
|
+
}
|
|
4720
|
+
},
|
|
4721
|
+
M = {
|
|
4730
4722
|
StringObject: {
|
|
4731
4723
|
test: e => "String" === toStringTag(e) && "object" == typeof e,
|
|
4732
4724
|
replace: String,
|
|
@@ -4743,7 +4735,7 @@ const P = {
|
|
|
4743
4735
|
revive: e => new Number(e)
|
|
4744
4736
|
}
|
|
4745
4737
|
},
|
|
4746
|
-
|
|
4738
|
+
$ = {
|
|
4747
4739
|
regexp: {
|
|
4748
4740
|
test: e => "RegExp" === toStringTag(e),
|
|
4749
4741
|
replace: e => ({
|
|
@@ -4756,26 +4748,26 @@ const P = {
|
|
|
4756
4748
|
}) => new RegExp(e, t)
|
|
4757
4749
|
}
|
|
4758
4750
|
},
|
|
4759
|
-
|
|
4751
|
+
Y = {
|
|
4760
4752
|
set: {
|
|
4761
4753
|
test: e => "Set" === toStringTag(e),
|
|
4762
4754
|
replace: e => [...e.values()],
|
|
4763
4755
|
revive: e => new Set(e)
|
|
4764
4756
|
}
|
|
4765
4757
|
},
|
|
4766
|
-
|
|
4758
|
+
q = {};
|
|
4767
4759
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].forEach(e => function create$1(e) {
|
|
4768
4760
|
const t = e.name;
|
|
4769
|
-
|
|
4761
|
+
q[t.toLowerCase()] = {
|
|
4770
4762
|
test: e => toStringTag(e) === t,
|
|
4771
4763
|
replace: e => (0 === e.byteOffset && e.byteLength === e.buffer.byteLength ? e : e.slice(0)).buffer,
|
|
4772
4764
|
revive: t => "ArrayBuffer" === toStringTag(t) ? new e(t) : t
|
|
4773
4765
|
};
|
|
4774
4766
|
}(e));
|
|
4775
|
-
const
|
|
4767
|
+
const W = {};
|
|
4776
4768
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].forEach(e => function create(e) {
|
|
4777
4769
|
const t = e.name;
|
|
4778
|
-
|
|
4770
|
+
W[t.toLowerCase()] = {
|
|
4779
4771
|
test: e => toStringTag(e) === t,
|
|
4780
4772
|
replace({
|
|
4781
4773
|
buffer: e,
|
|
@@ -4807,21 +4799,23 @@ const q = {};
|
|
|
4807
4799
|
}
|
|
4808
4800
|
};
|
|
4809
4801
|
}(e));
|
|
4810
|
-
const
|
|
4802
|
+
const G = {
|
|
4811
4803
|
undef: {
|
|
4812
4804
|
test: (e, t) => void 0 === e && (t.ownKeys || !("ownKeys" in t)),
|
|
4813
4805
|
replace: e => 0,
|
|
4814
4806
|
revive: e => new l()
|
|
4815
4807
|
}
|
|
4816
4808
|
},
|
|
4817
|
-
|
|
4809
|
+
H = {
|
|
4818
4810
|
userObject: {
|
|
4819
4811
|
test: (e, t) => isUserObject(e),
|
|
4820
|
-
replace: e =>
|
|
4812
|
+
replace: e => ({
|
|
4813
|
+
...e
|
|
4814
|
+
}),
|
|
4821
4815
|
revive: e => e
|
|
4822
4816
|
}
|
|
4823
4817
|
},
|
|
4824
|
-
|
|
4818
|
+
X = [{
|
|
4825
4819
|
arrayNonindexKeys: {
|
|
4826
4820
|
testPlainObjects: !0,
|
|
4827
4821
|
test: (e, t) => !!Array.isArray(e) && (Object.keys(e).some(e => String(Number.parseInt(e)) !== e) && (t.iterateIn = "object", t.addLength = !0), !0),
|
|
@@ -4842,9 +4836,9 @@ const W = {
|
|
|
4842
4836
|
revive(e) {}
|
|
4843
4837
|
}
|
|
4844
4838
|
}],
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
var
|
|
4839
|
+
Z = [K, x, L, F],
|
|
4840
|
+
re = [H, G, X, M, Z, j, $, C, E, N, P, O, T, I].concat("function" == typeof Map ? U : [], "function" == typeof Set ? Y : [], "function" == typeof ArrayBuffer ? h : [], "function" == typeof Uint8Array ? W : [], "function" == typeof DataView ? w : [], "undefined" != typeof Intl ? B : [], "undefined" != typeof crypto ? A : [], "undefined" != typeof BigInt ? [m, g] : []);
|
|
4841
|
+
var ne = re.concat({
|
|
4848
4842
|
checkDataCloneException: {
|
|
4849
4843
|
test(e) {
|
|
4850
4844
|
const t = {}.toString.call(e).slice(8, -1);
|
|
@@ -4856,9 +4850,9 @@ var re = te.concat({
|
|
|
4856
4850
|
|
|
4857
4851
|
// See: http://stackoverflow.com/questions/42170826/categories-for-rejection-by-the-structured-cloning-algorithm
|
|
4858
4852
|
|
|
4859
|
-
let typeson = new u().register(
|
|
4853
|
+
let typeson = new u().register(ne);
|
|
4860
4854
|
function register(func) {
|
|
4861
|
-
typeson = new u().register(func(
|
|
4855
|
+
typeson = new u().register(func(ne));
|
|
4862
4856
|
}
|
|
4863
4857
|
|
|
4864
4858
|
// We are keeping the callback approach for now in case we wish to reexpose
|
|
@@ -5343,7 +5337,7 @@ IDBIndex.prototype.__renameIndex = function (store, oldName, newName, colInfoToP
|
|
|
5343
5337
|
return;
|
|
5344
5338
|
}
|
|
5345
5339
|
const indexCreations = colNamesToPreserve.slice(2) // Doing `key` separately and no need for index on `value`
|
|
5346
|
-
.map(escapedIndexNameSQL => new
|
|
5340
|
+
.map(escapedIndexNameSQL => new SyncPromise$1(function (resolve, reject) {
|
|
5347
5341
|
const escapedIndexToRecreate = sqlQuote(escapedStoreNameSQL.slice(1, -1) + '^5' + escapedIndexNameSQL.slice(1, -1));
|
|
5348
5342
|
// const sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
|
|
5349
5343
|
// CFG.DEBUG && console.log(sql);
|
|
@@ -5358,7 +5352,7 @@ IDBIndex.prototype.__renameIndex = function (store, oldName, newName, colInfoToP
|
|
|
5358
5352
|
// });
|
|
5359
5353
|
}));
|
|
5360
5354
|
|
|
5361
|
-
indexCreations.push(new
|
|
5355
|
+
indexCreations.push(new SyncPromise$1(function (resolve, reject) {
|
|
5362
5356
|
const escapedIndexToRecreate = sqlQuote('sk_' + escapedStoreNameSQL.slice(1, -1));
|
|
5363
5357
|
// Chrome erring here if not dropped first; Node does not
|
|
5364
5358
|
const sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
|
|
@@ -5373,7 +5367,7 @@ IDBIndex.prototype.__renameIndex = function (store, oldName, newName, colInfoToP
|
|
|
5373
5367
|
reject(err);
|
|
5374
5368
|
});
|
|
5375
5369
|
}));
|
|
5376
|
-
|
|
5370
|
+
SyncPromise$1.all(indexCreations).then(finish, error).catch(err => {
|
|
5377
5371
|
console.log('Index rename error');
|
|
5378
5372
|
throw err;
|
|
5379
5373
|
});
|
|
@@ -5836,7 +5830,7 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
|
|
|
5836
5830
|
// idea is to avoid, where possible, unnecessary delays (and
|
|
5837
5831
|
// consuming code ought to only see a difference in the browser
|
|
5838
5832
|
// where we can't control the transaction timeout anyways).
|
|
5839
|
-
return new
|
|
5833
|
+
return new SyncPromise$1((resolve, reject) => {
|
|
5840
5834
|
const index = me.__indexes[indexName];
|
|
5841
5835
|
if (
|
|
5842
5836
|
// `createIndex` was called synchronously after the current insertion was added to
|
|
@@ -5887,7 +5881,7 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
|
|
|
5887
5881
|
}
|
|
5888
5882
|
});
|
|
5889
5883
|
});
|
|
5890
|
-
return
|
|
5884
|
+
return SyncPromise$1.all(indexPromises).then(() => {
|
|
5891
5885
|
const sqlStart = ['INSERT INTO', escapeStoreNameForSQL(me.__currentName), '('];
|
|
5892
5886
|
const sqlEnd = [' VALUES ('];
|
|
5893
5887
|
const insertSqlValues = [];
|
|
@@ -6355,7 +6349,9 @@ IDBDatabase.prototype.createObjectStore = function (storeName /* , createOptions
|
|
|
6355
6349
|
IDBTransaction.__assertVersionChange(this.__versionTransaction); // this.__versionTransaction may not exist if called mistakenly by user in onsuccess
|
|
6356
6350
|
this.throwIfUpgradeTransactionNull();
|
|
6357
6351
|
IDBTransaction.__assertActive(this.__versionTransaction);
|
|
6358
|
-
createOptions =
|
|
6352
|
+
createOptions = {
|
|
6353
|
+
...createOptions
|
|
6354
|
+
};
|
|
6359
6355
|
let {
|
|
6360
6356
|
keyPath
|
|
6361
6357
|
} = createOptions;
|
|
@@ -6586,18 +6582,18 @@ function triggerAnyVersionChangeAndBlockedEvents(openConnections, req, oldVersio
|
|
|
6586
6582
|
oldVersion,
|
|
6587
6583
|
newVersion
|
|
6588
6584
|
});
|
|
6589
|
-
return new
|
|
6585
|
+
return new SyncPromise$1(function (resolve) {
|
|
6590
6586
|
setTimeout(() => {
|
|
6591
6587
|
entry.dispatchEvent(e); // No need to catch errors
|
|
6592
6588
|
resolve();
|
|
6593
6589
|
});
|
|
6594
6590
|
});
|
|
6595
6591
|
});
|
|
6596
|
-
},
|
|
6592
|
+
}, SyncPromise$1.resolve()).then(function () {
|
|
6597
6593
|
if (connectionsClosed()) {
|
|
6598
6594
|
return undefined;
|
|
6599
6595
|
}
|
|
6600
|
-
return new
|
|
6596
|
+
return new SyncPromise$1(function (resolve) {
|
|
6601
6597
|
const unblocking = {
|
|
6602
6598
|
check() {
|
|
6603
6599
|
if (connectionsClosed()) {
|
|
@@ -8126,9 +8122,10 @@ SQLiteDatabase.prototype.exec = function exec(queries, readOnly, callback) {
|
|
|
8126
8122
|
doNext();
|
|
8127
8123
|
};
|
|
8128
8124
|
var SQLiteDatabase_1 = SQLiteDatabase;
|
|
8125
|
+
var SQLiteDatabase$1 = /*@__PURE__*/getDefaultExportFromCjs(SQLiteDatabase_1);
|
|
8129
8126
|
|
|
8130
8127
|
function wrappedSQLiteDatabase(name) {
|
|
8131
|
-
const db = new
|
|
8128
|
+
const db = new SQLiteDatabase$1(name);
|
|
8132
8129
|
if (CFG.sqlBusyTimeout) {
|
|
8133
8130
|
db._db.configure('busyTimeout', CFG.sqlBusyTimeout); // Default is 1000
|
|
8134
8131
|
}
|
|
@@ -8159,9 +8156,10 @@ CFG.win = {
|
|
|
8159
8156
|
openDatabase: nodeWebSQL
|
|
8160
8157
|
};
|
|
8161
8158
|
const __setGlobalVars = function (idb, initialConfig = {}) {
|
|
8162
|
-
const obj = setGlobalVars(idb,
|
|
8163
|
-
fs: fs$1
|
|
8164
|
-
|
|
8159
|
+
const obj = setGlobalVars(idb, {
|
|
8160
|
+
fs: fs$1,
|
|
8161
|
+
...initialConfig
|
|
8162
|
+
});
|
|
8165
8163
|
obj.shimIndexedDB.__setUnicodeIdentifiers(UnicodeIdentifiers);
|
|
8166
8164
|
return obj;
|
|
8167
8165
|
};
|