@strapi/core 0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c → 0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd

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.
Files changed (48) hide show
  1. package/dist/loaders/plugins/get-enabled-plugins.js +1 -1
  2. package/dist/loaders/plugins/get-enabled-plugins.js.map +1 -1
  3. package/dist/loaders/plugins/get-enabled-plugins.mjs +1 -1
  4. package/dist/loaders/plugins/get-enabled-plugins.mjs.map +1 -1
  5. package/dist/migrations/database/5.0.0-discard-drafts.d.ts.map +1 -1
  6. package/dist/migrations/database/5.0.0-discard-drafts.js +13 -1
  7. package/dist/migrations/database/5.0.0-discard-drafts.js.map +1 -1
  8. package/dist/migrations/database/5.0.0-discard-drafts.mjs +13 -1
  9. package/dist/migrations/database/5.0.0-discard-drafts.mjs.map +1 -1
  10. package/dist/services/cron.js +9 -4
  11. package/dist/services/cron.js.map +1 -1
  12. package/dist/services/cron.mjs +9 -4
  13. package/dist/services/cron.mjs.map +1 -1
  14. package/dist/services/document-service/common.d.ts +1 -1
  15. package/dist/services/document-service/common.d.ts.map +1 -1
  16. package/dist/services/document-service/common.js.map +1 -1
  17. package/dist/services/document-service/common.mjs.map +1 -1
  18. package/dist/services/document-service/entries.d.ts +2 -2
  19. package/dist/services/document-service/entries.d.ts.map +1 -1
  20. package/dist/services/document-service/entries.js +6 -7
  21. package/dist/services/document-service/entries.js.map +1 -1
  22. package/dist/services/document-service/entries.mjs +1 -2
  23. package/dist/services/document-service/entries.mjs.map +1 -1
  24. package/dist/services/document-service/index.d.ts +2 -1
  25. package/dist/services/document-service/index.d.ts.map +1 -1
  26. package/dist/services/document-service/index.js +3 -2
  27. package/dist/services/document-service/index.js.map +1 -1
  28. package/dist/services/document-service/index.mjs +3 -2
  29. package/dist/services/document-service/index.mjs.map +1 -1
  30. package/dist/services/document-service/repository.d.ts.map +1 -1
  31. package/dist/services/document-service/repository.js +21 -6
  32. package/dist/services/document-service/repository.js.map +1 -1
  33. package/dist/services/document-service/repository.mjs +21 -6
  34. package/dist/services/document-service/repository.mjs.map +1 -1
  35. package/dist/services/document-service/transform/id-map.d.ts.map +1 -1
  36. package/dist/services/document-service/transform/id-map.js +13 -4
  37. package/dist/services/document-service/transform/id-map.js.map +1 -1
  38. package/dist/services/document-service/transform/id-map.mjs +14 -5
  39. package/dist/services/document-service/transform/id-map.mjs.map +1 -1
  40. package/dist/services/document-service/utils/unidirectional-relations.d.ts +11 -8
  41. package/dist/services/document-service/utils/unidirectional-relations.d.ts.map +1 -1
  42. package/dist/services/document-service/utils/unidirectional-relations.js +26 -14
  43. package/dist/services/document-service/utils/unidirectional-relations.js.map +1 -1
  44. package/dist/services/document-service/utils/unidirectional-relations.mjs +27 -15
  45. package/dist/services/document-service/utils/unidirectional-relations.mjs.map +1 -1
  46. package/dist/utils/transform-content-types-to-models.d.ts +325 -21
  47. package/dist/utils/transform-content-types-to-models.d.ts.map +1 -1
  48. package/package.json +14 -14
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const fp = require("lodash/fp");
4
- const load = async (uid, oldEntries) => {
4
+ const load = async (uid, { oldVersions, newVersions }) => {
5
5
  const updates = [];
6
6
  await strapi.db.transaction(async ({ trx }) => {
7
7
  const contentTypes = Object.values(strapi.contentTypes);
@@ -9,21 +9,33 @@ const load = async (uid, oldEntries) => {
9
9
  for (const model of [...contentTypes, ...components]) {
10
10
  const dbModel = strapi.db.metadata.get(model.uid);
11
11
  for (const attribute of Object.values(dbModel.attributes)) {
12
- if (attribute.type !== "relation")
13
- continue;
14
- if (attribute.target !== uid)
15
- continue;
16
- if (attribute.inversedBy || attribute.mappedBy)
12
+ if (attribute.type !== "relation" || attribute.target !== uid || attribute.inversedBy || attribute.mappedBy) {
17
13
  continue;
14
+ }
18
15
  const joinTable = attribute.joinTable;
19
- if (!joinTable)
20
- continue;
21
- const { name } = joinTable.inverseJoinColumn;
22
- const oldEntriesIds = oldEntries.map((entry) => entry.id);
23
- const relations = await strapi.db.getConnection().select("*").from(joinTable.name).whereIn(name, oldEntriesIds).transacting(trx);
24
- if (relations.length === 0)
16
+ if (!joinTable) {
25
17
  continue;
26
- updates.push({ joinTable, relations });
18
+ }
19
+ const { name: sourceColumnName } = joinTable.joinColumn;
20
+ const { name: targetColumnName } = joinTable.inverseJoinColumn;
21
+ const ids = oldVersions.map((entry) => entry.id);
22
+ const oldVersionsRelations = await strapi.db.getConnection().select("*").from(joinTable.name).whereIn(targetColumnName, ids).transacting(trx);
23
+ if (oldVersionsRelations.length > 0) {
24
+ updates.push({ joinTable, relations: oldVersionsRelations });
25
+ }
26
+ if (!model.options?.draftAndPublish) {
27
+ const ids2 = newVersions.map((entry) => entry.id);
28
+ const newVersionsRelations = await strapi.db.getConnection().select("*").from(joinTable.name).whereIn(targetColumnName, ids2).transacting(trx);
29
+ if (newVersionsRelations.length > 0) {
30
+ const discardToAdd = newVersionsRelations.filter((relation) => {
31
+ const matchingOldVerion = oldVersionsRelations.find((oldRelation) => {
32
+ return oldRelation[sourceColumnName] === relation[sourceColumnName];
33
+ });
34
+ return !matchingOldVerion;
35
+ }).map(fp.omit("id"));
36
+ updates.push({ joinTable, relations: discardToAdd });
37
+ }
38
+ }
27
39
  }
28
40
  }
29
41
  });
@@ -43,8 +55,8 @@ const sync = async (oldEntries, newEntries, oldRelations) => {
43
55
  );
44
56
  await strapi.db.transaction(async ({ trx }) => {
45
57
  for (const { joinTable, relations } of oldRelations) {
58
+ const column = joinTable.inverseJoinColumn.name;
46
59
  const newRelations = relations.map((relation) => {
47
- const column = joinTable.inverseJoinColumn.name;
48
60
  const newId = oldEntriesMap[relation[column]];
49
61
  return { ...relation, [column]: newId };
50
62
  });
@@ -1 +1 @@
1
- {"version":3,"file":"unidirectional-relations.js","sources":["../../../../src/services/document-service/utils/unidirectional-relations.ts"],"sourcesContent":["/* eslint-disable no-continue */\nimport { keyBy } from 'lodash/fp';\n\nimport { UID, Schema } from '@strapi/types';\n\n/**\n * Loads lingering relations that need to be updated when overriding a published or draft entry.\n * This is necessary because the relations are uni-directional and the target entry is not aware of the source entry.\n * This is not the case for bi-directional relations, where the target entry is also linked to the source entry.\n *\n * @param uid The content type uid\n * @param oldEntries The old entries that are being overridden\n * @returns An array of relations that need to be updated with the join table reference.\n */\nconst load = async (uid: UID.ContentType, oldEntries: { id: string; locale: string }[]) => {\n const updates = [] as any;\n\n // Iterate all components and content types to find relations that need to be updated\n await strapi.db.transaction(async ({ trx }) => {\n const contentTypes = Object.values(strapi.contentTypes) as Schema.ContentType[];\n const components = Object.values(strapi.components) as Schema.Component[];\n\n for (const model of [...contentTypes, ...components]) {\n const dbModel = strapi.db.metadata.get(model.uid);\n\n for (const attribute of Object.values(dbModel.attributes) as any) {\n /**\n * Only consider unidirectional relations\n */\n if (attribute.type !== 'relation') continue;\n if (attribute.target !== uid) continue;\n if (attribute.inversedBy || attribute.mappedBy) continue;\n const joinTable = attribute.joinTable;\n // TODO: joinColumn relations\n if (!joinTable) continue;\n\n const { name } = joinTable.inverseJoinColumn;\n\n /**\n * Load all relations that need to be updated\n */\n const oldEntriesIds = oldEntries.map((entry) => entry.id);\n const relations = await strapi.db\n .getConnection()\n .select('*')\n .from(joinTable.name)\n .whereIn(name, oldEntriesIds)\n .transacting(trx);\n\n if (relations.length === 0) continue;\n\n updates.push({ joinTable, relations });\n }\n }\n });\n\n return updates;\n};\n\n/**\n * Updates uni directional relations to target the right entries when overriding published or draft entries.\n *\n * @param oldEntries The old entries that are being overridden\n * @param newEntries The new entries that are overriding the old ones\n * @param oldRelations The relations that were previously loaded with `load` @see load\n */\nconst sync = async (\n oldEntries: { id: string; locale: string }[],\n newEntries: { id: string; locale: string }[],\n oldRelations: { joinTable: any; relations: any[] }[]\n) => {\n /**\n * Create a map of old entry ids to new entry ids\n *\n * Will be used to update the relation target ids\n */\n const newEntryByLocale = keyBy('locale', newEntries);\n const oldEntriesMap = oldEntries.reduce(\n (acc, entry) => {\n const newEntry = newEntryByLocale[entry.locale];\n if (!newEntry) return acc;\n acc[entry.id] = newEntry.id;\n return acc;\n },\n {} as Record<string, string>\n );\n\n await strapi.db.transaction(async ({ trx }) => {\n // Iterate old relations that are deleted and insert the new ones\n for (const { joinTable, relations } of oldRelations) {\n // Update old ids with the new ones\n const newRelations = relations.map((relation) => {\n const column = joinTable.inverseJoinColumn.name;\n const newId = oldEntriesMap[relation[column]];\n return { ...relation, [column]: newId };\n });\n\n // Insert those relations into the join table\n await trx.batchInsert(joinTable.name, newRelations, 1000);\n }\n });\n};\n\nexport { load, sync };\n"],"names":["keyBy"],"mappings":";;;AAcM,MAAA,OAAO,OAAO,KAAsB,eAAiD;AACzF,QAAM,UAAU,CAAA;AAGhB,QAAM,OAAO,GAAG,YAAY,OAAO,EAAE,UAAU;AAC7C,UAAM,eAAe,OAAO,OAAO,OAAO,YAAY;AACtD,UAAM,aAAa,OAAO,OAAO,OAAO,UAAU;AAElD,eAAW,SAAS,CAAC,GAAG,cAAc,GAAG,UAAU,GAAG;AACpD,YAAM,UAAU,OAAO,GAAG,SAAS,IAAI,MAAM,GAAG;AAEhD,iBAAW,aAAa,OAAO,OAAO,QAAQ,UAAU,GAAU;AAIhE,YAAI,UAAU,SAAS;AAAY;AACnC,YAAI,UAAU,WAAW;AAAK;AAC1B,YAAA,UAAU,cAAc,UAAU;AAAU;AAChD,cAAM,YAAY,UAAU;AAE5B,YAAI,CAAC;AAAW;AAEV,cAAA,EAAE,KAAK,IAAI,UAAU;AAK3B,cAAM,gBAAgB,WAAW,IAAI,CAAC,UAAU,MAAM,EAAE;AACxD,cAAM,YAAY,MAAM,OAAO,GAC5B,gBACA,OAAO,GAAG,EACV,KAAK,UAAU,IAAI,EACnB,QAAQ,MAAM,aAAa,EAC3B,YAAY,GAAG;AAElB,YAAI,UAAU,WAAW;AAAG;AAE5B,gBAAQ,KAAK,EAAE,WAAW,UAAW,CAAA;AAAA,MACvC;AAAA,IACF;AAAA,EAAA,CACD;AAEM,SAAA;AACT;AASA,MAAM,OAAO,OACX,YACA,YACA,iBACG;AAMG,QAAA,mBAAmBA,GAAAA,MAAM,UAAU,UAAU;AACnD,QAAM,gBAAgB,WAAW;AAAA,IAC/B,CAAC,KAAK,UAAU;AACR,YAAA,WAAW,iBAAiB,MAAM,MAAM;AAC9C,UAAI,CAAC;AAAiB,eAAA;AAClB,UAAA,MAAM,EAAE,IAAI,SAAS;AAClB,aAAA;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EAAA;AAGH,QAAM,OAAO,GAAG,YAAY,OAAO,EAAE,UAAU;AAE7C,eAAW,EAAE,WAAW,UAAU,KAAK,cAAc;AAEnD,YAAM,eAAe,UAAU,IAAI,CAAC,aAAa;AACzC,cAAA,SAAS,UAAU,kBAAkB;AAC3C,cAAM,QAAQ,cAAc,SAAS,MAAM,CAAC;AAC5C,eAAO,EAAE,GAAG,UAAU,CAAC,MAAM,GAAG,MAAM;AAAA,MAAA,CACvC;AAGD,YAAM,IAAI,YAAY,UAAU,MAAM,cAAc,GAAI;AAAA,IAC1D;AAAA,EAAA,CACD;AACH;;;"}
1
+ {"version":3,"file":"unidirectional-relations.js","sources":["../../../../src/services/document-service/utils/unidirectional-relations.ts"],"sourcesContent":["/* eslint-disable no-continue */\nimport { keyBy, omit } from 'lodash/fp';\n\nimport { UID, Schema } from '@strapi/types';\n\ninterface LoadContext {\n oldVersions: { id: string; locale: string }[];\n newVersions: { id: string; locale: string }[];\n}\n\n/**\n * Loads lingering relations that need to be updated when overriding a published or draft entry.\n * This is necessary because the relations are uni-directional and the target entry is not aware of the source entry.\n * This is not the case for bi-directional relations, where the target entry is also linked to the source entry.\n */\nconst load = async (uid: UID.ContentType, { oldVersions, newVersions }: LoadContext) => {\n const updates = [] as any;\n\n // Iterate all components and content types to find relations that need to be updated\n await strapi.db.transaction(async ({ trx }) => {\n const contentTypes = Object.values(strapi.contentTypes) as Schema.ContentType[];\n const components = Object.values(strapi.components) as Schema.Component[];\n\n for (const model of [...contentTypes, ...components]) {\n const dbModel = strapi.db.metadata.get(model.uid);\n\n for (const attribute of Object.values(dbModel.attributes) as any) {\n /**\n * Only consider unidirectional relations\n */\n if (\n attribute.type !== 'relation' ||\n attribute.target !== uid ||\n attribute.inversedBy ||\n attribute.mappedBy\n ) {\n continue;\n }\n\n // TODO: joinColumn relations\n const joinTable = attribute.joinTable;\n if (!joinTable) {\n continue;\n }\n\n const { name: sourceColumnName } = joinTable.joinColumn;\n const { name: targetColumnName } = joinTable.inverseJoinColumn;\n\n /**\n * Load all relations that need to be updated\n */\n // NOTE: when the model has draft and publish, we can assume relation are only draft to draft & published to published\n const ids = oldVersions.map((entry) => entry.id);\n\n const oldVersionsRelations = await strapi.db\n .getConnection()\n .select('*')\n .from(joinTable.name)\n .whereIn(targetColumnName, ids)\n .transacting(trx);\n\n if (oldVersionsRelations.length > 0) {\n updates.push({ joinTable, relations: oldVersionsRelations });\n }\n\n /**\n * if publishing\n * if published version exists\n * updated published versions links\n * else\n * create link to newly published version\n *\n * if discarding\n * if published version link exists & not draft version link\n * create link to new draft version\n */\n\n if (!model.options?.draftAndPublish) {\n const ids = newVersions.map((entry) => entry.id);\n\n const newVersionsRelations = await strapi.db\n .getConnection()\n .select('*')\n .from(joinTable.name)\n .whereIn(targetColumnName, ids)\n .transacting(trx);\n\n if (newVersionsRelations.length > 0) {\n // when publishing a draft that doesn't have a published version yet,\n // copy the links to the draft over to the published version\n // when discarding a published version, if no drafts exists\n const discardToAdd = newVersionsRelations\n .filter((relation) => {\n const matchingOldVerion = oldVersionsRelations.find((oldRelation) => {\n return oldRelation[sourceColumnName] === relation[sourceColumnName];\n });\n\n return !matchingOldVerion;\n })\n .map(omit('id'));\n\n updates.push({ joinTable, relations: discardToAdd });\n }\n }\n }\n }\n });\n\n return updates;\n};\n\n/**\n * Updates uni directional relations to target the right entries when overriding published or draft entries.\n *\n * @param oldEntries The old entries that are being overridden\n * @param newEntries The new entries that are overriding the old ones\n * @param oldRelations The relations that were previously loaded with `load` @see load\n */\nconst sync = async (\n oldEntries: { id: string; locale: string }[],\n newEntries: { id: string; locale: string }[],\n oldRelations: { joinTable: any; relations: any[] }[]\n) => {\n /**\n * Create a map of old entry ids to new entry ids\n *\n * Will be used to update the relation target ids\n */\n const newEntryByLocale = keyBy('locale', newEntries);\n const oldEntriesMap = oldEntries.reduce(\n (acc, entry) => {\n const newEntry = newEntryByLocale[entry.locale];\n if (!newEntry) return acc;\n acc[entry.id] = newEntry.id;\n return acc;\n },\n {} as Record<string, string>\n );\n\n await strapi.db.transaction(async ({ trx }) => {\n // Iterate old relations that are deleted and insert the new ones\n for (const { joinTable, relations } of oldRelations) {\n // Update old ids with the new ones\n const column = joinTable.inverseJoinColumn.name;\n\n const newRelations = relations.map((relation) => {\n const newId = oldEntriesMap[relation[column]];\n return { ...relation, [column]: newId };\n });\n\n // Insert those relations into the join table\n await trx.batchInsert(joinTable.name, newRelations, 1000);\n }\n });\n};\n\nexport { load, sync };\n"],"names":["ids","omit","keyBy"],"mappings":";;;AAeA,MAAM,OAAO,OAAO,KAAsB,EAAE,aAAa,kBAA+B;AACtF,QAAM,UAAU,CAAA;AAGhB,QAAM,OAAO,GAAG,YAAY,OAAO,EAAE,UAAU;AAC7C,UAAM,eAAe,OAAO,OAAO,OAAO,YAAY;AACtD,UAAM,aAAa,OAAO,OAAO,OAAO,UAAU;AAElD,eAAW,SAAS,CAAC,GAAG,cAAc,GAAG,UAAU,GAAG;AACpD,YAAM,UAAU,OAAO,GAAG,SAAS,IAAI,MAAM,GAAG;AAEhD,iBAAW,aAAa,OAAO,OAAO,QAAQ,UAAU,GAAU;AAK9D,YAAA,UAAU,SAAS,cACnB,UAAU,WAAW,OACrB,UAAU,cACV,UAAU,UACV;AACA;AAAA,QACF;AAGA,cAAM,YAAY,UAAU;AAC5B,YAAI,CAAC,WAAW;AACd;AAAA,QACF;AAEA,cAAM,EAAE,MAAM,qBAAqB,UAAU;AAC7C,cAAM,EAAE,MAAM,qBAAqB,UAAU;AAM7C,cAAM,MAAM,YAAY,IAAI,CAAC,UAAU,MAAM,EAAE;AAE/C,cAAM,uBAAuB,MAAM,OAAO,GACvC,gBACA,OAAO,GAAG,EACV,KAAK,UAAU,IAAI,EACnB,QAAQ,kBAAkB,GAAG,EAC7B,YAAY,GAAG;AAEd,YAAA,qBAAqB,SAAS,GAAG;AACnC,kBAAQ,KAAK,EAAE,WAAW,WAAW,qBAAsB,CAAA;AAAA,QAC7D;AAcI,YAAA,CAAC,MAAM,SAAS,iBAAiB;AACnC,gBAAMA,OAAM,YAAY,IAAI,CAAC,UAAU,MAAM,EAAE;AAE/C,gBAAM,uBAAuB,MAAM,OAAO,GACvC,gBACA,OAAO,GAAG,EACV,KAAK,UAAU,IAAI,EACnB,QAAQ,kBAAkBA,IAAG,EAC7B,YAAY,GAAG;AAEd,cAAA,qBAAqB,SAAS,GAAG;AAInC,kBAAM,eAAe,qBAClB,OAAO,CAAC,aAAa;AACpB,oBAAM,oBAAoB,qBAAqB,KAAK,CAAC,gBAAgB;AACnE,uBAAO,YAAY,gBAAgB,MAAM,SAAS,gBAAgB;AAAA,cAAA,CACnE;AAED,qBAAO,CAAC;AAAA,YACT,CAAA,EACA,IAAIC,QAAK,IAAI,CAAC;AAEjB,oBAAQ,KAAK,EAAE,WAAW,WAAW,aAAc,CAAA;AAAA,UACrD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EAAA,CACD;AAEM,SAAA;AACT;AASA,MAAM,OAAO,OACX,YACA,YACA,iBACG;AAMG,QAAA,mBAAmBC,GAAAA,MAAM,UAAU,UAAU;AACnD,QAAM,gBAAgB,WAAW;AAAA,IAC/B,CAAC,KAAK,UAAU;AACR,YAAA,WAAW,iBAAiB,MAAM,MAAM;AAC9C,UAAI,CAAC;AAAiB,eAAA;AAClB,UAAA,MAAM,EAAE,IAAI,SAAS;AAClB,aAAA;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EAAA;AAGH,QAAM,OAAO,GAAG,YAAY,OAAO,EAAE,UAAU;AAE7C,eAAW,EAAE,WAAW,UAAU,KAAK,cAAc;AAE7C,YAAA,SAAS,UAAU,kBAAkB;AAE3C,YAAM,eAAe,UAAU,IAAI,CAAC,aAAa;AAC/C,cAAM,QAAQ,cAAc,SAAS,MAAM,CAAC;AAC5C,eAAO,EAAE,GAAG,UAAU,CAAC,MAAM,GAAG,MAAM;AAAA,MAAA,CACvC;AAGD,YAAM,IAAI,YAAY,UAAU,MAAM,cAAc,GAAI;AAAA,IAC1D;AAAA,EAAA,CACD;AACH;;;"}
@@ -1,5 +1,5 @@
1
- import { keyBy } from "lodash/fp";
2
- const load = async (uid, oldEntries) => {
1
+ import { omit, keyBy } from "lodash/fp";
2
+ const load = async (uid, { oldVersions, newVersions }) => {
3
3
  const updates = [];
4
4
  await strapi.db.transaction(async ({ trx }) => {
5
5
  const contentTypes = Object.values(strapi.contentTypes);
@@ -7,21 +7,33 @@ const load = async (uid, oldEntries) => {
7
7
  for (const model of [...contentTypes, ...components]) {
8
8
  const dbModel = strapi.db.metadata.get(model.uid);
9
9
  for (const attribute of Object.values(dbModel.attributes)) {
10
- if (attribute.type !== "relation")
11
- continue;
12
- if (attribute.target !== uid)
13
- continue;
14
- if (attribute.inversedBy || attribute.mappedBy)
10
+ if (attribute.type !== "relation" || attribute.target !== uid || attribute.inversedBy || attribute.mappedBy) {
15
11
  continue;
12
+ }
16
13
  const joinTable = attribute.joinTable;
17
- if (!joinTable)
18
- continue;
19
- const { name } = joinTable.inverseJoinColumn;
20
- const oldEntriesIds = oldEntries.map((entry) => entry.id);
21
- const relations = await strapi.db.getConnection().select("*").from(joinTable.name).whereIn(name, oldEntriesIds).transacting(trx);
22
- if (relations.length === 0)
14
+ if (!joinTable) {
23
15
  continue;
24
- updates.push({ joinTable, relations });
16
+ }
17
+ const { name: sourceColumnName } = joinTable.joinColumn;
18
+ const { name: targetColumnName } = joinTable.inverseJoinColumn;
19
+ const ids = oldVersions.map((entry) => entry.id);
20
+ const oldVersionsRelations = await strapi.db.getConnection().select("*").from(joinTable.name).whereIn(targetColumnName, ids).transacting(trx);
21
+ if (oldVersionsRelations.length > 0) {
22
+ updates.push({ joinTable, relations: oldVersionsRelations });
23
+ }
24
+ if (!model.options?.draftAndPublish) {
25
+ const ids2 = newVersions.map((entry) => entry.id);
26
+ const newVersionsRelations = await strapi.db.getConnection().select("*").from(joinTable.name).whereIn(targetColumnName, ids2).transacting(trx);
27
+ if (newVersionsRelations.length > 0) {
28
+ const discardToAdd = newVersionsRelations.filter((relation) => {
29
+ const matchingOldVerion = oldVersionsRelations.find((oldRelation) => {
30
+ return oldRelation[sourceColumnName] === relation[sourceColumnName];
31
+ });
32
+ return !matchingOldVerion;
33
+ }).map(omit("id"));
34
+ updates.push({ joinTable, relations: discardToAdd });
35
+ }
36
+ }
25
37
  }
26
38
  }
27
39
  });
@@ -41,8 +53,8 @@ const sync = async (oldEntries, newEntries, oldRelations) => {
41
53
  );
42
54
  await strapi.db.transaction(async ({ trx }) => {
43
55
  for (const { joinTable, relations } of oldRelations) {
56
+ const column = joinTable.inverseJoinColumn.name;
44
57
  const newRelations = relations.map((relation) => {
45
- const column = joinTable.inverseJoinColumn.name;
46
58
  const newId = oldEntriesMap[relation[column]];
47
59
  return { ...relation, [column]: newId };
48
60
  });
@@ -1 +1 @@
1
- {"version":3,"file":"unidirectional-relations.mjs","sources":["../../../../src/services/document-service/utils/unidirectional-relations.ts"],"sourcesContent":["/* eslint-disable no-continue */\nimport { keyBy } from 'lodash/fp';\n\nimport { UID, Schema } from '@strapi/types';\n\n/**\n * Loads lingering relations that need to be updated when overriding a published or draft entry.\n * This is necessary because the relations are uni-directional and the target entry is not aware of the source entry.\n * This is not the case for bi-directional relations, where the target entry is also linked to the source entry.\n *\n * @param uid The content type uid\n * @param oldEntries The old entries that are being overridden\n * @returns An array of relations that need to be updated with the join table reference.\n */\nconst load = async (uid: UID.ContentType, oldEntries: { id: string; locale: string }[]) => {\n const updates = [] as any;\n\n // Iterate all components and content types to find relations that need to be updated\n await strapi.db.transaction(async ({ trx }) => {\n const contentTypes = Object.values(strapi.contentTypes) as Schema.ContentType[];\n const components = Object.values(strapi.components) as Schema.Component[];\n\n for (const model of [...contentTypes, ...components]) {\n const dbModel = strapi.db.metadata.get(model.uid);\n\n for (const attribute of Object.values(dbModel.attributes) as any) {\n /**\n * Only consider unidirectional relations\n */\n if (attribute.type !== 'relation') continue;\n if (attribute.target !== uid) continue;\n if (attribute.inversedBy || attribute.mappedBy) continue;\n const joinTable = attribute.joinTable;\n // TODO: joinColumn relations\n if (!joinTable) continue;\n\n const { name } = joinTable.inverseJoinColumn;\n\n /**\n * Load all relations that need to be updated\n */\n const oldEntriesIds = oldEntries.map((entry) => entry.id);\n const relations = await strapi.db\n .getConnection()\n .select('*')\n .from(joinTable.name)\n .whereIn(name, oldEntriesIds)\n .transacting(trx);\n\n if (relations.length === 0) continue;\n\n updates.push({ joinTable, relations });\n }\n }\n });\n\n return updates;\n};\n\n/**\n * Updates uni directional relations to target the right entries when overriding published or draft entries.\n *\n * @param oldEntries The old entries that are being overridden\n * @param newEntries The new entries that are overriding the old ones\n * @param oldRelations The relations that were previously loaded with `load` @see load\n */\nconst sync = async (\n oldEntries: { id: string; locale: string }[],\n newEntries: { id: string; locale: string }[],\n oldRelations: { joinTable: any; relations: any[] }[]\n) => {\n /**\n * Create a map of old entry ids to new entry ids\n *\n * Will be used to update the relation target ids\n */\n const newEntryByLocale = keyBy('locale', newEntries);\n const oldEntriesMap = oldEntries.reduce(\n (acc, entry) => {\n const newEntry = newEntryByLocale[entry.locale];\n if (!newEntry) return acc;\n acc[entry.id] = newEntry.id;\n return acc;\n },\n {} as Record<string, string>\n );\n\n await strapi.db.transaction(async ({ trx }) => {\n // Iterate old relations that are deleted and insert the new ones\n for (const { joinTable, relations } of oldRelations) {\n // Update old ids with the new ones\n const newRelations = relations.map((relation) => {\n const column = joinTable.inverseJoinColumn.name;\n const newId = oldEntriesMap[relation[column]];\n return { ...relation, [column]: newId };\n });\n\n // Insert those relations into the join table\n await trx.batchInsert(joinTable.name, newRelations, 1000);\n }\n });\n};\n\nexport { load, sync };\n"],"names":[],"mappings":";AAcM,MAAA,OAAO,OAAO,KAAsB,eAAiD;AACzF,QAAM,UAAU,CAAA;AAGhB,QAAM,OAAO,GAAG,YAAY,OAAO,EAAE,UAAU;AAC7C,UAAM,eAAe,OAAO,OAAO,OAAO,YAAY;AACtD,UAAM,aAAa,OAAO,OAAO,OAAO,UAAU;AAElD,eAAW,SAAS,CAAC,GAAG,cAAc,GAAG,UAAU,GAAG;AACpD,YAAM,UAAU,OAAO,GAAG,SAAS,IAAI,MAAM,GAAG;AAEhD,iBAAW,aAAa,OAAO,OAAO,QAAQ,UAAU,GAAU;AAIhE,YAAI,UAAU,SAAS;AAAY;AACnC,YAAI,UAAU,WAAW;AAAK;AAC1B,YAAA,UAAU,cAAc,UAAU;AAAU;AAChD,cAAM,YAAY,UAAU;AAE5B,YAAI,CAAC;AAAW;AAEV,cAAA,EAAE,KAAK,IAAI,UAAU;AAK3B,cAAM,gBAAgB,WAAW,IAAI,CAAC,UAAU,MAAM,EAAE;AACxD,cAAM,YAAY,MAAM,OAAO,GAC5B,gBACA,OAAO,GAAG,EACV,KAAK,UAAU,IAAI,EACnB,QAAQ,MAAM,aAAa,EAC3B,YAAY,GAAG;AAElB,YAAI,UAAU,WAAW;AAAG;AAE5B,gBAAQ,KAAK,EAAE,WAAW,UAAW,CAAA;AAAA,MACvC;AAAA,IACF;AAAA,EAAA,CACD;AAEM,SAAA;AACT;AASA,MAAM,OAAO,OACX,YACA,YACA,iBACG;AAMG,QAAA,mBAAmB,MAAM,UAAU,UAAU;AACnD,QAAM,gBAAgB,WAAW;AAAA,IAC/B,CAAC,KAAK,UAAU;AACR,YAAA,WAAW,iBAAiB,MAAM,MAAM;AAC9C,UAAI,CAAC;AAAiB,eAAA;AAClB,UAAA,MAAM,EAAE,IAAI,SAAS;AAClB,aAAA;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EAAA;AAGH,QAAM,OAAO,GAAG,YAAY,OAAO,EAAE,UAAU;AAE7C,eAAW,EAAE,WAAW,UAAU,KAAK,cAAc;AAEnD,YAAM,eAAe,UAAU,IAAI,CAAC,aAAa;AACzC,cAAA,SAAS,UAAU,kBAAkB;AAC3C,cAAM,QAAQ,cAAc,SAAS,MAAM,CAAC;AAC5C,eAAO,EAAE,GAAG,UAAU,CAAC,MAAM,GAAG,MAAM;AAAA,MAAA,CACvC;AAGD,YAAM,IAAI,YAAY,UAAU,MAAM,cAAc,GAAI;AAAA,IAC1D;AAAA,EAAA,CACD;AACH;"}
1
+ {"version":3,"file":"unidirectional-relations.mjs","sources":["../../../../src/services/document-service/utils/unidirectional-relations.ts"],"sourcesContent":["/* eslint-disable no-continue */\nimport { keyBy, omit } from 'lodash/fp';\n\nimport { UID, Schema } from '@strapi/types';\n\ninterface LoadContext {\n oldVersions: { id: string; locale: string }[];\n newVersions: { id: string; locale: string }[];\n}\n\n/**\n * Loads lingering relations that need to be updated when overriding a published or draft entry.\n * This is necessary because the relations are uni-directional and the target entry is not aware of the source entry.\n * This is not the case for bi-directional relations, where the target entry is also linked to the source entry.\n */\nconst load = async (uid: UID.ContentType, { oldVersions, newVersions }: LoadContext) => {\n const updates = [] as any;\n\n // Iterate all components and content types to find relations that need to be updated\n await strapi.db.transaction(async ({ trx }) => {\n const contentTypes = Object.values(strapi.contentTypes) as Schema.ContentType[];\n const components = Object.values(strapi.components) as Schema.Component[];\n\n for (const model of [...contentTypes, ...components]) {\n const dbModel = strapi.db.metadata.get(model.uid);\n\n for (const attribute of Object.values(dbModel.attributes) as any) {\n /**\n * Only consider unidirectional relations\n */\n if (\n attribute.type !== 'relation' ||\n attribute.target !== uid ||\n attribute.inversedBy ||\n attribute.mappedBy\n ) {\n continue;\n }\n\n // TODO: joinColumn relations\n const joinTable = attribute.joinTable;\n if (!joinTable) {\n continue;\n }\n\n const { name: sourceColumnName } = joinTable.joinColumn;\n const { name: targetColumnName } = joinTable.inverseJoinColumn;\n\n /**\n * Load all relations that need to be updated\n */\n // NOTE: when the model has draft and publish, we can assume relation are only draft to draft & published to published\n const ids = oldVersions.map((entry) => entry.id);\n\n const oldVersionsRelations = await strapi.db\n .getConnection()\n .select('*')\n .from(joinTable.name)\n .whereIn(targetColumnName, ids)\n .transacting(trx);\n\n if (oldVersionsRelations.length > 0) {\n updates.push({ joinTable, relations: oldVersionsRelations });\n }\n\n /**\n * if publishing\n * if published version exists\n * updated published versions links\n * else\n * create link to newly published version\n *\n * if discarding\n * if published version link exists & not draft version link\n * create link to new draft version\n */\n\n if (!model.options?.draftAndPublish) {\n const ids = newVersions.map((entry) => entry.id);\n\n const newVersionsRelations = await strapi.db\n .getConnection()\n .select('*')\n .from(joinTable.name)\n .whereIn(targetColumnName, ids)\n .transacting(trx);\n\n if (newVersionsRelations.length > 0) {\n // when publishing a draft that doesn't have a published version yet,\n // copy the links to the draft over to the published version\n // when discarding a published version, if no drafts exists\n const discardToAdd = newVersionsRelations\n .filter((relation) => {\n const matchingOldVerion = oldVersionsRelations.find((oldRelation) => {\n return oldRelation[sourceColumnName] === relation[sourceColumnName];\n });\n\n return !matchingOldVerion;\n })\n .map(omit('id'));\n\n updates.push({ joinTable, relations: discardToAdd });\n }\n }\n }\n }\n });\n\n return updates;\n};\n\n/**\n * Updates uni directional relations to target the right entries when overriding published or draft entries.\n *\n * @param oldEntries The old entries that are being overridden\n * @param newEntries The new entries that are overriding the old ones\n * @param oldRelations The relations that were previously loaded with `load` @see load\n */\nconst sync = async (\n oldEntries: { id: string; locale: string }[],\n newEntries: { id: string; locale: string }[],\n oldRelations: { joinTable: any; relations: any[] }[]\n) => {\n /**\n * Create a map of old entry ids to new entry ids\n *\n * Will be used to update the relation target ids\n */\n const newEntryByLocale = keyBy('locale', newEntries);\n const oldEntriesMap = oldEntries.reduce(\n (acc, entry) => {\n const newEntry = newEntryByLocale[entry.locale];\n if (!newEntry) return acc;\n acc[entry.id] = newEntry.id;\n return acc;\n },\n {} as Record<string, string>\n );\n\n await strapi.db.transaction(async ({ trx }) => {\n // Iterate old relations that are deleted and insert the new ones\n for (const { joinTable, relations } of oldRelations) {\n // Update old ids with the new ones\n const column = joinTable.inverseJoinColumn.name;\n\n const newRelations = relations.map((relation) => {\n const newId = oldEntriesMap[relation[column]];\n return { ...relation, [column]: newId };\n });\n\n // Insert those relations into the join table\n await trx.batchInsert(joinTable.name, newRelations, 1000);\n }\n });\n};\n\nexport { load, sync };\n"],"names":["ids"],"mappings":";AAeA,MAAM,OAAO,OAAO,KAAsB,EAAE,aAAa,kBAA+B;AACtF,QAAM,UAAU,CAAA;AAGhB,QAAM,OAAO,GAAG,YAAY,OAAO,EAAE,UAAU;AAC7C,UAAM,eAAe,OAAO,OAAO,OAAO,YAAY;AACtD,UAAM,aAAa,OAAO,OAAO,OAAO,UAAU;AAElD,eAAW,SAAS,CAAC,GAAG,cAAc,GAAG,UAAU,GAAG;AACpD,YAAM,UAAU,OAAO,GAAG,SAAS,IAAI,MAAM,GAAG;AAEhD,iBAAW,aAAa,OAAO,OAAO,QAAQ,UAAU,GAAU;AAK9D,YAAA,UAAU,SAAS,cACnB,UAAU,WAAW,OACrB,UAAU,cACV,UAAU,UACV;AACA;AAAA,QACF;AAGA,cAAM,YAAY,UAAU;AAC5B,YAAI,CAAC,WAAW;AACd;AAAA,QACF;AAEA,cAAM,EAAE,MAAM,qBAAqB,UAAU;AAC7C,cAAM,EAAE,MAAM,qBAAqB,UAAU;AAM7C,cAAM,MAAM,YAAY,IAAI,CAAC,UAAU,MAAM,EAAE;AAE/C,cAAM,uBAAuB,MAAM,OAAO,GACvC,gBACA,OAAO,GAAG,EACV,KAAK,UAAU,IAAI,EACnB,QAAQ,kBAAkB,GAAG,EAC7B,YAAY,GAAG;AAEd,YAAA,qBAAqB,SAAS,GAAG;AACnC,kBAAQ,KAAK,EAAE,WAAW,WAAW,qBAAsB,CAAA;AAAA,QAC7D;AAcI,YAAA,CAAC,MAAM,SAAS,iBAAiB;AACnC,gBAAMA,OAAM,YAAY,IAAI,CAAC,UAAU,MAAM,EAAE;AAE/C,gBAAM,uBAAuB,MAAM,OAAO,GACvC,gBACA,OAAO,GAAG,EACV,KAAK,UAAU,IAAI,EACnB,QAAQ,kBAAkBA,IAAG,EAC7B,YAAY,GAAG;AAEd,cAAA,qBAAqB,SAAS,GAAG;AAInC,kBAAM,eAAe,qBAClB,OAAO,CAAC,aAAa;AACpB,oBAAM,oBAAoB,qBAAqB,KAAK,CAAC,gBAAgB;AACnE,uBAAO,YAAY,gBAAgB,MAAM,SAAS,gBAAgB;AAAA,cAAA,CACnE;AAED,qBAAO,CAAC;AAAA,YACT,CAAA,EACA,IAAI,KAAK,IAAI,CAAC;AAEjB,oBAAQ,KAAK,EAAE,WAAW,WAAW,aAAc,CAAA;AAAA,UACrD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EAAA,CACD;AAEM,SAAA;AACT;AASA,MAAM,OAAO,OACX,YACA,YACA,iBACG;AAMG,QAAA,mBAAmB,MAAM,UAAU,UAAU;AACnD,QAAM,gBAAgB,WAAW;AAAA,IAC/B,CAAC,KAAK,UAAU;AACR,YAAA,WAAW,iBAAiB,MAAM,MAAM;AAC9C,UAAI,CAAC;AAAiB,eAAA;AAClB,UAAA,MAAM,EAAE,IAAI,SAAS;AAClB,aAAA;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EAAA;AAGH,QAAM,OAAO,GAAG,YAAY,OAAO,EAAE,UAAU;AAE7C,eAAW,EAAE,WAAW,UAAU,KAAK,cAAc;AAE7C,YAAA,SAAS,UAAU,kBAAkB;AAE3C,YAAM,eAAe,UAAU,IAAI,CAAC,aAAa;AAC/C,cAAM,QAAQ,cAAc,SAAS,MAAM,CAAC;AAC5C,eAAO,EAAE,GAAG,UAAU,CAAC,MAAM,GAAG,MAAM;AAAA,MAAA,CACvC;AAGD,YAAM,IAAI,YAAY,UAAU,MAAM,cAAc,GAAI;AAAA,IAC1D;AAAA,EAAA,CACD;AACH;"}
@@ -20,47 +20,351 @@ export declare const getComponentJoinColumnInverseName: (identifiers: Identifier
20
20
  export declare const getComponentTypeColumn: (identifiers: Identifiers) => string;
21
21
  export declare const getComponentFkIndexName: (contentType: string, identifiers: Identifiers) => string;
22
22
  export type LoadedContentTypeModel = Struct.ContentTypeSchema & Required<Pick<Struct.ContentTypeSchema, 'collectionName' | 'uid' | 'modelName'>> & Pick<Model, 'lifecycles'>;
23
- export declare const transformAttribute: (name: string, attribute: Schema.Attribute.AnyAttribute, contentType: LoadedContentTypeModel, identifiers: Identifiers) => (Schema.Attribute.OfType<"biginteger"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxOption<string> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.UniqueOption) | (Schema.Attribute.OfType<"boolean"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<boolean> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"blocks"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"datetime"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<Schema.Attribute.DateTimeValue> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"date"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<Schema.Attribute.DateValue> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"decimal"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<number> & Schema.Attribute.MinMaxOption<number> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.UniqueOption) | (Schema.Attribute.OfType<"email"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"enumeration"> & Schema.Attribute.EnumerationProperties<string[]> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"float"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<number> & Schema.Attribute.MinMaxOption<number> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.UniqueOption) | (Schema.Attribute.OfType<"integer"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<number> & Schema.Attribute.MinMaxOption<number> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.UniqueOption) | (Schema.Attribute.OfType<"json"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.RequiredOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.DefaultOption<import("@strapi/types/dist/utils").JSONPrimitive>) | (Schema.Attribute.OfType<"password"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
23
+ export declare const transformAttribute: (name: string, attribute: Schema.Attribute.AnyAttribute, contentType: LoadedContentTypeModel, identifiers: Identifiers) => {
24
+ type: "biginteger";
25
+ pluginOptions?: object | undefined;
26
+ searchable?: boolean | undefined;
27
+ configurable?: boolean | undefined;
28
+ default?: string | (() => string) | undefined;
29
+ min?: string | undefined;
30
+ max?: string | undefined;
31
+ private?: boolean | undefined;
32
+ required?: boolean | undefined;
33
+ writable?: boolean | undefined;
34
+ visible?: boolean | undefined;
35
+ unique?: boolean | undefined;
36
+ } | {
37
+ type: "boolean";
38
+ pluginOptions?: object | undefined;
39
+ searchable?: boolean | undefined;
40
+ configurable?: boolean | undefined;
41
+ default?: boolean | (() => boolean) | undefined;
42
+ private?: boolean | undefined;
43
+ required?: boolean | undefined;
44
+ writable?: boolean | undefined;
45
+ visible?: boolean | undefined;
46
+ } | {
47
+ type: "blocks";
48
+ pluginOptions?: object | undefined;
49
+ searchable?: boolean | undefined;
50
+ configurable?: boolean | undefined;
51
+ private?: boolean | undefined;
52
+ required?: boolean | undefined;
53
+ writable?: boolean | undefined;
54
+ visible?: boolean | undefined;
55
+ } | {
56
+ type: "datetime";
57
+ pluginOptions?: object | undefined;
58
+ searchable?: boolean | undefined;
59
+ configurable?: boolean | undefined;
60
+ default?: Schema.Attribute.DateTimeValue | (() => Schema.Attribute.DateTimeValue) | undefined;
61
+ private?: boolean | undefined;
62
+ required?: boolean | undefined;
63
+ unique?: boolean | undefined;
64
+ writable?: boolean | undefined;
65
+ visible?: boolean | undefined;
66
+ } | {
67
+ type: "date";
68
+ pluginOptions?: object | undefined;
69
+ searchable?: boolean | undefined;
70
+ configurable?: boolean | undefined;
71
+ default?: Schema.Attribute.DateValue | (() => Schema.Attribute.DateValue) | undefined;
72
+ private?: boolean | undefined;
73
+ required?: boolean | undefined;
74
+ unique?: boolean | undefined;
75
+ writable?: boolean | undefined;
76
+ visible?: boolean | undefined;
77
+ } | {
78
+ type: "decimal";
79
+ pluginOptions?: object | undefined;
80
+ searchable?: boolean | undefined;
81
+ configurable?: boolean | undefined;
82
+ default?: number | (() => number) | undefined;
83
+ min?: number | undefined;
84
+ max?: number | undefined;
85
+ private?: boolean | undefined;
86
+ required?: boolean | undefined;
87
+ writable?: boolean | undefined;
88
+ visible?: boolean | undefined;
89
+ unique?: boolean | undefined;
90
+ } | {
91
+ type: "email";
92
+ pluginOptions?: object | undefined;
93
+ searchable?: boolean | undefined;
94
+ configurable?: boolean | undefined;
95
+ default?: string | (() => string) | undefined;
96
+ minLength?: number | undefined;
97
+ maxLength?: number | undefined;
98
+ private?: boolean | undefined;
99
+ required?: boolean | undefined;
100
+ unique?: boolean | undefined;
101
+ writable?: boolean | undefined;
102
+ visible?: boolean | undefined;
103
+ } | {
104
+ type: "enumeration";
105
+ pluginOptions?: object | undefined;
106
+ searchable?: boolean | undefined;
107
+ enum: string[];
108
+ enumName?: string | undefined;
109
+ configurable?: boolean | undefined;
110
+ default?: string | (() => string) | undefined;
111
+ private?: boolean | undefined;
112
+ required?: boolean | undefined;
113
+ writable?: boolean | undefined;
114
+ visible?: boolean | undefined;
115
+ } | {
116
+ type: "float";
117
+ pluginOptions?: object | undefined;
118
+ searchable?: boolean | undefined;
119
+ configurable?: boolean | undefined;
120
+ default?: number | (() => number) | undefined;
121
+ min?: number | undefined;
122
+ max?: number | undefined;
123
+ private?: boolean | undefined;
124
+ required?: boolean | undefined;
125
+ writable?: boolean | undefined;
126
+ visible?: boolean | undefined;
127
+ unique?: boolean | undefined;
128
+ } | {
129
+ type: "integer";
130
+ pluginOptions?: object | undefined;
131
+ searchable?: boolean | undefined;
132
+ configurable?: boolean | undefined;
133
+ default?: number | (() => number) | undefined;
134
+ min?: number | undefined;
135
+ max?: number | undefined;
136
+ private?: boolean | undefined;
137
+ required?: boolean | undefined;
138
+ writable?: boolean | undefined;
139
+ visible?: boolean | undefined;
140
+ unique?: boolean | undefined;
141
+ } | {
142
+ type: "json";
143
+ pluginOptions?: object | undefined;
144
+ searchable?: boolean | undefined;
145
+ configurable?: boolean | undefined;
146
+ required?: boolean | undefined;
147
+ private?: boolean | undefined;
148
+ writable?: boolean | undefined;
149
+ visible?: boolean | undefined;
150
+ default?: import("@strapi/types/dist/utils").JSONPrimitive | (() => import("@strapi/types/dist/utils").JSONPrimitive) | undefined;
151
+ } | {
152
+ type: "password";
153
+ pluginOptions?: object | undefined;
154
+ searchable?: boolean | undefined;
155
+ configurable?: boolean | undefined;
156
+ default?: string | (() => string) | undefined;
157
+ minLength?: number | undefined;
158
+ maxLength?: number | undefined;
159
+ private?: boolean | undefined;
160
+ required?: boolean | undefined;
161
+ writable?: boolean | undefined;
162
+ visible?: boolean | undefined;
163
+ } | {
164
+ type: "relation";
165
+ pluginOptions?: object | undefined;
166
+ searchable?: boolean | undefined;
167
+ configurable?: boolean | undefined;
168
+ private?: boolean | undefined;
169
+ writable?: boolean | undefined;
170
+ visible?: boolean | undefined;
171
+ required?: boolean | undefined;
24
172
  useJoinTable?: boolean | undefined;
25
- } & {
26
173
  relation: "morphToOne";
27
- }) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
174
+ } | {
175
+ type: "relation";
176
+ pluginOptions?: object | undefined;
177
+ searchable?: boolean | undefined;
178
+ configurable?: boolean | undefined;
179
+ private?: boolean | undefined;
180
+ writable?: boolean | undefined;
181
+ visible?: boolean | undefined;
182
+ required?: boolean | undefined;
28
183
  useJoinTable?: boolean | undefined;
29
- } & {
30
184
  relation: "morphToMany";
31
- }) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.CommonBidirectionalProperties<import("@strapi/types/dist/uid").ContentType> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
185
+ } | {
186
+ type: "relation";
187
+ pluginOptions?: object | undefined;
188
+ searchable?: boolean | undefined;
189
+ target: import("@strapi/types/dist/uid").ContentType;
190
+ inversedBy?: string | undefined;
191
+ mappedBy?: string | undefined;
192
+ configurable?: boolean | undefined;
193
+ private?: boolean | undefined;
194
+ writable?: boolean | undefined;
195
+ visible?: boolean | undefined;
196
+ required?: boolean | undefined;
32
197
  useJoinTable?: boolean | undefined;
33
- } & {
34
198
  relation: "oneToOne";
35
- }) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.CommonBidirectionalProperties<import("@strapi/types/dist/uid").ContentType> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
199
+ } | {
200
+ type: "relation";
201
+ pluginOptions?: object | undefined;
202
+ searchable?: boolean | undefined;
203
+ target: import("@strapi/types/dist/uid").ContentType;
204
+ inversedBy?: string | undefined;
205
+ mappedBy?: string | undefined;
206
+ configurable?: boolean | undefined;
207
+ private?: boolean | undefined;
208
+ writable?: boolean | undefined;
209
+ visible?: boolean | undefined;
210
+ required?: boolean | undefined;
36
211
  useJoinTable?: boolean | undefined;
37
- } & {
38
212
  relation: "oneToMany";
39
- }) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.CommonBidirectionalProperties<import("@strapi/types/dist/uid").ContentType> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
213
+ } | {
214
+ type: "relation";
215
+ pluginOptions?: object | undefined;
216
+ searchable?: boolean | undefined;
217
+ target: import("@strapi/types/dist/uid").ContentType;
218
+ inversedBy?: string | undefined;
219
+ mappedBy?: string | undefined;
220
+ configurable?: boolean | undefined;
221
+ private?: boolean | undefined;
222
+ writable?: boolean | undefined;
223
+ visible?: boolean | undefined;
224
+ required?: boolean | undefined;
40
225
  useJoinTable?: boolean | undefined;
41
- } & {
42
226
  relation: "manyToOne";
43
- }) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.CommonBidirectionalProperties<import("@strapi/types/dist/uid").ContentType> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
227
+ } | {
228
+ type: "relation";
229
+ pluginOptions?: object | undefined;
230
+ searchable?: boolean | undefined;
231
+ target: import("@strapi/types/dist/uid").ContentType;
232
+ inversedBy?: string | undefined;
233
+ mappedBy?: string | undefined;
234
+ configurable?: boolean | undefined;
235
+ private?: boolean | undefined;
236
+ writable?: boolean | undefined;
237
+ visible?: boolean | undefined;
238
+ required?: boolean | undefined;
44
239
  useJoinTable?: boolean | undefined;
45
- } & {
46
240
  relation: "manyToMany";
47
- }) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.XWayCommonProperties<import("@strapi/types/dist/uid").ContentType> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
241
+ } | {
242
+ type: "relation";
243
+ pluginOptions?: object | undefined;
244
+ searchable?: boolean | undefined;
245
+ target: import("@strapi/types/dist/uid").ContentType;
246
+ configurable?: boolean | undefined;
247
+ private?: boolean | undefined;
248
+ writable?: boolean | undefined;
249
+ visible?: boolean | undefined;
250
+ required?: boolean | undefined;
48
251
  useJoinTable?: boolean | undefined;
49
- } & {
50
252
  relation: "oneWay";
51
- }) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.XWayCommonProperties<import("@strapi/types/dist/uid").ContentType> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
253
+ } | {
254
+ type: "relation";
255
+ pluginOptions?: object | undefined;
256
+ searchable?: boolean | undefined;
257
+ target: import("@strapi/types/dist/uid").ContentType;
258
+ configurable?: boolean | undefined;
259
+ private?: boolean | undefined;
260
+ writable?: boolean | undefined;
261
+ visible?: boolean | undefined;
262
+ required?: boolean | undefined;
52
263
  useJoinTable?: boolean | undefined;
53
- } & {
54
264
  relation: "manyWay";
55
- }) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.MorphReferenceCommonProperties<import("@strapi/types/dist/uid").ContentType> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
265
+ } | {
266
+ type: "relation";
267
+ pluginOptions?: object | undefined;
268
+ searchable?: boolean | undefined;
269
+ target: import("@strapi/types/dist/uid").ContentType;
270
+ morphBy?: string | undefined;
271
+ configurable?: boolean | undefined;
272
+ private?: boolean | undefined;
273
+ writable?: boolean | undefined;
274
+ visible?: boolean | undefined;
275
+ required?: boolean | undefined;
56
276
  useJoinTable?: boolean | undefined;
57
- } & {
58
277
  relation: "morphOne";
59
- }) | (Schema.Attribute.OfType<"relation"> & Schema.Attribute.MorphReferenceCommonProperties<import("@strapi/types/dist/uid").ContentType> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.RequiredOption & {
278
+ } | {
279
+ type: "relation";
280
+ pluginOptions?: object | undefined;
281
+ searchable?: boolean | undefined;
282
+ target: import("@strapi/types/dist/uid").ContentType;
283
+ morphBy?: string | undefined;
284
+ configurable?: boolean | undefined;
285
+ private?: boolean | undefined;
286
+ writable?: boolean | undefined;
287
+ visible?: boolean | undefined;
288
+ required?: boolean | undefined;
60
289
  useJoinTable?: boolean | undefined;
61
- } & {
62
290
  relation: "morphMany";
63
- }) | (Schema.Attribute.OfType<"richtext"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"string"> & Schema.Attribute.StringProperties & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.UniqueOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"text"> & Schema.Attribute.TextProperties & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.UniqueOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"time"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<Schema.Attribute.TimeValue> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"timestamp"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<Schema.Attribute.TimestampValue> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | (Schema.Attribute.OfType<"uid"> & Schema.Attribute.UIDProperties<string, Schema.Attribute.UIDOptions> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption) | {
291
+ } | {
292
+ type: "richtext";
293
+ pluginOptions?: object | undefined;
294
+ searchable?: boolean | undefined;
295
+ configurable?: boolean | undefined;
296
+ default?: string | (() => string) | undefined;
297
+ minLength?: number | undefined;
298
+ maxLength?: number | undefined;
299
+ private?: boolean | undefined;
300
+ required?: boolean | undefined;
301
+ writable?: boolean | undefined;
302
+ visible?: boolean | undefined;
303
+ } | {
304
+ type: "string";
305
+ pluginOptions?: object | undefined;
306
+ searchable?: boolean | undefined;
307
+ regex?: RegExp | undefined;
308
+ configurable?: boolean | undefined;
309
+ default?: string | (() => string) | undefined;
310
+ minLength?: number | undefined;
311
+ maxLength?: number | undefined;
312
+ private?: boolean | undefined;
313
+ unique?: boolean | undefined;
314
+ required?: boolean | undefined;
315
+ writable?: boolean | undefined;
316
+ visible?: boolean | undefined;
317
+ } | {
318
+ type: "text";
319
+ pluginOptions?: object | undefined;
320
+ searchable?: boolean | undefined;
321
+ regex?: RegExp | undefined;
322
+ configurable?: boolean | undefined;
323
+ default?: string | (() => string) | undefined;
324
+ minLength?: number | undefined;
325
+ maxLength?: number | undefined;
326
+ private?: boolean | undefined;
327
+ unique?: boolean | undefined;
328
+ required?: boolean | undefined;
329
+ writable?: boolean | undefined;
330
+ visible?: boolean | undefined;
331
+ } | {
332
+ type: "time";
333
+ pluginOptions?: object | undefined;
334
+ searchable?: boolean | undefined;
335
+ configurable?: boolean | undefined;
336
+ default?: Schema.Attribute.TimeValue | (() => Schema.Attribute.TimeValue) | undefined;
337
+ private?: boolean | undefined;
338
+ required?: boolean | undefined;
339
+ unique?: boolean | undefined;
340
+ writable?: boolean | undefined;
341
+ visible?: boolean | undefined;
342
+ } | {
343
+ type: "timestamp";
344
+ pluginOptions?: object | undefined;
345
+ searchable?: boolean | undefined;
346
+ configurable?: boolean | undefined;
347
+ default?: Schema.Attribute.TimestampValue | (() => Schema.Attribute.TimestampValue) | undefined;
348
+ private?: boolean | undefined;
349
+ required?: boolean | undefined;
350
+ unique?: boolean | undefined;
351
+ writable?: boolean | undefined;
352
+ visible?: boolean | undefined;
353
+ } | {
354
+ type: "uid";
355
+ pluginOptions?: object | undefined;
356
+ searchable?: boolean | undefined;
357
+ targetField?: string | undefined;
358
+ options?: Schema.Attribute.UIDOptions | undefined;
359
+ configurable?: boolean | undefined;
360
+ default?: string | (() => string) | undefined;
361
+ minLength?: number | undefined;
362
+ maxLength?: number | undefined;
363
+ private?: boolean | undefined;
364
+ required?: boolean | undefined;
365
+ writable?: boolean | undefined;
366
+ visible?: boolean | undefined;
367
+ } | {
64
368
  type: string;
65
369
  relation: string;
66
370
  target: string;
@@ -1 +1 @@
1
- {"version":3,"file":"transform-content-types-to-models.d.ts","sourceRoot":"","sources":["../../src/utils/transform-content-types-to-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,yBAAyB,mBAAoB,MAAM,eAAe,WAAW,WAKzF,CAAC;AAEF,eAAO,MAAM,kBAAkB,mBAAoB,MAAM,eAAe,WAAW,WAKlF,CAAC;AAEF,eAAO,MAAM,gCAAgC,gBAAiB,WAAW,WAKxE,CAAC;AAEF,eAAO,MAAM,iCAAiC,gBAAiB,WAAW,WAKzE,CAAC;AAEF,eAAO,MAAM,sBAAsB,gBAAiB,WAAW,WAE9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,eAAe,WAAW,WAMpF,CAAC;AAIF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,iBAAiB,GAC3D,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,gBAAgB,GAAG,KAAK,GAAG,WAAW,CAAC,CAAC,GAChF,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AAG5B,eAAO,MAAM,kBAAkB,SACvB,MAAM,aACD,OAAO,SAAS,CAAC,YAAY,eAC3B,sBAAsB,eACtB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FzB,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBACjB,sBAAsB,eACtB,WAAW,OAazB,CAAC;AAEF,eAAO,MAAM,iBAAiB,gBACf,sBAAsB;UACc,aAAa,GAAG,WAAW;CAI7E,CAAC;AAEF,eAAO,MAAM,gBAAgB,iBAAW,CAAC;AAgFzC,eAAO,MAAM,6BAA6B,iBAC1B,sBAAsB,EAAE,eACzB,WAAW,KACvB,KAAK,EAkEP,CAAC"}
1
+ {"version":3,"file":"transform-content-types-to-models.d.ts","sourceRoot":"","sources":["../../src/utils/transform-content-types-to-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,yBAAyB,mBAAoB,MAAM,eAAe,WAAW,WAKzF,CAAC;AAEF,eAAO,MAAM,kBAAkB,mBAAoB,MAAM,eAAe,WAAW,WAKlF,CAAC;AAEF,eAAO,MAAM,gCAAgC,gBAAiB,WAAW,WAKxE,CAAC;AAEF,eAAO,MAAM,iCAAiC,gBAAiB,WAAW,WAKzE,CAAC;AAEF,eAAO,MAAM,sBAAsB,gBAAiB,WAAW,WAE9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,eAAe,WAAW,WAMpF,CAAC;AAIF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,iBAAiB,GAC3D,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,gBAAgB,GAAG,KAAK,GAAG,WAAW,CAAC,CAAC,GAChF,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AAG5B,eAAO,MAAM,kBAAkB,SACvB,MAAM,aACD,OAAO,SAAS,CAAC,YAAY,eAC3B,sBAAsB,eACtB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FzB,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBACjB,sBAAsB,eACtB,WAAW,OAazB,CAAC;AAEF,eAAO,MAAM,iBAAiB,gBACf,sBAAsB;UACc,aAAa,GAAG,WAAW;CAI7E,CAAC;AAEF,eAAO,MAAM,gBAAgB,iBAAW,CAAC;AAgFzC,eAAO,MAAM,6BAA6B,iBAC1B,sBAAsB,EAAE,eACzB,WAAW,KACvB,KAAK,EAkEP,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/core",
3
- "version": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
3
+ "version": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
4
4
  "description": "Core of Strapi",
5
5
  "homepage": "https://strapi.io",
6
6
  "bugs": {
@@ -55,15 +55,15 @@
55
55
  "@koa/cors": "5.0.0",
56
56
  "@koa/router": "12.0.1",
57
57
  "@paralleldrive/cuid2": "2.2.2",
58
- "@strapi/admin": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
59
- "@strapi/database": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
60
- "@strapi/generators": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
61
- "@strapi/logger": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
58
+ "@strapi/admin": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
59
+ "@strapi/database": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
60
+ "@strapi/generators": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
61
+ "@strapi/logger": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
62
62
  "@strapi/pack-up": "5.0.0",
63
- "@strapi/permissions": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
64
- "@strapi/types": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
65
- "@strapi/typescript-utils": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
66
- "@strapi/utils": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
63
+ "@strapi/permissions": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
64
+ "@strapi/types": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
65
+ "@strapi/typescript-utils": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
66
+ "@strapi/utils": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
67
67
  "bcryptjs": "2.4.3",
68
68
  "boxen": "5.1.2",
69
69
  "chalk": "4.1.2",
@@ -102,7 +102,7 @@
102
102
  "resolve.exports": "2.0.2",
103
103
  "semver": "7.5.4",
104
104
  "statuses": "2.0.1",
105
- "typescript": "5.2.2",
105
+ "typescript": "5.3.2",
106
106
  "undici": "6.19.2",
107
107
  "yup": "0.32.9"
108
108
  },
@@ -126,13 +126,13 @@
126
126
  "@types/node": "18.19.24",
127
127
  "@types/node-schedule": "2.1.7",
128
128
  "@types/statuses": "2.0.1",
129
- "eslint-config-custom": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c",
129
+ "eslint-config-custom": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd",
130
130
  "supertest": "6.3.3",
131
- "tsconfig": "0.0.0-next.55dabf6295dfb7987fcab8a6b40212555f0e684c"
131
+ "tsconfig": "0.0.0-next.63ac2488522fc5d934952d9f1fe5f900131316dd"
132
132
  },
133
133
  "engines": {
134
- "node": ">=18.0.0 <=20.x.x",
134
+ "node": ">=18.0.0 <=22.x.x",
135
135
  "npm": ">=6.0.0"
136
136
  },
137
- "gitHead": "55dabf6295dfb7987fcab8a6b40212555f0e684c"
137
+ "gitHead": "63ac2488522fc5d934952d9f1fe5f900131316dd"
138
138
  }