Skip to Content
🎉 New release with new features and improvements! V0.0.4 Release →

Plugin Service

The Plugin Service provides methods for installing and managing plugins in the BSH Engine.

Methods

installZip

Installs a plugin from a ZIP file.

const fileInput = document.querySelector('input[type="file"]'); const file = fileInput.files[0]; await bshEngine.plugin.installZip({ payload: { file: file }, onSuccess: (response) => { console.log('Plugin installed:', response.data.pluginName); }, onError: (error) => { console.error('Installation failed:', error); } });
PropertyTypeRequiredDescription
fileFileyesThe ZIP file containing the plugin

installCore

Reinstalls the built-in core plugin. Useful for resetting core entities/schemas to default or applying updates after engine upgrade.

await bshEngine.plugin.installCore({ onSuccess: (response) => { console.log('Core plugin installed:', response.data.pluginName); }, onError: (error) => { console.error('Installation failed:', error); } });

This method does not require any payload parameters.

install Response:

FieldTypeDescription
historynumberUnique ID of the installation history record
pluginIdstringUnique identifier of the plugin (core)
pluginNamestringHuman-readable name of the plugin
totalFilesnumberTotal number of files/entities processed
successCountnumberNumber of successfully processed items
failedCountnumberNumber of items that failed to process

See Also