Rocky_Mountain_Vending/.pnpm-store/v10/files/f5/fda34745e744db9aa1a343c5e570ea0e57733adaae539bfadb9b1fa2c8fc933bf2e87e5c60e05100347406fcc95d726689cd2e8df35bb541e6f3b956a77518
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

52 lines
No EOL
1.8 KiB
Text

import { createBufferedTransformStream } from '../stream-utils/node-web-streams-helper';
import { HMR_MESSAGE_SENT_TO_BROWSER } from './hot-reloader-types';
const reactDebugChannelsByRequestId = new Map();
export function connectReactDebugChannel(requestId, sendToClient) {
const debugChannel = reactDebugChannelsByRequestId.get(requestId);
if (!debugChannel) {
return;
}
const reader = debugChannel.readable.pipeThrough(// We're sending the chunks in batches to reduce overhead in the browser.
createBufferedTransformStream({
maxBufferByteLength: 128 * 1024
})).getReader();
const stop = ()=>{
sendToClient({
type: HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK,
requestId,
chunk: null
});
reactDebugChannelsByRequestId.delete(requestId);
};
const onError = (err)=>{
console.error(Object.defineProperty(new Error('React debug channel stream error', {
cause: err
}), "__NEXT_ERROR_CODE", {
value: "E810",
enumerable: false,
configurable: true
}));
stop();
};
const progress = (entry)=>{
if (entry.done) {
stop();
} else {
sendToClient({
type: HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK,
requestId,
chunk: entry.value
});
reader.read().then(progress, onError);
}
};
reader.read().then(progress, onError);
}
export function setReactDebugChannel(requestId, debugChannel) {
reactDebugChannelsByRequestId.set(requestId, debugChannel);
}
export function deleteReactDebugChannel(requestId) {
reactDebugChannelsByRequestId.delete(requestId);
}
//# sourceMappingURL=debug-channel.js.map