Update SVSTaskGate_Beta.ps1
This commit is contained in:
@@ -13,7 +13,7 @@ $Global:LogCache = New-Object System.Collections.ArrayList
|
||||
|
||||
|
||||
# Check if the Write-Log function exists
|
||||
if (-not (Get-Command -Name Write-Log2 -CommandType Function -ErrorAction SilentlyContinue)) {
|
||||
if (-not (Get-Command -Name Write-Log -CommandType Function -ErrorAction SilentlyContinue)) {
|
||||
# If the Write-Log function doesn't exist, create the Write-LogHelper function
|
||||
function Write-LogHelper {
|
||||
param (
|
||||
@@ -127,6 +127,7 @@ else {
|
||||
|
||||
# Example usage of Write-LogHybrid
|
||||
Write-LogHybrid -Message "This is a test log message. Write-log2 does exist" -Level "Info" -TaskCategory "TestCategory" -LogToEvent:$true
|
||||
Write-Log -Message "This is a test log message. Write-log4444 does exist" -Level "Info" -TaskCategory "TestCategory" -LogToEvent:$true
|
||||
|
||||
|
||||
function Install-SVSMSP {
|
||||
@@ -343,15 +344,7 @@ function Get-N8nWebhookData {
|
||||
$global:ApiKey = $data.ApiKey
|
||||
$global:ApiSecretKey = $data.ApiSecretKey
|
||||
|
||||
Write-Output "Module Name: $ModuleName"
|
||||
Write-Output "Repository URL: $RepositoryURL"
|
||||
Write-Output "Old Repo: $OldRepo"
|
||||
Write-Output "New Repo: $NewRepo"
|
||||
Write-Output "Commands To Check: $($CommandsToCheck -join ', ')"
|
||||
Write-Output "Log File Path: $LogFilePath"
|
||||
Write-Output "API URL: $ApiUrl"
|
||||
Write-Output "API Key: $ApiKey"
|
||||
Write-Output "API Secret Key: $ApiSecretKey"
|
||||
|
||||
|
||||
return $data
|
||||
}
|
||||
@@ -780,6 +773,7 @@ function GetHtmlContent {
|
||||
# Save and launch the HTML
|
||||
Start-Process "msedge.exe" -ArgumentList "--app=http://localhost:8081/"
|
||||
|
||||
|
||||
try {
|
||||
while ($listener.IsListening) {
|
||||
$context = $listener.GetContext()
|
||||
@@ -952,6 +946,7 @@ try {
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error: $($_.Exception.Message)"
|
||||
|
||||
}
|
||||
finally {
|
||||
$listener.Stop()
|
||||
|
||||
Reference in New Issue
Block a user