zod-compiler 1.23.4 → 1.23.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -11
- package/dist/core/codegen/build-path.d.ts.map +1 -1
- package/dist/core/codegen/build-path.js +3 -1
- package/dist/core/codegen/build-path.js.map +1 -1
- package/dist/core/codegen/context.d.ts.map +1 -1
- package/dist/core/codegen/context.js +4 -2
- package/dist/core/codegen/context.js.map +1 -1
- package/dist/core/codegen/dedupe.js +3 -1
- package/dist/core/codegen/dedupe.js.map +1 -1
- package/dist/core/codegen/fast-path.d.ts.map +1 -1
- package/dist/core/codegen/fast-path.js +2 -0
- package/dist/core/codegen/fast-path.js.map +1 -1
- package/dist/core/codegen/fast-size.d.ts.map +1 -1
- package/dist/core/codegen/fast-size.js +2 -1
- package/dist/core/codegen/fast-size.js.map +1 -1
- package/dist/core/codegen/index.js +18 -1
- package/dist/core/codegen/index.js.map +1 -1
- package/dist/core/codegen/schemas/zod-delegate.d.ts +12 -0
- package/dist/core/codegen/schemas/zod-delegate.d.ts.map +1 -0
- package/dist/core/codegen/schemas/zod-delegate.js +14 -0
- package/dist/core/codegen/schemas/zod-delegate.js.map +1 -0
- package/dist/core/codegen/slow-path.d.ts.map +1 -1
- package/dist/core/codegen/slow-path.js +2 -0
- package/dist/core/codegen/slow-path.js.map +1 -1
- package/dist/core/diagnostic.d.ts.map +1 -1
- package/dist/core/diagnostic.js +3 -0
- package/dist/core/diagnostic.js.map +1 -1
- package/dist/core/extract/extractors/intersection.d.ts.map +1 -1
- package/dist/core/extract/extractors/intersection.js +32 -0
- package/dist/core/extract/extractors/intersection.js.map +1 -1
- package/dist/core/types.d.ts +13 -2
- package/dist/core/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic.js","names":[],"sources":["../../src/core/diagnostic.ts"],"sourcesContent":["/**\n * Schema diagnostic utilities for the `check` command.\n * Walks SchemaIR in a single pass and collects per-node diagnostic info.\n */\n\nimport type { SchemaIR } from \"./types.js\";\n\n// ─── Types ──────────────────────────────────────────────────────────────────\n\nexport type NodeStatus = \"compiled\" | \"fallback\";\n\nexport interface DiagnosticNode {\n /** SchemaIR type (e.g. \"string\", \"object\", \"fallback\") */\n type: string;\n /** Dot-separated path from root (e.g. \".name\", \".addresses[]\") */\n path: string;\n /** Whether this node is compiled or falls back to Zod */\n status: NodeStatus;\n /** Fallback reason when status is \"fallback\" */\n reason?: string;\n /** Actionable hint for fixing the fallback */\n hint?: string;\n /** Child diagnostic nodes */\n children: DiagnosticNode[];\n}\n\nexport interface DiagnosticResult {\n /** Root diagnostic tree */\n root: DiagnosticNode;\n /** Total leaf node count */\n total: number;\n /** Number of compiled leaf nodes */\n compilable: number;\n /** Coverage percentage (0-100) */\n coveragePct: number;\n /** Whether the schema is eligible for Fast Path */\n fastPathEligible: boolean;\n /** Reason Fast Path is ineligible (when fastPathEligible is false) */\n fastPathBlocker?: string;\n /** Flat list of fallback entries for summary display */\n fallbacks: { reason: string; path: string; hint: string }[];\n}\n\n// ─── Fast Path Eligibility ──────────────────────────────────────────────────\n\n/** Schema types that block Fast Path eligibility. */\nconst FAST_PATH_BLOCKERS = new Set<string>([\"fallback\", \"effect\", \"stringBool\"]);\n\n/** Check if a single node blocks Fast Path (without recursing). */\nfunction detectFastPathBlocker(ir: SchemaIR): string | null {\n if (FAST_PATH_BLOCKERS.has(ir.type)) {\n return ir.type === \"fallback\" ? `fallback (${(ir as { reason: string }).reason})` : ir.type;\n }\n if (\"coerce\" in ir && ir.coerce) {\n return `coerce (${ir.type})`;\n }\n // Value-mutating string checks make the schema slow-path only: overwrite\n // effects (.trim()/.toLowerCase()) rewrite the value and url checks trim it,\n // while the fast path returns input unchanged.\n if (ir.type === \"string\") {\n for (const check of ir.checks) {\n if (check.kind === \"overwrite_effect\") return \"overwrite (.trim()/.toLowerCase())\";\n if (check.kind === \"string_format\" && check.format === \"url\") return \"url (trims value)\";\n }\n }\n return null;\n}\n\n// ─── Hint Generation ────────────────────────────────────────────────────────\n\nconst FALLBACK_HINTS: Record<string, string> = {\n transform: \"Extract transform into a separate post-processing step\",\n refine: \"Replace .refine() with built-in checks (e.g. .min(), .max(), .regex())\",\n superRefine: \"Replace .superRefine() with built-in checks if possible\",\n custom: \"Replace z.custom() with a supported schema type\",\n lazy: \"Ensure the lazy getter resolves to a static schema (recursion compiles automatically)\",\n unsupported: \"This schema type is not yet supported by zod-compiler\",\n coalesced:\n \"Every property falls back to Zod, so the whole object is delegated once (faster than per-field delegation)\",\n};\n\nfunction getHint(reason: string): string {\n return FALLBACK_HINTS[reason] ?? \"Check zod-compiler documentation for supported schemas\";\n}\n\n// ─── Child Iteration (with path computation) ───────────────────────────────\n\n/** Yields [childPath, childIR] pairs for a given SchemaIR node. */\nfunction* iterChildren(ir: SchemaIR, parentPath: string): Generator<[string, SchemaIR]> {\n switch (ir.type) {\n case \"object\":\n for (const [key, child] of Object.entries(ir.properties)) {\n yield [`${parentPath}.${key}`, child];\n }\n break;\n case \"array\":\n yield [`${parentPath}[]`, ir.element];\n break;\n case \"tuple\":\n for (const [i, item] of ir.items.entries()) {\n yield [`${parentPath}[${i}]`, item];\n }\n if (ir.rest) yield [`${parentPath}[...rest]`, ir.rest];\n break;\n case \"record\":\n yield [`${parentPath}[key]`, ir.keyType];\n yield [`${parentPath}[value]`, ir.valueType];\n break;\n case \"set\":\n yield [`${parentPath}[element]`, ir.valueType];\n break;\n case \"map\":\n yield [`${parentPath}[key]`, ir.keyType];\n yield [`${parentPath}[value]`, ir.valueType];\n break;\n case \"union\":\n case \"discriminatedUnion\":\n for (const [i, opt] of ir.options.entries()) {\n yield [`${parentPath}[${i}]`, opt];\n }\n break;\n case \"intersection\":\n yield [`${parentPath}[left]`, ir.left];\n yield [`${parentPath}[right]`, ir.right];\n break;\n case \"optional\":\n case \"nullable\":\n case \"readonly\":\n yield [parentPath, ir.inner];\n break;\n case \"default\":\n case \"catch\":\n yield [parentPath, ir.inner];\n break;\n case \"pipe\":\n yield [`${parentPath}[in]`, ir.in];\n yield [`${parentPath}[out]`, ir.out];\n break;\n case \"effect\":\n yield [`${parentPath}[inner]`, ir.inner];\n break;\n case \"recursionTarget\":\n // Transparent wrapper around a non-root recursive sub-schema: descend so\n // coverage and any inner fallbacks are reported at the same path.\n yield [parentPath, ir.inner];\n break;\n }\n}\n\n// ─── Single-Pass Diagnostic Walker ──────────────────────────────────────────\n\ninterface WalkResult {\n node: DiagnosticNode;\n total: number;\n compilable: number;\n fallbacks: { reason: string; path: string; hint: string }[];\n /** First Fast Path blocker found in this subtree, or null if eligible. */\n fastPathBlocker: string | null;\n}\n\nfunction walkIR(ir: SchemaIR, currentPath: string): WalkResult {\n // Fallback leaf\n if (ir.type === \"fallback\") {\n const hint = getHint(ir.reason);\n const nodePath = currentPath || \"(root)\";\n return {\n node: {\n type: ir.type,\n path: nodePath,\n status: \"fallback\",\n reason: ir.reason,\n hint,\n children: [],\n },\n total: 1,\n compilable: 0,\n fallbacks: [{ reason: ir.reason, path: nodePath, hint }],\n fastPathBlocker: `fallback (${ir.reason})`,\n };\n }\n\n // Check if this node itself blocks Fast Path\n let fastPathBlocker = detectFastPathBlocker(ir);\n\n // Recurse into children\n const children: DiagnosticNode[] = [];\n let total = 0;\n let compilable = 0;\n const fallbacks: { reason: string; path: string; hint: string }[] = [];\n\n for (const [childPath, child] of iterChildren(ir, currentPath)) {\n const r = walkIR(child, childPath);\n children.push(r.node);\n total += r.total;\n compilable += r.compilable;\n fallbacks.push(...r.fallbacks);\n if (fastPathBlocker === null && r.fastPathBlocker !== null) {\n fastPathBlocker = r.fastPathBlocker;\n }\n }\n\n // Leaf node (no children produced by iterChildren)\n if (children.length === 0) {\n total = 1;\n compilable = 1;\n }\n\n return {\n node: {\n type: ir.type,\n path: currentPath || \"(root)\",\n status: \"compiled\",\n children,\n },\n total,\n compilable,\n fallbacks,\n fastPathBlocker,\n };\n}\n\n/**\n * Diagnose a SchemaIR in a single pass.\n * Returns a diagnostic tree with coverage stats, Fast Path eligibility, and actionable hints.\n */\nexport function diagnoseSchema(ir: SchemaIR): DiagnosticResult {\n const { node: root, total, compilable, fallbacks, fastPathBlocker } = walkIR(ir, \"\");\n const coveragePct = total > 0 ? Math.round((compilable / total) * 100) : 100;\n\n const result: DiagnosticResult = {\n root,\n total,\n compilable,\n coveragePct,\n fastPathEligible: fastPathBlocker === null,\n fallbacks,\n };\n if (fastPathBlocker !== null) {\n result.fastPathBlocker = fastPathBlocker;\n }\n return result;\n}\n"],"mappings":";;AA8CA,MAAM,qCAAqB,IAAI,IAAY;CAAC;CAAY;CAAU;AAAY,CAAC;;AAG/E,SAAS,sBAAsB,IAA6B;CAC1D,IAAI,mBAAmB,IAAI,GAAG,IAAI,GAChC,OAAO,GAAG,SAAS,aAAa,aAAc,GAA0B,OAAO,KAAK,GAAG;CAEzF,IAAI,YAAY,MAAM,GAAG,QACvB,OAAO,WAAW,GAAG,KAAK;CAK5B,IAAI,GAAG,SAAS,UACd,KAAK,MAAM,SAAS,GAAG,QAAQ;EAC7B,IAAI,MAAM,SAAS,oBAAoB,OAAO;EAC9C,IAAI,MAAM,SAAS,mBAAmB,MAAM,WAAW,OAAO,OAAO;CACvE;CAEF,OAAO;AACT;AAIA,MAAM,iBAAyC;CAC7C,WAAW;CACX,QAAQ;CACR,aAAa;CACb,QAAQ;CACR,MAAM;CACN,aAAa;CACb,WACE;AACJ;AAEA,SAAS,QAAQ,QAAwB;CACvC,OAAO,eAAe,WAAW;AACnC;;AAKA,UAAU,aAAa,IAAc,YAAmD;CACtF,QAAQ,GAAG,MAAX;EACE,KAAK;GACH,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,GAAG,UAAU,GACrD,MAAM,CAAC,GAAG,WAAW,GAAG,OAAO,KAAK;GAEtC;EACF,KAAK;GACH,MAAM,CAAC,GAAG,WAAW,KAAK,GAAG,OAAO;GACpC;EACF,KAAK;GACH,KAAK,MAAM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L,MAAM;IACJ,MAAM,GAAG;IACT,MAAM;IACN,QAAQ;IACR,QAAQ,GAAG;IACX;IACA,UAAU,CAAC;GACb;GACA,OAAO;GACP,YAAY;GACZ,WAAW,CAAC;IAAE,QAAQ,GAAG;IAAQ,MAAM;IAAU;GAAK,CAAC;GACvD,iBAAiB,aAAa,GAAG,OAAO;EAC1C;CACF;CAGA,IAAI,kBAAkB,sBAAsB,EAAE;CAG9C,MAAM,WAA6B,CAAC;CACpC,IAAI,QAAQ;CACZ,IAAI,aAAa;CACjB,MAAM,YAA8D,CAAC;CAErE,KAAK,MAAM,CAAC,WAAW,UAAU,aAAa,IAAI,WAAW,GAAG;EAC9D,MAAM,IAAI,OAAO,OAAO,SAAS;EACjC,SAAS,KAAK,EAAE,IAAI;EACpB,SAAS,EAAE;EACX,cAAc,EAAE;EAChB,UAAU,KAAK,GAAG,EAAE,SAAS;EAC7B,IAAI,oBAAoB,QAAQ,EAAE,oBAAoB,MACpD,kBAAkB,EAAE;CAExB;CAGA,IAAI,SAAS,WAAW,GAAG;EACzB,QAAQ;EACR,aAAa;CACf;CAEA,OAAO;EACL,MAAM;GACJ,MAAM,GAAG;GACT,MAAM,eAAe;GACrB,QAAQ;GACR;EACF;EACA;EACA;EACA;EACA;CACF;AACF;;;;;AAMA,SAAgB,eAAe,IAAgC;CAC7D,MAAM,EAAE,MAAM,MAAM,OAAO,YAAY,WAAW,oBAAoB,OAAO,IAAI,EAAE;CAGnF,MAAM,SAA2B;EAC/B;EACA;EACA;EACA,aANkB,QAAQ,IAAI,KAAK,MAAO,aAAa,QAAS,GAAG,IAAI;EAOvE,kBAAkB,oBAAoB;EACtC;CACF;CACA,IAAI,oBAAoB,MACtB,OAAO,kBAAkB;CAE3B,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"diagnostic.js","names":[],"sources":["../../src/core/diagnostic.ts"],"sourcesContent":["/**\n * Schema diagnostic utilities for the `check` command.\n * Walks SchemaIR in a single pass and collects per-node diagnostic info.\n */\n\nimport type { SchemaIR } from \"./types.js\";\n\n// ─── Types ──────────────────────────────────────────────────────────────────\n\nexport type NodeStatus = \"compiled\" | \"fallback\";\n\nexport interface DiagnosticNode {\n /** SchemaIR type (e.g. \"string\", \"object\", \"fallback\") */\n type: string;\n /** Dot-separated path from root (e.g. \".name\", \".addresses[]\") */\n path: string;\n /** Whether this node is compiled or falls back to Zod */\n status: NodeStatus;\n /** Fallback reason when status is \"fallback\" */\n reason?: string;\n /** Actionable hint for fixing the fallback */\n hint?: string;\n /** Child diagnostic nodes */\n children: DiagnosticNode[];\n}\n\nexport interface DiagnosticResult {\n /** Root diagnostic tree */\n root: DiagnosticNode;\n /** Total leaf node count */\n total: number;\n /** Number of compiled leaf nodes */\n compilable: number;\n /** Coverage percentage (0-100) */\n coveragePct: number;\n /** Whether the schema is eligible for Fast Path */\n fastPathEligible: boolean;\n /** Reason Fast Path is ineligible (when fastPathEligible is false) */\n fastPathBlocker?: string;\n /** Flat list of fallback entries for summary display */\n fallbacks: { reason: string; path: string; hint: string }[];\n}\n\n// ─── Fast Path Eligibility ──────────────────────────────────────────────────\n\n/** Schema types that block Fast Path eligibility. */\nconst FAST_PATH_BLOCKERS = new Set<string>([\"fallback\", \"effect\", \"stringBool\"]);\n\n/** Check if a single node blocks Fast Path (without recursing). */\nfunction detectFastPathBlocker(ir: SchemaIR): string | null {\n if (FAST_PATH_BLOCKERS.has(ir.type)) {\n return ir.type === \"fallback\" ? `fallback (${(ir as { reason: string }).reason})` : ir.type;\n }\n if (\"coerce\" in ir && ir.coerce) {\n return `coerce (${ir.type})`;\n }\n // Value-mutating string checks make the schema slow-path only: overwrite\n // effects (.trim()/.toLowerCase()) rewrite the value and url checks trim it,\n // while the fast path returns input unchanged.\n if (ir.type === \"string\") {\n for (const check of ir.checks) {\n if (check.kind === \"overwrite_effect\") return \"overwrite (.trim()/.toLowerCase())\";\n if (check.kind === \"string_format\" && check.format === \"url\") return \"url (trims value)\";\n }\n }\n return null;\n}\n\n// ─── Hint Generation ────────────────────────────────────────────────────────\n\nconst FALLBACK_HINTS: Record<string, string> = {\n transform: \"Extract transform into a separate post-processing step\",\n refine: \"Replace .refine() with built-in checks (e.g. .min(), .max(), .regex())\",\n superRefine: \"Replace .superRefine() with built-in checks if possible\",\n custom: \"Replace z.custom() with a supported schema type\",\n lazy: \"Ensure the lazy getter resolves to a static schema (recursion compiles automatically)\",\n unsupported: \"This schema type is not yet supported by zod-compiler\",\n coalesced:\n \"Every property falls back to Zod, so the whole object is delegated once (faster than per-field delegation)\",\n};\n\nfunction getHint(reason: string): string {\n return FALLBACK_HINTS[reason] ?? \"Check zod-compiler documentation for supported schemas\";\n}\n\n// ─── Child Iteration (with path computation) ───────────────────────────────\n\n/** Yields [childPath, childIR] pairs for a given SchemaIR node. */\nfunction* iterChildren(ir: SchemaIR, parentPath: string): Generator<[string, SchemaIR]> {\n switch (ir.type) {\n case \"object\":\n for (const [key, child] of Object.entries(ir.properties)) {\n yield [`${parentPath}.${key}`, child];\n }\n break;\n case \"array\":\n yield [`${parentPath}[]`, ir.element];\n break;\n case \"tuple\":\n for (const [i, item] of ir.items.entries()) {\n yield [`${parentPath}[${i}]`, item];\n }\n if (ir.rest) yield [`${parentPath}[...rest]`, ir.rest];\n break;\n case \"record\":\n yield [`${parentPath}[key]`, ir.keyType];\n yield [`${parentPath}[value]`, ir.valueType];\n break;\n case \"set\":\n yield [`${parentPath}[element]`, ir.valueType];\n break;\n case \"map\":\n yield [`${parentPath}[key]`, ir.keyType];\n yield [`${parentPath}[value]`, ir.valueType];\n break;\n case \"union\":\n case \"discriminatedUnion\":\n for (const [i, opt] of ir.options.entries()) {\n yield [`${parentPath}[${i}]`, opt];\n }\n break;\n case \"intersection\":\n yield [`${parentPath}[left]`, ir.left];\n yield [`${parentPath}[right]`, ir.right];\n break;\n case \"optional\":\n case \"nullable\":\n case \"readonly\":\n yield [parentPath, ir.inner];\n break;\n case \"default\":\n case \"catch\":\n yield [parentPath, ir.inner];\n break;\n case \"pipe\":\n yield [`${parentPath}[in]`, ir.in];\n yield [`${parentPath}[out]`, ir.out];\n break;\n case \"effect\":\n yield [`${parentPath}[inner]`, ir.inner];\n break;\n case \"recursionTarget\":\n // Transparent wrapper around a non-root recursive sub-schema: descend so\n // coverage and any inner fallbacks are reported at the same path.\n yield [parentPath, ir.inner];\n break;\n case \"zodDelegate\":\n // The success path is compiled; only issue materialization delegates.\n yield [parentPath, ir.inner];\n break;\n }\n}\n\n// ─── Single-Pass Diagnostic Walker ──────────────────────────────────────────\n\ninterface WalkResult {\n node: DiagnosticNode;\n total: number;\n compilable: number;\n fallbacks: { reason: string; path: string; hint: string }[];\n /** First Fast Path blocker found in this subtree, or null if eligible. */\n fastPathBlocker: string | null;\n}\n\nfunction walkIR(ir: SchemaIR, currentPath: string): WalkResult {\n // Fallback leaf\n if (ir.type === \"fallback\") {\n const hint = getHint(ir.reason);\n const nodePath = currentPath || \"(root)\";\n return {\n node: {\n type: ir.type,\n path: nodePath,\n status: \"fallback\",\n reason: ir.reason,\n hint,\n children: [],\n },\n total: 1,\n compilable: 0,\n fallbacks: [{ reason: ir.reason, path: nodePath, hint }],\n fastPathBlocker: `fallback (${ir.reason})`,\n };\n }\n\n // Check if this node itself blocks Fast Path\n let fastPathBlocker = detectFastPathBlocker(ir);\n\n // Recurse into children\n const children: DiagnosticNode[] = [];\n let total = 0;\n let compilable = 0;\n const fallbacks: { reason: string; path: string; hint: string }[] = [];\n\n for (const [childPath, child] of iterChildren(ir, currentPath)) {\n const r = walkIR(child, childPath);\n children.push(r.node);\n total += r.total;\n compilable += r.compilable;\n fallbacks.push(...r.fallbacks);\n if (fastPathBlocker === null && r.fastPathBlocker !== null) {\n fastPathBlocker = r.fastPathBlocker;\n }\n }\n\n // Leaf node (no children produced by iterChildren)\n if (children.length === 0) {\n total = 1;\n compilable = 1;\n }\n\n return {\n node: {\n type: ir.type,\n path: currentPath || \"(root)\",\n status: \"compiled\",\n children,\n },\n total,\n compilable,\n fallbacks,\n fastPathBlocker,\n };\n}\n\n/**\n * Diagnose a SchemaIR in a single pass.\n * Returns a diagnostic tree with coverage stats, Fast Path eligibility, and actionable hints.\n */\nexport function diagnoseSchema(ir: SchemaIR): DiagnosticResult {\n const { node: root, total, compilable, fallbacks, fastPathBlocker } = walkIR(ir, \"\");\n const coveragePct = total > 0 ? Math.round((compilable / total) * 100) : 100;\n\n const result: DiagnosticResult = {\n root,\n total,\n compilable,\n coveragePct,\n fastPathEligible: fastPathBlocker === null,\n fallbacks,\n };\n if (fastPathBlocker !== null) {\n result.fastPathBlocker = fastPathBlocker;\n }\n return result;\n}\n"],"mappings":";;AA8CA,MAAM,qCAAqB,IAAI,IAAY;CAAC;CAAY;CAAU;AAAY,CAAC;;AAG/E,SAAS,sBAAsB,IAA6B;CAC1D,IAAI,mBAAmB,IAAI,GAAG,IAAI,GAChC,OAAO,GAAG,SAAS,aAAa,aAAc,GAA0B,OAAO,KAAK,GAAG;CAEzF,IAAI,YAAY,MAAM,GAAG,QACvB,OAAO,WAAW,GAAG,KAAK;CAK5B,IAAI,GAAG,SAAS,UACd,KAAK,MAAM,SAAS,GAAG,QAAQ;EAC7B,IAAI,MAAM,SAAS,oBAAoB,OAAO;EAC9C,IAAI,MAAM,SAAS,mBAAmB,MAAM,WAAW,OAAO,OAAO;CACvE;CAEF,OAAO;AACT;AAIA,MAAM,iBAAyC;CAC7C,WAAW;CACX,QAAQ;CACR,aAAa;CACb,QAAQ;CACR,MAAM;CACN,aAAa;CACb,WACE;AACJ;AAEA,SAAS,QAAQ,QAAwB;CACvC,OAAO,eAAe,WAAW;AACnC;;AAKA,UAAU,aAAa,IAAc,YAAmD;CACtF,QAAQ,GAAG,MAAX;EACE,KAAK;GACH,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,GAAG,UAAU,GACrD,MAAM,CAAC,GAAG,WAAW,GAAG,OAAO,KAAK;GAEtC;EACF,KAAK;GACH,MAAM,CAAC,GAAG,WAAW,KAAK,GAAG,OAAO;GAC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[],"sources":["../../../../src/core/extract/extractors/intersection.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"intersection.d.ts","names":[],"sources":["../../../../src/core/extract/extractors/intersection.ts"],"mappings":";;cAIa,qBAAqB"}
|
|
@@ -3,6 +3,19 @@ import { hasMutation } from "../../codegen/context.js";
|
|
|
3
3
|
const extractIntersection = (def, ctx) => {
|
|
4
4
|
const left = ctx.visit(def.left, "._zod.def.left");
|
|
5
5
|
const right = ctx.visit(def.right, "._zod.def.right");
|
|
6
|
+
const merged = mergeDisjointStripObjects(left, right);
|
|
7
|
+
if (merged !== null && ctx.refs) {
|
|
8
|
+
const refIndex = ctx.refs.length;
|
|
9
|
+
ctx.refs.push({
|
|
10
|
+
schema: ctx.schema,
|
|
11
|
+
accessPath: ctx.path
|
|
12
|
+
});
|
|
13
|
+
return {
|
|
14
|
+
type: "zodDelegate",
|
|
15
|
+
inner: merged,
|
|
16
|
+
refIndex
|
|
17
|
+
};
|
|
18
|
+
}
|
|
6
19
|
if (hasMutation(left) || hasMutation(right)) return ctx.fallback("unsupported");
|
|
7
20
|
return {
|
|
8
21
|
type: "intersection",
|
|
@@ -10,6 +23,25 @@ const extractIntersection = (def, ctx) => {
|
|
|
10
23
|
right
|
|
11
24
|
};
|
|
12
25
|
};
|
|
26
|
+
/** Merge only the object-intersection shape whose equivalence is statically obvious. */
|
|
27
|
+
function mergeDisjointStripObjects(left, right) {
|
|
28
|
+
if (left.type !== "object" || right.type !== "object") return null;
|
|
29
|
+
if (left.stripUnknownKeys !== true || right.stripUnknownKeys !== true) return null;
|
|
30
|
+
if (left.strict === true || right.strict === true || left.catchall !== void 0 || right.catchall !== void 0 || left.checks !== void 0 || right.checks !== void 0 || left.suppressAbsentKeys !== void 0 || right.suppressAbsentKeys !== void 0) return null;
|
|
31
|
+
const leftKeys = Object.keys(left.properties);
|
|
32
|
+
if (leftKeys.some((key) => Object.hasOwn(right.properties, key))) return null;
|
|
33
|
+
const properties = Object.create(null);
|
|
34
|
+
for (const key of leftKeys) properties[key] = left.properties[key];
|
|
35
|
+
const rightKeys = Object.keys(right.properties);
|
|
36
|
+
for (const key of rightKeys) properties[key] = right.properties[key];
|
|
37
|
+
const expectedOrder = [...leftKeys, ...rightKeys];
|
|
38
|
+
if (!Object.keys(properties).every((key, index) => key === expectedOrder[index])) return null;
|
|
39
|
+
return {
|
|
40
|
+
type: "object",
|
|
41
|
+
properties,
|
|
42
|
+
stripUnknownKeys: true
|
|
43
|
+
};
|
|
44
|
+
}
|
|
13
45
|
//#endregion
|
|
14
46
|
export { extractIntersection };
|
|
15
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intersection.js","names":[],"sources":["../../../../src/core/extract/extractors/intersection.ts"],"sourcesContent":["import { hasMutation } from \"../../codegen/context.js\";\nimport type { Extractor } from \"../types.js\";\n\nexport const extractIntersection: Extractor = (def, ctx) => {\n const left = ctx.visit(def.left, \"._zod.def.left\");\n const right = ctx.visit(def.right, \"._zod.def.right\");\n // Zod validates both sides on the ORIGINAL input and MERGES the results,\n // throwing on unmergable conflicts. The compiled generator runs the sides\n // sequentially on the same value — equivalent only when neither side\n // rewrites it. Mutating sides (coerce, trim, defaults, ...) delegate to Zod.\n if (hasMutation(left) || hasMutation(right)) {\n return ctx.fallback(\"unsupported\");\n }\n return { type: \"intersection\", left, right };\n};\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"intersection.js","names":[],"sources":["../../../../src/core/extract/extractors/intersection.ts"],"sourcesContent":["import { hasMutation } from \"../../codegen/context.js\";\nimport type { ObjectIR, SchemaIR } from \"../../types.js\";\nimport type { Extractor } from \"../types.js\";\n\nexport const extractIntersection: Extractor = (def, ctx) => {\n const left = ctx.visit(def.left, \"._zod.def.left\");\n const right = ctx.visit(def.right, \"._zod.def.right\");\n\n // The everyday `.and()` case: two default z.object() shapes with disjoint\n // keys. Zod parses each against the original input, strips each side to its\n // own keys, then merges the two outputs. A single object over the union of\n // those keys has identical acceptance and output semantics. The pristine\n // intersection remains the source of truth for cold-path issues (notably, a\n // non-object input produces one issue per side).\n const merged = mergeDisjointStripObjects(left, right);\n if (merged !== null && ctx.refs) {\n const refIndex = ctx.refs.length;\n ctx.refs.push({ schema: ctx.schema, accessPath: ctx.path });\n return { type: \"zodDelegate\", inner: merged, refIndex };\n }\n\n // Zod validates both sides on the ORIGINAL input and MERGES the results,\n // throwing on unmergable conflicts. The compiled generator runs the sides\n // sequentially on the same value — equivalent only when neither side\n // rewrites it. Mutating sides (coerce, trim, defaults, ...) delegate to Zod.\n if (hasMutation(left) || hasMutation(right)) {\n return ctx.fallback(\"unsupported\");\n }\n return { type: \"intersection\", left, right };\n};\n\n/** Merge only the object-intersection shape whose equivalence is statically obvious. */\nfunction mergeDisjointStripObjects(left: SchemaIR, right: SchemaIR): ObjectIR | null {\n if (left.type !== \"object\" || right.type !== \"object\") return null;\n if (left.stripUnknownKeys !== true || right.stripUnknownKeys !== true) return null;\n if (\n left.strict === true ||\n right.strict === true ||\n left.catchall !== undefined ||\n right.catchall !== undefined ||\n left.checks !== undefined ||\n right.checks !== undefined ||\n left.suppressAbsentKeys !== undefined ||\n right.suppressAbsentKeys !== undefined\n ) {\n return null;\n }\n\n const leftKeys = Object.keys(left.properties);\n if (leftKeys.some((key) => Object.hasOwn(right.properties, key))) return null;\n\n const properties: Record<string, SchemaIR> = Object.create(null) as Record<string, SchemaIR>;\n for (const key of leftKeys) properties[key] = left.properties[key] as SchemaIR;\n const rightKeys = Object.keys(right.properties);\n for (const key of rightKeys) {\n properties[key] = right.properties[key] as SchemaIR;\n }\n // Integer-like keys are enumerated before other strings regardless of\n // insertion order. If that changes left-then-right traversal, a successful\n // parse could observe transform/refine callbacks in a different order.\n const expectedOrder = [...leftKeys, ...rightKeys];\n if (!Object.keys(properties).every((key, index) => key === expectedOrder[index])) return null;\n return { type: \"object\", properties, stripUnknownKeys: true };\n}\n"],"mappings":";;AAIA,MAAa,uBAAkC,KAAK,QAAQ;CAC1D,MAAM,OA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AAK,UAAU,QAAQ,cAAc,MAAM,GAAG,OAAO;CACzF,OAAO;EAAE,MAAM;EAAU;EAAY,kBAAkB;CAAK;AAC9D"}
|
package/dist/core/types.d.ts
CHANGED
|
@@ -387,6 +387,17 @@ interface CustomIR {
|
|
|
387
387
|
/** z.custom() defaults to aborting a failed union option. */
|
|
388
388
|
abort: boolean;
|
|
389
389
|
}
|
|
390
|
+
/**
|
|
391
|
+
* A schema whose hot-path verdict/output can be compiled through `inner`, but
|
|
392
|
+
* whose cold issue walk delegates to the retained pristine Zod schema. Used
|
|
393
|
+
* when success semantics are simpler than exact failure semantics.
|
|
394
|
+
*/
|
|
395
|
+
interface ZodDelegateIR {
|
|
396
|
+
type: "zodDelegate";
|
|
397
|
+
inner: SchemaIR;
|
|
398
|
+
/** __rf[] index of the pristine Zod schema used by the slow error walk. */
|
|
399
|
+
refIndex: number;
|
|
400
|
+
}
|
|
390
401
|
interface FallbackIR {
|
|
391
402
|
type: "fallback";
|
|
392
403
|
reason: "transform" | "refine" | "superRefine" | "custom" | "lazy" | "unsupported" | "coalesced";
|
|
@@ -444,7 +455,7 @@ interface StringBoolIR {
|
|
|
444
455
|
interface TypeMessageCarrier {
|
|
445
456
|
typeMessage?: string;
|
|
446
457
|
}
|
|
447
|
-
type SchemaIR = TypeMessageCarrier & (StringIR | NumberIR | BooleanIR | BigIntIR | DateIR | SymbolIR | NullIR | UndefinedIR | VoidIR | NanIR | NeverIR | AnyIR | UnknownIR | LiteralIR | EnumIR | ObjectIR | ArrayIR | TupleIR | RecordIR | SetIR | MapIR | FileIR | UnionIR | DiscriminatedUnionIR | IntersectionIR | OptionalIR | NullableIR | ReadonlyIR | DefaultIR | PipeIR | TransformEffectIR | CustomIR | TemplateLiteralIR | CatchIR | FallbackIR | RecursiveRefIR | RecursionTargetIR | StringBoolIR);
|
|
458
|
+
type SchemaIR = TypeMessageCarrier & (StringIR | NumberIR | BooleanIR | BigIntIR | DateIR | SymbolIR | NullIR | UndefinedIR | VoidIR | NanIR | NeverIR | AnyIR | UnknownIR | LiteralIR | EnumIR | ObjectIR | ArrayIR | TupleIR | RecordIR | SetIR | MapIR | FileIR | UnionIR | DiscriminatedUnionIR | IntersectionIR | OptionalIR | NullableIR | ReadonlyIR | DefaultIR | PipeIR | TransformEffectIR | CustomIR | ZodDelegateIR | TemplateLiteralIR | CatchIR | FallbackIR | RecursiveRefIR | RecursionTargetIR | StringBoolIR);
|
|
448
459
|
interface SafeParseSuccess<T> {
|
|
449
460
|
success: true;
|
|
450
461
|
data: T;
|
|
@@ -484,5 +495,5 @@ interface CompiledSchema<T> {
|
|
|
484
495
|
is(input: unknown): input is T;
|
|
485
496
|
}
|
|
486
497
|
//#endregion
|
|
487
|
-
export { AnyIR, ArrayIR, BigIntCheckIR, BigIntIR, BooleanIR, CatchIR, CheckBase, CheckBigIntGreaterThan, CheckBigIntLessThan, CheckBigIntMultipleOf, CheckDateGreaterThan, CheckDateLessThan, CheckEndsWith, CheckGreaterThan, CheckIR, CheckIncludes, CheckLengthEquals, CheckLessThan, CheckMaxLength, CheckMaxSize, CheckMimeType, CheckMinLength, CheckMinSize, CheckMultipleOf, CheckNumberFormat, CheckOrEffectIR, CheckSizeEquals, CheckStartsWith, CheckStringFormat, CompiledSchema, CustomIR, DateCheckIR, DateIR, DefaultIR, DiscoveredSchema, DiscriminatedUnionIR, EnumIR, FallbackIR, FileCheckIR, FileIR, IntersectionIR, LiteralIR, MapIR, NanIR, NeverIR, NullIR, NullableIR, NumberIR, ObjectIR, OptionalIR, OverwriteEffectCheckIR, PipeIR, ReadonlyIR, RecordIR, RecursionTargetIR, RecursiveRefIR, RefineEffectCheckIR, SafeParseError, SafeParseResult, SafeParseSuccess, SchemaIR, SetCheckIR, SetIR, StringBoolIR, StringIR, SuperRefineEffectCheckIR, SymbolIR, TemplateLiteralIR, TransformEffectIR, TupleIR, TypeMessageCarrier, UndefinedIR, UnionIR, UnknownIR, VoidIR, ZodErrorLike, ZodIssueLike };
|
|
498
|
+
export { AnyIR, ArrayIR, BigIntCheckIR, BigIntIR, BooleanIR, CatchIR, CheckBase, CheckBigIntGreaterThan, CheckBigIntLessThan, CheckBigIntMultipleOf, CheckDateGreaterThan, CheckDateLessThan, CheckEndsWith, CheckGreaterThan, CheckIR, CheckIncludes, CheckLengthEquals, CheckLessThan, CheckMaxLength, CheckMaxSize, CheckMimeType, CheckMinLength, CheckMinSize, CheckMultipleOf, CheckNumberFormat, CheckOrEffectIR, CheckSizeEquals, CheckStartsWith, CheckStringFormat, CompiledSchema, CustomIR, DateCheckIR, DateIR, DefaultIR, DiscoveredSchema, DiscriminatedUnionIR, EnumIR, FallbackIR, FileCheckIR, FileIR, IntersectionIR, LiteralIR, MapIR, NanIR, NeverIR, NullIR, NullableIR, NumberIR, ObjectIR, OptionalIR, OverwriteEffectCheckIR, PipeIR, ReadonlyIR, RecordIR, RecursionTargetIR, RecursiveRefIR, RefineEffectCheckIR, SafeParseError, SafeParseResult, SafeParseSuccess, SchemaIR, SetCheckIR, SetIR, StringBoolIR, StringIR, SuperRefineEffectCheckIR, SymbolIR, TemplateLiteralIR, TransformEffectIR, TupleIR, TypeMessageCarrier, UndefinedIR, UnionIR, UnknownIR, VoidIR, ZodDelegateIR, ZodErrorLike, ZodIssueLike };
|
|
488
499
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/core/types.ts"],"mappings":";;;;;;UAQiB;;EAEf;;UAGe,uBAAuB;EACtC;EACA;;UAGe,uBAAuB;EACtC;EACA;;UAGe,0BAA0B;EACzC;EACA;;UAGe,yBAAyB;EACxC;EACA;EACA;;UAGe,sBAAsB;EACrC;EACA;EACA;;UAGe,wBAAwB;EACvC;EACA;;UAGe,0BAA0B;EACzC;EACA;;UAGe,0BAA0B;EACzC;EACA;EACA;;EAEA;;EAEA;EACA;;EAEA;EACA;;EAEA;;UAGe,sBAAsB;E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;EACA,SAAS;;UAKM;EACf;EACA,SAAS;;UAGM;EACf;EACA;EACA,SAAS;;;;;;EAMT;IAAS;IAA8D;;;UAGxD;EACf;EACA,MAAM;EACN,OAAO;;UAKQ;EACf;EACA,OAAO;;UAGQ;EACf;EACA,OAAO;;UAGQ;EACf;EACA,OAAO;;UAGQ;EACf;EACA,OAAO;EACP;;;;;;;;;;;EAWA;;UAGe;EACf;EACA,IAAI;EACJ,KAAK;;UAKU;EACf;EACA;;;;;EAKA;;;;;;;EAOA;;EAEA,OAAO;;;;;;UASQ;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;EACf;EACA;;EAEA;;UAGe;EACf;EACA;;UAGe;EACf;EACA,OAAO;;EAEP;;UAGe;EACf;;;;;;;;;EASA;;;;;;;;;;UAWe;EACf;EACA;EACA,OAAO;;UAGQ;EACf;EACA;EACA;EACA;;;;;;;;;UAYe;EACf;;KAGU,WAAW,sBAGjB,WACA,WACA,YACA,WACA,SACA,WACA,SACA,cACA,SACA,QACA,UACA,QACA,YACA,YACA,SAEA,WACA,UACA,UACA,WACA,QACA,QACA,SAEA,UACA,uBACA,iBAEA,aACA,aACA,aACA,YACA,SAEA,oBAEA,WACA,oBACA,UACA,aACA,iBACA,oBACA;UAKW,iBAAiB;EAChC;EACA,MAAM;;UAGS;EACf;EACA,OAAO;;KAGG,gBAAgB,KAAK,iBAAiB,KAAK;UAEtC;EACf;EACA;EACA;GAEC;;UAGc;EACf,QAAQ;;UAGO;EACf;EACA;;UAGe,eAAe;EAC9B,MAAM,iBAAiB;EACvB,WAAW,iBAAiB,QAAQ;EACpC,UAAU,iBAAiB,gBAAgB;EAC3C,eAAe,iBAAiB,QAAQ,gBAAgB;;;;;;;;;;EAUxD,GAAG,iBAAiB,SAAS"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/core/types.ts"],"mappings":";;;;;;UAQiB;;EAEf;;UAGe,uBAAuB;EACtC;EACA;;UAGe,uBAAuB;EACtC;E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