@axium/server 0.7.6 → 0.8.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.
Files changed (56) hide show
  1. package/dist/apps.d.ts +15 -0
  2. package/dist/apps.js +20 -0
  3. package/dist/auth.d.ts +63 -30
  4. package/dist/auth.js +110 -129
  5. package/dist/cli.js +33 -6
  6. package/dist/config.d.ts +241 -61
  7. package/dist/config.js +26 -2
  8. package/dist/database.d.ts +28 -37
  9. package/dist/database.js +124 -50
  10. package/dist/io.js +6 -2
  11. package/dist/plugins.d.ts +7 -24
  12. package/dist/plugins.js +9 -14
  13. package/dist/routes.d.ts +55 -0
  14. package/dist/routes.js +54 -0
  15. package/package.json +7 -15
  16. package/web/api/index.ts +7 -0
  17. package/web/api/metadata.ts +35 -0
  18. package/web/api/passkeys.ts +56 -0
  19. package/web/api/readme.md +1 -0
  20. package/web/api/register.ts +83 -0
  21. package/web/api/schemas.ts +22 -0
  22. package/web/api/session.ts +33 -0
  23. package/web/api/users.ts +340 -0
  24. package/web/api/utils.ts +66 -0
  25. package/web/auth.ts +1 -5
  26. package/web/hooks.server.ts +6 -1
  27. package/web/index.server.ts +0 -1
  28. package/web/lib/Dialog.svelte +3 -6
  29. package/web/lib/FormDialog.svelte +53 -14
  30. package/web/lib/Toast.svelte +8 -1
  31. package/web/lib/UserCard.svelte +1 -1
  32. package/web/lib/auth.ts +12 -0
  33. package/web/lib/icons/Icon.svelte +5 -7
  34. package/web/lib/index.ts +0 -2
  35. package/web/lib/styles.css +12 -1
  36. package/web/routes/+layout.svelte +1 -1
  37. package/web/routes/[...path]/+page.server.ts +13 -0
  38. package/web/routes/[appId]/[...page]/+page.server.ts +14 -0
  39. package/web/routes/_axium/default/+page.svelte +11 -0
  40. package/web/routes/account/+page.svelte +224 -0
  41. package/web/routes/api/[...path]/+server.ts +49 -0
  42. package/web/routes/login/+page.svelte +25 -0
  43. package/web/routes/logout/+page.svelte +13 -0
  44. package/web/routes/register/+page.svelte +21 -0
  45. package/web/tsconfig.json +2 -1
  46. package/web/utils.ts +9 -15
  47. package/web/actions.ts +0 -58
  48. package/web/lib/Account.svelte +0 -76
  49. package/web/lib/SignUp.svelte +0 -20
  50. package/web/lib/account.css +0 -36
  51. package/web/routes/+page.server.ts +0 -16
  52. package/web/routes/+page.svelte +0 -10
  53. package/web/routes/name/+page.server.ts +0 -5
  54. package/web/routes/name/+page.svelte +0 -20
  55. package/web/routes/signup/+page.server.ts +0 -10
  56. package/web/routes/signup/+page.svelte +0 -15
package/dist/config.d.ts CHANGED
@@ -1,21 +1,52 @@
1
1
  import { type PartialRecursive } from 'utilium';
2
2
  import * as z from 'zod';
