fix(upload): convert Web stream to Node stream

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen 2025-06-10 18:19:35 -04:00
parent 6d62ca09e3
commit bdfc13f36f
No known key found for this signature in database
GPG key ID: 6577287BDCA70840
2 changed files with 3 additions and 2 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View file

@ -3,6 +3,7 @@ import { statSync } from "fs";
import { open } from "fs/promises";
import { lookup } from "mime-types";
import { basename } from "path";
import { Readable } from "stream";
import { alignAssetName, Config, isTag, releaseBody } from "./util";
type GitHub = InstanceType<typeof GitHub>;
@ -180,7 +181,7 @@ export const upload = async (
endpoint.searchParams.append("name", name);
const fh = await open(path);
try {
const stream = fh.readableWebStream();
const stream = Readable.fromWeb(fh.readableWebStream());
const resp = await github.request({
method: "POST",
url: endpoint.toString(),