CanvasPluginManifest

Describes a canvas-environment plugin, so a host can validate it before running any of its code.

@internote/canvas-sdkInterface
On this page
import { CanvasPluginManifest } from '@internote/canvas-sdk';

The plugin's code default-exports a defineEnvironment definition, which loadEnvironmentFromManifest imports and registers. The module runtime loads today; worker, a sandboxed runtime for untrusted plugins, is reserved.

#Fields

author
Who wrote the plugin.
string
chalkRequired
The environment the plugin provides. Its name must match the loaded definition's.
CanvasPluginChalkSpec
description
What the plugin adds, in a sentence.
string
idRequired
The plugin's unique id, named in every load error.
string
nameRequired
The plugin's human-readable name.
string
permissions
The permissions the plugin requests, such as storage:db.
string[]
runtime
How the runtime loads the plugin's code: module is a dynamic import of an ES module whose default export is the definition, for a trusted plugin; worker is reserved for a sandboxed runtime.
moduleworker
src
The URL or path of the plugin's entry module.
string
versionRequired
The plugin's version.
string

#Example

const manifest: CanvasPluginManifest = {
    id: 'example.greeting',
    name: 'Greeting',
    version: '1.0.0',
    chalk: { environment: 'greeting' },
    runtime: 'module',
    src: '/plugins/greeting.js',
};

Declared in packages/canvas-sdk/src/plugin/manifest.ts:41.

Last updated