@zod-to-form/codegen 0.6.2
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/LICENSE +21 -0
- package/dist/config-template.d.ts +36 -0
- package/dist/config-template.d.ts.map +1 -0
- package/dist/config-template.js +113 -0
- package/dist/config-template.js.map +1 -0
- package/dist/field-templates.d.ts +10 -0
- package/dist/field-templates.d.ts.map +1 -0
- package/dist/field-templates.js +105 -0
- package/dist/field-templates.js.map +1 -0
- package/dist/generate.d.ts +31 -0
- package/dist/generate.d.ts.map +1 -0
- package/dist/generate.js +564 -0
- package/dist/generate.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/schema-lite-codegen.d.ts +9 -0
- package/dist/schema-lite-codegen.d.ts.map +1 -0
- package/dist/schema-lite-codegen.js +130 -0
- package/dist/schema-lite-codegen.js.map +1 -0
- package/dist/templates.d.ts +13 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +191 -0
- package/dist/templates.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build a tree grouping dot-paths by their first segment.
|
|
3
|
+
* Returns a map from topKey to either null (leaf) or a list of sub-paths.
|
|
4
|
+
*/
|
|
5
|
+
function buildPathTree(paths) {
|
|
6
|
+
const tree = new Map();
|
|
7
|
+
for (const path of paths) {
|
|
8
|
+
const dotIndex = path.indexOf('.');
|
|
9
|
+
if (dotIndex === -1) {
|
|
10
|
+
tree.set(path, null);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
const topKey = path.slice(0, dotIndex);
|
|
14
|
+
const rest = path.slice(dotIndex + 1);
|
|
15
|
+
const sub = tree.get(topKey);
|
|
16
|
+
if (sub === null) {
|
|
17
|
+
// topKey was previously a direct leaf (no nested sub-path).
|
|
18
|
+
// Convert to a nested-path list to include this new sub-path.
|
|
19
|
+
tree.set(topKey, [rest]);
|
|
20
|
+
}
|
|
21
|
+
else if (sub === undefined) {
|
|
22
|
+
tree.set(topKey, [rest]);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
sub.push(rest);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return tree;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Emit a shape-access expression for a path segment tree node.
|
|
33
|
+
* accessPath: schema property segments already navigated (used to build shape accessor).
|
|
34
|
+
* subPaths: null for a leaf (direct shape access), or array of remaining sub-paths to merge.
|
|
35
|
+
*/
|
|
36
|
+
function emitShapeNode(exportName, accessPath, subPaths) {
|
|
37
|
+
const accessor = accessPath.map((seg) => `._zod.def.shape[${JSON.stringify(seg)}]`).join('');
|
|
38
|
+
const fullAccess = `${exportName}${accessor}`;
|
|
39
|
+
if (subPaths === null) {
|
|
40
|
+
return fullAccess;
|
|
41
|
+
}
|
|
42
|
+
// Group sub-paths and emit a merged z.object().loose() for this level
|
|
43
|
+
const subTree = buildPathTree(subPaths);
|
|
44
|
+
const entries = [];
|
|
45
|
+
for (const [key, nested] of subTree) {
|
|
46
|
+
const expr = emitShapeNode(exportName, [...accessPath, key], nested);
|
|
47
|
+
entries.push(`${JSON.stringify(key)}: ${expr}`);
|
|
48
|
+
}
|
|
49
|
+
return `z.object({ ${entries.join(', ')} }).loose()`;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Emit the base lite schema: z.object({...fallthrough}).loose()
|
|
53
|
+
* Fallthrough fields are referenced from the imported schema's shape.
|
|
54
|
+
* Paths sharing the same top-level key are merged into a single z.object entry.
|
|
55
|
+
*/
|
|
56
|
+
function emitLiteBase(exportName, fallthroughFields) {
|
|
57
|
+
if (fallthroughFields.length === 0) {
|
|
58
|
+
return `let _lite: any = z.object({}).loose();`;
|
|
59
|
+
}
|
|
60
|
+
const topTree = buildPathTree(fallthroughFields);
|
|
61
|
+
const entries = [];
|
|
62
|
+
for (const [key, subPaths] of topTree) {
|
|
63
|
+
const expr = emitShapeNode(exportName, [key], subPaths);
|
|
64
|
+
entries.push(`${JSON.stringify(key)}: ${expr}`);
|
|
65
|
+
}
|
|
66
|
+
return `let _lite: any = z.object({ ${entries.join(', ')} }).loose();`;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Generate the content of a .lite.ts file that constructs a lite schema
|
|
70
|
+
* from the imported schema's check objects at runtime.
|
|
71
|
+
*
|
|
72
|
+
* Returns null if no schemaLite is needed (no top-level effects).
|
|
73
|
+
*/
|
|
74
|
+
export function generateSchemaLiteFile(schemaImportPath, exportName, info) {
|
|
75
|
+
if (!info)
|
|
76
|
+
return null;
|
|
77
|
+
const lines = [];
|
|
78
|
+
// Non-decomposable pipe — re-export the original schema
|
|
79
|
+
if (info.type === 'original') {
|
|
80
|
+
lines.push(`import { ${exportName} } from '${schemaImportPath}';`);
|
|
81
|
+
lines.push('');
|
|
82
|
+
lines.push(`export const schemaLite = ${exportName};`);
|
|
83
|
+
lines.push('');
|
|
84
|
+
return lines.join('\n');
|
|
85
|
+
}
|
|
86
|
+
// Checks-only case: z.object({...fallthrough}).loose().check(c1).check(c2)
|
|
87
|
+
if (info.type === 'checks') {
|
|
88
|
+
lines.push(`import { z } from 'zod';`);
|
|
89
|
+
lines.push(`import { ${exportName} } from '${schemaImportPath}';`);
|
|
90
|
+
lines.push('');
|
|
91
|
+
lines.push(emitLiteBase(exportName, info.fallthroughFields));
|
|
92
|
+
lines.push(`const _parentCheckCount = ${exportName}._zod.parent?._zod.def.checks?.length ?? 0;`);
|
|
93
|
+
lines.push(`const _checks = (${exportName}._zod.def.checks ?? []).slice(_parentCheckCount);`);
|
|
94
|
+
lines.push(`for (const _c of _checks) _lite = _lite.check(_c);`);
|
|
95
|
+
lines.push(`export const schemaLite = _lite;`);
|
|
96
|
+
lines.push('');
|
|
97
|
+
return lines.join('\n');
|
|
98
|
+
}
|
|
99
|
+
// Transform case: extract inner checks + transform fn + outer checks
|
|
100
|
+
if (info.type === 'transform') {
|
|
101
|
+
lines.push(`import { z } from 'zod';`);
|
|
102
|
+
lines.push(`import { ${exportName} } from '${schemaImportPath}';`);
|
|
103
|
+
lines.push('');
|
|
104
|
+
lines.push(`const _def = ${exportName}._zod.def;`);
|
|
105
|
+
lines.push(emitLiteBase(exportName, info.fallthroughFields));
|
|
106
|
+
lines.push('');
|
|
107
|
+
if (info.hasInnerChecks) {
|
|
108
|
+
lines.push(`// Inner checks (superRefine/refine before transform)`);
|
|
109
|
+
lines.push(`const _inner = _def.type === 'pipe' ? _def.in : ${exportName};`);
|
|
110
|
+
lines.push(`const _parentChecks = _inner._zod.parent?._zod.def.checks?.length ?? 0;`);
|
|
111
|
+
lines.push(`for (const _c of (_inner._zod.def.checks ?? []).slice(_parentChecks)) _lite = _lite.check(_c);`);
|
|
112
|
+
lines.push('');
|
|
113
|
+
}
|
|
114
|
+
lines.push(`// Transform`);
|
|
115
|
+
lines.push(`if (_def.type === 'pipe' && _def.out?._zod.def.transform) {`);
|
|
116
|
+
lines.push(` _lite = _lite.transform(_def.out._zod.def.transform);`);
|
|
117
|
+
lines.push(`}`);
|
|
118
|
+
if (info.hasOuterChecks) {
|
|
119
|
+
lines.push('');
|
|
120
|
+
lines.push(`// Outer checks (superRefine/refine after transform)`);
|
|
121
|
+
lines.push(`for (const _c of (_def.checks ?? [])) _lite = _lite.check(_c);`);
|
|
122
|
+
}
|
|
123
|
+
lines.push('');
|
|
124
|
+
lines.push(`export const schemaLite = _lite;`);
|
|
125
|
+
lines.push('');
|
|
126
|
+
return lines.join('\n');
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=schema-lite-codegen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-lite-codegen.js","sourceRoot":"","sources":["../src/schema-lite-codegen.ts"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AAC,kCAAkC,CAAC,CAAC;QAC/C,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FormField } from '@zod-to-form/core';
|
|
2
|
+
export declare function getFileHeader(schemaImportPath: string, exportName: string, hasArrays?: boolean, mode?: 'submit' | 'auto-save', componentImportLine?: string, options?: {
|
|
3
|
+
hasControlled?: boolean;
|
|
4
|
+
formProvider?: boolean;
|
|
5
|
+
preset?: 'shadcn' | 'html';
|
|
6
|
+
}, optimized?: {
|
|
7
|
+
includeZodResolver: boolean;
|
|
8
|
+
includeZod: boolean;
|
|
9
|
+
}): string;
|
|
10
|
+
export declare function registerPathExpr(path: string): string;
|
|
11
|
+
export declare function renderOptimizedRegister(field: FormField, fieldKey: string): string;
|
|
12
|
+
export declare function renderField(field: FormField, regExpr?: string): string;
|
|
13
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAgEnD,wBAAgB,aAAa,CAC3B,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,EAClB,SAAS,UAAQ,EACjB,IAAI,GAAE,QAAQ,GAAG,WAAsB,EACvC,mBAAmB,CAAC,EAAE,MAAM,EAC5B,OAAO,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;CAAE,EACzF,SAAS,CAAC,EAAE;IAAE,kBAAkB,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,GAC/D,MAAM,CA8BR;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAuCD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA6DlF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAmBtE"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// ─── Inlined type utility (zero-dep codegen) ─────────────────────────
|
|
2
|
+
const STRIP_INDEX_SIGNATURE_TYPE = `type StripIndexSignature<T> = T extends readonly (infer U)[]
|
|
3
|
+
? StripIndexSignature<U>[]
|
|
4
|
+
: T extends object
|
|
5
|
+
? {
|
|
6
|
+
[K in keyof T as string extends K
|
|
7
|
+
? never
|
|
8
|
+
: number extends K
|
|
9
|
+
? never
|
|
10
|
+
: symbol extends K
|
|
11
|
+
? never
|
|
12
|
+
: K]: StripIndexSignature<T[K]>;
|
|
13
|
+
}
|
|
14
|
+
: T;`;
|
|
15
|
+
// ─── Inlined normalizeFormValues (zero-dep codegen for html preset) ──
|
|
16
|
+
const NORMALIZE_FORM_VALUES_BLOCK = `function isPlainObject(value: unknown): value is Record<string, unknown> {
|
|
17
|
+
if (!value || typeof value !== 'object') {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return Object.prototype.toString.call(value) === '[object Object]';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function isFileListLike(value: unknown): value is FileList & { [index: number]: File } {
|
|
25
|
+
if (!value || typeof value !== 'object') {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const candidate = value as {
|
|
30
|
+
length?: unknown;
|
|
31
|
+
item?: unknown;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return typeof candidate.length === 'number' && typeof candidate.item === 'function';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function normalizeFormValues(value: unknown): unknown {
|
|
38
|
+
if (isFileListLike(value)) {
|
|
39
|
+
return value.length > 0 ? (value.item(0) ?? value[0]) : undefined;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (value === '') {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (Array.isArray(value)) {
|
|
47
|
+
return value.map((item) => normalizeFormValues(item));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (isPlainObject(value)) {
|
|
51
|
+
const entries = Object.entries(value as Record<string, unknown>).map(([key, nested]) => [
|
|
52
|
+
key,
|
|
53
|
+
normalizeFormValues(nested)
|
|
54
|
+
]);
|
|
55
|
+
|
|
56
|
+
return Object.fromEntries(entries);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return value;
|
|
60
|
+
}`;
|
|
61
|
+
export function getFileHeader(schemaImportPath, exportName, hasArrays = false, mode = 'submit', componentImportLine, options, optimized) {
|
|
62
|
+
const rhfParts = ['useForm'];
|
|
63
|
+
if (hasArrays)
|
|
64
|
+
rhfParts.push('useFieldArray');
|
|
65
|
+
if (options?.hasControlled)
|
|
66
|
+
rhfParts.push('Controller');
|
|
67
|
+
if (options?.formProvider || mode === 'auto-save')
|
|
68
|
+
rhfParts.push('FormProvider');
|
|
69
|
+
const rhfImports = `import { ${rhfParts.join(', ')} } from 'react-hook-form';`;
|
|
70
|
+
const reactImports = mode === 'auto-save' ? `import { useEffect } from 'react';` : '';
|
|
71
|
+
const isShadcn = options?.preset === 'shadcn';
|
|
72
|
+
// When optimized, conditionally include zodResolver and zod imports
|
|
73
|
+
const includeZodResolver = optimized ? optimized.includeZodResolver : true;
|
|
74
|
+
const includeZod = optimized ? optimized.includeZod : true;
|
|
75
|
+
return [
|
|
76
|
+
...(reactImports ? [reactImports] : []),
|
|
77
|
+
rhfImports,
|
|
78
|
+
...(includeZodResolver ? [`import { zodResolver } from '@hookform/resolvers/zod';`] : []),
|
|
79
|
+
...(includeZod ? [`import { z } from 'zod';`] : []),
|
|
80
|
+
...(componentImportLine ? [componentImportLine] : []),
|
|
81
|
+
`import { ${exportName} } from '${schemaImportPath}';`,
|
|
82
|
+
``,
|
|
83
|
+
STRIP_INDEX_SIGNATURE_TYPE,
|
|
84
|
+
``,
|
|
85
|
+
...(includeZod
|
|
86
|
+
? [`type FormData = StripIndexSignature<z.output<typeof ${exportName}>>;`]
|
|
87
|
+
: [`type FormData = StripIndexSignature<import('zod').output<typeof ${exportName}>>;`]),
|
|
88
|
+
...(!isShadcn ? [``, NORMALIZE_FORM_VALUES_BLOCK] : [])
|
|
89
|
+
].join('\n');
|
|
90
|
+
}
|
|
91
|
+
export function registerPathExpr(path) {
|
|
92
|
+
return path.includes('${') ? `register(\`${path}\`)` : `register('${path}')`;
|
|
93
|
+
}
|
|
94
|
+
function disabledAttr(field) {
|
|
95
|
+
return field.disabled ? ' disabled' : '';
|
|
96
|
+
}
|
|
97
|
+
function renderInput(field, regExpr) {
|
|
98
|
+
const inputType = typeof field.props['type'] === 'string' ? field.props['type'] : 'text';
|
|
99
|
+
const reg = regExpr ?? registerPathExpr(field.key);
|
|
100
|
+
return `<input id="${field.key}" type="${inputType}"${disabledAttr(field)} {...${reg}} />`;
|
|
101
|
+
}
|
|
102
|
+
function renderCheckbox(field, regExpr) {
|
|
103
|
+
const reg = regExpr ?? registerPathExpr(field.key);
|
|
104
|
+
return `<input id="${field.key}" type="checkbox"${disabledAttr(field)} {...${reg}} />`;
|
|
105
|
+
}
|
|
106
|
+
function renderDatePicker(field, regExpr) {
|
|
107
|
+
const reg = regExpr ??
|
|
108
|
+
(field.key.includes('${')
|
|
109
|
+
? `register(\`${field.key}\`, { valueAsDate: true })`
|
|
110
|
+
: `register('${field.key}', { valueAsDate: true })`);
|
|
111
|
+
return `<input id="${field.key}" type="date"${disabledAttr(field)} {...${reg}} />`;
|
|
112
|
+
}
|
|
113
|
+
function renderFileInput(field, regExpr) {
|
|
114
|
+
const reg = regExpr ?? registerPathExpr(field.key);
|
|
115
|
+
return `<input id="${field.key}" type="file"${disabledAttr(field)} {...${reg}} />`;
|
|
116
|
+
}
|
|
117
|
+
function renderSelect(field, regExpr) {
|
|
118
|
+
const options = (field.options ?? [])
|
|
119
|
+
.map((option) => `<option value="${String(option.value)}">${option.label}</option>`)
|
|
120
|
+
.join('');
|
|
121
|
+
const reg = regExpr ?? registerPathExpr(field.key);
|
|
122
|
+
return `<select id="${field.key}"${disabledAttr(field)} {...${reg}}>${options}</select>`;
|
|
123
|
+
}
|
|
124
|
+
export function renderOptimizedRegister(field, fieldKey) {
|
|
125
|
+
const mode = field.validation?.mode;
|
|
126
|
+
if (mode === 'native') {
|
|
127
|
+
const rules = field.validation?.rules;
|
|
128
|
+
if (!rules || Object.keys(rules).length === 0) {
|
|
129
|
+
return registerPathExpr(fieldKey);
|
|
130
|
+
}
|
|
131
|
+
const parts = [];
|
|
132
|
+
if (rules.required !== undefined) {
|
|
133
|
+
parts.push(`required: ${JSON.stringify(rules.required)}`);
|
|
134
|
+
}
|
|
135
|
+
if (rules.minLength !== undefined) {
|
|
136
|
+
parts.push(`minLength: { value: ${rules.minLength.value}, message: ${JSON.stringify(rules.minLength.message)} }`);
|
|
137
|
+
}
|
|
138
|
+
if (rules.maxLength !== undefined) {
|
|
139
|
+
parts.push(`maxLength: { value: ${rules.maxLength.value}, message: ${JSON.stringify(rules.maxLength.message)} }`);
|
|
140
|
+
}
|
|
141
|
+
if (rules.min !== undefined) {
|
|
142
|
+
parts.push(`min: { value: ${rules.min.value}, message: ${JSON.stringify(rules.min.message)} }`);
|
|
143
|
+
}
|
|
144
|
+
if (rules.max !== undefined) {
|
|
145
|
+
parts.push(`max: { value: ${rules.max.value}, message: ${JSON.stringify(rules.max.message)} }`);
|
|
146
|
+
}
|
|
147
|
+
if (rules.pattern !== undefined) {
|
|
148
|
+
parts.push(`pattern: { value: ${rules.pattern.value}, message: ${JSON.stringify(rules.pattern.message)} }`);
|
|
149
|
+
}
|
|
150
|
+
const rulesStr = parts.join(', ');
|
|
151
|
+
if (fieldKey.includes('${')) {
|
|
152
|
+
return `register(\`${fieldKey}\`, { ${rulesStr} })`;
|
|
153
|
+
}
|
|
154
|
+
return `register('${fieldKey}', { ${rulesStr} })`;
|
|
155
|
+
}
|
|
156
|
+
if (mode === 'zodSchema') {
|
|
157
|
+
const safeKey = fieldKey.replace(/[^a-zA-Z0-9_]/g, '_');
|
|
158
|
+
if (fieldKey.includes('${')) {
|
|
159
|
+
return `register(\`${fieldKey}\`, { validate: _validate_${safeKey} })`;
|
|
160
|
+
}
|
|
161
|
+
return `register('${fieldKey}', { validate: _validate_${safeKey} })`;
|
|
162
|
+
}
|
|
163
|
+
if (mode === 'component-enforced') {
|
|
164
|
+
return registerPathExpr(fieldKey);
|
|
165
|
+
}
|
|
166
|
+
// TODO(L3): Handle watch mode when cross-field optimization is implemented
|
|
167
|
+
// if (mode === 'watch') { ... }
|
|
168
|
+
// undefined validation — backward compatible
|
|
169
|
+
return registerPathExpr(fieldKey);
|
|
170
|
+
}
|
|
171
|
+
export function renderField(field, regExpr) {
|
|
172
|
+
switch (field.component) {
|
|
173
|
+
case 'Checkbox':
|
|
174
|
+
case 'Switch':
|
|
175
|
+
return renderCheckbox(field, regExpr);
|
|
176
|
+
case 'DatePicker':
|
|
177
|
+
return renderDatePicker(field, regExpr);
|
|
178
|
+
case 'FileInput':
|
|
179
|
+
return renderFileInput(field, regExpr);
|
|
180
|
+
case 'Select':
|
|
181
|
+
case 'RadioGroup':
|
|
182
|
+
return renderSelect(field, regExpr);
|
|
183
|
+
case 'Textarea': {
|
|
184
|
+
const reg = regExpr ?? registerPathExpr(field.key);
|
|
185
|
+
return `<textarea id="${field.key}"${disabledAttr(field)} {...${reg}} />`;
|
|
186
|
+
}
|
|
187
|
+
default:
|
|
188
|
+
return renderInput(field, regExpr);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=templates.js.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O,KAAK,CAAC;IACvE,CAAC;IAED,IAAI,IAAI,KAAK,oBAAoB,EAAE,CAAC;QAClC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED,2EAA2E;IAC3E,gCAAgC;IAEhC,6CAA6C;IAC7C,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAgB,EAAE,OAAgB;IAC5D,QAAQ,KAAK,CAAC,SAAS,EAAE,CAAC;QACxB,KAAK,UAAU,CAAC;QAChB,KAAK,QAAQ;YACX,OAAO,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACxC,KAAK,YAAY;YACf,OAAO,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC1C,KAAK,WAAW;YACd,OAAO,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACzC,KAAK,QAAQ,CAAC;QACd,KAAK,YAAY;YACf,OAAO,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACtC,KAAK,UAAU,EAAE,CAAC;YAChB,MAAM,GAAG,GAAG,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnD,OAAO,iBAAiB,KAAK,CAAC,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;QAC5E,CAAC;QACD;YACE,OAAO,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"7.0.0-dev.20260409.1","root":[[94,95],[199,202]],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts","lib.dom.asynciterable.d.ts","lib.webworker.importscripts.d.ts","lib.scripthost.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","lib.esnext.full.d.ts","../src/config-template.ts","../src/field-templates.ts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/standard-schema.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ar.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/az.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/be.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/bg.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ca.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/cs.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/da.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/de.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/en.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/eo.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/es.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fa.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fi.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr-ca.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/he.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hu.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hy.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/id.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/is.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/it.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ja.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ka.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/kh.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/km.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ko.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/lt.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/mk.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ms.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/nl.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/no.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ota.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ps.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pl.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pt.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ru.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sl.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sv.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ta.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/th.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/tr.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ua.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uk.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ur.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uz.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/vi.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-cn.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-tw.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/yo.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/index.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.d.cts","../../core/dist/optimizers/types.d.ts","../../core/dist/types.d.ts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/checks.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.d.cts","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.d.cts","../../core/dist/config.d.ts","../../core/dist/optimizers/schema-lite.d.ts","../../core/dist/optimizers/index.d.ts","../../core/dist/utils.d.ts","../../core/dist/normalize.d.ts","../../core/dist/walker.d.ts","../../core/dist/registry.d.ts","../../core/dist/register.d.ts","../../core/dist/processors/array.d.ts","../../core/dist/processors/boolean.d.ts","../../core/dist/processors/collections.d.ts","../../core/dist/processors/cross-ref.d.ts","../../core/dist/processors/date.d.ts","../../core/dist/processors/enum.d.ts","../../core/dist/processors/fallback.d.ts","../../core/dist/processors/file.d.ts","../../core/dist/processors/number.d.ts","../../core/dist/processors/object.d.ts","../../core/dist/processors/record.d.ts","../../core/dist/processors/string.d.ts","../../core/dist/processors/union.d.ts","../../core/dist/processors/wrappers.d.ts","../../core/dist/processors/index.d.ts","../../core/dist/index.d.ts","../src/templates.ts","../src/generate.ts","../src/schema-lite-codegen.ts","../src/index.ts"],"fileInfos":[{"version":"a1aa1a5e065d48ef5c7bb99e38412f96","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},"abad6dd56cc8caf095c165df8124d237","abad6dd56cc8caf095c165df8124d237",{"version":"2a9941db0809c9ad0e8837ed629b1dcc","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d051b93324f36bcc68d152a5ca0988cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"01ac052ec4a79e87229f90466a9645f8","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"edba5df642941aa062a62f6328c6df3d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bb3a710cbcda0533bb127712927cbe37","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7a42de379b489e8f7b647455bebfc576","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"692bcd75364db0f65d428801c7884466","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},"2bccd8eaa1dc27e6e29feb6b1baad635",{"version":"1507acc562ecfffaf206b5a5f4162695","impliedNodeFormat":99},{"version":"be05cc0f86413ceb6d78d6f099a26fdd","impliedNodeFormat":99},"5f3c015bce4302b247acedb9ec20e302","a9fe29dcdd4288cacf574947747a4572","daada721cfdc43aa8e7c2e2d14d760de","c4d7f2ab9358166b1815281a9e767232","2af86ade36e4051944f46da0fd1df525","90eb781c9a8145090ce17290f0744bb6","a3ddf6412484d665d76145ba7fa319a8","b53e5eafe089103ad7be4f243fb517d4","344aa18a1a1f48b6d51fa564e2910864","ffd8c3d2e39447925561777d1ebcdc02","2b76267afeb2e83dff758e3fba2faa8a","662eae47724ed2ca873fb608034d0645","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","ee9981834b9f6f6958887811182849e8","360c84ef5634445ed4b1111f041b6212","a21f1b172546b6a64cc7ddea394b54ea","937e86ab76f06c8dbd613be6555c03b6","8bdf05c98551836db89f23d60d176f56","5b3f18777c97e7ed444a39661c4462ba","cd3b63580b271a0e93649c0d92a1b098",{"version":"9a7cbc7dc36c43d05d2acf730dda6f59","impliedNodeFormat":99},{"version":"35cd7f088d1df05e67f06d5dd70279b0","impliedNodeFormat":99},"1cc59f020b9d62d875bdb28a6e2f745b","a06c5977df8ff3f289f16a7505c8d539","652a1f711ddcd6149df9fc04c2d77ec7","f04158c558df8c51d46a1fb44c832c1c","d1ab6402ad42100de1cf3f5d15aa9d27","96b06af537c71de0a80e9ed880958afd","dec40354e62d8ca81f5996c1760bc6da","a9356de7c324c6f49c15587032b1f65f","9db07004a5d271a5a4c3f499ed8a033f","ec7a3f5e189221b1a18bed55a592c89d",{"version":"b715af1b533dfeb7b731046c36e4f9d0","impliedNodeFormat":99},{"version":"57187c3662e0f61251ab80ab4a0dcf5e","impliedNodeFormat":99},{"version":"b011948350577c1775323c1abdc92593","impliedNodeFormat":99},{"version":"b9f5beb16ec29a643a18f2710e6ab8cf","impliedNodeFormat":99},{"version":"51a99a7c4c7a91d6a5d0103ef169223b","impliedNodeFormat":99},{"version":"1faa8079d1ff468d6507594d5c2bb36a","impliedNodeFormat":99},{"version":"da2cee76df984eb69f641bc5dcf5970e","impliedNodeFormat":99},{"version":"6716e4c858ed7ee70cb8846cf0223a88","impliedNodeFormat":99},{"version":"bccce23c34971db632104705f65a595c","impliedNodeFormat":99},{"version":"a33833cc284c22825e0eccfcdfff6256","impliedNodeFormat":99},{"version":"c97ee7bccbb053ec690e3d702042d546","impliedNodeFormat":99},{"version":"9b0ab8bb6f31fcd9ce437f3d36eeb528","impliedNodeFormat":99},{"version":"2b0c25b572cd9c0b48a0ec3ed5cfaf24","impliedNodeFormat":99},{"version":"80041c2ea4a184163312962b1a0e1c19","impliedNodeFormat":99},{"version":"87116ed9ba0319857bbabb9e1c50ae38","impliedNodeFormat":99},{"version":"53cc58e156b379d4474acf702f52fc30","impliedNodeFormat":99},{"version":"66a9a679b511d30da89f864a53e26640","impliedNodeFormat":99},{"version":"429edca76a814d7dfc00b70847a36a43","impliedNodeFormat":99},{"version":"fe3a2780f0f7ce6942e6ae6ac6f7a904","impliedNodeFormat":99},{"version":"67646086ede19f92abe044ed46dfcbe2","impliedNodeFormat":99},{"version":"1ef6c778511d6b2c61c7d75d11678f4d","impliedNodeFormat":99},{"version":"f15fe88857c3b4751f45c409079c01a9","impliedNodeFormat":99},{"version":"ac749fdc0cbd097ab93e6edd113165dc","impliedNodeFormat":99},{"version":"c866296e587f40c979cdeb73c5cb8697","impliedNodeFormat":99},{"version":"75a9c0797807ab5e0020431a5878ecf4","impliedNodeFormat":99},{"version":"f1c457a048a7b32cd87fa29c12e2f4a7","impliedNodeFormat":99},{"version":"cd613c4e803287c53d78c9e6602ad3e4","impliedNodeFormat":99},{"version":"b62fefa948e495297a897fabd7efcb71","impliedNodeFormat":99}],"fileIdsList":[[173],[162],[162,167],[157,160,162,165,166,167,168,169,170,171,172],[96,98,167],[162,165],[97,162,166],[98,100,102,103,104,105],[100,102,104,105],[100,102,104],[97,100,102,103,105],[96,98,99,100,101,102,103,104,105,106,107,157,158,159,160,161],[96,98,99,102],[98,99,102],[102,105],[96,97,99,100,101,103,104,105],[96,97,98,102,162],[102,103,104,105],[104],[108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156],[95,162,198,199],[94,95,199,200,201],[198],[162,164,174],[164,175,177,178,179,180,181,182,197],[163,176],[162,163],[162,164],[183,184,185,186,187,188,189,190,191,192,193,194,195,196],[164],[162,163,164]],"options":{"allowJs":false,"composite":true,"declaration":true,"declarationMap":true,"module":199,"noPropertyAccessFromIndexSignature":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"..","skipLibCheck":true,"strict":true,"sourceMap":true,"target":99,"verbatimModuleSyntax":true,"allowSyntheticDefaultImports":true,"esModuleInterop":true},"referencedMap":[[174,1],[168,2],[172,3],[169,3],[165,2],[173,4],[170,5],[171,3],[166,6],[167,7],[159,8],[103,9],[105,10],[104,11],[162,12],[161,13],[160,14],[106,9],[98,15],[102,16],[99,17],[100,18],[108,19],[109,19],[110,19],[111,19],[112,19],[113,19],[114,19],[115,19],[116,19],[117,19],[118,19],[119,19],[120,19],[122,19],[121,19],[123,19],[124,19],[125,19],[126,19],[157,20],[127,19],[128,19],[129,19],[130,19],[131,19],[132,19],[133,19],[134,19],[135,19],[136,19],[137,19],[138,19],[139,19],[141,19],[140,19],[142,19],[143,19],[144,19],[145,19],[146,19],[147,19],[148,19],[149,19],[150,19],[151,19],[152,19],[153,19],[156,19],[154,19],[155,19],[200,21],[202,22],[201,23],[199,23],[175,24],[198,25],[177,26],[176,27],[163,28],[183,28],[184,28],[185,28],[186,28],[187,28],[188,28],[189,28],[190,28],[197,29],[191,28],[192,28],[193,28],[194,28],[195,28],[196,28],[182,28],[181,30],[164,27],[178,30],[180,31]],"affectedFilesPendingEmit":[[94,51],[95,51],[200,51],[202,51],[201,51],[199,51]],"emitSignatures":[94,95,199,200,201,202]}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zod-to-form/codegen",
|
|
3
|
+
"version": "0.6.2",
|
|
4
|
+
"description": "Browser-safe code generation for Zod v4 form components",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/pradeepmouli/zod-to-form#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/pradeepmouli/zod-to-form.git",
|
|
10
|
+
"directory": "packages/codegen"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"zod",
|
|
14
|
+
"codegen",
|
|
15
|
+
"forms",
|
|
16
|
+
"form-generation",
|
|
17
|
+
"typescript"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"main": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@zod-to-form/core": "0.6.4"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"zod": "^4.3.6"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsgo -p tsconfig.build.json",
|
|
42
|
+
"clean": "rm -rf dist tsconfig.build.tsbuildinfo tsconfig.tsbuildinfo",
|
|
43
|
+
"dev": "tsgo -p tsconfig.build.json --watch",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"test:coverage": "vitest run --coverage",
|
|
46
|
+
"type-check": "tsgo --noEmit"
|
|
47
|
+
}
|
|
48
|
+
}
|