zod probed Function("") on its first object schema, which the production CSP
(no unsafe-eval) reported on every boot. Schema code now imports z from
src/contracts/zod.ts, enforced by a dependency-cruiser rule, and the CSP smoke
drops its init-script workaround.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 lines
329 B
TypeScript
9 lines
329 B
TypeScript
import { z } from "../../contracts/zod.ts";
|
|
|
|
export const PLATFORM_ROUTE_CODECS = {
|
|
// D-16: a route without input ignores unknown keys (`?utm_source=`, OAuth
|
|
// callback parameters) instead of calling the address invalid.
|
|
none: z.object({}),
|
|
NotFoundSplat: z.object({ "*": z.string().optional() }).strict(),
|
|
} as const;
|