Rocky_Mountain_Vending/.pnpm-store/v10/files/83/2963a4ec2257e4f25d265923ce78882b97da895a192c457357a68ed83b1d883eac2ba7f052e56856490bd16fbee54f0ffc5bb10aebd423ea71f4f0aed925ec
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

49 lines
No EOL
1.6 KiB
Text

import { z } from 'next/dist/compiled/zod';
import { formatZodError } from '../../../shared/lib/zod';
/**
* The schema for the page segment config.
*/ const PagesSegmentConfigSchema = z.object({
/**
* The runtime to use for the page.
*/ runtime: z.enum([
'edge',
'experimental-edge',
'nodejs'
]).optional(),
/**
* The maximum duration for the page render.
*/ maxDuration: z.number().optional(),
/**
* The exported config object for the page.
*/ config: z.object({
/**
* The runtime to use for the page.
*/ runtime: z.enum([
'edge',
'experimental-edge',
'nodejs'
]).optional(),
/**
* The maximum duration for the page render.
*/ maxDuration: z.number().optional()
}).optional()
});
/**
* Parse the page segment config.
* @param data - The data to parse.
* @param route - The route of the page.
* @returns The parsed page segment config.
*/ export function parsePagesSegmentConfig(data, route) {
const parsed = PagesSegmentConfigSchema.safeParse(data, {});
if (!parsed.success) {
throw formatZodError(`Invalid segment configuration options detected for "${route}". Read more at https://nextjs.org/docs/messages/invalid-page-config`, parsed.error);
}
return parsed.data;
}
/**
* The keys of the configuration for a page.
*
* @internal - required to exclude zod types from the build
*/ export const PagesSegmentConfigSchemaKeys = PagesSegmentConfigSchema.keyof().options;
//# sourceMappingURL=pages-segment-config.js.map