Rocky_Mountain_Vending/.pnpm-store/v10/files/44/a13f88f0a0d4c0dcb69b90f55382c1902582a27e9e6e7cf0c6e92afbc90b02819b936be464e855a79f70e30e00d7a5fb3fa9ba08f015a533d74e65927b13b0
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

76 lines
No EOL
2.7 KiB
Text

import { PageSignatureError } from '../error';
const responseSymbol = Symbol('response');
const passThroughSymbol = Symbol('passThrough');
const waitUntilSymbol = Symbol('waitUntil');
class FetchEvent {
constructor(_request, waitUntil){
this[passThroughSymbol] = false;
this[waitUntilSymbol] = waitUntil ? {
kind: 'external',
function: waitUntil
} : {
kind: 'internal',
promises: []
};
}
// TODO: is this dead code? NextFetchEvent never lets this get called
respondWith(response) {
if (!this[responseSymbol]) {
this[responseSymbol] = Promise.resolve(response);
}
}
// TODO: is this dead code? passThroughSymbol is unused
passThroughOnException() {
this[passThroughSymbol] = true;
}
waitUntil(promise) {
if (this[waitUntilSymbol].kind === 'external') {
// if we received an external waitUntil, we delegate to it
// TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox`
const waitUntil = this[waitUntilSymbol].function;
return waitUntil(promise);
} else {
// if we didn't receive an external waitUntil, we make it work on our own
// (and expect the caller to do something with the promises)
this[waitUntilSymbol].promises.push(promise);
}
}
}
export function getWaitUntilPromiseFromEvent(event) {
return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined;
}
export class NextFetchEvent extends FetchEvent {
constructor(params){
var _params_context;
super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil);
this.sourcePage = params.page;
}
/**
* @deprecated The `request` is now the first parameter and the API is now async.
*
* Read more: https://nextjs.org/docs/messages/middleware-new-signature
*/ get request() {
throw Object.defineProperty(new PageSignatureError({
page: this.sourcePage
}), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
/**
* @deprecated Using `respondWith` is no longer needed.
*
* Read more: https://nextjs.org/docs/messages/middleware-new-signature
*/ respondWith() {
throw Object.defineProperty(new PageSignatureError({
page: this.sourcePage
}), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
}
}
//# sourceMappingURL=fetch-event.js.map