Skip to content

feat(deps): vendor PSWriteHTML and PSCertutil into module bundle#59

Merged
jakehildreth merged 2 commits into
mainfrom
feature/integrate-dependencies
May 9, 2026
Merged

feat(deps): vendor PSWriteHTML and PSCertutil into module bundle#59
jakehildreth merged 2 commits into
mainfrom
feature/integrate-dependencies

Conversation

@jakehildreth
Copy link
Copy Markdown
Owner

Summary

Removes the runtime dependency on pre-installed PSWriteHTML and PSCertutil by bundling both modules directly into the Locksmith2 artefact. Users no longer need to install these manually.

Changes

Build

  • Added post-build vendoring step: Save-Module pulls pinned versions of PSWriteHTML (1.41.0) and PSCertutil (0.0.3) from PSGallery into Artefacts\Unpacked\Locksmith2\Modules\
  • NestedModules in the manifest is patched post-build to point at the vendored .psm1 files (not .psd1)
  • Version pinning is controlled via a single $vendorVersions hashtable in the build script
  • Pre-build install of deps ensures PSPublishModule can resolve function-to-module mappings so New-ConfigurationModuleSkip -IgnoreModuleName fires correctly

Runtime

  • Invoke-Locksmith2 dynamically discovers and imports the vendored modules by scanning the Modules\ subfolder — no hardcoded version strings
  • New-LS2Dashboard replaces Get-Module -ListAvailable + Import-Module with a Get-Command probe against New-HTML; the NestedModule is already in scope when the bundle loads

Environment checks

  • Removed PSWriteHTML and PSCertutil checks from Test-PowerShellEnvironment and Repair-PowerShellEnvironment; these are now part of the bundle, not user-managed deps

Tests

  • Updated all affected tests to match new implementation contracts

Testing

All New-LS2Dashboard, Test-PowerShellEnvironment, and Repair-PowerShellEnvironment tests pass (9/9, green).

- replace ExternalModule loop with single New-ConfigurationModule -Type ExternalModule array call
- move PSWriteHTML and PSCertutil from IgnoreModuleName skip to ApprovedModule (enables selective function copying)
- add New-ConfigurationModuleSkip -IgnoreFunctionName for internal PSWriteHTML helpers (Format-HTML, Optimize-HTML, etc.)
- bump ModuleVersion to 2026.5.90840
- post-build Save-Module step vendors pinned deps (PSWriteHTML 1.41.0,
  PSCertutil 0.0.3) into Artefacts\Unpacked\Locksmith2\Modules\ and
  patches NestedModules in psd1 to point at .psm1 files (not .psd1)
- pre-build dep install ensures PSPublishModule can resolve function
  calls during analysis so IgnoreModuleName skip fires correctly
- replace Get-Module -ListAvailable + Import-Module with Get-Command
  probe in New-LS2Dashboard; bundled NestedModule is already in scope
- remove module-install logic from Test/Repair-PowerShellEnvironment;
  PSWriteHTML and PSCertutil are now part of the bundle
- update all affected tests to match new implementation contracts
@jakehildreth jakehildreth merged commit fae6b1d into main May 9, 2026
1 check passed
@jakehildreth jakehildreth deleted the feature/integrate-dependencies branch May 9, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant