@advanced-rest-client/arc-electron-plugin-manager

A theme package manager. Installs, uninstalls and updates themes installed in ARC.

Usage no npm install needed!

<script type="module">
  import advancedRestClientArcElectronPluginManager from 'https://cdn.skypack.dev/@advanced-rest-client/arc-electron-plugin-manager';
</script>

README

ARC Electron plug-in manager

Manages ARC application plug-ins.

Currently only themes manager is supported.

Usage

$ npm i @advanced-rest-client/arc-electron-plugin-manager

In the main process:

const {ThemePluginsManager} = require('@advanced-rest-client/arc-electron-plugin-manager/main');

const manager = new ThemePluginsManager();

// installing themes
await manager.inastall('npm-package-name', 'version');
await manager.inastall('github-owner/github-repo', 'branch/tag/hash');
await manager.inastall('/my/local/package');

// Uninstalling themes
await manager.uninstall('npm-package-name');
await manager.uninstall('github-owner/github-repo');
await manager.uninstall('/my/local/package');

// Check for an update of a specific package
const into = await manager.checkUpdateAvailable('npm-package-name');
if (info) {
  // update available.
}

// Check for any update
const infoMap = await manager.checkForUpdates();
if (Object.keys(infoMap).length) {
  // updates are available
}

// Update list of packages
await manager.update(infoMap);