@strapi/content-releases 5.33.2 → 5.33.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.
@@ -27,7 +27,7 @@ var utils = require('@strapi/utils');
27
27
  });
28
28
  }
29
29
  const releaseActions = await trx.select('*').from('strapi_release_actions');
30
- utils.async.map(releaseActions, async (action)=>{
30
+ await utils.async.map(releaseActions, async (action)=>{
31
31
  const { target_type, target_id } = action;
32
32
  const entry = await db.query(target_type).findOne({
33
33
  where: {
@@ -1 +1 @@
1
- {"version":3,"file":"5.0.0-document-id-in-actions.js","sources":["../../../../server/src/migrations/database/5.0.0-document-id-in-actions.ts"],"sourcesContent":["import { async } from '@strapi/utils';\n\nimport type { Migration, Database } from '@strapi/database';\n\ntype Knex = Parameters<Migration['up']>[0];\n\n/**\n * On v4, release actions are linked with entries using the built in Polymorphic relations.\n *\n * On v5, we are going to save entryDocumentId on the release action and make the link manually.\n * This because entryId is not a reliable way to link documents, as it can change.\n */\nexport const addEntryDocumentToReleaseActions: Migration = {\n name: 'content-releases::5.0.0-add-entry-document-id-to-release-actions',\n async up(trx: Knex, db: Database) {\n // Check if the table exists\n const hasTable = await trx.schema.hasTable('strapi_release_actions');\n\n if (!hasTable) {\n return;\n }\n\n const hasPolymorphicColumn = await trx.schema.hasColumn('strapi_release_actions', 'target_id');\n\n // If user has PolymorphicColumn means that is coming from v4\n if (hasPolymorphicColumn) {\n // First time coming from v4 user doesn't have entryDocumentId\n // but we double check to avoid errors\n const hasEntryDocumentIdColumn = await trx.schema.hasColumn(\n 'strapi_release_actions',\n 'entry_document_id'\n );\n\n if (!hasEntryDocumentIdColumn) {\n await trx.schema.alterTable('strapi_release_actions', (table) => {\n table.string('entry_document_id');\n });\n }\n\n const releaseActions = await trx.select('*').from('strapi_release_actions');\n\n async.map(releaseActions, async (action: any) => {\n const { target_type, target_id } = action;\n\n const entry = await db.query(target_type).findOne({ where: { id: target_id } });\n\n if (entry) {\n await trx('strapi_release_actions')\n .update({ entry_document_id: entry.documentId })\n .where('id', action.id);\n }\n });\n }\n },\n async down() {\n throw new Error('not implemented');\n },\n};\n"],"names":["addEntryDocumentToReleaseActions","name","up","trx","db","hasTable","schema","hasPolymorphicColumn","hasColumn","hasEntryDocumentIdColumn","alterTable","table","string","releaseActions","select","from","async","map","action","target_type","target_id","entry","query","findOne","where","id","update","entry_document_id","documentId","down","Error"],"mappings":";;;;AAMA;;;;;UAMaA,gCAA8C,GAAA;IACzDC,IAAM,EAAA,kEAAA;IACN,MAAMC,EAAAA,CAAAA,CAAGC,GAAS,EAAEC,EAAY,EAAA;;AAE9B,QAAA,MAAMC,WAAW,MAAMF,GAAAA,CAAIG,MAAM,CAACD,QAAQ,CAAC,wBAAA,CAAA;AAE3C,QAAA,IAAI,CAACA,QAAU,EAAA;AACb,YAAA;AACF;AAEA,QAAA,MAAME,uBAAuB,MAAMJ,GAAAA,CAAIG,MAAM,CAACE,SAAS,CAAC,wBAA0B,EAAA,WAAA,CAAA;;AAGlF,QAAA,IAAID,oBAAsB,EAAA;;;AAGxB,YAAA,MAAME,2BAA2B,MAAMN,GAAAA,CAAIG,MAAM,CAACE,SAAS,CACzD,wBACA,EAAA,mBAAA,CAAA;AAGF,YAAA,IAAI,CAACC,wBAA0B,EAAA;AAC7B,gBAAA,MAAMN,IAAIG,MAAM,CAACI,UAAU,CAAC,0BAA0B,CAACC,KAAAA,GAAAA;AACrDA,oBAAAA,KAAAA,CAAMC,MAAM,CAAC,mBAAA,CAAA;AACf,iBAAA,CAAA;AACF;AAEA,YAAA,MAAMC,iBAAiB,MAAMV,GAAAA,CAAIW,MAAM,CAAC,GAAA,CAAA,CAAKC,IAAI,CAAC,wBAAA,CAAA;YAElDC,WAAMC,CAAAA,GAAG,CAACJ,cAAAA,EAAgB,OAAOK,MAAAA,GAAAA;AAC/B,gBAAA,MAAM,EAAEC,WAAW,EAAEC,SAAS,EAAE,GAAGF,MAAAA;AAEnC,gBAAA,MAAMG,QAAQ,MAAMjB,EAAAA,CAAGkB,KAAK,CAACH,WAAAA,CAAAA,CAAaI,OAAO,CAAC;oBAAEC,KAAO,EAAA;wBAAEC,EAAIL,EAAAA;AAAU;AAAE,iBAAA,CAAA;AAE7E,gBAAA,IAAIC,KAAO,EAAA;oBACT,MAAMlB,GAAAA,CAAI,wBACPuB,CAAAA,CAAAA,MAAM,CAAC;AAAEC,wBAAAA,iBAAAA,EAAmBN,MAAMO;AAAW,qBAAA,CAAA,CAC7CJ,KAAK,CAAC,IAAMN,EAAAA,MAAAA,CAAOO,EAAE,CAAA;AAC1B;AACF,aAAA,CAAA;AACF;AACF,KAAA;IACA,MAAMI,IAAAA,CAAAA,GAAAA;AACJ,QAAA,MAAM,IAAIC,KAAM,CAAA,iBAAA,CAAA;AAClB;AACF;;;;"}
1
+ {"version":3,"file":"5.0.0-document-id-in-actions.js","sources":["../../../../server/src/migrations/database/5.0.0-document-id-in-actions.ts"],"sourcesContent":["import { async } from '@strapi/utils';\n\nimport type { Migration, Database } from '@strapi/database';\n\ntype Knex = Parameters<Migration['up']>[0];\n\n/**\n * On v4, release actions are linked with entries using the built in Polymorphic relations.\n *\n * On v5, we are going to save entryDocumentId on the release action and make the link manually.\n * This because entryId is not a reliable way to link documents, as it can change.\n */\nexport const addEntryDocumentToReleaseActions: Migration = {\n name: 'content-releases::5.0.0-add-entry-document-id-to-release-actions',\n async up(trx: Knex, db: Database) {\n // Check if the table exists\n const hasTable = await trx.schema.hasTable('strapi_release_actions');\n\n if (!hasTable) {\n return;\n }\n\n const hasPolymorphicColumn = await trx.schema.hasColumn('strapi_release_actions', 'target_id');\n\n // If user has PolymorphicColumn means that is coming from v4\n if (hasPolymorphicColumn) {\n // First time coming from v4 user doesn't have entryDocumentId\n // but we double check to avoid errors\n const hasEntryDocumentIdColumn = await trx.schema.hasColumn(\n 'strapi_release_actions',\n 'entry_document_id'\n );\n\n if (!hasEntryDocumentIdColumn) {\n await trx.schema.alterTable('strapi_release_actions', (table) => {\n table.string('entry_document_id');\n });\n }\n\n const releaseActions = await trx.select('*').from('strapi_release_actions');\n\n await async.map(releaseActions, async (action: any) => {\n const { target_type, target_id } = action;\n\n const entry = await db.query(target_type).findOne({ where: { id: target_id } });\n\n if (entry) {\n await trx('strapi_release_actions')\n .update({ entry_document_id: entry.documentId })\n .where('id', action.id);\n }\n });\n }\n },\n async down() {\n throw new Error('not implemented');\n },\n};\n"],"names":["addEntryDocumentToReleaseActions","name","up","trx","db","hasTable","schema","hasPolymorphicColumn","hasColumn","hasEntryDocumentIdColumn","alterTable","table","string","releaseActions","select","from","async","map","action","target_type","target_id","entry","query","findOne","where","id","update","entry_document_id","documentId","down","Error"],"mappings":";;;;AAMA;;;;;UAMaA,gCAA8C,GAAA;IACzDC,IAAM,EAAA,kEAAA;IACN,MAAMC,EAAAA,CAAAA,CAAGC,GAAS,EAAEC,EAAY,EAAA;;AAE9B,QAAA,MAAMC,WAAW,MAAMF,GAAAA,CAAIG,MAAM,CAACD,QAAQ,CAAC,wBAAA,CAAA;AAE3C,QAAA,IAAI,CAACA,QAAU,EAAA;AACb,YAAA;AACF;AAEA,QAAA,MAAME,uBAAuB,MAAMJ,GAAAA,CAAIG,MAAM,CAACE,SAAS,CAAC,wBAA0B,EAAA,WAAA,CAAA;;AAGlF,QAAA,IAAID,oBAAsB,EAAA;;;AAGxB,YAAA,MAAME,2BAA2B,MAAMN,GAAAA,CAAIG,MAAM,CAACE,SAAS,CACzD,wBACA,EAAA,mBAAA,CAAA;AAGF,YAAA,IAAI,CAACC,wBAA0B,EAAA;AAC7B,gBAAA,MAAMN,IAAIG,MAAM,CAACI,UAAU,CAAC,0BAA0B,CAACC,KAAAA,GAAAA;AACrDA,oBAAAA,KAAAA,CAAMC,MAAM,CAAC,mBAAA,CAAA;AACf,iBAAA,CAAA;AACF;AAEA,YAAA,MAAMC,iBAAiB,MAAMV,GAAAA,CAAIW,MAAM,CAAC,GAAA,CAAA,CAAKC,IAAI,CAAC,wBAAA,CAAA;AAElD,YAAA,MAAMC,WAAMC,CAAAA,GAAG,CAACJ,cAAAA,EAAgB,OAAOK,MAAAA,GAAAA;AACrC,gBAAA,MAAM,EAAEC,WAAW,EAAEC,SAAS,EAAE,GAAGF,MAAAA;AAEnC,gBAAA,MAAMG,QAAQ,MAAMjB,EAAAA,CAAGkB,KAAK,CAACH,WAAAA,CAAAA,CAAaI,OAAO,CAAC;oBAAEC,KAAO,EAAA;wBAAEC,EAAIL,EAAAA;AAAU;AAAE,iBAAA,CAAA;AAE7E,gBAAA,IAAIC,KAAO,EAAA;oBACT,MAAMlB,GAAAA,CAAI,wBACPuB,CAAAA,CAAAA,MAAM,CAAC;AAAEC,wBAAAA,iBAAAA,EAAmBN,MAAMO;AAAW,qBAAA,CAAA,CAC7CJ,KAAK,CAAC,IAAMN,EAAAA,MAAAA,CAAOO,EAAE,CAAA;AAC1B;AACF,aAAA,CAAA;AACF;AACF,KAAA;IACA,MAAMI,IAAAA,CAAAA,GAAAA;AACJ,QAAA,MAAM,IAAIC,KAAM,CAAA,iBAAA,CAAA;AAClB;AACF;;;;"}
@@ -25,7 +25,7 @@ import { async } from '@strapi/utils';
25
25
  });
26
26
  }
27
27
  const releaseActions = await trx.select('*').from('strapi_release_actions');
28
- async.map(releaseActions, async (action)=>{
28
+ await async.map(releaseActions, async (action)=>{
29
29
  const { target_type, target_id } = action;
30
30
  const entry = await db.query(target_type).findOne({
31
31
  where: {
@@ -1 +1 @@
1
- {"version":3,"file":"5.0.0-document-id-in-actions.mjs","sources":["../../../../server/src/migrations/database/5.0.0-document-id-in-actions.ts"],"sourcesContent":["import { async } from '@strapi/utils';\n\nimport type { Migration, Database } from '@strapi/database';\n\ntype Knex = Parameters<Migration['up']>[0];\n\n/**\n * On v4, release actions are linked with entries using the built in Polymorphic relations.\n *\n * On v5, we are going to save entryDocumentId on the release action and make the link manually.\n * This because entryId is not a reliable way to link documents, as it can change.\n */\nexport const addEntryDocumentToReleaseActions: Migration = {\n name: 'content-releases::5.0.0-add-entry-document-id-to-release-actions',\n async up(trx: Knex, db: Database) {\n // Check if the table exists\n const hasTable = await trx.schema.hasTable('strapi_release_actions');\n\n if (!hasTable) {\n return;\n }\n\n const hasPolymorphicColumn = await trx.schema.hasColumn('strapi_release_actions', 'target_id');\n\n // If user has PolymorphicColumn means that is coming from v4\n if (hasPolymorphicColumn) {\n // First time coming from v4 user doesn't have entryDocumentId\n // but we double check to avoid errors\n const hasEntryDocumentIdColumn = await trx.schema.hasColumn(\n 'strapi_release_actions',\n 'entry_document_id'\n );\n\n if (!hasEntryDocumentIdColumn) {\n await trx.schema.alterTable('strapi_release_actions', (table) => {\n table.string('entry_document_id');\n });\n }\n\n const releaseActions = await trx.select('*').from('strapi_release_actions');\n\n async.map(releaseActions, async (action: any) => {\n const { target_type, target_id } = action;\n\n const entry = await db.query(target_type).findOne({ where: { id: target_id } });\n\n if (entry) {\n await trx('strapi_release_actions')\n .update({ entry_document_id: entry.documentId })\n .where('id', action.id);\n }\n });\n }\n },\n async down() {\n throw new Error('not implemented');\n },\n};\n"],"names":["addEntryDocumentToReleaseActions","name","up","trx","db","hasTable","schema","hasPolymorphicColumn","hasColumn","hasEntryDocumentIdColumn","alterTable","table","string","releaseActions","select","from","async","map","action","target_type","target_id","entry","query","findOne","where","id","update","entry_document_id","documentId","down","Error"],"mappings":";;AAMA;;;;;UAMaA,gCAA8C,GAAA;IACzDC,IAAM,EAAA,kEAAA;IACN,MAAMC,EAAAA,CAAAA,CAAGC,GAAS,EAAEC,EAAY,EAAA;;AAE9B,QAAA,MAAMC,WAAW,MAAMF,GAAAA,CAAIG,MAAM,CAACD,QAAQ,CAAC,wBAAA,CAAA;AAE3C,QAAA,IAAI,CAACA,QAAU,EAAA;AACb,YAAA;AACF;AAEA,QAAA,MAAME,uBAAuB,MAAMJ,GAAAA,CAAIG,MAAM,CAACE,SAAS,CAAC,wBAA0B,EAAA,WAAA,CAAA;;AAGlF,QAAA,IAAID,oBAAsB,EAAA;;;AAGxB,YAAA,MAAME,2BAA2B,MAAMN,GAAAA,CAAIG,MAAM,CAACE,SAAS,CACzD,wBACA,EAAA,mBAAA,CAAA;AAGF,YAAA,IAAI,CAACC,wBAA0B,EAAA;AAC7B,gBAAA,MAAMN,IAAIG,MAAM,CAACI,UAAU,CAAC,0BAA0B,CAACC,KAAAA,GAAAA;AACrDA,oBAAAA,KAAAA,CAAMC,MAAM,CAAC,mBAAA,CAAA;AACf,iBAAA,CAAA;AACF;AAEA,YAAA,MAAMC,iBAAiB,MAAMV,GAAAA,CAAIW,MAAM,CAAC,GAAA,CAAA,CAAKC,IAAI,CAAC,wBAAA,CAAA;YAElDC,KAAMC,CAAAA,GAAG,CAACJ,cAAAA,EAAgB,OAAOK,MAAAA,GAAAA;AAC/B,gBAAA,MAAM,EAAEC,WAAW,EAAEC,SAAS,EAAE,GAAGF,MAAAA;AAEnC,gBAAA,MAAMG,QAAQ,MAAMjB,EAAAA,CAAGkB,KAAK,CAACH,WAAAA,CAAAA,CAAaI,OAAO,CAAC;oBAAEC,KAAO,EAAA;wBAAEC,EAAIL,EAAAA;AAAU;AAAE,iBAAA,CAAA;AAE7E,gBAAA,IAAIC,KAAO,EAAA;oBACT,MAAMlB,GAAAA,CAAI,wBACPuB,CAAAA,CAAAA,MAAM,CAAC;AAAEC,wBAAAA,iBAAAA,EAAmBN,MAAMO;AAAW,qBAAA,CAAA,CAC7CJ,KAAK,CAAC,IAAMN,EAAAA,MAAAA,CAAOO,EAAE,CAAA;AAC1B;AACF,aAAA,CAAA;AACF;AACF,KAAA;IACA,MAAMI,IAAAA,CAAAA,GAAAA;AACJ,QAAA,MAAM,IAAIC,KAAM,CAAA,iBAAA,CAAA;AAClB;AACF;;;;"}
1
+ {"version":3,"file":"5.0.0-document-id-in-actions.mjs","sources":["../../../../server/src/migrations/database/5.0.0-document-id-in-actions.ts"],"sourcesContent":["import { async } from '@strapi/utils';\n\nimport type { Migration, Database } from '@strapi/database';\n\ntype Knex = Parameters<Migration['up']>[0];\n\n/**\n * On v4, release actions are linked with entries using the built in Polymorphic relations.\n *\n * On v5, we are going to save entryDocumentId on the release action and make the link manually.\n * This because entryId is not a reliable way to link documents, as it can change.\n */\nexport const addEntryDocumentToReleaseActions: Migration = {\n name: 'content-releases::5.0.0-add-entry-document-id-to-release-actions',\n async up(trx: Knex, db: Database) {\n // Check if the table exists\n const hasTable = await trx.schema.hasTable('strapi_release_actions');\n\n if (!hasTable) {\n return;\n }\n\n const hasPolymorphicColumn = await trx.schema.hasColumn('strapi_release_actions', 'target_id');\n\n // If user has PolymorphicColumn means that is coming from v4\n if (hasPolymorphicColumn) {\n // First time coming from v4 user doesn't have entryDocumentId\n // but we double check to avoid errors\n const hasEntryDocumentIdColumn = await trx.schema.hasColumn(\n 'strapi_release_actions',\n 'entry_document_id'\n );\n\n if (!hasEntryDocumentIdColumn) {\n await trx.schema.alterTable('strapi_release_actions', (table) => {\n table.string('entry_document_id');\n });\n }\n\n const releaseActions = await trx.select('*').from('strapi_release_actions');\n\n await async.map(releaseActions, async (action: any) => {\n const { target_type, target_id } = action;\n\n const entry = await db.query(target_type).findOne({ where: { id: target_id } });\n\n if (entry) {\n await trx('strapi_release_actions')\n .update({ entry_document_id: entry.documentId })\n .where('id', action.id);\n }\n });\n }\n },\n async down() {\n throw new Error('not implemented');\n },\n};\n"],"names":["addEntryDocumentToReleaseActions","name","up","trx","db","hasTable","schema","hasPolymorphicColumn","hasColumn","hasEntryDocumentIdColumn","alterTable","table","string","releaseActions","select","from","async","map","action","target_type","target_id","entry","query","findOne","where","id","update","entry_document_id","documentId","down","Error"],"mappings":";;AAMA;;;;;UAMaA,gCAA8C,GAAA;IACzDC,IAAM,EAAA,kEAAA;IACN,MAAMC,EAAAA,CAAAA,CAAGC,GAAS,EAAEC,EAAY,EAAA;;AAE9B,QAAA,MAAMC,WAAW,MAAMF,GAAAA,CAAIG,MAAM,CAACD,QAAQ,CAAC,wBAAA,CAAA;AAE3C,QAAA,IAAI,CAACA,QAAU,EAAA;AACb,YAA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ANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/content-releases",
3
- "version": "5.33.2",
3
+ "version": "5.33.4",
4
4
  "description": "Strapi plugin for organizing and releasing content",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,29 +59,29 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@reduxjs/toolkit": "1.9.7",
62
- "@strapi/database": "5.33.2",
63
- "@strapi/design-system": "2.0.1",
64
- "@strapi/icons": "2.0.1",
65
- "@strapi/types": "5.33.2",
66
- "@strapi/utils": "5.33.2",
62
+ "@strapi/database": "5.33.4",
63
+ "@strapi/design-system": "2.1.2",
64
+ "@strapi/icons": "2.1.2",
65
+ "@strapi/types": "5.33.4",
66
+ "@strapi/utils": "5.33.4",
67
67
  "date-fns": "2.30.0",
68
68
  "date-fns-tz": "2.0.1",
69
69
  "formik": "2.4.5",
70
70
  "lodash": "4.17.21",
71
- "qs": "6.11.1",
71
+ "qs": "6.14.1",
72
72
  "react-intl": "6.6.2",
73
73
  "react-redux": "8.1.3",
74
74
  "yup": "0.32.9"
75
75
  },
76
76
  "devDependencies": {
77
- "@strapi/admin": "5.33.2",
78
- "@strapi/admin-test-utils": "5.33.2",
79
- "@strapi/content-manager": "5.33.2",
77
+ "@strapi/admin": "5.33.4",
78
+ "@strapi/admin-test-utils": "5.33.4",
79
+ "@strapi/content-manager": "5.33.4",
80
80
  "@testing-library/dom": "10.4.1",
81
81
  "@testing-library/react": "16.3.0",
82
82
  "@testing-library/user-event": "14.6.1",
83
83
  "@types/koa": "2.13.4",
84
- "koa": "2.16.1",
84
+ "koa": "2.16.3",
85
85
  "msw": "1.3.0",
86
86
  "react": "18.3.1",
87
87
  "react-dom": "18.3.1",