astro 4.10.0 → 4.10.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/client.d.ts +0 -4
- package/dist/@types/astro.d.ts +1 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +4 -4
- package/dist/container/pipeline.d.ts +1 -1
- package/dist/container/pipeline.js +17 -18
- package/dist/content/runtime.js +2 -2
- package/dist/content/types-generator.js +2 -4
- package/dist/core/app/index.js +0 -4
- package/dist/core/app/pipeline.d.ts +1 -1
- package/dist/core/app/pipeline.js +4 -4
- package/dist/core/base-pipeline.d.ts +1 -1
- package/dist/core/build/generate.js +2 -1
- package/dist/core/build/pipeline.d.ts +1 -1
- package/dist/core/build/pipeline.js +4 -4
- package/dist/core/config/schema.d.ts +498 -2
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/errors/errors-data.d.ts +11 -0
- package/dist/core/errors/errors-data.js +6 -0
- package/dist/core/messages.js +2 -2
- package/dist/core/render-context.d.ts +1 -1
- package/dist/core/render-context.js +25 -22
- package/dist/core/routing/params.js +1 -1
- package/dist/env/config.d.ts +2 -1
- package/dist/env/config.js +4 -0
- package/dist/env/constants.d.ts +0 -1
- package/dist/env/constants.js +1 -3
- package/dist/env/schema.d.ts +264 -210
- package/dist/env/schema.js +47 -63
- package/dist/env/setup.d.ts +1 -0
- package/dist/env/setup.js +4 -0
- package/dist/env/validators.js +73 -10
- package/dist/env/vite-plugin-env.js +6 -5
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +4 -11
- package/dist/runtime/server/render/astro/render.js +8 -2
- package/dist/vite-plugin-astro-server/pipeline.d.ts +1 -1
- package/dist/vite-plugin-astro-server/pipeline.js +4 -4
- package/dist/vite-plugin-astro-server/request.js +2 -2
- package/package.json +13 -12
- package/dist/virtual-modules/env-setup.d.ts +0 -1
- package/dist/virtual-modules/env-setup.js +0 -4
package/dist/env/schema.d.ts
CHANGED
|
@@ -1,29 +1,69 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
declare const
|
|
2
|
+
declare const StringSchema: z.ZodObject<{
|
|
3
3
|
type: z.ZodLiteral<"string">;
|
|
4
4
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
5
5
|
default: z.ZodOptional<z.ZodString>;
|
|
6
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
url: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
includes: z.ZodOptional<z.ZodString>;
|
|
11
|
+
startsWith: z.ZodOptional<z.ZodString>;
|
|
12
|
+
endsWith: z.ZodOptional<z.ZodString>;
|
|
6
13
|
}, "strip", z.ZodTypeAny, {
|
|
7
14
|
type: "string";
|
|
15
|
+
length?: number | undefined;
|
|
16
|
+
includes?: string | undefined;
|
|
17
|
+
endsWith?: string | undefined;
|
|
18
|
+
startsWith?: string | undefined;
|
|
8
19
|
default?: string | undefined;
|
|
20
|
+
url?: boolean | undefined;
|
|
9
21
|
optional?: boolean | undefined;
|
|
22
|
+
min?: number | undefined;
|
|
23
|
+
max?: number | undefined;
|
|
10
24
|
}, {
|
|
11
25
|
type: "string";
|
|
26
|
+
length?: number | undefined;
|
|
27
|
+
includes?: string | undefined;
|
|
28
|
+
endsWith?: string | undefined;
|
|
29
|
+
startsWith?: string | undefined;
|
|
12
30
|
default?: string | undefined;
|
|
31
|
+
url?: boolean | undefined;
|
|
13
32
|
optional?: boolean | undefined;
|
|
14
|
-
|
|
33
|
+
min?: number | undefined;
|
|
34
|
+
max?: number | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
export type StringSchema = z.infer<typeof StringSchema>;
|
|
37
|
+
declare const NumberSchema: z.ZodObject<{
|
|
15
38
|
type: z.ZodLiteral<"number">;
|
|
16
39
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
17
40
|
default: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
gt: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
lt: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
int: z.ZodOptional<z.ZodBoolean>;
|
|
18
46
|
}, "strip", z.ZodTypeAny, {
|
|
19
47
|
type: "number";
|
|
20
48
|
default?: number | undefined;
|
|
21
49
|
optional?: boolean | undefined;
|
|
50
|
+
min?: number | undefined;
|
|
51
|
+
max?: number | undefined;
|
|
52
|
+
gt?: number | undefined;
|
|
53
|
+
lt?: number | undefined;
|
|
54
|
+
int?: boolean | undefined;
|
|
22
55
|
}, {
|
|
23
56
|
type: "number";
|
|
24
57
|
default?: number | undefined;
|
|
25
58
|
optional?: boolean | undefined;
|
|
26
|
-
|
|
59
|
+
min?: number | undefined;
|
|
60
|
+
max?: number | undefined;
|
|
61
|
+
gt?: number | undefined;
|
|
62
|
+
lt?: number | undefined;
|
|
63
|
+
int?: boolean | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
export type NumberSchema = z.infer<typeof NumberSchema>;
|
|
66
|
+
declare const BooleanSchema: z.ZodObject<{
|
|
27
67
|
type: z.ZodLiteral<"boolean">;
|
|
28
68
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
29
69
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -35,59 +75,84 @@ declare const EnvFieldType: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
35
75
|
type: "boolean";
|
|
36
76
|
default?: boolean | undefined;
|
|
37
77
|
optional?: boolean | undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
context: "client";
|
|
45
|
-
access: "public";
|
|
46
|
-
}, {
|
|
47
|
-
context: "client";
|
|
48
|
-
access: "public";
|
|
49
|
-
}>, z.ZodObject<{
|
|
50
|
-
context: z.ZodLiteral<"server">;
|
|
51
|
-
access: z.ZodLiteral<"public">;
|
|
52
|
-
}, "strip", z.ZodTypeAny, {
|
|
53
|
-
context: "server";
|
|
54
|
-
access: "public";
|
|
55
|
-
}, {
|
|
56
|
-
context: "server";
|
|
57
|
-
access: "public";
|
|
58
|
-
}>, z.ZodObject<{
|
|
59
|
-
context: z.ZodLiteral<"server">;
|
|
60
|
-
access: z.ZodLiteral<"secret">;
|
|
78
|
+
}>;
|
|
79
|
+
declare const EnumSchema: z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"enum">;
|
|
81
|
+
values: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
82
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
default: z.ZodOptional<z.ZodString>;
|
|
61
84
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
|
|
63
|
-
|
|
85
|
+
type: "enum";
|
|
86
|
+
values: string[];
|
|
87
|
+
default?: string | undefined;
|
|
88
|
+
optional?: boolean | undefined;
|
|
64
89
|
}, {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
90
|
+
type: "enum";
|
|
91
|
+
values: string[];
|
|
92
|
+
default?: string | undefined;
|
|
93
|
+
optional?: boolean | undefined;
|
|
94
|
+
}>;
|
|
95
|
+
export type EnumSchema = z.infer<typeof EnumSchema>;
|
|
96
|
+
declare const EnvFieldType: z.ZodUnion<[z.ZodObject<{
|
|
68
97
|
type: z.ZodLiteral<"string">;
|
|
69
98
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
70
99
|
default: z.ZodOptional<z.ZodString>;
|
|
100
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
url: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
includes: z.ZodOptional<z.ZodString>;
|
|
105
|
+
startsWith: z.ZodOptional<z.ZodString>;
|
|
106
|
+
endsWith: z.ZodOptional<z.ZodString>;
|
|
71
107
|
}, "strip", z.ZodTypeAny, {
|
|
72
108
|
type: "string";
|
|
109
|
+
length?: number | undefined;
|
|
110
|
+
includes?: string | undefined;
|
|
111
|
+
endsWith?: string | undefined;
|
|
112
|
+
startsWith?: string | undefined;
|
|
73
113
|
default?: string | undefined;
|
|
114
|
+
url?: boolean | undefined;
|
|
74
115
|
optional?: boolean | undefined;
|
|
116
|
+
min?: number | undefined;
|
|
117
|
+
max?: number | undefined;
|
|
75
118
|
}, {
|
|
76
119
|
type: "string";
|
|
120
|
+
length?: number | undefined;
|
|
121
|
+
includes?: string | undefined;
|
|
122
|
+
endsWith?: string | undefined;
|
|
123
|
+
startsWith?: string | undefined;
|
|
77
124
|
default?: string | undefined;
|
|
125
|
+
url?: boolean | undefined;
|
|
78
126
|
optional?: boolean | undefined;
|
|
127
|
+
min?: number | undefined;
|
|
128
|
+
max?: number | undefined;
|
|
79
129
|
}>, z.ZodObject<{
|
|
80
130
|
type: z.ZodLiteral<"number">;
|
|
81
131
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
82
132
|
default: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
gt: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
lt: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
int: z.ZodOptional<z.ZodBoolean>;
|
|
83
138
|
}, "strip", z.ZodTypeAny, {
|
|
84
139
|
type: "number";
|
|
85
140
|
default?: number | undefined;
|
|
86
141
|
optional?: boolean | undefined;
|
|
142
|
+
min?: number | undefined;
|
|
143
|
+
max?: number | undefined;
|
|
144
|
+
gt?: number | undefined;
|
|
145
|
+
lt?: number | undefined;
|
|
146
|
+
int?: boolean | undefined;
|
|
87
147
|
}, {
|
|
88
148
|
type: "number";
|
|
89
149
|
default?: number | undefined;
|
|
90
150
|
optional?: boolean | undefined;
|
|
151
|
+
min?: number | undefined;
|
|
152
|
+
max?: number | undefined;
|
|
153
|
+
gt?: number | undefined;
|
|
154
|
+
lt?: number | undefined;
|
|
155
|
+
int?: boolean | undefined;
|
|
91
156
|
}>, z.ZodObject<{
|
|
92
157
|
type: z.ZodLiteral<"boolean">;
|
|
93
158
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -100,51 +165,34 @@ export declare const EnvSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodInter
|
|
|
100
165
|
type: "boolean";
|
|
101
166
|
default?: boolean | undefined;
|
|
102
167
|
optional?: boolean | undefined;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
access: "secret";
|
|
112
|
-
}) & ({
|
|
113
|
-
type: "string";
|
|
168
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
169
|
+
type: z.ZodLiteral<"enum">;
|
|
170
|
+
values: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
171
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
default: z.ZodOptional<z.ZodString>;
|
|
173
|
+
}, "strip", z.ZodTypeAny, {
|
|
174
|
+
type: "enum";
|
|
175
|
+
values: string[];
|
|
114
176
|
default?: string | undefined;
|
|
115
177
|
optional?: boolean | undefined;
|
|
116
|
-
}
|
|
117
|
-
type: "
|
|
118
|
-
|
|
119
|
-
optional?: boolean | undefined;
|
|
120
|
-
} | {
|
|
121
|
-
type: "boolean";
|
|
122
|
-
default?: boolean | undefined;
|
|
123
|
-
optional?: boolean | undefined;
|
|
124
|
-
})>, Record<string, ({
|
|
125
|
-
context: "client";
|
|
126
|
-
access: "public";
|
|
127
|
-
} | {
|
|
128
|
-
context: "server";
|
|
129
|
-
access: "public";
|
|
130
|
-
} | {
|
|
131
|
-
context: "server";
|
|
132
|
-
access: "secret";
|
|
133
|
-
}) & ({
|
|
134
|
-
type: "string";
|
|
178
|
+
}, {
|
|
179
|
+
type: "enum";
|
|
180
|
+
values: string[];
|
|
135
181
|
default?: string | undefined;
|
|
136
182
|
optional?: boolean | undefined;
|
|
137
|
-
}
|
|
138
|
-
type: "
|
|
139
|
-
|
|
183
|
+
}>, {
|
|
184
|
+
type: "enum";
|
|
185
|
+
values: string[];
|
|
186
|
+
default?: string | undefined;
|
|
140
187
|
optional?: boolean | undefined;
|
|
141
|
-
}
|
|
142
|
-
type: "
|
|
143
|
-
|
|
188
|
+
}, {
|
|
189
|
+
type: "enum";
|
|
190
|
+
values: string[];
|
|
191
|
+
default?: string | undefined;
|
|
144
192
|
optional?: boolean | undefined;
|
|
145
|
-
}
|
|
146
|
-
export type
|
|
147
|
-
declare const
|
|
193
|
+
}>]>;
|
|
194
|
+
export type EnvFieldType = z.infer<typeof EnvFieldType>;
|
|
195
|
+
declare const EnvFieldMetadata: z.ZodUnion<[z.ZodObject<{
|
|
148
196
|
context: z.ZodLiteral<"client">;
|
|
149
197
|
access: z.ZodLiteral<"public">;
|
|
150
198
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -171,21 +219,8 @@ declare const StringField: z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
|
|
|
171
219
|
}, {
|
|
172
220
|
context: "server";
|
|
173
221
|
access: "secret";
|
|
174
|
-
}>]
|
|
175
|
-
|
|
176
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
-
default: z.ZodOptional<z.ZodString>;
|
|
178
|
-
}, "strip", z.ZodTypeAny, {
|
|
179
|
-
type: "string";
|
|
180
|
-
default?: string | undefined;
|
|
181
|
-
optional?: boolean | undefined;
|
|
182
|
-
}, {
|
|
183
|
-
type: "string";
|
|
184
|
-
default?: string | undefined;
|
|
185
|
-
optional?: boolean | undefined;
|
|
186
|
-
}>>;
|
|
187
|
-
export type StringField = z.infer<typeof StringField>;
|
|
188
|
-
export declare const StringFieldInput: z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
|
|
222
|
+
}>]>;
|
|
223
|
+
export declare const EnvSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
|
|
189
224
|
context: z.ZodLiteral<"client">;
|
|
190
225
|
access: z.ZodLiteral<"public">;
|
|
191
226
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -212,176 +247,195 @@ export declare const StringFieldInput: z.ZodIntersection<z.ZodUnion<[z.ZodObject
|
|
|
212
247
|
}, {
|
|
213
248
|
context: "server";
|
|
214
249
|
access: "secret";
|
|
215
|
-
}>]>, z.ZodObject<
|
|
250
|
+
}>]>, z.ZodUnion<[z.ZodObject<{
|
|
216
251
|
type: z.ZodLiteral<"string">;
|
|
217
252
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
218
253
|
default: z.ZodOptional<z.ZodString>;
|
|
219
|
-
|
|
254
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
url: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
includes: z.ZodOptional<z.ZodString>;
|
|
259
|
+
startsWith: z.ZodOptional<z.ZodString>;
|
|
260
|
+
endsWith: z.ZodOptional<z.ZodString>;
|
|
261
|
+
}, "strip", z.ZodTypeAny, {
|
|
262
|
+
type: "string";
|
|
263
|
+
length?: number | undefined;
|
|
264
|
+
includes?: string | undefined;
|
|
265
|
+
endsWith?: string | undefined;
|
|
266
|
+
startsWith?: string | undefined;
|
|
220
267
|
default?: string | undefined;
|
|
268
|
+
url?: boolean | undefined;
|
|
221
269
|
optional?: boolean | undefined;
|
|
270
|
+
min?: number | undefined;
|
|
271
|
+
max?: number | undefined;
|
|
222
272
|
}, {
|
|
273
|
+
type: "string";
|
|
274
|
+
length?: number | undefined;
|
|
275
|
+
includes?: string | undefined;
|
|
276
|
+
endsWith?: string | undefined;
|
|
277
|
+
startsWith?: string | undefined;
|
|
223
278
|
default?: string | undefined;
|
|
279
|
+
url?: boolean | undefined;
|
|
224
280
|
optional?: boolean | undefined;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
declare const NumberField: z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
|
|
228
|
-
context: z.ZodLiteral<"client">;
|
|
229
|
-
access: z.ZodLiteral<"public">;
|
|
230
|
-
}, "strip", z.ZodTypeAny, {
|
|
231
|
-
context: "client";
|
|
232
|
-
access: "public";
|
|
233
|
-
}, {
|
|
234
|
-
context: "client";
|
|
235
|
-
access: "public";
|
|
281
|
+
min?: number | undefined;
|
|
282
|
+
max?: number | undefined;
|
|
236
283
|
}>, z.ZodObject<{
|
|
237
|
-
context: z.ZodLiteral<"server">;
|
|
238
|
-
access: z.ZodLiteral<"public">;
|
|
239
|
-
}, "strip", z.ZodTypeAny, {
|
|
240
|
-
context: "server";
|
|
241
|
-
access: "public";
|
|
242
|
-
}, {
|
|
243
|
-
context: "server";
|
|
244
|
-
access: "public";
|
|
245
|
-
}>, z.ZodObject<{
|
|
246
|
-
context: z.ZodLiteral<"server">;
|
|
247
|
-
access: z.ZodLiteral<"secret">;
|
|
248
|
-
}, "strip", z.ZodTypeAny, {
|
|
249
|
-
context: "server";
|
|
250
|
-
access: "secret";
|
|
251
|
-
}, {
|
|
252
|
-
context: "server";
|
|
253
|
-
access: "secret";
|
|
254
|
-
}>]>, z.ZodObject<{
|
|
255
284
|
type: z.ZodLiteral<"number">;
|
|
256
285
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
257
286
|
default: z.ZodOptional<z.ZodNumber>;
|
|
287
|
+
gt: z.ZodOptional<z.ZodNumber>;
|
|
288
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
lt: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
291
|
+
int: z.ZodOptional<z.ZodBoolean>;
|
|
258
292
|
}, "strip", z.ZodTypeAny, {
|
|
259
293
|
type: "number";
|
|
260
294
|
default?: number | undefined;
|
|
261
295
|
optional?: boolean | undefined;
|
|
296
|
+
min?: number | undefined;
|
|
297
|
+
max?: number | undefined;
|
|
298
|
+
gt?: number | undefined;
|
|
299
|
+
lt?: number | undefined;
|
|
300
|
+
int?: boolean | undefined;
|
|
262
301
|
}, {
|
|
263
302
|
type: "number";
|
|
264
303
|
default?: number | undefined;
|
|
265
304
|
optional?: boolean | undefined;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}, "strip", z.ZodTypeAny, {
|
|
272
|
-
context: "client";
|
|
273
|
-
access: "public";
|
|
274
|
-
}, {
|
|
275
|
-
context: "client";
|
|
276
|
-
access: "public";
|
|
277
|
-
}>, z.ZodObject<{
|
|
278
|
-
context: z.ZodLiteral<"server">;
|
|
279
|
-
access: z.ZodLiteral<"public">;
|
|
280
|
-
}, "strip", z.ZodTypeAny, {
|
|
281
|
-
context: "server";
|
|
282
|
-
access: "public";
|
|
283
|
-
}, {
|
|
284
|
-
context: "server";
|
|
285
|
-
access: "public";
|
|
305
|
+
min?: number | undefined;
|
|
306
|
+
max?: number | undefined;
|
|
307
|
+
gt?: number | undefined;
|
|
308
|
+
lt?: number | undefined;
|
|
309
|
+
int?: boolean | undefined;
|
|
286
310
|
}>, z.ZodObject<{
|
|
287
|
-
|
|
288
|
-
|
|
311
|
+
type: z.ZodLiteral<"boolean">;
|
|
312
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
313
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
289
314
|
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
|
|
291
|
-
|
|
315
|
+
type: "boolean";
|
|
316
|
+
default?: boolean | undefined;
|
|
317
|
+
optional?: boolean | undefined;
|
|
292
318
|
}, {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
319
|
+
type: "boolean";
|
|
320
|
+
default?: boolean | undefined;
|
|
321
|
+
optional?: boolean | undefined;
|
|
322
|
+
}>, z.ZodEffects<z.ZodObject<{
|
|
323
|
+
type: z.ZodLiteral<"enum">;
|
|
324
|
+
values: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
297
325
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
298
|
-
default: z.ZodOptional<z.
|
|
299
|
-
}, "
|
|
300
|
-
|
|
326
|
+
default: z.ZodOptional<z.ZodString>;
|
|
327
|
+
}, "strip", z.ZodTypeAny, {
|
|
328
|
+
type: "enum";
|
|
329
|
+
values: string[];
|
|
330
|
+
default?: string | undefined;
|
|
301
331
|
optional?: boolean | undefined;
|
|
302
332
|
}, {
|
|
303
|
-
|
|
333
|
+
type: "enum";
|
|
334
|
+
values: string[];
|
|
335
|
+
default?: string | undefined;
|
|
336
|
+
optional?: boolean | undefined;
|
|
337
|
+
}>, {
|
|
338
|
+
type: "enum";
|
|
339
|
+
values: string[];
|
|
340
|
+
default?: string | undefined;
|
|
304
341
|
optional?: boolean | undefined;
|
|
305
|
-
}>>;
|
|
306
|
-
export type NumberFieldInput = z.infer<typeof NumberFieldInput>;
|
|
307
|
-
declare const BooleanField: z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
|
|
308
|
-
context: z.ZodLiteral<"client">;
|
|
309
|
-
access: z.ZodLiteral<"public">;
|
|
310
|
-
}, "strip", z.ZodTypeAny, {
|
|
311
|
-
context: "client";
|
|
312
|
-
access: "public";
|
|
313
342
|
}, {
|
|
343
|
+
type: "enum";
|
|
344
|
+
values: string[];
|
|
345
|
+
default?: string | undefined;
|
|
346
|
+
optional?: boolean | undefined;
|
|
347
|
+
}>]>>>, Record<string, ({
|
|
314
348
|
context: "client";
|
|
315
349
|
access: "public";
|
|
316
|
-
}
|
|
317
|
-
context: z.ZodLiteral<"server">;
|
|
318
|
-
access: z.ZodLiteral<"public">;
|
|
319
|
-
}, "strip", z.ZodTypeAny, {
|
|
320
|
-
context: "server";
|
|
321
|
-
access: "public";
|
|
322
|
-
}, {
|
|
350
|
+
} | {
|
|
323
351
|
context: "server";
|
|
324
352
|
access: "public";
|
|
325
|
-
}
|
|
326
|
-
context: z.ZodLiteral<"server">;
|
|
327
|
-
access: z.ZodLiteral<"secret">;
|
|
328
|
-
}, "strip", z.ZodTypeAny, {
|
|
329
|
-
context: "server";
|
|
330
|
-
access: "secret";
|
|
331
|
-
}, {
|
|
353
|
+
} | {
|
|
332
354
|
context: "server";
|
|
333
355
|
access: "secret";
|
|
334
|
-
}
|
|
335
|
-
type:
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
default?:
|
|
356
|
+
}) & ({
|
|
357
|
+
type: "string";
|
|
358
|
+
length?: number | undefined;
|
|
359
|
+
includes?: string | undefined;
|
|
360
|
+
endsWith?: string | undefined;
|
|
361
|
+
startsWith?: string | undefined;
|
|
362
|
+
default?: string | undefined;
|
|
363
|
+
url?: boolean | undefined;
|
|
341
364
|
optional?: boolean | undefined;
|
|
342
|
-
|
|
365
|
+
min?: number | undefined;
|
|
366
|
+
max?: number | undefined;
|
|
367
|
+
} | {
|
|
368
|
+
type: "number";
|
|
369
|
+
default?: number | undefined;
|
|
370
|
+
optional?: boolean | undefined;
|
|
371
|
+
min?: number | undefined;
|
|
372
|
+
max?: number | undefined;
|
|
373
|
+
gt?: number | undefined;
|
|
374
|
+
lt?: number | undefined;
|
|
375
|
+
int?: boolean | undefined;
|
|
376
|
+
} | {
|
|
343
377
|
type: "boolean";
|
|
344
378
|
default?: boolean | undefined;
|
|
345
379
|
optional?: boolean | undefined;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
context: "client";
|
|
353
|
-
access: "public";
|
|
354
|
-
}, {
|
|
380
|
+
} | {
|
|
381
|
+
type: "enum";
|
|
382
|
+
values: string[];
|
|
383
|
+
default?: string | undefined;
|
|
384
|
+
optional?: boolean | undefined;
|
|
385
|
+
})>, Record<string, ({
|
|
355
386
|
context: "client";
|
|
356
387
|
access: "public";
|
|
357
|
-
}
|
|
358
|
-
context: z.ZodLiteral<"server">;
|
|
359
|
-
access: z.ZodLiteral<"public">;
|
|
360
|
-
}, "strip", z.ZodTypeAny, {
|
|
361
|
-
context: "server";
|
|
362
|
-
access: "public";
|
|
363
|
-
}, {
|
|
388
|
+
} | {
|
|
364
389
|
context: "server";
|
|
365
390
|
access: "public";
|
|
366
|
-
}
|
|
367
|
-
context: z.ZodLiteral<"server">;
|
|
368
|
-
access: z.ZodLiteral<"secret">;
|
|
369
|
-
}, "strip", z.ZodTypeAny, {
|
|
370
|
-
context: "server";
|
|
371
|
-
access: "secret";
|
|
372
|
-
}, {
|
|
391
|
+
} | {
|
|
373
392
|
context: "server";
|
|
374
393
|
access: "secret";
|
|
375
|
-
}
|
|
376
|
-
type:
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
394
|
+
}) & ({
|
|
395
|
+
type: "string";
|
|
396
|
+
length?: number | undefined;
|
|
397
|
+
includes?: string | undefined;
|
|
398
|
+
endsWith?: string | undefined;
|
|
399
|
+
startsWith?: string | undefined;
|
|
400
|
+
default?: string | undefined;
|
|
401
|
+
url?: boolean | undefined;
|
|
381
402
|
optional?: boolean | undefined;
|
|
382
|
-
|
|
403
|
+
min?: number | undefined;
|
|
404
|
+
max?: number | undefined;
|
|
405
|
+
} | {
|
|
406
|
+
type: "number";
|
|
407
|
+
default?: number | undefined;
|
|
408
|
+
optional?: boolean | undefined;
|
|
409
|
+
min?: number | undefined;
|
|
410
|
+
max?: number | undefined;
|
|
411
|
+
gt?: number | undefined;
|
|
412
|
+
lt?: number | undefined;
|
|
413
|
+
int?: boolean | undefined;
|
|
414
|
+
} | {
|
|
415
|
+
type: "boolean";
|
|
383
416
|
default?: boolean | undefined;
|
|
384
417
|
optional?: boolean | undefined;
|
|
385
|
-
}
|
|
386
|
-
|
|
418
|
+
} | {
|
|
419
|
+
type: "enum";
|
|
420
|
+
values: string[];
|
|
421
|
+
default?: string | undefined;
|
|
422
|
+
optional?: boolean | undefined;
|
|
423
|
+
})>>;
|
|
424
|
+
type Prettify<T> = {
|
|
425
|
+
[K in keyof T]: T[K];
|
|
426
|
+
} & {};
|
|
427
|
+
export type EnvSchema = z.infer<typeof EnvSchema>;
|
|
428
|
+
type _Field<T extends z.ZodType> = Prettify<z.infer<typeof EnvFieldMetadata & T>>;
|
|
429
|
+
type _FieldInput<T extends z.ZodType, TKey extends string = 'type'> = Prettify<z.infer<typeof EnvFieldMetadata> & Omit<z.infer<T>, TKey>>;
|
|
430
|
+
export type StringField = _Field<typeof StringSchema>;
|
|
431
|
+
export type StringFieldInput = _FieldInput<typeof StringSchema>;
|
|
432
|
+
export type NumberField = _Field<typeof NumberSchema>;
|
|
433
|
+
export type NumberFieldInput = _FieldInput<typeof NumberSchema>;
|
|
434
|
+
export type BooleanField = _Field<typeof BooleanSchema>;
|
|
435
|
+
export type BooleanFieldInput = _FieldInput<typeof BooleanSchema>;
|
|
436
|
+
export type EnumField = _Field<typeof EnumSchema>;
|
|
437
|
+
export type EnumFieldInput<T extends string> = Prettify<_FieldInput<typeof EnumSchema, 'type' | 'values' | 'default'> & {
|
|
438
|
+
values: Array<T>;
|
|
439
|
+
default?: NoInfer<T> | undefined;
|
|
440
|
+
}>;
|
|
387
441
|
export {};
|