mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
Update commitMultipleFiles.ts
This commit is contained in:
1 parent
135a2d74c4
commit
a3879f3fa7
1 file changed
+6
@@ -29,6 +29,8 @@ export async function commitMultipleFiles(
|
||||
isNew = true;
|
||||
diff = change.content.length;
|
||||
isDifferent = true;
|
||||
|
||||
console.log('diff 404');
|
||||
} else if (
|
||||
response.headers.has('Content-Length') &&
|
||||
parseInt(response.headers.get('Content-Length')!) !==
|
||||
@@ -39,6 +41,8 @@ export async function commitMultipleFiles(
|
||||
change.content.length -
|
||||
parseInt(response.headers.get('Content-Length')!);
|
||||
isDifferent = true;
|
||||
|
||||
console.log('diff header content length', diff);
|
||||
} else if (response.status === 200) {
|
||||
isNew = false;
|
||||
const buffer = Buffer.from(await response.arrayBuffer());
|
||||
@@ -50,6 +54,8 @@ export async function commitMultipleFiles(
|
||||
diff = change.content.length - buffer.length;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
console.log('diff body buffer', diff);
|
||||
} else {
|
||||
throw new Error(
|
||||
`Unexpected status code ${response.status} for ${change.path}`,
|
||||
|
||||
Reference in new issue
Block a user