$ErrorActionPreference = 'Stop' $base = 'http://127.0.0.1:3000' $session = New-Object Microsoft.PowerShell.Commands.WebRequestSession function Req($method, $path, $bodyObj) { $p = @{ Method = $method; Uri = "$base$path"; UseBasicParsing = $true; WebSession = $session; ErrorAction = 'Stop' } if ($null -ne $bodyObj) { $p.Body = ($bodyObj | ConvertTo-Json -Depth 6 -Compress); $p.ContentType = 'application/json' } Invoke-WebRequest @p } Write-Output 'waiting for health...' $up = $false for ($i = 0; $i -lt 40; $i++) { try { if ((Invoke-WebRequest "$base/api/health" -UseBasicParsing).StatusCode -eq 200) { $up = $true; break } } catch {} Start-Sleep -Seconds 2 } if (-not $up) { Write-Output 'server never came up'; return } Req POST '/api/v1/auth/login' @{ username = 'admin'; password = 'adminpass123' } | Out-Null Req PUT '/api/v1/admin/site-mode' @{ mode = 'live' } | Out-Null # News Req POST '/api/v1/admin/posts' @{ category='news'; title='The world map enters closed testing'; excerpt='The Mysticmoon overworld is feature-complete enough for a small group to wander.'; body='
Travel between the three starting towns is live, moongates are seeded, and the first dungeon level is open for stress-testing.
'; published=$true } | Out-Null Req POST '/api/v1/admin/posts' @{ category='news'; title='Crafting trees and resource gathering'; excerpt='Mining, lumberjacking, and the first tier of smithing and tailoring are in.'; body='Resource respawn timers are tuned for a small population.
'; published=$true } | Out-Null # Five on Friday Req POST '/api/v1/admin/posts' @{ category='five-on-friday'; title='Five on Friday #07'; body='June was the month Mysticmoon stopped being a set of disconnected systems and started feeling like a place.
For the first time, testers walked the road from Mistholme to the eastern moongate.
Mining, lumberjacking, smithing, and tailoring all came online.
'; published=$true } | Out-Null # Screenshot (uses the hero image already served at /assets) Req POST '/api/v1/admin/posts' @{ category='screenshots'; title='Mistholme at dusk'; excerpt='The square at Mistholme, lanterns lit at dusk.'; image_url='/assets/img/uomysticmoon-main-hero.png'; published=$true } | Out-Null # Wiki body with H2 sections so the article TOC renders Req PUT '/api/v1/admin/wiki/new-player-guide' @{ title='New Player Guide'; body='Everything you need to find your feet in your first hour on Mysticmoon.
New characters wake in Mistholme, the central starting town.
You do not pick a class - you grow into one by using skills.