File size: 296 Bytes
652f343
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import { promises as fs } from "node:fs"
import path from "node:path"

import { VideoTask } from "../types.mts"

export const readTask = async (taskFilePath: string): Promise<VideoTask> => {
  const task = JSON.parse(
    await fs.readFile(taskFilePath, 'utf8')
  ) as VideoTask

  return task
}