code: function addSingle(name: string, dirname: string) {
  
    const plugin = resolvePlugin(name, dirname);
  
    if (plugin.remote) {
      plugin.remote.forEach((p) => {
        this._plugins.remote[p.id] = p;
      });
    }
  
    if (plugin.remoteString) {
      this._plugins.remoteString.push(...plugin.remoteString);
    }
  
    if (plugin.pipe) {
      this._plugins.pipe.push(...plugin.pipe);
    }
  
    if (plugin.cache) {
      plugin.remote.forEach((p) => {
        this._plugins.cache[p.id] = p;
      });
    }
  
    if (plugin.validation) {
      this._plugins.validation.push(...plugin.validation);
    }
  }
docs: Add a plugin from it's name.
  
  @param name Plugin name (can be specified with or without prefix).
  @param dirname The directory where to resolve the plugin from.
  @this PluginCollection
  @private