Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
app-builder-lib
Advanced tools
The app-builder-lib npm package is a library designed to facilitate the building and packaging of applications, particularly Electron applications. It provides a range of tools and utilities to streamline the process of creating distributable versions of your app for different platforms.
Building Electron Applications
This feature allows you to build Electron applications for multiple platforms (macOS, Windows, Linux) using a single configuration object. The code sample demonstrates how to set up a basic build configuration and initiate the build process.
const { build } = require('app-builder-lib');
build({
config: {
appId: 'com.example.app',
productName: 'ExampleApp',
directories: {
output: 'dist',
buildResources: 'resources'
},
files: ['**/*'],
mac: {
target: 'dmg'
},
win: {
target: 'nsis'
},
linux: {
target: 'AppImage'
}
}
}).then(() => {
console.log('Build successful!');
}).catch(err => {
console.error('Build failed:', err);
});
Code Signing
This feature provides the ability to sign your application code, which is essential for distribution on certain platforms like Windows. The code sample shows how to sign an application using a certificate file.
const { sign } = require('app-builder-lib');
sign({
path: 'path/to/your/app',
platform: 'win32',
certificateFile: 'path/to/certificate.pfx',
certificatePassword: 'your-password'
}).then(() => {
console.log('Code signing successful!');
}).catch(err => {
console.error('Code signing failed:', err);
});
Auto-Update Integration
This feature allows you to integrate auto-update functionality into your application by publishing updates to a specified provider. The code sample demonstrates how to publish updates to a GitHub repository.
const { publish } = require('app-builder-lib');
publish({
provider: 'github',
owner: 'your-github-username',
repo: 'your-repo-name',
token: 'your-github-token'
}).then(() => {
console.log('Publishing successful!');
}).catch(err => {
console.error('Publishing failed:', err);
});
electron-builder is a complete solution to package and build a ready-for-distribution Electron app for macOS, Windows, and Linux. It is similar to app-builder-lib in that it provides a comprehensive set of tools for building and packaging Electron applications. However, electron-builder is more widely used and has a larger community, which can be beneficial for support and finding resources.
electron-packager is a command-line tool and Node.js library that bundles Electron-based application source code with a renamed Electron executable and supporting files into folders ready for distribution. It is simpler and more lightweight compared to app-builder-lib, making it a good choice for smaller projects or those with less complex build requirements.
electron-forge is a complete tool for creating, publishing, and installing modern Electron applications. It aims to be a one-stop solution for getting your Electron app up and running. While it offers similar functionalities to app-builder-lib, it also includes features for scaffolding new projects and managing dependencies, making it a more holistic solution for Electron app development.
Various utilities. Used by electron-builder.
FAQs
electron-builder lib
The npm package app-builder-lib receives a total of 266,339 weekly downloads. As such, app-builder-lib popularity was classified as popular.
We found that app-builder-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.