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).
Optionaloptions: InstallOptionsinvalid (rejects) An option is malformed: a source the
player does not accept, or a replace or enabled that is not a
boolean.
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).
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
A validated package directory, from Packages.validate.
Remarks
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.
Example: Show what a package asks for before installing it
Before installing, the plugin shows the package's id and version. The candidate's
manifestis the manifest as the player read it.Since
1.0.0