@vestra-player/sdk - v1.11.3
    Preparing search index...

    Interface PackageCandidate

    A validated package directory, from Packages.validate.

    A package the player has checked, from Packages.validate or Packages.validateArchive: its manifest, digest and the checks it passed. The player copies the whole package when it checks it and installs that copy, so later changes to the directory do not matter. Installing starts a PackageChange; the player keeps only the 32 most recent candidates.

    Before installing, the plugin shows the package's id and version. The candidate's manifest is the manifest as the player read it.

    const candidate = await plugin.packages.validate(directory);
    const { id, version } = candidate.manifest;
    await plugin.osd.show("{} {}", [id, version]);

    1.0.0

    interface PackageCandidate {
        directory: string;
        digest: string;
        manifest: PackageManifest;
        checks: string[];
        install(options?: InstallOptions): Promise<PackageChange>;
    }
    Index
    • Install it. The same source upgrades the installed plugin (its data stays); another source fails with conflict unless replace is set; a built-in id fails with unsupported (built-ins update with the player). A reserved id (vestra or vestra.*, which every built-in uses) fails with reserved (already when validated), as only the player installs built-in plugins. An update keeps a disabled plugin disabled unless enabled says otherwise (see InstallOptions.enabled).

      Parameters

      Returns Promise<PackageChange>

      invalid (rejects) An option is malformed: a source the player does not accept, or a replace or enabled that is not a boolean.

      conflict (rejects) The plugin is installed from another source and replace is not set.

      unsupported (rejects) A built-in plugin's id.

      reserved (rejects) A reserved id (vestra, vestra.*).

      busy (rejects) The plugin library is being cleaned up, or the player already keeps 64 change records.

      revisionConflict (rejects) The installed revision of this plugin changed meanwhile; call install again (no new validation needed).

      stale (rejects) The candidate is older than the 32 the player keeps.

      unavailable (rejects) The player is a temporary window (AppInfo.temporary, player 0.10.3): it runs the main window's plugins as they are and installs or updates none.

      The new package replaces the installed plugin even though it came from another source. Without replace the player refuses with conflict; the same source simply upgrades and keeps the plugin's data.

      const change = await candidate.install({ replace: true });
      await change.done; // "committed" once installed (running unless it stays disabled)

      A store disabled a version it revoked; the update that fixes it should run again. Without enabled the update keeps the plugin disabled; true enables it once installed.

      const change = await candidate.install({ enabled: true });
      await change.done; // "committed" once the fixed version runs

      1.0.0

    directory: string

    The package directory.

    digest: string

    Content digest of the package.

    manifest: PackageManifest

    Its manifest.

    checks: string[]

    The checks the player ran.