Release/1.4.0 — results history + HTML report#9
Merged
Conversation
…encies.Common Add the building blocks for issue #8 (results history + HTML report), reusing the conventions proven across the sibling luigilink projects: History (Public): - Backup-SPSJsonFile: archive the current results JSON into Results/history with a yyyyMMdd-HHmm timestamp before it is overwritten (pattern from SPSUserSync). - Clear-SPSLogFolder: single rotation implementation reused for transcript logs (*.log) and archived snapshots (*.json); Retention = 0 disables pruning. HTML report (Private helpers + Public exporter, pattern from SPSUpdate.Common): - ConvertTo-SPSHtmlEncoded, Get-SPSReportHtmlHead, Get-SPSReportCardHtml, Get-SPSReportHtmlScript. - Export-SPSCleanDependenciesReport: renders the results JSON as a self-contained, dependency-free HTML file - one summary card per dependency category plus a filterable/sortable table per non-empty category, or a clean 'nothing to clean' state. Atomic write (temp file + Move-Item). Bump the module manifest to 1.4.0 and export the three new public functions. Refs #8 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In the audit branch (no -Clean), the entry script now: - archives the previous Results\<FileName>.json into Results\history (timestamped) before the fresh audit overwrites it; - generates a Results\<FileName>.html report from the new results; - prunes old history snapshots and transcript logs. The current Results\<FileName>.json is kept stable (it remains the exact input consumed by the -Clean run); only the history copies are timestamped. Retention is configurable via the new -HistoryRetentionDays (default 30) and -LogRetentionDays (default 180) parameters; 0 disables pruning. Refs #8 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extend the Pester suite for the 1.4.0 feature: - Module tests: add Backup-SPSJsonFile (no-op on missing source, timestamped archive leaving the original in place), Clear-SPSLogFolder (retention prune, Retention=0 no-op, ShouldProcess), Export-SPSCleanDependenciesReport (section per non-empty category, HTML-encoding of result values, clean empty state, throw on missing input) and the private HTML helpers; refresh the exported-set and FunctionsToExport assertions. - Entry-script tests: assert the new -HistoryRetentionDays/-LogRetentionDays parameters and the audit-branch wiring (Backup-SPSJsonFile, Export-SPSCleanDependenciesReport, Clear-SPSLogFolder). 100/100 green locally. Refs #8 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- CHANGELOG: add the 1.4.0 entry (history backup + retention, HTML report, new -HistoryRetentionDays/-LogRetentionDays parameters). - RELEASE-NOTES: rewrite for 1.4.0 (used verbatim as the GitHub Release body). - Wiki: new Reports-and-History page (report layout, history folder, retention), add it to the sidebar and cross-link from Usage/Dependency-Types; document the two new parameters in Usage; refresh the Home key-features list. Refs #8 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pester Test Results100 tests 100 ✅ 1s ⏱️ Results for commit c253408. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8
Summary
Follow-up to the 1.3.0 module refactor. The audit no longer overwrites its output blindly: it now keeps a timestamped history of past results and generates a self-contained HTML report. Reuses the conventions already proven across the sibling luigilink projects. Target release: 1.4.0.
What changed
History (Public, pattern from SPSUserSync/SPSWeather)
Backup-SPSJsonFile— archiveResults\<FileName>.jsonintoResults\history\with ayyyyMMdd-HHmmsuffix before the fresh audit overwrites it.Clear-SPSLogFolder— single retention/rotation implementation reused for logs (*.log) and snapshots (*.json);Retention = 0disables pruning.HTML report (Private helpers + Public exporter, pattern from SPSUpdate.Common)
ConvertTo-SPSHtmlEncoded,Get-SPSReportHtmlHead,Get-SPSReportCardHtml,Get-SPSReportHtmlScript.Export-SPSCleanDependenciesReport— summary card per dependency category + filterable/sortable table per non-empty category, or a clean "nothing to clean" state. Dependency-free (offline), atomic write. All farm values HTML-encoded.Entry script
Results\<FileName>.html→ prune history/logs.Results\<FileName>.jsonstays stable (still the exact-Cleaninput); only history copies are timestamped.-HistoryRetentionDays(default 30) and-LogRetentionDays(default 180);0disables pruning.Tests & docs
Commits (atomic)
Notes
-Cleanflow is unchanged.v1.4.0frommainafter merge.