You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue with this plugin.
Individual plugins contentTypes cannot be transformed individually. The only thing that works is basically allowing them all by proving the "id" of the plugin in the plugins.ids object. However, it would be nice if we could allow individual contentTypes like you can with the contentTypeFilter "api::content-type-name.name"
I checked your code in the register.js and it seems to be because the way you are checking the UIDS from the strapi[apiType].
This config does seem to pass some checks
"some-plugin": {
enabled: true,
resolve: "./src/plugins/some-plugin",
},
transformer: {
enabled: true,
config: {
responseTransforms: {
removeAttributesKey: true,
removeDataKey: true,
},
contentTypeFilter: {
mode: "allow",
uids: {
"some-plugin": true, // This line bypasses the checks in isAvailableApi and isAvailableMethod. However it does not allow for allowing individual content types from a plugin..
"api::blog.blog": true,
},
},
plugins: {
mode: "allow",
ids: {
"some-plugin": true,
},
},
},
},
};
However, as you can see I have to remove the plugin:: prefix to make it pass those checks.
Also, admin api routes are not transformed on purpose, this shouldn't be the case since these should also be able to be transformed.
Uh oh!
There was an error while loading. Please reload this page.
Hi @ComfortablyCoding
There is an issue with this plugin.
Individual plugins contentTypes cannot be transformed individually. The only thing that works is basically allowing them all by proving the "id" of the plugin in the plugins.ids object. However, it would be nice if we could allow individual contentTypes like you can with the contentTypeFilter "api::content-type-name.name"
I checked your code in the register.js and it seems to be because the way you are checking the UIDS from the strapi[apiType].
This config does seem to pass some checks
However, as you can see I have to remove the plugin:: prefix to make it pass those checks.
Also, admin api routes are not transformed on purpose, this shouldn't be the case since these should also be able to be transformed.
Can you support this?
strapi-plugin-transformer/server/register.js
Line 70 in 3cb7855
The text was updated successfully, but these errors were encountered: