@strapi/strapi 4.10.2 → 4.10.4
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/lib/Strapi.js
CHANGED
|
@@ -110,7 +110,7 @@ class Strapi {
|
|
|
110
110
|
// Instantiate the Koa app & the HTTP server
|
|
111
111
|
this.server = createServer(this);
|
|
112
112
|
|
|
113
|
-
// Strapi utils
|
|
113
|
+
// Strapi utils instantiation
|
|
114
114
|
this.fs = createStrapiFs(this);
|
|
115
115
|
this.eventHub = createEventHub();
|
|
116
116
|
this.startupLogger = createStartupLogger(this);
|
|
@@ -49,7 +49,7 @@ const createComponents = async (uid, data) => {
|
|
|
49
49
|
const components = await mapAsync(
|
|
50
50
|
componentValue,
|
|
51
51
|
(value) => createComponent(componentUID, value),
|
|
52
|
-
{ concurrency: isDialectMySQL() ? 1 : Infinity }
|
|
52
|
+
{ concurrency: isDialectMySQL() && !strapi.db.inTransaction() ? 1 : Infinity }
|
|
53
53
|
);
|
|
54
54
|
|
|
55
55
|
componentBody[attributeName] = components.map(({ id }) => {
|
|
@@ -97,7 +97,7 @@ const createComponents = async (uid, data) => {
|
|
|
97
97
|
componentBody[attributeName] = await mapAsync(
|
|
98
98
|
dynamiczoneValues,
|
|
99
99
|
createDynamicZoneComponents,
|
|
100
|
-
{ concurrency: isDialectMySQL() ? 1 : Infinity }
|
|
100
|
+
{ concurrency: isDialectMySQL() && !strapi.db.inTransaction() ? 1 : Infinity }
|
|
101
101
|
);
|
|
102
102
|
|
|
103
103
|
continue;
|
|
@@ -151,7 +151,7 @@ const updateComponents = async (uid, entityToUpdate, data) => {
|
|
|
151
151
|
const components = await mapAsync(
|
|
152
152
|
componentValue,
|
|
153
153
|
(value) => updateOrCreateComponent(componentUID, value),
|
|
154
|
-
{ concurrency: isDialectMySQL() ? 1 : Infinity }
|
|
154
|
+
{ concurrency: isDialectMySQL() && !strapi.db.inTransaction() ? 1 : Infinity }
|
|
155
155
|
);
|
|
156
156
|
|
|
157
157
|
componentBody[attributeName] = components.filter(_.negate(_.isNil)).map(({ id }) => {
|
|
@@ -200,7 +200,7 @@ const updateComponents = async (uid, entityToUpdate, data) => {
|
|
|
200
200
|
},
|
|
201
201
|
};
|
|
202
202
|
},
|
|
203
|
-
{ concurrency: isDialectMySQL() ? 1 : Infinity }
|
|
203
|
+
{ concurrency: isDialectMySQL() && !strapi.db.inTransaction() ? 1 : Infinity }
|
|
204
204
|
);
|
|
205
205
|
|
|
206
206
|
continue;
|
|
@@ -305,7 +305,7 @@ const deleteComponents = async (uid, entityToDelete, { loadComponents = true } =
|
|
|
305
305
|
const { component: componentUID } = attribute;
|
|
306
306
|
// MySQL/MariaDB can cause deadlocks here if concurrency higher than 1
|
|
307
307
|
await mapAsync(_.castArray(value), (subValue) => deleteComponent(componentUID, subValue), {
|
|
308
|
-
concurrency: isDialectMySQL() ? 1 : Infinity,
|
|
308
|
+
concurrency: isDialectMySQL() && !strapi.db.inTransaction() ? 1 : Infinity,
|
|
309
309
|
});
|
|
310
310
|
} else {
|
|
311
311
|
// delete dynamic zone components
|
|
@@ -313,7 +313,7 @@ const deleteComponents = async (uid, entityToDelete, { loadComponents = true } =
|
|
|
313
313
|
await mapAsync(
|
|
314
314
|
_.castArray(value),
|
|
315
315
|
(subValue) => deleteComponent(subValue.__component, subValue),
|
|
316
|
-
{ concurrency: isDialectMySQL() ? 1 : Infinity }
|
|
316
|
+
{ concurrency: isDialectMySQL() && !strapi.db.inTransaction() ? 1 : Infinity }
|
|
317
317
|
);
|
|
318
318
|
}
|
|
319
319
|
|
|
@@ -33,15 +33,14 @@ module.exports = (strapi) => {
|
|
|
33
33
|
const registerAdminRoutes = (strapi) => {
|
|
34
34
|
const generateRouteScope = createRouteScopeGenerator(`admin::`);
|
|
35
35
|
|
|
36
|
-
strapi.admin.routes
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
routes: strapi.admin.routes,
|
|
36
|
+
_.forEach(strapi.admin.routes, (router) => {
|
|
37
|
+
router.type = router.type || 'admin';
|
|
38
|
+
router.prefix = router.prefix || `/admin`;
|
|
39
|
+
router.routes.forEach((route) => {
|
|
40
|
+
generateRouteScope(route);
|
|
41
|
+
route.info = { pluginName: 'admin' };
|
|
42
|
+
});
|
|
43
|
+
strapi.server.routes(router);
|
|
45
44
|
});
|
|
46
45
|
};
|
|
47
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/strapi",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.4",
|
|
4
4
|
"description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -81,19 +81,19 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@koa/cors": "3.4.3",
|
|
83
83
|
"@koa/router": "10.1.1",
|
|
84
|
-
"@strapi/admin": "4.10.
|
|
85
|
-
"@strapi/data-transfer": "4.10.
|
|
86
|
-
"@strapi/database": "4.10.
|
|
87
|
-
"@strapi/generate-new": "4.10.
|
|
88
|
-
"@strapi/generators": "4.10.
|
|
89
|
-
"@strapi/logger": "4.10.
|
|
90
|
-
"@strapi/permissions": "4.10.
|
|
91
|
-
"@strapi/plugin-content-manager": "4.10.
|
|
92
|
-
"@strapi/plugin-content-type-builder": "4.10.
|
|
93
|
-
"@strapi/plugin-email": "4.10.
|
|
94
|
-
"@strapi/plugin-upload": "4.10.
|
|
95
|
-
"@strapi/typescript-utils": "4.10.
|
|
96
|
-
"@strapi/utils": "4.10.
|
|
84
|
+
"@strapi/admin": "4.10.4",
|
|
85
|
+
"@strapi/data-transfer": "4.10.4",
|
|
86
|
+
"@strapi/database": "4.10.4",
|
|
87
|
+
"@strapi/generate-new": "4.10.4",
|
|
88
|
+
"@strapi/generators": "4.10.4",
|
|
89
|
+
"@strapi/logger": "4.10.4",
|
|
90
|
+
"@strapi/permissions": "4.10.4",
|
|
91
|
+
"@strapi/plugin-content-manager": "4.10.4",
|
|
92
|
+
"@strapi/plugin-content-type-builder": "4.10.4",
|
|
93
|
+
"@strapi/plugin-email": "4.10.4",
|
|
94
|
+
"@strapi/plugin-upload": "4.10.4",
|
|
95
|
+
"@strapi/typescript-utils": "4.10.4",
|
|
96
|
+
"@strapi/utils": "4.10.4",
|
|
97
97
|
"bcryptjs": "2.4.3",
|
|
98
98
|
"boxen": "5.1.2",
|
|
99
99
|
"chalk": "4.1.2",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"node": ">=14.19.1 <=18.x.x",
|
|
143
143
|
"npm": ">=6.0.0"
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "3f55bac2e7fc3b15c85ac6910be1e95bb7eed9e5"
|
|
146
146
|
}
|