Repository navigation
refactor: split 2,676-line psm1 into 33 per-function files (#31) - #55
Merged
Merged
Conversation
The 2,676-line monolithic psm1 is replaced with a loader that dot-sources Private/ and Public/ directories. Each of the 33 functions now lives in its own file whose basename matches the function name. - 20 Public/*.ps1 files (the FunctionsToExport set, unchanged in the manifest) - 13 Private/*.ps1 files (internal helpers: CIDR math, ARP/DNS helpers, SNMP credential resolver, Get-LayerFromRole, New-EmptyTopology, Test-IPInSubnet, Get-ServiceName, etc.) - NetDiagram-PS.psm1 rewritten as a 30-line loader that sets strict mode, dot-sources Private then Public, and calls Export-ModuleMember on the Public basenames. - Function bodies extracted verbatim (verified by content-comparison against the original psm1) — no logic changes. - Added STRUCTURE.md documenting the new layout and conventions. Closes #31.
… split The per-function extraction omitted these two files, so the loader never dot-sourced them. Pester and packaged-smoke then failed because the public command was missing and CIDR matching was unavailable to Export-DrawIO, Export-Mermaid, and Resolve-SnmpCredentialConfig. Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
cursor
Bot
force-pushed
the
feature/split-module-31
branch
from
September 9, 2026 05:38
d6dc00f to
aec6ff1
Compare
This was referenced Sep 9, 2026
cursor Bot
pushed a commit
that referenced
this pull request
Sep 9, 2026
Catch Unreleased notes up from frozen 1.3.0, list Get-SnmpBridgeNeighbors in STRUCTURE and Available Commands, document the Public/Private loader, and refresh manifest ReleaseNotes/Tags without a Gallery version bump. Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
jacobyoby
added a commit
that referenced
this pull request
Sep 9, 2026
Catch Unreleased notes up from frozen 1.3.0, list Get-SnmpBridgeNeighbors in STRUCTURE and Available Commands, document the Public/Private loader, and refresh manifest ReleaseNotes/Tags without a Gallery version bump. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
This was referenced Sep 9, 2026
jacobyoby
added a commit
that referenced
this pull request
Sep 9, 2026
Bump the manifest and loader version to 1.4.0, refresh Gallery ReleaseNotes (and add a NetBox tag), and roll CHANGELOG [Unreleased] into a dated 1.4.0 section covering #55–#80. Gallery publish and the v1.4.0 tag stay out of band after merge. Closes #76 for the version/docs cut. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
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.
Summary
Splits the monolithic
NetDiagram-PS.psm1(2,676 lines, 33 functions) into per-responsibility files.New structure
Verification (behavior-preserving)
FunctionsToExportin manifest matchesPublic/*.ps11-to-1Note: pwsh not installed locally so
Import-Moduleruntime test not possible, but the loader pattern is standard PowerShell.Closes #31.