tinybase 9.1.0-beta.2 → 9.1.1
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/@types/schematizers/index.d.ts +27 -9
- package/@types/schematizers/schematizer-arktype/index.d.ts +8 -7
- package/@types/schematizers/schematizer-effect/index.d.ts +7 -5
- package/@types/schematizers/schematizer-typebox/index.d.ts +8 -7
- package/@types/schematizers/schematizer-valibot/index.d.ts +8 -7
- package/@types/schematizers/schematizer-yup/index.d.ts +5 -4
- package/@types/schematizers/schematizer-zod/index.d.ts +8 -7
- package/@types/ui-react-dom/index.d.ts +10 -10
- package/@types/ui-react-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-react-dom-charts/index.d.ts +7 -7
- package/@types/ui-react-dom-charts/with-schemas/index.d.ts +7 -7
- package/@types/ui-react-inspector/index.d.ts +1 -1
- package/@types/ui-react-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-solid-dom/index.d.ts +10 -10
- package/@types/ui-solid-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-solid-inspector/index.d.ts +1 -1
- package/@types/ui-solid-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-svelte-dom/index.d.ts +10 -10
- package/@types/ui-svelte-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-svelte-inspector/index.d.ts +1 -1
- package/@types/ui-svelte-inspector/with-schemas/index.d.ts +1 -1
- package/agents.md +12 -6
- package/min/schematizers/index.js +1 -1
- package/min/schematizers/index.js.gz +0 -0
- package/min/schematizers/schematizer-arktype/index.js +1 -1
- package/min/schematizers/schematizer-arktype/index.js.gz +0 -0
- package/min/schematizers/schematizer-arktype/with-schemas/index.js +1 -1
- package/min/schematizers/schematizer-arktype/with-schemas/index.js.gz +0 -0
- package/min/schematizers/schematizer-effect/index.js +1 -1
- package/min/schematizers/schematizer-effect/index.js.gz +0 -0
- package/min/schematizers/schematizer-effect/with-schemas/index.js +1 -1
- package/min/schematizers/schematizer-effect/with-schemas/index.js.gz +0 -0
- package/min/schematizers/schematizer-typebox/index.js +1 -1
- package/min/schematizers/schematizer-typebox/index.js.gz +0 -0
- package/min/schematizers/schematizer-typebox/with-schemas/index.js +1 -1
- package/min/schematizers/schematizer-typebox/with-schemas/index.js.gz +0 -0
- package/min/schematizers/schematizer-valibot/index.js +1 -1
- package/min/schematizers/schematizer-valibot/index.js.gz +0 -0
- package/min/schematizers/schematizer-valibot/with-schemas/index.js +1 -1
- package/min/schematizers/schematizer-valibot/with-schemas/index.js.gz +0 -0
- package/min/schematizers/schematizer-yup/index.js +1 -1
- package/min/schematizers/schematizer-yup/index.js.gz +0 -0
- package/min/schematizers/schematizer-yup/with-schemas/index.js +1 -1
- package/min/schematizers/schematizer-yup/with-schemas/index.js.gz +0 -0
- package/min/schematizers/schematizer-zod/index.js +1 -1
- package/min/schematizers/schematizer-zod/index.js.gz +0 -0
- package/min/schematizers/schematizer-zod/with-schemas/index.js +1 -1
- package/min/schematizers/schematizer-zod/with-schemas/index.js.gz +0 -0
- package/min/schematizers/with-schemas/index.js +1 -1
- package/min/schematizers/with-schemas/index.js.gz +0 -0
- package/package.json +6 -6
- package/readme.md +14 -14
- package/releases.md +61 -61
- package/schematizers/index.js +21 -6
- package/schematizers/schematizer-arktype/index.js +52 -17
- package/schematizers/schematizer-arktype/with-schemas/index.js +52 -17
- package/schematizers/schematizer-effect/index.js +41 -11
- package/schematizers/schematizer-effect/with-schemas/index.js +41 -11
- package/schematizers/schematizer-typebox/index.js +49 -9
- package/schematizers/schematizer-typebox/with-schemas/index.js +49 -9
- package/schematizers/schematizer-valibot/index.js +38 -10
- package/schematizers/schematizer-valibot/with-schemas/index.js +38 -10
- package/schematizers/schematizer-yup/index.js +29 -7
- package/schematizers/schematizer-yup/with-schemas/index.js +29 -7
- package/schematizers/schematizer-zod/index.js +29 -14
- package/schematizers/schematizer-zod/with-schemas/index.js +29 -14
- package/schematizers/with-schemas/index.js +21 -6
|
@@ -692,7 +692,7 @@ export type SortedTablePaginatorProps = {
|
|
|
692
692
|
*
|
|
693
693
|
* See the <TableInHtmlTable /> (Solid) demo for this component in action:
|
|
694
694
|
*
|
|
695
|
-
* 
|
|
697
697
|
*
|
|
698
698
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -836,7 +836,7 @@ export function TableInHtmlTable(
|
|
|
836
836
|
* See the <SortedTableInHtmlTable /> (Solid) demo for this component in
|
|
837
837
|
* action:
|
|
838
838
|
*
|
|
839
|
-
* 
|
|
841
841
|
*
|
|
842
842
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -1007,7 +1007,7 @@ export function SortedTableInHtmlTable(
|
|
|
1007
1007
|
*
|
|
1008
1008
|
* See the <ValuesInHtmlTable /> (Solid) demo for this component in action:
|
|
1009
1009
|
*
|
|
1010
|
-
* 
|
|
1012
1012
|
*
|
|
1013
1013
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1136,7 +1136,7 @@ export function ValuesInHtmlTable(
|
|
|
1136
1136
|
*
|
|
1137
1137
|
* See the <SliceInHtmlTable /> (Solid) demo for this component in action:
|
|
1138
1138
|
*
|
|
1139
|
-
* 
|
|
1141
1141
|
*
|
|
1142
1142
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1292,7 +1292,7 @@ export function SliceInHtmlTable(
|
|
|
1292
1292
|
* See the <RelationshipInHtmlTable /> (Solid) demo for this component in
|
|
1293
1293
|
* action:
|
|
1294
1294
|
*
|
|
1295
|
-
* 
|
|
1297
1297
|
*
|
|
1298
1298
|
* The component's props identify which Relationship to render based on
|
|
@@ -1466,7 +1466,7 @@ export function RelationshipInHtmlTable(
|
|
|
1466
1466
|
* See the <ResultTableInHtmlTable /> (Solid) demo for this component in
|
|
1467
1467
|
* action:
|
|
1468
1468
|
*
|
|
1469
|
-
* 
|
|
1471
1471
|
*
|
|
1472
1472
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1617,7 +1617,7 @@ export function ResultTableInHtmlTable(
|
|
|
1617
1617
|
* See the <ResultSortedTableInHtmlTable /> (Solid) demo for this component in
|
|
1618
1618
|
* action:
|
|
1619
1619
|
*
|
|
1620
|
-
* 
|
|
1622
1622
|
*
|
|
1623
1623
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1789,7 +1789,7 @@ export function ResultSortedTableInHtmlTable(
|
|
|
1789
1789
|
*
|
|
1790
1790
|
* See the <EditableCellView /> (Solid) demo for this component in action:
|
|
1791
1791
|
*
|
|
1792
|
-
* 
|
|
1794
1794
|
*
|
|
1795
1795
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -1859,7 +1859,7 @@ export function EditableCellView(
|
|
|
1859
1859
|
*
|
|
1860
1860
|
* See the <EditableValueView /> (Solid) demo for this component in action:
|
|
1861
1861
|
*
|
|
1862
|
-
* 
|
|
1864
1864
|
*
|
|
1865
1865
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -1929,7 +1929,7 @@ export function EditableValueView(
|
|
|
1929
1929
|
* See the <SortedTableInHtmlTable /> (Solid) demo for this component in
|
|
1930
1930
|
* action:
|
|
1931
1931
|
*
|
|
1932
|
-
* 
|
|
1934
1934
|
*
|
|
1935
1935
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -666,7 +666,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
666
666
|
*
|
|
667
667
|
* See the <TableInHtmlTable /> (Solid) demo for this component in action:
|
|
668
668
|
*
|
|
669
|
-
* 
|
|
671
671
|
*
|
|
672
672
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -818,7 +818,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
818
818
|
* See the <SortedTableInHtmlTable /> (Solid) demo for this component in
|
|
819
819
|
* action:
|
|
820
820
|
*
|
|
821
|
-
* 
|
|
823
823
|
*
|
|
824
824
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -997,7 +997,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
997
997
|
*
|
|
998
998
|
* See the <ValuesInHtmlTable /> (Solid) demo for this component in action:
|
|
999
999
|
*
|
|
1000
|
-
* 
|
|
1002
1002
|
*
|
|
1003
1003
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1134,7 +1134,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1134
1134
|
*
|
|
1135
1135
|
* See the <SliceInHtmlTable /> (Solid) demo for this component in action:
|
|
1136
1136
|
*
|
|
1137
|
-
* 
|
|
1139
1139
|
*
|
|
1140
1140
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1298,7 +1298,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1298
1298
|
* See the <RelationshipInHtmlTable /> (Solid) demo for this component in
|
|
1299
1299
|
* action:
|
|
1300
1300
|
*
|
|
1301
|
-
* 
|
|
1303
1303
|
*
|
|
1304
1304
|
* The component's props identify which Relationship to render based on
|
|
@@ -1480,7 +1480,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1480
1480
|
* See the <ResultTableInHtmlTable /> (Solid) demo for this component in
|
|
1481
1481
|
* action:
|
|
1482
1482
|
*
|
|
1483
|
-
* 
|
|
1485
1485
|
*
|
|
1486
1486
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1639,7 +1639,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1639
1639
|
* See the <ResultSortedTableInHtmlTable /> (Solid) demo for this component in
|
|
1640
1640
|
* action:
|
|
1641
1641
|
*
|
|
1642
|
-
* 
|
|
1644
1644
|
*
|
|
1645
1645
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1819,7 +1819,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1819
1819
|
*
|
|
1820
1820
|
* See the <EditableCellView /> (Solid) demo for this component in action:
|
|
1821
1821
|
*
|
|
1822
|
-
* 
|
|
1824
1824
|
*
|
|
1825
1825
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -1903,7 +1903,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1903
1903
|
*
|
|
1904
1904
|
* See the <EditableValueView /> (Solid) demo for this component in action:
|
|
1905
1905
|
*
|
|
1906
|
-
* 
|
|
1908
1908
|
*
|
|
1909
1909
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -1973,7 +1973,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1973
1973
|
* See the <SortedTableInHtmlTable /> (Solid) demo for this component in
|
|
1974
1974
|
* action:
|
|
1975
1975
|
*
|
|
1976
|
-
* 
|
|
1978
1978
|
*
|
|
1979
1979
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -46,7 +46,7 @@ export type InspectorProps = {
|
|
|
46
46
|
*
|
|
47
47
|
* See the <Inspector /> (Solid) demo for this component in action:
|
|
48
48
|
*
|
|
49
|
-
* 
|
|
51
51
|
*
|
|
52
52
|
* The component displays a nub in the corner of the screen which you may then
|
|
@@ -46,7 +46,7 @@ export type InspectorProps = {
|
|
|
46
46
|
*
|
|
47
47
|
* See the <Inspector /> (Solid) demo for this component in action:
|
|
48
48
|
*
|
|
49
|
-
* 
|
|
51
51
|
*
|
|
52
52
|
* The component displays a nub in the corner of the screen which you may then
|
|
@@ -690,7 +690,7 @@ export type SortedTablePaginatorProps = {
|
|
|
690
690
|
*
|
|
691
691
|
* See the <TableInHtmlTable /> (Svelte) demo for this component in action:
|
|
692
692
|
*
|
|
693
|
-
* 
|
|
695
695
|
*
|
|
696
696
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -854,7 +854,7 @@ export const TableInHtmlTable: Component<
|
|
|
854
854
|
* See the <SortedTableInHtmlTable /> (Svelte) demo for this component in
|
|
855
855
|
* action:
|
|
856
856
|
*
|
|
857
|
-
* 
|
|
859
859
|
*
|
|
860
860
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -1042,7 +1042,7 @@ export const SortedTableInHtmlTable: Component<
|
|
|
1042
1042
|
*
|
|
1043
1043
|
* See the <ValuesInHtmlTable /> (Svelte) demo for this component in action:
|
|
1044
1044
|
*
|
|
1045
|
-
* 
|
|
1047
1047
|
*
|
|
1048
1048
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1185,7 +1185,7 @@ export const ValuesInHtmlTable: Component<
|
|
|
1185
1185
|
*
|
|
1186
1186
|
* See the <SliceInHtmlTable /> (Svelte) demo for this component in action:
|
|
1187
1187
|
*
|
|
1188
|
-
* 
|
|
1190
1190
|
*
|
|
1191
1191
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1357,7 +1357,7 @@ export const SliceInHtmlTable: Component<
|
|
|
1357
1357
|
* See the <RelationshipInHtmlTable /> (Svelte) demo for this component in
|
|
1358
1358
|
* action:
|
|
1359
1359
|
*
|
|
1360
|
-
* 
|
|
1362
1362
|
*
|
|
1363
1363
|
* The component's props identify which Relationship to render based on
|
|
@@ -1544,7 +1544,7 @@ export const RelationshipInHtmlTable: Component<
|
|
|
1544
1544
|
* See the <ResultTableInHtmlTable /> (Svelte) demo for this component in
|
|
1545
1545
|
* action:
|
|
1546
1546
|
*
|
|
1547
|
-
* 
|
|
1549
1549
|
*
|
|
1550
1550
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1713,7 +1713,7 @@ export const ResultTableInHtmlTable: Component<
|
|
|
1713
1713
|
* See the <ResultSortedTableInHtmlTable /> (Svelte) demo for this component in
|
|
1714
1714
|
* action:
|
|
1715
1715
|
*
|
|
1716
|
-
* 
|
|
1718
1718
|
*
|
|
1719
1719
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1902,7 +1902,7 @@ export const ResultSortedTableInHtmlTable: Component<
|
|
|
1902
1902
|
*
|
|
1903
1903
|
* See the <EditableCellView /> (Svelte) demo for this component in action:
|
|
1904
1904
|
*
|
|
1905
|
-
* 
|
|
1907
1907
|
*
|
|
1908
1908
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -1975,7 +1975,7 @@ export const EditableCellView: Component<
|
|
|
1975
1975
|
*
|
|
1976
1976
|
* See the <EditableValueView /> (Svelte) demo for this component in action:
|
|
1977
1977
|
*
|
|
1978
|
-
* 
|
|
1980
1980
|
*
|
|
1981
1981
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -2050,7 +2050,7 @@ export const EditableValueView: Component<
|
|
|
2050
2050
|
* See the <SortedTableInHtmlTable /> (Svelte) demo for this component in
|
|
2051
2051
|
* action:
|
|
2052
2052
|
*
|
|
2053
|
-
* 
|
|
2055
2055
|
*
|
|
2056
2056
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -664,7 +664,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
664
664
|
*
|
|
665
665
|
* See the <TableInHtmlTable /> (Svelte) demo for this component in action:
|
|
666
666
|
*
|
|
667
|
-
* 
|
|
669
669
|
*
|
|
670
670
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -834,7 +834,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
834
834
|
* See the <SortedTableInHtmlTable /> (Svelte) demo for this component in
|
|
835
835
|
* action:
|
|
836
836
|
*
|
|
837
|
-
* 
|
|
839
839
|
*
|
|
840
840
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -1030,7 +1030,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1030
1030
|
*
|
|
1031
1031
|
* See the <ValuesInHtmlTable /> (Svelte) demo for this component in action:
|
|
1032
1032
|
*
|
|
1033
|
-
* 
|
|
1035
1035
|
*
|
|
1036
1036
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1181,7 +1181,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1181
1181
|
*
|
|
1182
1182
|
* See the <SliceInHtmlTable /> (Svelte) demo for this component in action:
|
|
1183
1183
|
*
|
|
1184
|
-
* 
|
|
1186
1186
|
*
|
|
1187
1187
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1359,7 +1359,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1359
1359
|
* See the <RelationshipInHtmlTable /> (Svelte) demo for this component in
|
|
1360
1360
|
* action:
|
|
1361
1361
|
*
|
|
1362
|
-
* 
|
|
1364
1364
|
*
|
|
1365
1365
|
* The component's props identify which Relationship to render based on
|
|
@@ -1554,7 +1554,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1554
1554
|
* See the <ResultTableInHtmlTable /> (Svelte) demo for this component in
|
|
1555
1555
|
* action:
|
|
1556
1556
|
*
|
|
1557
|
-
* 
|
|
1559
1559
|
*
|
|
1560
1560
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1731,7 +1731,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1731
1731
|
* See the <ResultSortedTableInHtmlTable /> (Svelte) demo for this component in
|
|
1732
1732
|
* action:
|
|
1733
1733
|
*
|
|
1734
|
-
* 
|
|
1736
1736
|
*
|
|
1737
1737
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1928,7 +1928,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1928
1928
|
*
|
|
1929
1929
|
* See the <EditableCellView /> (Svelte) demo for this component in action:
|
|
1930
1930
|
*
|
|
1931
|
-
* 
|
|
1933
1933
|
*
|
|
1934
1934
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -2015,7 +2015,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2015
2015
|
*
|
|
2016
2016
|
* See the <EditableValueView /> (Svelte) demo for this component in action:
|
|
2017
2017
|
*
|
|
2018
|
-
* 
|
|
2020
2020
|
*
|
|
2021
2021
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -2090,7 +2090,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2090
2090
|
* See the <SortedTableInHtmlTable /> (Svelte) demo for this component in
|
|
2091
2091
|
* action:
|
|
2092
2092
|
*
|
|
2093
|
-
* 
|
|
2095
2095
|
*
|
|
2096
2096
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -46,7 +46,7 @@ export type InspectorProps = {
|
|
|
46
46
|
*
|
|
47
47
|
* See the <Inspector /> (Svelte) demo for this component in action:
|
|
48
48
|
*
|
|
49
|
-
* 
|
|
51
51
|
*
|
|
52
52
|
* The component displays a nub in the corner of the screen which you may then
|
|
@@ -46,7 +46,7 @@ export type InspectorProps = {
|
|
|
46
46
|
*
|
|
47
47
|
* See the <Inspector /> (Svelte) demo for this component in action:
|
|
48
48
|
*
|
|
49
|
-
* 
|
|
51
51
|
*
|
|
52
52
|
* The component displays a nub in the corner of the screen which you may then
|
package/agents.md
CHANGED
|
@@ -418,7 +418,7 @@ export const createZodSchematizer: typeof createZodSchematizerDecl = () => {
|
|
|
418
418
|
|
|
419
419
|
- Extract basic types only: `string`, `number`, `boolean`
|
|
420
420
|
- Handle defaults via schema introspection
|
|
421
|
-
- Support nullable and
|
|
421
|
+
- Support nullable, optional, and required modifiers
|
|
422
422
|
- **Ignore** complex types (arrays, objects, etc.) - they won't appear in output
|
|
423
423
|
- Use recursive unwrapping for wrapper types (e.g., `ZodOptional`, `ZodNullable`,
|
|
424
424
|
`ZodDefault`)
|
|
@@ -439,15 +439,21 @@ const unwrap = (
|
|
|
439
439
|
schema: any,
|
|
440
440
|
defaultValue?: any,
|
|
441
441
|
allowNull?: boolean,
|
|
442
|
-
|
|
442
|
+
required = true,
|
|
443
|
+
): [any, any, boolean, boolean] => {
|
|
443
444
|
const typeName = schema._def?.typeName;
|
|
444
445
|
return typeName === ZOD_OPTIONAL
|
|
445
|
-
? unwrap(schema._def.innerType, defaultValue, allowNull)
|
|
446
|
+
? unwrap(schema._def.innerType, defaultValue, allowNull, false)
|
|
446
447
|
: typeName === ZOD_NULLABLE
|
|
447
|
-
? unwrap(schema._def.innerType, defaultValue, true)
|
|
448
|
+
? unwrap(schema._def.innerType, defaultValue, true, required)
|
|
448
449
|
: typeName === ZOD_DEFAULT
|
|
449
|
-
? unwrap(
|
|
450
|
-
|
|
450
|
+
? unwrap(
|
|
451
|
+
schema._def.innerType,
|
|
452
|
+
schema._def.defaultValue(),
|
|
453
|
+
allowNull,
|
|
454
|
+
false,
|
|
455
|
+
)
|
|
456
|
+
: [schema, defaultValue, allowNull ?? false, required];
|
|
451
457
|
};
|
|
452
458
|
```
|
|
453
459
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="type",c=e=>(t,r,o)=>e(t)?o?.():r(t),s=e=>null==e,a=e=>void 0===e,l=c(s),u=c(a),f=Object,i=e=>f.getPrototypeOf(e),p=f.entries,y=f.keys,d=f.freeze,h=(e=[])=>f.fromEntries(e),v=(e,t)=>((e,t)=>e.forEach(t))(p(e),([e,r])=>t(r,e)),b=(e,c,p)=>{const b=(c,s)=>{const[l,f,i,p=s]=e(c,void 0,void 0,s),y=l?.type;if(y!==t&&y!==o&&y!==r&&"object"!==y&&"array"!==y)return;const d={[n]:y};return u(f,e=>{d.default=e}),i&&(d.allowNull=!0),p&&a(f)&&(d.required=!0),d};return d({toTablesSchema:e=>{const t=h();return v(e,(e,r)=>{const o=h();var n;u(c(e),t=>v(t,(t,r)=>u(b(t,p?.(e,r,t)),e=>{o[r]=e}))),(e=>!s(e)&&l(i(e),e=>e==f.prototype||s(i(e)),()=>!0))(n=o)&&0==(e=>y(e).length)(n)||(t[r]=o)}),t},toValuesSchema:e=>{const t=h();return v(e,(e,r)=>u(b(e),e=>{t[r]=e})),t}})};export{b as createCustomSchematizer};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t=t=>typeof t,e=t(""),r=t(!0),n=t(0),o="array",s="type",u="default",c="value",i="key",a="optional",f="required",l="unit",y=t=>(e,r,n)=>t(e)?n?.():r(e),d=t=>null==t,p=t=>void 0===t,v=t=>null===t,j=y(d),h=y(p),m=r=>t(r)==e,b=t=>Array.isArray(t),g=t=>t.length,k=(t,e)=>t.every(e),q=(t,e)=>t.forEach(e),A=(t,e)=>t.find(e),E=Object,O=t=>E.getPrototypeOf(t),S=E.entries,w=E.keys,x=E.freeze,z=(t=[])=>E.fromEntries(t),N=(t,e)=>q(S(t),([t,r])=>e(r,t)),P=t=>(t=>!d(t)&&j(O(t),t=>t==E.prototype||d(O(t)),()=>!0))(t)&&0==(t=>g(w(t)))(t),T=(t,n,u,c=!0)=>{const i=t?.json??t;if(b(i)){const t=!k(i,t=>!v(t?.[l])&&!v(t));if(2===g(i)&&(a=i[0]?.[l],!1===a)&&(t=>!0===t)(i[1]?.[l]))return[{[s]:r},n,u??!1,c];if(k(i,t=>m(t?.[l]??t)))return[{[s]:e},n,u??!1,c];if(t){const t=A(i,t=>!v(t?.[l])&&!v(t)&&"="!==t);if(t)return T(t,n,!0,c)}}var a;return b(i)||p(i?.sequence)?!b(i)&&m(i?.[l])?[{[s]:e},n,u??!1,c]:[{[s]:i?.domain||i},n,u??!1,c]:[{[s]:o},n,u??!1,c]},V=t=>{const e=z(),r=t?.json??t;return r?.[f]&&q(r[f],t=>{e[t[i]]=t[c]}),r?.[a]&&q(r[a],t=>{const r=t[c],n=t[u];e[t[i]]=p(n)?r:{[c]:r,[u]:n}}),P(e)?void 0:e},B=(t,e)=>{const r=t?.json??t;return b(r?.[f])||b(r?.[a])?!p(A(r?.[f]??[],t=>t[i]===e)):void 0},C=(t,e,r,n=!0)=>{if(b(t)&&3===g(t)&&"="===t[1]){const e=t[0]?.json??t[0];return T(e,t[2],r,!1)}return t?.[c]&&!p(t?.[u])?T(t[c],t[u],r,!1):T(t,e,r,n)},D=()=>((t,c,i)=>{const a=(c,i)=>{const[a,l,y,d=i]=t(c,void 0,void 0,i),v=a?.type;if(v!==e&&v!==n&&v!==r&&"object"!==v&&v!==o)return;const j={[s]:v};return h(l,t=>{j[u]=t}),y&&(j.allowNull=!0),d&&p(l)&&(j[f]=!0),j};return x({toTablesSchema:t=>{const e=z();return N(t,(t,r)=>{const n=z();h(c(t),e=>N(e,(e,r)=>h(a(e,i?.(t,r,e)),t=>{n[r]=t}))),P(n)||(e[r]=n)}),e},toValuesSchema:t=>{const e=z();return N(t,(t,r)=>h(a(t),t=>{e[r]=t})),e}})})(C,V,B);export{D as createArkTypeSchematizer};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t=t=>typeof t,e=t(""),r=t(!0),n=t(0),o="array",s="type",u="default",c="value",i="key",a="optional",f="required",l="unit",y=t=>(e,r,n)=>t(e)?n?.():r(e),d=t=>null==t,p=t=>void 0===t,v=t=>null===t,j=y(d),h=y(p),m=r=>t(r)==e,b=t=>Array.isArray(t),g=t=>t.length,k=(t,e)=>t.every(e),q=(t,e)=>t.forEach(e),A=(t,e)=>t.find(e),E=Object,O=t=>E.getPrototypeOf(t),S=E.entries,w=E.keys,x=E.freeze,z=(t=[])=>E.fromEntries(t),N=(t,e)=>q(S(t),([t,r])=>e(r,t)),P=t=>(t=>!d(t)&&j(O(t),t=>t==E.prototype||d(O(t)),()=>!0))(t)&&0==(t=>g(w(t)))(t),T=(t,n,u,c=!0)=>{const i=t?.json??t;if(b(i)){const t=!k(i,t=>!v(t?.[l])&&!v(t));if(2===g(i)&&(a=i[0]?.[l],!1===a)&&(t=>!0===t)(i[1]?.[l]))return[{[s]:r},n,u??!1,c];if(k(i,t=>m(t?.[l]??t)))return[{[s]:e},n,u??!1,c];if(t){const t=A(i,t=>!v(t?.[l])&&!v(t)&&"="!==t);if(t)return T(t,n,!0,c)}}var a;return b(i)||p(i?.sequence)?!b(i)&&m(i?.[l])?[{[s]:e},n,u??!1,c]:[{[s]:i?.domain||i},n,u??!1,c]:[{[s]:o},n,u??!1,c]},V=t=>{const e=z(),r=t?.json??t;return r?.[f]&&q(r[f],t=>{e[t[i]]=t[c]}),r?.[a]&&q(r[a],t=>{const r=t[c],n=t[u];e[t[i]]=p(n)?r:{[c]:r,[u]:n}}),P(e)?void 0:e},B=(t,e)=>{const r=t?.json??t;return b(r?.[f])||b(r?.[a])?!p(A(r?.[f]??[],t=>t[i]===e)):void 0},C=(t,e,r,n=!0)=>{if(b(t)&&3===g(t)&&"="===t[1]){const e=t[0]?.json??t[0];return T(e,t[2],r,!1)}return t?.[c]&&!p(t?.[u])?T(t[c],t[u],r,!1):T(t,e,r,n)},D=()=>((t,c,i)=>{const a=(c,i)=>{const[a,l,y,d=i]=t(c,void 0,void 0,i),v=a?.type;if(v!==e&&v!==n&&v!==r&&"object"!==v&&v!==o)return;const j={[s]:v};return h(l,t=>{j[u]=t}),y&&(j.allowNull=!0),d&&p(l)&&(j[f]=!0),j};return x({toTablesSchema:t=>{const e=z();return N(t,(t,r)=>{const n=z();h(c(t),e=>N(e,(e,r)=>h(a(e,i?.(t,r,e)),t=>{n[r]=t}))),P(n)||(e[r]=n)}),e},toValuesSchema:t=>{const e=z();return N(t,(t,r)=>h(a(t),t=>{e[r]=t})),e}})})(C,V,B);export{D as createArkTypeSchematizer};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=t=>typeof t,e=t(""),r=t(!0),o=t(0),n="object",a="array",
|
|
1
|
+
const t=t=>typeof t,e=t(""),r=t(!0),o=t(0),n="object",a="array",s="type",i="Literal",l="propertySignatures",c="TypeLiteral",u=t=>(e,r,o)=>t(e)?o?.():r(e),p=t=>null==t,y=t=>void 0===t,f=t=>null===t,d=u(p),g=u(y),m=(t,e)=>t.find(e),v=Object,h=t=>v.getPrototypeOf(t),_=v.entries,b=v.keys,w=v.freeze,O=(t=[])=>v.fromEntries(t),S=(t,e)=>((t,e)=>t.forEach(e))(_(t),([t,r])=>e(r,t)),T=(t,e,r,o=!0)=>{const n=t.ast||t,a=n.type||n;if(o=o&&!n.isOptional,"Union"===a._tag){const t=a.types,n=m(t,t=>!(t._tag===i&&f(t.literal)));return[{[s]:E(n)},e,r||!!m(t,t=>t._tag===i&&f(t.literal)),o]}return[{[s]:E(a)},e,r||!1,o]},E=t=>{const s=t?._tag,l=typeof t?.literal;return s===i?l===e||l===o||l===r?l:"":"StringKeyword"===s?e:"NumberKeyword"===s?o:"BooleanKeyword"===s?r:"TupleType"===s?a:s===c?n:""},K=t=>{const e=t.ast;if(e._tag===c){const t=e[l];if(t){const e={};return t.forEach(t=>{e[t.name]=t.type}),e}}},j=(t,e)=>{const r=t.ast?.[l],o=r?m(r,t=>t.name===e):void 0;return o?!o.isOptional:void 0},L=()=>((t,i,l)=>{const c=(i,l)=>{const[c,u,p,f=l]=t(i,void 0,void 0,l),d=c?.type;if(d!==e&&d!==o&&d!==r&&d!==n&&d!==a)return;const m={[s]:d};return g(u,t=>{m.default=t}),p&&(m.allowNull=!0),f&&y(u)&&(m.required=!0),m};return w({toTablesSchema:t=>{const e=O();return S(t,(t,r)=>{const o=O();var n;g(i(t),e=>S(e,(e,r)=>g(c(e,l?.(t,r,e)),t=>{o[r]=t}))),(t=>!p(t)&&d(h(t),t=>t==v.prototype||p(h(t)),()=>!0))(n=o)&&0==(t=>b(t).length)(n)||(e[r]=o)}),e},toValuesSchema:t=>{const e=O();return S(t,(t,r)=>g(c(t),t=>{e[r]=t})),e}})})(T,K,j);export{L as createEffectSchematizer};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=t=>typeof t,e=t(""),r=t(!0),o=t(0),n="object",a="array",
|
|
1
|
+
const t=t=>typeof t,e=t(""),r=t(!0),o=t(0),n="object",a="array",s="type",i="Literal",l="propertySignatures",c="TypeLiteral",u=t=>(e,r,o)=>t(e)?o?.():r(e),p=t=>null==t,y=t=>void 0===t,f=t=>null===t,d=u(p),g=u(y),m=(t,e)=>t.find(e),v=Object,h=t=>v.getPrototypeOf(t),_=v.entries,b=v.keys,w=v.freeze,O=(t=[])=>v.fromEntries(t),S=(t,e)=>((t,e)=>t.forEach(e))(_(t),([t,r])=>e(r,t)),T=(t,e,r,o=!0)=>{const n=t.ast||t,a=n.type||n;if(o=o&&!n.isOptional,"Union"===a._tag){const t=a.types,n=m(t,t=>!(t._tag===i&&f(t.literal)));return[{[s]:E(n)},e,r||!!m(t,t=>t._tag===i&&f(t.literal)),o]}return[{[s]:E(a)},e,r||!1,o]},E=t=>{const s=t?._tag,l=typeof t?.literal;return s===i?l===e||l===o||l===r?l:"":"StringKeyword"===s?e:"NumberKeyword"===s?o:"BooleanKeyword"===s?r:"TupleType"===s?a:s===c?n:""},K=t=>{const e=t.ast;if(e._tag===c){const t=e[l];if(t){const e={};return t.forEach(t=>{e[t.name]=t.type}),e}}},j=(t,e)=>{const r=t.ast?.[l],o=r?m(r,t=>t.name===e):void 0;return o?!o.isOptional:void 0},L=()=>((t,i,l)=>{const c=(i,l)=>{const[c,u,p,f=l]=t(i,void 0,void 0,l),d=c?.type;if(d!==e&&d!==o&&d!==r&&d!==n&&d!==a)return;const m={[s]:d};return g(u,t=>{m.default=t}),p&&(m.allowNull=!0),f&&y(u)&&(m.required=!0),m};return w({toTablesSchema:t=>{const e=O();return S(t,(t,r)=>{const o=O();var n;g(i(t),e=>S(e,(e,r)=>g(c(e,l?.(t,r,e)),t=>{o[r]=t}))),(t=>!p(t)&&d(h(t),t=>t==v.prototype||p(h(t)),()=>!0))(n=o)&&0==(t=>b(t).length)(n)||(e[r]=o)}),e},toValuesSchema:t=>{const e=O();return S(t,(t,r)=>g(c(t),t=>{e[r]=t})),e}})})(T,K,j);export{L as createEffectSchematizer};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="type",
|
|
1
|
+
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="type",p="default",s="null",l="anyOf",y="required",i=e=>(t,r,o)=>e(t)?o?.():r(t),u=e=>null==e,a=e=>void 0===e,c=i(u),f=i(a),v=Object,d=e=>v.getPrototypeOf(e),b=v.entries,m=v.keys,O=v.freeze,h=(e=[])=>v.fromEntries(e),S=(e,t)=>((e,t)=>e.forEach(t))(b(e),([e,r])=>t(r,e)),g=(e,t,r,o=!(e=>{return!a((t=Object.getOwnPropertySymbols(e??{}),r=e=>e+""=="Symbol(TypeBox.Optional)",t.find(r)));var t,r})(e))=>{if(e?.[l]){const y=e[l],i=y.some(e=>e?.type===s),u=(n=e=>e?.type!==s,y.filter(n)),a=u[0];if(a&&u.every(e=>e?.type===a.type))return g(a,t??e?.[p],i||r,o)}var n;return[e,t??e?.[p],r??!1,o]},j=e=>e?.properties,w=(e,t)=>{return a(e?.properties)?void 0:(r=t,(e?.[y]??[]).includes(r));var r},x=()=>((e,s,l)=>{const i=(s,l)=>{const[i,u,c,v=l]=e(s,void 0,void 0,l),d=i?.type;if(d!==t&&d!==o&&d!==r&&"object"!==d&&"array"!==d)return;const b={[n]:d};return f(u,e=>{b[p]=e}),c&&(b.allowNull=!0),v&&a(u)&&(b[y]=!0),b};return O({toTablesSchema:e=>{const t=h();return S(e,(e,r)=>{const o=h();var n;f(s(e),t=>S(t,(t,r)=>f(i(t,l?.(e,r,t)),e=>{o[r]=e}))),(e=>!u(e)&&c(d(e),e=>e==v.prototype||u(d(e)),()=>!0))(n=o)&&0==(e=>m(e).length)(n)||(t[r]=o)}),t},toValuesSchema:e=>{const t=h();return S(e,(e,r)=>f(i(e),e=>{t[r]=e})),t}})})(g,j,w);export{x as createTypeBoxSchematizer};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="type",
|
|
1
|
+
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="type",p="default",s="null",l="anyOf",y="required",i=e=>(t,r,o)=>e(t)?o?.():r(t),u=e=>null==e,a=e=>void 0===e,c=i(u),f=i(a),v=Object,d=e=>v.getPrototypeOf(e),b=v.entries,m=v.keys,O=v.freeze,h=(e=[])=>v.fromEntries(e),S=(e,t)=>((e,t)=>e.forEach(t))(b(e),([e,r])=>t(r,e)),g=(e,t,r,o=!(e=>{return!a((t=Object.getOwnPropertySymbols(e??{}),r=e=>e+""=="Symbol(TypeBox.Optional)",t.find(r)));var t,r})(e))=>{if(e?.[l]){const y=e[l],i=y.some(e=>e?.type===s),u=(n=e=>e?.type!==s,y.filter(n)),a=u[0];if(a&&u.every(e=>e?.type===a.type))return g(a,t??e?.[p],i||r,o)}var n;return[e,t??e?.[p],r??!1,o]},j=e=>e?.properties,w=(e,t)=>{return a(e?.properties)?void 0:(r=t,(e?.[y]??[]).includes(r));var r},x=()=>((e,s,l)=>{const i=(s,l)=>{const[i,u,c,v=l]=e(s,void 0,void 0,l),d=i?.type;if(d!==t&&d!==o&&d!==r&&"object"!==d&&"array"!==d)return;const b={[n]:d};return f(u,e=>{b[p]=e}),c&&(b.allowNull=!0),v&&a(u)&&(b[y]=!0),b};return O({toTablesSchema:e=>{const t=h();return S(e,(e,r)=>{const o=h();var n;f(s(e),t=>S(t,(t,r)=>f(i(t,l?.(e,r,t)),e=>{o[r]=e}))),(e=>!u(e)&&c(d(e),e=>e==v.prototype||u(d(e)),()=>!0))(n=o)&&0==(e=>m(e).length)(n)||(t[r]=o)}),t},toValuesSchema:e=>{const t=h();return S(e,(e,r)=>f(i(e),e=>{t[r]=e})),t}})})(g,j,w);export{x as createTypeBoxSchematizer};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="object",l="type",a="
|
|
1
|
+
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="object",l="type",a="default",c="fallback",s="wrapped",i=e=>(t,r,o)=>e(t)?o?.():r(t),p=e=>null==e,u=e=>void 0===e,y=i(p),d=i(u),f=r=>e(r)==t,v=Object,b=e=>v.getPrototypeOf(e),h=v.entries,k=v.keys,m=v.freeze,g=(e=[])=>v.fromEntries(e),j=(e,t)=>((e,t)=>e.forEach(t))(h(e),([e,r])=>t(r,e)),w=(e,r,o,i=!0)=>{const p=e?.type;return"optional"===p?w(e[s],r??e?.[a],o,!1):"nullable"===p?w(e[s],r,!0,i):"record"===p?[{type:n},r??e?.[c],o??!1,i]:"picklist"===p&&(u=e.options,y=f,u.every(y))?[{[l]:t},r??e?.[c],o??!1,i]:"literal"===p&&f(e.literal)?[{[l]:t},r??e?.[c],o??!1,i]:[e,r??e?.[c],o??!1,i];var u,y},E=e=>e?.entries,O=()=>((e,c)=>{const s=(c,s)=>{const[i,p,y,f=s]=e(c,void 0,void 0,s),v=i?.type;if(v!==t&&v!==o&&v!==r&&v!==n&&"array"!==v)return;const b={[l]:v};return d(p,e=>{b[a]=e}),y&&(b.allowNull=!0),f&&u(p)&&(b.required=!0),b};return m({toTablesSchema:e=>{const t=g();return j(e,(e,r)=>{const o=g();var n;d(c(e),e=>j(e,(e,t)=>d(s(e,void 0),e=>{o[t]=e}))),(e=>!p(e)&&y(b(e),e=>e==v.prototype||p(b(e)),()=>!0))(n=o)&&0==(e=>k(e).length)(n)||(t[r]=o)}),t},toValuesSchema:e=>{const t=g();return j(e,(e,r)=>d(s(e),e=>{t[r]=e})),t}})})(w,E);export{O as createValibotSchematizer};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="object",l="type",a="
|
|
1
|
+
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="object",l="type",a="default",c="fallback",s="wrapped",i=e=>(t,r,o)=>e(t)?o?.():r(t),p=e=>null==e,u=e=>void 0===e,y=i(p),d=i(u),f=r=>e(r)==t,v=Object,b=e=>v.getPrototypeOf(e),h=v.entries,k=v.keys,m=v.freeze,g=(e=[])=>v.fromEntries(e),j=(e,t)=>((e,t)=>e.forEach(t))(h(e),([e,r])=>t(r,e)),w=(e,r,o,i=!0)=>{const p=e?.type;return"optional"===p?w(e[s],r??e?.[a],o,!1):"nullable"===p?w(e[s],r,!0,i):"record"===p?[{type:n},r??e?.[c],o??!1,i]:"picklist"===p&&(u=e.options,y=f,u.every(y))?[{[l]:t},r??e?.[c],o??!1,i]:"literal"===p&&f(e.literal)?[{[l]:t},r??e?.[c],o??!1,i]:[e,r??e?.[c],o??!1,i];var u,y},E=e=>e?.entries,O=()=>((e,c)=>{const s=(c,s)=>{const[i,p,y,f=s]=e(c,void 0,void 0,s),v=i?.type;if(v!==t&&v!==o&&v!==r&&v!==n&&"array"!==v)return;const b={[l]:v};return d(p,e=>{b[a]=e}),y&&(b.allowNull=!0),f&&u(p)&&(b.required=!0),b};return m({toTablesSchema:e=>{const t=g();return j(e,(e,r)=>{const o=g();var n;d(c(e),e=>j(e,(e,t)=>d(s(e,void 0),e=>{o[t]=e}))),(e=>!p(e)&&y(b(e),e=>e==v.prototype||p(b(e)),()=>!0))(n=o)&&0==(e=>k(e).length)(n)||(t[r]=o)}),t},toValuesSchema:e=>{const t=g();return j(e,(e,r)=>d(s(e),e=>{t[r]=e})),t}})})(w,E);export{O as createValibotSchematizer};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="type",s="default",l=e=>(t,r,o)=>e(t)?o?.():r(t),c=e=>null==e,a=l(c),p=l(
|
|
1
|
+
const e=e=>typeof e,t=e(""),r=e(!0),o=e(0),n="type",s="default",l=e=>(t,r,o)=>e(t)?o?.():r(t),c=e=>null==e,i=e=>void 0===e,a=l(c),p=l(i),u=r=>e(r)==t,y=e=>e.length,f=Object,d=e=>f.getPrototypeOf(e),v=f.entries,h=f.keys,m=f.freeze,b=(e=[])=>f.fromEntries(e),w=(e,t)=>((e,t)=>e.forEach(t))(v(e),([e,r])=>t(r,e)),g=(e,r,o,l=!1===e?.spec?.optional)=>{const c=e?._whitelist?Array.from(e._whitelist):[];return[{[n]:"mixed"===e?.type&&y(c)>0&&(i=c,a=u,i.every(a))?t:e?.type},r??e?.spec?.[s],o||e?.spec?.nullable||!1,l];var i,a},j=e=>e?.fields,x=()=>((e,l)=>{const u=(l,c)=>{const[a,u,y,f=c]=e(l,void 0,void 0,c),d=a?.type;if(d!==t&&d!==o&&d!==r&&"object"!==d&&"array"!==d)return;const v={[n]:d};return p(u,e=>{v[s]=e}),y&&(v.allowNull=!0),f&&i(u)&&(v.required=!0),v};return m({toTablesSchema:e=>{const t=b();return w(e,(e,r)=>{const o=b();var n;p(l(e),e=>w(e,(e,t)=>p(u(e,void 0),e=>{o[t]=e}))),(e=>!c(e)&&a(d(e),e=>e==f.prototype||c(d(e)),()=>!0))(n=o)&&0==(e=>y(h(e)))(n)||(t[r]=o)}),t},toValuesSchema:e=>{const t=b();return w(e,(e,r)=>p(u(e),e=>{t[r]=e})),t}})})(g,j);export{x as createYupSchematizer};
|
|
Binary file
|