@strapi/database 4.19.1 → 4.20.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/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.js
CHANGED
|
@@ -3828,9 +3828,15 @@ class ReadableStrapiQuery extends stream.Readable {
|
|
|
3828
3828
|
}
|
|
3829
3829
|
const storage = new node_async_hooks.AsyncLocalStorage();
|
|
3830
3830
|
const transactionCtx = {
|
|
3831
|
-
async run(
|
|
3831
|
+
async run(trx, cb) {
|
|
3832
|
+
const store = storage.getStore();
|
|
3832
3833
|
return storage.run(
|
|
3833
|
-
{
|
|
3834
|
+
{
|
|
3835
|
+
trx,
|
|
3836
|
+
// Fill with existing callbacks if nesting transactions
|
|
3837
|
+
commitCallbacks: store?.commitCallbacks || [],
|
|
3838
|
+
rollbackCallbacks: store?.rollbackCallbacks || []
|
|
3839
|
+
},
|
|
3834
3840
|
cb
|
|
3835
3841
|
);
|
|
3836
3842
|
},
|