fix: restore dependency update compatibility

Fix VS Code webview type-check with TypeScript 5.9
Align ghostty-web to 0.4.0 across the workspace
Refresh ghostty-web patch for the updated package
This commit is contained in:
Bohdan Triapitsyn
2026-06-10 17:05:10 +03:00
parent 908adc1634
commit e3f3da4cb4
5 changed files with 38 additions and 44 deletions
+5 -4
View File
@@ -333,13 +333,14 @@ const getRequestDirectoryHint = (url: URL, input?: RequestInfo | URL, init?: Req
return undefined;
};
const decodeBase64 = (value: string): Uint8Array => {
const decodeBase64 = (value: string): ArrayBuffer => {
const binary = atob(value);
const bytes = new Uint8Array(binary.length);
const buffer = new ArrayBuffer(binary.length);
const bytes = new Uint8Array(buffer);
for (let i = 0; i < binary.length; i += 1) {
bytes[i] = binary.charCodeAt(i);
}
return bytes;
return buffer;
};
const jsonResponse = (body: unknown, status = 200): Response => {
@@ -371,7 +372,7 @@ const buildProxiedResponse = (
return new Response(proxied.bodyText, { status: proxied.status, headers: proxied.headers });
}
const body = proxied.bodyBase64 ? decodeBase64(proxied.bodyBase64) : new Uint8Array();
const body = proxied.bodyBase64 ? decodeBase64(proxied.bodyBase64) : new ArrayBuffer(0);
return new Response(body, { status: proxied.status, headers: proxied.headers });
};