Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Brandon Padgett
@gerane
@r
@r_keith_hill I wanted to ask you about a few things related to the templates.
With powershell and the psgallery, if you plan to have the gallery as a method of people sharing templates, code execution is kind of a non issue.
Since they could just have anything malicious run at module installation.
Brandon Padgett
@gerane
I guess I am trying to understand the need to the sanitize strings and not allow code execution through variables etc. By the time the template is on the system, wouldn't there have already been better means to execute code?
I do not have much experience with the safe strings and things like that, so I am trying to get a better understanding of it and learn what i can.
Brandon Padgett
@gerane
oops, was on my phone and it different show username options, looks like keith has a different spelling in here @rkeithhill
Wil Taylor
@wiltaylor
Yes finally I have wanted a project like this in powershell. I am thinking of using this with c# too.
Sebastian N.
@megamorf

@all Hey guys, I was wondering how far from your 1.0 release you are. Should one hold off from using it yet or would you say it's already usable?

Thanks in advance.

David Wilson
@daviwil
Hey @megamorf, sorry for the delay! We are getting pretty close to 1.0 at this point. Plaster is quite usable in its current state, give it a shot and create a test project them let us know what you think!
Sebastian N.
@megamorf
@daviwil okay, will do :thumbsup:
Sebastian N.
@megamorf
blob
Is the output folder always supposed to exist?
David Wilson
@daviwil
@megamorf Hmmm, my assumption is that Plaster would create the output folder if it didn't exist, but maybe it doesn't... @rkeithhill, where did we land on that?
Also, any reason you're setting the locale? Did you get an error if you didn't set it to en-us?
Sebastian N.
@megamorf
well, I didn't want you to have to deal with German error messages and setting the locale globally didn't seem to work
David Wilson
@daviwil
ahhhh, OK, makes sense. was just making sure we didn't have a bug there
Sebastian N.
@megamorf
apart from Plaster not creating the destination folder I haven't run into any issues yet :thumbsup:
David Wilson
@daviwil
good to hear! I think we should be creating the output folder so we'll get that fixed before shipping the first release
Keith also just started on narrowing down the official default module template, might be worth checking it out to see what things we might need to add or remove: #139
Sebastian N.
@megamorf
Okay, I'll take a look and see if I can add anything to the discussion. Thanks again for the quick response
David Wilson
@daviwil
No problem, anytime
Keith Hill
@rkeithhill
Yup, that's an oversight on my part. In my testing, I always scaffold into an existing Out dir. I'll check in a fix for that tonight.
Keith Hill
@rkeithhill
OK, committed a fix for the DestinationPath issue.
David Wilson
@daviwil
Awesome, thanks Keith! @megamorf, give the latest code a shot when you get a chance, it should create the output folder for you now :)
Keith Hill
@rkeithhill
Also, when you guys get a chance review this issue/discussion. We are attempting to provide a psake script that can handle most PowerShell module "build" steps with a section (variables and extension tasks) to customize the bigger build script. This is similar to how Microsoft provide Microsoft.CSharp.targets for all VS C# projects. PowerShell/Plaster#145
Keith Hill
@rkeithhill
There were a lot of changes to the build script in the New Module template over the weekend. Sure would appreciate it if some folks took it for a test spin. After you've cloned/pulled Plaster, cd to <PlasterRoot>\src\Templatest\NewModule and then run ipmo ..\..\plaster.psd1; Invoke-Plaster -TemplatePath . -Destination <path for an empty module>. Thanks to @davegreen the updated build script adds support for PSScriptAnalyzer and platyPS. After you've scaffolded an empty project, you should be able to run the .\build.ps1 file from its root dir. Then try invoke-psake build.psake.ps1 -taskList Test. If you have a code-signing cert, edit the build.settings.ps1 file to enable script signing.
David Wilson
@daviwil
@rkeithhill nice! i'll take a look in a bit
Keith Hill
@rkeithhill
Thanks!
David Wilson
@daviwil
by the way, I'm planning to start implementing the integration of Plaster into VS Code this week
using it as an opportunity to add the $psEditor APIs for PromptForChoice, etc now that I'm not implementing my own PSHost
Sebastian N.
@megamorf
I'll take a look as well. :+1:
Keith Hill
@rkeithhill
Oh and we now provide a ScriptAnalyzerSettings.psd1 file and configure it for use in VSCode's .vscode/settings.json file - along with my favorite VSCode editor setting for PowerShell projects "files.trimTrailingWhitespace": true :-)
David Wilson
@daviwil
that's great
you guys did a hell of a lot of work this weekend :) sorry I wasn't around to participate, had some stuff to do
Keith Hill
@rkeithhill
no problem. I won't be around most of next weekend.
Keith Hill
@rkeithhill
BTW there's a bit of src/Templates/NewModule/plasterManifest.xml cleanup we need to do. Turns out the <modifyFile> directives to "add" tool-specific tasks to an existing .vscode\tasks.json file is hard - well the regex foo is hard. I have it working fine when there is at least one task. However when there task list is empty, then it's harder to get the regex correct.
Sebastian N.
@megamorf
What's the proper way to enable the script analysis in Plaster?
By editing ScriptAnalyzerSettings.psd1 or build.settings.ps1?
Keith Hill
@rkeithhill
Edit build.settings.ps1 to enable script analysis. Set the ScriptAnalysisAction to the level you want: Error, Warning, ReportOnly. The ScriptAnalyzerSetttings.psd1 is for configuring rules, excluding rules, etc.
Jan Oehen
@Oechiih
Does anybody know why plaster isn't supporting all parameters of "New-ModuleManifest" in the plasterManifest?