tags are how the marketplace is browsed rather than scrolled: a list of them on the left, the plugins that carry one on the right. a closed vocabulary (PLUGIN_TAGS in the platform) because free text becomes homelab, home-lab, Home Lab and selfhosted inside a month, and a filter list of synonyms is worse than no filter at all. declared here rather than curated in the catalogue, so a plugin can say what it is and nobody edits a table when one ships. the marketplace caches it on sync, exactly as it already does for label and summary.
39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
import type { PluginManifest } from '@@/plugins/manifest';
|
|
|
|
// The reference plugin. Not a fixture — this is what a plugin author reads first, and it is deliberately
|
|
// the smallest thing that is still a real one: a manifest and one route.
|
|
//
|
|
// Everything structural is convention, so this directory IS the documentation:
|
|
//
|
|
// manifest.ts you are here — only what a directory listing cannot say
|
|
// api/router.ts exports `router`; mounted at /api/example
|
|
// db/schema.ts tables, if it had any (every name prefixed `example_`)
|
|
// sidecar/index.ts a process, if it needed one (.mjs instead means node)
|
|
// web/panels.ts panels, if it had a frontend — REQUIRED with web/, and checked by name
|
|
// web/layout.ts how they are arranged — also required with web/
|
|
//
|
|
// `appName` is not declared anywhere: it is the directory name, so the id cannot disagree with where the
|
|
// code sits.
|
|
export const manifest: PluginManifest = {
|
|
publisher: 'officerdev',
|
|
version: '1.0.0',
|
|
platform: '>=1.0.0',
|
|
|
|
label: 'Example',
|
|
summary: 'The reference plugin — one route, nothing else',
|
|
/** exists only for someone writing a plugin. */
|
|
tags: ['Development'],
|
|
icon: 'Puzzle',
|
|
color: '#94a3b8',
|
|
|
|
// One permission gating the whole surface. `ownerOnly: false` means a role can be granted it — which is
|
|
// the interesting case, because it is the one the permission gate actually has to resolve.
|
|
permissions: [
|
|
{
|
|
key: 'example',
|
|
label: 'Example',
|
|
description: 'The reference plugin',
|
|
},
|
|
],
|
|
};
|