@event-driven-io/emmett-sqlite 0.38.2 → 0.38.3
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/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -99,7 +99,7 @@ var rollbackTransaction = (db) => new Promise((resolve, reject) => {
|
|
|
99
99
|
});
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
-
// ../emmett/dist/chunk-
|
|
102
|
+
// ../emmett/dist/chunk-O2VMBOV4.js
|
|
103
103
|
var isNumber = (val) => typeof val === "number" && val === val;
|
|
104
104
|
var isBigint = (val) => typeof val === "bigint" && val === val;
|
|
105
105
|
var isString = (val) => typeof val === "string";
|
|
@@ -112,6 +112,15 @@ var EmmettError = class _EmmettError extends Error {
|
|
|
112
112
|
this.errorCode = errorCode;
|
|
113
113
|
Object.setPrototypeOf(this, _EmmettError.prototype);
|
|
114
114
|
}
|
|
115
|
+
static mapFrom(error) {
|
|
116
|
+
if (error instanceof _EmmettError) {
|
|
117
|
+
return error;
|
|
118
|
+
}
|
|
119
|
+
return new _EmmettError({
|
|
120
|
+
errorCode: "errorCode" in error && error.errorCode !== void 0 && error.errorCode !== null ? error.errorCode : 500,
|
|
121
|
+
message: _nullishCoalesce(error.message, () => ( "An unknown error occurred"))
|
|
122
|
+
});
|
|
123
|
+
}
|
|
115
124
|
};
|
|
116
125
|
var ConcurrencyError = class _ConcurrencyError extends EmmettError {
|
|
117
126
|
constructor(current, expected, message) {
|
|
@@ -203,6 +212,7 @@ var asyncRetry = async (fn, opts) => {
|
|
|
203
212
|
} catch (error2) {
|
|
204
213
|
if (_optionalChain([opts, 'optionalAccess', _15 => _15.shouldRetryError]) && !opts.shouldRetryError(error2)) {
|
|
205
214
|
bail(error2);
|
|
215
|
+
return void 0;
|
|
206
216
|
}
|
|
207
217
|
throw error2;
|
|
208
218
|
}
|