Skip to content

definePlugin drops contentAccess, so the content-editor scaffold fails its own lint out of the box #385

Description

@Mariomarquezt

The content-editor scaffold emits a config containing

contentAccess: [{ table: 'pages', modes: ['read', 'write'] }]

(src/core/plugin-sdk/cli/init.ts:134-136), but DefinePluginConfig in src/core/plugin-sdk/builders/definePlugin.ts:43-115 has no contentAccess key, and the builder's manifest assembly at lines 169-191 never forwards it. The manifest schema then requires it, because the scaffold also grants a cms.content.* permission (src/core/plugins/manifest.ts:566-572).

Reproduce: scaffold a content-editor plugin and lint it without changing anything.

✗ [manifest] Invalid plugin manifest: `contentAccess` is required when any `cms.content.*` permission is granted. List the tables the plugin can touch.

So the generated project fails the tool's own lint before a line of user code is written. It is a confusing first five minutes, because the config visibly contains the key the error says is missing — the key is silently dropped between the config and the manifest.

Workaround I am using: lint and build a throwaway copy whose config re-injects contentAccess into the assembled manifest. Repo sources are never mutated. It works, but every plugin that touches content has to carry that scaffolding.

Fix: add contentAccess to DefinePluginConfig and forward it in the manifest assembly, so the scaffold passes instatic-plugin lint unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions