@webiny/api-headless-cms 5.17.4 → 5.18.0-beta.3
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/content/contextSetup.js +1 -2
- package/content/graphQLHandlerFactory.d.ts +1 -2
- package/content/graphQLHandlerFactory.js +12 -4
- package/content/plugins/CmsGroupPlugin.d.ts +11 -0
- package/content/plugins/{ContentModelGroupPlugin.js → CmsGroupPlugin.js} +4 -5
- package/content/plugins/CmsModelPlugin.d.ts +11 -0
- package/content/plugins/{ContentModelPlugin.js → CmsModelPlugin.js} +4 -5
- package/content/plugins/buildSchemaPlugins.js +1 -2
- package/content/plugins/crud/contentEntry/beforeCreate.d.ts +7 -0
- package/content/plugins/crud/contentEntry/beforeCreate.js +28 -0
- package/content/plugins/crud/contentEntry/beforeUpdate.d.ts +7 -0
- package/content/plugins/crud/contentEntry/beforeUpdate.js +28 -0
- package/content/plugins/crud/contentEntry/entryDataValidation.d.ts +2 -2
- package/content/plugins/crud/contentEntry/entryDataValidation.js +1 -2
- package/content/plugins/crud/contentEntry/markLockedFields.d.ts +3 -3
- package/content/plugins/crud/contentEntry/markLockedFields.js +10 -7
- package/content/plugins/crud/contentEntry.crud.d.ts +12 -4
- package/content/plugins/crud/contentEntry.crud.js +807 -757
- package/content/plugins/crud/contentModel/afterCreate.d.ts +7 -0
- package/content/plugins/crud/contentModel/afterCreate.js +18 -0
- package/content/plugins/crud/contentModel/afterDelete.d.ts +7 -0
- package/content/plugins/crud/contentModel/afterDelete.js +18 -0
- package/content/plugins/crud/contentModel/afterUpdate.d.ts +7 -0
- package/content/plugins/crud/contentModel/afterUpdate.js +18 -0
- package/content/plugins/crud/contentModel/beforeCreate.d.ts +9 -0
- package/content/plugins/crud/contentModel/beforeCreate.js +146 -0
- package/content/plugins/crud/contentModel/beforeDelete.d.ts +9 -0
- package/content/plugins/crud/contentModel/beforeDelete.js +56 -0
- package/content/plugins/crud/contentModel/beforeUpdate.d.ts +9 -0
- package/content/plugins/crud/contentModel/beforeUpdate.js +128 -0
- package/content/plugins/crud/contentModel/contentModelManagerFactory.d.ts +2 -2
- package/content/plugins/crud/contentModel/contentModelManagerFactory.js +2 -3
- package/content/plugins/crud/contentModel/createFieldModels.d.ts +2 -2
- package/content/plugins/crud/contentModel/createFieldModels.js +2 -3
- package/content/plugins/crud/contentModel/idValidation.js +1 -2
- package/content/plugins/crud/contentModel/models.js +1 -2
- package/content/plugins/crud/contentModel/validateLayout.d.ts +2 -2
- package/content/plugins/crud/contentModel/validateLayout.js +1 -2
- package/content/plugins/crud/contentModel.crud.d.ts +12 -4
- package/content/plugins/crud/contentModel.crud.js +351 -279
- package/content/plugins/crud/contentModelGroup/beforeCreate.d.ts +9 -0
- package/content/plugins/crud/contentModelGroup/beforeCreate.js +66 -0
- package/content/plugins/crud/contentModelGroup/beforeDelete.d.ts +9 -0
- package/content/plugins/crud/contentModelGroup/beforeDelete.js +48 -0
- package/content/plugins/crud/contentModelGroup/beforeUpdate.d.ts +8 -0
- package/content/plugins/crud/contentModelGroup/beforeUpdate.js +28 -0
- package/content/plugins/crud/contentModelGroup.crud.d.ts +12 -4
- package/content/plugins/crud/contentModelGroup.crud.js +259 -219
- package/content/plugins/crud/index.d.ts +6 -0
- package/content/plugins/crud/index.js +96 -0
- package/content/plugins/graphqlFields/boolean.js +1 -2
- package/content/plugins/graphqlFields/datetime.js +1 -2
- package/content/plugins/graphqlFields/file.js +1 -2
- package/content/plugins/graphqlFields/index.js +1 -2
- package/content/plugins/graphqlFields/longText.js +1 -2
- package/content/plugins/graphqlFields/number.js +1 -2
- package/content/plugins/graphqlFields/object.js +1 -2
- package/content/plugins/graphqlFields/ref.js +22 -11
- package/content/plugins/graphqlFields/richText.js +1 -2
- package/content/plugins/graphqlFields/text.js +1 -2
- package/content/plugins/internalSecurity/InternalAuthenticationPlugin.js +2 -3
- package/content/plugins/internalSecurity/InternalAuthorizationPlugin.js +1 -2
- package/content/plugins/modelManager/DefaultCmsModelManager.d.ts +15 -0
- package/content/plugins/modelManager/DefaultCmsModelManager.js +62 -0
- package/content/plugins/modelManager/index.d.ts +2 -2
- package/content/plugins/modelManager/index.js +3 -4
- package/content/plugins/schema/baseSchema.js +1 -2
- package/content/plugins/schema/contentEntries.js +9 -10
- package/content/plugins/schema/contentModelGroups.js +13 -14
- package/content/plugins/schema/contentModels.js +9 -10
- package/content/plugins/schema/createFieldResolvers.d.ts +2 -2
- package/content/plugins/schema/createFieldResolvers.js +14 -20
- package/content/plugins/schema/createManageResolvers.d.ts +3 -3
- package/content/plugins/schema/createManageResolvers.js +6 -10
- package/content/plugins/schema/createManageSDL.d.ts +2 -2
- package/content/plugins/schema/createManageSDL.js +5 -6
- package/content/plugins/schema/createPreviewResolvers.d.ts +3 -3
- package/content/plugins/schema/createPreviewResolvers.js +5 -6
- package/content/plugins/schema/createReadResolvers.d.ts +3 -3
- package/content/plugins/schema/createReadResolvers.js +5 -6
- package/content/plugins/schema/createReadSDL.d.ts +2 -2
- package/content/plugins/schema/createReadSDL.js +3 -4
- package/content/plugins/schema/resolvers/commonFieldResolvers.d.ts +4 -4
- package/content/plugins/schema/resolvers/commonFieldResolvers.js +1 -2
- package/content/plugins/schema/resolvers/manage/resolveCreate.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveCreate.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveCreateFrom.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveCreateFrom.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveDelete.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveDelete.js +4 -5
- package/content/plugins/schema/resolvers/manage/resolveGet.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveGet.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveGetByIds.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveGetByIds.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveGetRevisions.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveGetRevisions.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveList.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveList.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolvePublish.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolvePublish.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveRequestChanges.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveRequestChanges.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveRequestReview.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveRequestReview.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveUnpublish.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveUnpublish.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveUpdate.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveUpdate.js +3 -4
- package/content/plugins/schema/resolvers/preview/resolveGet.d.ts +1 -1
- package/content/plugins/schema/resolvers/preview/resolveGet.js +3 -4
- package/content/plugins/schema/resolvers/preview/resolveList.d.ts +1 -1
- package/content/plugins/schema/resolvers/preview/resolveList.js +3 -4
- package/content/plugins/schema/resolvers/read/resolveGet.d.ts +1 -1
- package/content/plugins/schema/resolvers/read/resolveGet.js +3 -4
- package/content/plugins/schema/resolvers/read/resolveList.d.ts +1 -1
- package/content/plugins/schema/resolvers/read/resolveList.js +3 -4
- package/content/plugins/schema/schemaPlugins.js +4 -3
- package/content/plugins/storage/StorageTransformPlugin.d.ts +30 -0
- package/content/plugins/storage/StorageTransformPlugin.js +36 -0
- package/content/plugins/storage/default.d.ts +2 -2
- package/content/plugins/storage/default.js +12 -12
- package/content/plugins/storage/object.d.ts +2 -2
- package/content/plugins/storage/object.js +28 -29
- package/content/plugins/utils/createTypeName.js +1 -2
- package/content/plugins/utils/entryStorage.d.ts +5 -5
- package/content/plugins/utils/entryStorage.js +21 -14
- package/content/plugins/utils/getEntryTitle.d.ts +2 -2
- package/content/plugins/utils/getEntryTitle.js +1 -2
- package/content/plugins/utils/getSchemaFromFieldPlugins.d.ts +2 -2
- package/content/plugins/utils/getSchemaFromFieldPlugins.js +1 -2
- package/content/plugins/utils/pluralizedTypeName.js +1 -2
- package/content/plugins/utils/renderFields.d.ts +2 -2
- package/content/plugins/utils/renderFields.js +1 -2
- package/content/plugins/utils/renderGetFilterFields.d.ts +2 -2
- package/content/plugins/utils/renderGetFilterFields.js +1 -2
- package/content/plugins/utils/renderInputFields.d.ts +2 -2
- package/content/plugins/utils/renderInputFields.js +1 -2
- package/content/plugins/utils/renderListFilterFields.d.ts +2 -2
- package/content/plugins/utils/renderListFilterFields.js +1 -2
- package/content/plugins/utils/renderSortEnum.d.ts +2 -2
- package/content/plugins/utils/renderSortEnum.js +1 -2
- package/content/plugins/validators/dateGte.js +1 -2
- package/content/plugins/validators/dateLte.js +1 -2
- package/content/plugins/validators/gte.js +1 -2
- package/content/plugins/validators/in.js +1 -2
- package/content/plugins/validators/index.js +1 -2
- package/content/plugins/validators/lte.js +1 -2
- package/content/plugins/validators/maxLength.js +1 -2
- package/content/plugins/validators/minLength.js +1 -2
- package/content/plugins/validators/pattern.js +1 -2
- package/content/plugins/validators/patternPlugins/email.js +1 -2
- package/content/plugins/validators/patternPlugins/index.js +1 -2
- package/content/plugins/validators/patternPlugins/lowerCase.js +1 -2
- package/content/plugins/validators/patternPlugins/upperCase.js +1 -2
- package/content/plugins/validators/patternPlugins/url.js +1 -2
- package/content/plugins/validators/required.js +1 -2
- package/content/plugins/validators/timeGte.js +1 -2
- package/content/plugins/validators/timeLte.js +1 -2
- package/index.d.ts +12 -0
- package/index.js +66 -0
- package/migrateCMSPermissions.d.ts +2 -2
- package/migrateCMSPermissions.js +1 -2
- package/package.json +23 -21
- package/plugins/context.js +1 -2
- package/plugins/crud/index.d.ts +6 -2
- package/plugins/crud/index.js +69 -6
- package/plugins/crud/settings.crud.d.ts +10 -4
- package/plugins/crud/settings.crud.js +64 -77
- package/plugins/crud/system.crud.d.ts +10 -4
- package/plugins/crud/system.crud.js +139 -126
- package/plugins/graphql/system.js +5 -6
- package/plugins/graphql.d.ts +1 -2
- package/plugins/graphql.js +49 -50
- package/plugins/upgrades/index.js +1 -2
- package/plugins/upgrades/v5.5.0/helpers.js +1 -2
- package/plugins/upgrades/v5.5.0/index.js +3 -4
- package/transformers.js +1 -2
- package/types.d.ts +742 -1232
- package/types.js +104 -254
- package/utils.d.ts +4 -11
- package/utils.js +2 -49
- package/content/contextSetup.js.map +0 -1
- package/content/graphQLHandlerFactory.js.map +0 -1
- package/content/index.d.ts +0 -5
- package/content/index.js +0 -37
- package/content/index.js.map +0 -1
- package/content/plugins/ContentModelGroupPlugin.d.ts +0 -7
- package/content/plugins/ContentModelGroupPlugin.js.map +0 -1
- package/content/plugins/ContentModelPlugin.d.ts +0 -7
- package/content/plugins/ContentModelPlugin.js.map +0 -1
- package/content/plugins/buildSchemaPlugins.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterCreate.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterCreate.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterCreateRevisionFrom.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterCreateRevisionFrom.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterCreateRevisionFrom.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterDelete.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterDelete.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterDeleteRevision.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterDeleteRevision.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterDeleteRevision.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterPublish.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterPublish.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterPublish.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterRequestChanges.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterRequestChanges.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterRequestChanges.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterRequestReview.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterRequestReview.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterRequestReview.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterUnpublish.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterUnpublish.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterUnpublish.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterUpdate.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterUpdate.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeCreate.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeCreate.hook.js +0 -18
- package/content/plugins/crud/contentEntry/beforeCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeCreateRevisionFrom.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeCreateRevisionFrom.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeCreateRevisionFrom.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeDelete.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeDelete.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeDeleteRevision.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeDeleteRevision.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeDeleteRevision.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforePublish.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforePublish.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforePublish.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeRequestChanges.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeRequestChanges.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeRequestChanges.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeRequestReview.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeRequestReview.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeRequestReview.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeUnpublish.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeUnpublish.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeUnpublish.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeUpdate.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeUpdate.hook.js +0 -18
- package/content/plugins/crud/contentEntry/beforeUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/entryDataValidation.js.map +0 -1
- package/content/plugins/crud/contentEntry/hooks.d.ts +0 -18
- package/content/plugins/crud/contentEntry/hooks.js +0 -240
- package/content/plugins/crud/contentEntry/hooks.js.map +0 -1
- package/content/plugins/crud/contentEntry/markLockedFields.js.map +0 -1
- package/content/plugins/crud/contentEntry/runContentEntryLifecycleHooks.d.ts +0 -4
- package/content/plugins/crud/contentEntry/runContentEntryLifecycleHooks.js +0 -24
- package/content/plugins/crud/contentEntry/runContentEntryLifecycleHooks.js.map +0 -1
- package/content/plugins/crud/contentEntry.crud.js.map +0 -1
- package/content/plugins/crud/contentModel/afterCreate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterCreate.hook.js +0 -24
- package/content/plugins/crud/contentModel/afterCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/afterDelete.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterDelete.hook.js +0 -24
- package/content/plugins/crud/contentModel/afterDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/afterUpdate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterUpdate.hook.js +0 -24
- package/content/plugins/crud/contentModel/afterUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/beforeCreate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/beforeCreate.hook.js +0 -137
- package/content/plugins/crud/contentModel/beforeCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/beforeDelete.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/beforeDelete.hook.js +0 -58
- package/content/plugins/crud/contentModel/beforeDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/beforeUpdate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/beforeUpdate.hook.js +0 -141
- package/content/plugins/crud/contentModel/beforeUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/contentModelManagerFactory.js.map +0 -1
- package/content/plugins/crud/contentModel/createFieldModels.js.map +0 -1
- package/content/plugins/crud/contentModel/hooks.d.ts +0 -6
- package/content/plugins/crud/contentModel/hooks.js +0 -84
- package/content/plugins/crud/contentModel/hooks.js.map +0 -1
- package/content/plugins/crud/contentModel/idValidation.js.map +0 -1
- package/content/plugins/crud/contentModel/models.js.map +0 -1
- package/content/plugins/crud/contentModel/runContentModelLifecycleHooks.d.ts +0 -2
- package/content/plugins/crud/contentModel/runContentModelLifecycleHooks.js +0 -24
- package/content/plugins/crud/contentModel/runContentModelLifecycleHooks.js.map +0 -1
- package/content/plugins/crud/contentModel/validateLayout.js.map +0 -1
- package/content/plugins/crud/contentModel.crud.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/afterCreate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/afterCreate.hook.js +0 -24
- package/content/plugins/crud/contentModelGroup/afterCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/afterDelete.hook.d.ts +0 -8
- package/content/plugins/crud/contentModelGroup/afterDelete.hook.js +0 -22
- package/content/plugins/crud/contentModelGroup/afterDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/afterUpdate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/afterUpdate.hook.js +0 -26
- package/content/plugins/crud/contentModelGroup/afterUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/beforeCreate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/beforeCreate.hook.js +0 -87
- package/content/plugins/crud/contentModelGroup/beforeCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/beforeDelete.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/beforeDelete.hook.js +0 -46
- package/content/plugins/crud/contentModelGroup/beforeDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/beforeUpdate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/beforeUpdate.hook.js +0 -35
- package/content/plugins/crud/contentModelGroup/beforeUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup.crud.js.map +0 -1
- package/content/plugins/graphqlFields/boolean.js.map +0 -1
- package/content/plugins/graphqlFields/datetime.js.map +0 -1
- package/content/plugins/graphqlFields/file.js.map +0 -1
- package/content/plugins/graphqlFields/index.js.map +0 -1
- package/content/plugins/graphqlFields/longText.js.map +0 -1
- package/content/plugins/graphqlFields/number.js.map +0 -1
- package/content/plugins/graphqlFields/object.js.map +0 -1
- package/content/plugins/graphqlFields/ref.js.map +0 -1
- package/content/plugins/graphqlFields/richText.js.map +0 -1
- package/content/plugins/graphqlFields/text.js.map +0 -1
- package/content/plugins/internalSecurity/InternalAuthenticationPlugin.js.map +0 -1
- package/content/plugins/internalSecurity/InternalAuthorizationPlugin.js.map +0 -1
- package/content/plugins/modelManager/DefaultContentModelManager.d.ts +0 -15
- package/content/plugins/modelManager/DefaultContentModelManager.js +0 -63
- package/content/plugins/modelManager/DefaultContentModelManager.js.map +0 -1
- package/content/plugins/modelManager/index.js.map +0 -1
- package/content/plugins/schema/baseSchema.js.map +0 -1
- package/content/plugins/schema/contentEntries.js.map +0 -1
- package/content/plugins/schema/contentModelGroups.js.map +0 -1
- package/content/plugins/schema/contentModels.js.map +0 -1
- package/content/plugins/schema/createFieldResolvers.js.map +0 -1
- package/content/plugins/schema/createManageResolvers.js.map +0 -1
- package/content/plugins/schema/createManageSDL.js.map +0 -1
- package/content/plugins/schema/createPreviewResolvers.js.map +0 -1
- package/content/plugins/schema/createReadResolvers.js.map +0 -1
- package/content/plugins/schema/createReadSDL.js.map +0 -1
- package/content/plugins/schema/resolvers/commonFieldResolvers.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveCreate.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveCreateFrom.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveDelete.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveGet.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveGetByIds.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveGetRevisions.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveList.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolvePublish.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveRequestChanges.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveRequestReview.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveUnpublish.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveUpdate.js.map +0 -1
- package/content/plugins/schema/resolvers/preview/resolveGet.js.map +0 -1
- package/content/plugins/schema/resolvers/preview/resolveList.js.map +0 -1
- package/content/plugins/schema/resolvers/read/resolveGet.js.map +0 -1
- package/content/plugins/schema/resolvers/read/resolveList.js.map +0 -1
- package/content/plugins/schema/schemaPlugins.js.map +0 -1
- package/content/plugins/storage/default.js.map +0 -1
- package/content/plugins/storage/object.js.map +0 -1
- package/content/plugins/utils/createTypeName.js.map +0 -1
- package/content/plugins/utils/entryStorage.js.map +0 -1
- package/content/plugins/utils/getEntryTitle.js.map +0 -1
- package/content/plugins/utils/getSchemaFromFieldPlugins.js.map +0 -1
- package/content/plugins/utils/pluralizedTypeName.js.map +0 -1
- package/content/plugins/utils/renderFields.js.map +0 -1
- package/content/plugins/utils/renderGetFilterFields.js.map +0 -1
- package/content/plugins/utils/renderInputFields.js.map +0 -1
- package/content/plugins/utils/renderListFilterFields.js.map +0 -1
- package/content/plugins/utils/renderSortEnum.js.map +0 -1
- package/content/plugins/validators/dateGte.js.map +0 -1
- package/content/plugins/validators/dateLte.js.map +0 -1
- package/content/plugins/validators/gte.js.map +0 -1
- package/content/plugins/validators/in.js.map +0 -1
- package/content/plugins/validators/index.js.map +0 -1
- package/content/plugins/validators/lte.js.map +0 -1
- package/content/plugins/validators/maxLength.js.map +0 -1
- package/content/plugins/validators/minLength.js.map +0 -1
- package/content/plugins/validators/pattern.js.map +0 -1
- package/content/plugins/validators/patternPlugins/email.js.map +0 -1
- package/content/plugins/validators/patternPlugins/index.js.map +0 -1
- package/content/plugins/validators/patternPlugins/lowerCase.js.map +0 -1
- package/content/plugins/validators/patternPlugins/upperCase.js.map +0 -1
- package/content/plugins/validators/patternPlugins/url.js.map +0 -1
- package/content/plugins/validators/required.js.map +0 -1
- package/content/plugins/validators/timeGte.js.map +0 -1
- package/content/plugins/validators/timeLte.js.map +0 -1
- package/migrateCMSPermissions.js.map +0 -1
- package/plugins/InstallationPlugin.d.ts +0 -19
- package/plugins/InstallationPlugin.js +0 -39
- package/plugins/InstallationPlugin.js.map +0 -1
- package/plugins/context.js.map +0 -1
- package/plugins/crud/index.js.map +0 -1
- package/plugins/crud/settings.crud.js.map +0 -1
- package/plugins/crud/system.crud.js.map +0 -1
- package/plugins/graphql/system.js.map +0 -1
- package/plugins/graphql.js.map +0 -1
- package/plugins/index.d.ts +0 -2
- package/plugins/index.js +0 -25
- package/plugins/index.js.map +0 -1
- package/plugins/upgrades/index.js.map +0 -1
- package/plugins/upgrades/v5.5.0/helpers.js.map +0 -1
- package/plugins/upgrades/v5.5.0/index.js.map +0 -1
- package/transformers.js.map +0 -1
- package/types.js.map +0 -1
- package/utils.js.map +0 -1
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.createSystemCrud = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -15,13 +15,9 @@ var _apiSecurity = require("@webiny/api-security");
|
|
|
15
15
|
|
|
16
16
|
var _apiUpgrade = require("@webiny/api-upgrade");
|
|
17
17
|
|
|
18
|
-
var _ContextPlugin = require("@webiny/handler/plugins/ContextPlugin");
|
|
19
|
-
|
|
20
18
|
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
21
19
|
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
var _utils = require("../../utils");
|
|
20
|
+
var _pubsub = require("@webiny/pubsub");
|
|
25
21
|
|
|
26
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
27
23
|
|
|
@@ -34,136 +30,153 @@ const initialContentModelGroup = {
|
|
|
34
30
|
icon: "fas/star"
|
|
35
31
|
};
|
|
36
32
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
const providerPlugins = context.plugins.byType(pluginType);
|
|
47
|
-
const providerPlugin = providerPlugins[providerPlugins.length - 1];
|
|
48
|
-
|
|
49
|
-
if (!providerPlugin) {
|
|
50
|
-
throw new _error.default(`Missing "${pluginType}" plugin.`, "PLUGIN_NOT_FOUND", {
|
|
51
|
-
type: pluginType
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const storageOperations = await providerPlugin.provide({
|
|
56
|
-
context
|
|
57
|
-
});
|
|
33
|
+
const createSystemCrud = params => {
|
|
34
|
+
const {
|
|
35
|
+
getTenant,
|
|
36
|
+
storageOperations,
|
|
37
|
+
context,
|
|
38
|
+
getIdentity
|
|
39
|
+
} = params;
|
|
40
|
+
const onBeforeInstall = (0, _pubsub.createTopic)();
|
|
41
|
+
const onAfterInstall = (0, _pubsub.createTopic)();
|
|
58
42
|
|
|
59
43
|
const createReadAPIKey = () => {
|
|
60
44
|
return _crypto.default.randomBytes(Math.ceil(48 / 2)).toString("hex");
|
|
61
45
|
};
|
|
62
46
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
47
|
+
const getVersion = async () => {
|
|
48
|
+
if (!getTenant()) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const system = await storageOperations.system.get({
|
|
53
|
+
tenant: getTenant().id
|
|
54
|
+
});
|
|
55
|
+
return system ? system.version : null;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const setVersion = async version => {
|
|
59
|
+
const original = await storageOperations.system.get({
|
|
60
|
+
tenant: getTenant().id
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const system = _objectSpread(_objectSpread({}, original || {}), {}, {
|
|
64
|
+
version,
|
|
65
|
+
tenant: getTenant().id
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
if (!original) {
|
|
69
|
+
await storageOperations.system.create({
|
|
70
|
+
system
|
|
71
|
+
});
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
await storageOperations.system.update({
|
|
76
|
+
original,
|
|
77
|
+
system
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
onBeforeSystemInstall: onBeforeInstall,
|
|
83
|
+
onAfterSystemInstall: onAfterInstall,
|
|
84
|
+
getSystemVersion: getVersion,
|
|
85
|
+
setSystemVersion: setVersion,
|
|
86
|
+
getReadAPIKey: async () => {
|
|
87
|
+
const original = await storageOperations.system.get({
|
|
88
|
+
tenant: getTenant().id
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
if (!original) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (!original.readAPIKey) {
|
|
96
|
+
const readAPIKey = createReadAPIKey();
|
|
97
|
+
|
|
98
|
+
const system = _objectSpread(_objectSpread({}, original), {}, {
|
|
99
|
+
readAPIKey
|
|
86
100
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (!system) {
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (!system.readAPIKey) {
|
|
97
|
-
const apiKey = createReadAPIKey();
|
|
98
|
-
await context.cms.system.setReadAPIKey(apiKey);
|
|
99
|
-
return apiKey;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return system.readAPIKey;
|
|
103
|
-
},
|
|
104
|
-
setReadAPIKey: async apiKey => {
|
|
105
|
-
await storageOperations.update({
|
|
106
|
-
readAPIKey: apiKey
|
|
101
|
+
|
|
102
|
+
await storageOperations.system.update({
|
|
103
|
+
original,
|
|
104
|
+
system
|
|
107
105
|
});
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
await context.cms.system.setVersion(context.WEBINY_VERSION); // Set internal API key to access Read API
|
|
140
|
-
|
|
141
|
-
await context.cms.system.setReadAPIKey(createReadAPIKey());
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
async upgrade(version) {
|
|
145
|
-
const identity = context.security.getIdentity();
|
|
146
|
-
|
|
147
|
-
if (!identity) {
|
|
148
|
-
throw new _apiSecurity.NotAuthorizedError();
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const upgradePlugins = context.plugins.byType("api-upgrade").filter(pl => pl.app === "headless-cms");
|
|
152
|
-
const plugin = (0, _apiUpgrade.getApplicablePlugin)({
|
|
153
|
-
deployedVersion: context.WEBINY_VERSION,
|
|
154
|
-
installedAppVersion: await this.getVersion(),
|
|
155
|
-
upgradePlugins,
|
|
156
|
-
upgradeToVersion: version
|
|
106
|
+
return readAPIKey;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return original.readAPIKey;
|
|
110
|
+
},
|
|
111
|
+
installSystem: async () => {
|
|
112
|
+
const identity = getIdentity();
|
|
113
|
+
|
|
114
|
+
if (!identity) {
|
|
115
|
+
throw new _apiSecurity.NotAuthorizedError();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const version = await getVersion();
|
|
119
|
+
|
|
120
|
+
if (version) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
await onBeforeInstall.publish({
|
|
125
|
+
tenant: getTenant().id
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* Add default content model group.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
try {
|
|
132
|
+
await context.cms.createGroup(initialContentModelGroup);
|
|
133
|
+
} catch (ex) {
|
|
134
|
+
throw new _error.default(ex.message, "CMS_INSTALLATION_CONTENT_MODEL_GROUP_ERROR", {
|
|
135
|
+
group: initialContentModelGroup
|
|
157
136
|
});
|
|
158
|
-
|
|
137
|
+
}
|
|
159
138
|
|
|
160
|
-
|
|
161
|
-
|
|
139
|
+
await onAfterInstall.publish({
|
|
140
|
+
tenant: getTenant().id
|
|
141
|
+
});
|
|
142
|
+
const system = {
|
|
143
|
+
version: context.WEBINY_VERSION,
|
|
144
|
+
readAPIKey: createReadAPIKey(),
|
|
145
|
+
tenant: getTenant().id
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* We need to create the system data.
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
await storageOperations.system.create({
|
|
152
|
+
system
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
async upgradeSystem(version) {
|
|
157
|
+
const identity = getIdentity();
|
|
158
|
+
|
|
159
|
+
if (!identity) {
|
|
160
|
+
throw new _apiSecurity.NotAuthorizedError();
|
|
162
161
|
}
|
|
163
162
|
|
|
163
|
+
const upgradePlugins = context.plugins.byType("api-upgrade").filter(pl => pl.app === "headless-cms");
|
|
164
|
+
const plugin = (0, _apiUpgrade.getApplicablePlugin)({
|
|
165
|
+
deployedVersion: context.WEBINY_VERSION,
|
|
166
|
+
installedAppVersion: await this.getVersion(),
|
|
167
|
+
upgradePlugins,
|
|
168
|
+
upgradeToVersion: version
|
|
169
|
+
});
|
|
170
|
+
await plugin.apply(context);
|
|
171
|
+
/**
|
|
172
|
+
* Store new app version.
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
await setVersion(version);
|
|
176
|
+
return true;
|
|
164
177
|
}
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
178
|
|
|
168
|
-
|
|
169
|
-
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
exports.createSystemCrud = createSystemCrud;
|
|
@@ -28,7 +28,7 @@ var _default = {
|
|
|
28
28
|
CmsQuery: {
|
|
29
29
|
version: async (_, __, context) => {
|
|
30
30
|
try {
|
|
31
|
-
return context.cms.
|
|
31
|
+
return context.cms.getSystemVersion();
|
|
32
32
|
} catch (e) {
|
|
33
33
|
return new _handlerGraphql.ErrorResponse(e);
|
|
34
34
|
}
|
|
@@ -39,7 +39,7 @@ var _default = {
|
|
|
39
39
|
cms
|
|
40
40
|
}) => {
|
|
41
41
|
try {
|
|
42
|
-
const version = await cms.
|
|
42
|
+
const version = await cms.getSystemVersion();
|
|
43
43
|
|
|
44
44
|
if (version) {
|
|
45
45
|
return new _handlerGraphql.ErrorResponse({
|
|
@@ -48,7 +48,7 @@ var _default = {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
await cms.
|
|
51
|
+
await cms.installSystem();
|
|
52
52
|
return new _handlerGraphql.Response(true);
|
|
53
53
|
} catch (e) {
|
|
54
54
|
return new _handlerGraphql.ErrorResponse(e);
|
|
@@ -60,7 +60,7 @@ var _default = {
|
|
|
60
60
|
cms
|
|
61
61
|
}) => {
|
|
62
62
|
try {
|
|
63
|
-
await cms.
|
|
63
|
+
await cms.upgradeSystem(version);
|
|
64
64
|
return new _handlerGraphql.Response(true);
|
|
65
65
|
} catch (e) {
|
|
66
66
|
return new _handlerGraphql.ErrorResponse(e);
|
|
@@ -69,5 +69,4 @@ var _default = {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
exports.default = _default;
|
|
73
|
-
//# sourceMappingURL=system.js.map
|
|
72
|
+
exports.default = _default;
|
package/plugins/graphql.d.ts
CHANGED
package/plugins/graphql.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.createGraphQLPlugin = void 0;
|
|
9
9
|
|
|
10
10
|
var _merge = _interopRequireDefault(require("lodash/merge"));
|
|
11
11
|
|
|
@@ -13,58 +13,58 @@ var _system = _interopRequireDefault(require("./graphql/system"));
|
|
|
13
13
|
|
|
14
14
|
const emptyResolver = () => ({});
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const createGraphQLPlugin = () => ({
|
|
17
17
|
name: "graphql-schema-headless",
|
|
18
18
|
type: "graphql-schema",
|
|
19
19
|
schema: {
|
|
20
20
|
typeDefs:
|
|
21
21
|
/* GraphQL */
|
|
22
22
|
`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
23
|
+
type CmsError {
|
|
24
|
+
code: String
|
|
25
|
+
message: String
|
|
26
|
+
data: JSON
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type CmsCursors {
|
|
30
|
+
next: String
|
|
31
|
+
previous: String
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type CmsListMeta {
|
|
35
|
+
cursor: String
|
|
36
|
+
hasMoreItems: Boolean
|
|
37
|
+
totalCount: Int
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type CmsDeleteResponse {
|
|
41
|
+
data: Boolean
|
|
42
|
+
error: CmsError
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type CmsBooleanResponse {
|
|
46
|
+
data: Boolean
|
|
47
|
+
error: CmsError
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
extend type Query {
|
|
51
|
+
cms: CmsQuery
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
extend type Mutation {
|
|
55
|
+
cms: CmsMutation
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
type CmsQuery {
|
|
59
|
+
_empty: String
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type CmsMutation {
|
|
63
|
+
_empty: String
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
${_system.default.typeDefs}
|
|
67
|
+
`,
|
|
68
68
|
resolvers: (0, _merge.default)({
|
|
69
69
|
Query: {
|
|
70
70
|
cms: emptyResolver
|
|
@@ -74,7 +74,6 @@ var _default = () => [{
|
|
|
74
74
|
}
|
|
75
75
|
}, _system.default.resolvers)
|
|
76
76
|
}
|
|
77
|
-
}
|
|
77
|
+
});
|
|
78
78
|
|
|
79
|
-
exports.
|
|
80
|
-
//# sourceMappingURL=graphql.js.map
|
|
79
|
+
exports.createGraphQLPlugin = createGraphQLPlugin;
|
|
@@ -7,5 +7,4 @@ exports.isCmsContentPermission = void 0;
|
|
|
7
7
|
|
|
8
8
|
const isCmsContentPermission = permission => permission.name.includes("cms.") && !permission.name.includes("cms.endpoint.");
|
|
9
9
|
|
|
10
|
-
exports.isCmsContentPermission = isCmsContentPermission;
|
|
11
|
-
//# sourceMappingURL=helpers.js.map
|
|
10
|
+
exports.isCmsContentPermission = isCmsContentPermission;
|
|
@@ -54,7 +54,7 @@ const plugin = {
|
|
|
54
54
|
} // Migrate CMS permissions
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
const newCMSContentPermissions = await (0, _migrateCMSPermissions.migrateCMSPermissions)(CmsContentPermissions, cms.
|
|
57
|
+
const newCMSContentPermissions = await (0, _migrateCMSPermissions.migrateCMSPermissions)(CmsContentPermissions, cms.getModel);
|
|
58
58
|
const newPermissions = [...restPermissions, ...newCMSContentPermissions];
|
|
59
59
|
console.log(`Saving new permissions for group: ${securityGroup.slug}`);
|
|
60
60
|
console.log("newPermissions: ", JSON.stringify(newPermissions, null, 2)); // Save group
|
|
@@ -103,7 +103,7 @@ const plugin = {
|
|
|
103
103
|
} // Migrate CMS permissions.
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
const newCMSContentPermissions = await (0, _migrateCMSPermissions.migrateCMSPermissions)(CmsContentPermissions, cms.
|
|
106
|
+
const newCMSContentPermissions = await (0, _migrateCMSPermissions.migrateCMSPermissions)(CmsContentPermissions, cms.getModel);
|
|
107
107
|
const newPermissions = [...restPermissions, ...newCMSContentPermissions];
|
|
108
108
|
console.log(`Saving new permissions for API key: ${apiKey.name}`);
|
|
109
109
|
console.log("newPermissions: ", JSON.stringify(newPermissions, null, 2)); // Save API key
|
|
@@ -126,5 +126,4 @@ const plugin = {
|
|
|
126
126
|
|
|
127
127
|
};
|
|
128
128
|
var _default = plugin;
|
|
129
|
-
exports.default = _default;
|
|
130
|
-
//# sourceMappingURL=index.js.map
|
|
129
|
+
exports.default = _default;
|
package/transformers.js
CHANGED