Streaming wrapper for Electron that lets you write JavaScript and capture console output via Node.js streams.
electron-stream is a Node.js library that provides a streaming interface to Electron, allowing developers to execute JavaScript code in a headless Electron instance and capture console output via standard streams. It solves the problem of programmatically running browser-like JavaScript without manual browser automation setup.
Node.js developers who need to automate JavaScript execution in a browser environment for testing, scraping, or scripting purposes, especially those working in CI/CD pipelines.
Developers choose electron-stream because it offers a simple, stream-based API that integrates seamlessly with Node.js workflows, eliminating the complexity of traditional browser automation tools while providing fine-grained control over console output.
Streaming wrapper around electron
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Wraps Electron in a writable stream interface, making it feel like standard Node.js streams, as shown in examples where JavaScript code is piped directly for execution.
Defaults to hidden mode and includes Travis CI setup instructions with Xvfb, making it well-suited for automated testing and CI/CD pipelines.
Provides separate readable streams for console.log (stdout) and console.error (stderr), allowing precise logging control, as demonstrated in the output streams section.
Offers settings like enabling Node integration, serving static files, or connecting to external HTTP servers via the API options, adding versatility for different use cases.
Only captures console output without support for DOM manipulation, network interception, or other browser automation capabilities, restricting it to simple scripting tasks.
Requires configuring Xvfb for headless operation on platforms like Travis CI, adding overhead and potential debugging challenges, as noted in the Travis section.
Bundles electron-prebuilt, making it a substantial dependency for lightweight projects that might only need basic JavaScript execution without full Electron.
When using the 'loc' option to connect to an external HTTP server, writing JavaScript directly to the stream is disabled, limiting flexibility in mixed environments.