From bb8eb45768c3c7cefb9e374aec5a9c0c7b68a990 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 18:14:40 +0000 Subject: [PATCH 1/3] Initial plan From fe657a4fa7456e47b3e19f3ae70243477e5c321d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 18:17:19 +0000 Subject: [PATCH 2/3] feat: scaffold PowerShell module repo for PasskeyDiagnostics --- .github/workflows/test.yml | 37 ++++++ .gitignore | 25 ++++ PasskeyDiagnostics/PasskeyDiagnostics.psd1 | 132 +++++++++++++++++++++ PasskeyDiagnostics/PasskeyDiagnostics.psm1 | 13 ++ README.md | 53 ++++++++- tests/PasskeyDiagnostics.Tests.ps1 | 24 ++++ 6 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 PasskeyDiagnostics/PasskeyDiagnostics.psd1 create mode 100644 PasskeyDiagnostics/PasskeyDiagnostics.psm1 create mode 100644 tests/PasskeyDiagnostics.Tests.ps1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..34a28ac --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Pester Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Pester + shell: pwsh + run: | + if (-not (Get-Module Pester -ListAvailable | Where-Object Version -ge '5.0')) { + Install-Module Pester -MinimumVersion 5.0 -Force -Scope CurrentUser + } + + - name: Run Pester tests + shell: pwsh + run: | + $config = New-PesterConfiguration + $config.Run.Path = './tests' + $config.TestResult.Enabled = $true + $config.TestResult.OutputPath = 'testResults.xml' + $config.Output.Verbosity = 'Detailed' + Invoke-Pester -Configuration $config + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: pester-results + path: testResults.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0509e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# PowerShell build outputs +/output/ +/Release/ +*.zip + +# Pester test results +testResults.xml +coverage.xml +*.coverage.xml + +# PSScriptAnalyzer cache +.PSScriptAnalyzerCache/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +!.vscode/tasks.json +!.vscode/settings.json +*.suo +*.user +.idea/ + +# OS files +.DS_Store +Thumbs.db diff --git a/PasskeyDiagnostics/PasskeyDiagnostics.psd1 b/PasskeyDiagnostics/PasskeyDiagnostics.psd1 new file mode 100644 index 0000000..f622c73 --- /dev/null +++ b/PasskeyDiagnostics/PasskeyDiagnostics.psd1 @@ -0,0 +1,132 @@ +# +# Module manifest for module 'PasskeyDiagnostics' +# +# Generated by: BurtHarris +# +# Generated on: 07/07/2026 +# + +@{ + +# Script module or binary module file associated with this manifest. +RootModule = 'PasskeyDiagnostics.psm1' + +# Version number of this module. +ModuleVersion = '0.1.0' + +# Supported PSEditions +# CompatiblePSEditions = @() + +# ID used to uniquely identify this module +GUID = 'd0035040-9bc5-4890-be0d-b982ffb3dc78' + +# Author of this module +Author = 'BurtHarris' + +# Company or vendor of this module +CompanyName = 'Unknown' + +# Copyright statement for this module +Copyright = '(c) BurtHarris. All rights reserved.' + +# Description of the functionality provided by this module +Description = 'PowerShell troubleshooting aides for passkey authentication' + +# Minimum version of the PowerShell engine required by this module +PowerShellVersion = '5.1' + +# Name of the PowerShell host required by this module +# PowerShellHostName = '' + +# Minimum version of the PowerShell host required by this module +# PowerShellHostVersion = '' + +# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +# DotNetFrameworkVersion = '' + +# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +# ClrVersion = '' + +# Processor architecture (None, X86, Amd64) required by this module +# ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +# RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +# RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module. +# ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +# TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +# FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess +# NestedModules = @() + +# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. +FunctionsToExport = 'Get-PasskeyDiagnosticInfo' + +# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. +CmdletsToExport = @() + +# Variables to export from this module +VariablesToExport = @() + +# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. +AliasesToExport = @() + +# DSC resources to export from this module +# DscResourcesToExport = @() + +# List of all modules packaged with this module +# ModuleList = @() + +# List of all files packaged with this module +# FileList = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. +PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + Tags = 'passkey', 'webauthn', 'diagnostics', 'fido2' + + # A URL to the license for this module. + LicenseUri = 'https://github.com/BurtHarris/passkey-diagnostics/blob/main/LICENSE' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/BurtHarris/passkey-diagnostics' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + # ReleaseNotes = '' + + # Prerelease string of this module + # Prerelease = '' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + + # External dependent modules of this module + # ExternalModuleDependencies = @() + + } # End of PSData hashtable + +} # End of PrivateData hashtable + +# HelpInfo URI of this module +# HelpInfoURI = '' + +# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. +# DefaultCommandPrefix = '' + +} + diff --git a/PasskeyDiagnostics/PasskeyDiagnostics.psm1 b/PasskeyDiagnostics/PasskeyDiagnostics.psm1 new file mode 100644 index 0000000..c7bb4da --- /dev/null +++ b/PasskeyDiagnostics/PasskeyDiagnostics.psm1 @@ -0,0 +1,13 @@ +# PasskeyDiagnostics.psm1 +# Placeholder — replace with your implementation. +# This file is loaded automatically by the module manifest. + +# Example export (remove when providing the real implementation): +function Get-PasskeyDiagnosticInfo { + [CmdletBinding()] + param() + + Write-Output 'PasskeyDiagnostics module loaded. Replace this placeholder with the real implementation.' +} + +Export-ModuleMember -Function 'Get-PasskeyDiagnosticInfo' diff --git a/README.md b/README.md index ffc4e77..563f872 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,53 @@ # passkey-diagnostics -Powershell troubleshooting aides for passkey authentication + +PowerShell troubleshooting aides for passkey authentication. + +## Module: PasskeyDiagnostics + +### Installation + +```powershell +# Clone the repo and import directly +Import-Module ./PasskeyDiagnostics/PasskeyDiagnostics.psd1 +``` + +Or once published to the PowerShell Gallery: + +```powershell +Install-Module PasskeyDiagnostics +``` + +### Usage + +```powershell +Import-Module PasskeyDiagnostics + +# List available commands +Get-Command -Module PasskeyDiagnostics +``` + +### Development + +#### Prerequisites + +- PowerShell 5.1+ or PowerShell 7+ +- [Pester](https://pester.dev) 5.x (`Install-Module Pester -MinimumVersion 5.0 -Scope CurrentUser`) + +#### Running tests + +```powershell +Invoke-Pester ./tests +``` + +#### Repository layout + +``` +passkey-diagnostics/ +├── PasskeyDiagnostics/ +│ ├── PasskeyDiagnostics.psd1 # Module manifest +│ └── PasskeyDiagnostics.psm1 # Module implementation +├── tests/ +│ └── PasskeyDiagnostics.Tests.ps1 +├── .github/workflows/test.yml # CI (Pester on windows-latest) +└── README.md +``` diff --git a/tests/PasskeyDiagnostics.Tests.ps1 b/tests/PasskeyDiagnostics.Tests.ps1 new file mode 100644 index 0000000..f0f4db8 --- /dev/null +++ b/tests/PasskeyDiagnostics.Tests.ps1 @@ -0,0 +1,24 @@ +#Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '5.0' } + +BeforeAll { + $modulePath = Join-Path $PSScriptRoot '..' 'PasskeyDiagnostics' 'PasskeyDiagnostics.psd1' + Import-Module (Resolve-Path $modulePath) -Force +} + +AfterAll { + Remove-Module PasskeyDiagnostics -ErrorAction SilentlyContinue +} + +Describe 'PasskeyDiagnostics module' { + Context 'Module loading' { + It 'imports without error' { + { Import-Module (Resolve-Path (Join-Path $PSScriptRoot '..' 'PasskeyDiagnostics' 'PasskeyDiagnostics.psd1')) -Force } | + Should -Not -Throw + } + + It 'exports expected functions' { + $commands = Get-Command -Module PasskeyDiagnostics + $commands | Should -Not -BeNullOrEmpty + } + } +} From 92b8228ac5cbb9960c96cb6f6d6b8f31b5ff40d3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 18:20:22 +0000 Subject: [PATCH 3/3] fix: require PowerShell 7+ (Core edition) per review feedback --- PasskeyDiagnostics/PasskeyDiagnostics.psd1 | 4 ++-- PasskeyDiagnostics/PasskeyDiagnostics.psm1 | 1 + README.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PasskeyDiagnostics/PasskeyDiagnostics.psd1 b/PasskeyDiagnostics/PasskeyDiagnostics.psd1 index f622c73..c2b509e 100644 --- a/PasskeyDiagnostics/PasskeyDiagnostics.psd1 +++ b/PasskeyDiagnostics/PasskeyDiagnostics.psd1 @@ -15,7 +15,7 @@ RootModule = 'PasskeyDiagnostics.psm1' ModuleVersion = '0.1.0' # Supported PSEditions -# CompatiblePSEditions = @() +CompatiblePSEditions = @('Core') # ID used to uniquely identify this module GUID = 'd0035040-9bc5-4890-be0d-b982ffb3dc78' @@ -33,7 +33,7 @@ Copyright = '(c) BurtHarris. All rights reserved.' Description = 'PowerShell troubleshooting aides for passkey authentication' # Minimum version of the PowerShell engine required by this module -PowerShellVersion = '5.1' +PowerShellVersion = '7.0' # Name of the PowerShell host required by this module # PowerShellHostName = '' diff --git a/PasskeyDiagnostics/PasskeyDiagnostics.psm1 b/PasskeyDiagnostics/PasskeyDiagnostics.psm1 index c7bb4da..2e30cd3 100644 --- a/PasskeyDiagnostics/PasskeyDiagnostics.psm1 +++ b/PasskeyDiagnostics/PasskeyDiagnostics.psm1 @@ -1,3 +1,4 @@ +#Requires -Version 7.0 # PasskeyDiagnostics.psm1 # Placeholder — replace with your implementation. # This file is loaded automatically by the module manifest. diff --git a/README.md b/README.md index 563f872..f3df340 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Get-Command -Module PasskeyDiagnostics #### Prerequisites -- PowerShell 5.1+ or PowerShell 7+ +- PowerShell 7+ - [Pester](https://pester.dev) 5.x (`Install-Module Pester -MinimumVersion 5.0 -Scope CurrentUser`) #### Running tests