Эта страница пока недоступна на выбранном языке (Русский), поэтому показана на английском.
module.json reference
Every manifest field: identity, permissions, sidebar entries, settings, jobs, hooks, filters, widgets, routes, schema, messages, tests and checksum.
Only id, name and version are required: { "id": "x", "name": "X", "version": "1.0.0" }. Everything else adds a capability.
| Field | Rules |
|---|---|
id, name, version | id equals the folder name and never changes; semver version, bump on every release |
minAppVersion | Install refused when the app is older; use the version you tested on |
permissions[] | { key, label, description?, area? }, key <group>.<action>; the group must be new; seeded and granted to the admin role |
nav[] | { href, label, icon?, group, parent?, perm? }; href starts with /admin/ and is covered by routes |
settings | { group, fields[] }; field types text, textarea, number, boolean, select (needs options); max 60 fields |
jobs[] | { id, everyMinutes, description? }; 1 … 44640 minutes |
hooks[], filters[] | Names from HOOK_NAMES / FILTER_NAMES; unknown names are refused |
widgets[] | Dashboard cards { id, title, description, group?, size?, perm?, visible? }; max 12 |
routes[] | /admin/<…> and /api/plugins/<id>[/…] roots; conflict-checked. Customer-portal and public pages are not supported yet |
schema, messages, tests | Additive Prisma fragment, folder with <locale>.json (en.json required), self-test file |
checksum | sha256 of the files (written by plugin:pack --checksum); a mismatch is refused on install |
{
"id": "site-visits",
"name": "Site visits",
"version": "1.0.0",
"description": "Plans a site visit when a quotation is sent and tracks visits on a list.",
"author": "Your company",
"minAppVersion": "2.6.0",
"permissions": [
{ "key": "sitevisits.view", "label": "View site visits", "area": "Sales" },
{ "key": "sitevisits.manage", "label": "Manage site visits", "description": "Plan, reschedule and complete visits.", "area": "Sales" }
],
"nav": [{ "href": "/admin/site-visits", "label": "Site visits", "icon": "calendar", "group": "Sales", "perm": "sitevisits.view" }],
"settings": {
"group": "Site visits",
"fields": [
{ "key": "autoPlan", "type": "boolean", "label": "Plan a visit when a quotation is sent", "default": true },
{ "key": "leadDays", "type": "number", "label": "Days after sending", "default": 2 },
{ "key": "slot", "type": "select", "label": "Default slot", "default": "morning", "options": ["morning", "afternoon"] }
]
},
"jobs": [{ "id": "today-digest", "everyMinutes": 1440, "description": "Logs the visits planned for today." }],
"hooks": ["quotation.sent"],
"widgets": [{ "id": "upcoming", "title": "Upcoming site visits", "description": "The next planned site visits with customer and day.", "group": "Operations", "size": "sm", "perm": ["sitevisits.view"] }],
"routes": ["/admin/site-visits", "/api/plugins/site-visits"],
"schema": "schema.prisma",
"tests": "check.ts"
}minAppVersion is compared with APP_VERSION in src/lib/modules/registry.ts (2.6.0 at the time of writing). Set it to the version you actually tested on.Written from: docs/PLUGIN-DEVELOPER-GUIDE.md, src/lib/plugins/manifest.ts, src/lib/plugins/types.ts, modules/_templates/module.json, src/lib/modules/registry.ts