@platformatic/basic 2.65.1 → 2.66.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.
package/schema.json CHANGED
@@ -1,11 +1,1011 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/basic/2.65.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/basic/2.66.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Stackable",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "$schema": {
8
8
  "type": "string"
9
+ },
10
+ "runtime": {
11
+ "type": "object",
12
+ "properties": {
13
+ "preload": {
14
+ "anyOf": [
15
+ {
16
+ "type": "string",
17
+ "resolvePath": true
18
+ },
19
+ {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "string",
23
+ "resolvePath": true
24
+ }
25
+ }
26
+ ]
27
+ },
28
+ "basePath": {
29
+ "type": "string"
30
+ },
31
+ "workers": {
32
+ "anyOf": [
33
+ {
34
+ "type": "number",
35
+ "minimum": 1
36
+ },
37
+ {
38
+ "type": "string"
39
+ }
40
+ ],
41
+ "default": 1
42
+ },
43
+ "logger": {
44
+ "type": "object",
45
+ "properties": {
46
+ "level": {
47
+ "type": "string",
48
+ "default": "info",
49
+ "oneOf": [
50
+ {
51
+ "enum": [
52
+ "fatal",
53
+ "error",
54
+ "warn",
55
+ "info",
56
+ "debug",
57
+ "trace",
58
+ "silent"
59
+ ]
60
+ },
61
+ {
62
+ "pattern": "^\\{.+\\}$"
63
+ }
64
+ ]
65
+ },
66
+ "transport": {
67
+ "anyOf": [
68
+ {
69
+ "type": "object",
70
+ "properties": {
71
+ "target": {
72
+ "type": "string",
73
+ "resolveModule": true
74
+ },
75
+ "options": {
76
+ "type": "object"
77
+ }
78
+ },
79
+ "additionalProperties": false
80
+ },
81
+ {
82
+ "type": "object",
83
+ "properties": {
84
+ "targets": {
85
+ "type": "array",
86
+ "items": {
87
+ "type": "object",
88
+ "properties": {
89
+ "target": {
90
+ "anyOf": [
91
+ {
92
+ "type": "string",
93
+ "resolveModule": true
94
+ },
95
+ {
96
+ "type": "string",
97
+ "resolvePath": true
98
+ }
99
+ ]
100
+ },
101
+ "options": {
102
+ "type": "object"
103
+ },
104
+ "level": {
105
+ "type": "string"
106
+ }
107
+ },
108
+ "additionalProperties": false
109
+ }
110
+ },
111
+ "options": {
112
+ "type": "object"
113
+ }
114
+ },
115
+ "additionalProperties": false
116
+ }
117
+ ]
118
+ },
119
+ "pipeline": {
120
+ "type": "object",
121
+ "properties": {
122
+ "target": {
123
+ "type": "string",
124
+ "resolveModule": true
125
+ },
126
+ "options": {
127
+ "type": "object"
128
+ }
129
+ },
130
+ "additionalProperties": false
131
+ },
132
+ "formatters": {
133
+ "type": "object",
134
+ "properties": {
135
+ "path": {
136
+ "type": "string",
137
+ "resolvePath": true
138
+ }
139
+ },
140
+ "required": [
141
+ "path"
142
+ ],
143
+ "additionalProperties": false
144
+ },
145
+ "timestamp": {
146
+ "enum": [
147
+ "epochTime",
148
+ "unixTime",
149
+ "nullTime",
150
+ "isoTime"
151
+ ]
152
+ },
153
+ "redact": {
154
+ "type": "object",
155
+ "properties": {
156
+ "paths": {
157
+ "type": "array",
158
+ "items": {
159
+ "type": "string"
160
+ }
161
+ },
162
+ "censor": {
163
+ "type": "string",
164
+ "default": "[redacted]"
165
+ }
166
+ },
167
+ "required": [
168
+ "paths"
169
+ ],
170
+ "additionalProperties": false
171
+ },
172
+ "base": {
173
+ "anyOf": [
174
+ {
175
+ "type": "object",
176
+ "additionalProperties": true
177
+ },
178
+ {
179
+ "type": "null"
180
+ }
181
+ ]
182
+ },
183
+ "messageKey": {
184
+ "type": "string"
185
+ },
186
+ "customLevels": {
187
+ "type": "object",
188
+ "additionalProperties": true
189
+ }
190
+ },
191
+ "required": [
192
+ "level"
193
+ ],
194
+ "default": {},
195
+ "additionalProperties": true
196
+ },
197
+ "server": {
198
+ "type": "object",
199
+ "properties": {
200
+ "hostname": {
201
+ "type": "string",
202
+ "default": "127.0.0.1"
203
+ },
204
+ "port": {
205
+ "anyOf": [
206
+ {
207
+ "type": "integer"
208
+ },
209
+ {
210
+ "type": "string"
211
+ }
212
+ ]
213
+ },
214
+ "http2": {
215
+ "type": "boolean"
216
+ },
217
+ "https": {
218
+ "type": "object",
219
+ "properties": {
220
+ "allowHTTP1": {
221
+ "type": "boolean"
222
+ },
223
+ "key": {
224
+ "anyOf": [
225
+ {
226
+ "type": "string"
227
+ },
228
+ {
229
+ "type": "object",
230
+ "properties": {
231
+ "path": {
232
+ "type": "string",
233
+ "resolvePath": true
234
+ }
235
+ },
236
+ "additionalProperties": false
237
+ },
238
+ {
239
+ "type": "array",
240
+ "items": {
241
+ "anyOf": [
242
+ {
243
+ "type": "string"
244
+ },
245
+ {
246
+ "type": "object",
247
+ "properties": {
248
+ "path": {
249
+ "type": "string",
250
+ "resolvePath": true
251
+ }
252
+ },
253
+ "additionalProperties": false
254
+ }
255
+ ]
256
+ }
257
+ }
258
+ ]
259
+ },
260
+ "cert": {
261
+ "anyOf": [
262
+ {
263
+ "type": "string"
264
+ },
265
+ {
266
+ "type": "object",
267
+ "properties": {
268
+ "path": {
269
+ "type": "string",
270
+ "resolvePath": true
271
+ }
272
+ },
273
+ "additionalProperties": false
274
+ },
275
+ {
276
+ "type": "array",
277
+ "items": {
278
+ "anyOf": [
279
+ {
280
+ "type": "string"
281
+ },
282
+ {
283
+ "type": "object",
284
+ "properties": {
285
+ "path": {
286
+ "type": "string",
287
+ "resolvePath": true
288
+ }
289
+ },
290
+ "additionalProperties": false
291
+ }
292
+ ]
293
+ }
294
+ }
295
+ ]
296
+ },
297
+ "requestCert": {
298
+ "type": "boolean"
299
+ },
300
+ "rejectUnauthorized": {
301
+ "type": "boolean"
302
+ }
303
+ },
304
+ "additionalProperties": false,
305
+ "required": [
306
+ "key",
307
+ "cert"
308
+ ]
309
+ }
310
+ },
311
+ "additionalProperties": false
312
+ },
313
+ "startTimeout": {
314
+ "default": 30000,
315
+ "type": "number",
316
+ "minimum": 0
317
+ },
318
+ "restartOnError": {
319
+ "default": true,
320
+ "anyOf": [
321
+ {
322
+ "type": "boolean"
323
+ },
324
+ {
325
+ "type": "number",
326
+ "minimum": 0
327
+ }
328
+ ]
329
+ },
330
+ "gracefulShutdown": {
331
+ "type": "object",
332
+ "properties": {
333
+ "runtime": {
334
+ "anyOf": [
335
+ {
336
+ "type": "number",
337
+ "minimum": 1
338
+ },
339
+ {
340
+ "type": "string"
341
+ }
342
+ ],
343
+ "default": 10000
344
+ },
345
+ "service": {
346
+ "anyOf": [
347
+ {
348
+ "type": "number",
349
+ "minimum": 1
350
+ },
351
+ {
352
+ "type": "string"
353
+ }
354
+ ],
355
+ "default": 10000
356
+ }
357
+ },
358
+ "default": {},
359
+ "required": [
360
+ "runtime",
361
+ "service"
362
+ ],
363
+ "additionalProperties": false
364
+ },
365
+ "health": {
366
+ "type": "object",
367
+ "default": {},
368
+ "properties": {
369
+ "enabled": {
370
+ "default": true,
371
+ "anyOf": [
372
+ {
373
+ "type": "boolean"
374
+ },
375
+ {
376
+ "type": "string"
377
+ }
378
+ ]
379
+ },
380
+ "interval": {
381
+ "default": 30000,
382
+ "anyOf": [
383
+ {
384
+ "type": "number",
385
+ "minimum": 0
386
+ },
387
+ {
388
+ "type": "string"
389
+ }
390
+ ]
391
+ },
392
+ "gracePeriod": {
393
+ "default": 30000,
394
+ "anyOf": [
395
+ {
396
+ "type": "number",
397
+ "minimum": 0
398
+ },
399
+ {
400
+ "type": "string"
401
+ }
402
+ ]
403
+ },
404
+ "maxUnhealthyChecks": {
405
+ "default": 10,
406
+ "anyOf": [
407
+ {
408
+ "type": "number",
409
+ "minimum": 1
410
+ },
411
+ {
412
+ "type": "string"
413
+ }
414
+ ]
415
+ },
416
+ "maxELU": {
417
+ "default": 0.99,
418
+ "anyOf": [
419
+ {
420
+ "type": "number",
421
+ "minimum": 0,
422
+ "maximum": 1
423
+ },
424
+ {
425
+ "type": "string"
426
+ }
427
+ ]
428
+ },
429
+ "maxHeapUsed": {
430
+ "default": 0.99,
431
+ "anyOf": [
432
+ {
433
+ "type": "number",
434
+ "minimum": 0,
435
+ "maximum": 1
436
+ },
437
+ {
438
+ "type": "string"
439
+ }
440
+ ]
441
+ },
442
+ "maxHeapTotal": {
443
+ "default": 4294967296,
444
+ "anyOf": [
445
+ {
446
+ "type": "number",
447
+ "minimum": 0
448
+ },
449
+ {
450
+ "type": "string"
451
+ }
452
+ ]
453
+ },
454
+ "maxYoungGeneration": {
455
+ "type": "number",
456
+ "minimum": 0
457
+ }
458
+ },
459
+ "additionalProperties": false
460
+ },
461
+ "undici": {
462
+ "type": "object",
463
+ "properties": {
464
+ "agentOptions": {
465
+ "type": "object",
466
+ "additionalProperties": true
467
+ },
468
+ "interceptors": {
469
+ "anyOf": [
470
+ {
471
+ "type": "array",
472
+ "items": {
473
+ "type": "object",
474
+ "properties": {
475
+ "module": {
476
+ "type": "string"
477
+ },
478
+ "options": {
479
+ "type": "object",
480
+ "additionalProperties": true
481
+ }
482
+ },
483
+ "required": [
484
+ "module",
485
+ "options"
486
+ ]
487
+ }
488
+ },
489
+ {
490
+ "type": "object",
491
+ "properties": {
492
+ "Client": {
493
+ "type": "array",
494
+ "items": {
495
+ "type": "object",
496
+ "properties": {
497
+ "module": {
498
+ "type": "string"
499
+ },
500
+ "options": {
501
+ "type": "object",
502
+ "additionalProperties": true
503
+ }
504
+ },
505
+ "required": [
506
+ "module",
507
+ "options"
508
+ ]
509
+ }
510
+ },
511
+ "Pool": {
512
+ "type": "array",
513
+ "items": {
514
+ "type": "object",
515
+ "properties": {
516
+ "module": {
517
+ "type": "string"
518
+ },
519
+ "options": {
520
+ "type": "object",
521
+ "additionalProperties": true
522
+ }
523
+ },
524
+ "required": [
525
+ "module",
526
+ "options"
527
+ ]
528
+ }
529
+ },
530
+ "Agent": {
531
+ "type": "array",
532
+ "items": {
533
+ "type": "object",
534
+ "properties": {
535
+ "module": {
536
+ "type": "string"
537
+ },
538
+ "options": {
539
+ "type": "object",
540
+ "additionalProperties": true
541
+ }
542
+ },
543
+ "required": [
544
+ "module",
545
+ "options"
546
+ ]
547
+ }
548
+ }
549
+ }
550
+ }
551
+ ]
552
+ }
553
+ }
554
+ },
555
+ "httpCache": {
556
+ "oneOf": [
557
+ {
558
+ "type": "boolean"
559
+ },
560
+ {
561
+ "type": "object",
562
+ "properties": {
563
+ "store": {
564
+ "type": "string"
565
+ },
566
+ "methods": {
567
+ "type": "array",
568
+ "items": {
569
+ "type": "string"
570
+ },
571
+ "default": [
572
+ "GET",
573
+ "HEAD"
574
+ ],
575
+ "minItems": 1
576
+ },
577
+ "cacheTagsHeader": {
578
+ "type": "string"
579
+ },
580
+ "maxSize": {
581
+ "type": "integer"
582
+ },
583
+ "maxEntrySize": {
584
+ "type": "integer"
585
+ },
586
+ "maxCount": {
587
+ "type": "integer"
588
+ }
589
+ }
590
+ }
591
+ ]
592
+ },
593
+ "watch": {
594
+ "anyOf": [
595
+ {
596
+ "type": "boolean"
597
+ },
598
+ {
599
+ "type": "string"
600
+ }
601
+ ]
602
+ },
603
+ "managementApi": {
604
+ "anyOf": [
605
+ {
606
+ "type": "boolean"
607
+ },
608
+ {
609
+ "type": "string"
610
+ },
611
+ {
612
+ "type": "object",
613
+ "properties": {
614
+ "logs": {
615
+ "type": "object",
616
+ "properties": {
617
+ "maxSize": {
618
+ "type": "number",
619
+ "minimum": 5,
620
+ "default": 200
621
+ }
622
+ },
623
+ "additionalProperties": false
624
+ }
625
+ },
626
+ "additionalProperties": false
627
+ }
628
+ ],
629
+ "default": true
630
+ },
631
+ "metrics": {
632
+ "anyOf": [
633
+ {
634
+ "type": "boolean"
635
+ },
636
+ {
637
+ "type": "object",
638
+ "properties": {
639
+ "port": {
640
+ "anyOf": [
641
+ {
642
+ "type": "integer"
643
+ },
644
+ {
645
+ "type": "string"
646
+ }
647
+ ]
648
+ },
649
+ "enabled": {
650
+ "anyOf": [
651
+ {
652
+ "type": "boolean"
653
+ },
654
+ {
655
+ "type": "string"
656
+ }
657
+ ]
658
+ },
659
+ "hostname": {
660
+ "type": "string"
661
+ },
662
+ "endpoint": {
663
+ "type": "string"
664
+ },
665
+ "auth": {
666
+ "type": "object",
667
+ "properties": {
668
+ "username": {
669
+ "type": "string"
670
+ },
671
+ "password": {
672
+ "type": "string"
673
+ }
674
+ },
675
+ "additionalProperties": false,
676
+ "required": [
677
+ "username",
678
+ "password"
679
+ ]
680
+ },
681
+ "labels": {
682
+ "type": "object",
683
+ "additionalProperties": {
684
+ "type": "string"
685
+ }
686
+ },
687
+ "readiness": {
688
+ "anyOf": [
689
+ {
690
+ "type": "boolean"
691
+ },
692
+ {
693
+ "type": "object",
694
+ "properties": {
695
+ "endpoint": {
696
+ "type": "string"
697
+ },
698
+ "success": {
699
+ "type": "object",
700
+ "properties": {
701
+ "statusCode": {
702
+ "type": "number"
703
+ },
704
+ "body": {
705
+ "type": "string"
706
+ }
707
+ },
708
+ "additionalProperties": false
709
+ },
710
+ "fail": {
711
+ "type": "object",
712
+ "properties": {
713
+ "statusCode": {
714
+ "type": "number"
715
+ },
716
+ "body": {
717
+ "type": "string"
718
+ }
719
+ },
720
+ "additionalProperties": false
721
+ }
722
+ },
723
+ "additionalProperties": false
724
+ }
725
+ ]
726
+ },
727
+ "liveness": {
728
+ "anyOf": [
729
+ {
730
+ "type": "boolean"
731
+ },
732
+ {
733
+ "type": "object",
734
+ "properties": {
735
+ "endpoint": {
736
+ "type": "string"
737
+ },
738
+ "success": {
739
+ "type": "object",
740
+ "properties": {
741
+ "statusCode": {
742
+ "type": "number"
743
+ },
744
+ "body": {
745
+ "type": "string"
746
+ }
747
+ },
748
+ "additionalProperties": false
749
+ },
750
+ "fail": {
751
+ "type": "object",
752
+ "properties": {
753
+ "statusCode": {
754
+ "type": "number"
755
+ },
756
+ "body": {
757
+ "type": "string"
758
+ }
759
+ },
760
+ "additionalProperties": false
761
+ }
762
+ },
763
+ "additionalProperties": false
764
+ }
765
+ ]
766
+ },
767
+ "additionalProperties": false
768
+ }
769
+ }
770
+ ]
771
+ },
772
+ "telemetry": {
773
+ "type": "object",
774
+ "properties": {
775
+ "enabled": {
776
+ "anyOf": [
777
+ {
778
+ "type": "boolean"
779
+ },
780
+ {
781
+ "type": "string"
782
+ }
783
+ ]
784
+ },
785
+ "serviceName": {
786
+ "type": "string",
787
+ "description": "The name of the service. Defaults to the folder name if not specified."
788
+ },
789
+ "version": {
790
+ "type": "string",
791
+ "description": "The version of the service (optional)"
792
+ },
793
+ "skip": {
794
+ "type": "array",
795
+ "description": "An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.",
796
+ "items": {
797
+ "type": "object",
798
+ "properties": {
799
+ "path": {
800
+ "type": "string",
801
+ "description": "The path to skip. Can be a string or a regex."
802
+ },
803
+ "method": {
804
+ "description": "HTTP method to skip",
805
+ "type": "string",
806
+ "enum": [
807
+ "GET",
808
+ "POST",
809
+ "PUT",
810
+ "DELETE",
811
+ "PATCH",
812
+ "HEAD",
813
+ "OPTIONS"
814
+ ]
815
+ }
816
+ }
817
+ }
818
+ },
819
+ "exporter": {
820
+ "anyOf": [
821
+ {
822
+ "type": "array",
823
+ "items": {
824
+ "type": "object",
825
+ "properties": {
826
+ "type": {
827
+ "type": "string",
828
+ "enum": [
829
+ "console",
830
+ "otlp",
831
+ "zipkin",
832
+ "memory",
833
+ "file"
834
+ ],
835
+ "default": "console"
836
+ },
837
+ "options": {
838
+ "type": "object",
839
+ "description": "Options for the exporter. These are passed directly to the exporter.",
840
+ "properties": {
841
+ "url": {
842
+ "type": "string",
843
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
844
+ },
845
+ "headers": {
846
+ "type": "object",
847
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
848
+ },
849
+ "path": {
850
+ "type": "string",
851
+ "description": "The path to write the traces to. Only for file exporter."
852
+ }
853
+ }
854
+ },
855
+ "additionalProperties": false
856
+ }
857
+ }
858
+ },
859
+ {
860
+ "type": "object",
861
+ "properties": {
862
+ "type": {
863
+ "type": "string",
864
+ "enum": [
865
+ "console",
866
+ "otlp",
867
+ "zipkin",
868
+ "memory",
869
+ "file"
870
+ ],
871
+ "default": "console"
872
+ },
873
+ "options": {
874
+ "type": "object",
875
+ "description": "Options for the exporter. These are passed directly to the exporter.",
876
+ "properties": {
877
+ "url": {
878
+ "type": "string",
879
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
880
+ },
881
+ "headers": {
882
+ "type": "object",
883
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
884
+ },
885
+ "path": {
886
+ "type": "string",
887
+ "description": "The path to write the traces to. Only for file exporter."
888
+ }
889
+ }
890
+ },
891
+ "additionalProperties": false
892
+ }
893
+ }
894
+ ]
895
+ }
896
+ },
897
+ "required": [
898
+ "serviceName"
899
+ ],
900
+ "additionalProperties": false
901
+ },
902
+ "inspectorOptions": {
903
+ "type": "object",
904
+ "properties": {
905
+ "host": {
906
+ "type": "string"
907
+ },
908
+ "port": {
909
+ "type": "number"
910
+ },
911
+ "breakFirstLine": {
912
+ "type": "boolean"
913
+ },
914
+ "watchDisabled": {
915
+ "type": "boolean"
916
+ }
917
+ }
918
+ },
919
+ "serviceTimeout": {
920
+ "anyOf": [
921
+ {
922
+ "type": "number",
923
+ "minimum": 1
924
+ },
925
+ {
926
+ "type": "string"
927
+ }
928
+ ],
929
+ "default": 300000
930
+ },
931
+ "env": {
932
+ "type": "object",
933
+ "additionalProperties": {
934
+ "type": "string"
935
+ }
936
+ },
937
+ "sourceMaps": {
938
+ "type": "boolean",
939
+ "default": false
940
+ },
941
+ "scheduler": {
942
+ "type": "array",
943
+ "items": {
944
+ "type": "object",
945
+ "properties": {
946
+ "enabled": {
947
+ "anyOf": [
948
+ {
949
+ "type": "boolean"
950
+ },
951
+ {
952
+ "type": "string"
953
+ }
954
+ ],
955
+ "default": true
956
+ },
957
+ "name": {
958
+ "type": "string"
959
+ },
960
+ "cron": {
961
+ "type": "string"
962
+ },
963
+ "callbackUrl": {
964
+ "type": "string"
965
+ },
966
+ "method": {
967
+ "type": "string",
968
+ "enum": [
969
+ "GET",
970
+ "POST",
971
+ "PUT",
972
+ "PATCH",
973
+ "DELETE"
974
+ ],
975
+ "default": "GET"
976
+ },
977
+ "headers": {
978
+ "type": "object",
979
+ "additionalProperties": {
980
+ "type": "string"
981
+ }
982
+ },
983
+ "body": {
984
+ "anyOf": [
985
+ {
986
+ "type": "string"
987
+ },
988
+ {
989
+ "type": "object",
990
+ "additionalProperties": true
991
+ }
992
+ ]
993
+ },
994
+ "maxRetries": {
995
+ "type": "number",
996
+ "minimum": 0,
997
+ "default": 3
998
+ }
999
+ },
1000
+ "required": [
1001
+ "name",
1002
+ "cron",
1003
+ "callbackUrl"
1004
+ ]
1005
+ }
1006
+ }
1007
+ },
1008
+ "additionalProperties": false
9
1009
  }
10
1010
  },
11
1011
  "additionalProperties": true