Giter Site home page Giter Site logo

obaydmerz / powerjs Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 1.07 MB

Do the powershell magic... right from your script!

License: MIT License

JavaScript 100.00%
api automation child-process dll node-ffi node-gyp nodejs powershell process shell windows

powerjs's People

Contributors

obaydmerz avatar rsmarples avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

powerjs's Issues

PowerJS always loads the PowerShell profile

This may not be desirable as a user profile could add a long delay to starting the shell.
Consider adding a noProfile option to add -noProfile as an argument to spawning the shell.

Please re-license under a more liberal license

Please consider using a different license for this great product!
First and foremost, this is a library which is designed to be used by other applications.

I would love to use this in my closed source Electron application, but neither the GPL nor LGPL would allow this.
Please consider any of the BSD, ISC, MIT or Apache licenses as used by the vast majority of the NPM world.

PowerJS fails to start if pwsh is not installed

child_process:spawn does not throw any error directly as it forks a process
Instead, errors are emitted and need to be listened to.
error is emitted on errors, and spawn on success.
https://nodejs.org/api/child_process.html#event-error

As such, only the first element of additionalShellNames is considered.

Workaround for vanilla windows without PowerShell-7:

const psOptions = {
    additionalShellNames: ['powershell'],
    extensions: [],
    dlls: {}
};
const ps = new PowerJS(psOptions);

node_child_process is not defined when running inside electron app

Hello,

I'm trying to build an electron app that runs powershell commands underneath.
When I'm initializing a PowerJS instance I get the following error

node_child_process is not defined

  • I'm using version "1.0.0"
  • building the app with yarn
  • electron version "21.4.4"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.