Skip to content

Commit c74db2e

Browse files
committed
chore: run prettier
1 parent 5f4fdab commit c74db2e

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/release.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os from "node:os"
22

33
import { Octokit } from "@octokit/rest"
4-
import { createWriteStream } from "node:fs";
5-
import { pipeline } from "node:stream/promises";
4+
import { createWriteStream } from "node:fs"
5+
import { pipeline } from "node:stream/promises"
66
import { getProxyForUrl } from "proxy-from-env"
77
import { fetch, ProxyAgent } from "undici"
88
import type { RequestInit } from "undici"
@@ -25,7 +25,11 @@ export async function findRelease(version: string) {
2525
if (!matchedAsset) {
2626
throw new Error(`The binary '${releasePrefix}*' not found`)
2727
}
28-
return [release.data.name, matchedAsset.id, matchedAsset.name.endsWith(".zip") ? "zip" : "tar" ] as const
28+
return [
29+
release.data.name,
30+
matchedAsset.id,
31+
matchedAsset.name.endsWith(".zip") ? "zip" : "tar",
32+
] as const
2933
}
3034

3135
export async function downloadBinary(asset_id: number, asset_filetype: string) {
@@ -35,17 +39,17 @@ export async function downloadBinary(asset_id: number, asset_filetype: string) {
3539
repo: NAME,
3640
asset_id: asset_id,
3741
headers: {
38-
accept: "application/octet-stream"
42+
accept: "application/octet-stream",
3943
},
4044
request: {
4145
parseSuccessResponseBody: false, // required to access response as stream
42-
}
43-
});
46+
},
47+
})
4448
const tmpfile = await tmp.file()
4549

46-
const assetStream = asset.data as unknown as NodeJS.ReadableStream;
47-
const outputFile = createWriteStream(tmpfile.path);
48-
await pipeline(assetStream, outputFile);
50+
const assetStream = asset.data as unknown as NodeJS.ReadableStream
51+
const outputFile = createWriteStream(tmpfile.path)
52+
await pipeline(assetStream, outputFile)
4953

5054
if (asset_filetype === ".zip") {
5155
const zip = new admzip(tmpfile.path)

0 commit comments

Comments
 (0)