MCPcopy Create free account
hub / github.com/Snapchat/Valdi / download

Method download

npm_modules/cli/src/setup/DevSetupHelper.ts:16–24  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

14
15export class DevSetupHelper {
16 async download(url: string): Promise<ArrayBuffer> {
17 return new LoadingIndicator(async () => {
18 const response = await fetch(url);
19
20 return response.arrayBuffer();
21 })
22 .setText(`${wrapInColor('Downloading', ANSI_COLORS.YELLOW_COLOR)} ${url}...`)
23 .show();
24 }
25
26 async downloadToPath(url: string, dest: string): Promise<void> {
27 const body = await this.download(url);

Callers 1

downloadToPathMethod · 0.95

Calls 4

wrapInColorFunction · 0.90
fetchFunction · 0.85
showMethod · 0.65
setTextMethod · 0.45

Tested by

no test coverage detected