@drzl/cli 4.19.0 → 4.23.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.
@@ -0,0 +1,717 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://use-drzl.github.io/drzl/drzl.config.schema.json",
4
+ "title": "DRZL configuration",
5
+ "description": "Configuration for the drzl CLI. Also describes drzl.config.ts, which gets the same shape from the defineConfig export of @drzl/cli/config.",
6
+ "type": "object",
7
+ "properties": {
8
+ "$schema": {
9
+ "type": "string",
10
+ "description": "Path or URL of this schema, for editor completion. Ignored by drzl."
11
+ },
12
+ "schema": {
13
+ "type": "string"
14
+ },
15
+ "drizzleKit": {
16
+ "anyOf": [
17
+ {
18
+ "type": "boolean"
19
+ },
20
+ {
21
+ "type": "string"
22
+ }
23
+ ]
24
+ },
25
+ "outDir": {
26
+ "default": "src/api",
27
+ "type": "string"
28
+ },
29
+ "include": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "string"
33
+ }
34
+ },
35
+ "exclude": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "string"
39
+ }
40
+ },
41
+ "columns": {
42
+ "type": "object",
43
+ "propertyNames": {
44
+ "type": "string"
45
+ },
46
+ "additionalProperties": {
47
+ "type": "object",
48
+ "properties": {
49
+ "omit": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string"
53
+ }
54
+ },
55
+ "pick": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "string"
59
+ }
60
+ }
61
+ },
62
+ "additionalProperties": false
63
+ }
64
+ },
65
+ "importExtension": {
66
+ "default": "js",
67
+ "type": "string",
68
+ "enum": [
69
+ "js",
70
+ "none",
71
+ "ts"
72
+ ]
73
+ },
74
+ "analyzer": {
75
+ "default": {
76
+ "includeRelations": true,
77
+ "validateConstraints": true,
78
+ "includeHeuristicRelations": false
79
+ },
80
+ "type": "object",
81
+ "properties": {
82
+ "includeRelations": {
83
+ "default": true,
84
+ "type": "boolean"
85
+ },
86
+ "validateConstraints": {
87
+ "default": true,
88
+ "type": "boolean"
89
+ },
90
+ "includeHeuristicRelations": {
91
+ "default": false,
92
+ "type": "boolean"
93
+ }
94
+ }
95
+ },
96
+ "generators": {
97
+ "default": [
98
+ {
99
+ "kind": "orpc"
100
+ }
101
+ ],
102
+ "minItems": 1,
103
+ "type": "array",
104
+ "items": {
105
+ "type": "object",
106
+ "properties": {
107
+ "kind": {
108
+ "type": "string",
109
+ "enum": [
110
+ "orpc",
111
+ "trpc",
112
+ "hono",
113
+ "express",
114
+ "fastify",
115
+ "nestjs",
116
+ "graphql",
117
+ "service",
118
+ "zod",
119
+ "valibot",
120
+ "arktype",
121
+ "typebox",
122
+ "effect",
123
+ "json-schema"
124
+ ]
125
+ },
126
+ "validator": {
127
+ "type": "string",
128
+ "enum": [
129
+ "standard",
130
+ "zod"
131
+ ]
132
+ },
133
+ "importExtension": {
134
+ "type": "string",
135
+ "enum": [
136
+ "js",
137
+ "none",
138
+ "ts"
139
+ ]
140
+ },
141
+ "template": {
142
+ "type": "string"
143
+ },
144
+ "includeRelations": {
145
+ "type": "boolean"
146
+ },
147
+ "sharedEnums": {
148
+ "type": "boolean"
149
+ },
150
+ "coerceDates": {
151
+ "type": "string",
152
+ "enum": [
153
+ "input",
154
+ "all",
155
+ "none"
156
+ ]
157
+ },
158
+ "typedJson": {
159
+ "type": "boolean"
160
+ },
161
+ "typedColumns": {
162
+ "type": "boolean"
163
+ },
164
+ "applyDefaults": {
165
+ "type": "boolean"
166
+ },
167
+ "duplicateFinder": {
168
+ "type": "boolean"
169
+ },
170
+ "constraints": {
171
+ "anyOf": [
172
+ {
173
+ "type": "boolean"
174
+ },
175
+ {
176
+ "type": "object",
177
+ "properties": {
178
+ "enabled": {
179
+ "type": "boolean"
180
+ },
181
+ "errorMap": {
182
+ "type": "boolean"
183
+ }
184
+ },
185
+ "additionalProperties": false
186
+ }
187
+ ]
188
+ },
189
+ "meta": {
190
+ "anyOf": [
191
+ {
192
+ "type": "boolean"
193
+ },
194
+ {
195
+ "type": "object",
196
+ "properties": {
197
+ "enabled": {
198
+ "type": "boolean"
199
+ },
200
+ "description": {
201
+ "type": "boolean"
202
+ }
203
+ },
204
+ "additionalProperties": false
205
+ }
206
+ ]
207
+ },
208
+ "standardSchema": {
209
+ "type": "boolean"
210
+ },
211
+ "nestedSchemas": {
212
+ "type": "boolean"
213
+ },
214
+ "nestedDepth": {
215
+ "type": "integer",
216
+ "minimum": -9007199254740991,
217
+ "maximum": 9007199254740991
218
+ },
219
+ "branded": {
220
+ "anyOf": [
221
+ {
222
+ "type": "boolean"
223
+ },
224
+ {
225
+ "type": "object",
226
+ "properties": {
227
+ "enabled": {
228
+ "type": "boolean"
229
+ },
230
+ "foreignKeys": {
231
+ "type": "boolean"
232
+ },
233
+ "aliases": {
234
+ "type": "boolean"
235
+ }
236
+ },
237
+ "additionalProperties": false
238
+ }
239
+ ]
240
+ },
241
+ "naming": {
242
+ "type": "object",
243
+ "properties": {
244
+ "routerSuffix": {
245
+ "default": "Router",
246
+ "type": "string"
247
+ },
248
+ "procedureCase": {
249
+ "default": "camel",
250
+ "type": "string",
251
+ "enum": [
252
+ "camel",
253
+ "kebab",
254
+ "snake"
255
+ ]
256
+ }
257
+ }
258
+ },
259
+ "outputHeader": {
260
+ "type": "object",
261
+ "properties": {
262
+ "enabled": {
263
+ "default": true,
264
+ "type": "boolean"
265
+ },
266
+ "text": {
267
+ "type": "string"
268
+ }
269
+ }
270
+ },
271
+ "format": {
272
+ "type": "object",
273
+ "properties": {
274
+ "enabled": {
275
+ "default": true,
276
+ "type": "boolean"
277
+ },
278
+ "engine": {
279
+ "default": "auto",
280
+ "type": "string",
281
+ "enum": [
282
+ "auto",
283
+ "prettier",
284
+ "biome"
285
+ ]
286
+ },
287
+ "configPath": {
288
+ "type": "string"
289
+ }
290
+ }
291
+ },
292
+ "target": {
293
+ "type": "string",
294
+ "enum": [
295
+ "draft-2020-12",
296
+ "openapi-3.1",
297
+ "openapi-3.0"
298
+ ]
299
+ },
300
+ "components": {
301
+ "type": "boolean"
302
+ },
303
+ "document": {
304
+ "anyOf": [
305
+ {
306
+ "type": "boolean"
307
+ },
308
+ {
309
+ "type": "object",
310
+ "properties": {
311
+ "enabled": {
312
+ "type": "boolean"
313
+ },
314
+ "format": {
315
+ "type": "string",
316
+ "enum": [
317
+ "ts",
318
+ "json",
319
+ "both"
320
+ ]
321
+ },
322
+ "info": {
323
+ "type": "object",
324
+ "properties": {
325
+ "title": {
326
+ "type": "string"
327
+ },
328
+ "version": {
329
+ "type": "string"
330
+ },
331
+ "description": {
332
+ "type": "string"
333
+ }
334
+ },
335
+ "additionalProperties": false
336
+ },
337
+ "servers": {
338
+ "type": "array",
339
+ "items": {
340
+ "type": "object",
341
+ "properties": {
342
+ "url": {
343
+ "type": "string"
344
+ },
345
+ "description": {
346
+ "type": "string"
347
+ }
348
+ },
349
+ "required": [
350
+ "url"
351
+ ],
352
+ "additionalProperties": false
353
+ }
354
+ },
355
+ "validationStatus": {
356
+ "anyOf": [
357
+ {
358
+ "type": "number",
359
+ "const": 400
360
+ },
361
+ {
362
+ "type": "number",
363
+ "const": 422
364
+ }
365
+ ]
366
+ }
367
+ },
368
+ "additionalProperties": false
369
+ }
370
+ ]
371
+ },
372
+ "path": {
373
+ "type": "string"
374
+ },
375
+ "dataAccess": {
376
+ "default": "stub",
377
+ "type": "string",
378
+ "enum": [
379
+ "stub",
380
+ "drizzle"
381
+ ]
382
+ },
383
+ "dbImportPath": {
384
+ "type": "string"
385
+ },
386
+ "schemaImportPath": {
387
+ "type": "string"
388
+ },
389
+ "schemaSuffix": {
390
+ "type": "string"
391
+ },
392
+ "fileSuffix": {
393
+ "type": "string"
394
+ },
395
+ "affix": {
396
+ "type": "object",
397
+ "properties": {
398
+ "tableCase": {
399
+ "type": "string",
400
+ "enum": [
401
+ "preserve",
402
+ "pascal"
403
+ ]
404
+ },
405
+ "schema": {
406
+ "type": "object",
407
+ "properties": {
408
+ "prefix": {
409
+ "anyOf": [
410
+ {
411
+ "type": "string",
412
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
413
+ },
414
+ {
415
+ "type": "object",
416
+ "properties": {
417
+ "insert": {
418
+ "type": "string",
419
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
420
+ },
421
+ "update": {
422
+ "type": "string",
423
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
424
+ },
425
+ "select": {
426
+ "type": "string",
427
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
428
+ }
429
+ },
430
+ "additionalProperties": false
431
+ }
432
+ ]
433
+ },
434
+ "suffix": {
435
+ "anyOf": [
436
+ {
437
+ "type": "string",
438
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
439
+ },
440
+ {
441
+ "type": "object",
442
+ "properties": {
443
+ "insert": {
444
+ "type": "string",
445
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
446
+ },
447
+ "update": {
448
+ "type": "string",
449
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
450
+ },
451
+ "select": {
452
+ "type": "string",
453
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
454
+ }
455
+ },
456
+ "additionalProperties": false
457
+ }
458
+ ]
459
+ }
460
+ },
461
+ "additionalProperties": false
462
+ },
463
+ "type": {
464
+ "type": "object",
465
+ "properties": {
466
+ "prefix": {
467
+ "anyOf": [
468
+ {
469
+ "type": "string",
470
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
471
+ },
472
+ {
473
+ "type": "object",
474
+ "properties": {
475
+ "insert": {
476
+ "type": "string",
477
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
478
+ },
479
+ "update": {
480
+ "type": "string",
481
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
482
+ },
483
+ "select": {
484
+ "type": "string",
485
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
486
+ }
487
+ },
488
+ "additionalProperties": false
489
+ }
490
+ ]
491
+ },
492
+ "suffix": {
493
+ "anyOf": [
494
+ {
495
+ "type": "string",
496
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
497
+ },
498
+ {
499
+ "type": "object",
500
+ "properties": {
501
+ "insert": {
502
+ "type": "string",
503
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
504
+ },
505
+ "update": {
506
+ "type": "string",
507
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
508
+ },
509
+ "select": {
510
+ "type": "string",
511
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
512
+ }
513
+ },
514
+ "additionalProperties": false
515
+ }
516
+ ]
517
+ }
518
+ },
519
+ "additionalProperties": false
520
+ }
521
+ },
522
+ "additionalProperties": false
523
+ },
524
+ "databaseInjection": {
525
+ "type": "object",
526
+ "properties": {
527
+ "enabled": {
528
+ "type": "boolean"
529
+ },
530
+ "databaseType": {
531
+ "type": "string"
532
+ },
533
+ "databaseTypeImport": {
534
+ "type": "object",
535
+ "properties": {
536
+ "name": {
537
+ "type": "string"
538
+ },
539
+ "from": {
540
+ "type": "string"
541
+ }
542
+ },
543
+ "required": [
544
+ "name",
545
+ "from"
546
+ ]
547
+ }
548
+ }
549
+ },
550
+ "validation": {
551
+ "type": "object",
552
+ "properties": {
553
+ "useShared": {
554
+ "default": false,
555
+ "type": "boolean"
556
+ },
557
+ "library": {
558
+ "default": "zod",
559
+ "type": "string",
560
+ "enum": [
561
+ "zod",
562
+ "valibot",
563
+ "arktype"
564
+ ]
565
+ },
566
+ "importPath": {
567
+ "type": "string"
568
+ },
569
+ "schemaSuffix": {
570
+ "type": "string"
571
+ },
572
+ "affix": {
573
+ "type": "object",
574
+ "properties": {
575
+ "tableCase": {
576
+ "type": "string",
577
+ "enum": [
578
+ "preserve",
579
+ "pascal"
580
+ ]
581
+ },
582
+ "schema": {
583
+ "type": "object",
584
+ "properties": {
585
+ "prefix": {
586
+ "anyOf": [
587
+ {
588
+ "type": "string",
589
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
590
+ },
591
+ {
592
+ "type": "object",
593
+ "properties": {
594
+ "insert": {
595
+ "type": "string",
596
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
597
+ },
598
+ "update": {
599
+ "type": "string",
600
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
601
+ },
602
+ "select": {
603
+ "type": "string",
604
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
605
+ }
606
+ },
607
+ "additionalProperties": false
608
+ }
609
+ ]
610
+ },
611
+ "suffix": {
612
+ "anyOf": [
613
+ {
614
+ "type": "string",
615
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
616
+ },
617
+ {
618
+ "type": "object",
619
+ "properties": {
620
+ "insert": {
621
+ "type": "string",
622
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
623
+ },
624
+ "update": {
625
+ "type": "string",
626
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
627
+ },
628
+ "select": {
629
+ "type": "string",
630
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
631
+ }
632
+ },
633
+ "additionalProperties": false
634
+ }
635
+ ]
636
+ }
637
+ },
638
+ "additionalProperties": false
639
+ },
640
+ "type": {
641
+ "type": "object",
642
+ "properties": {
643
+ "prefix": {
644
+ "anyOf": [
645
+ {
646
+ "type": "string",
647
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
648
+ },
649
+ {
650
+ "type": "object",
651
+ "properties": {
652
+ "insert": {
653
+ "type": "string",
654
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
655
+ },
656
+ "update": {
657
+ "type": "string",
658
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
659
+ },
660
+ "select": {
661
+ "type": "string",
662
+ "pattern": "^(?:[A-Za-z_$][A-Za-z0-9_$]*)?$"
663
+ }
664
+ },
665
+ "additionalProperties": false
666
+ }
667
+ ]
668
+ },
669
+ "suffix": {
670
+ "anyOf": [
671
+ {
672
+ "type": "string",
673
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
674
+ },
675
+ {
676
+ "type": "object",
677
+ "properties": {
678
+ "insert": {
679
+ "type": "string",
680
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
681
+ },
682
+ "update": {
683
+ "type": "string",
684
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
685
+ },
686
+ "select": {
687
+ "type": "string",
688
+ "pattern": "^(?:[A-Za-z0-9_$]+)?$"
689
+ }
690
+ },
691
+ "additionalProperties": false
692
+ }
693
+ ]
694
+ }
695
+ },
696
+ "additionalProperties": false
697
+ }
698
+ },
699
+ "additionalProperties": false
700
+ }
701
+ }
702
+ },
703
+ "templateOptions": {
704
+ "type": "object",
705
+ "propertyNames": {
706
+ "type": "string"
707
+ },
708
+ "additionalProperties": {}
709
+ }
710
+ },
711
+ "required": [
712
+ "kind"
713
+ ]
714
+ }
715
+ }
716
+ }
717
+ }