Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

965 B
Raw Blame
import process from 'node:process'
import { pathToFileURL } from 'node:url'
import {
  collectLocalizationReferences,
  main as verifyCatalog
} from './verify-localization-catalog.mjs'
import { main as verifyRuntimeCatalog } from './generate-runtime-required-english-catalog.mjs'

export async function main(root = process.cwd()) {
  // Share only this invocation's scan, never cached evidence from another checkout.
  const references = await collectLocalizationReferences(root)
  const results = await Promise.allSettled([
    verifyCatalog(root, {}, references),
    verifyRuntimeCatalog(root, [], references)
  ])
  let exitCode = 0
  for (const result of results) {
    if (result.status === 'rejected') {
      console.error(result.reason)
      exitCode = 1
    } else if (result.value !== 0) {
      exitCode = 1
    }
  }
  return exitCode
}

if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
  process.exit(await main())
}