3
3
  export declare const Schema: z.ZodObject<{
4
+ api: z.ZodObject<{
5
+ disable_metadata: z.ZodBoolean;
6
+ cookie_auth: z.ZodBoolean;
7
+ }, "strip", z.ZodTypeAny, {
8
+ disable_metadata: boolean;
9
+ cookie_auth: boolean;
10
+ }, {
11
+ disable_metadata: boolean;
12
+ cookie_auth: boolean;
13
+ }>;
14
+ apps: z.ZodObject<{
15
+ disabled: z.ZodArray<z.ZodString, "many">;
16
+ }, "strip", z.ZodTypeAny, {
17
+ disabled: string[];
18
+ }, {
19
+ disabled: string[];
20
+ }>;
4
21
  auth: z.ZodObject<{
5
22
  credentials: z.ZodBoolean;
6
23
  debug: z.ZodBoolean;
7
- secret: z.ZodString;
24
+ origin: z.ZodString;
25
+ /** In minutes */
26
+ passkey_probation: z.ZodNumber;
27
+ rp_id: z.ZodString;
28
+ rp_name: z.ZodString;
8
29
  secure_cookies: z.ZodBoolean;
30
+ /** In minutes */
31
+ verification_timeout: z.ZodNumber;
9
32
  }, "strip", z.ZodTypeAny, {
33
+ origin: string;
10
34
  debug: boolean;
11
35
  credentials: boolean;
12
- secret: string;
36
+ passkey_probation: number;
37
+ rp_id: string;
38
+ rp_name: string;
13
39
  secure_cookies: boolean;
40
+ verification_timeout: number;
14
41
  }, {
42
+ origin: string;
15
43
  debug: boolean;
16
44
  credentials: boolean;
17
- secret: string;
45
+ passkey_probation: number;
46
+ rp_id: string;
47
+ rp_name: string;
18
48
  secure_cookies: boolean;
49
+ verification_timeout: number;
19
50
  }>;
20
51
  db: z.ZodObject<{
21
52
  host: z.ZodString;
@@ -24,16 +55,16 @@ export declare const Schema: z.ZodObject<{
24
55
  user: z.ZodString;
25
56
  database: z.ZodString;
26
57
  }, "strip", z.ZodTypeAny, {
27
- host: string;
28
58
  port: number;
29
- password: string;
59
+ host: string;
30
60
  user: string;
61
+ password: string;
31
62
  database: string;
32
63
  }, {
33
- host: string;
34
64
  port: number;
35
- password: string;
65
+ host: string;
36
66
  user: string;
67
+ password: string;
37
68
  database: string;
38
69
  }>;
39
70
  debug: z.ZodBoolean;
@@ -41,11 +72,11 @@ export declare const Schema: z.ZodObject<{
41
72
  level: z.ZodEnum<["error", "warn", "notice", "info", "debug"]>;
42
73
  console: z.ZodBoolean;
43
74
  }, "strip", z.ZodTypeAny, {
44
- level: "debug" | "info" | "warn" | "error" | "notice";
45
75
  console: boolean;
76
+ level: "error" | "warn" | "info" | "debug" | "notice";
46
77
  }, {
47
- level: "debug" | "info" | "warn" | "error" | "notice";
48
78
  console: boolean;
79
+ level: "error" | "warn" | "info" | "debug" | "notice";
49
80
  }>;
50
81
  web: z.ZodObject<{
51
82
  prefix: z.ZodString;
@@ -55,21 +86,52 @@ export declare const Schema: z.ZodObject<{
55
86
  prefix: string;
56
87
  }>;
57
88
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
89
+ api: z.ZodObject<{
90
+ disable_metadata: z.ZodBoolean;
91
+ cookie_auth: z.ZodBoolean;
92
+ }, "strip", z.ZodTypeAny, {
93
+ disable_metadata: boolean;
94
+ cookie_auth: boolean;
95
+ }, {
96
+ disable_metadata: boolean;
97
+ cookie_auth: boolean;
98
+ }>;
99
+ apps: z.ZodObject<{
100
+ disabled: z.ZodArray<z.ZodString, "many">;
101
+ }, "strip", z.ZodTypeAny, {
102
+ disabled: string[];
103
+ }, {
104
+ disabled: string[];
105
+ }>;
58
106
  auth: z.ZodObject<{
59
107
  credentials: z.ZodBoolean;
60
108
  debug: z.ZodBoolean;
61
- secret: z.ZodString;
109
+ origin: z.ZodString;
110
+ /** In minutes */
111
+ passkey_probation: z.ZodNumber;
112
+ rp_id: z.ZodString;
113
+ rp_name: z.ZodString;
62
114
  secure_cookies: z.ZodBoolean;
115
+ /** In minutes */
116
+ verification_timeout: z.ZodNumber;
63
117
  }, "strip", z.ZodTypeAny, {
118
+ origin: string;
64
119
  debug: boolean;
65
120
  credentials: boolean;
66
- secret: string;
121
+ passkey_probation: number;
122
+ rp_id: string;
123
+ rp_name: string;
67
124
  secure_cookies: boolean;
125
+ verification_timeout: number;
68
126
  }, {
127
+ origin: string;
69
128
  debug: boolean;
70
129
  credentials: boolean;
71
- secret: string;
130
+ passkey_probation: number;
131
+ rp_id: string;
132
+ rp_name: string;
72
133
  secure_cookies: boolean;
134
+ verification_timeout: number;
73
135
  }>;
74
136
  db: z.ZodObject<{
75
137
  host: z.ZodString;
@@ -78,16 +140,16 @@ export declare const Schema: z.ZodObject<{
78
140
  user: z.ZodString;
79
141
  database: z.ZodString;
80
142
  }, "strip", z.ZodTypeAny, {
81
- host: string;
82
143
  port: number;
83
- password: string;
144
+ host: string;
84
145
  user: string;
146
+ password: string;
85
147
  database: string;
86
148
  }, {
87
- host: string;
88
149
  port: number;
89
- password: string;
150
+ host: string;
90
151
  user: string;
152
+ password: string;
91
153
  database: string;
92
154
  }>;
93
155
  debug: z.ZodBoolean;
@@ -95,11 +157,11 @@ export declare const Schema: z.ZodObject<{
95
157
  level: z.ZodEnum<["error", "warn", "notice", "info", "debug"]>;
96
158
  console: z.ZodBoolean;
97
159
  }, "strip", z.ZodTypeAny, {
98
- level: "debug" | "info" | "warn" | "error" | "notice";
99
160
  console: boolean;
161
+ level: "error" | "warn" | "info" | "debug" | "notice";
100
162
  }, {
101
- level: "debug" | "info" | "warn" | "error" | "notice";
102
163
  console: boolean;
164
+ level: "error" | "warn" | "info" | "debug" | "notice";
103
165
  }>;
104
166
  web: z.ZodObject<{
105
167
  prefix: z.ZodString;
@@ -109,21 +171,52 @@ export declare const Schema: z.ZodObject<{
109
171
  prefix: string;
110
172
  }>;
111
173
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
174
+ api: z.ZodObject<{
175
+ disable_metadata: z.ZodBoolean;
176
+ cookie_auth: z.ZodBoolean;
177
+ }, "strip", z.ZodTypeAny, {
178
+ disable_metadata: boolean;
179
+ cookie_auth: boolean;
180
+ }, {
181
+ disable_metadata: boolean;
182
+ cookie_auth: boolean;
183
+ }>;
184
+ apps: z.ZodObject<{
185
+ disabled: z.ZodArray<z.ZodString, "many">;
186
+ }, "strip", z.ZodTypeAny, {
187
+ disabled: string[];
188
+ }, {
189
+ disabled: string[];
190
+ }>;
112
191
  auth: z.ZodObject<{
113
192
  credentials: z.ZodBoolean;
114
193
  debug: z.ZodBoolean;
115
- secret: z.ZodString;
194
+ origin: z.ZodString;
195
+ /** In minutes */
196
+ passkey_probation: z.ZodNumber;
197
+ rp_id: z.ZodString;
198
+ rp_name: z.ZodString;
116
199
  secure_cookies: z.ZodBoolean;
200
+ /** In minutes */
201
+ verification_timeout: z.ZodNumber;
117
202
  }, "strip", z.ZodTypeAny, {
203
+ origin: string;
118
204
  debug: boolean;
119
205
  credentials: boolean;
120
- secret: string;
206
+ passkey_probation: number;
207
+ rp_id: string;
208
+ rp_name: string;
121
209
  secure_cookies: boolean;
210
+ verification_timeout: number;
122
211
  }, {
212
+ origin: string;
123
213
  debug: boolean;
124
214
  credentials: boolean;
125
- secret: string;
215
+ passkey_probation: number;
216
+ rp_id: string;
217
+ rp_name: string;
126
218
  secure_cookies: boolean;
219
+ verification_timeout: number;
127
220
  }>;
128
221
  db: z.ZodObject<{
129
222
  host: z.ZodString;
@@ -132,16 +225,16 @@ export declare const Schema: z.ZodObject<{
132
225
  user: z.ZodString;
133
226
  database: z.ZodString;
134
227
  }, "strip", z.ZodTypeAny, {
135
- host: string;
136
228
  port: number;
137
- password: string;
229
+ host: string;
138
230
  user: string;
231
+ password: string;
139
232
  database: string;
140
233
  }, {
141
- host: string;
142
234
  port: number;
143
- password: string;
235
+ host: string;
144
236
  user: string;
237
+ password: string;
145
238
  database: string;
146
239
  }>;
147
240
  debug: z.ZodBoolean;
@@ -149,11 +242,11 @@ export declare const Schema: z.ZodObject<{
149
242
  level: z.ZodEnum<["error", "warn", "notice", "info", "debug"]>;
150
243
  console: z.ZodBoolean;
151
244
  }, "strip", z.ZodTypeAny, {
152
- level: "debug" | "info" | "warn" | "error" | "notice";
153
245
  console: boolean;
246
+ level: "error" | "warn" | "info" | "debug" | "notice";
154
247
  }, {
155
- level: "debug" | "info" | "warn" | "error" | "notice";
156
248
  console: boolean;
249
+ level: "error" | "warn" | "info" | "debug" | "notice";
157
250
  }>;
158
251
  web: z.ZodObject<{
159
252
  prefix: z.ZodString;
@@ -179,22 +272,51 @@ declare const configShortcuts: {
179
272
  };
180
273
  export declare const config: Config & typeof configShortcuts;
181
274
  export default config;
182
- export declare const File: z.ZodObject<z.objectUtil.extendShape<{
275
+ export declare const File: z.ZodObject<{
276
+ api: z.ZodOptional<z.ZodObject<{
277
+ disable_metadata: z.ZodOptional<z.ZodBoolean>;
278
+ cookie_auth: z.ZodOptional<z.ZodBoolean>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ disable_metadata?: boolean | undefined;
281
+ cookie_auth?: boolean | undefined;
282
+ }, {
283
+ disable_metadata?: boolean | undefined;
284
+ cookie_auth?: boolean | undefined;
285
+ }>>;
286
+ apps: z.ZodOptional<z.ZodObject<{
287
+ disabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
288
+ }, "strip", z.ZodTypeAny, {
289
+ disabled?: string[] | undefined;
290
+ }, {
291
+ disabled?: string[] | undefined;
292
+ }>>;
183
293
  auth: z.ZodOptional<z.ZodObject<{
184
294
  credentials: z.ZodOptional<z.ZodBoolean>;
185
295
  debug: z.ZodOptional<z.ZodBoolean>;
186
- secret: z.ZodOptional<z.ZodString>;
296
+ origin: z.ZodOptional<z.ZodString>;
297
+ passkey_probation: z.ZodOptional<z.ZodNumber>;
298
+ rp_id: z.ZodOptional<z.ZodString>;
299
+ rp_name: z.ZodOptional<z.ZodString>;
187
300
  secure_cookies: z.ZodOptional<z.ZodBoolean>;
301
+ verification_timeout: z.ZodOptional<z.ZodNumber>;
188
302
  }, "strip", z.ZodTypeAny, {
303
+ origin?: string | undefined;
189
304
  debug?: boolean | undefined;
190
305
  credentials?: boolean | undefined;
191
- secret?: string | undefined;
306
+ passkey_probation?: number | undefined;
307
+ rp_id?: string | undefined;
308
+ rp_name?: string | undefined;
192
309
  secure_cookies?: boolean | undefined;
310
+ verification_timeout?: number | undefined;
193
311
  }, {
312
+ origin?: string | undefined;
194
313
  debug?: boolean | undefined;
195
314
  credentials?: boolean | undefined;
196
- secret?: string | undefined;
315
+ passkey_probation?: number | undefined;
316
+ rp_id?: string | undefined;
317
+ rp_name?: string | undefined;
197
318
  secure_cookies?: boolean | undefined;
319
+ verification_timeout?: number | undefined;
198
320
  }>>;
199
321
  db: z.ZodOptional<z.ZodObject<{
200
322
  host: z.ZodOptional<z.ZodString>;
@@ -203,16 +325,16 @@ export declare const File: z.ZodObject<z.objectUtil.extendShape<{
203
325
  user: z.ZodOptional<z.ZodString>;
204
326
  database: z.ZodOptional<z.ZodString>;
205
327
  }, "strip", z.ZodTypeAny, {
206
- host?: string | undefined;
207
328
  port?: number | undefined;
208
- password?: string | undefined;
329
+ host?: string | undefined;
209
330
  user?: string | undefined;
331
+ password?: string | undefined;
210
332
  database?: string | undefined;
211
333
  }, {
212
- host?: string | undefined;
213
334
  port?: number | undefined;
214
- password?: string | undefined;
335
+ host?: string | undefined;
215
336
  user?: string | undefined;
337
+ password?: string | undefined;
216
338
  database?: string | undefined;
217
339
  }>>;
218
340
  debug: z.ZodOptional<z.ZodBoolean>;
@@ -220,11 +342,11 @@ export declare const File: z.ZodObject<z.objectUtil.extendShape<{
220
342
  level: z.ZodOptional<z.ZodEnum<["error", "warn", "notice", "info", "debug"]>>;
221
343
  console: z.ZodOptional<z.ZodBoolean>;
222
344
  }, "strip", z.ZodTypeAny, {
223
- level?: "debug" | "info" | "warn" | "error" | "notice" | undefined;
224
345
  console?: boolean | undefined;
346
+ level?: "error" | "warn" | "info" | "debug" | "notice" | undefined;
225
347
  }, {
226
- level?: "debug" | "info" | "warn" | "error" | "notice" | undefined;
227
348
  console?: boolean | undefined;
349
+ level?: "error" | "warn" | "info" | "debug" | "notice" | undefined;
228
350
  }>>;
229
351
  web: z.ZodOptional<z.ZodObject<{
230
352
  prefix: z.ZodOptional<z.ZodString>;
@@ -233,25 +355,54 @@ export declare const File: z.ZodObject<z.objectUtil.extendShape<{
233
355
  }, {
234
356
  prefix?: string | undefined;
235
357
  }>>;
236
- }, {
358
+ } & {
237
359
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
238
360
  plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
239
- }>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<{
361
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
362
+ api: z.ZodOptional<z.ZodObject<{
363
+ disable_metadata: z.ZodOptional<z.ZodBoolean>;
364
+ cookie_auth: z.ZodOptional<z.ZodBoolean>;
365
+ }, "strip", z.ZodTypeAny, {
366
+ disable_metadata?: boolean | undefined;
367
+ cookie_auth?: boolean | undefined;
368
+ }, {
369
+ disable_metadata?: boolean | undefined;
370
+ cookie_auth?: boolean | undefined;
371
+ }>>;
372
+ apps: z.ZodOptional<z.ZodObject<{
373
+ disabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
374
+ }, "strip", z.ZodTypeAny, {
375
+ disabled?: string[] | undefined;
376
+ }, {
377
+ disabled?: string[] | undefined;
378
+ }>>;
240
379
  auth: z.ZodOptional<z.ZodObject<{
241
380
  credentials: z.ZodOptional<z.ZodBoolean>;
242
381
  debug: z.ZodOptional<z.ZodBoolean>;
243
- secret: z.ZodOptional<z.ZodString>;
382
+ origin: z.ZodOptional<z.ZodString>;
383
+ passkey_probation: z.ZodOptional<z.ZodNumber>;
384
+ rp_id: z.ZodOptional<z.ZodString>;
385
+ rp_name: z.ZodOptional<z.ZodString>;
244
386
  secure_cookies: z.ZodOptional<z.ZodBoolean>;
387
+ verification_timeout: z.ZodOptional<z.ZodNumber>;
245
388
  }, "strip", z.ZodTypeAny, {
389
+ origin?: string | undefined;
246
390
  debug?: boolean | undefined;
247
391
  credentials?: boolean | undefined;
248
- secret?: string | undefined;
392
+ passkey_probation?: number | undefined;
393
+ rp_id?: string | undefined;
394
+ rp_name?: string | undefined;
249
395
  secure_cookies?: boolean | undefined;
396
+ verification_timeout?: number | undefined;
250
397
  }, {
398
+ origin?: string | undefined;
251
399
  debug?: boolean | undefined;
252
400
  credentials?: boolean | undefined;
253
- secret?: string | undefined;
401
+ passkey_probation?: number | undefined;
402
+ rp_id?: string | undefined;
403
+ rp_name?: string | undefined;
254
404
  secure_cookies?: boolean | undefined;
405
+ verification_timeout?: number | undefined;
255
406
  }>>;
256
407
  db: z.ZodOptional<z.ZodObject<{
257
408
  host: z.ZodOptional<z.ZodString>;
@@ -260,16 +411,16 @@ export declare const File: z.ZodObject<z.objectUtil.extendShape<{
260
411
  user: z.ZodOptional<z.ZodString>;
261
412
  database: z.ZodOptional<z.ZodString>;
262
413
  }, "strip", z.ZodTypeAny, {
263
- host?: string | undefined;
264
414
  port?: number | undefined;
265
- password?: string | undefined;
415
+ host?: string | undefined;
266
416
  user?: string | undefined;
417
+ password?: string | undefined;
267
418
  database?: string | undefined;
268
419
  }, {
269
- host?: string | undefined;
270
420
  port?: number | undefined;
271
- password?: string | undefined;
421
+ host?: string | undefined;
272
422
  user?: string | undefined;
423
+ password?: string | undefined;
273
424
  database?: string | undefined;
274
425
  }>>;
275
426
  debug: z.ZodOptional<z.ZodBoolean>;
@@ -277,11 +428,11 @@ export declare const File: z.ZodObject<z.objectUtil.extendShape<{
277
428
  level: z.ZodOptional<z.ZodEnum<["error", "warn", "notice", "info", "debug"]>>;
278
429
  console: z.ZodOptional<z.ZodBoolean>;
279
430
  }, "strip", z.ZodTypeAny, {
280
- level?: "debug" | "info" | "warn" | "error" | "notice" | undefined;
281
431
  console?: boolean | undefined;
432
+ level?: "error" | "warn" | "info" | "debug" | "notice" | undefined;
282
433
  }, {
283
- level?: "debug" | "info" | "warn" | "error" | "notice" | undefined;
284
434
  console?: boolean | undefined;
435
+ level?: "error" | "warn" | "info" | "debug" | "notice" | undefined;
285
436
  }>>;
286
437
  web: z.ZodOptional<z.ZodObject<{
287
438
  prefix: z.ZodOptional<z.ZodString>;
@@ -290,25 +441,54 @@ export declare const File: z.ZodObject<z.objectUtil.extendShape<{
290
441
  }, {
291
442
  prefix?: string | undefined;
292
443
  }>>;
293
- }, {
444
+ } & {
294
445
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
295
446
  plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
296
- }>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<{
447
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
448
+ api: z.ZodOptional<z.ZodObject<{
449
+ disable_metadata: z.ZodOptional<z.ZodBoolean>;
450
+ cookie_auth: z.ZodOptional<z.ZodBoolean>;
451
+ }, "strip", z.ZodTypeAny, {
452
+ disable_metadata?: boolean | undefined;
453
+ cookie_auth?: boolean | undefined;
454
+ }, {
455
+ disable_metadata?: boolean | undefined;
456
+ cookie_auth?: boolean | undefined;
457
+ }>>;
458
+ apps: z.ZodOptional<z.ZodObject<{
459
+ disabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
460
+ }, "strip", z.ZodTypeAny, {
461
+ disabled?: string[] | undefined;
462
+ }, {
463
+ disabled?: string[] | undefined;
464
+ }>>;
297
465
  auth: z.ZodOptional<z.ZodObject<{
298
466
  credentials: z.ZodOptional<z.ZodBoolean>;
299
467
  debug: z.ZodOptional<z.ZodBoolean>;
300
- secret: z.ZodOptional<z.ZodString>;
468
+ origin: z.ZodOptional<z.ZodString>;
469
+ passkey_probation: z.ZodOptional<z.ZodNumber>;
470
+ rp_id: z.ZodOptional<z.ZodString>;
471
+ rp_name: z.ZodOptional<z.ZodString>;
301
472
  secure_cookies: z.ZodOptional<z.ZodBoolean>;
473
+ verification_timeout: z.ZodOptional<z.ZodNumber>;
302
474
  }, "strip", z.ZodTypeAny, {
475
+ origin?: string | undefined;
303
476
  debug?: boolean | undefined;
304
477
  credentials?: boolean | undefined;
305
- secret?: string | undefined;
478
+ passkey_probation?: number | undefined;
479
+ rp_id?: string | undefined;
480
+ rp_name?: string | undefined;
306
481
  secure_cookies?: boolean | undefined;
482
+ verification_timeout?: number | undefined;
307
483
  }, {
484
+ origin?: string | undefined;
308
485
  debug?: boolean | undefined;
309
486
  credentials?: boolean | undefined;
310
- secret?: string | undefined;
487
+ passkey_probation?: number | undefined;
488
+ rp_id?: string | undefined;
489
+ rp_name?: string | undefined;
311
490
  secure_cookies?: boolean | undefined;
491
+ verification_timeout?: number | undefined;
312
492
  }>>;
313
493
  db: z.ZodOptional<z.ZodObject<{
314
494
  host: z.ZodOptional<z.ZodString>;
@@ -317,16 +497,16 @@ export declare const File: z.ZodObject<z.objectUtil.extendShape<{
317
497
  user: z.ZodOptional<z.ZodString>;
318
498
  database: z.ZodOptional<z.ZodString>;
319
499
  }, "strip", z.ZodTypeAny, {
320
- host?: string | undefined;
321
500
  port?: number | undefined;
322
- password?: string | undefined;
501
+ host?: string | undefined;
323
502
  user?: string | undefined;
503
+ password?: string | undefined;
324
504
  database?: string | undefined;
325
505
  }, {
326
- host?: string | undefined;
327
506
  port?: number | undefined;
328
- password?: string | undefined;
507
+ host?: string | undefined;
329
508
  user?: string | undefined;
509
+ password?: string | undefined;
330
510
  database?: string | undefined;
331
511
  }>>;
332
512
  debug: z.ZodOptional<z.ZodBoolean>;
@@ -334,11 +514,11 @@ export declare const File: z.ZodObject<z.objectUtil.extendShape<{
334
514
  level: z.ZodOptional<z.ZodEnum<["error", "warn", "notice", "info", "debug"]>>;
335
515
  console: z.ZodOptional<z.ZodBoolean>;
336
516
  }, "strip", z.ZodTypeAny, {
337
- level?: "debug" | "info" | "warn" | "error" | "notice" | undefined;
338
517
  console?: boolean | undefined;
518
+ level?: "error" | "warn" | "info" | "debug" | "notice" | undefined;
339
519
  }, {
340
- level?: "debug" | "info" | "warn" | "error" | "notice" | undefined;
341
520
  console?: boolean | undefined;
521
+ level?: "error" | "warn" | "info" | "debug" | "notice" | undefined;
342
522
  }>>;
343
523
  web: z.ZodOptional<z.ZodObject<{
344
524
  prefix: z.ZodOptional<z.ZodString>;
@@ -347,10 +527,10 @@ export declare const File: z.ZodObject<z.objectUtil.extendShape<{
347
527
  }, {
348
528
  prefix?: string | undefined;
349
529
  }>>;
350
- }, {
530
+ } & {
351
531
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
352
532
  plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
353
- }>, z.ZodTypeAny, "passthrough">>;
533
+ }, z.ZodTypeAny, "passthrough">>;
354
534
  export interface File extends PartialRecursive<Config>, z.infer<typeof File> {
355
535
  }
356
536
  /**
package/dist/config.js CHANGED
@@ -8,11 +8,24 @@ import { findDir, logger, output } from './io.js';
8
8
  import { loadPlugin } from './plugins.js';
9
9
  export const Schema = z
10
10
  .object({
11
+ api: z.object({
12
+ disable_metadata: z.boolean(),
13
+ cookie_auth: z.boolean(),
14
+ }),
15
+ apps: z.object({
16
+ disabled: z.array(z.string()),
17
+ }),
11
18
  auth: z.object({
12
19
  credentials: z.boolean(),
13
20
  debug: z.boolean(),
14
- secret: z.string(),
21
+ origin: z.string(),
22
+ /** In minutes */
23
+ passkey_probation: z.number(),
24
+ rp_id: z.string(),
25
+ rp_name: z.string(),
15
26
  secure_cookies: z.boolean(),
27
+ /** In minutes */
28
+ verification_timeout: z.number(),
16
29
  }),
17
30
  db: z.object({
18
31
  host: z.string(),
@@ -47,11 +60,22 @@ const configShortcuts = {
47
60
  };
48
61
  export const config = {
49
62
  ...configShortcuts,
63
+ api: {
64
+ disable_metadata: false,
65
+ cookie_auth: false,
66
+ },
67
+ apps: {
68
+ disabled: [],
69
+ },
50
70
  auth: {
51
71
  credentials: false,
52
72
  debug: false,
53
- secret: '',
73
+ origin: 'https://test.localhost',
74
+ passkey_probation: 60,
75
+ rp_id: 'test.localhost',
76
+ rp_name: 'Axium',
54
77
  secure_cookies: true,
78
+ verification_timeout: 60,
55
79
  },
56
80
  db: {
57
81
  database: process.env.PGDATABASE || 'axium',