Public Access
Replace hand-edited JSON with a setup wizard
Melissa had to author entity.json by hand and know FTPS from SFTP to do it - which is what broke the last two CAMBS runs. setup-entity.bat now asks the questions and writes the file: - protocol is a numbered menu, stored as an explicit "protocol" key that wins over the sftp:// host prefix and the older tls flag - pasted schemes and paths are stripped off the host before saving - it creates the practice folders, then logs in and checks every practice's remote folder exists, so a wrong path or protocol surfaces in seconds instead of in the next morning's run Also drops insurance_file_type from the required path: with no setting the engine sends every file in the date folder minus Windows clutter, so "No .pdf files" can't happen on a folder full of TIFs. Connection failures now print what to change rather than just WinSCP's wording.
This commit is contained in:
+5
-5
@@ -3,15 +3,15 @@ $scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$entitiesDir = Join-Path $scriptRoot "Entities"
|
||||
|
||||
if (-not (Test-Path $entitiesDir)) {
|
||||
Write-Host "ERROR: Entities\ folder not found." -ForegroundColor Red
|
||||
exit 1
|
||||
Write-Host "Nothing is set up yet - double-click setup-entity.bat first." -ForegroundColor Yellow
|
||||
exit 0
|
||||
}
|
||||
|
||||
$entities = Get-ChildItem -Path $entitiesDir -Directory |
|
||||
Where-Object { Test-Path (Join-Path $_.FullName "entity.json") }
|
||||
$entities = @(Get-ChildItem -Path $entitiesDir -Directory |
|
||||
Where-Object { $_.Name -ne "EXAMPLE" -and (Test-Path (Join-Path $_.FullName "entity.json")) })
|
||||
|
||||
if ($entities.Count -eq 0) {
|
||||
Write-Host "No entity folders with entity.json found under Entities\." -ForegroundColor Yellow
|
||||
Write-Host "No entities are set up yet - double-click setup-entity.bat to add one." -ForegroundColor Yellow
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user