MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / downloadVideo

Function downloadVideo

references/v3-catalog/src/trigger/binaries.ts:73–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71const videoPath = "./video.ogv";
72
73async function downloadVideo() {
74 logger.log("downloading video", { url: videoUrl });
75
76 const response = await fetch(videoUrl);
77
78 if (!response.body) {
79 throw new Error("No readable stream");
80 }
81
82 const readStream = Readable.fromWeb(response.body as ReadableStream);
83 await writeFile(videoPath, readStream);
84
85 logger.log("finished downloading", { outputPath: videoPath });
86}
87
88async function execute(file: string, args?: readonly string[]) {
89 const { execa } = await import("execa");

Callers 1

binaries.tsFile · 0.85

Calls 2

logMethod · 0.65
fetchFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…