Rocky_Mountain_Vending/.pnpm-store/v10/files/62/64819f4d8f23c92f5d75f12655b8145a4fa9003a8700489ee6fc56c72175d2898055208dacdfe78423ff37db8339548a4a01db97b0f836650d7e661dc68083
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

33 lines
1.2 KiB
Text

import { NormalizedSchema } from "@smithy/core/schema";
import { ToStringShapeSerializer } from "./ToStringShapeSerializer";
export class HttpInterceptingShapeSerializer {
codecSerializer;
stringSerializer;
buffer;
constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {
this.codecSerializer = codecSerializer;
this.stringSerializer = stringSerializer;
}
setSerdeContext(serdeContext) {
this.codecSerializer.setSerdeContext(serdeContext);
this.stringSerializer.setSerdeContext(serdeContext);
}
write(schema, value) {
const ns = NormalizedSchema.of(schema);
const traits = ns.getMergedTraits();
if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {
this.stringSerializer.write(ns, value);
this.buffer = this.stringSerializer.flush();
return;
}
return this.codecSerializer.write(ns, value);
}
flush() {
if (this.buffer !== undefined) {
const buffer = this.buffer;
this.buffer = undefined;
return buffer;
}
return this.codecSerializer.flush();
}
}