@@ -65,9 +65,9 @@ sweeper.unref();
6565
6666// ── CRUD ────────────────────────────────────────────────────────────────────
6767
68- export const getJob = ( id : string ) : StreamJob | undefined => jobs . get ( id ) ;
68+ const getJob = ( id : string ) : StreamJob | undefined => jobs . get ( id ) ;
6969
70- export const createJob = ( id : string ) : StreamJob => {
70+ const createJob = ( id : string ) : StreamJob => {
7171 const job : StreamJob = {
7272 id,
7373 firstSeq : 1 ,
@@ -83,7 +83,7 @@ export const createJob = (id: string): StreamJob => {
8383 return job ;
8484} ;
8585
86- export const appendChunk = ( job : StreamJob , data : string ) : void => {
86+ const appendChunk = ( job : StreamJob , data : string ) : void => {
8787 const seq = job . firstSeq + job . chunks . length ;
8888 job . chunks . push ( { seq, data } ) ;
8989 job . updatedAt = Date . now ( ) ;
@@ -184,7 +184,7 @@ export function pumpUpstreamBodyIntoJob(job: StreamJob, upstreamResponse: Respon
184184 * onward. Each call drains everything currently buffered. When the job is
185185 * done, the response is closed. Returns the new cursor.
186186 */
187- export function flushToResponse ( job : StreamJob , response : ServerResponse , cursor : number ) : number {
187+ function flushToResponse ( job : StreamJob , response : ServerResponse , cursor : number ) : number {
188188 let nextCursor = cursor ;
189189 for ( const chunk of job . chunks ) {
190190 if ( chunk . seq > nextCursor && chunk . seq >= job . firstSeq ) {
@@ -247,7 +247,7 @@ export async function maybeStreamWithSharedJob(
247247 * (for a new job) started the upstream fetch; this function only manages the
248248 * browser-side subscription. Returns true when handled.
249249 */
250- export async function attachJobStream (
250+ async function attachJobStream (
251251 request : IncomingMessage ,
252252 response : ServerResponse ,
253253 config : AttachJobStreamConfig ,
0 commit comments