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 🙏

© 2024 – Pkg Stats / Ryan Hefner

wine-child-process

v0.1.2

Published

A child process implementation that automatically utilizes wine when running Windows applications in Linux and macOS

Downloads

3

Readme

Wine Child Process

A child process implementation that automatically utilizes wine when running Windows EXE applications in Linux and macOS.

This modules aims to be a simple bridge between the common child process functions and Wine as required.

Child Process Functions

Basic child process functions are provided that runs Wine automicatilly when running in Linux or macOS. Otherwise, these functions acts similarly to the child process counterpart.

exec

Calls exec function from child_process module. Wine is automatically used when using Linux or macOS.

Returns the child_process.ChildProcess if successful or null if using Linux or macOS with no Wine installed

For more information, please refer to child_process.exec documentation.

| Parameter | Type | Description | |:---------- |:-----------------------------:|:-------------------------------------------------- | | command | string | The command to run, with space-separated arguments | | options | child_process.ExecOptions | Additional options for the exec function | | callback | callback(err, stdout, stderr) | Called with the output when process terminates |

execFile

Calls execFile function from child_process module. Wine is automatically used when using Linux or macOS.

Returns the child_process.ChildProcess if successful or null if using Linux or macOS with no Wine installed

For more information, please refer to child_process.execFile documentation.

| Parameter | Type | Description | |:---------- |:-----------------------------:|:-------------------------------------------------- | | file | string | The name or path of the executable file to run | | args | readonly string[] | List of string arguments | | options | child_process.ExecFileOptions | Additional options for the execFile function | | callback | callback(err, stdout, stderr) | Called with the output when process terminates |

execSync

Calls execSync function from child_process module. Wine is automatically used when using Linux or macOS.

Returns the output Buffer or string if successful or null if using Linux or macOS with no Wine installed

For more information, please refer to child_process.execSync documentation.

| Parameter | Type | Description | |:---------- |:-----------------------------:|:-------------------------------------------------- | | command | string | The command to run, with space-separated arguments | | options | child_process.ExecSyncOptions | Additional options for the exec function |

execFileSync

Calls execFileSync function from child_process module. Wine is automatically used when using Linux or macOS.

Returns the output Buffer or string if successful or null if using Linux or macOS with no Wine installed

For more information, please refer to child_process.execFileSync documentation.

| Parameter | Type | Description | |:---------- |:---------------------------------:|:-------------------------------------------------- | | file | string | The name or path of the executable file to run | | args | readonly string[] | List of string arguments | | options | child_process.ExecFileSyncOptions | Additional options for the execFile function |

Utility Functions

Some utility functions are also provided for basic check such as checking if Wine is installed in the system.

checkWindowsOrWine

Returns true if the system is running Windows or if Wine is installed in Linux or macOS. Otherwise, returns false.

This is useful when checking if the rest of the child process functions can be safely used without running the child process functions.

Usage Notes

It is advisable to check whether the functions can used to create child processes.

if (checkWindowsOrWine()) {
    // Perform child process functions
}

When using cwd option, the path is automatically joined with the exe command/file. This is only performed when running Linux and macOS since the main command becomes wine