ensurePluginSupport = async (plugin, forceFetch) => {
  let versions = await getEngineInfos(plugin, forceFetch);
  if (
    plugin.version &&
    plugin.version !== "latest" &&
    !versions[plugin.version] &&
    !forceFetch
  ) {
    versions = await getEngineInfos(plugin, true);
  }
  const supported = supportedVersion(
    plugin.version || "latest",
    versions,
    packagejson.version
  );
  if (!supported)
    throw new Error(
      `Unable to find a supported version for '${plugin.location}'`
    );
  else if (
    supported !== plugin.version ||
    (plugin.version === "latest" && supported !== resolveLatest(versions))
  )
    plugin.version = supported;
}
checks the saltcorn engine property and changes the plugin version if necessary
@param plugin plugin to load