Preparing search index...

    Base class for plugin verifiers; extend this to implement a verify() method that tests plugin functionality against the editor.

    // PluginVerifier is the base class for plugins that verify other plugins'
    // output before export or publishing.
    //
    // Key members:
    // verify(pluginDescriptor: IPluginDescriptor, outputDir: Editor.Path): Promise<void>
    // Called by the framework when a matching plugin is exported.
    // Throw an error to fail the export with a message.
    // pluginSystem (readonly) — resolves interface dependencies.

    export class PluginVerifierClassExampleVerifier extends PluginVerifier {
    connections: any[];
    static descriptor() {
    const d = new Descriptor();
    d.id = 'com.docs.PluginVerifierClassExample';
    d.name = 'Plugin Verifier Class Example';
    d.description = 'Demonstrates PluginVerifier with verify() override';
    d.canVerify = (desc: any) => {
    return true;
    };
    return d;
    }
    constructor(pluginSystem: Editor.PluginSystem, descriptor?: Descriptor) {
    super(pluginSystem, descriptor);
    this.connections = [];
    }
    async verify(pluginDescriptor: any, outputDir: Editor.Path): Promise<void> {
    console.log(`Running verification for: ${pluginDescriptor.id}`);
    console.log(`Checking output at: ${outputDir}`);
    // Throw to fail the export:
    // throw new Error('Verification failed: missing required file');
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    id: string
    pluginSystem: PluginSystem

    The plugin system instance this verifier operates within.

    Methods

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object refers to the same instance as the given object.

      Parameters

      Returns boolean

    • Runs verification tests against a plugin descriptor and writes output artifacts to the specified directory.

      Parameters

      Returns Promise<void>