Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

@mtdxc/electron-forge-publisher-oss

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mtdxc/electron-forge-publisher-oss

Electron Forge Publisher that publish your distributable Electron app artifacts to Aliyun Object Storage Service(OSS).

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

Electron Forge Publisher OSS

Electron Forge Publisher OSS that publish your distributable Electron app artifacts to Aliyun Object Storage Service (OSS).

English | 简体中文

✨ Features

  • ⚙️ Electron Forge publish to OSS.
  • ⚙️ Electron auto update.

🖥 Platform

  • macOS and Windows

📦 Install

npm install @mtdxc/electron-forge-publisher-oss --save-dev
yarn add @mtdxc/electron-forge-publisher-oss --dev

🔨 Usage

publishers config

// forge.config.js

module.exports = {
  // ...
  publishers: [
    {
      name: '@mtdxc/electron-forge-publisher-oss',
      config: {
        basePath: '/desktop',
        region: 'oss-cn-hangzhou',
        bucket: 'my-bucket',
        accessKeyId: 'xxx',
        accessKeySecret: 'xxx',
      }
    }
  ]
}

The basePath is the base path, and other parameters are the same as the OSS parameters.

auto update config

// main.js

import { autoUpdater } from 'electron'
import fetch from 'node-fetch'

const baseUrl = `https://my-bucket.oss-cn-zhangjiakou.aliyuncs.com/desktop/${platform}`

const release = await fetch(`${baseUrl}/release.json`)
const { currentRelease } = release

let url

if (process.platform === 'darwin') {
  url = `${baseUrl}/release.json`
} else {
  url = `${baseUrl}/${currentRelease}`
}

autoUpdater.setFeedURL({
  url,
  serverType: 'json'
})

autoUpdater.checkForUpdates()

See more >>

📋 Change Log

1.0.0

2022-11-07

  • 🆕 Electron Forge publish to OSS.
  • 🆕 Electron auto update.

Keywords

electron

FAQs

Package last updated on 25 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts