@strapi/content-releases 0.0.0-experimental.fd379e4937e431407d784eaa5fe7f93cf2a53386 → 0.0.0-experimental.fdacf4285d1cada9d94ab4dcd756c5362cba1b54
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/_chunks/{App-Cne--1Z8.mjs → App-B7XAvv8M.mjs} +283 -112
- package/dist/_chunks/App-B7XAvv8M.mjs.map +1 -0
- package/dist/_chunks/{App-BKB1esYS.js → App-bh0od5o7.js} +323 -152
- package/dist/_chunks/App-bh0od5o7.js.map +1 -0
- package/dist/_chunks/{ReleasesSettingsPage-C1WwGWIH.mjs → ReleasesSettingsPage-DI0i3yzr.mjs} +2 -2
- package/dist/_chunks/{ReleasesSettingsPage-C1WwGWIH.mjs.map → ReleasesSettingsPage-DI0i3yzr.mjs.map} +1 -1
- package/dist/_chunks/{ReleasesSettingsPage-kuXIwpWp.js → ReleasesSettingsPage-DegTeuSf.js} +2 -2
- package/dist/_chunks/{ReleasesSettingsPage-kuXIwpWp.js.map → ReleasesSettingsPage-DegTeuSf.js.map} +1 -1
- package/dist/_chunks/{en-CmYoEnA7.js → en-BWPPsSH-.js} +11 -2
- package/dist/_chunks/en-BWPPsSH-.js.map +1 -0
- package/dist/_chunks/{en-D0yVZFqf.mjs → en-D9Q4YW03.mjs} +11 -2
- package/dist/_chunks/en-D9Q4YW03.mjs.map +1 -0
- package/dist/_chunks/{index-5Odi61vw.js → index-B7aCK4-q.js} +7 -4
- package/dist/_chunks/{index-5Odi61vw.js.map → index-B7aCK4-q.js.map} +1 -1
- package/dist/_chunks/{index-Cy7qwpaU.mjs → index-ok-2phdF.mjs} +7 -4
- package/dist/_chunks/{index-Cy7qwpaU.mjs.map → index-ok-2phdF.mjs.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/EntryValidationPopover.d.ts +12 -0
- package/dist/server/index.js +14 -9
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +14 -9
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/index.d.ts +1 -6
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/migrations/database/5.0.0-document-id-in-actions.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +1 -6
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/release-action.d.ts +2 -7
- package/dist/server/src/services/release-action.d.ts.map +1 -1
- package/dist/shared/contracts/release-actions.d.ts +7 -1
- package/dist/shared/contracts/release-actions.d.ts.map +1 -1
- package/package.json +12 -11
- package/dist/_chunks/App-BKB1esYS.js.map +0 -1
- package/dist/_chunks/App-Cne--1Z8.mjs.map +0 -1
- package/dist/_chunks/en-CmYoEnA7.js.map +0 -1
- package/dist/_chunks/en-D0yVZFqf.mjs.map +0 -1
package/dist/server/index.mjs
CHANGED
|
@@ -306,10 +306,6 @@ async function enableContentTypeLocalized({ oldContentTypes, contentTypes: conte
|
|
|
306
306
|
const addEntryDocumentToReleaseActions = {
|
|
307
307
|
name: "content-releases::5.0.0-add-entry-document-id-to-release-actions",
|
|
308
308
|
async up(trx, db) {
|
|
309
|
-
const hasTable = await trx.schema.hasTable("strapi_release_actions");
|
|
310
|
-
if (!hasTable) {
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
309
|
const hasPolymorphicColumn = await trx.schema.hasColumn("strapi_release_actions", "target_id");
|
|
314
310
|
if (hasPolymorphicColumn) {
|
|
315
311
|
const hasEntryDocumentIdColumn = await trx.schema.hasColumn(
|
|
@@ -1019,16 +1015,25 @@ const createReleaseActionService = ({ strapi: strapi2 }) => {
|
|
|
1019
1015
|
const groupName = getGroupName(groupBy);
|
|
1020
1016
|
return _.groupBy(groupName)(formattedData);
|
|
1021
1017
|
},
|
|
1022
|
-
getContentTypeModelsFromActions(actions) {
|
|
1018
|
+
async getContentTypeModelsFromActions(actions) {
|
|
1023
1019
|
const contentTypeUids = actions.reduce((acc, action) => {
|
|
1024
1020
|
if (!acc.includes(action.contentType)) {
|
|
1025
1021
|
acc.push(action.contentType);
|
|
1026
1022
|
}
|
|
1027
1023
|
return acc;
|
|
1028
1024
|
}, []);
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1031
|
-
|
|
1025
|
+
const workflowsService = strapi2.plugin("review-workflows").service("workflows");
|
|
1026
|
+
const contentTypeModelsMap = await async.reduce(contentTypeUids)(
|
|
1027
|
+
async (accPromise, contentTypeUid) => {
|
|
1028
|
+
const acc = await accPromise;
|
|
1029
|
+
const contentTypeModel = strapi2.getModel(contentTypeUid);
|
|
1030
|
+
const workflow = await workflowsService.getAssignedWorkflow(contentTypeUid, {
|
|
1031
|
+
populate: "stageRequiredToPublish"
|
|
1032
|
+
});
|
|
1033
|
+
acc[contentTypeUid] = {
|
|
1034
|
+
...contentTypeModel,
|
|
1035
|
+
stageRequiredToPublish: workflow?.stageRequiredToPublish
|
|
1036
|
+
};
|
|
1032
1037
|
return acc;
|
|
1033
1038
|
},
|
|
1034
1039
|
{}
|
|
@@ -1621,7 +1626,7 @@ const releaseActionController = {
|
|
|
1621
1626
|
entry: action.entry ? await contentTypeOutputSanitizers[action.contentType](action.entry) : {}
|
|
1622
1627
|
}));
|
|
1623
1628
|
const groupedData = await releaseActionService.groupActions(sanitizedResults, query.sort);
|
|
1624
|
-
const contentTypes2 = releaseActionService.getContentTypeModelsFromActions(results);
|
|
1629
|
+
const contentTypes2 = await releaseActionService.getContentTypeModelsFromActions(results);
|
|
1625
1630
|
const releaseService = getService("release", { strapi });
|
|
1626
1631
|
const components = await releaseService.getAllComponents();
|
|
1627
1632
|
ctx.body = {
|