Socket
Socket
Sign inDemoInstall

node-windows

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-windows - npm Package Compare versions

Comparing version 0.1.7 to 0.1.9

25

lib/daemon.js

@@ -106,6 +106,9 @@ /**

+' -w '+this.wait+(this.maxRetries!==null?' -m '+this.maxRetries:'')
+' -r '+this.maxRestarts+' -a '+(this.abortOnError==true?'y':'n'),
+' -r '+this.maxRestarts+' -a '+(this.abortOnError==true?'y':'n')
+ (config.cwd ? ' -d "'+config.cwd+'"' : ''),
description: this.description,
logpath: this.logpath,
env: config.env
env: config.env,
flags: config.flags,
execPath: this.execPath
});

@@ -333,2 +336,14 @@ }

/**
* @cfg {String} execPath
* The absolute path to the executable that will launch the script.
* If omitted process.execPath is used.
*/
execPath: {
enumerable: true,
writable: true,
configurable: false,
value: config.execPath !== undefined ? require('path').resolve(config.execPath) : null
},
/**
* @method install

@@ -416,3 +431,3 @@ * Install the script as a process.

* @param {Number} [waitTime]
* Seconds to wait until winsw.exe finish processing the uninstall command.
* Seconds to wait until winsw.exe finish processing the uninstall command.
*

@@ -526,3 +541,3 @@ * var Service = require('node-windows').Service;

this.execute('NET START "'+me.name+'"',function(err,stdout,stderr){
this.execute('NET START "'+me._exe+'"',function(err,stdout,stderr){
if (err){

@@ -564,3 +579,3 @@ if (err.code == 2){

me.execute('NET STOP "'+me.name+'"',function(err,stdout,stderr){
me.execute('NET STOP "'+me._exe+'"',function(err,stdout,stderr){
if (err){

@@ -567,0 +582,0 @@ if (err.code == 2){

3

lib/winsw.js

@@ -30,2 +30,3 @@ module.exports = {

config.logmode = 'rotate';
config.execPath = config.execPath || process.execPath;

@@ -39,3 +40,3 @@ // Initial template

+config.description
+'</description><executable>' + process.execPath + '</executable><arguments>'
+'</description><executable>' + config.execPath + '</executable><arguments>'
+config.flags

@@ -42,0 +43,0 @@ +' '+config.script

@@ -15,2 +15,9 @@ // Handle input parameters

})
.alias('d','cwd')
.describe('cwd','The absolute path of the current working directory of the script to be run as a process.')
.check(function(argv){
require('fs').existsSync(p.resolve(argv.d),function(exists){
return exists;
});
})
.demand('log')

@@ -123,3 +130,5 @@ .alias('l','log')

// Fork the child process
child = fork(script,{env:process.env});
var opts = {env:process.env};
if (argv.d) opts.cwd = argv.d;
child = fork(script,opts);

@@ -126,0 +135,0 @@ // When the child dies, attempt to restart based on configuration

{
"name": "node-windows",
"version": "0.1.7",
"version": "0.1.9",
"description": "Support for Windows services, event logging, UAC, and several helper methods for interacting with the OS.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,13 +0,7 @@

# Update (9/11/14)
# Update (5/21/15)
This project, along with node-mac and node-linux has undergone a couple of refactors. A new an improved version (which should be backwards compatible) is under construction right now. In the meantime, I have merged several of the PR's and bumped the version on npm.
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/coreybutler/node-windows?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# Update (2/18/14)
The number of issues between this project and it's sister projects ((node-mac)[https://github.com/coreybutler/node-mac] & (node-mac)[https://github.com/coreybutler/node-linux]) are accruing at a rate that deserves more attention than I can provide on my own. I'm actively looking for maintainers to help run this project. Please get in touch via gitter if you're interested.
**tl;dr - Many updates made, more coming. Delayed for a good reason.**
Since there has been more recent activity and a lot of requests/PR's recently, I figured I should address whats going on with node-windows. I have completed a lot of work on the next version & I'm trying to incorporate as much as I can into that version. Additionally, I have recently built a Windows network where CI will be happening in an effort to make it easier to contribute according to guidelines that suit all of the node-* projects.
I also wanted to address the delays so folks know this project is far from abandoned. Under normal circumstances, issues and features would be fixed/released more regularly. However; over the last several months, I have been primarily preoccupied with my fiance's health. She was struck by a truck who ignored a stop sign (auto vs pedestrian). She is OK, but an extraordinary amount of time has been consumed with doctors/PT/ART/etc. What little time I've had has been dedicated to client contracts. I believe we're starting to reach a point where the schedule may ease up a bit, at which point I will have significantly more time to put into this project and the others.
[![NPM version](https://badge.fury.io/js/node-windows.png)](http://badge.fury.io/js/node-windows)

@@ -56,3 +50,3 @@ [![NGN Dependencies](https://david-dm.org/coreybutler/node-windows.png)](https://david-dm.org/coreybutler/node-windows)

However; it is possible to use node-windows without the global flag (i.e. install directly into the project root).
However; it is possible to use node-windows without the global flag (i.e. install directly into the project root).
More details regarding why this is not the recommended approach are available throughout this Readme.

@@ -59,0 +53,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc