Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CHANGELOG/preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
- Update `-ModulePrefix` to be a static parameter (#1868)
- Bug fix for populating all `#Requires` fields in `Update-PSScriptFileInfo` (#1863)
- Bug fix for populating `Includes` metadata for packages from container registry repositories (#1861)
- Bug fix for `Find-PSRessource` and `Install-PSResource` not retrieving unlisted package versions (#1859)
- Bug fix for `Find-PSResource` and `Install-PSResource` not retrieving unlisted package versions (#1859)


## [1.2.0-preview2](https://github.com/PowerShell/PSResourceGet/compare/v1.2.0-preview1..v1.2.0-preview2) - 2025-07-21

### New Features
- Ingetration of the Azure Artifacts Credential Provider for ADO feeds (#1765)
- Integration of the Azure Artifacts Credential Provider for ADO feeds (#1765)

### Bug Fix
- Bug fixes for NuGet v3 dependencies (#1841 Thanks @o-l-a-v!)
Expand Down Expand Up @@ -46,7 +46,7 @@

- Update to use OCI v2 APIs for Container Registry (#1737)
- Bug fixes for finding and installing from local repositories on Linux machines (#1738)
- Bug fix for finding package name with 4 part version from local repositories (#1739)
- Bug fix for finding package name with 4 part version from local repositories (#1739)

# Preview Changelog

Expand Down Expand Up @@ -77,7 +77,7 @@

### Bug Fixes

- Add prerelease string when NormalizedVersion doesn't exist, but prelease string does (#1681 Thanks @sean-r-williams)
- Add prerelease string when NormalizedVersion doesn't exist, but prerelease string does (#1681 Thanks @sean-r-williams)
- Add retry logic when deleting files (#1667 Thanks @o-l-a-v!)
- Fix broken PAT token use (#1672)
- Updated error messaging for authenticode signature failures (#1701)
Expand All @@ -92,4 +92,4 @@

- Fix incorrect request URL when installing resources from ADO (#1597 Thanks @anytonyoni!)
- Fix for swallowed exceptions (#1569)
- Fix for PSResourceGet not working in Constrained Languange Mode (#1564)
- Fix for PSResourceGet not working in Constrained Language Mode (#1564)
250 changes: 125 additions & 125 deletions Examples/FindRepositorySearchingExamples.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion buildtools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Copyright = '(c) Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = "Build utilties."
Description = "Build utilities."

# Modules that must be imported into the global environment prior to importing this module
#RequiredModules = @(
Expand Down
16 changes: 8 additions & 8 deletions src/Microsoft.PowerShell.PSResourceGet.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@
- Update `-ModulePrefix` to be a static parameter (#1868)
- Bug fix for populating all `#Requires` fields in `Update-PSScriptFileInfo` (#1863)
- Bug fix for populating `Includes` metadata for packages from container registry repositories (#1861)
- Bug fix for `Find-PSRessource` and `Install-PSResource` not retrieving unlisted package versions (#1859)
- Bug fix for `Find-PSResource` and `Install-PSResource` not retrieving unlisted package versions (#1859)

## 1.2.0-preview2

### New Features
- Ingetration of the Azure Artifacts Credential Provider for ADO feeds (#1765)
- Integration of the Azure Artifacts Credential Provider for ADO feeds (#1765)

### Bug Fix
- Bug fixes for NuGet v3 dependencies (#1841 Thanks @o-l-a-v!)
Expand Down Expand Up @@ -124,7 +124,7 @@

- Update to use OCI v2 APIs for Container Registry (#1737)
- Bug fixes for finding and installing from local repositories on Linux machines (#1738)
- Bug fix for finding package name with 4 part version from local repositories (#1739)
- Bug fix for finding package name with 4 part version from local repositories (#1739)

## 1.1.0-RC1

Expand All @@ -136,7 +136,7 @@

- Fix packaging name matching when searching in local repositories (#1731)
- `Compress-PSResource` `-PassThru` now passes `FileInfo` instead of string (#1720)
- Fix for `Compress-PSResource` not properly compressing scripts (#1719)
- Fix for `Compress-PSResource` not properly compressing scripts (#1719)
- Add `AcceptLicense` to Save-PSResource (#1718 Thanks @o-l-a-v!)
- Better support for NuGet v2 feeds (#1713 Thanks @o-l-a-v!)
- Better handling of `-WhatIf` support in `Install-PSResource` (#1531 Thanks @o-l-a-v!)
Expand All @@ -153,7 +153,7 @@

### Bug Fixes

- Add prerelease string when NormalizedVersion doesn't exist, but prelease string does (#1681 Thanks @sean-r-williams)
- Add prerelease string when NormalizedVersion doesn't exist, but prerelease string does (#1681 Thanks @sean-r-williams)
- Add retry logic when deleting files (#1667 Thanks @o-l-a-v!)
- Fix broken PAT token use (#1672)
- Updated error messaging for authenticode signature failures (#1701)
Expand All @@ -162,14 +162,14 @@

### New Features

- Support for Azure Container Registries (#1495, #1497-#1499, #1501, #1502, #1505, #1522, #1545, #1548, #1550, #1554, #1560, #1567,
- Support for Azure Container Registries (#1495, #1497-#1499, #1501, #1502, #1505, #1522, #1545, #1548, #1550, #1554, #1560, #1567,
#1573, #1576, #1587, #1588, #1589, #1594, #1598, #1600, #1602, #1604, #1615)

### Bug Fixes

- Fix incorrect request URL when installing resources from ADO (#1597 Thanks @anytonyoni!)
- Fix for swallowed exceptions (#1569)
- Fix for PSResourceGet not working in Constrained Languange Mode (#1564)
- Fix for PSResourceGet not working in Constrained Language Mode (#1564)

## 1.0.6

Expand Down Expand Up @@ -243,7 +243,7 @@
- Bug fix Artifactory v2 endpoint failures (#1428)
- Bug fix Artifactory v3 endpoint failures (#1427)
- Bug fix `-RequiredResource` silent failures (#1426)
- Bug fix for v2 repository returning extra packages for `-Tag` based search with `-Prerelease` (#1405)
- Bug fix for v2 repository returning extra packages for `-Tag` based search with `-Prerelease` (#1405)

See change log (CHANGELOG) at https://github.com/PowerShell/PSResourceGet
'@
Expand Down
2 changes: 1 addition & 1 deletion src/code/CompressPSResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public sealed class CompressPSResource : PSCmdlet

protected override void BeginProcessing()
{
// Create a respository store (the PSResourceRepository.xml file) if it does not already exist
// Create a repository store (the PSResourceRepository.xml file) if it does not already exist
// This is to create a better experience for those who have just installed v3 and want to get up and running quickly
RepositorySettings.CheckRepositoryStore();

Expand Down
2 changes: 1 addition & 1 deletion src/code/ContainerRegistryResponseUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public ContainerRegistryResponseUtil(PSRepositoryInfo repository) : base(reposit

#endregion

#region Overriden Methods
#region Overridden Methods

public override IEnumerable<PSResourceResult> ConvertToPSResourceResult(FindResults responseResults, bool isResourceRequestedWithWildcard = false)
{
Expand Down
32 changes: 16 additions & 16 deletions src/code/ContainerRegistryServerAPICalls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public ContainerRegistryServerAPICalls(PSRepositoryInfo repository, PSCmdlet cmd

#endregion

#region Overriden Methods
#region Overridden Methods

/// <summary>
/// Find method which allows for searching for all packages from a repository and returns latest version for each.
Expand Down Expand Up @@ -126,7 +126,7 @@ public override FindResults FindCommandOrDscResource(string[] tags, bool include
/// Find method which allows for searching for single name and returns latest version.
/// Name: no wildcard support
/// Examples: Search "PowerShellGet"
/// Implementation Note: Need to filter further for latest version (prerelease or non-prerelease dependening on user preference)
/// Implementation Note: Need to filter further for latest version (prerelease or non-prerelease depending on user preference)
/// </summary>
public override FindResults FindName(string packageName, bool includePrerelease, ResourceType type, out ErrorRecord errRecord)
{
Expand Down Expand Up @@ -451,12 +451,12 @@ internal string GetContainerRegistryAccessToken(bool needCatalogAccess, out Erro
/// <summary>
/// Checks if container registry repository is unauthenticated.
/// </summary>
internal bool IsContainerRegistryUnauthenticated(string containerRegistyUrl, bool needCatalogAccess, out ErrorRecord errRecord, out string anonymousAccessToken)
internal bool IsContainerRegistryUnauthenticated(string containerRegistryUrl, bool needCatalogAccess, out ErrorRecord errRecord, out string anonymousAccessToken)
{
_cmdletPassedIn.WriteDebug("In ContainerRegistryServerAPICalls::IsContainerRegistryUnauthenticated()");
errRecord = null;
anonymousAccessToken = string.Empty;
string endpoint = $"{containerRegistyUrl}/v2/";
string endpoint = $"{containerRegistryUrl}/v2/";
HttpResponseMessage response;
try
{
Expand Down Expand Up @@ -497,7 +497,7 @@ internal bool IsContainerRegistryUnauthenticated(string containerRegistyUrl, boo

_cmdletPassedIn.WriteDebug($"Getting anonymous access token from the realm: {url}");

// we dont check the errorrecord here because we want to return false if we get a 401 and not throw an error
// we don't check the error record here because we want to return false if we get a 401 and not throw an error
_cmdletPassedIn.WriteDebug($"Getting anonymous access token from the realm: {url}");
ErrorRecord errRecordTemp = null;

Expand Down Expand Up @@ -644,7 +644,7 @@ internal JObject GetContainerRegistryRepositoryManifest(string packageName, stri
}

/// <summary>
/// Get the blob for the package (ie repository in container registry terms) from the repositroy (ie registry in container registry terms)
/// Get the blob for the package (ie repository in container registry terms) from the repository (ie registry in container registry terms)
/// Used when installing the package
/// </summary>
internal async Task<HttpContent> GetContainerRegistryBlobAsync(string packageName, string digest, string containerRegistryAccessToken)
Expand Down Expand Up @@ -916,7 +916,7 @@ internal async Task<HttpResponseMessage> UploadManifest(string packageName, stri
}
catch (HttpRequestException e)
{
throw new HttpRequestException("Error occured while trying to create manifest: " + e.Message);
throw new HttpRequestException("Error occurred while trying to create manifest: " + e.Message);
}
}

Expand All @@ -931,7 +931,7 @@ internal async Task<HttpContent> GetHttpContentResponseJObject(string url, Colle
}
catch (HttpRequestException e)
{
throw new HttpRequestException("Error occured while trying to retrieve response: " + e.Message);
throw new HttpRequestException("Error occurred while trying to retrieve response: " + e.Message);
}
}

Expand Down Expand Up @@ -1074,7 +1074,7 @@ internal async Task<HttpResponseHeaders> GetHttpResponseHeader(string url, HttpM
}
catch (HttpRequestException e)
{
throw new HttpRequestException("Error occured while trying to retrieve response header: " + e.Message);
throw new HttpRequestException("Error occurred while trying to retrieve response header: " + e.Message);
}
}

Expand Down Expand Up @@ -1117,7 +1117,7 @@ private async Task<HttpContent> SendContentRequestAsync(HttpRequestMessage messa
}
catch (Exception e)
{
throw new SendRequestException($"Error occured while sending request to Container Registry server for content with: {e.GetType()} '{e.Message}'", e);
throw new SendRequestException($"Error occurred while sending request to Container Registry server for content with: {e.GetType()} '{e.Message}'", e);
}
}

Expand All @@ -1133,7 +1133,7 @@ private async Task<JObject> SendRequestAsync(HttpRequestMessage message)
}
catch (Exception e)
{
throw new SendRequestException($"Error occured while sending request to Container Registry server with: {e.GetType()} '{e.Message}'", e);
throw new SendRequestException($"Error occurred while sending request to Container Registry server with: {e.GetType()} '{e.Message}'", e);
}

switch (response.StatusCode)
Expand Down Expand Up @@ -1233,7 +1233,7 @@ private async Task<HttpResponseHeaders> SendRequestHeaderAsync(HttpRequestMessag
}
catch (HttpRequestException e)
{
throw new HttpRequestException("Error occured while trying to retrieve response: " + e.Message);
throw new HttpRequestException("Error occurred while trying to retrieve response: " + e.Message);
}
}

Expand Down Expand Up @@ -1264,7 +1264,7 @@ private async Task<HttpResponseMessage> PutRequestAsync(string url, string fileP
}
catch (Exception e)
{
throw new SendRequestException($"Error occured while uploading module to ContainerRegistry: {e.GetType()} '{e.Message}'", e);
throw new SendRequestException($"Error occurred while uploading module to ContainerRegistry: {e.GetType()} '{e.Message}'", e);
}
}

Expand Down Expand Up @@ -1552,7 +1552,7 @@ private bool TryCreateAndUploadManifest(string fullNupkgFile,
catch (Exception e)
{
errRecord = new ErrorRecord(
new UploadBlobException($"Error occured while uploading package manifest to ContainerRegistry: {e.GetType()} '{e.Message}'", e),
new UploadBlobException($"Error occurred while uploading package manifest to ContainerRegistry: {e.GetType()} '{e.Message}'", e),
"PackageManifestUploadError",
ErrorCategory.InvalidResult,
_cmdletPassedIn);
Expand Down Expand Up @@ -1741,7 +1741,7 @@ internal async Task<string> GetStartUploadBlobLocation(string packageName, strin
}
catch (Exception e)
{
throw new UploadBlobException($"Error occured while starting to upload the blob location used for publishing to ContainerRegistry: {e.GetType()} '{e.Message}'", e);
throw new UploadBlobException($"Error occurred while starting to upload the blob location used for publishing to ContainerRegistry: {e.GetType()} '{e.Message}'", e);
}
}

Expand All @@ -1759,7 +1759,7 @@ internal async Task<HttpResponseMessage> EndUploadBlob(string location, string f
}
catch (Exception e)
{
throw new UploadBlobException($"Error occured while uploading module to ContainerRegistry: {e.GetType()} '{e.Message}'", e);
throw new UploadBlobException($"Error occurred while uploading module to ContainerRegistry: {e.GetType()} '{e.Message}'", e);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/code/CredentialProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ private static string VSCredentialProviderFile(string visualStudioPath, string c

internal static PSCredential GetCredentialsFromProvider(Uri uri, PSCmdlet cmdletPassedIn)
{
cmdletPassedIn.WriteVerbose("Enterting CredentialProvider::GetCredentialsFromProvider");
cmdletPassedIn.WriteVerbose("Entering CredentialProvider::GetCredentialsFromProvider");
string credProviderPath = string.Empty;

// Find credential provider
// Option 1. Use env var 'NUGET_PLUGIN_PATHS' to find credential provider.
// See: https://docs.microsoft.com/en-us/nuget/reference/extensibility/nuget-cross-platform-plugins#plugin-installation-and-discovery
Expand Down Expand Up @@ -161,7 +161,7 @@ internal static PSCredential GetCredentialsFromProvider(Uri uri, PSCmdlet cmdlet
{
FileInfo fileInfo = new FileInfo(credProviderPath);
if (!Utils.TryGetCaseInsensitiveFilePath(fileInfo.Directory.FullName, _credProviderDll, out credProviderPath))
{
{
cmdletPassedIn.WriteError(new ErrorRecord(
new FileNotFoundException($"Path found '{credProviderPath}' is not a valid Azure Artifact Credential Provider executable. See https://github.com/NuGet/Home/wiki/NuGet-cross-plat-authentication-plugin#plugin-installation-and-discovery to set up the Credential Provider."),
"CredentialProviderFileNotFound",
Expand Down
4 changes: 2 additions & 2 deletions src/code/GetHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ public IEnumerable<String> FilterPkgPathsByVersion(VersionRange versionRange, Li
_cmdletPassedIn.WriteDebug($"Package version parsed as NuGet version: '{pkgNugetVersion}'");

// For Uninstall-PSResource Prerelease parameter equates to selecting prerelease versions only to uninstall.
// For other cmdlets (Find-PSResource, Install-PSResource) Prerelease parmater equates to selecting stable and prerelease versions.
// We will not just select prerelase versions. For Get-InstalledPSResource, there is no Prerelease parameter.
// For other cmdlets (Find-PSResource, Install-PSResource) Prerelease parameter equates to selecting stable and prerelease versions.
// We will not just select prerelease versions. For Get-InstalledPSResource, there is no Prerelease parameter.
if (versionRange.Satisfies(pkgNugetVersion))
{
if (!selectPrereleaseOnly || pkgNugetVersion.IsPrerelease)
Expand Down
4 changes: 2 additions & 2 deletions src/code/GetInstalledPSResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected override void BeginProcessing()
// an exact version will be formatted into a version range.
if (Version == null)
{
WriteDebug("Searcing for all versions");
WriteDebug("Searching for all versions");
_versionRange = VersionRange.All;
}
else if (!Utils.TryParseVersionOrVersionRange(Version, out _versionRange))
Expand Down Expand Up @@ -153,7 +153,7 @@ protected override void ProcessRecord()
List<string> pkgsNotFound = new List<string>();
foreach (string name in namesToSearch)
{
if (!pkgsFound.Contains(name, StringComparer.OrdinalIgnoreCase))
if (!pkgsFound.Contains(name, StringComparer.OrdinalIgnoreCase))
{
if (name.Contains('*'))
{
Expand Down
6 changes: 3 additions & 3 deletions src/code/InstallHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ private bool TryDeleteDirectory(
}

/// <summary>
/// Moves file from the temp install path to desination path for install.
/// Moves file from the temp install path to destination path for install.
/// </summary>
private void MoveFilesIntoInstallPath(
PSResourceInfo pkgInfo,
Expand Down Expand Up @@ -1204,7 +1204,7 @@ private bool TryExtractToDirectory(string zipPath, string extractPath, out Error
catch (Exception e)
{
error = new ErrorRecord(
new Exception($"Error occured while extracting .nupkg: '{e.Message}'"),
new Exception($"Error occurred while extracting .nupkg: '{e.Message}'"),
"ErrorExtractingNupkg",
ErrorCategory.OperationStopped,
_cmdletPassedIn);
Expand Down Expand Up @@ -1313,7 +1313,7 @@ private bool CallAcceptLicense(PSResourceInfo p, string moduleManifest, string t
}
}

// Licesnse agreement processing
// License agreement processing
if (requireLicenseAcceptance)
{
// If module requires license acceptance and -AcceptLicense is not passed in, display prompt
Expand Down
2 changes: 1 addition & 1 deletion src/code/InstallPSResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ protected override void ProcessRecord()
break;

case ResourceFileType.UnknownFile:
throw new PSInvalidOperationException("Unkown file type. Required resource file must be either a json or psd1 data file.");
throw new PSInvalidOperationException("Unknown file type. Required resource file must be either a json or psd1 data file.");
}
}
catch (Exception)
Expand Down
Loading