Open SkyeHoefling opened 7 years ago
Great conversation guys – looking forward to seeing how things progress here via GitHub! Just so everyone knows, the next release of nvQuickSite will have command line execution support.
The desktop app (nvQuickSite) will be executable via the UI or the command line. In other words, you can double-click the EXE and open the Win Form app or you can run the EXE via the command line and feed in all the appropriate params.
Currently there is no integration between nvQuickSite and Prompt.
Currently all prompt commands are run through WebAPI. This makes our challenge significantly easier IMHO. All you'd need to do is to call this using an authenticated call and you should be able to run any command present in Prompt.
Is this the path we'll be travelling?
@donker Thanks for sharing this information:
Currently all prompt commands are run through WebAPI
I haven't had a chance to review the implementation details of the Prompt and wasn't sure how it worked. Knowing that it uses WebAPI significantly simplifies the implementation that we have to do. I think it'll be appropriate to leverage that existing architecture so the Prompt code and the PowerShell code can stay as close together as possible.
What you should do is to run prompt and open up your dev tools so you can see the web traffic. Then do a command like "list-commands" and you'll quickly see how this was made. It's not rocket science and I think it's the easiest way to drill into DNN because you're independent from implementation details and location.
I mentioned this via #3 but there are two endpoints in Prompt.
Where Prompt needs some work is in the area of getting (via the API) options/params/help for individual commands. That would greatly help towards our goals here.
One of the more "hacky" things we'll need to do is to get an antiforgerytoken from the server before we can issue a command. Simply authenticating the call won't cut it. The Cmd method is POST and has the ValidateAntiForgeryToken attribute. This is doable but feels a bit like a hack. Which is what we're doing anyway.
Sorry for the cross-talk, but wanted to also reference this JIRA issue here as well.
Antiforgery proves to be a hurdle we can take. Using Jwt you bypass it.
This is an email discussion that got started today with Peter Donker, Daniel Mettler, Kelly Ford, David Poindexter, Clint Patterson and Andrew Hoefling. The discussion have been copied and pasted into this issue to make the communication open for anyone to participate in.
Hoefling Software Mail - DNN Prompt and MS Powershell.pdf
The purpose of this issue is to discuss MVP goals and to start coming up with tangible items to put into the MVP document.