Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stage only changed checkpoint paths #8301

ClosedPetrSeifert(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/8301/headopened View on GitHub

Showing 7 changed files with 166 additions and 2 deletions (loading 5).

x
0 of 7 viewed, 7 left
5 additions and 1 deletionapps/server/src/stream/collectUint8StreamText.tsModified
View file
@@ -7,6 +7,7 @@
readonly truncated: boolean;
readonly bytes: number;
readonly invalidUtf8: boolean;
+ readonly rawBytes?: Uint8Array;
​
export const decodeUtf8 = (
@@ -26,6 +27,7 @@
readonly stream: Stream.Stream<Uint8Array, E>;
readonly maxBytes?: number | undefined;
readonly truncatedMarker?: string | null | undefined;
+ readonly preserveBytes?: boolean | undefined;
}): Effect.Effect<CollectedUint8StreamText, E> => {
const maxBytes = input.maxBytes ?? Number.POSITIVE_INFINITY;
const truncatedMarker = input.truncatedMarker ?? "";
@@ -68,7 +70,8 @@
},
),
Effect.map((state): CollectedUint8StreamText => {
- const decoded = decodeUtf8(Buffer.concat(state.chunks, state.bytes));
+ const rawBytes = Buffer.concat(state.chunks, state.bytes);
+ const decoded = decodeUtf8(rawBytes);
return {
text:
state.truncated && truncatedMarker.length > 0
@@ -77,6 +80,7 @@