orchid-orm-schema-to-zod 0.2.21 → 0.2.23
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/.turbo/turbo-check.log +192 -0
- package/CHANGELOG.md +14 -0
- package/package.json +2 -2
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
|
|
2
|
+
> orchid-orm-schema-to-zod@0.2.22 check /home/romeo/dev/my/orchid-orm/packages/schema-to-zod
|
|
3
|
+
> jest
|
|
4
|
+
|
|
5
|
+
PASS src/index.test.ts
|
|
6
|
+
table to zod
|
|
7
|
+
✓ should convert a table to a zod validation schema (248 ms)
|
|
8
|
+
instance to zod
|
|
9
|
+
✓ should convert object with shape to a zod validation schema (2 ms)
|
|
10
|
+
schema to zod
|
|
11
|
+
transform
|
|
12
|
+
✓ should transform column value (1 ms)
|
|
13
|
+
✓ should transform json value (1 ms)
|
|
14
|
+
to
|
|
15
|
+
✓ should transform column value to a type (51 ms)
|
|
16
|
+
✓ should transform json value to a type (1 ms)
|
|
17
|
+
refine
|
|
18
|
+
✓ should add a refine check for column type (2 ms)
|
|
19
|
+
✓ should add a refine check for json type (2 ms)
|
|
20
|
+
superRefine
|
|
21
|
+
✓ should add a superRefine check for column type (26 ms)
|
|
22
|
+
✓ should add a superRefine check for json type (2 ms)
|
|
23
|
+
validationDefault
|
|
24
|
+
✓ should set default value for column (2 ms)
|
|
25
|
+
✓ should set default value for json type (1 ms)
|
|
26
|
+
nullable
|
|
27
|
+
✓ should parse nullable (1 ms)
|
|
28
|
+
smallint
|
|
29
|
+
✓ should convert to number (84 ms)
|
|
30
|
+
integer
|
|
31
|
+
✓ should convert to number (26 ms)
|
|
32
|
+
real
|
|
33
|
+
✓ should convert to number (35 ms)
|
|
34
|
+
smallSerial
|
|
35
|
+
✓ should convert to number (39 ms)
|
|
36
|
+
serial
|
|
37
|
+
✓ should convert to number (77 ms)
|
|
38
|
+
money
|
|
39
|
+
✓ should convert to number (29 ms)
|
|
40
|
+
bigint
|
|
41
|
+
✓ should validate bigint and parse to a string (35 ms)
|
|
42
|
+
numeric
|
|
43
|
+
✓ should validate bigint and parse to a string (1 ms)
|
|
44
|
+
decimal
|
|
45
|
+
✓ should validate bigint and parse to a string (1 ms)
|
|
46
|
+
doublePrecision
|
|
47
|
+
✓ should validate bigint and parse to a string (1 ms)
|
|
48
|
+
bigSerial
|
|
49
|
+
✓ should validate bigint and parse to a string (1 ms)
|
|
50
|
+
varchar
|
|
51
|
+
✓ should convert to string (40 ms)
|
|
52
|
+
✓ should convert to string with limit (2 ms)
|
|
53
|
+
char
|
|
54
|
+
✓ should convert to string (61 ms)
|
|
55
|
+
✓ should convert to string with limit (1 ms)
|
|
56
|
+
text
|
|
57
|
+
✓ should convert to string (86 ms)
|
|
58
|
+
string
|
|
59
|
+
✓ should convert to string (30 ms)
|
|
60
|
+
bytea
|
|
61
|
+
✓ should check Buffer (3 ms)
|
|
62
|
+
date
|
|
63
|
+
✓ should parse from string to a Date (2 ms)
|
|
64
|
+
✓ should parse from Date to a Date (3 ms)
|
|
65
|
+
timestamp
|
|
66
|
+
✓ should parse from string to a Date (1 ms)
|
|
67
|
+
✓ should parse from Date to a Date (3 ms)
|
|
68
|
+
timestampWithTimeZone
|
|
69
|
+
✓ should parse from string to a Date (1 ms)
|
|
70
|
+
✓ should parse from Date to a Date (2 ms)
|
|
71
|
+
time
|
|
72
|
+
✓ should validate and parse to a string (2 ms)
|
|
73
|
+
timeWithTimeZone
|
|
74
|
+
✓ should validate and parse to a string (1 ms)
|
|
75
|
+
interval
|
|
76
|
+
✓ should validate and parse time interval (2 ms)
|
|
77
|
+
boolean
|
|
78
|
+
✓ should validate and parse a boolean (15 ms)
|
|
79
|
+
enum
|
|
80
|
+
✓ should validate and parse enum (2 ms)
|
|
81
|
+
point
|
|
82
|
+
✓ should parse to a string without validation (1 ms)
|
|
83
|
+
line
|
|
84
|
+
✓ should parse to a string without validation (1 ms)
|
|
85
|
+
lseg
|
|
86
|
+
✓ should parse to a string without validation (1 ms)
|
|
87
|
+
box
|
|
88
|
+
✓ should parse to a string without validation (1 ms)
|
|
89
|
+
path
|
|
90
|
+
✓ should parse to a string without validation (25 ms)
|
|
91
|
+
polygon
|
|
92
|
+
✓ should parse to a string without validation (1 ms)
|
|
93
|
+
circle
|
|
94
|
+
✓ should parse to a string without validation (1 ms)
|
|
95
|
+
cidr
|
|
96
|
+
✓ should parse to a string without validation (1 ms)
|
|
97
|
+
inet
|
|
98
|
+
✓ should parse to a string without validation (1 ms)
|
|
99
|
+
macaddr
|
|
100
|
+
✓ should parse to a string without validation (1 ms)
|
|
101
|
+
macaddr8
|
|
102
|
+
✓ should parse to a string without validation (1 ms)
|
|
103
|
+
bit
|
|
104
|
+
✓ should validate a string to contain only 1 or 0 and parse to a string (11 ms)
|
|
105
|
+
bitVarying
|
|
106
|
+
✓ should validate a string to contain only 1 or 0 and parse to a string (1 ms)
|
|
107
|
+
tsvector
|
|
108
|
+
✓ should parse to a string without validation (2 ms)
|
|
109
|
+
tsquery
|
|
110
|
+
✓ should parse to a string without validation (86 ms)
|
|
111
|
+
xml
|
|
112
|
+
✓ should parse to a string without validation (19 ms)
|
|
113
|
+
jsonText
|
|
114
|
+
✓ should parse to a string without validation (2 ms)
|
|
115
|
+
uuid
|
|
116
|
+
✓ should validate uuid and parse to a string (26 ms)
|
|
117
|
+
array
|
|
118
|
+
✓ should validate and parse array (61 ms)
|
|
119
|
+
json
|
|
120
|
+
any
|
|
121
|
+
✓ should parse to any (1 ms)
|
|
122
|
+
bigint
|
|
123
|
+
✓ should validate bigint and parse to string (2 ms)
|
|
124
|
+
boolean
|
|
125
|
+
✓ should parse boolean (1 ms)
|
|
126
|
+
date
|
|
127
|
+
✓ should parse a Date (25 ms)
|
|
128
|
+
nan
|
|
129
|
+
✓ should parse a NaN (80 ms)
|
|
130
|
+
never
|
|
131
|
+
✓ should parse a never (10 ms)
|
|
132
|
+
null
|
|
133
|
+
✓ should parse a null (2 ms)
|
|
134
|
+
number
|
|
135
|
+
✓ should parse a number (31 ms)
|
|
136
|
+
string
|
|
137
|
+
✓ should parse a string (28 ms)
|
|
138
|
+
undefined
|
|
139
|
+
✓ should parse a undefined (2 ms)
|
|
140
|
+
unknown
|
|
141
|
+
✓ should parse unknown (24 ms)
|
|
142
|
+
void
|
|
143
|
+
✓ should parse void (1 ms)
|
|
144
|
+
array
|
|
145
|
+
✓ should validate and parse array (26 ms)
|
|
146
|
+
enum
|
|
147
|
+
✓ should parse enum (2 ms)
|
|
148
|
+
instanceOf
|
|
149
|
+
✓ should parse instance of (2 ms)
|
|
150
|
+
literal
|
|
151
|
+
✓ should parse literal (2 ms)
|
|
152
|
+
map
|
|
153
|
+
✓ should parse map (3 ms)
|
|
154
|
+
set
|
|
155
|
+
✓ should parse set (8 ms)
|
|
156
|
+
nativeEnum
|
|
157
|
+
✓ should parse native enum (2 ms)
|
|
158
|
+
tuple
|
|
159
|
+
✓ should parse tuple (2 ms)
|
|
160
|
+
✓ should parse rest elements (2 ms)
|
|
161
|
+
nullable
|
|
162
|
+
✓ should parse nullable (1 ms)
|
|
163
|
+
nullish
|
|
164
|
+
✓ should parse nullish
|
|
165
|
+
optional
|
|
166
|
+
✓ should parse optional
|
|
167
|
+
object
|
|
168
|
+
✓ should parse object (2 ms)
|
|
169
|
+
✓ should parse object with passing through unknown keys (2 ms)
|
|
170
|
+
✓ should parse object with strict unknown keys (1 ms)
|
|
171
|
+
✓ should parse object with catch all option (2 ms)
|
|
172
|
+
record
|
|
173
|
+
✓ should parse record (2 ms)
|
|
174
|
+
intersection
|
|
175
|
+
✓ should parse intersection (3 ms)
|
|
176
|
+
union
|
|
177
|
+
✓ should parse union (3 ms)
|
|
178
|
+
discriminatedUnion
|
|
179
|
+
✓ should parse discriminated union (3 ms)
|
|
180
|
+
lazy
|
|
181
|
+
✓ should parse lazy type (18 ms)
|
|
182
|
+
as
|
|
183
|
+
✓ should convert one type to the same schema as another type (1 ms)
|
|
184
|
+
virtual
|
|
185
|
+
✓ should skip virtual column in instanceToZod (1 ms)
|
|
186
|
+
✓ should return ZodNever from columnToZod (1 ms)
|
|
187
|
+
|
|
188
|
+
Test Suites: 1 passed, 1 total
|
|
189
|
+
Tests: 97 passed, 97 total
|
|
190
|
+
Snapshots: 0 total
|
|
191
|
+
Time: 3.25 s, estimated 6 s
|
|
192
|
+
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orchid-orm-schema-to-zod",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.23",
|
|
4
4
|
"description": "Orchid-ORM columns schema to Zod converter",
|
|
5
5
|
"homepage": "https://orchid-orm.netlify.app/guide/columns-validation-methods.html",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"author": "Roman Kushyn",
|
|
40
40
|
"license": "ISC",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"pqb": "0.9.
|
|
42
|
+
"pqb": "0.9.17",
|
|
43
43
|
"zod": "^3.19.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|