mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-09-17 09:06:48 +07:00
node_modules: update (#322)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
import { Transform, type TransformOptions } from 'node:stream';
|
||||
/**
|
||||
* A header line as emitted with the 'headers' event
|
||||
*/
|
||||
export interface MessageParserHeaderLine {
|
||||
/** Lowercase header field name */
|
||||
key: string;
|
||||
/** Full header line, folded continuation lines included, one character per byte ('binary' encoding) */
|
||||
line: string;
|
||||
}
|
||||
/**
|
||||
* MessageParser instance is a transform stream that separates message headers
|
||||
* from the rest of the body. Headers are emitted with the 'headers' event. Message
|
||||
* body is passed on as the resulting stream.
|
||||
*/
|
||||
export default class MessageParser extends Transform {
|
||||
lastBytes: Buffer;
|
||||
headersParsed: boolean;
|
||||
headerBytes: number;
|
||||
headerChunks: Buffer[] | null;
|
||||
rawHeaders: Buffer | false;
|
||||
bodySize: number;
|
||||
constructor(options?: TransformOptions);
|
||||
/**
|
||||
* Keeps count of the last 4 bytes in order to detect line breaks on chunk boundaries
|
||||
*
|
||||
* @param data Next data chunk from the stream
|
||||
*/
|
||||
updateLastBytes(data: Buffer): void;
|
||||
/**
|
||||
* Finds and removes message headers from the remaining body. We want to keep
|
||||
* headers separated until final delivery to be able to modify these
|
||||
*
|
||||
* @param data Next chunk of data
|
||||
* @return Returns true if headers are already found or false otherwise
|
||||
*/
|
||||
checkHeaders(data: Buffer): boolean;
|
||||
parseHeaders(): MessageParserHeaderLine[];
|
||||
}
|
||||
Reference in New Issue
Block a user