Mira Plugin Install

Install a plugin in Mira App Server

Mira Plugin Install

AI-generated

Overview

This node, "Mira Plugin Install," is designed to install plugins into a Mira App Server library. It supports installing plugins either from the NPM registry or from a local file path or URL (such as a git repository or tarball). This node is useful for automating plugin deployment workflows within the Mira platform, enabling users to programmatically add new functionality or updates to their Mira libraries.

Practical examples include:

  • Automatically installing a specific version of a plugin from NPM when deploying a new environment.
  • Installing a custom plugin hosted on a private GitHub repository or local server by specifying its path or URL.

Properties

Name Meaning
Token Source Choose where to get the access token from: "From Credentials" (use stored API credentials) or "From Input Data" (provide token directly or via input data).
Server URL The URL of the Mira App Server (required if token source is "From Input Data").
Access Token The access token for authentication, provided directly or via input data (required if token source is "From Input Data").
Library ID The identifier of the Mira library where the plugin will be installed (required).
Installation Method How to install the plugin: "NPM Package" (install from NPM registry) or "File Path/URL" (install from local path or URL).
NPM Package Name The name of the NPM package to install (required if installation method is "NPM Package").
Version The version of the NPM package to install; defaults to "latest" (optional, only for NPM installs).
Plugin Path or URL The local file path, git URL, or tarball URL of the plugin to install (required if installation method is "File Path/URL").

Output

The node outputs JSON data with the following structure:

  • installed: Boolean indicating whether the plugin was successfully installed (true).
  • libraryId: The Library ID where the plugin was installed.
  • installMethod: The method used for installation ("npm" or "path").
  • response: The raw response from the Mira App Server API after attempting the installation.
  • timestamp: ISO string timestamp of when the operation occurred.
  • operation: Always set to "install" to indicate the performed action.
  • If installed via NPM:
    • packageName: The NPM package name installed.
    • version: The version of the package installed.
  • If installed via path:
    • pluginPath: The path or URL used for installation.

The node does not output binary data.

Dependencies

  • Requires an active Mira App Server accessible via HTTP(S).
  • Needs an access token for authentication, which can be provided either through stored credentials or directly via input data.
  • The node uses Mira's REST API endpoint /api/plugins/install to perform the installation.
  • No additional external dependencies beyond standard HTTP requests and n8n workflow capabilities.

Troubleshooting

  • Missing Library ID: The node throws an error if the Library ID is not provided. Ensure this field is filled correctly.
  • Missing Package Name or Plugin Path: Depending on the installation method, the node requires either the NPM package name or the plugin path/URL. Omitting these will cause errors.
  • Authentication Errors: If the access token is invalid or missing, the Mira App Server will reject the request. Verify that the token is correct and has sufficient permissions.
  • Network Issues: Connection problems to the Mira App Server URL will prevent plugin installation. Confirm the server URL is reachable.
  • Invalid Plugin Source: For path installations, ensure the path or URL is accessible and points to a valid plugin package.

Links and References

Discussion