Skip to content

Commit

Permalink
Merge pull request #13 from techthoughts2/Enhancements
Browse files Browse the repository at this point in the history
Enhancements
  • Loading branch information
techthoughts2 authored Apr 9, 2023
2 parents 3a5f83b + 7e5bb52 commit ea3c34d
Show file tree
Hide file tree
Showing 28 changed files with 1,394 additions and 650 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"pwsh",
"ratelimit",
"Ryver",
"Sightview",
"Stroustrup"
]
}
Expand Down
5 changes: 5 additions & 0 deletions CloudFormation/PSGalleryExplorer/ChildTemplates/PSGESSM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ Resources:
- 'aws s3 cp "C:\${ServiceName}\FinalZip\${ServiceName}.zip" "s3://${bucketName}"'
- bucketName:
'Fn::ImportValue': PubXMLDataBN
- !Sub $nowEpoch = Get-Date -UFormat %s; $metadata = @{ 'zipCreated' = $nowEpoch }; $metadataFilePath = 'C:\${ServiceName}\FinalZip\${ServiceName}.json'; $metadata | ConvertTo-Json -Depth 10 | Out-File -FilePath $metadataFilePath -Force
- !Sub
- 'aws s3 cp "C:\${ServiceName}\FinalZip\${ServiceName}.json" "s3://${bucketName}"'
- bucketName:
'Fn::ImportValue': PubXMLDataBN
workingDirectory:
- ""
ServiceRoleArn: !GetAtt PSGESSMMaintenanceWindowTaskCommandRole.Arn
Expand Down
4 changes: 2 additions & 2 deletions actions_bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{
# https://github.com/nightroman/Invoke-Build
$null = $modulesToInstall.Add(([PSCustomObject]@{
ModuleName = 'InvokeBuild'
ModuleVersion = '5.10.2'
ModuleVersion = '5.10.3'
}))
# https://github.com/PowerShell/PSScriptAnalyzer
$null = $modulesToInstall.Add(([PSCustomObject]@{
Expand All @@ -31,7 +31,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{
}))
$null = $modulesToInstall.Add(([PSCustomObject]@{
ModuleName = 'Convert'
ModuleVersion = '1.2.0'
ModuleVersion = '1.5.0'
}))

'Installing PowerShell Modules'
Expand Down
19 changes: 19 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.5.0]

- Module Updates
- Added support for usage of a metadata file to better determine if data is current
- Added `Confirm-MetadataUpdate` private function
- Updated logic in `Confirm-XMLDataSet` and `Invoke-XMLDataCheck`
- Removed private function `Get-XMLDataSet` for new private function `Get-RemoteFile`
- Convert `1.5.0` or higher now required
- Added the `InsightView` parameter to both `Find-ModuleByCommand` and `Find-PSGModule`
- This provides a new results view that focuses on community insights
- Build Updates
- SSM Task now generates metadata file
- InvokeBuild bumped from `5.10.2` to `5.10.3`
- Convert bumped from `1.2.0` to `1.5.0`
- Removed all test case uses of `Assert-MockCalled`
- Improved test formatting
- Updated test example references
- Added additional integration tests for new properties

## [2.1.0]

- Module Updates
Expand Down
25 changes: 24 additions & 1 deletion docs/Find-ModuleByCommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Searches for modules that contain a specific command or cmdlet name.
## SYNTAX

```
Find-ModuleByCommand [-CommandName] <String> [<CommonParameters>]
Find-ModuleByCommand [-CommandName] <String> [-InsightView] [<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -37,6 +37,13 @@ Find-ModuleByCommand -CommandName 'Send-TelegramTextMessage'

Returns a list of modules that contain the command Send-TelegramTextMessage

### EXAMPLE 3
```
Find-ModuleByCommand -CommandName 'Send-TelegramTextMessage' -InsightView
```

Returns a list of modules that contain the command Send-TelegramTextMessage, with focused community insights about the module

## PARAMETERS

### -CommandName
Expand All @@ -54,6 +61,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -InsightView
Output focuses on additional insights available through PSGalleryExplorer.
This includes the module's size and file count, as well as repository metrics like stars, forks, and last repo update date
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
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).
Expand Down
37 changes: 31 additions & 6 deletions docs/Find-PSGModule.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,36 @@ Finds PowerShell Gallery module(s) that match specified criteria.

### none (Default)
```
Find-PSGModule [-IncludeCorps] [-IncludeRegulars] [-NumberToReturn <Int32>] [<CommonParameters>]
Find-PSGModule [-IncludeCorps] [-IncludeRegulars] [-NumberToReturn <Int32>] [-InsightView] [<CommonParameters>]
```

### GalleryDownloads
```
Find-PSGModule [-ByDownloads] [-ByRandom] [-IncludeCorps] [-IncludeRegulars] [-NumberToReturn <Int32>]
[<CommonParameters>]
[-InsightView] [<CommonParameters>]
```

### Repo
```
Find-PSGModule [-ByRepoInfo <String>] [-IncludeCorps] [-IncludeRegulars] [-NumberToReturn <Int32>]
[<CommonParameters>]
[-InsightView] [<CommonParameters>]
```

### Update
```
Find-PSGModule [-ByRecentUpdate <String>] [-IncludeCorps] [-IncludeRegulars] [-NumberToReturn <Int32>]
[<CommonParameters>]
[-InsightView] [<CommonParameters>]
```

### Names
```
Find-PSGModule [-ByName <String>] [-IncludeCorps] [-IncludeRegulars] [-NumberToReturn <Int32>]
Find-PSGModule [-ByName <String>] [-IncludeCorps] [-IncludeRegulars] [-NumberToReturn <Int32>] [-InsightView]
[<CommonParameters>]
```

### Tags
```
Find-PSGModule [-ByTag <String>] [-IncludeCorps] [-IncludeRegulars] [-NumberToReturn <Int32>]
Find-PSGModule [-ByTag <String>] [-IncludeCorps] [-IncludeRegulars] [-NumberToReturn <Int32>] [-InsightView]
[<CommonParameters>]
```

Expand Down Expand Up @@ -179,6 +179,15 @@ Find-PSGModule -IncludeCorps -IncludeRegulars

Returns all modules

### EXAMPLE 18
```
Find-PSGModule -ByTag module -InsightView
```

Returns up to 35 modules that contain the tag: module.
The output focuses on additional insights available through PSGalleryExplorer.
This includes the module's size and file count, as well as repository metrics like stars, forks, and last repo update date.

## PARAMETERS

### -ByDownloads
Expand Down Expand Up @@ -316,6 +325,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -InsightView
Output focuses on additional insights available through PSGalleryExplorer.
This includes the module's size and file count, as well as repository metrics like stars, forks, and last repo update date
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
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).
Expand Down
2 changes: 1 addition & 1 deletion docs/PSGalleryExplorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module Name: PSGalleryExplorer
Module Guid: e9252e8e-2073-4084-9562-cf60ad84603d
Download Help Link: NA
Help Version: 2.1.0
Help Version: 2.5.0
Locale: en-US
---

Expand Down
4 changes: 2 additions & 2 deletions install_modules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{
}))
$null = $modulesToInstall.Add(([PSCustomObject]@{
ModuleName = 'InvokeBuild'
ModuleVersion = '5.10.2'
ModuleVersion = '5.10.3'
BucketName = 'PSGallery'
KeyPrefix = ''
}))
Expand All @@ -57,7 +57,7 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{
}))
$null = $modulesToInstall.Add(([PSCustomObject]@{
ModuleName = 'Convert'
ModuleVersion = '1.2.0'
ModuleVersion = '1.5.0'
BucketName = 'PSGallery'
KeyPrefix = ''
}))
Expand Down
3 changes: 2 additions & 1 deletion src/PSGalleryExplorer.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ Add-BuildTask AnalyzeTests -After Analyze {
Setting = 'PSScriptAnalyzerSettings.psd1'
ExcludeRule = @(
'PSUseDeclaredVarsMoreThanAssignments',
'PSAvoidOverwritingBuiltInCmdlets'
'PSAvoidOverwritingBuiltInCmdlets',
'PSUseShouldProcessForStateChangingFunctions'
)
Recurse = $true
Verbose = $false
Expand Down
1 change: 1 addition & 0 deletions src/PSGalleryExplorer/Imports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ $domain = 'cloudfront.net'
$target = 'dfuu1myynofuh'
Get-DataLocation
$script:dataFileZip = 'PSGalleryExplorer.zip'
$script:metadataFile = 'PSGalleryExplorer.json'
$script:dataFile = 'PSGalleryExplorer.xml'
$script:dlURI = '{0}.{1}' -f $target, $domain
$script:glData = $null
Expand Down
111 changes: 110 additions & 1 deletion src/PSGalleryExplorer/PSGalleryExplorer.Format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,114 @@
</ListEntries>
</ListControl>
</View>

<View>
<Name>PSGEInsightTable</Name>
<ViewSelectedBy>
<TypeName>PSGEInsight</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Width>20</Width>
</TableColumnHeader>
<TableColumnHeader>
<Width>9</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Width>7</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Width>7</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Width>6</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Width>10</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Width>6</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Alignment>left</Alignment>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Downloads</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Star</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Fork</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Watch</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>ModuleSize</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>ModuleFileCount</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>RepoUpdate</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>PSGEInsightList</Name>
<ViewSelectedBy>
<TypeName>PSGEInsight</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>Name</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Downloads</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Star</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Fork</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Watch</PropertyName>
</ListItem>
<ListItem>
<PropertyName>ModuleSize</PropertyName>
</ListItem>
<ListItem>
<PropertyName>ModuleFileCount</PropertyName>
</ListItem>
<ListItem>
<PropertyName>RepoUpdate</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
</ViewDefinitions>
</Configuration>
</Configuration>
4 changes: 2 additions & 2 deletions src/PSGalleryExplorer/PSGalleryExplorer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'PSGalleryExplorer.psm1'

# Version number of this module.
ModuleVersion = '2.1.0'
ModuleVersion = '2.5.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -54,7 +54,7 @@
RequiredModules = @(
@{
ModuleName = 'Convert'
ModuleVersion = '1.2.0'
ModuleVersion = '1.5.0'
}
)

Expand Down
Loading

0 comments on commit ea3c34d

Please sign in to comment.