Skip to content

Refactoring - #78

Merged
kostyanf14 merged 14 commits into
masterfrom
refactoring
Jun 1, 2026
Merged

Refactoring#78
kostyanf14 merged 14 commits into
masterfrom
refactoring

Conversation

@kostyanf14

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 11:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gemini-code-assist

Copy link
Copy Markdown

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@kostyanf14

Copy link
Copy Markdown
Contributor Author

/gemini review

@kostyanf14
kostyanf14 requested a review from Copilot May 27, 2026 11:50
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread tools/toolsHCK.ps1 Outdated
kostyanf14 and others added 14 commits May 27, 2026 17:57
Add Test-ToolsHCKHelpExit and Assert-ToolsHCKNonEmptyParam for the repeated
interactive warning vs JSON throw patterns. Replace duplicated blocks across
actions to shorten the script and keep behavior aligned.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Replace New-Object/Add-Member chains in New-* helpers with [pscustomobject]@{ }
for simpler JSON-oriented projection objects and smaller surface area.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Use List[object]/List[string] with Add/AddRange instead of ArrayList, drop
redundant Out-Null after Add where the API returns void, and initialize the
action allowlist from a string array via the List constructor.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
…InPool

Centralize root pool and machine resolution with optional custom error text
so delete/move/state flows keep their messages while other actions share the
detailed pool/machine wording.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
Replace repeated -band checks in parsescheduleoptions with iteration over the
known DistributionOption flags and collect matching names into List[string].

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
Avoid two clock reads in gettimestamp so date and time strings always match
the same instant.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
Build the Studio connection file path from WTTSTDIO using Join-Path so a
missing trailing separator does not break discovery.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
Align New-ActionResult defaults and JSON error wrapping with PowerShell's
built-in null so strict mode and readability stay correct.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
Match the variable casing used when loading connect.xml for the database name.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
New-ActionResult now copies array-shaped ConvertFrom-Json output with @()
instead of relying on SyncRoot, which is implementation-specific and easy to get
wrong across PowerShell versions.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
Replace exit -1 with exit 1 when DB connection or TCP bind fails so shells and
automation see a conventional non-zero status.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
Correct machine/state wording, target key labels, listmachinetargets typo,
hasn't/Queues/information, and related usage strings.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
Validate WTTSTDIO, resolve kit DLL paths with Join-Path, and surface load
failures via Write-Error before exiting so missing Studio installs fail fast
with a clear reason.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
Co-authored-by: Cursor <[email protected]>
@elizashurov
elizashurov self-requested a review June 1, 2026 09:48
@kostyanf14
kostyanf14 merged commit 3c15303 into master Jun 1, 2026
1 check passed
@kostyanf14
kostyanf14 deleted the refactoring branch June 1, 2026 11:00
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.

3 participants