diff --git a/packages/electron-chrome-web-store/src/browser/index.ts b/packages/electron-chrome-web-store/src/browser/index.ts index 7445cc5..b11e566 100644 --- a/packages/electron-chrome-web-store/src/browser/index.ts +++ b/packages/electron-chrome-web-store/src/browser/index.ts @@ -4,7 +4,7 @@ import * as path from 'path' import { registerWebStoreApi } from './api' import { loadAllExtensions } from './loader' export { loadAllExtensions } from './loader' -export { installExtension } from './installer' +export { installExtension, downloadExtension } from './installer' import { initUpdater } from './updater' export { updateExtensions } from './updater' import { getDefaultExtensionsPath } from './utils' diff --git a/packages/electron-chrome-web-store/src/browser/installer.ts b/packages/electron-chrome-web-store/src/browser/installer.ts index 9b781ac..9ff6526 100644 --- a/packages/electron-chrome-web-store/src/browser/installer.ts +++ b/packages/electron-chrome-web-store/src/browser/installer.ts @@ -174,7 +174,13 @@ export async function downloadExtensionFromURL( } } -async function downloadExtension(extensionId: string, extensionsDir: string): Promise { +/** + * Download and unpack extension to the given extensions directory. + */ +export async function downloadExtension( + extensionId: string, + extensionsDir: string, +): Promise { const url = getExtensionCrxURL(extensionId) return await downloadExtensionFromURL(url, extensionsDir, extensionId) }