@strapi/database 4.19.1 → 4.20.1
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.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/transaction-context.d.ts +1 -1
- package/dist/transaction-context.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -3794,9 +3794,15 @@ class ReadableStrapiQuery extends Readable {
|
|
|
3794
3794
|
}
|
|
3795
3795
|
const storage = new AsyncLocalStorage();
|
|
3796
3796
|
const transactionCtx = {
|
|
3797
|
-
async run(
|
|
3797
|
+
async run(trx, cb) {
|
|
3798
|
+
const store = storage.getStore();
|
|
3798
3799
|
return storage.run(
|
|
3799
|
-
{
|
|
3800
|
+
{
|
|
3801
|
+
trx,
|
|
3802
|
+
// Fill with existing callbacks if nesting transactions
|
|
3803
|
+
commitCallbacks: store?.commitCallbacks || [],
|
|
3804
|
+
rollbackCallbacks: store?.rollbackCallbacks || []
|
|
3805
|
+
},
|
|
3800
3806
|
cb
|
|
3801
3807
|
);
|
|
3802
3808
|
},
|