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>
19 lines
808 B
Text
19 lines
808 B
Text
import { EventStreamMarshaller as UniversalEventStreamMarshaller } from "@smithy/eventstream-serde-universal";
|
|
import { Readable } from "stream";
|
|
import { readabletoIterable } from "./utils";
|
|
export class EventStreamMarshaller {
|
|
universalMarshaller;
|
|
constructor({ utf8Encoder, utf8Decoder }) {
|
|
this.universalMarshaller = new UniversalEventStreamMarshaller({
|
|
utf8Decoder,
|
|
utf8Encoder,
|
|
});
|
|
}
|
|
deserialize(body, deserializer) {
|
|
const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readabletoIterable(body);
|
|
return this.universalMarshaller.deserialize(bodyIterable, deserializer);
|
|
}
|
|
serialize(input, serializer) {
|
|
return Readable.from(this.universalMarshaller.serialize(input, serializer));
|
|
}
|
|
}
|