(hack) Add `bolt script show` and `Get-BoltScript` commands
This adds new bolt script show and Get-BoltScript commands.
When used without a script specified, they list all scripts available to
the project. When a script is specified, they print the script to the
console.
These commands load scripts from the scripts/ and files/scripts/
directories in a project and modules on the modulepath, similar to the
bolt script run and Invoke-BoltScript commands. It does not load
scripts that are in the files/ directory, as Bolt does not know
whether a file in that directory is a script or a file used elsewhere in
a module.
!feature
-
Add
bolt script showandGet-BoltScriptcommandsYou can now view scripts available to a project using the new
bolt script showandGet-BoltScriptcommands. These commands show scripts in thescripts/andfiles/scripts/directories for projects and modules.
This adds a new scripts project configuration option that allows users
to create an allowlist of scripts that are available to the project.
This option supports globbing. Any scripts that are not present in the
allowlist will not appear in bolt script show or Get-BoltScript
output, though they can still be run by users directly.
!feature
-
Add
scriptsproject configuration optionThis new configuration option allows users to create an allowlist of scripts that are available to the project. Glob patterns are supported. Any scripts not in the allowlist are hidden from
bolt script showandGet-BoltScriptoutput, but can still be run directly by users.