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

@lvce-editor/main-process

v6.58.1

Published

The `main-process` is a NodeJS process that runs Electron.

Readme

main-process

The main-process is a NodeJS process that runs Electron.

  • main-process is created when the Electron application is launched
  • main-process can create Windows using Apis from Electron.
  • main-process spawns shared-process
  • main-process and shared-process can communicate via ipc

Profiling the main process

Set "application.useProtocolRegisterSource": true in the application's settings.json and restart to load packaged resources through Electron's native directory source API. The default is false; missing or invalid settings leave it disabled. Both modes keep the existing application URLs, response security headers, and dynamic /remote IPC loading. The application handler forwards bundled requests to a separate source scheme in enabled mode, so it still runs on the main thread. Development builds use their existing IPC loader, and runtimes without registerSource use the existing file loader.

killall electron &&
npx electron --wait src/profile.js

This will create a profile.cpuprofile file, which can be loaded inside the chrome devtools performance panel.

Benchmarking application startup

Use --wait-10-seconds to keep the application attached to the terminal and quit it after 10 seconds:

time lvce --wait-10-seconds

macOS update helper

ElectronMacUpdater.stage(diskImagePath, version) accepts an already downloaded and checksum-verified DMG. The update worker owns release discovery, architecture-specific asset selection, downloading, checksum validation, and Install Update/Restart prompts. This native helper mounts the image read-only, copies the bundle beside the installed application, and verifies bundle identity, version, executable architecture, code signature, and signing-team continuity.

ElectronMacUpdater.restart() requests normal application shutdown. Replacement happens at will-quit, so a cancelled window close leaves the installed app untouched. The previous bundle remains in a private .lvce-update-*/previous.app folder next to the app for recovery; replacement failures attempt to restore it. A failed install prevents exit and shows a native error. No elevated permissions, re-signing, or quarantine removal are performed. The installed app's parent directory must be writable; apps running from a DMG, a translocated path, or a symlink must first be moved to a normal application folder.

These commands require a packaged macOS build and coordinated host/update-worker integration. Unit tests cover staging, rollback, validation failures and restart ordering; they do not establish a shipped application's end-to-end update behavior.