npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

electron-forge-publisher-azure

v0.1.2

Published

Azure publisher for Electron Forge

Downloads

296

Readme

electron-forge-publisher-azure

An Electron Forge publisher that uploads build artifacts to Azure Blob Storage.

Installation

npm install --save-dev electron-forge-publisher-azure

Usage

// forge.config.js
module.exports = {
  publishers: [
    {
      name: 'electron-forge-publisher-azure',
      config: {
        connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING,
        container: 'releases',
      },
    },
  ],
};

Configuration

| Option | Type | Required | Description | | ------------------------------- | ---------- | -------- | -------------------------------------------------------------------- | | container | string | Yes | Azure Blob Storage container name | | connectionString | string | No | Azure Storage connection string | | storageAccount | string | No | Storage account name (use with storageAccessKey) | | storageAccessKey | string | No | Storage account key (use with storageAccount) | | sasUrl | string | No | Pre-built SAS URL for the storage account | | folder | string | No | Blob prefix/folder (default: sanitized app name) | | public | boolean | No | Set container to blob public access (default: false) | | keyResolver | function | No | Custom function (fileName, platform, arch) => string for blob keys | | releaseFileCacheControlMaxAge | number | No | Cache-Control: max-age=N (seconds) for RELEASES files |

Authentication

Credentials are resolved in the following priority order:

1. Connection String (config)

config: {
  connectionString: 'DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net',
  container: 'releases',
}

2. Account Name + Key

config: {
  storageAccount: 'mystorageaccount',
  storageAccessKey: 'base64encodedkey==',
  container: 'releases',
}

3. SAS URL

config: {
  sasUrl: 'https://mystorageaccount.blob.core.windows.net?sv=2020-08-04&ss=b&...',
  container: 'releases',
}

4. Environment Variable

Set AZURE_STORAGE_CONNECTION_STRING in your environment. The publisher will use it automatically with no config required beyond container.

config: {
  container: 'releases',
}

Local Development with Azurite

Azurite is a local Azure Storage emulator. The easiest way to run it is via the Azurite VS Code extension.

Setup:

  1. Install the Azurite extension in VS Code
  2. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run Azurite: Start Blob Service
  3. Create your container (releases in demo) using Azure Storage Explorer or the Azure CLI pointed at the local emulator

Then configure the publisher to connect to Azurite.

Recommended: SAS URL (most compatible)

Generate a SAS token in Azure Storage Explorer for your Azurite container (right-click the container → Get Shared Access Signature), then use sasUrl:

// forge.config.js
module.exports = {
  publishers: [
    {
      name: 'electron-forge-publisher-azure',
      config: {
        sasUrl: 'http://127.0.0.1:10000/devstoreaccount1?sv=2018-03-28&sp=...',
        container: 'releases',
      },
    },
  ],
};

This avoids Shared Key signature compatibility issues between newer @azure/storage-blob SDK versions and older Azurite installations.

Alternative: connection string

The connection string approach uses Shared Key signing, which can fail with 403 on write operations if your SDK version is newer than your installed Azurite version supports. If you want to use it, ensure the Azurite extension is up to date:

config: {
  // Well-known Azurite dev credentials — safe to commit, not real secrets
  connectionString:
    'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;',
  container: 'releases',
}

Note: Azurite listens on http://127.0.0.1:10000 by default.

Using the Source Directly in an Electron Project

If you want to iterate on the publisher alongside your Electron app — without publishing to npm — you can reference the source directly using a relative file: path.

1. Clone this repo next to your Electron project:

my-electron-app/
electron-forge-publisher-azure/

2. In your Electron app's package.json, add a local dependency:

{
  "devDependencies": {
    "electron-forge-publisher-azure": "file:../electron-forge-publisher-azure"
  }
}

3. Build the publisher source first (needed so dist/ exists):

# In electron-forge-publisher-azure/
npx tsc

4. Install in your Electron app:

# In my-electron-app/
npm install

5. Reference it in forge.config.js by package name as normal:

// forge.config.js
module.exports = {
  publishers: [
    {
      name: 'electron-forge-publisher-azure',
      config: {
        connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING,
        container: 'releases',
      },
    },
  ],
};

After making changes to the publisher source, re-run npx tsc in the publisher directory and re-run your electron-forge publish command. No reinstall is needed because file: symlinks the directory.

Public Access

Setting public: true calls setAccessPolicy('blob') on the container before uploads begin. This makes all blobs in the container publicly readable via their URL.

Note: Container access policy changes may take up to 30 seconds to propagate.

Overwriting Releases

Azure Blob Storage will overwrite existing blobs with the same key. There is no versioning or conflict protection by default. Ensure you don't overwrite your own releases by publishing twice with the same version on the same platform.