Skip to content

Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.

686 B
Raw Blame
import { parentPort, workerData } from 'node:worker_threads';
import {
  readKrillinRuntimeManifest,
  verifyKrillinRuntimeManifest
} from './manifest.js';

type VerificationWorkerInput = {
  resourceRoot: string;
  cachePath: string;
};

const input = workerData as VerificationWorkerInput;

try {
  const manifest = readKrillinRuntimeManifest(input.resourceRoot);
  const result = verifyKrillinRuntimeManifest(input.resourceRoot, manifest, {
    cachePath: input.cachePath
  });
  parentPort?.postMessage({ ok: true, cacheHit: result.cacheHit });
} catch (error) {
  parentPort?.postMessage({
    ok: false,
    message: error instanceof Error ? error.message : String(error)
  });
}