v15-rc2 - manifests missing things
# package-development
k
So moving something bigger into rc2 and i am getting little errors when moving the manifests from the old types to
UmbExtensionManifest
for example:
Copy code
ts
const sampleEntityAction: UmbExtensionManifest = {
    type: 'entityAction',
    kind: 'default',
    alias: 'my.sample.action',
    name: 'sample entity action',
    weight: 20,
    forEntityTypes: [UMB_DOCUMENT_ENTITY_TYPE],
    meta: {
        icon: 'icon-arrow-right',
        label: 'Sample action',    
    },
    conditions: [
        {
            alias: 'Umb.Condition.UserPermission.Document',
            allOf: [UMB_USER_PERMISSION_DOCUMENT_PUBLISH],
        },
    ]
}
i am getting an error with the
allOf
element - basically. > Object literal may only specify known properties, and 'allOf' does not exist in type 'UmbConditionConfigBase'.` https://cdn.discordapp.com/attachments/1298604470862610462/1298604473626660916/image.png?ex=671a2b29&is=6718d9a9&hm=bdc8cbe949b162aabd77861f11267c5e5e1eaf0d5b758c5a3d7ee302796bfbf3&
I have experiemented with some extra types in tsconfig.json, but to no avail with this one 😦 i have
Copy code
json
"types": [
  "@umbraco-cms/backoffice/extension-registry",
  "@umbraco-cms/backoffice/icon",
  "@umbraco-cms/backoffice/localization",
  "@umbraco-cms/backoffice/document"
]
-- also I seem to keep adding to the types list to make things work 😦 . just had to add
@umbraco-cms/backoffice/dashboard
to get a dashboard manifest recognise that it the
js: ()=> import...
property was valid. i am doing this right ?
-- also I now have the same issue on the dashboard 🤕 . but for the section alias ?
Copy code
ts
conditions: [
 {
  alias: 'Umb.Condition.SectionAlias',
  match: 'Umb.Section.Content',
 },
],
Object literal may only specify known properties, and 'match' does not exist
s
I hear from the Deploy team they had similar issues and had to specify
as any
on some of these things (and left a big
TODO
to get back to it later. So:
Copy code
json
conditions: [
        {
            alias: 'Umb.Condition.UserPermission.Document',
            allOf: [UMB_USER_PERMISSION_DOCUMENT_PUBLISH],
        } as any,
k
thanks, but i also mean booooo 😉 - Now my eslint moans at me (lets me build but moans).
I am not convinced this is an 'improvement' over what we had with manifest types - would be intrested to know what problem this actually is solving ? because it causes quite a few (you loose some of the itellisense for example).
Copy code
ts
conditions: [
{
     alias: 'Umb.Condition.UserPermission.Document',
     allOf: [UMB_USER_PERMISSION_DOCUMENT_PUBLISH],
} as UmbConditionConfigBase
does stop that, (and is arguably better than any, but does now have an import, which is what they wanted rid of?)
s
I think it's some feedback we should deal with for sure, "works for now" is good enough but it could definitely work better!
n
I had the same issues, but adding the types to tsconfig did resolve it. I agree though that's counter to the intent of reducing imports/configuration... Fairly certain this is being worked on for a fix
k
yeah i added some but it didn't work for the conditions or for custom
entityUserPermission
😦 - so i do still have an 'any' on that - problem now, is either they are missing or you have to know the line to put into the tsconfig types. previously. intellisense would pick up the import for you, and you didn't have to have them all in your head 😞
9 Views