@strapi/core 5.11.1 → 5.11.2

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.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.11.1";
293
+ var version = "5.11.2";
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.11.1",
350
- "@strapi/database": "5.11.1",
351
- "@strapi/generators": "5.11.1",
352
- "@strapi/logger": "5.11.1",
353
- "@strapi/permissions": "5.11.1",
354
- "@strapi/types": "5.11.1",
355
- "@strapi/typescript-utils": "5.11.1",
356
- "@strapi/utils": "5.11.1",
349
+ "@strapi/admin": "5.11.2",
350
+ "@strapi/database": "5.11.2",
351
+ "@strapi/generators": "5.11.2",
352
+ "@strapi/logger": "5.11.2",
353
+ "@strapi/permissions": "5.11.2",
354
+ "@strapi/types": "5.11.2",
355
+ "@strapi/typescript-utils": "5.11.2",
356
+ "@strapi/utils": "5.11.2",
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.11.1",
419
+ "eslint-config-custom": "5.11.2",
420
420
  supertest: "6.3.3",
421
- tsconfig: "5.11.1"
421
+ tsconfig: "5.11.2"
422
422
  };
423
423
  var engines = {
424
424
  node: ">=18.0.0 <=22.x.x",
@@ -6912,6 +6912,11 @@ const EVENTS = {
6912
6912
  if (attribute.type !== 'relation' || attribute.target !== uid || !(attribute.inversedBy || attribute.mappedBy)) {
6913
6913
  continue;
6914
6914
  }
6915
+ // If it's a self referencing relation, there is no need to sync any relation
6916
+ // The order will already be handled as both sides are inside the same content type
6917
+ if (model.uid === uid) {
6918
+ continue;
6919
+ }
6915
6920
  const joinTable = attribute.joinTable;
6916
6921
  if (!joinTable) {
6917
6922
  continue;
@@ -6971,6 +6976,10 @@ const EVENTS = {
6971
6976
  const sourceColumn = joinTable.inverseJoinColumn.name;
6972
6977
  const targetColumn = joinTable.joinColumn.name;
6973
6978
  const orderColumn = joinTable.orderColumnName;
6979
+ // Failsafe in case those don't exist
6980
+ if (!sourceColumn || !targetColumn || !orderColumn) {
6981
+ continue;
6982
+ }
6974
6983
  // Update order values for each relation
6975
6984
  // TODO: Find a way to batch it more efficiently
6976
6985
  await async.map(relations, (relation)=>{