Rocky_Mountain_Vending/.pnpm-store/v10/files/7f/1d2625815f496ba31fbbda926fb6a6dc413ed34752ea0597fe7553cd38395e29537d4f7649ed698cd5a6bfd23406d1e9121c4375d3f6ce2a0f2dbe93f3bf73
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

25 lines
1.1 KiB
Text

import { EventStreamCodec, MessageDecoderStream, MessageEncoderStream, SmithyMessageDecoderStream, SmithyMessageEncoderStream, } from "@smithy/eventstream-codec";
import { getChunkedStream } from "./getChunkedStream";
import { getMessageUnmarshaller } from "./getUnmarshalledStream";
export class EventStreamMarshaller {
eventStreamCodec;
utfEncoder;
constructor({ utf8Encoder, utf8Decoder }) {
this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);
this.utfEncoder = utf8Encoder;
}
deserialize(body, deserializer) {
const inputStream = getChunkedStream(body);
return new SmithyMessageDecoderStream({
messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),
deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder),
});
}
serialize(inputStream, serializer) {
return new MessageEncoderStream({
messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),
encoder: this.eventStreamCodec,
includeEndFrame: true,
});
}
}