@letitbexai_root/lexxit-automation-framework 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letitbexai_root/lexxit-automation-framework",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Playwright test execution framework with Express API for test execution and reporting.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -117,6 +117,7 @@ Copy-Item -Path (Join-Path $PSScriptRoot "*.ps1") -Destination $permanentScripts
117
117
  # -- 1. The lexxit-runner account --------------------------------------------
118
118
  $securePwd = ConvertTo-SecureString $RunnerPassword -AsPlainText -Force
119
119
  $existingUser = Get-LocalUser -Name $RunnerUsername -ErrorAction SilentlyContinue
120
+ $isNewRunnerAccount = -not $existingUser
120
121
  if (-not $existingUser) {
121
122
  Write-Host "[lexxit] Creating local user $RunnerUsername..."
122
123
  # New-LocalUser's -Description has a hard 48-char cap (a SAM user-account
@@ -473,3 +474,31 @@ Write-Host " Agent port: $AgentPort"
473
474
  Write-Host " VNC port: 5900 (TightVNC, service mode)"
474
475
  Write-Host " Scheduled task: $taskName (At log on of $RunnerUsername)"
475
476
  Write-Host " NOT validated against a real Windows EC2 AMI yet - test every step above before relying on it in production."
477
+
478
+ # -- 11. Reboot once, automatically, if this is a brand-new runner account --
479
+ # AutoAdminLogon (both the registry fallback above and Sysinternals'
480
+ # autologon.exe) only takes effect at Windows's own boot-time logon prompt -
481
+ # neither can retroactively log an already-running Windows session into a
482
+ # different user. So on a first-time install, lexxit-runner has never
483
+ # actually had an interactive desktop session, which is why Live View (VNC)
484
+ # shows the Windows lock/login screen instead of a usable desktop, even
485
+ # though the agent task itself already reports healthy (confirmed on a real
486
+ # VM: Start-ScheduledTask against an "At log on" trigger for a user who has
487
+ # never logged on still manages to run something that answers /api/health,
488
+ # just not inside a real lexxit-runner desktop session - so the health
489
+ # check above is not a reliable signal that VNC will show anything useful).
490
+ # One automatic reboot here closes that gap completely: the VM comes back
491
+ # up with lexxit-runner already logged in for real, VNC shows its actual
492
+ # desktop, and this never needs a human to remember "oh, it needs a
493
+ # reboot" again. Skipped when lexxit-runner already existed (e.g. a
494
+ # version/password-only re-run on an already-live agent) - no reason to
495
+ # bounce a VM that's already working.
496
+ if ($isNewRunnerAccount) {
497
+ Write-Host ""
498
+ Write-Host "[lexxit] $RunnerUsername was just created, so this VM needs one reboot for its auto-logon to"
499
+ Write-Host " actually take effect - that's expected, not a failure. Rebooting now; give it a"
500
+ Write-Host " couple of minutes, then check Lexxit -> Administration -> VM Agents - Live View"
501
+ Write-Host " should show a real desktop instead of the lock screen once it's back."
502
+ Start-Sleep -Seconds 5
503
+ Restart-Computer -Force
504
+ }