attaform 0.27.6 → 0.29.0
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/dist/abstract.d.mts +5 -4
- package/dist/abstract.mjs +4 -3
- package/dist/chunks/fingerprint.mjs +1 -2
- package/dist/chunks/fingerprint2.mjs +2 -3
- package/dist/dev/abstract.mjs +4 -0
- package/dist/{chunks → dev/chunks}/dev-key-collision-warnings.mjs +0 -1
- package/dist/{chunks → dev/chunks}/devtools.mjs +5 -6
- package/dist/{chunks/fingerprint.cjs → dev/chunks/fingerprint.mjs} +7 -10
- package/dist/{chunks/fingerprint2.cjs → dev/chunks/fingerprint2.mjs} +32 -35
- package/dist/dev/directive.mjs +1 -0
- package/dist/dev/history.mjs +89 -0
- package/dist/dev/index.mjs +5 -0
- package/dist/dev/runtime/plugins/attaform.mjs +40 -0
- package/dist/dev/shared/attaform-dev.A-TpJW0B.mjs +207 -0
- package/dist/dev/shared/attaform-dev.BO-71R54.mjs +820 -0
- package/dist/{shared/attaform.D6tk90Rc.cjs → dev/shared/attaform-dev.BgM6FdtA.mjs} +324 -73
- package/dist/dev/shared/attaform-dev.ButTkwHd.mjs +375 -0
- package/dist/{shared/attaform.BJGA_UOS.mjs → dev/shared/attaform-dev.BxfsuwBR.mjs} +8 -1
- package/dist/{shared/attaform.nMaz2C5P.mjs → dev/shared/attaform-dev.D8aoKb89.mjs} +190 -400
- package/dist/dev/shared/attaform-dev.DD5m2W51.mjs +220 -0
- package/dist/{shared/attaform.CKH2lGdL.mjs → dev/shared/attaform-dev.DHuydLAC.mjs} +3867 -4731
- package/dist/{shared/attaform.DYEr28Pt.mjs → dev/shared/attaform-dev.DrzObAZo.mjs} +6 -7
- package/dist/{shared/attaform.B1ZYt2Li.mjs → dev/shared/attaform-dev.q6UutkCx.mjs} +274 -672
- package/dist/dev/zod-v3.mjs +17 -0
- package/dist/dev/zod-v4.mjs +16 -0
- package/dist/dev/zod.mjs +5 -0
- package/dist/directive.d.mts +20 -0
- package/dist/directive.mjs +1 -0
- package/dist/esbuild.mjs +0 -1
- package/dist/history.d.mts +59 -0
- package/dist/history.mjs +89 -0
- package/dist/index.d.mts +14 -6
- package/dist/index.mjs +5 -4
- package/dist/nuxt.d.mts +10 -10
- package/dist/nuxt.mjs +5 -2
- package/dist/rollup.mjs +0 -1
- package/dist/rspack.d.mts +6 -1
- package/dist/rspack.mjs +0 -1
- package/dist/runtime/components/AttaformDevtoolsPanel.vue +9 -8
- package/dist/runtime/plugins/attaform.mjs +1 -2
- package/dist/shared/{attaform.CoR4mWfv.mjs → attaform.B0dKL8ST.mjs} +309 -46
- package/dist/shared/{attaform.Cs2Rbdlo.mjs → attaform.BK0cgu2K.mjs} +123 -140
- package/dist/shared/{attaform.B9Wyhfro.cjs → attaform.BndjUUYX.mjs} +11 -16
- package/dist/shared/{attaform.CQN9R62B.cjs → attaform.BxfsuwBR.mjs} +9 -4
- package/dist/shared/attaform.C2MVyuxC.mjs +811 -0
- package/dist/shared/{attaform.Fp3sCrVs.d.ts → attaform.CIWLMY-R.d.mts} +2 -2
- package/dist/shared/attaform.CZMAYwSK.mjs +6383 -0
- package/dist/shared/attaform.CZYt_5N_.mjs +207 -0
- package/dist/shared/{attaform.DniawQLP.d.cts → attaform.CsoeRi3P.d.mts} +490 -98
- package/dist/shared/attaform.Cvao8bW5.mjs +358 -0
- package/dist/shared/attaform.D0x-qSXm.mjs +197 -0
- package/dist/shared/{attaform.D8kliaKw.cjs → attaform.D1fnTifF.mjs} +279 -692
- package/dist/shared/{attaform.CHlJLAiv.d.mts → attaform.DDtqHYv1.d.mts} +155 -184
- package/dist/shared/{attaform.Biytrv0-.cjs → attaform.DffRL5pP.mjs} +215 -547
- package/dist/shared/attaform.DhnPb6nK.mjs +0 -1
- package/dist/shared/attaform.KvlEedlF.mjs +0 -1
- package/dist/shared/attaform.axHXVQO7.d.mts +44 -0
- package/dist/shared/attaform.v0fQtWyA.mjs +0 -1
- package/dist/transforms.d.mts +0 -22
- package/dist/transforms.mjs +1 -2
- package/dist/vite.d.mts +30 -9
- package/dist/vite.mjs +27 -4
- package/dist/webpack.d.mts +6 -1
- package/dist/webpack.mjs +0 -1
- package/dist/zod-v3.d.mts +13 -6
- package/dist/zod-v3.mjs +17 -4
- package/dist/zod-v4.d.mts +19 -26
- package/dist/zod-v4.mjs +16 -4
- package/dist/zod.d.mts +4 -3
- package/dist/zod.mjs +5 -4
- package/package.json +38 -20
- package/skills/attaform/SKILL.md +6 -2
- package/skills/attaform/references/custom-components.md +7 -2
- package/skills/attaform/references/errors.md +8 -3
- package/skills/attaform/references/saving.md +77 -0
- package/skills/attaform/references/wizards.md +10 -8
- package/dist/abstract.cjs +0 -48
- package/dist/abstract.cjs.map +0 -1
- package/dist/abstract.d.cts +0 -42
- package/dist/abstract.d.ts +0 -42
- package/dist/abstract.mjs.map +0 -1
- package/dist/chunks/dev-key-collision-warnings.cjs +0 -25
- package/dist/chunks/dev-key-collision-warnings.cjs.map +0 -1
- package/dist/chunks/dev-key-collision-warnings.mjs.map +0 -1
- package/dist/chunks/devtools.cjs +0 -157
- package/dist/chunks/devtools.cjs.map +0 -1
- package/dist/chunks/devtools.mjs.map +0 -1
- package/dist/chunks/fingerprint.cjs.map +0 -1
- package/dist/chunks/fingerprint.mjs.map +0 -1
- package/dist/chunks/fingerprint2.cjs.map +0 -1
- package/dist/chunks/fingerprint2.mjs.map +0 -1
- package/dist/esbuild.cjs +0 -28
- package/dist/esbuild.cjs.map +0 -1
- package/dist/esbuild.d.cts +0 -56
- package/dist/esbuild.d.ts +0 -56
- package/dist/esbuild.mjs.map +0 -1
- package/dist/index.cjs +0 -51
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -249
- package/dist/index.d.ts +0 -249
- package/dist/index.mjs.map +0 -1
- package/dist/nuxt.cjs +0 -84
- package/dist/nuxt.cjs.map +0 -1
- package/dist/nuxt.d.cts +0 -66
- package/dist/nuxt.d.ts +0 -66
- package/dist/nuxt.mjs.map +0 -1
- package/dist/rollup.cjs +0 -24
- package/dist/rollup.cjs.map +0 -1
- package/dist/rollup.d.cts +0 -35
- package/dist/rollup.d.ts +0 -35
- package/dist/rollup.mjs.map +0 -1
- package/dist/rspack.cjs +0 -10
- package/dist/rspack.cjs.map +0 -1
- package/dist/rspack.d.cts +0 -40
- package/dist/rspack.d.ts +0 -40
- package/dist/rspack.mjs.map +0 -1
- package/dist/runtime/components/AttaformDevtoolsPanel.vue.d.ts +0 -7
- package/dist/runtime/components/DevtoolsValueTree.vue.d.ts +0 -35
- package/dist/runtime/plugins/attaform.cjs +0 -43
- package/dist/runtime/plugins/attaform.cjs.map +0 -1
- package/dist/runtime/plugins/attaform.d.cts +0 -5
- package/dist/runtime/plugins/attaform.d.ts +0 -5
- package/dist/runtime/plugins/attaform.mjs.map +0 -1
- package/dist/shared/attaform.B1ZYt2Li.mjs.map +0 -1
- package/dist/shared/attaform.B9Wyhfro.cjs.map +0 -1
- package/dist/shared/attaform.BGDV42hI.d.cts +0 -232
- package/dist/shared/attaform.BJGA_UOS.mjs.map +0 -1
- package/dist/shared/attaform.Biytrv0-.cjs.map +0 -1
- package/dist/shared/attaform.Bn0IzhD_.cjs +0 -800
- package/dist/shared/attaform.Bn0IzhD_.cjs.map +0 -1
- package/dist/shared/attaform.C9fPTxjB.d.cts +0 -41
- package/dist/shared/attaform.C9fPTxjB.d.ts +0 -41
- package/dist/shared/attaform.CKH2lGdL.mjs.map +0 -1
- package/dist/shared/attaform.CQN9R62B.cjs.map +0 -1
- package/dist/shared/attaform.CoR4mWfv.mjs.map +0 -1
- package/dist/shared/attaform.Cs2Rbdlo.mjs.map +0 -1
- package/dist/shared/attaform.D6tk90Rc.cjs.map +0 -1
- package/dist/shared/attaform.D8kliaKw.cjs.map +0 -1
- package/dist/shared/attaform.DLknk9nF.d.mts +0 -232
- package/dist/shared/attaform.DMxM2kol.mjs +0 -1275
- package/dist/shared/attaform.DMxM2kol.mjs.map +0 -1
- package/dist/shared/attaform.DRUT703x.d.cts +0 -56
- package/dist/shared/attaform.DRUT703x.d.ts +0 -56
- package/dist/shared/attaform.DYEr28Pt.mjs.map +0 -1
- package/dist/shared/attaform.DdQN7sgN.cjs +0 -1302
- package/dist/shared/attaform.DdQN7sgN.cjs.map +0 -1
- package/dist/shared/attaform.DhnPb6nK.mjs.map +0 -1
- package/dist/shared/attaform.DniawQLP.d.mts +0 -4763
- package/dist/shared/attaform.DniawQLP.d.ts +0 -4763
- package/dist/shared/attaform.DoQm_Vkd.cjs +0 -58
- package/dist/shared/attaform.DoQm_Vkd.cjs.map +0 -1
- package/dist/shared/attaform.DrvMscNX.cjs +0 -7697
- package/dist/shared/attaform.DrvMscNX.cjs.map +0 -1
- package/dist/shared/attaform.F2Q8iv38.d.ts +0 -2494
- package/dist/shared/attaform.FmqKO1Ex.d.cts +0 -2494
- package/dist/shared/attaform.KvlEedlF.mjs.map +0 -1
- package/dist/shared/attaform.RaTzp1WF.cjs +0 -26
- package/dist/shared/attaform.RaTzp1WF.cjs.map +0 -1
- package/dist/shared/attaform.nMaz2C5P.mjs.map +0 -1
- package/dist/shared/attaform.v0fQtWyA.mjs.map +0 -1
- package/dist/shared/attaform.yUrz7C2z.cjs +0 -29
- package/dist/shared/attaform.yUrz7C2z.cjs.map +0 -1
- package/dist/transforms.cjs +0 -12
- package/dist/transforms.cjs.map +0 -1
- package/dist/transforms.d.cts +0 -73
- package/dist/transforms.d.ts +0 -73
- package/dist/transforms.mjs.map +0 -1
- package/dist/vite.cjs +0 -363
- package/dist/vite.cjs.map +0 -1
- package/dist/vite.d.cts +0 -133
- package/dist/vite.d.ts +0 -133
- package/dist/vite.mjs.map +0 -1
- package/dist/webpack.cjs +0 -10
- package/dist/webpack.cjs.map +0 -1
- package/dist/webpack.d.cts +0 -37
- package/dist/webpack.d.ts +0 -37
- package/dist/webpack.mjs.map +0 -1
- package/dist/zod-v3.cjs +0 -53
- package/dist/zod-v3.cjs.map +0 -1
- package/dist/zod-v3.d.cts +0 -246
- package/dist/zod-v3.d.ts +0 -246
- package/dist/zod-v3.mjs.map +0 -1
- package/dist/zod-v4.cjs +0 -55
- package/dist/zod-v4.cjs.map +0 -1
- package/dist/zod-v4.d.cts +0 -172
- package/dist/zod-v4.d.ts +0 -172
- package/dist/zod-v4.mjs.map +0 -1
- package/dist/zod.cjs +0 -51
- package/dist/zod.cjs.map +0 -1
- package/dist/zod.d.cts +0 -7
- package/dist/zod.d.ts +0 -7
- package/dist/zod.mjs.map +0 -1
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const devtoolsShared = require('./attaform.Biytrv0-.cjs');
|
|
1
|
+
import { A as AttaformErrorCode, n as isPlainRecord, s as slimKindOf, o as crossCopyState } from './attaform-dev.DHuydLAC.mjs';
|
|
2
|
+
import { e as canonicalizePath, h as SET_MEMBER_SEGMENT } from './attaform-dev.A-TpJW0B.mjs';
|
|
3
|
+
import { a as safeOwnRead, b as safeAssign } from './attaform-dev.ButTkwHd.mjs';
|
|
5
4
|
|
|
6
5
|
const PATH_SEPARATOR = ".";
|
|
6
|
+
function isOpaqueKind(kind) {
|
|
7
|
+
return kind === "any" || kind === "unknown" || kind === "custom";
|
|
8
|
+
}
|
|
7
9
|
function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
8
10
|
const maxRecursionDepth = options.maxRecursionDepth;
|
|
9
11
|
const leafCache = /* @__PURE__ */ new Map();
|
|
10
12
|
const preprocessOrCoerceCache = /* @__PURE__ */ new Map();
|
|
13
|
+
const opaqueLeafCache = /* @__PURE__ */ new Map();
|
|
11
14
|
const discriminatorCache = /* @__PURE__ */ new Map();
|
|
15
|
+
const entryKeyKindCache = /* @__PURE__ */ new Map();
|
|
12
16
|
let asyncValidationFlag = null;
|
|
13
17
|
let containerRefineFlag = null;
|
|
18
|
+
let discriminatedUnionFlag = null;
|
|
19
|
+
function mapKeySegmentKind(schema) {
|
|
20
|
+
const keyType = intro.getMapKeyType(schema);
|
|
21
|
+
if (keyType === void 0) return void 0;
|
|
22
|
+
const kinds = services.slimPrimitivesOf(keyType, maxRecursionDepth);
|
|
23
|
+
const string = kinds.has("string");
|
|
24
|
+
const number = kinds.has("number");
|
|
25
|
+
if (string === number) return void 0;
|
|
26
|
+
return string ? "string" : "number";
|
|
27
|
+
}
|
|
14
28
|
function computeDiscriminator(path) {
|
|
15
29
|
const candidates = path.length === 0 ? [rootSchema] : services.getNestedSchemasAtPath(rootSchema, path, maxRecursionDepth);
|
|
16
30
|
let matchedUnion;
|
|
@@ -62,6 +76,10 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
62
76
|
containerRefineFlag ?? (containerRefineFlag = intro.hasContainerOrRootRefine(rootSchema));
|
|
63
77
|
return containerRefineFlag;
|
|
64
78
|
},
|
|
79
|
+
hasDiscriminatedUnions() {
|
|
80
|
+
discriminatedUnionFlag ?? (discriminatedUnionFlag = intro.containsDiscriminatedUnion(rootSchema));
|
|
81
|
+
return discriminatedUnionFlag;
|
|
82
|
+
},
|
|
65
83
|
getDefaultValues(config) {
|
|
66
84
|
return services.runStrictGetDefaults(rootSchema, config, formKey, maxRecursionDepth);
|
|
67
85
|
},
|
|
@@ -83,14 +101,12 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
83
101
|
return services.deriveDefault(first, false, maxRecursionDepth, formKey);
|
|
84
102
|
},
|
|
85
103
|
arrayShapeAtPath(path) {
|
|
86
|
-
if (path.length === 0) return
|
|
104
|
+
if (path.length === 0) return null;
|
|
87
105
|
const [first] = services.getNestedSchemasAtPath(rootSchema, path, maxRecursionDepth);
|
|
88
|
-
if (first === void 0) return
|
|
106
|
+
if (first === void 0) return null;
|
|
89
107
|
const peeled = services.peelAllWrappers(first);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (kind === "array") return null;
|
|
93
|
-
return void 0;
|
|
108
|
+
if (intro.kindOf(peeled) === "tuple") return intro.getTupleItems(peeled).length;
|
|
109
|
+
return null;
|
|
94
110
|
},
|
|
95
111
|
isFixedObjectAtPath(path) {
|
|
96
112
|
if (path.length === 0) {
|
|
@@ -100,6 +116,32 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
100
116
|
if (resolved.length === 0) return false;
|
|
101
117
|
return resolved.every((s) => intro.kindOf(services.peelAllWrappers(s)) === "object");
|
|
102
118
|
},
|
|
119
|
+
entryKeyKindAtPath(path) {
|
|
120
|
+
const cacheKey = canonicalizePath(path).key;
|
|
121
|
+
if (entryKeyKindCache.has(cacheKey)) return entryKeyKindCache.get(cacheKey);
|
|
122
|
+
const resolved = path.length === 0 ? [rootSchema] : services.getNestedSchemasAtPath(rootSchema, path, maxRecursionDepth);
|
|
123
|
+
let answer;
|
|
124
|
+
const only = resolved.length === 1 ? resolved[0] : void 0;
|
|
125
|
+
if (only !== void 0) {
|
|
126
|
+
switch (intro.kindOf(services.peelAllWrappers(only))) {
|
|
127
|
+
case "array":
|
|
128
|
+
case "tuple":
|
|
129
|
+
answer = "number";
|
|
130
|
+
break;
|
|
131
|
+
case "object":
|
|
132
|
+
case "record":
|
|
133
|
+
answer = "string";
|
|
134
|
+
break;
|
|
135
|
+
case "map":
|
|
136
|
+
answer = mapKeySegmentKind(services.peelAllWrappers(only));
|
|
137
|
+
break;
|
|
138
|
+
default:
|
|
139
|
+
answer = void 0;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
entryKeyKindCache.set(cacheKey, answer);
|
|
143
|
+
return answer;
|
|
144
|
+
},
|
|
103
145
|
getSchemasAtPath(path) {
|
|
104
146
|
const resolved = services.getNestedSchemasInSlimMode(rootSchema, path, maxRecursionDepth);
|
|
105
147
|
if (resolved.length === 0) return [];
|
|
@@ -118,16 +160,17 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
118
160
|
return out;
|
|
119
161
|
},
|
|
120
162
|
isLeafAtPath(path) {
|
|
121
|
-
const cacheKey =
|
|
163
|
+
const cacheKey = canonicalizePath(path).key;
|
|
122
164
|
const cached = leafCache.get(cacheKey);
|
|
123
165
|
if (cached !== void 0) return cached;
|
|
124
|
-
const
|
|
125
|
-
const
|
|
166
|
+
const opaque = path.length > 0 && this.isOpaqueLeafAtPath(path);
|
|
167
|
+
const prim = opaque ? void 0 : this.getSlimPrimitiveTypesAtPath(path);
|
|
168
|
+
const isLeaf = opaque || prim !== void 0 && prim.size > 0 && !prim.has("object") && !prim.has("array") && !prim.has("map") && !prim.has("set");
|
|
126
169
|
leafCache.set(cacheKey, isLeaf);
|
|
127
170
|
return isLeaf;
|
|
128
171
|
},
|
|
129
172
|
isPreprocessOrCoerceLeaf(path) {
|
|
130
|
-
const cacheKey =
|
|
173
|
+
const cacheKey = canonicalizePath(path).key;
|
|
131
174
|
const cached = preprocessOrCoerceCache.get(cacheKey);
|
|
132
175
|
if (cached !== void 0) return cached;
|
|
133
176
|
let hit = false;
|
|
@@ -144,6 +187,17 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
144
187
|
preprocessOrCoerceCache.set(cacheKey, hit);
|
|
145
188
|
return hit;
|
|
146
189
|
},
|
|
190
|
+
isOpaqueLeafAtPath(path) {
|
|
191
|
+
const cacheKey = canonicalizePath(path).key;
|
|
192
|
+
const cached = opaqueLeafCache.get(cacheKey);
|
|
193
|
+
if (cached !== void 0) return cached;
|
|
194
|
+
const resolved = path.length === 0 ? [rootSchema] : services.getNestedSchemasAtPath(rootSchema, path, maxRecursionDepth);
|
|
195
|
+
const opaque = resolved.length > 0 && resolved.every(
|
|
196
|
+
(candidate) => isOpaqueKind(intro.kindOf(services.peelAllWrappers(candidate)))
|
|
197
|
+
);
|
|
198
|
+
opaqueLeafCache.set(cacheKey, opaque);
|
|
199
|
+
return opaque;
|
|
200
|
+
},
|
|
147
201
|
isRequiredAtPath(path) {
|
|
148
202
|
if (path.length === 0) return true;
|
|
149
203
|
const resolved = services.getNestedSchemasAtPath(rootSchema, path, maxRecursionDepth);
|
|
@@ -154,7 +208,7 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
154
208
|
return services.resolveFieldMetaAtPath(rootSchema, path, maxRecursionDepth);
|
|
155
209
|
},
|
|
156
210
|
getUnionDiscriminatorAtPath(path) {
|
|
157
|
-
const cacheKey =
|
|
211
|
+
const cacheKey = canonicalizePath(path).key;
|
|
158
212
|
if (discriminatorCache.has(cacheKey)) {
|
|
159
213
|
return discriminatorCache.get(cacheKey);
|
|
160
214
|
}
|
|
@@ -174,7 +228,7 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
174
228
|
function parseResultToResponse(result) {
|
|
175
229
|
return result.success ? { data: result.data, errors: void 0, success: true, formKey } : {
|
|
176
230
|
data: void 0,
|
|
177
|
-
errors: services.issuesToValidationErrors(result.issues
|
|
231
|
+
errors: services.issuesToValidationErrors(result.issues),
|
|
178
232
|
success: false,
|
|
179
233
|
formKey
|
|
180
234
|
};
|
|
@@ -227,8 +281,7 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
227
281
|
{
|
|
228
282
|
message,
|
|
229
283
|
path: [...errPath],
|
|
230
|
-
|
|
231
|
-
code: serializeScript.AttaformErrorCode.ValidatorThrew
|
|
284
|
+
code: AttaformErrorCode.ValidatorThrew
|
|
232
285
|
}
|
|
233
286
|
],
|
|
234
287
|
success: false,
|
|
@@ -242,8 +295,7 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
242
295
|
{
|
|
243
296
|
message: `Path '${p.join(PATH_SEPARATOR)}' did not resolve to any schema`,
|
|
244
297
|
path: [...p],
|
|
245
|
-
|
|
246
|
-
code: serializeScript.AttaformErrorCode.PathNotFound
|
|
298
|
+
code: AttaformErrorCode.PathNotFound
|
|
247
299
|
}
|
|
248
300
|
],
|
|
249
301
|
success: false,
|
|
@@ -257,16 +309,16 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
|
|
|
257
309
|
|
|
258
310
|
function mergeDeep(base, override) {
|
|
259
311
|
if (override === void 0) return base;
|
|
260
|
-
if (!
|
|
261
|
-
if (!
|
|
312
|
+
if (!isPlainRecord(override)) return override;
|
|
313
|
+
if (!isPlainRecord(base)) return override;
|
|
262
314
|
const result = { ...base };
|
|
263
315
|
for (const key of Object.keys(override)) {
|
|
264
|
-
const oVal =
|
|
265
|
-
const bVal =
|
|
266
|
-
if (
|
|
267
|
-
|
|
316
|
+
const oVal = safeOwnRead(override, key);
|
|
317
|
+
const bVal = safeOwnRead(base, key);
|
|
318
|
+
if (isPlainRecord(oVal) && isPlainRecord(bVal)) {
|
|
319
|
+
safeAssign(result, key, mergeDeep(bVal, oVal));
|
|
268
320
|
} else {
|
|
269
|
-
|
|
321
|
+
safeAssign(result, key, oVal);
|
|
270
322
|
}
|
|
271
323
|
}
|
|
272
324
|
return result;
|
|
@@ -289,6 +341,7 @@ function walkPathSegments(schema, segments, intro, maxDepth, lazyDepth) {
|
|
|
289
341
|
return inner === void 0 ? [] : walkPathSegments(inner, rest, intro, maxDepth, lazyDepth);
|
|
290
342
|
}
|
|
291
343
|
case "set": {
|
|
344
|
+
if (head !== SET_MEMBER_SEGMENT) return [];
|
|
292
345
|
const inner = intro.getSetValueType(schema);
|
|
293
346
|
return inner === void 0 ? [] : walkPathSegments(inner, rest, intro, maxDepth, lazyDepth);
|
|
294
347
|
}
|
|
@@ -296,6 +349,10 @@ function walkPathSegments(schema, segments, intro, maxDepth, lazyDepth) {
|
|
|
296
349
|
const inner = intro.getRecordValueType(schema);
|
|
297
350
|
return inner === void 0 ? [] : walkPathSegments(inner, rest, intro, maxDepth, lazyDepth);
|
|
298
351
|
}
|
|
352
|
+
case "map": {
|
|
353
|
+
const inner = intro.getMapValueType(schema);
|
|
354
|
+
return inner === void 0 ? [] : walkPathSegments(inner, rest, intro, maxDepth, lazyDepth);
|
|
355
|
+
}
|
|
299
356
|
case "tuple": {
|
|
300
357
|
const index = Number(head);
|
|
301
358
|
if (!Number.isInteger(index)) return [];
|
|
@@ -349,16 +406,165 @@ function walkPathSegments(schema, segments, intro, maxDepth, lazyDepth) {
|
|
|
349
406
|
const rightResults = right === void 0 ? [] : walkPathSegments(right, segments, intro, maxDepth, lazyDepth);
|
|
350
407
|
return [...leftResults, ...rightResults];
|
|
351
408
|
}
|
|
352
|
-
// Leaves — can't descend further.
|
|
353
|
-
// `
|
|
354
|
-
//
|
|
355
|
-
//
|
|
356
|
-
//
|
|
409
|
+
// Leaves — can't descend further. Opaque leaves (`any` /
|
|
410
|
+
// `unknown` / `custom`) land here too and `[]` is the truthful
|
|
411
|
+
// answer: the schema declares no sub-paths under them, so none are
|
|
412
|
+
// fabricated. `symbol` / `function` / `promise` hold a value
|
|
413
|
+
// without declaring anything inside it and land here for the same
|
|
414
|
+
// reason. No kind is refused at construction (#607), so this is
|
|
415
|
+
// the only branch they ever take.
|
|
357
416
|
default:
|
|
358
417
|
return [];
|
|
359
418
|
}
|
|
360
419
|
}
|
|
361
420
|
|
|
421
|
+
function fixStructuralDefaults(schema, merged, useDefault, maxRecursionDepth, services) {
|
|
422
|
+
const ctx = {
|
|
423
|
+
useDefault,
|
|
424
|
+
maxDepth: maxRecursionDepth,
|
|
425
|
+
clean: true,
|
|
426
|
+
services
|
|
427
|
+
};
|
|
428
|
+
const data = fixNode(schema, merged, ctx, 0);
|
|
429
|
+
return { data, success: ctx.clean };
|
|
430
|
+
}
|
|
431
|
+
function fixNode(schema, value, ctx, lazyDepth) {
|
|
432
|
+
const { intro } = ctx.services;
|
|
433
|
+
if (intro.isCoercePrimitive(schema) || intro.isPreprocessNode(schema)) return value;
|
|
434
|
+
const kinds = ctx.services.slimPrimitivesOf(schema);
|
|
435
|
+
if (kinds.size > 0 && !kinds.has(slimKindOf(value))) {
|
|
436
|
+
const replacement = deriveFixValue(schema, value, ctx);
|
|
437
|
+
if (kinds.has(slimKindOf(replacement))) return replacement;
|
|
438
|
+
ctx.clean = false;
|
|
439
|
+
return replacement;
|
|
440
|
+
}
|
|
441
|
+
switch (intro.kindOf(schema)) {
|
|
442
|
+
case "optional":
|
|
443
|
+
case "nullable": {
|
|
444
|
+
if (value === void 0 || value === null) return value;
|
|
445
|
+
const inner = intro.unwrapInner(schema);
|
|
446
|
+
return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth);
|
|
447
|
+
}
|
|
448
|
+
case "default":
|
|
449
|
+
case "readonly":
|
|
450
|
+
case "catch": {
|
|
451
|
+
const inner = intro.unwrapInner(schema);
|
|
452
|
+
return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth);
|
|
453
|
+
}
|
|
454
|
+
case "branded": {
|
|
455
|
+
const inner = intro.unwrapBranded(schema);
|
|
456
|
+
return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth);
|
|
457
|
+
}
|
|
458
|
+
case "effects": {
|
|
459
|
+
const inner = intro.unwrapEffectsSource(schema);
|
|
460
|
+
return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth);
|
|
461
|
+
}
|
|
462
|
+
case "pipe":
|
|
463
|
+
case "pipeline": {
|
|
464
|
+
const pipeIn = intro.unwrapPipeIn(schema);
|
|
465
|
+
if (pipeIn === void 0 || intro.kindOf(pipeIn) === "transform") return value;
|
|
466
|
+
return fixNode(pipeIn, value, ctx, lazyDepth);
|
|
467
|
+
}
|
|
468
|
+
case "lazy": {
|
|
469
|
+
if (lazyDepth >= ctx.maxDepth) return value;
|
|
470
|
+
const inner = intro.unwrapLazy(schema);
|
|
471
|
+
return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth + 1);
|
|
472
|
+
}
|
|
473
|
+
case "discriminated-union": {
|
|
474
|
+
if (value === null || typeof value !== "object") return value;
|
|
475
|
+
const variant = selectVariantByValue(schema, value, intro);
|
|
476
|
+
if (variant === void 0) return value;
|
|
477
|
+
const record = value;
|
|
478
|
+
const shape = intro.getObjectShape(variant);
|
|
479
|
+
for (const key of Object.keys(record)) {
|
|
480
|
+
if (!(key in shape)) delete record[key];
|
|
481
|
+
}
|
|
482
|
+
for (const [key, sub] of Object.entries(shape)) {
|
|
483
|
+
record[key] = fixNode(sub, record[key], ctx, lazyDepth);
|
|
484
|
+
}
|
|
485
|
+
return value;
|
|
486
|
+
}
|
|
487
|
+
case "object": {
|
|
488
|
+
if (value === null || typeof value !== "object") return value;
|
|
489
|
+
const record = value;
|
|
490
|
+
for (const [key, sub] of Object.entries(intro.getObjectShape(schema))) {
|
|
491
|
+
record[key] = fixNode(sub, record[key], ctx, lazyDepth);
|
|
492
|
+
}
|
|
493
|
+
return value;
|
|
494
|
+
}
|
|
495
|
+
case "array": {
|
|
496
|
+
if (!Array.isArray(value)) return value;
|
|
497
|
+
const element = intro.getArrayElement(schema);
|
|
498
|
+
if (element === void 0) return value;
|
|
499
|
+
for (let i = 0; i < value.length; i++) {
|
|
500
|
+
value[i] = fixNode(element, value[i], ctx, lazyDepth);
|
|
501
|
+
}
|
|
502
|
+
return value;
|
|
503
|
+
}
|
|
504
|
+
case "tuple": {
|
|
505
|
+
if (!Array.isArray(value)) return value;
|
|
506
|
+
const items = intro.getTupleItems(schema);
|
|
507
|
+
for (let i = 0; i < items.length; i++) {
|
|
508
|
+
const item = items[i];
|
|
509
|
+
if (item !== void 0) value[i] = fixNode(item, value[i], ctx, lazyDepth);
|
|
510
|
+
}
|
|
511
|
+
return value;
|
|
512
|
+
}
|
|
513
|
+
case "record": {
|
|
514
|
+
if (value === null || typeof value !== "object") return value;
|
|
515
|
+
const valueType = intro.getRecordValueType(schema);
|
|
516
|
+
if (valueType === void 0) return value;
|
|
517
|
+
const record = value;
|
|
518
|
+
for (const key of Object.keys(record)) {
|
|
519
|
+
record[key] = fixNode(valueType, record[key], ctx, lazyDepth);
|
|
520
|
+
}
|
|
521
|
+
return value;
|
|
522
|
+
}
|
|
523
|
+
case "map": {
|
|
524
|
+
if (!(value instanceof Map)) return value;
|
|
525
|
+
const valueType = intro.getMapValueType(schema);
|
|
526
|
+
if (valueType === void 0) return value;
|
|
527
|
+
for (const [key, entry] of [...value]) {
|
|
528
|
+
value.set(key, fixNode(valueType, entry, ctx, lazyDepth));
|
|
529
|
+
}
|
|
530
|
+
return value;
|
|
531
|
+
}
|
|
532
|
+
case "intersection": {
|
|
533
|
+
const left = intro.getIntersectionLeft(schema);
|
|
534
|
+
const right = intro.getIntersectionRight(schema);
|
|
535
|
+
let out = value;
|
|
536
|
+
if (left !== void 0) out = fixNode(left, out, ctx, lazyDepth);
|
|
537
|
+
if (right !== void 0) out = fixNode(right, out, ctx, lazyDepth);
|
|
538
|
+
return out;
|
|
539
|
+
}
|
|
540
|
+
default:
|
|
541
|
+
return value;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function deriveFixValue(schema, value, ctx) {
|
|
545
|
+
const du = ctx.services.unwrapToDiscriminatedUnion(schema);
|
|
546
|
+
if (du !== void 0) {
|
|
547
|
+
const selected = selectVariantByValue(du, value, ctx.services.intro) ?? ctx.services.intro.getDiscriminatedOptions(du)[0];
|
|
548
|
+
if (selected !== void 0) {
|
|
549
|
+
return ctx.services.deriveDefault(selected, ctx.useDefault);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return ctx.services.deriveDefault(schema, ctx.useDefault);
|
|
553
|
+
}
|
|
554
|
+
function selectVariantByValue(du, value, intro) {
|
|
555
|
+
if (value === null || typeof value !== "object") return void 0;
|
|
556
|
+
const discKey = intro.getDiscriminator(du);
|
|
557
|
+
if (discKey === void 0) return void 0;
|
|
558
|
+
const discValue = value[discKey];
|
|
559
|
+
if (discValue === void 0) return void 0;
|
|
560
|
+
for (const opt of intro.getDiscriminatedOptions(du)) {
|
|
561
|
+
const litSchema = intro.getObjectShape(opt)[discKey];
|
|
562
|
+
if (litSchema === void 0 || intro.kindOf(litSchema) !== "literal") continue;
|
|
563
|
+
if (intro.getLiteralValues(litSchema).includes(discValue)) return opt;
|
|
564
|
+
}
|
|
565
|
+
return void 0;
|
|
566
|
+
}
|
|
567
|
+
|
|
362
568
|
const NO_EMBEDDED_DEFAULT = /* @__PURE__ */ Symbol("atta:no-embedded-default");
|
|
363
569
|
function peelEmbeddedDefault(schema, intro) {
|
|
364
570
|
let current = schema;
|
|
@@ -417,7 +623,7 @@ function deriveDefaultWalk(schema, useDefault, intro, maxDepth, ctx, lazyDepth =
|
|
|
417
623
|
const shape = intro.getObjectShape(schema);
|
|
418
624
|
const out = {};
|
|
419
625
|
for (const [key, subSchema] of Object.entries(shape)) {
|
|
420
|
-
|
|
626
|
+
safeAssign(
|
|
421
627
|
out,
|
|
422
628
|
key,
|
|
423
629
|
deriveDefaultWalk(subSchema, useDefault, intro, maxDepth, ctx, lazyDepth)
|
|
@@ -541,59 +747,68 @@ function deriveDefaultWalk(schema, useDefault, intro, maxDepth, ctx, lazyDepth =
|
|
|
541
747
|
}
|
|
542
748
|
case "catch": {
|
|
543
749
|
if (useDefault) return intro.getCatchDefault(schema);
|
|
544
|
-
if (ctx.catchOnUseDefaultFalse === "preserveCatch" && intro.hasCatchValue(schema)) {
|
|
545
|
-
return intro.getCatchDefault(schema);
|
|
546
|
-
}
|
|
547
750
|
const inner = intro.unwrapInner(schema);
|
|
548
751
|
return inner === void 0 ? void 0 : deriveDefaultWalk(inner, useDefault, intro, maxDepth, ctx, lazyDepth);
|
|
549
752
|
}
|
|
550
753
|
case "file":
|
|
551
754
|
return null;
|
|
755
|
+
case "map":
|
|
756
|
+
return /* @__PURE__ */ new Map();
|
|
757
|
+
case "template-literal":
|
|
758
|
+
return "";
|
|
552
759
|
case "any":
|
|
553
760
|
case "unknown":
|
|
761
|
+
case "custom":
|
|
554
762
|
case "void":
|
|
555
763
|
case "never":
|
|
556
764
|
case "promise":
|
|
557
|
-
case "custom":
|
|
558
|
-
case "template-literal":
|
|
559
|
-
case "transform":
|
|
560
|
-
case "map":
|
|
561
765
|
case "symbol":
|
|
562
766
|
case "function":
|
|
767
|
+
case "transform":
|
|
563
768
|
return void 0;
|
|
564
769
|
default:
|
|
565
770
|
return ctx.unsupportedKindFallback(schema, kind);
|
|
566
771
|
}
|
|
567
772
|
}
|
|
568
773
|
|
|
569
|
-
const
|
|
570
|
-
|
|
774
|
+
const state = crossCopyState(/* @__PURE__ */ Symbol.for("attaform:field-meta-state"), () => ({
|
|
775
|
+
store: /* @__PURE__ */ new WeakMap(),
|
|
776
|
+
lists: /* @__PURE__ */ new WeakMap(),
|
|
777
|
+
pathMapBuilder: null
|
|
778
|
+
}));
|
|
571
779
|
const registry = {
|
|
572
780
|
add(schema, payload) {
|
|
573
|
-
store.set(schema, payload);
|
|
574
|
-
const list = lists.get(schema) ?? [];
|
|
781
|
+
state.store.set(schema, payload);
|
|
782
|
+
const list = state.lists.get(schema) ?? [];
|
|
575
783
|
list.push(payload);
|
|
576
|
-
lists.set(schema, list);
|
|
784
|
+
state.lists.set(schema, list);
|
|
577
785
|
return registry;
|
|
578
786
|
},
|
|
579
787
|
get(schema) {
|
|
580
|
-
return store.get(schema);
|
|
788
|
+
return state.store.get(schema);
|
|
581
789
|
},
|
|
582
790
|
has(schema) {
|
|
583
|
-
return store.has(schema);
|
|
791
|
+
return state.store.has(schema);
|
|
584
792
|
},
|
|
585
793
|
remove(schema) {
|
|
586
|
-
store.delete(schema);
|
|
587
|
-
lists.delete(schema);
|
|
794
|
+
state.store.delete(schema);
|
|
795
|
+
state.lists.delete(schema);
|
|
588
796
|
return registry;
|
|
589
797
|
}
|
|
590
798
|
};
|
|
591
799
|
const fieldMetaStore = registry;
|
|
592
800
|
function getFieldMetaForSchema(schema) {
|
|
593
|
-
return store.get(schema);
|
|
801
|
+
return state.store.get(schema);
|
|
594
802
|
}
|
|
595
803
|
function getFieldMetaListForSchema(schema) {
|
|
596
|
-
return lists.get(schema) ?? [];
|
|
804
|
+
return state.lists.get(schema) ?? [];
|
|
805
|
+
}
|
|
806
|
+
function installFieldMetaPathMapBuilder(builder) {
|
|
807
|
+
state.pathMapBuilder = builder;
|
|
808
|
+
}
|
|
809
|
+
function buildFieldMetaPathMap(rootSchema, services) {
|
|
810
|
+
const builder = state.pathMapBuilder;
|
|
811
|
+
return builder === null ? void 0 : builder(rootSchema, services);
|
|
597
812
|
}
|
|
598
813
|
|
|
599
814
|
const PERMISSIVE_SLIM_KINDS = /* @__PURE__ */ new Set([
|
|
@@ -622,6 +837,16 @@ const KIND_UNDEFINED = /* @__PURE__ */ new Set(["undefined"]);
|
|
|
622
837
|
const KIND_OBJECT = /* @__PURE__ */ new Set(["object"]);
|
|
623
838
|
const KIND_ARRAY = /* @__PURE__ */ new Set(["array"]);
|
|
624
839
|
const KIND_SET = /* @__PURE__ */ new Set(["set"]);
|
|
840
|
+
const KIND_MAP = /* @__PURE__ */ new Set(["map"]);
|
|
841
|
+
const KIND_SYMBOL = /* @__PURE__ */ new Set(["symbol", "undefined"]);
|
|
842
|
+
const KIND_FUNCTION = /* @__PURE__ */ new Set([
|
|
843
|
+
"function",
|
|
844
|
+
"undefined"
|
|
845
|
+
]);
|
|
846
|
+
const KIND_PROMISE = /* @__PURE__ */ new Set([
|
|
847
|
+
"object",
|
|
848
|
+
"undefined"
|
|
849
|
+
]);
|
|
625
850
|
const KIND_FILE = /* @__PURE__ */ new Set(["file", "null"]);
|
|
626
851
|
const EMPTY_KINDS = /* @__PURE__ */ new Set();
|
|
627
852
|
function slimPrimitivesWalk(schema, intro, maxDepth, lazyDepth = 0) {
|
|
@@ -667,7 +892,7 @@ function slimPrimitivesWalk(schema, intro, maxDepth, lazyDepth = 0) {
|
|
|
667
892
|
case "literal": {
|
|
668
893
|
const values = intro.getLiteralValues(schema);
|
|
669
894
|
const out = /* @__PURE__ */ new Set();
|
|
670
|
-
for (const v of values) out.add(
|
|
895
|
+
for (const v of values) out.add(slimKindOf(v));
|
|
671
896
|
return out.size === 0 ? PERMISSIVE_SLIM_KINDS : out;
|
|
672
897
|
}
|
|
673
898
|
case "object":
|
|
@@ -678,6 +903,16 @@ function slimPrimitivesWalk(schema, intro, maxDepth, lazyDepth = 0) {
|
|
|
678
903
|
return KIND_ARRAY;
|
|
679
904
|
case "set":
|
|
680
905
|
return KIND_SET;
|
|
906
|
+
case "map":
|
|
907
|
+
return KIND_MAP;
|
|
908
|
+
case "symbol":
|
|
909
|
+
return KIND_SYMBOL;
|
|
910
|
+
case "function":
|
|
911
|
+
return KIND_FUNCTION;
|
|
912
|
+
case "promise":
|
|
913
|
+
return KIND_PROMISE;
|
|
914
|
+
case "template-literal":
|
|
915
|
+
return KIND_STRING;
|
|
681
916
|
case "optional": {
|
|
682
917
|
const inner = intro.unwrapInner(schema);
|
|
683
918
|
const innerSet = inner === void 0 ? EMPTY_KINDS : slimPrimitivesWalk(inner, intro, maxDepth, lazyDepth);
|
|
@@ -741,19 +976,37 @@ function slimPrimitivesWalk(schema, intro, maxDepth, lazyDepth = 0) {
|
|
|
741
976
|
}
|
|
742
977
|
case "never":
|
|
743
978
|
return EMPTY_KINDS;
|
|
979
|
+
// Opaque leaves: the schema says nothing about the value's shape,
|
|
980
|
+
// so every kind is admissible. `custom` is the kind
|
|
981
|
+
// `z.instanceof(X)` and `z.custom<T>()` compile to on v4 (#542);
|
|
982
|
+
// it belongs with `any` / `unknown` rather than in the defensive
|
|
983
|
+
// fallthrough, because it reaches here through the public surface.
|
|
744
984
|
case "any":
|
|
745
985
|
case "unknown":
|
|
986
|
+
case "custom":
|
|
746
987
|
return PERMISSIVE_SLIM_KINDS;
|
|
747
|
-
//
|
|
748
|
-
//
|
|
749
|
-
//
|
|
750
|
-
//
|
|
751
|
-
// defensive in case construction is skipped.
|
|
988
|
+
// A kind this walker has no case for — in practice a kind a newer
|
|
989
|
+
// Zod introduced. Be permissive rather than reject: the adapter
|
|
990
|
+
// carries the value opaquely and the schema's own parse is what
|
|
991
|
+
// decides whether it was legal.
|
|
752
992
|
default:
|
|
753
993
|
return PERMISSIVE_SLIM_KINDS;
|
|
754
994
|
}
|
|
755
995
|
}
|
|
756
996
|
|
|
997
|
+
const installingFieldMetaStore = {
|
|
998
|
+
add(schema, payload) {
|
|
999
|
+
installFieldMetaPathMapBuilder(getFieldMetaPathMap);
|
|
1000
|
+
fieldMetaStore.add(schema, payload);
|
|
1001
|
+
return installingFieldMetaStore;
|
|
1002
|
+
},
|
|
1003
|
+
get: (schema) => fieldMetaStore.get(schema),
|
|
1004
|
+
has: (schema) => fieldMetaStore.has(schema),
|
|
1005
|
+
remove: (schema) => {
|
|
1006
|
+
fieldMetaStore.remove(schema);
|
|
1007
|
+
return installingFieldMetaStore;
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
757
1010
|
const pathMetaCache = /* @__PURE__ */ new WeakMap();
|
|
758
1011
|
function getFieldMetaPathMap(rootSchema, services) {
|
|
759
1012
|
const cached = pathMetaCache.get(rootSchema);
|
|
@@ -787,7 +1040,7 @@ function walkForMeta(schema, path, map, counters, lastPathPerSchema, inProgress,
|
|
|
787
1040
|
inProgress.add(schema);
|
|
788
1041
|
try {
|
|
789
1042
|
const { intro, peelAllWrappers, getFieldMetaList } = services;
|
|
790
|
-
const pathKey =
|
|
1043
|
+
const pathKey = canonicalizePath(path).key;
|
|
791
1044
|
if (!map.has(pathKey)) {
|
|
792
1045
|
const payload = consumePayload(schema, counters, getFieldMetaList);
|
|
793
1046
|
if (payload !== void 0) {
|
|
@@ -829,11 +1082,20 @@ function walkForMeta(schema, path, map, counters, lastPathPerSchema, inProgress,
|
|
|
829
1082
|
case "set": {
|
|
830
1083
|
const inner = intro.getSetValueType(schema);
|
|
831
1084
|
if (inner !== void 0)
|
|
832
|
-
walkForMeta(
|
|
1085
|
+
walkForMeta(
|
|
1086
|
+
inner,
|
|
1087
|
+
[...path, SET_MEMBER_SEGMENT],
|
|
1088
|
+
map,
|
|
1089
|
+
counters,
|
|
1090
|
+
lastPathPerSchema,
|
|
1091
|
+
inProgress,
|
|
1092
|
+
services
|
|
1093
|
+
);
|
|
833
1094
|
return;
|
|
834
1095
|
}
|
|
835
|
-
case "record":
|
|
836
|
-
|
|
1096
|
+
case "record":
|
|
1097
|
+
case "map": {
|
|
1098
|
+
const inner = kind === "map" ? intro.getMapValueType(schema) : intro.getRecordValueType(schema);
|
|
837
1099
|
if (inner !== void 0)
|
|
838
1100
|
walkForMeta(inner, [...path, "*"], map, counters, lastPathPerSchema, inProgress, services);
|
|
839
1101
|
return;
|
|
@@ -905,15 +1167,4 @@ function walkForMeta(schema, path, map, counters, lastPathPerSchema, inProgress,
|
|
|
905
1167
|
}
|
|
906
1168
|
}
|
|
907
1169
|
|
|
908
|
-
|
|
909
|
-
exports.createAbstractSchema = createAbstractSchema;
|
|
910
|
-
exports.deriveDefaultWalk = deriveDefaultWalk;
|
|
911
|
-
exports.fieldMetaStore = fieldMetaStore;
|
|
912
|
-
exports.getFieldMetaForSchema = getFieldMetaForSchema;
|
|
913
|
-
exports.getFieldMetaListForSchema = getFieldMetaListForSchema;
|
|
914
|
-
exports.getFieldMetaPathMap = getFieldMetaPathMap;
|
|
915
|
-
exports.mergeDeep = mergeDeep;
|
|
916
|
-
exports.peelEmbeddedDefault = peelEmbeddedDefault;
|
|
917
|
-
exports.slimPrimitivesWalk = slimPrimitivesWalk;
|
|
918
|
-
exports.walkPathSegments = walkPathSegments;
|
|
919
|
-
//# sourceMappingURL=attaform.D6tk90Rc.cjs.map
|
|
1170
|
+
export { getFieldMetaListForSchema as a, buildFieldMetaPathMap as b, createAbstractSchema as c, deriveDefaultWalk as d, fixStructuralDefaults as f, getFieldMetaForSchema as g, installingFieldMetaStore as i, mergeDeep as m, slimPrimitivesWalk as s, walkPathSegments as w };
|