Skip to content

InjectPluginParams

A community plugin to seed into the demo vault alongside the note tree.

Import:

import type { InjectPluginParams } from 'obsidian-integration-testing';

Signature:

export interface InjectPluginParams

Properties

PropertyTypeDescription
data?unknownOverlay written as .obsidian/plugins/<pluginId>/data.json (JSON, 2-space indent). Omit to keep whatever data.json (if any) already lives in InjectPluginParams.sourceDirectory.
pluginIdstringThe community plugin's id (its .obsidian/plugins/<pluginId> folder name).
repo?string | undefinedThe GitHub repository (owner/name) publishing this plugin, consulted **only** by the headless bootstrap (bootstrapDemoVaultPlugins / buildDemoVaultPopulateAsync / the bootstrap-demo-vault CLI) when the binaries are missing from the demo vault. Supplying it skips the lookup in Obsidian's community plugin registry, which is also the way to bootstrap a plugin that is not listed there at all. Never used when the files are already on disk.
sourceDirectory?stringDirectory to read the plugin's built files from. Every file directly inside it is copied into .obsidian/plugins/<pluginId>/; main.js and manifest.json are required.

Setting this also opts the plugin **out** of the headless bootstrap: an explicit source directory names a local build output, not somewhere to download a published release into.
version?string | undefinedThe release tag the headless bootstrap downloads from, pinning the installed version. Omit for the repository's latest release — what the in-app community browser installs. Like InjectPluginParams.repo, consulted only while bootstrapping missing binaries.

Links to this page: