@strapi/core 5.12.0-beta.1 → 5.12.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/ee/index.d.ts +1 -0
- package/dist/ee/index.d.ts.map +1 -1
- package/dist/ee/license.d.ts.map +1 -1
- package/dist/index.js +26 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -11
- package/dist/index.mjs.map +1 -1
- package/dist/services/document-service/utils/bidirectional-relations.d.ts.map +1 -1
- package/package.json +11 -11
package/dist/index.mjs
CHANGED
@@ -290,7 +290,7 @@ const getDirs = ({ appDir, distDir }, config)=>({
|
|
290
290
|
});
|
291
291
|
|
292
292
|
var name = "@strapi/core";
|
293
|
-
var version = "5.12.0
|
293
|
+
var version = "5.12.0";
|
294
294
|
var description = "Core of Strapi";
|
295
295
|
var homepage = "https://strapi.io";
|
296
296
|
var bugs = {
|
@@ -346,14 +346,14 @@ var dependencies = {
|
|
346
346
|
"@koa/cors": "5.0.0",
|
347
347
|
"@koa/router": "12.0.2",
|
348
348
|
"@paralleldrive/cuid2": "2.2.2",
|
349
|
-
"@strapi/admin": "5.12.0
|
350
|
-
"@strapi/database": "5.12.0
|
351
|
-
"@strapi/generators": "5.12.0
|
352
|
-
"@strapi/logger": "5.12.0
|
353
|
-
"@strapi/permissions": "5.12.0
|
354
|
-
"@strapi/types": "5.12.0
|
355
|
-
"@strapi/typescript-utils": "5.12.0
|
356
|
-
"@strapi/utils": "5.12.0
|
349
|
+
"@strapi/admin": "5.12.0",
|
350
|
+
"@strapi/database": "5.12.0",
|
351
|
+
"@strapi/generators": "5.12.0",
|
352
|
+
"@strapi/logger": "5.12.0",
|
353
|
+
"@strapi/permissions": "5.12.0",
|
354
|
+
"@strapi/types": "5.12.0",
|
355
|
+
"@strapi/typescript-utils": "5.12.0",
|
356
|
+
"@strapi/utils": "5.12.0",
|
357
357
|
bcryptjs: "2.4.3",
|
358
358
|
boxen: "5.1.2",
|
359
359
|
chalk: "4.1.2",
|
@@ -416,9 +416,9 @@ var devDependencies = {
|
|
416
416
|
"@types/node": "18.19.24",
|
417
417
|
"@types/node-schedule": "2.1.7",
|
418
418
|
"@types/statuses": "2.0.1",
|
419
|
-
"eslint-config-custom": "5.12.0
|
419
|
+
"eslint-config-custom": "5.12.0",
|
420
420
|
supertest: "6.3.3",
|
421
|
-
tsconfig: "5.12.0
|
421
|
+
tsconfig: "5.12.0"
|
422
422
|
};
|
423
423
|
var engines = {
|
424
424
|
node: ">=18.0.0 <=22.x.x",
|
@@ -1179,6 +1179,9 @@ const DEFAULT_FEATURES = {
|
|
1179
1179
|
options: {
|
1180
1180
|
retentionDays: 99999
|
1181
1181
|
}
|
1182
|
+
},
|
1183
|
+
{
|
1184
|
+
name: 'cms-advanced-preview'
|
1182
1185
|
}
|
1183
1186
|
]
|
1184
1187
|
};
|
@@ -1493,6 +1496,9 @@ var index = Object.freeze({
|
|
1493
1496
|
get seats () {
|
1494
1497
|
return ee.licenseInfo.seats;
|
1495
1498
|
},
|
1499
|
+
get type () {
|
1500
|
+
return ee.licenseInfo.type;
|
1501
|
+
},
|
1496
1502
|
features: Object.freeze({
|
1497
1503
|
list,
|
1498
1504
|
get,
|
@@ -6912,6 +6918,11 @@ const EVENTS = {
|
|
6912
6918
|
if (attribute.type !== 'relation' || attribute.target !== uid || !(attribute.inversedBy || attribute.mappedBy)) {
|
6913
6919
|
continue;
|
6914
6920
|
}
|
6921
|
+
// If it's a self referencing relation, there is no need to sync any relation
|
6922
|
+
// The order will already be handled as both sides are inside the same content type
|
6923
|
+
if (model.uid === uid) {
|
6924
|
+
continue;
|
6925
|
+
}
|
6915
6926
|
const joinTable = attribute.joinTable;
|
6916
6927
|
if (!joinTable) {
|
6917
6928
|
continue;
|
@@ -6971,6 +6982,10 @@ const EVENTS = {
|
|
6971
6982
|
const sourceColumn = joinTable.inverseJoinColumn.name;
|
6972
6983
|
const targetColumn = joinTable.joinColumn.name;
|
6973
6984
|
const orderColumn = joinTable.orderColumnName;
|
6985
|
+
// Failsafe in case those don't exist
|
6986
|
+
if (!sourceColumn || !targetColumn || !orderColumn) {
|
6987
|
+
continue;
|
6988
|
+
}
|
6974
6989
|
// Update order values for each relation
|
6975
6990
|
// TODO: Find a way to batch it more efficiently
|
6976
6991
|
await async.map(relations, (relation)=>{
|