verify.ps1 724 B

12345678910111213141516171819202122232425
  1. param(
  2. [switch]$DryRunPublish
  3. )
  4. $ErrorActionPreference = "Stop"
  5. $Root = Resolve-Path (Join-Path $PSScriptRoot "..\..\..")
  6. Push-Location $Root
  7. try {
  8. Write-Host "[verify] npm pack + install smoke + npx smoke" -ForegroundColor Cyan
  9. npm run claude-voc:npm-pack
  10. if ($DryRunPublish) {
  11. $ManifestPath = Join-Path $Root "dist\npm\claude-code-voc-npm-package-manifest.json"
  12. $Manifest = Get-Content $ManifestPath -Raw | ConvertFrom-Json
  13. $Tarball = Join-Path $Root $Manifest.tarball
  14. Write-Host "[verify] npm publish dry-run" -ForegroundColor Cyan
  15. npm publish $Tarball --access public --dry-run
  16. }
  17. Write-Host "[done] npm package verification passed" -ForegroundColor Green
  18. }
  19. finally {
  20. Pop-Location
  21. }