Closed rannn505 closed 2 years ago
Excited to see this!
Please merge this if it is ready!
@TylerLeonhardt @thakkarparth007 expect it for next week :) it is going to be awesome!!
Excited for this!
Thanks for this awesome work! I am looking forward to using this.
I have a suggestion for the name. Instead of nbsh
which is just an acronym that can't be pronounced like a normal word, something like Nell
could be a better name. Node + Shell = Nell
😄. Nell also means "bright, shining one" in old English.
Hey, thanks for all the fixes and new features in this version. I hope soon a stable release of version 5 will be out.
But before that, I've found this error and solution for it, see the pull request https://github.com/rannn505/node-powershell/pull/123
@rannn505 Is this going to be merged soon?
@aminya I called it nbsh
case sh
is them most common abbreviation of shell (node + sh(shell) = nbsh
) but I will consider it
@krystofwoldrich thx for bringing it
@krystofwoldric
Thank you for bringing this to my attention. The truth is that the problem is quite simple to explain:
EOL marker in Windows is /r/n
, and on Unix only /n
, due to line 3 /n chars are not deleted on Windows which leads to the erros.
A better solution will be:
const bn = /n.charCodeAt(0);
const br = /r.charCodeAt(0);
const space = ' '.charCodeAt(0);
export const isWhitespaceByte = (byte: number): boolean => byte === bn || byte === br || byte === space;
Can you change your PR and I will merge it?
@amt-work The epidemic caused me a long delay, I'm back to work on the new version today, hoping I can release it later this week. The things left are mostly tests, documentation and examples. Hope you understand the delay and thanks for the patient :)
@rannn505 Changed it, thanks, your solution is much nicer, I haven't realized it when doing the fix the first time.
It's ready to be merged. https://github.com/rannn505/node-powershell/pull/123
Hey all,
I'm sorry it takes me a while to release the new version, there are still a few things I need to finish for it to be completely ready (mostly documentation and unit testing) and the Corona period brings with it some unexpected issues that takes up most of my free time 😞
I plan at most to release it by the end of the month, thanks for the patience and good health to everyone 🙏
Any updates by chance? I'm hung up on a couple of these issues.
Appreciate all your work! It's a great package.
@Lundberg-Seth It is going to be released by the end of next week, this time for real 🚀
@Lundberg-Seth It is going to be released by the end of next week, this time for real 🚀
That would be awesome. I'm also waiting for it. It'll be a blast.
Any updates? Thanks again!
It would be great if this could be merged. It seems to solve a lot of issues. Thank you for the great work.
Hi, hope you're doing well, what's missing for the release?
Any way I could help?
@rannn505 When you would be able to merge this?
Facing many issues in v4. Few of them are already mentioned in this pull request:
Hi all,
I'm sorry the new version has been delayed so long. I've been very busy, so it's mostly time that I'm lacking to finish it. Most of the code is written, but I still need to work on the examples and documentation since the library went through a complete rewrite and a lot of new and different things have been added. I promise I'm going to do my best to get something preliminary so you can help me keep going. In a month or two, I'll be able to approach it with a fresh, positive mind, as I usually do when writing open source.
Please accept my sincerest thanks for your patience and trust in me. I promise it will pay off, as I have a bunch of cool features up my sleeve. 🙏🏽
Hello @rannn505 . I hope all well. Any news of releasing latest version! Thank you for your hard work.
Hi @davidhagen . I will be back to work on it this week, and I believe the version will be ready sometime in September.
I'm trying to restart machines and randomly getting the following error
case"restart":
ps.addCommand($GetProcessJob = Start-Job -FilePath "scripts\\restart.ps1" -Arg ${server},${vmname},${taskid}
);
ps.addCommand(Wait-Job $GetProcessJob | Out-Null
);
ps.addCommand(Receive-Job -Job $GetProcessJob
);
ps.invoke() //master.js 105
.then(output => {
res.send(output);
ps.dispose();
})
.catch(err => {
res.status(500).send(responseResult({'code': 500,'status':1, 'message': err.message}));
ps.dispose();
});
break;`
"stack": [ "Error [ERR_STREAM_WRITE_AFTER_END]: write after end", " at writeAfterEnd (_stream_writable.js:266:14)", " at Socket.Writable.write (_stream_writable.js:315:5)", " at c:\\Scripts\\myapp\\node_modules\\node-powershell\\lib\\utils.js:45:14", " at new Promise (<anonymous>)", **" at shellSafeWrite (c:\\Scripts\\myapp\\node_modules\\node-powershell\\lib\\utils.js:44:41)", " at Shell.invoke (c:\\Scripts\\myapp\\node_modules\\node-powershell\\lib\\Shell.js:188:5)",** " at c:\\Scripts\\myapp\\routes\\master.js:105:6", " at newFn (c:\\Scripts\\myapp\\node_modules\\express-async-errors\\index.js:16:20)", " at Layer.handle [as handle_request] (c:\\Scripts\\myapp\\node_modules\\express\\lib\\router\\layer.js:95:5)", " at next (c:\\Scripts\\myapp\\node_modules\\express\\lib\\router\\route.js:137:13)", " at Route.dispatch (c:\\Scripts\\myapp\\node_modules\\express\\lib\\router\\route.js:112:3)", " at newFn (c:\\Scripts\\myapp\\node_modules\\express-async-errors\\index.js:16:20)", " at Layer.handle [as handle_request] (c:\\Scripts\\myapp\\node_modules\\express\\lib\\router\\layer.js:95:5)", " at c:\\Scripts\\myapp\\node_modules\\express\\lib\\router\\index.js:281:22", " at Function.process_params (c:\\Scripts\\myapp\\node_modules\\express\\lib\\router\\index.js:335:12)", " at next (c:\\Scripts\\myapp\\node_modules\\express\\lib\\router\\index.js:275:10)" ], "level": "error", "message": "uncaughtException: write after end", "timestamp": "2021-08-16T04:12:03.026Z"
Any update on when this branch may be complete/merged in? @rannn505 thanks for the hard work!
@rannn505 Any updates? :)
Hi everybody,
Thanks for your patience, the current branch has been merged and released to npm as 5.0.0. 🚀 There is still work to be done on tests, documentation, examples, and roadmap building. I am currently working on those and will release them as soon as possible. Meanwhile, you can check out the new API at the playground. ⛳ Please let me know your initial thoughts and any suggestions you may have. 💡
Once again, thank you for your care, 🙏🏽 Ran