Gathering detailed insights and metrics for eaero-electron-asar-hot-fix
Gathering detailed insights and metrics for eaero-electron-asar-hot-fix
Gathering detailed insights and metrics for eaero-electron-asar-hot-fix
Gathering detailed insights and metrics for eaero-electron-asar-hot-fix
npm install eaero-electron-asar-hot-fix
Typescript
Module System
Node Version
NPM Version
65
Supply Chain
90.9
Quality
71
Maintenance
50
Vulnerability
97.9
License
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
312
Last Day
1
Last Week
3
Last Month
18
Last Year
91
Latest Version
0.0.2
Package Id
eaero-electron-asar-hot-fix@0.0.2
Unpacked Size
23.34 kB
Size
9.15 kB
File Count
8
NPM Version
6.14.15
Node Version
14.18.0
Published on
May 23, 2023
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-40%
3
Compared to previous week
Last Month
260%
18
Compared to previous month
Last Year
-58.8%
91
Compared to previous year
中文文档 | English
A NodeJs module for
electron
, used to support app.asar update, revised inelectron-asar-hot-updater
(thanks to yansenlei),electron-asar-hot-updater
Based onelectron-asar-updater
refactoring.
eaero-electron-asar-hot-fix: https://github.com/eaero-dev/eaero-electron-asar-hot-fix electron-asar-hot-updater: https://github.com/yansenlei/electron-asar-hot-updater
EAU
takes three parameters:
url
, the file's sha1 value sha1
, method
request method(post or get),and a custom parameter.1$ npm install --save eaero-electron-asar-hot-fix
Now, inside the main.js file, call it like this:
1const { app } = require("electron"); 2const EAU = require("eaero-electron-asar-hot-fix"); 3 4// Version checking needs to be implemented manually,sha1 is not necessary 5app.on("ready", function () { 6 const params = { 7 url: "", 8 sha1: "", 9 method: "get", // or post 10 args: {}, 11 }; 12 EAU.download( 13 params, 14 (success) => {}, 15 (error) => {} 16 ); 17});
You may need to configure in vue.config.js:
1module.exports = { 2 pluginOptions: { 3 electronBuilder: { 4 builderOptions: { 5 asar: true, 6 extraResources: [ 7 { 8 from: "node_modules/eaero-electron-asar-hot-fix/updater.exe", 9 to: "../updater.exe", 10 }, 11 ], 12 }, 13 }, 14 }, 15};
When you use compressed files, the comparison of the sha1 value is the comparison of the incoming sha1 and the downloaded zip archive.
If you use a zip file, the plug-in will unzip the file after downloading it, which will make your update file smaller, but you must make sure that update.asar
is at the root of the zip package:
At present, the name of this asar file can only be update
, and it is not considered to support customization for the time being.
If you use compressed files, you need configure the
Content-Disposition
in theResponse Headers
, and it has thezip
key words.
── update.zip
└── update.asar
This is to get around the fact that the prompt text from the timeout command was always being shown, even when redirecting to NUL
The updater.exe is a really simple C# console app, compiled with Mono. Source code. from electron-asar-updater pull #2. If the user system version is win7, you may need to manually install .Net framework first.
:smiley: if you have any comments or wish to contribute to this project, you are welcome to submit Issues or PR.
MIT - iceliebodich
No vulnerabilities found.
No security vulnerabilities found.