diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc new file mode 100644 index 0000000..691bdee --- /dev/null +++ b/.markdownlint-cli2.jsonc @@ -0,0 +1,5 @@ +{ + "ignores": [ + "docs/api/*.md" + ] +} diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 0000000..ed3a3a9 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,59 @@ +{ + "code-block-style": { + "style": "fenced" + }, + "code-fence-style": { + "style": "backtick" + }, + "emphasis-style": { + "style": "asterisk" + }, + "fenced-code-language": { + "allowed_languages": [ + "csharp", + "powershell", + "text", + "yaml" + ], + "language_only": true + }, + "heading-style": { + "style": "atx" + }, + "hr-style": { + "style": "---" + }, + "line-length": { + "strict": true, + "code_blocks": false, + "headings": false + }, + "link-image-style": { + "collapsed": false, + "url_inline": false + }, + "no-duplicate-heading": { + "siblings_only": true + }, + "ol-prefix": { + "style": "ordered" + }, + "proper-names": { + "code_blocks": false, + "names": [ + "PowerShell" + ] + }, + "reference-links-images": { + "shortcut_syntax": true + }, + "strong-style": { + "style": "asterisk" + }, + "ul-style": { + "style": "dash" + }, + "single-title": { + "front_matter_title": "" + } +} diff --git a/.vscode/settings.json b/.vscode/settings.json index cd04995..99d07fc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,12 @@ "anypackage", "Authenticode", "creativecommons", - "Nieto" + "LOCALAPPDATA", + "modulefast", + "Nieto", + "nupkg", + "psresourceget", + "Uninitializing", + "winget" ] } \ No newline at end of file diff --git a/docs/dsc/Package.md b/docs/dsc/Package.md index 80b09e0..f081036 100644 --- a/docs/dsc/Package.md +++ b/docs/dsc/Package.md @@ -76,9 +76,9 @@ Default value: False ### Provider -Specifies the package provider full name. -The provider full name is in the following format: ModuleName\ProviderName. -For AnyPackage PSResourceGet provider it would be: AnyPackage.PSResourceGet\PSResourceGet. +Specifies the package provider full name. The provider full name is in the +following format: ModuleName\ProviderName. For AnyPackage PSResourceGet provider +it would be: AnyPackage.PSResourceGet\PSResourceGet. ```yaml Attribute: Key @@ -88,8 +88,8 @@ Default value: None ### Reasons -Returns reasons why the resource is not in compliance. -The `Code` property is the unique identifier and `Phrase` property is the human readable reason. +Returns reasons why the resource is not in compliance. The `Code` property is +the unique identifier and `Phrase` property is the human readable reason. ```yaml Attribute: Read @@ -109,12 +109,14 @@ Default value: None ### Version -Specifies the package version. -The format is NuGet version range syntax with minor changes. -To specify any package version use `*`. -In normal NuGet version range value of `1.0` would be minimum version inclusive but this parameter converts that value to be exact version of `[1.0]`. -If you need to have minimum version inclusive then use this format `[1.0,]`. -For more information refer to [NuGet version range syntax](https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges). +Specifies the package version. The format is NuGet version range syntax with +minor changes. To specify any package version use `*`. In normal NuGet version +range value of `1.0` would be minimum version inclusive but this parameter +converts that value to be exact version of `[1.0]`. If you need to have minimum +version inclusive then use this format `[1.0,]`. For more information refer to +[NuGet version range syntax][nuget]. + +[nuget]: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Attribute: Key diff --git a/docs/dsc/Source.md b/docs/dsc/Source.md index 4bf95b8..57866c0 100644 --- a/docs/dsc/Source.md +++ b/docs/dsc/Source.md @@ -64,9 +64,9 @@ Default value: None ### Provider -Specifies the package provider full name. -The provider full name is in the following format: ModuleName\ProviderName. -For AnyPackage PSResourceGet provider it would be: AnyPackage.PSResourceGet\PSResourceGet. +Specifies the package provider full name. The provider full name is in the +following format: ModuleName\ProviderName. For AnyPackage PSResourceGet provider +it would be: AnyPackage.PSResourceGet\PSResourceGet. ```yaml Attribute: Key @@ -76,8 +76,8 @@ Default value: None ### Reasons -Returns reasons why the resource is not in compliance. -The `Code` property is the unique identifier and `Phrase` property is the human readable reason. +Returns reasons why the resource is not in compliance. The `Code` property is +the unique identifier and `Phrase` property is the human readable reason. ```yaml Attribute: Read @@ -87,8 +87,8 @@ Default value: N/A ### Trusted -Specifies if the package source is trusted. -If set to `true` it prevents interactive untrusted source prompts. +Specifies if the package source is trusted. If set to `true` it prevents +interactive untrusted source prompts. ```yaml Attribute: Write diff --git a/docs/provider-catalog/chocolatey/about_Chocolatey_Provider.md b/docs/provider-catalog/chocolatey/about_Chocolatey_Provider.md index e8c9959..d01e187 100644 --- a/docs/provider-catalog/chocolatey/about_Chocolatey_Provider.md +++ b/docs/provider-catalog/chocolatey/about_Chocolatey_Provider.md @@ -13,23 +13,24 @@ Provides access to Chocolatey. ## Long Description -The Chocolatey package provider for `AnyPackage` module lets you use Chocolatey using standardized commands. +The Chocolatey package provider for `AnyPackage` module lets you use Chocolatey +using standardized commands. The Chocolatey package provider supports the following cmdlets. -* Find-Package -* Get-Package -* Get-PackageSource -* Install-Package -* Register-PackageSource -* Set-PackageSource -* Uninstall-Package -* Unregister-PackageSource +- Find-Package +- Get-Package +- Get-PackageSource +- Install-Package +- Register-PackageSource +- Set-PackageSource +- Uninstall-Package +- Unregister-PackageSource ## Dynamic Parameters -Dynamic parameters are cmdlet parameters that are added by a package -provider and are available only when `-Provider Chocolatey` parameter is used. +Dynamic parameters are cmdlet parameters that are added by a package provider +and are available only when `-Provider Chocolatey` parameter is used. ### Params @@ -37,7 +38,7 @@ Parameters to pass to the package being installed. #### Cmdlets Supported -* Install-Package +- Install-Package ### ParamsGlobal @@ -45,7 +46,7 @@ Apply package parameters to dependencies of package being installed. #### Cmdlets Supported -* Install-Package +- Install-Package ### RemoveDependencies @@ -53,9 +54,9 @@ Uninstall dependencies of package being uninstalled. #### Cmdlets Supported -* Uninstall-Package +- Uninstall-Package ## See Also -* [about_Package_Providers](../../reference/about_Package_Providers.md) -* [about_AnyPackage](../../reference/about_AnyPackage.md) +- [about_Package_Providers](../../reference/about_Package_Providers.md) +- [about_AnyPackage](../../reference/about_AnyPackage.md) diff --git a/docs/provider-catalog/dotnet-tool/about_DotNet-Tool_Provider.md b/docs/provider-catalog/dotnet-tool/about_DotNet-Tool_Provider.md index 02f049f..d323794 100644 --- a/docs/provider-catalog/dotnet-tool/about_DotNet-Tool_Provider.md +++ b/docs/provider-catalog/dotnet-tool/about_DotNet-Tool_Provider.md @@ -13,24 +13,25 @@ Provides access to .NET Tool package manager. ## Long Description -The Windows .NET Tool package provider for `AnyPackage` module lets you get .NET Tools from nuget.org +The Windows .NET Tool package provider for `AnyPackage` module lets you get .NET +Tools from nuget.org The .NET Tool package provider supports the following cmdlets. -* Find-Package -* Get-Package -* Install-Package -* Update-Package -* Uninstall-Package +- Find-Package +- Get-Package +- Install-Package +- Update-Package +- Uninstall-Package ## Dynamic Parameters -Dynamic parameters are cmdlet parameters that are added by a package -provider and are available only when `-Provider '.NET Tool'` parameter is used. +Dynamic parameters are cmdlet parameters that are added by a package provider +and are available only when `-Provider '.NET Tool'` parameter is used. The .NET Tool provider currently has no dynamic parameters. ## See Also -* [about_Package_Providers](../../reference/about_Package_Providers.md) -* [about_AnyPackage](../../reference/about_AnyPackage.md) +- [about_Package_Providers](../../reference/about_Package_Providers.md) +- [about_AnyPackage](../../reference/about_AnyPackage.md) diff --git a/docs/provider-catalog/homebrew/about_Homebrew_Provider.md b/docs/provider-catalog/homebrew/about_Homebrew_Provider.md index 35855ec..d4065a4 100644 --- a/docs/provider-catalog/homebrew/about_Homebrew_Provider.md +++ b/docs/provider-catalog/homebrew/about_Homebrew_Provider.md @@ -13,27 +13,28 @@ Provides access to Homebrew. ## Long Description -The Homebrew package provider for `AnyPackage` module lets you use Homebrew using standardized commands. +The Homebrew package provider for `AnyPackage` module lets you use Homebrew +using standardized commands. The Homebrew package provider supports the following cmdlets. -* Find-Package -* Get-Package -* Get-PackageSource -* Install-Package -* Register-PackageSource -* Set-PackageSource -* Uninstall-Package -* Unregister-PackageSource +- Find-Package +- Get-Package +- Get-PackageSource +- Install-Package +- Register-PackageSource +- Set-PackageSource +- Uninstall-Package +- Unregister-PackageSource ## Dynamic Parameters -Dynamic parameters are cmdlet parameters that are added by a package -provider and are available only when `-Provider Homebrew` parameter is used. +Dynamic parameters are cmdlet parameters that are added by a package provider +and are available only when `-Provider Homebrew` parameter is used. The Homebrew provider currently has no dynamic parameters. ## See Also -* [about_Package_Providers](../../reference/about_Package_Providers.md) -* [about_AnyPackage](../../reference/about_AnyPackage.md) +- [about_Package_Providers](../../reference/about_Package_Providers.md) +- [about_AnyPackage](../../reference/about_AnyPackage.md) diff --git a/docs/provider-catalog/modulefast/about_ModuleFast_Provider.md b/docs/provider-catalog/modulefast/about_ModuleFast_Provider.md index baf26e6..e7546e5 100644 --- a/docs/provider-catalog/modulefast/about_ModuleFast_Provider.md +++ b/docs/provider-catalog/modulefast/about_ModuleFast_Provider.md @@ -13,82 +13,83 @@ Provides access to PowerShell module ModuleFast. ## Long Description -The ModuleFast package provider for `AnyPackage` module lets you interact with ModuleFast using standardized commands. +The ModuleFast package provider for `AnyPackage` module lets you interact with +ModuleFast using standardized commands. The Programs package provider supports the following cmdlets. -* Install-Package +- Find-Package +- Install-Package ## Dynamic Parameters -Dynamic parameters are cmdlet parameters that are added by a package -provider and are available only when `-Provider ModuleFast` parameter is used. +Dynamic parameters are cmdlet parameters that are added by a package provider +and are available only when `-Provider ModuleFast` parameter is used. ### Destination \ -Where to install the modules. -This defaults to the builtin module path on non-windows and a custom LOCALAPPDATA location on Windows. -You can also specify 'CurrentUser' to install to the Documents folder on Windows Only (this is not recommended) +Where to install the modules. This defaults to the builtin module path on +non-windows and a custom LOCALAPPDATA location on Windows. You can also specify +'CurrentUser' to install to the Documents folder on Windows Only (this is not +recommended) #### Cmdlets Supported -* Install-Package +- Install-Package ### ThrottleLimit \ -How many concurrent installation threads to run. -Each installation thread, given sufficient bandwidth, -will likely saturate a full CPU core with decompression work. -This defaults to the number of logical cores on the system. -If your system uses HyperThreading and presents more logical cores than physical cores available, -you may want to set this to half your number of logical cores for best performance. +How many concurrent installation threads to run. Each installation thread, given +sufficient bandwidth, will likely saturate a full CPU core with decompression +work. This defaults to the number of logical cores on the system. If your system +uses HyperThreading and presents more logical cores than physical cores +available, you may want to set this to half your number of logical cores for +best performance. #### Cmdlets Supported -* Install-Package +- Install-Package ### CILockFilePath \ -The path to the lockfile. -By default it is requires.lock.json in the current folder. -This is ignored if -CI parameter is not present. -It is generally not recommended to change this setting. +The path to the lockfile. By default it is requires.lock.json in the current +folder. This is ignored if -CI parameter is not present. It is generally not +recommended to change this setting. #### Cmdlets Supported -* Install-Package +- Install-Package ### Update \ -Setting this will check for newer modules if your installed modules -are not already at the upper bound of the required version range. -Note that specifying this will also clear the local request cache -for remote repositories which will result in slower evaluations -if the information has not changed. +Setting this will check for newer modules if your installed modules are not +already at the upper bound of the required version range. Note that specifying +this will also clear the local request cache for remote repositories which will +result in slower evaluations if the information has not changed. #### Cmdlets Supported -* Install-Package +- Install-Package ### NoProfileUpdate \ -Setting this won't add the default destination to your powershell.config.json. +Setting this won't add the default destination to your `powershell.config.json`. This really only matters on Windows. #### Cmdlets Supported -* Install-Package +- Install-Package ### NoPSModulePathUpdate \ -By default will modify your PSModulePath to use the builtin destination if not present. -Setting this implicitly skips profile update as well. +By default will modify your PSModulePath to use the builtin destination if not +present. Setting this implicitly skips profile update as well. #### Cmdlets Supported -* Install-Package +- Install-Package ## See Also -* [about_Package_Providers](../../reference/about_Package_Providers.md) -* [about_AnyPackage](../../reference/about_AnyPackage.md) +- [about_Package_Providers](../../reference/about_Package_Providers.md) +- [about_AnyPackage](../../reference/about_AnyPackage.md) diff --git a/docs/provider-catalog/msu/about_Msu_Provider.md b/docs/provider-catalog/msu/about_Msu_Provider.md index 2b2834e..139ae35 100644 --- a/docs/provider-catalog/msu/about_Msu_Provider.md +++ b/docs/provider-catalog/msu/about_Msu_Provider.md @@ -13,21 +13,22 @@ Provides access to Windows hot fixes. ## Long Description -The Windows Msu package provider for `AnyPackage` module lets you get Windows hot fixes using standardized commands. +The Windows Msu package provider for `AnyPackage` module lets you get Windows +hot fixes using standardized commands. The Msu package provider supports the following cmdlets. -* Find-Package -* Get-Package +- Find-Package +- Get-Package ## Dynamic Parameters -Dynamic parameters are cmdlet parameters that are added by a package -provider and are available only when `-Provider Msu` parameter is used. +Dynamic parameters are cmdlet parameters that are added by a package provider +and are available only when `-Provider Msu` parameter is used. The Msu provider currently has no dynamic parameters. ## See Also -* [about_Package_Providers](../../reference/about_Package_Providers.md) -* [about_AnyPackage](../../reference/about_AnyPackage.md) +- [about_Package_Providers](../../reference/about_Package_Providers.md) +- [about_AnyPackage](../../reference/about_AnyPackage.md) diff --git a/docs/provider-catalog/programs/about_Programs_Provider.md b/docs/provider-catalog/programs/about_Programs_Provider.md index d9f4387..dd3f95f 100644 --- a/docs/provider-catalog/programs/about_Programs_Provider.md +++ b/docs/provider-catalog/programs/about_Programs_Provider.md @@ -13,17 +13,18 @@ Provides access to Windows programs. ## Long Description -The Windows programs package provider for `AnyPackage` module lets you get Windows Add/Remove programs using standardized commands. +The Windows programs package provider for `AnyPackage` module lets you get +Windows Add/Remove programs using standardized commands. The Programs package provider supports the following cmdlets. -* Get-Package -* Uninstall-Package +- Get-Package +- Uninstall-Package ## Dynamic Parameters -Dynamic parameters are cmdlet parameters that are added by a package -provider and are available only when `-Provider Programs` parameter is used. +Dynamic parameters are cmdlet parameters that are added by a package provider +and are available only when `-Provider Programs` parameter is used. ### SystemComponent \ @@ -31,9 +32,9 @@ Includes Windows system components. #### Cmdlets Supported -* Get-Package +- Get-Package ## See Also -* [about_Package_Providers](../../reference/about_Package_Providers.md) -* [about_AnyPackage](../../reference/about_AnyPackage.md) +- [about_Package_Providers](../../reference/about_Package_Providers.md) +- [about_AnyPackage](../../reference/about_AnyPackage.md) diff --git a/docs/provider-catalog/provider-catalog.md b/docs/provider-catalog/provider-catalog.md index 00b1735..a1c580c 100644 --- a/docs/provider-catalog/provider-catalog.md +++ b/docs/provider-catalog/provider-catalog.md @@ -23,13 +23,24 @@ Find-PSResource -Tag AnyPackage, Provider | Package Manager | Module | Project Page | | --------------- | ------------------------ | --------------- | -| .NET Tool | AnyPackage.DotNet.Tool | [anypackage/dotnet-tool](https://github.com/anypackage/dotnet-tool) -| Apt | AnyPackage.Apt | [anypackage/apt](https://github.com/anypackage/apt) | -| Chocolatey | AnyPackage.Chocolatey | [anypackage/chocolatey](https://github.com/anypackage/chocolatey) | -| Homebrew | AnyPackage.Homebrew | [anypackage/homebrew](https://github.com/anypackage/homebrew) | -| ModuleFast | AnyPackage.ModuleFast | [anypackage/modulefast](https://github.com/anypackage/modulefast) | -| Msu | AnyPackage.Msu | [anypackage/msu](https://github.com/anypackage/msu) | -| PSResourceGet | AnyPackage.PSResourceGet | [anypackage/psresourceget](https://github.com/anypackage/psresourceget) | -| Programs | AnyPackage.Programs | [anypackage/programs](https://github.com/anypackage/programs) | -| Scoop | AnyPackage.Scoop | [anypackage/scoop](https://github.com/anypackage/scoop) | -| WinGet | AnyPackage.WinGet | [anypackage/winget](https://github.com/anypackage/winget) | +| .NET Tool | AnyPackage.DotNet.Tool | [anypackage/dotnet-tool] | +| Apt | AnyPackage.Apt | [anypackage/apt] | +| Chocolatey | AnyPackage.Chocolatey | [anypackage/chocolatey] | +| Homebrew | AnyPackage.Homebrew | [anypackage/homebrew] | +| ModuleFast | AnyPackage.ModuleFast | [anypackage/modulefast] | +| Msu | AnyPackage.Msu | [anypackage/msu] | +| PSResourceGet | AnyPackage.PSResourceGet | [anypackage/psresourceget] | +| Programs | AnyPackage.Programs | [anypackage/programs] | +| Scoop | AnyPackage.Scoop | [anypackage/scoop] | +| WinGet | AnyPackage.WinGet | [anypackage/winget] | + +[anypackage/dotnet-tool]: https://github.com/anypackage/dotnet-tool +[anypackage/apt]: https://github.com/anypackage/apt +[anypackage/chocolatey]: https://github.com/anypackage/chocolatey +[anypackage/homebrew]: https://github.com/anypackage/homebrew +[anypackage/modulefast]: https://github.com/anypackage/modulefast +[anypackage/msu]: https://github.com/anypackage/msu +[anypackage/psresourceget]: https://github.com/anypackage/psresourceget +[anypackage/programs]: https://github.com/anypackage/programs +[anypackage/scoop]: https://github.com/anypackage/scoop +[anypackage/winget]: https://github.com/anypackage/winget diff --git a/docs/provider-catalog/psresourceget/about_PSResourceGet_Provider.md b/docs/provider-catalog/psresourceget/about_PSResourceGet_Provider.md index 6270cee..177186b 100644 --- a/docs/provider-catalog/psresourceget/about_PSResourceGet_Provider.md +++ b/docs/provider-catalog/psresourceget/about_PSResourceGet_Provider.md @@ -13,44 +13,47 @@ Provides access to PSResourceGet. ## Long Description -The PSResourceGet package provider for `AnyPackage` module lets you use PSResourceGet using standardized commands. +The PSResourceGet package provider for `AnyPackage` module lets you use +PSResourceGet using standardized commands. The PSResourceGet package provider supports the following cmdlets. -* Find-Package -* Get-Package -* Get-PackageSource -* Install-Package -* Publish-Package -* Register-PackageSource -* Save-Package -* Set-PackageSource -* Uninstall-Package -* Unregister-PackageSource -* Update-Package +- Find-Package +- Get-Package +- Get-PackageSource +- Install-Package +- Publish-Package +- Register-PackageSource +- Save-Package +- Set-PackageSource +- Uninstall-Package +- Unregister-PackageSource +- Update-Package ## Dynamic Parameters -Dynamic parameters are cmdlet parameters that are added by a package -provider and are available only when `-Provider PSResourceGet` parameter is used. +Dynamic parameters are cmdlet parameters that are added by a package provider +and are available only when `-Provider PSResourceGet` parameter is used. ### ApiKey \ -Specifies the API key that you want to use to publish a resource to the online gallery. +Specifies the API key that you want to use to publish a resource to the online +gallery. #### Cmdlets Supported -* Publish-Package +- Publish-Package ### AcceptLicense \ -Specifies that the resource should accept any request to accept the license agreement. -This suppresses prompting if the module mandates that a user accept the license agreement. +Specifies that the resource should accept any request to accept the license +agreement. This suppresses prompting if the module mandates that a user accept +the license agreement. #### Cmdlets Supported -* Install-Package -* Update-Package +- Install-Package +- Update-Package ### AuthenticodeCheck \ @@ -58,9 +61,9 @@ Validates Authenticode signatures and catalog files on Windows. #### Cmdlets Supported -* Install-Package -* Save-Package -* Update-Package +- Install-Package +- Save-Package +- Update-Package ### Credential \ @@ -68,37 +71,40 @@ Optional credentials to be used when accessing a repository. #### Cmdlets Supported -* Find-Package -* Install-Package -* Publish-Package -* Save-Package -* Update-Package +- Find-Package +- Install-Package +- Publish-Package +- Save-Package +- Update-Package ### CredentialInfo \ -A PSCredentialInfo object that includes the name of a vault and a secret that is stored in a Microsoft.PowerShell.SecretManagement store. +A PSCredentialInfo object that includes the name of a vault and a secret that is +stored in a Microsoft.PowerShell.SecretManagement store. #### Cmdlets Supported -* Register-PackageSource -* Set-PackageSource +- Register-PackageSource +- Set-PackageSource ### DestinationPath \ -Specifies the path where the NuGet package `.nupkg` file should be saved. -This parameter can be used in conjunction with the Source parameter to publish to a source and also save the exact same package to the local file system. +Specifies the path where the NuGet package `.nupkg` file should be saved. This +parameter can be used in conjunction with the Source parameter to publish to a +source and also save the exact same package to the local file system. #### Cmdlets Supported -* Publish-Package +- Publish-Package ### Force \ -When specified, bypasses checks for TrustRepository and AcceptLicense and updates the package. +When specified, bypasses checks for TrustRepository and AcceptLicense and +updates the package. #### Cmdlets Supported -* Update-Package +- Update-Package ### IncludeDependencies \ @@ -107,7 +113,7 @@ Dependencies are deduplicated. #### Cmdlets Supported -* Find-Package +- Find-Package ### Latest \ @@ -115,7 +121,7 @@ Returns the latest package for a given version range. #### Cmdlets Supported -* Find-Package +- Find-Package ### Path \ @@ -123,20 +129,20 @@ Specifies the search path. #### Cmdlets Supported -* Get-Package +- Get-Package ### Priority \ -Specifies the priority ranking of the repository. -Valid priority values range from 0 to 100. -Lower values have a higher priority ranking. The default value is `100`. +Specifies the priority ranking of the repository. Valid priority values range +from 0 to 100. Lower values have a higher priority ranking. The default value is +`100`. Repositories are searched in priority order (highest first). #### Cmdlets Supported -* Register-PackageSource -* Set-PackageSource +- Register-PackageSource +- Set-PackageSource ### Proxy \ @@ -144,7 +150,7 @@ The URL to a proxy server used to access repositories outside of your network. #### Cmdlets Supported -* Publish-Package +- Publish-Package ### ProxyCredential \ @@ -152,7 +158,7 @@ The credentials required to use the proxy server. #### Cmdlets Supported -* Publish-Package +- Publish-Package ### PSGallery \ @@ -160,42 +166,43 @@ When specified, registers PSGallery repository. #### Cmdlets Supported -* Register-PackageSource +- Register-PackageSource ### Reinstall \ -Installs the latest version of a module even if the latest version is already installed. -The installed version is overwritten. -This allows you to repair a damaged installation of the module. +Installs the latest version of a module even if the latest version is already +installed. The installed version is overwritten. This allows you to repair a +damaged installation of the module. -If an older version of the module is installed, the new version is installed side-by-side in a new version-specific folder. +If an older version of the module is installed, the new version is installed +side-by-side in a new version-specific folder. #### Cmdlets Supported -* Install-Package +- Install-Package ### Scope \ -Specifies the scope of the resource. -Scope types supported are: +Specifies the scope of the resource. Scope types supported are: -* CurrentUser -* AllUsers +- CurrentUser +- AllUsers #### Cmdlets Supported -* Get-Package -* Install-Package -* Uninstall-Package -* Update-Package +- Get-Package +- Install-Package +- Uninstall-Package +- Update-Package ### SkipDependenciesCheck \ -Bypasses the default check that all dependencies are present in the target repository. +Bypasses the default check that all dependencies are present in the target +repository. #### Cmdlets Supported -* Publish-Package +- Publish-Package ### SkipDependencyCheck \ @@ -204,10 +211,10 @@ No resources of the found resource are installed. #### Cmdlets Supported -* Install-Package -* Save-Package -* Uninstall-Package -* Update-Package +- Install-Package +- Save-Package +- Uninstall-Package +- Update-Package ### SkipModuleManifestValidate \ @@ -215,42 +222,43 @@ Skips validating the module manifest before publishing. #### Cmdlets Supported -* Publish-Package +- Publish-Package ### Tag \ -Filters search results for resources that include one or more of the specified tags. +Filters search results for resources that include one or more of the specified +tags. #### Cmdlets Supported -* Find-Package +- Find-Package ### TemporaryPath \ -Specifies the path to temporarily install the resource before actual installation. -If no temporary path is provided, the resource is temporarily installed in the current user's temporary folder. +Specifies the path to temporarily install the resource before actual +installation. If no temporary path is provided, the resource is temporarily +installed in the current user's temporary folder. #### Cmdlets Supported -* Install-Package -* Save-Package -* Update-Package +- Install-Package +- Save-Package +- Update-Package ### Type \ -Specifies one or more resource types to find. -Resource types supported are: +Specifies one or more resource types to find. Resource types supported are: -* Module -* Script -* Command -* DscResource +- Module +- Script +- Command +- DscResource #### Cmdlets Supported -* Find-Package +- Find-Package ## See Also -* [about_Package_Providers](../../reference/about_Package_Providers.md) -* [about_AnyPackage](../../reference/about_AnyPackage.md) +- [about_Package_Providers](../../reference/about_Package_Providers.md) +- [about_AnyPackage](../../reference/about_AnyPackage.md) diff --git a/docs/provider-catalog/scoop/about_Scoop_Provider.md b/docs/provider-catalog/scoop/about_Scoop_Provider.md index 375996f..d9ce1cf 100644 --- a/docs/provider-catalog/scoop/about_Scoop_Provider.md +++ b/docs/provider-catalog/scoop/about_Scoop_Provider.md @@ -13,39 +13,40 @@ Provides access to Scoop. ## Long Description -The Scoop package provider for `AnyPackage` module lets you use Scoop using standardized commands. +The Scoop package provider for `AnyPackage` module lets you use Scoop using +standardized commands. The Scoop package provider supports the following cmdlets. -* Find-Package -* Get-Package -* Get-PackageSource -* Install-Package -* Register-PackageSource -* Set-PackageSource -* Uninstall-Package -* Unregister-PackageSource -* Update-Package +- Find-Package +- Get-Package +- Get-PackageSource +- Install-Package +- Register-PackageSource +- Set-PackageSource +- Uninstall-Package +- Unregister-PackageSource +- Update-Package ## Dynamic Parameters -Dynamic parameters are cmdlet parameters that are added by a package -provider and are available only when `-Provider Scoop` parameter is used. +Dynamic parameters are cmdlet parameters that are added by a package provider +and are available only when `-Provider Scoop` parameter is used. ### Architecture \ Specifies the app architecture. Scope types supported are: -* 32bit -* 64bit -* arm64 +- 32bit +- 64bit +- arm64 #### Cmdlets Supported -* Install-Package -* Uninstall-Package -* Update-Package +- Install-Package +- Uninstall-Package +- Update-Package ### NoCache \ @@ -53,8 +54,8 @@ Does not use the download cache. #### Cmdlets Supported -* Install-Package -* Update-Package +- Install-Package +- Update-Package ### Official \ @@ -62,7 +63,7 @@ Specifies an official bucket. #### Cmdlets Supported -* Register-PackageSource +- Register-PackageSource ### Reinstall \ @@ -70,7 +71,7 @@ Reinstalls the app even if there is not a newer version. #### Cmdlets Supported -* Update-Package +- Update-Package ### RemoveData \ @@ -78,21 +79,21 @@ Remove all persistent data. #### Cmdlets Supported -* Uninstall-Package +- Uninstall-Package ### Scope \ Specifies the scope of the package. Scope types supported are: -* CurrentUser -* AllUsers +- CurrentUser +- AllUsers #### Cmdlets Supported -* Install-Package -* Uninstall-Package -* Update-Package +- Install-Package +- Uninstall-Package +- Update-Package ### SkipDependencies \ @@ -100,8 +101,8 @@ Skip installing app dependencies. #### Cmdlets Supported -* Install-Package -* Update-Package +- Install-Package +- Update-Package ### SkipHashCheck \ @@ -109,10 +110,10 @@ Skips hash validation. #### Cmdlets Supported -* Install-Package -* Update-Package +- Install-Package +- Update-Package ## See Also -* [about_Package_Providers](../../reference/about_Package_Providers.md) -* [about_AnyPackage](../../reference/about_AnyPackage.md) +- [about_Package_Providers](../../reference/about_Package_Providers.md) +- [about_AnyPackage](../../reference/about_AnyPackage.md) diff --git a/docs/provider-catalog/winget/about_WinGet_Provider.md b/docs/provider-catalog/winget/about_WinGet_Provider.md index 0e2ea24..b538032 100644 --- a/docs/provider-catalog/winget/about_WinGet_Provider.md +++ b/docs/provider-catalog/winget/about_WinGet_Provider.md @@ -13,27 +13,28 @@ Provides access to WinGet. ## Long Description -The WinGet package provider for `AnyPackage` module lets you use WinGet using standardized commands. +The WinGet package provider for `AnyPackage` module lets you use WinGet using +standardized commands. The WinGet package provider supports the following cmdlets. -* Find-Package -* Get-Package -* Get-PackageSource -* Install-Package -* Register-PackageSource -* Set-PackageSource -* Uninstall-Package -* Unregister-PackageSource +- Find-Package +- Get-Package +- Get-PackageSource +- Install-Package +- Register-PackageSource +- Set-PackageSource +- Uninstall-Package +- Unregister-PackageSource ## Dynamic Parameters -Dynamic parameters are cmdlet parameters that are added by a package -provider and are available only when `-Provider WinGet` parameter is used. +Dynamic parameters are cmdlet parameters that are added by a package provider +and are available only when `-Provider WinGet` parameter is used. The WinGet provider currently has no dynamic parameters. ## See Also -* [about_Package_Providers](../../reference/about_Package_Providers.md) -* [about_AnyPackage](../../reference/about_AnyPackage.md) +- [about_Package_Providers](../../reference/about_Package_Providers.md) +- [about_AnyPackage](../../reference/about_AnyPackage.md) diff --git a/docs/reference/Find-Package.md b/docs/reference/Find-Package.md index f729f86..8943421 100644 --- a/docs/reference/Find-Package.md +++ b/docs/reference/Find-Package.md @@ -16,27 +16,27 @@ Finds packages in package sources. ### Name -``` +```text Find-Package [[-Name] ] [[-Version] ] [-Source ] [-Prerelease] [-Provider ] [] ``` ### Path -``` +```text Find-Package -Path [-Provider ] [] ``` ### LiteralPath -``` +```text Find-Package -LiteralPath [-Provider ] [] ``` ### Uri -``` +```text Find-Package -Uri [-Provider ] [] ``` @@ -140,11 +140,14 @@ Accept wildcard characters: False ### -Version -Specifies the package version. -The format is NuGet version range syntax with minor changes. -In normal NuGet version range value of `1.0` would be minimum version inclusive but this parameter converts that value to be exact version of `[1.0]`. -If you need to have minimum version inclusive then use this format `[1.0,]`. -For more information refer to [NuGet version range syntax](https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges). +Specifies the package version. The format is NuGet version range syntax with +minor changes. In normal NuGet version range value of `1.0` would be minimum +version inclusive but this parameter converts that value to be exact version of +`[1.0]`. If you need to have minimum version inclusive then use this format +`[1.0,]`. For more information refer to +[NuGet version range syntax][nuget-syntax]. + +[nuget-syntax]: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Type: PackageVersionRange @@ -160,11 +163,11 @@ Accept wildcard characters: False ### -LiteralPath -Specifies a path to one or more locations. -The value of LiteralPath is used exactly as it's typed. -No characters are interpreted as wildcards. -If the path includes escape characters, enclose it in single quotation marks. -Single quotation marks tell PowerShell to not interpret any characters as escape sequences. +Specifies a path to one or more locations. The value of LiteralPath is used +exactly as it's typed. No characters are interpreted as wildcards. If the path +includes escape characters, enclose it in single quotation marks. Single +quotation marks tell PowerShell to not interpret any characters as escape +sequences. ```yaml Type: String[] @@ -213,7 +216,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/reference/Get-Package.md b/docs/reference/Get-Package.md index 003c258..6259b64 100644 --- a/docs/reference/Get-Package.md +++ b/docs/reference/Get-Package.md @@ -14,7 +14,7 @@ Gets installed packages. ## SYNTAX -``` +```text Get-Package [[-Name] ] [[-Version] ] [-Provider ] [] ``` @@ -87,11 +87,14 @@ Accept wildcard characters: False ### -Version -Specifies the package version. -The format is NuGet version range syntax with minor changes. -In normal NuGet version range value of `1.0` would be minimum version inclusive but this parameter converts that value to be exact version of `[1.0]`. -If you need to have minimum version inclusive then use this format `[1.0,]`. -For more information refer to [NuGet version range syntax](https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges). +Specifies the package version. The format is NuGet version range syntax with +minor changes. In normal NuGet version range value of `1.0` would be minimum +version inclusive but this parameter converts that value to be exact version of +`[1.0]`. If you need to have minimum version inclusive then use this format +`[1.0,]`. For more information refer to +[NuGet version range syntax][nuget-syntax]. + +[nuget-syntax]: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Type: PackageVersionRange @@ -107,7 +110,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/reference/Get-PackageProvider.md b/docs/reference/Get-PackageProvider.md index c250c8a..57be2ba 100644 --- a/docs/reference/Get-PackageProvider.md +++ b/docs/reference/Get-PackageProvider.md @@ -14,7 +14,7 @@ Gets imported package providers. ## SYNTAX -``` +```text Get-PackageProvider [[-Name] ] [-ListAvailable] [] ``` @@ -74,7 +74,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -92,6 +96,6 @@ This cmdlet returns objects that represent a package provider. ## RELATED LINKS -[Import-Module](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/import-module) +[Import-Module](https://go.microsoft.com/fwlink/?LinkID=2096585) -[Remove-Module](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/remove-module) +[Remove-Module](https://go.microsoft.com/fwlink/?LinkID=2096802) diff --git a/docs/reference/Get-PackageSource.md b/docs/reference/Get-PackageSource.md index 39608e7..9eef522 100644 --- a/docs/reference/Get-PackageSource.md +++ b/docs/reference/Get-PackageSource.md @@ -14,7 +14,7 @@ Gets the package source. ## SYNTAX -``` +```text Get-PackageSource [[-Name] ] [-Provider ] [] ``` @@ -73,7 +73,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/reference/Install-Package.md b/docs/reference/Install-Package.md index 1b336b1..d2206e5 100644 --- a/docs/reference/Install-Package.md +++ b/docs/reference/Install-Package.md @@ -16,7 +16,7 @@ Installs the package. ### Name (Default) -``` +```text Install-Package [-Name] [[-Version] ] [-Source ] [-Prerelease] [-PassThru] [-TrustSource] [-Provider ] [-WhatIf] [-Confirm] [] @@ -24,28 +24,28 @@ Install-Package [-Name] [[-Version] ] [-Source < ### InputObject -``` +```text Install-Package [-PassThru] [-TrustSource] [-InputObject] [-WhatIf] [-Confirm] [] ``` ### Path -``` +```text Install-Package -Path [-PassThru] [-Provider ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath -``` +```text Install-Package -LiteralPath [-PassThru] [-Provider ] [-WhatIf] [-Confirm] [] ``` ### Uri -``` +```text Install-Package -Uri [-PassThru] [-Provider ] [-WhatIf] [-Confirm] [] ``` @@ -68,9 +68,10 @@ This command installs the PowerShellGet package. ### -InputObject -Specifies a PackageInfo object that represents the package to install. -Enter a variable that contains the object, or type a command or expression that gets the object, such as a `Find-Package` command. -You can use the pipeline to send a package object to `Install-Package`. +Specifies a PackageInfo object that represents the package to install. Enter a +variable that contains the object, or type a command or expression that gets the +object, such as a `Find-Package` command. You can use the pipeline to send a +package object to `Install-Package`. ```yaml Type: PackageInfo[] @@ -182,11 +183,14 @@ Accept wildcard characters: False ### -Version -Specifies the package version. -The format is NuGet version range syntax with minor changes. -In normal NuGet version range value of `1.0` would be minimum version inclusive but this parameter converts that value to be exact version of `[1.0]`. -If you need to have minimum version inclusive then use this format `[1.0,]`. -For more information refer to [NuGet version range syntax](https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges). +Specifies the package version. The format is NuGet version range syntax with +minor changes. In normal NuGet version range value of `1.0` would be minimum +version inclusive but this parameter converts that value to be exact version of +`[1.0]`. If you need to have minimum version inclusive then use this format +`[1.0,]`. For more information refer to +[NuGet version range syntax][nuget-syntax]. + +[nuget-syntax]: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Type: PackageVersionRange @@ -235,11 +239,11 @@ Accept wildcard characters: False ### -LiteralPath -Specifies a path to one or more locations. -The value of LiteralPath is used exactly as it's typed. -No characters are interpreted as wildcards. -If the path includes escape characters, enclose it in single quotation marks. -Single quotation marks tell PowerShell to not interpret any characters as escape sequences. +Specifies a path to one or more locations. The value of LiteralPath is used +exactly as it's typed. No characters are interpreted as wildcards. If the path +includes escape characters, enclose it in single quotation marks. Single +quotation marks tell PowerShell to not interpret any characters as escape +sequences. ```yaml Type: String[] @@ -288,7 +292,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -300,7 +308,8 @@ You can pipe a package name, version range, and package info to this cmdlet. ### AnyPackage.Provider.PackageInfo -By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter to a return objects that represent a package. +By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter +to a return objects that represent a package. ## NOTES diff --git a/docs/reference/Publish-Package.md b/docs/reference/Publish-Package.md index 1e750e8..82e64ed 100644 --- a/docs/reference/Publish-Package.md +++ b/docs/reference/Publish-Package.md @@ -14,7 +14,7 @@ Publishes a package. ## SYNTAX -``` +```text Publish-Package [-Path] [-Provider] [-Source ] [-PassThru] [-WhatIf] [-Confirm] [] ``` @@ -31,7 +31,8 @@ Publishes a package. Publish-Package -Path C:\module -Provider PowerShellGet -Source PSGallery ``` -This command publishes the module to `PSGallery` using the `PowerShellGet` provider. +This command publishes the module to `PSGallery` using the `PowerShellGet` +provider. ## PARAMETERS @@ -134,7 +135,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -146,7 +151,8 @@ You can a path to this cmdlet. ### AnyPackage.Provider.PackageInfo -By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter to a return objects that represent a package. +By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter +to a return objects that represent a package. ## NOTES diff --git a/docs/reference/Register-PackageSource.md b/docs/reference/Register-PackageSource.md index 4207652..fd6a04e 100644 --- a/docs/reference/Register-PackageSource.md +++ b/docs/reference/Register-PackageSource.md @@ -14,7 +14,7 @@ Registers a package source. ## SYNTAX -``` +```text Register-PackageSource [-Name] [-Location] [-Provider] [-Trusted] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] ``` @@ -31,7 +31,8 @@ Registers a package source. Register-PackageSource -Name Test -Location C:\TestRepo -Provider PowerShellGet ``` -This command registers a package source named `Test` for the `PowerShellGet` provider. +This command registers a package source named `Test` for the `PowerShellGet` +provider. ## PARAMETERS @@ -85,8 +86,8 @@ Accept wildcard characters: False ### -PassThru -Returns a PackageSourceInfo object that represents the source that was registered. -By default, `Register-PackageSource` doesn't generate any output. +Returns a PackageSourceInfo object that represents the source that was +registered. By default, `Register-PackageSource` doesn't generate any output. ```yaml Type: SwitchParameter @@ -118,8 +119,8 @@ Accept wildcard characters: False ### -Trusted -Specifies the package source is trusted. -Stops prompts for an untrusted source when installing packages. +Specifies the package source is trusted. Stops prompts for an untrusted source +when installing packages. ```yaml Type: SwitchParameter @@ -151,8 +152,7 @@ Accept wildcard characters: False ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml Type: SwitchParameter @@ -168,7 +168,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -180,7 +184,8 @@ You can use the pipeline to send a string for the source name. ### AnyPackage.Provider.PackageSourceInfo -By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter to a return objects that represent a package source. +By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter +to a return objects that represent a package source. ## NOTES diff --git a/docs/reference/Save-Package.md b/docs/reference/Save-Package.md index 0093aef..f71589d 100644 --- a/docs/reference/Save-Package.md +++ b/docs/reference/Save-Package.md @@ -16,7 +16,7 @@ Saves a package to the file system. ### Name (Default) -``` +```text Save-Package [-Name] [[-Version] ] [-Source ] [-Path ] [-Prerelease] [-PassThru] [-TrustSource] [-Provider ] [-WhatIf] [-Confirm] [] @@ -24,7 +24,7 @@ Save-Package [-Name] [[-Version] ] [-Source [-Path ] [-PassThru] [-TrustSource] [-WhatIf] [-Confirm] [] ``` @@ -47,9 +47,10 @@ This command saves the PowerShellGet module to C:\Temp. ### -InputObject -Specifies a PackageInfo object that represents the package to save. -Enter a variable that contains the object, or type a command or expression that gets the object, such as a `Find-Package` command. -You can use the pipeline to send a package object to `Save-Package`. +Specifies a PackageInfo object that represents the package to save. Enter a +variable that contains the object, or type a command or expression that gets the +object, such as a `Find-Package` command. You can use the pipeline to send a +package object to `Save-Package`. ```yaml Type: PackageInfo[] @@ -177,11 +178,14 @@ Accept wildcard characters: False ### -Version -Specifies the package version. -The format is NuGet version range syntax with minor changes. -In normal NuGet version range value of `1.0` would be minimum version inclusive but this parameter converts that value to be exact version of `[1.0]`. -If you need to have minimum version inclusive then use this format `[1.0,]`. -For more information refer to [NuGet version range syntax](https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges). +Specifies the package version. The format is NuGet version range syntax with +minor changes. In normal NuGet version range value of `1.0` would be minimum +version inclusive but this parameter converts that value to be exact version of +`[1.0]`. If you need to have minimum version inclusive then use this format +`[1.0,]`. For more information refer to +[NuGet version range syntax][nuget-syntax]. + +[nuget-syntax]: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Type: PackageVersionRange @@ -230,7 +234,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -242,7 +250,8 @@ You can pipe a package name, version range, and package info to this cmdlet. ### AnyPackage.Provider.PackageInfo -By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter to a return objects that represent a package. +By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter +to a return objects that represent a package. ## NOTES diff --git a/docs/reference/Set-PackageSource.md b/docs/reference/Set-PackageSource.md index d8b65ca..6c05fde 100644 --- a/docs/reference/Set-PackageSource.md +++ b/docs/reference/Set-PackageSource.md @@ -14,7 +14,7 @@ Sets package source configuration. ## SYNTAX -``` +```text Set-PackageSource [-Name] [-Location ] [-Provider ] [-Trusted] [-PassThru] [-WhatIf] [-Confirm] [] ``` @@ -151,7 +151,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -163,7 +167,8 @@ You can use the pipeline to send a string for the source name. ### AnyPackage.Provider.PackageSourceInfo -By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter to a return objects that represent a package source. +By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter +to a return objects that represent a package source. ## NOTES diff --git a/docs/reference/Uninstall-Package.md b/docs/reference/Uninstall-Package.md index c9fdf11..563666b 100644 --- a/docs/reference/Uninstall-Package.md +++ b/docs/reference/Uninstall-Package.md @@ -16,14 +16,14 @@ Uninstalls a package. ### Name (Default) -``` +```text Uninstall-Package [-Name] [[-Version] ] [-PassThru] [-Provider ] [-WhatIf] [-Confirm] [] ``` ### InputObject -``` +```text Uninstall-Package [-InputObject] [-PassThru] [-WhatIf] [-Confirm] [] ``` @@ -46,9 +46,10 @@ This command uninstalls the `PackageManagement` package. ### -InputObject -Specifies a PackageInfo object that represents the package to uninstall. -Enter a variable that contains the object, or type a command or expression that gets the object, such as a `Get-Package` command. -You can use the pipeline to send a package object to `Uninstall-Package`. +Specifies a PackageInfo object that represents the package to uninstall. Enter a +variable that contains the object, or type a command or expression that gets the +object, such as a `Get-Package` command. You can use the pipeline to send a +package object to `Uninstall-Package`. ```yaml Type: PackageInfo[] @@ -112,11 +113,14 @@ Accept wildcard characters: False ### -Version -Specifies the package version. -The format is NuGet version range syntax with minor changes. -In normal NuGet version range value of `1.0` would be minimum version inclusive but this parameter converts that value to be exact version of `[1.0]`. -If you need to have minimum version inclusive then use this format `[1.0,]`. -For more information refer to [NuGet version range syntax](https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges). +Specifies the package version. The format is NuGet version range syntax with +minor changes. In normal NuGet version range value of `1.0` would be minimum +version inclusive but this parameter converts that value to be exact version of +`[1.0]`. If you need to have minimum version inclusive then use this format +`[1.0,]`. For more information refer to +[NuGet version range syntax][nuget-syntax]. + +[nuget-syntax]: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Type: PackageVersionRange @@ -165,7 +169,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -177,7 +185,8 @@ You can pipe a package name, version range, and package info to this cmdlet. ### AnyPackage.Provider.PackageInfo -By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter to a return objects that represent a package. +By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter +to a return objects that represent a package. ## NOTES diff --git a/docs/reference/Unregister-PackageSource.md b/docs/reference/Unregister-PackageSource.md index f3bd5d3..7f3c742 100644 --- a/docs/reference/Unregister-PackageSource.md +++ b/docs/reference/Unregister-PackageSource.md @@ -14,7 +14,7 @@ Unregister a package source. ## SYNTAX -``` +```text Unregister-PackageSource [-Name] [-Provider ] [-PassThru] [-WhatIf] [-Confirm] [] ``` @@ -53,8 +53,9 @@ Accept wildcard characters: False ### -PassThru -Returns a PackageSourceInfo object that represents the source that was unregistered. -By default, `Unregister-PackageSource` doesn't generate any output. +Returns a PackageSourceInfo object that represents the source that was +unregistered. By default, `Unregister-PackageSource` doesn't generate any +output. ```yaml Type: SwitchParameter @@ -119,7 +120,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -131,7 +136,8 @@ You can use the pipeline to send a string for the source name. ### AnyPackage.Provider.PackageSourceInfo -By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter to a return objects that represent a package source. +By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter +to a return objects that represent a package source. ## NOTES diff --git a/docs/reference/Update-Package.md b/docs/reference/Update-Package.md index f21d630..eda8942 100644 --- a/docs/reference/Update-Package.md +++ b/docs/reference/Update-Package.md @@ -16,7 +16,7 @@ Updates a package. ### Name (Default) -``` +```text Update-Package [[-Name] ] [[-Version] ] [-Source ] [-Prerelease] [-PassThru] [-TrustSource] [-Provider ] [-WhatIf] [-Confirm] [] @@ -24,28 +24,28 @@ Update-Package [[-Name] ] [[-Version] ] [-Source ### InputObject -``` +```text Update-Package [-InputObject] [-PassThru] [-TrustSource] [-WhatIf] [-Confirm] [] ``` ### Path -``` +```text Update-Package -Path [-PassThru] [-Provider ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath -``` +```text Update-Package -LiteralPath [-PassThru] [-Provider ] [-WhatIf] [-Confirm] [] ``` ### Uri -``` +```text Update-Package -Uri [-PassThru] [-Provider ] [-WhatIf] [-Confirm] [] ``` @@ -68,9 +68,10 @@ This command updates `PowerShellGet` package. ### -InputObject -Specifies a PackageInfo object that represents the package to update. -Enter a variable that contains the object, or type a command or expression that gets the object, such as a `Get-Package` command. -You can use the pipeline to send a package object to `Update-Package`. +Specifies a PackageInfo object that represents the package to update. Enter a +variable that contains the object, or type a command or expression that gets the +object, such as a `Get-Package` command. You can use the pipeline to send a +package object to `Update-Package`. ```yaml Type: PackageInfo[] @@ -182,11 +183,14 @@ Accept wildcard characters: False ### -Version -Specifies the package version. -The format is NuGet version range syntax with minor changes. -In normal NuGet version range value of `1.0` would be minimum version inclusive but this parameter converts that value to be exact version of `[1.0]`. -If you need to have minimum version inclusive then use this format `[1.0,]`. -For more information refer to [NuGet version range syntax](https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges). +Specifies the package version. The format is NuGet version range syntax with +minor changes. In normal NuGet version range value of `1.0` would be minimum +version inclusive but this parameter converts that value to be exact version of +`[1.0]`. If you need to have minimum version inclusive then use this format +`[1.0,]`. For more information refer to +[NuGet version range syntax][nuget-syntax]. + +[nuget-syntax]: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges ```yaml Type: PackageVersionRange @@ -235,11 +239,11 @@ Accept wildcard characters: False ### -LiteralPath -Specifies a path to one or more locations. -The value of LiteralPath is used exactly as it's typed. -No characters are interpreted as wildcards. -If the path includes escape characters, enclose it in single quotation marks. -Single quotation marks tell PowerShell to not interpret any characters as escape sequences. +Specifies a path to one or more locations. The value of LiteralPath is used +exactly as it's typed. No characters are interpreted as wildcards. If the path +includes escape characters, enclose it in single quotation marks. Single +quotation marks tell PowerShell to not interpret any characters as escape +sequences. ```yaml Type: String[] @@ -288,7 +292,11 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, +-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, +-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. +For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -300,7 +308,8 @@ You can pipe a package name, version range, and package info to this cmdlet. ### AnyPackage.Provider.PackageInfo -By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter to a return objects that represent a package. +By default, this cmdlet doesn't return any objects. Use the `PassThru` parameter +to a return objects that represent a package. ## NOTES diff --git a/docs/reference/about_AnyPackage.md b/docs/reference/about_AnyPackage.md index cf4067d..7142e6b 100644 --- a/docs/reference/about_AnyPackage.md +++ b/docs/reference/about_AnyPackage.md @@ -15,17 +15,21 @@ Describes what the `AnyPackage` module is and how to use it. ## Long Description -`AnyPackage` is not a package management system in the traditional sense but rather a way to interact with multiple package management systems. -This lets users have a single set of commands to interact with any package management system instead of learning a unique set of commands. +`AnyPackage` is not a package management system in the traditional sense but +rather a way to interact with multiple package management systems. This lets +users have a single set of commands to interact with any package management +system instead of learning a unique set of commands. ## Package Providers -A package provider is the method used for `AnyPackage` to interface with a specific package management system. -For more information see [about_Package_Providers](about_Package_Providers.md). +A package provider is the method used for `AnyPackage` to interface with a +specific package management system. For more information see +[about_Package_Providers](about_Package_Providers.md). ## Creating Package Providers -To create your own package provider see [about_Creating_Package_Providers](about_Creating_Package_Providers.md). +To create your own package provider see +[about_Creating_Package_Providers](about_Creating_Package_Providers.md). ## Finding Package Providers @@ -34,14 +38,18 @@ These modules can be identified by having the `AnyPackage` and `Provider` tags. ## Importing Package Providers -To import a package provider you will need to import the PowerShell module containing the provider. For more information see [about_Package_Providers](about_Package_Providers.md#importing-a-package-provider). +To import a package provider you will need to import the PowerShell module +containing the provider. For more information see [about_Package_Providers]. ## Removing Package Providers -To remove a package provider you will need to remove the PowerShell module containing the provider. -For more information see [about_Package_Providers](about_Package_Providers.md#removing-a-package-provider). +To remove a package provider you will need to remove the PowerShell module +containing the provider. For more information see +[about_Package_Providers]. ## See Also -* [about_Package_Providers](about_Package_Providers.md) -* [about_Creating_Package_Providers](about_Creating_Package_Providers.md) +- [about_Package_Providers](about_Package_Providers.md) +- [about_Creating_Package_Providers](about_Creating_Package_Providers.md) + +[about_Package_Providers]: about_Package_Providers.md#importing-a-package-provider diff --git a/docs/reference/about_Creating_Package_Providers.md b/docs/reference/about_Creating_Package_Providers.md index 7c14c4f..dc77b74 100644 --- a/docs/reference/about_Creating_Package_Providers.md +++ b/docs/reference/about_Creating_Package_Providers.md @@ -15,14 +15,15 @@ Describes how to create a package provider. ## Long Description -A package provider is the way for module authors to extend the `AnyPackage` module. -Providers can be created in PowerShell or C#. -Package providers are implemented by defining a class that inherits from `PackageProvider` class and has the `PackageProvider` attribute. +A package provider is the way for module authors to extend the `AnyPackage` +module. Providers can be created in PowerShell or C#. Package providers are +implemented by defining a class that inherits from `PackageProvider` class and +has the `PackageProvider` attribute. ## Supporting List Available -In order to support `Get-PackageProvider -ListAvailable` the module needs to define shipped providers. -In the module manifest have the following key: +In order to support `Get-PackageProvider -ListAvailable` the module needs to +define shipped providers. In the module manifest have the following key: ```powershell @{ @@ -36,8 +37,8 @@ In the module manifest have the following key: ## PackageProvider Attribute -The `PackageProvider` attribute defines the package provider name. -Additional configuration may be added in the future to define optional features. +The `PackageProvider` attribute defines the package provider name. Additional +configuration may be added in the future to define optional features. ```powershell [PackageProvider("ProviderName")] @@ -45,41 +46,48 @@ Additional configuration may be added in the future to define optional features. ### PackageByName -The `PackageByName` optional property can be set to `$false` in order for the provider to indicate that finding/installing/updating packages by package name is not supported. -This is useful to set if the provider only supports either by `Path` or `Uri`. -The default value is `$true`. +The `PackageByName` optional property can be set to `$false` in order for the +provider to indicate that finding/installing/updating packages by package name +is not supported. This is useful to set if the provider only supports either by +`Path` or `Uri`. The default value is `$true`. ### FileExtensions -The `FileExtensions` optional property is used to indicate which file types are supported by the package provider when finding/installing/updating packages. -To use the value a string array is used including the proceeding dot. -For example in PowerShell it would be defined like: +The `FileExtensions` optional property is used to indicate which file types are +supported by the package provider when finding/installing/updating packages. To +use the value a string array is used including the proceeding dot. For example +in PowerShell it would be defined like: `[PackageProvider('Msi', FileExtensions = ('.msi', '.msp')]` ### UriSchemes -The `UriSchemes` optional property is used to indicate which Uri schemes are supported by the package provider when finding/installing/updating packages. -For example in PowerShell it would be defined like: +The `UriSchemes` optional property is used to indicate which Uri schemes are +supported by the package provider when finding/installing/updating packages. For +example in PowerShell it would be defined like: `[PackageProvider('MyProvider', UriSchemes = ('http', 'https')]` ## PackageProvider Class -The `PackageProvider` base class serves as the foundation for all package providers. +The `PackageProvider` base class serves as the foundation for all package +providers. ### Constructor -The package provider must have a public parameter-less constructor for `AnyPackage` to call. +The package provider must have a public parameter-less constructor for +`AnyPackage` to call. ### Initializing -`AnyPackage` creates a new instance of the `PackageProvider` each time a cmdlet is called. -This makes the package provider stateless. -If a package provider requires one-time initialization override the `Initialize` method. +`AnyPackage` creates a new instance of the `PackageProvider` each time a cmdlet +is called. This makes the package provider stateless. If a package provider +requires one-time initialization override the `Initialize` method. -If your provider needs to maintain state between instances then you can create a class that inherits from `PackageProviderInfo` to store state or user accessible information. -The derived `PackageProviderInfo` will be sent to each instance of the package provider. +If your provider needs to maintain state between instances then you can create a +class that inherits from `PackageProviderInfo` to store state or user accessible +information. The derived `PackageProviderInfo` will be sent to each instance of +the package provider. ```powershell [PackageProvider('Test')] @@ -96,7 +104,8 @@ class MyProviderInfo : PackageProviderInfo { ### Uninitializing -To perform one-time provider clean-up to free up any resources or connections override the `Clean` method. +To perform one-time provider clean-up to free up any resources or connections +override the `Clean` method. ```powershell [PackageProvider('Test')] @@ -109,11 +118,13 @@ class TestProvider : PackageProvider { ## Supported Sources -If the package provider supports finding/updating/installing/saving packages with a source override the `IsSource([string] $source)` method. -The default implementation is to always return `$true`. +If the package provider supports finding/updating/installing/saving packages +with a source override the `IsSource([string] $source)` method. The default +implementation is to always return `$true`. -In this example, the method defines `production` and `testing` as supported sources. -When an `AnyPackage` cmdlet is called it will call the `IsSource` method and validate the provider supports the source. +In this example, the method defines `production` and `testing` as supported +sources. When an `AnyPackage` cmdlet is called it will call the `IsSource` +method and validate the provider supports the source. ```powershell [bool] IsSource([string] $source) { @@ -123,14 +134,17 @@ When an `AnyPackage` cmdlet is called it will call the `IsSource` method and val ### Dynamic Parameters -To add provider specific parameters for a command override the `GetDynamicParameters` method. -The `$commandName` parameter will be one of the cmdlets such as `Get-Package`. -The method can return `$null`, a `[RuntimeDefinedParameterDictionary]` object or an object with properties that have `[Parameter()]` attribute. +To add provider specific parameters for a command override the +`GetDynamicParameters` method. The `$commandName` parameter will be one of the +cmdlets such as `Get-Package`. The method can return `$null`, a +`[RuntimeDefinedParameterDictionary]` object or an object with properties that +have `[Parameter()]` attribute. -Defining a class with properties is the easiest way to create dynamic parameters. -The syntax is very similar to the `param()` block in a PowerShell function. -There are few notable differences, one being that each property must have a `[Parameter()]` attribute in order for the PowerShell runtime to treat it as a parameter. -Secondly there is no comma after each parameter. +Defining a class with properties is the easiest way to create dynamic +parameters. The syntax is very similar to the `param()` block in a PowerShell +function. There are few notable differences, one being that each property must +have a `[Parameter()]` attribute in order for the PowerShell runtime to treat it +as a parameter. Secondly there is no comma after each parameter. ```powershell [PackageProvider('Test')] @@ -155,8 +169,10 @@ class GetPackageDynamicParameters { ### Supporting Operations -The package provider indicates support for each individual `AnyPackage` cmdlet by adding a corresponding interface. -For example, if the package provider supports `Get-Package` cmdlet then the `IGetPackage` interface would be implemented. +The package provider indicates support for each individual `AnyPackage` cmdlet +by adding a corresponding interface. For example, if the package provider +supports `Get-Package` cmdlet then the `IGetPackage` interface would be +implemented. | Cmdlet | Interface | | ------ | --------- | @@ -172,8 +188,9 @@ For example, if the package provider supports `Get-Package` cmdlet then the `IGe | Register-PackageSource | ISetSource | | Unregister-PackageSource | ISetSource | -If a `Package` method was successful `WritePackage` must be called with the package details. -In the event a package is not found by the provider do not throw an exception as `AnyPackage` will write an error. +If a `Package` method was successful `WritePackage` must be called with the +package details. In the event a package is not found by the provider do not +throw an exception as `AnyPackage` will write an error. The package interfaces follow the structure as follows. @@ -184,8 +201,9 @@ class TestProvider : PackageProvider, IGetPackage { } ``` -If a `Source` method was successful `WriteSource` must be called with the source details. -In the event a source is not found by the provider do not throw an exception as `AnyPackage` will write an error. +If a `Source` method was successful `WriteSource` must be called with the source +details. In the event a source is not found by the provider do not throw an +exception as `AnyPackage` will write an error. The package source interfaces follow the structure as follows. @@ -196,7 +214,8 @@ class TestProvider : PackageProvider, IGetSource { } ``` -The `ISetSource` interface is different as it requires three methods compared to the rest. +The `ISetSource` interface is different as it requires three methods compared to +the rest. ```powershell [PackageProvider('Test')] @@ -211,7 +230,8 @@ class TestProvider : PackageProvider, ISetSource { ### Package Request -The `[PackageRequest]` type contains information about the request and methods to interact with `AnyPackage`. +The `[PackageRequest]` type contains information about the request and methods +to interact with `AnyPackage`. ```powershell class PackageRequest { @@ -238,7 +258,8 @@ class PackageRequest { ### Source Request -The `[SourceRequest]` type contains information about the request and methods to interact with `AnyPackage`. +The `[SourceRequest]` type contains information about the request and methods to +interact with `AnyPackage`. ```powershell class SourceRequest { @@ -256,16 +277,18 @@ class SourceRequest { ## Register a Package Provider -To register a package provider with `AnyPackage` the following method must be called from within your module. -In this example the `[TestProvider]` is the type that implements the package provider and `e5491948-72b3-4f00-aa64-f93060d9b242` is -the provider's unique ID.. +To register a package provider with `AnyPackage` the following method must be +called from within your module. In this example the `[TestProvider]` is the type +that implements the package provider and `e5491948-72b3-4f00-aa64-f93060d9b242` +is the provider's unique ID.. ```powershell [guid] $id = 'e5491948-72b3-4f00-aa64-f93060d9b242' [PackageProviderManager]::RegisterProvider($id, [TestProvider], $MyInvocation.MyCommand.ScriptBlock.Module) ``` -If you are unable to pass the `PSModuleInfo` then the module name can be passed instead. +If you are unable to pass the `PSModuleInfo` then the module name can be passed +instead. ```powershell [guid] $id = 'e5491948-72b3-4f00-aa64-f93060d9b242' @@ -274,11 +297,12 @@ If you are unable to pass the `PSModuleInfo` then the module name can be passed ## Unregister a Package Provider -To remove a package provider on when the provider module is removed set the `OnRemove` -property for the module calling the `[PackageProviderManager]::UnregisterProvider([Guid] $id)` method. +To remove a package provider on when the provider module is removed set the +`OnRemove` property for the module calling the +`[PackageProviderManager]::UnregisterProvider([Guid] $id)` method. -In the example the following example, the `e5491948-72b3-4f00-aa64-f93060d9b242` is -the provider's unique ID. +In the example the following example, the `e5491948-72b3-4f00-aa64-f93060d9b242` +is the provider's unique ID. ```powershell $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = { @@ -288,11 +312,14 @@ $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = { ## Packages without a Version -If your package provider supports packages without a version special consideration needs to take place. -The user may specify all versions to be returned and in that case packages with a `null` version should also be returned. +If your package provider supports packages without a version special +consideration needs to take place. The user may specify all versions to be +returned and in that case packages with a `null` version should also be +returned. -In this example the `$request.IsMatch($name)` method is used to filter package names. -Then an additional check is used if the `$request.Version` is `null` or is a `*` all version wildcard. +In this example the `$request.IsMatch($name)` method is used to filter package +names. Then an additional check is used if the `$request.Version` is `null` or +is a `*` all version wildcard. ```powershell if ($request.IsMatch($name) -and ($null -eq $request.Version -or $request.Version -eq '*') { @@ -323,9 +350,10 @@ $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = { ## Documenting -The package provider should come with an about topic to describe the provider any capabilities it has and any dynamic parameters. +The package provider should come with an about topic to describe the provider +any capabilities it has and any dynamic parameters. ## See Also -* [about_Package_Providers](about_Package_Providers.md) -* [about_AnyPackage](about_AnyPackage.md) +- [about_Package_Providers](about_Package_Providers.md) +- [about_AnyPackage](about_AnyPackage.md) diff --git a/docs/reference/about_Package_Providers.md b/docs/reference/about_Package_Providers.md index 41a2833..824d479 100644 --- a/docs/reference/about_Package_Providers.md +++ b/docs/reference/about_Package_Providers.md @@ -15,16 +15,17 @@ Describes what a `AnyPackage` package provider is and how to use it. ## Long Description -A package provider is used to extend `AnyPackage` module. -This article contains information with interacting with package providers. +A package provider is used to extend `AnyPackage` module. This article contains +information with interacting with package providers. ## Importing a Package Provider Importing the `AnyPackage` module will not automatically load package providers. -The user is responsible for which providers are available. -To import a package provider run `Import-Module` with the module containing the provider. +The user is responsible for which providers are available. To import a package +provider run `Import-Module` with the module containing the provider. -> NOTE! Once a package provider is imported trying to load a different version requires PowerShell to be restarted. +> NOTE! Once a package provider is imported trying to load a different version +> requires PowerShell to be restarted. This is due to how .NET does not reload types. ## Removing a Package Provider @@ -34,21 +35,25 @@ To confirm package provider has been removed run `Get-PackageProvider`. ## Provider Specific Parameters -Package providers can provide additional parameters in the context of provider and operation being performed. -For example, the `PowerShellGet` provider adds the `Tag` parameter to `Find-Package`. +Package providers can provide additional parameters in the context of provider +and operation being performed. For example, the `PowerShellGet` provider adds +the `Tag` parameter to `Find-Package`. -Provider specific parameters are only available when the `-Provider` parameter is used. In the `PowerShellGet` example the command would be `Find-Package -Provider PowerShellGet -Tag DSC`. +Provider specific parameters are only available when the `-Provider` parameter +is used. In the `PowerShellGet` example the command would be +`Find-Package -Provider PowerShellGet -Tag DSC`. -The PowerShell engine has some limitations at this time on how discoverable dynamic parameters are. -To make this as easy as possible use the following recommendations: +The PowerShell engine has some limitations at this time on how discoverable +dynamic parameters are. To make this as easy as possible use the following +recommendations: -* `Provider` parameter should be before any provider specific parameters. -* Use `PSReadLine` menu complete (CTRL+SPACE) or tab completion. +- `Provider` parameter should be before any provider specific parameters. +- Use `PSReadLine` menu complete (CTRL+SPACE) or tab completion. Here is an example of using `PSReadLine` menu complete and provider parameters. -The first command is using menu complete without any parameters. -Take note of how `Tag` is not present. -Type `Find-Package -` followed by CTRL+SPACE to bring up menu complete. +The first command is using menu complete without any parameters. Take note of +how `Tag` is not present. Type `Find-Package -` followed by CTRL+SPACE to bring +up menu complete. ```powershell Find-Package - @@ -58,8 +63,9 @@ Source Debug ErrorVariable OutBuffer Prerelease ErrorAction WarningVariable PipelineVariable ``` -Now we will add `-Provider PowerShellGet` to add the provider parameters. -Take note of how `Tag` is now available to use and the tooltip at the bottom gives the parameter type. +Now we will add `-Provider PowerShellGet` to add the provider parameters. Take +note of how `Tag` is now available to use and the tooltip at the bottom gives +the parameter type. ```powershell Find-Package -Provider PowerShellGet -Tag @@ -73,20 +79,25 @@ Prerelease Debug ErrorVariable OutBuffer ## Provider Priority -A priority system is used to allow only a single provider to perform an action on a package name even if that package exists in multiple providers. -The commands that use the priority system are: +A priority system is used to allow only a single provider to perform an action +on a package name even if that package exists in multiple providers. The +commands that use the priority system are: -* Install-Package -* Save-Package -* Uninstall-Package +- Install-Package +- Save-Package +- Uninstall-Package -For example, lets say a user tries to install a package `Microsoft.PowerShell.Security`. This package exists in the `PowerShellGet` and `NuGet` provider. -If the user were run `Install-Package -Name Microsoft.PowerShell.Security` which provider would take priority? To answer that question lets describe how the priority systems works. +For example, lets say a user tries to install a package +`Microsoft.PowerShell.Security`. This package exists in the `PowerShellGet` and +`NuGet` provider. If the user were run +`Install-Package -Name Microsoft.PowerShell.Security` which provider would take +priority? To answer that question lets describe how the priority systems works. -The priority scale is from `0-255` with a default value of `100`. -A lower number is higher priority. -If multiple providers have the same priority value then the provider's `FullName` will be used. -The provider `FullName` is the module and provider name in this format: `Module\Provider` for example, `PowerShellGet` provider would be `AnyPackage.Provider.PowerShellGet\PowerShellGet`. +The priority scale is from `0-255` with a default value of `100`. A lower number +is higher priority. If multiple providers have the same priority value then the +provider's `FullName` will be used. The provider `FullName` is the module and +provider name in this format: `Module\Provider` for example, `PowerShellGet` +provider would be `AnyPackage.Provider.PowerShellGet\PowerShellGet`. To view a provider's priority use the `Get-PackageProvider` command. @@ -99,8 +110,9 @@ NuGet 100 Find, Get, Publish, Install, Save, Uninstall, Upda PowerShellGet 100 Find, Get, Publish, Install, Save, Uninstall, Update, GetSource, SetSource ``` -To change a provider's priority first get the provider with `Get-PackageProvider` and save it to a variable. -Then set the `Priority` property with the new priority. +To change a provider's priority first get the provider with +`Get-PackageProvider` and save it to a variable. Then set the `Priority` +property with the new priority. ```powershell $provider = Get-PackageProvider -Name PowerShellGet @@ -114,5 +126,5 @@ PowerShellGet 50 Find, Get, Publish, Install, Save, Uninstall, Upda ## See Also -* [about_Creating_Package_Providers](about_Creating_Package_Providers.md) -* [about_AnyPackage](about_AnyPackage.md) +- [about_Creating_Package_Providers](about_Creating_Package_Providers.md) +- [about_AnyPackage](about_AnyPackage.md) diff --git a/docs/security/security.md b/docs/security/security.md index 08ad56a..354d95a 100644 --- a/docs/security/security.md +++ b/docs/security/security.md @@ -5,29 +5,37 @@ permalink: docs/security # Security -AnyPackage is an extensible package management interface. -Logic in the package provider is usually limited to structuring calls to the package manager. -This presents some security considerations as package provider, package manager, and packages must be trusted by the user. +AnyPackage is an extensible package management interface. Logic in the package +provider is usually limited to structuring calls to the package manager. This +presents some security considerations as package provider, package manager, and +packages must be trusted by the user. ## Definitions -* AnyPackage - PowerShell module and API for user interaction with package providers. -* Package Provider - An implementation of the AnyPackage API shipped in a PowerShell module. -* Package Manager - The package lifecycle logic for example: WinGet, Chocolatey, Scoop, APT, DNF, etc. +- AnyPackage - PowerShell module and API for user interaction with package + providers. +- Package Provider - An implementation of the AnyPackage API shipped in a + PowerShell module. +- Package Manager - The package lifecycle logic for example: WinGet, Chocolatey, + Scoop, APT, DNF, etc. ## Package Providers Only import trusted package providers. -AnyPackage project package providers are signed. -Third party created package providers may not be signed. -PowerShell [execution policies](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies) provide controls to prohibit unsigned modules from being imported. +AnyPackage project package providers are signed. Third party created package +providers may not be signed. PowerShell [execution policies] provide controls to +prohibit unsigned modules from being imported. + +[execution policies]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies ## Packages Only install packages from trusted sources. -AnyPackage itself does not perform any validation checks on packages returned by the package provider. -AnyPackage relies on the package manager to perform those checks. -Refer to each package manager documentation for policies on package validation. -An example is the [Chocolatey community repository](https://docs.chocolatey.org/en-us/information/security/#security-for-the-community-package-repository). +AnyPackage itself does not perform any validation checks on packages returned by +the package provider. AnyPackage relies on the package manager to perform those +checks. Refer to each package manager documentation for policies on package +validation. An example is the [Chocolatey community repository]. + +[Chocolatey community repository]: https://docs.chocolatey.org/en-us/information/security/#security-for-the-community-package-repository diff --git a/index.md b/index.md index f5f434b..8d0ff5e 100644 --- a/index.md +++ b/index.md @@ -4,12 +4,13 @@ nav_order: 1 # Home -AnyPackage is a cross-platform PowerShell extensible unified package management interface. -Learn one set of commands and manage any package manager. -No longer will users have to learn a package manager's unique syntax. +AnyPackage is a cross-platform PowerShell extensible unified package management +interface. Learn one set of commands and manage any package manager. No longer +will users have to learn a package manager's unique syntax. -Package providers are the bridge between AnyPackage and the package manager. -See the [provider catalog](/docs/provider-catalog/provider-catalog.md) for the list of package providers. +Package providers are the bridge between AnyPackage and the package manager. See +the [provider catalog](/docs/provider-catalog/provider-catalog.md) for the list +of package providers. For lack of a better word AnyPackage is a meta package manager.