Skip to main content
Glama

News Aggregator API

move-obsolete-tests.ps11.87 kB
$filesToKeep = @( "integration\api-integration.test.ts", "api\news-routes-reliable.test.ts", "api\cache.routes.test.ts", "controllers\reliable-controller.test.ts", "server.test.ts", "cache.test.ts" ) $testsDir = "src/__tests__" $obsoleteDir = "src/__tests__/obsolete" # Make sure the obsolete directory exists if (-not (Test-Path $obsoleteDir)) { New-Item -ItemType Directory -Path $obsoleteDir | Out-Null New-Item -ItemType Directory -Path "$obsoleteDir/api" | Out-Null New-Item -ItemType Directory -Path "$obsoleteDir/controllers" | Out-Null New-Item -ItemType Directory -Path "$obsoleteDir/routes" | Out-Null New-Item -ItemType Directory -Path "$obsoleteDir/mocks" | Out-Null } # Get all test files (excluding the obsolete directory itself) $allTestFiles = Get-ChildItem -Path $testsDir -Filter "*.ts" -Recurse | Where-Object { $_.FullName -notlike "*\obsolete\*" } | ForEach-Object { $_.FullName -replace [regex]::Escape((Resolve-Path $testsDir).Path + "\"), "" } # Identify files to move $filesToMove = $allTestFiles | Where-Object { $file = $_ $keepFile = $false foreach ($keep in $filesToKeep) { if ($file -like $keep) { $keepFile = $true break } } -not $keepFile } # Move files to obsolete directory foreach ($file in $filesToMove) { $sourcePath = Join-Path $testsDir $file $targetDir = Split-Path -Parent (Join-Path $obsoleteDir $file) # Make sure the target directory exists if (-not (Test-Path $targetDir)) { New-Item -ItemType Directory -Path $targetDir | Out-Null } $targetPath = Join-Path $obsoleteDir $file Write-Host "Moving $sourcePath to $targetPath" Move-Item -Path $sourcePath -Destination $targetPath -Force } Write-Host "Finished moving obsolete test files."

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Malachi-devel/the-news-api-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server