@platformatic/runtime 1.53.1 → 1.53.3

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 (2) hide show
  1. package/package.json +12 -11
  2. package/schema.json +828 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "1.53.1",
3
+ "version": "1.53.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -34,8 +34,8 @@
34
34
  "typescript": "^5.6.2",
35
35
  "undici-oidc-interceptor": "^0.5.0",
36
36
  "why-is-node-running": "^2.2.2",
37
- "@platformatic/sql-graphql": "1.53.1",
38
- "@platformatic/sql-mapper": "1.53.1"
37
+ "@platformatic/sql-graphql": "1.53.3",
38
+ "@platformatic/sql-mapper": "1.53.3"
39
39
  },
40
40
  "dependencies": {
41
41
  "@fastify/error": "^3.4.1",
@@ -64,14 +64,14 @@
64
64
  "undici": "^6.19.8",
65
65
  "why-is-node-running": "^2.3.0",
66
66
  "ws": "^8.18.0",
67
- "@platformatic/bus": "1.53.1",
68
- "@platformatic/config": "1.53.1",
69
- "@platformatic/composer": "1.53.1",
70
- "@platformatic/generators": "1.53.1",
71
- "@platformatic/db": "1.53.1",
72
- "@platformatic/service": "1.53.1",
73
- "@platformatic/telemetry": "1.53.1",
74
- "@platformatic/utils": "1.53.1"
67
+ "@platformatic/bus": "1.53.3",
68
+ "@platformatic/composer": "1.53.3",
69
+ "@platformatic/config": "1.53.3",
70
+ "@platformatic/db": "1.53.3",
71
+ "@platformatic/generators": "1.53.3",
72
+ "@platformatic/telemetry": "1.53.3",
73
+ "@platformatic/service": "1.53.3",
74
+ "@platformatic/utils": "1.53.3"
75
75
  },
76
76
  "standard": {
77
77
  "ignore": [
@@ -80,6 +80,7 @@
80
80
  ]
81
81
  },
82
82
  "scripts": {
83
+ "build": "node lib/schema.js > schema.json",
83
84
  "test": "npm run lint && borp --concurrency=1 --timeout=180000 && tsd",
84
85
  "coverage": "npm run lint && borp -X=fixtures -X=test -C --concurrency=1 --timeout=120000 && tsd",
85
86
  "lint": "standard | snazzy"
package/schema.json ADDED
@@ -0,0 +1,828 @@
1
+ {
2
+ "$id": "https://platformatic.dev/schemas/v1.53.3/runtime",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "$schema": {
7
+ "type": "string"
8
+ },
9
+ "preload": {
10
+ "type": "string",
11
+ "resolvePath": true
12
+ },
13
+ "autoload": {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "required": [
17
+ "path"
18
+ ],
19
+ "properties": {
20
+ "path": {
21
+ "type": "string",
22
+ "resolvePath": true
23
+ },
24
+ "exclude": {
25
+ "type": "array",
26
+ "default": [],
27
+ "items": {
28
+ "type": "string"
29
+ }
30
+ },
31
+ "mappings": {
32
+ "type": "object",
33
+ "additionalProperties": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": [
37
+ "id",
38
+ "config"
39
+ ],
40
+ "properties": {
41
+ "id": {
42
+ "type": "string"
43
+ },
44
+ "config": {
45
+ "type": "string"
46
+ },
47
+ "useHttp": {
48
+ "type": "boolean"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "telemetry": {
56
+ "$id": "/OpenTelemetry",
57
+ "type": "object",
58
+ "properties": {
59
+ "serviceName": {
60
+ "type": "string",
61
+ "description": "The name of the service. Defaults to the folder name if not specified."
62
+ },
63
+ "version": {
64
+ "type": "string",
65
+ "description": "The version of the service (optional)"
66
+ },
67
+ "skip": {
68
+ "type": "array",
69
+ "description": "An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.",
70
+ "items": {
71
+ "type": "object",
72
+ "properties": {
73
+ "path": {
74
+ "type": "string",
75
+ "description": "The path to skip. Can be a string or a regex."
76
+ },
77
+ "method": {
78
+ "description": "HTTP method to skip",
79
+ "type": "string",
80
+ "enum": [
81
+ "GET",
82
+ "POST",
83
+ "PUT",
84
+ "DELETE",
85
+ "PATCH",
86
+ "HEAD",
87
+ "OPTIONS"
88
+ ]
89
+ }
90
+ }
91
+ }
92
+ },
93
+ "exporter": {
94
+ "anyOf": [
95
+ {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "object",
99
+ "properties": {
100
+ "type": {
101
+ "type": "string",
102
+ "enum": [
103
+ "console",
104
+ "otlp",
105
+ "zipkin",
106
+ "memory"
107
+ ],
108
+ "default": "console"
109
+ },
110
+ "options": {
111
+ "type": "object",
112
+ "description": "Options for the exporter. These are passed directly to the exporter.",
113
+ "properties": {
114
+ "url": {
115
+ "type": "string",
116
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
117
+ },
118
+ "headers": {
119
+ "type": "object",
120
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
121
+ }
122
+ }
123
+ },
124
+ "additionalProperties": false
125
+ }
126
+ }
127
+ },
128
+ {
129
+ "type": "object",
130
+ "properties": {
131
+ "type": {
132
+ "type": "string",
133
+ "enum": [
134
+ "console",
135
+ "otlp",
136
+ "zipkin",
137
+ "memory"
138
+ ],
139
+ "default": "console"
140
+ },
141
+ "options": {
142
+ "type": "object",
143
+ "description": "Options for the exporter. These are passed directly to the exporter.",
144
+ "properties": {
145
+ "url": {
146
+ "type": "string",
147
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
148
+ },
149
+ "headers": {
150
+ "type": "object",
151
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
152
+ }
153
+ }
154
+ },
155
+ "additionalProperties": false
156
+ }
157
+ }
158
+ ]
159
+ }
160
+ },
161
+ "required": [
162
+ "serviceName"
163
+ ],
164
+ "additionalProperties": false
165
+ },
166
+ "server": {
167
+ "type": "object",
168
+ "properties": {
169
+ "hostname": {
170
+ "type": "string"
171
+ },
172
+ "port": {
173
+ "anyOf": [
174
+ {
175
+ "type": "integer"
176
+ },
177
+ {
178
+ "type": "string"
179
+ }
180
+ ]
181
+ },
182
+ "pluginTimeout": {
183
+ "type": "integer"
184
+ },
185
+ "healthCheck": {
186
+ "anyOf": [
187
+ {
188
+ "type": "boolean"
189
+ },
190
+ {
191
+ "type": "object",
192
+ "properties": {
193
+ "enabled": {
194
+ "type": "boolean"
195
+ },
196
+ "interval": {
197
+ "type": "integer"
198
+ }
199
+ },
200
+ "additionalProperties": true
201
+ }
202
+ ]
203
+ },
204
+ "ignoreTrailingSlash": {
205
+ "type": "boolean"
206
+ },
207
+ "ignoreDuplicateSlashes": {
208
+ "type": "boolean"
209
+ },
210
+ "connectionTimeout": {
211
+ "type": "integer"
212
+ },
213
+ "keepAliveTimeout": {
214
+ "type": "integer",
215
+ "default": 5000
216
+ },
217
+ "maxRequestsPerSocket": {
218
+ "type": "integer"
219
+ },
220
+ "forceCloseConnections": {
221
+ "anyOf": [
222
+ {
223
+ "type": "boolean"
224
+ },
225
+ {
226
+ "type": "string",
227
+ "pattern": "^idle$"
228
+ }
229
+ ]
230
+ },
231
+ "requestTimeout": {
232
+ "type": "integer"
233
+ },
234
+ "bodyLimit": {
235
+ "type": "integer"
236
+ },
237
+ "maxParamLength": {
238
+ "type": "integer"
239
+ },
240
+ "disableRequestLogging": {
241
+ "type": "boolean"
242
+ },
243
+ "exposeHeadRoutes": {
244
+ "type": "boolean"
245
+ },
246
+ "logger": {
247
+ "anyOf": [
248
+ {
249
+ "type": "boolean"
250
+ },
251
+ {
252
+ "type": "object",
253
+ "properties": {
254
+ "level": {
255
+ "type": "string"
256
+ },
257
+ "transport": {
258
+ "anyOf": [
259
+ {
260
+ "type": "object",
261
+ "properties": {
262
+ "target": {
263
+ "type": "string",
264
+ "resolveModule": true
265
+ },
266
+ "options": {
267
+ "type": "object"
268
+ }
269
+ },
270
+ "additionalProperties": false
271
+ },
272
+ {
273
+ "type": "object",
274
+ "properties": {
275
+ "targets": {
276
+ "type": "array",
277
+ "items": {
278
+ "type": "object",
279
+ "properties": {
280
+ "target": {
281
+ "type": "string",
282
+ "resolveModule": true
283
+ },
284
+ "options": {
285
+ "type": "object"
286
+ },
287
+ "level": {
288
+ "type": "string"
289
+ },
290
+ "additionalProperties": false
291
+ }
292
+ }
293
+ },
294
+ "options": {
295
+ "type": "object"
296
+ }
297
+ },
298
+ "additionalProperties": false
299
+ }
300
+ ]
301
+ },
302
+ "pipeline": {
303
+ "type": "object",
304
+ "properties": {
305
+ "target": {
306
+ "type": "string",
307
+ "resolveModule": true
308
+ },
309
+ "options": {
310
+ "type": "object"
311
+ }
312
+ },
313
+ "additionalProperties": false
314
+ }
315
+ },
316
+ "additionalProperties": true
317
+ }
318
+ ]
319
+ },
320
+ "serializerOpts": {
321
+ "type": "object",
322
+ "properties": {
323
+ "schema": {
324
+ "type": "object"
325
+ },
326
+ "ajv": {
327
+ "type": "object"
328
+ },
329
+ "rounding": {
330
+ "type": "string",
331
+ "enum": [
332
+ "floor",
333
+ "ceil",
334
+ "round",
335
+ "trunc"
336
+ ],
337
+ "default": "trunc"
338
+ },
339
+ "debugMode": {
340
+ "type": "boolean"
341
+ },
342
+ "mode": {
343
+ "type": "string",
344
+ "enum": [
345
+ "debug",
346
+ "standalone"
347
+ ]
348
+ },
349
+ "largeArraySize": {
350
+ "anyOf": [
351
+ {
352
+ "type": "integer"
353
+ },
354
+ {
355
+ "type": "string"
356
+ }
357
+ ],
358
+ "default": 20000
359
+ },
360
+ "largeArrayMechanism": {
361
+ "type": "string",
362
+ "enum": [
363
+ "default",
364
+ "json-stringify"
365
+ ],
366
+ "default": "default"
367
+ }
368
+ }
369
+ },
370
+ "caseSensitive": {
371
+ "type": "boolean"
372
+ },
373
+ "requestIdHeader": {
374
+ "anyOf": [
375
+ {
376
+ "type": "string"
377
+ },
378
+ {
379
+ "type": "boolean",
380
+ "const": false
381
+ }
382
+ ]
383
+ },
384
+ "requestIdLogLabel": {
385
+ "type": "string"
386
+ },
387
+ "jsonShorthand": {
388
+ "type": "boolean"
389
+ },
390
+ "trustProxy": {
391
+ "anyOf": [
392
+ {
393
+ "type": "boolean"
394
+ },
395
+ {
396
+ "type": "string"
397
+ },
398
+ {
399
+ "type": "array",
400
+ "items": {
401
+ "type": "string"
402
+ }
403
+ },
404
+ {
405
+ "type": "integer"
406
+ }
407
+ ]
408
+ },
409
+ "http2": {
410
+ "type": "boolean"
411
+ },
412
+ "https": {
413
+ "type": "object",
414
+ "properties": {
415
+ "allowHTTP1": {
416
+ "type": "boolean"
417
+ },
418
+ "key": {
419
+ "anyOf": [
420
+ {
421
+ "type": "string"
422
+ },
423
+ {
424
+ "type": "object",
425
+ "properties": {
426
+ "path": {
427
+ "type": "string",
428
+ "resolvePath": true
429
+ }
430
+ },
431
+ "additionalProperties": false
432
+ },
433
+ {
434
+ "type": "array",
435
+ "items": {
436
+ "anyOf": [
437
+ {
438
+ "type": "string"
439
+ },
440
+ {
441
+ "type": "object",
442
+ "properties": {
443
+ "path": {
444
+ "type": "string",
445
+ "resolvePath": true
446
+ }
447
+ },
448
+ "additionalProperties": false
449
+ }
450
+ ]
451
+ }
452
+ }
453
+ ]
454
+ },
455
+ "cert": {
456
+ "anyOf": [
457
+ {
458
+ "type": "string"
459
+ },
460
+ {
461
+ "type": "object",
462
+ "properties": {
463
+ "path": {
464
+ "type": "string",
465
+ "resolvePath": true
466
+ }
467
+ },
468
+ "additionalProperties": false
469
+ },
470
+ {
471
+ "type": "array",
472
+ "items": {
473
+ "anyOf": [
474
+ {
475
+ "type": "string"
476
+ },
477
+ {
478
+ "type": "object",
479
+ "properties": {
480
+ "path": {
481
+ "type": "string",
482
+ "resolvePath": true
483
+ }
484
+ },
485
+ "additionalProperties": false
486
+ }
487
+ ]
488
+ }
489
+ }
490
+ ]
491
+ },
492
+ "requestCert": {
493
+ "type": "boolean"
494
+ },
495
+ "rejectUnauthorized": {
496
+ "type": "boolean"
497
+ }
498
+ },
499
+ "additionalProperties": false,
500
+ "required": [
501
+ "key",
502
+ "cert"
503
+ ]
504
+ },
505
+ "cors": {
506
+ "type": "object",
507
+ "$comment": "See https://github.com/fastify/fastify-cors",
508
+ "properties": {
509
+ "origin": {
510
+ "anyOf": [
511
+ {
512
+ "type": "boolean"
513
+ },
514
+ {
515
+ "type": "string"
516
+ },
517
+ {
518
+ "type": "array",
519
+ "items": {
520
+ "anyOf": [
521
+ {
522
+ "type": "string"
523
+ },
524
+ {
525
+ "type": "object",
526
+ "properties": {
527
+ "regexp": {
528
+ "type": "string"
529
+ }
530
+ },
531
+ "required": [
532
+ "regexp"
533
+ ]
534
+ }
535
+ ]
536
+ }
537
+ },
538
+ {
539
+ "type": "object",
540
+ "properties": {
541
+ "regexp": {
542
+ "type": "string"
543
+ }
544
+ },
545
+ "required": [
546
+ "regexp"
547
+ ]
548
+ }
549
+ ]
550
+ },
551
+ "methods": {
552
+ "type": "array",
553
+ "items": {
554
+ "type": "string"
555
+ }
556
+ },
557
+ "allowedHeaders": {
558
+ "type": "string",
559
+ "description": "Comma separated string of allowed headers."
560
+ },
561
+ "exposedHeaders": {
562
+ "anyOf": [
563
+ {
564
+ "type": "array",
565
+ "items": {
566
+ "type": "string"
567
+ }
568
+ },
569
+ {
570
+ "type": "string",
571
+ "description": "Comma separated string of exposed headers."
572
+ }
573
+ ]
574
+ },
575
+ "credentials": {
576
+ "type": "boolean"
577
+ },
578
+ "maxAge": {
579
+ "type": "integer"
580
+ },
581
+ "preflightContinue": {
582
+ "type": "boolean",
583
+ "default": false
584
+ },
585
+ "optionsSuccessStatus": {
586
+ "type": "integer",
587
+ "default": 204
588
+ },
589
+ "preflight": {
590
+ "type": "boolean",
591
+ "default": true
592
+ },
593
+ "strictPreflight": {
594
+ "type": "boolean",
595
+ "default": true
596
+ },
597
+ "hideOptionsRoute": {
598
+ "type": "boolean",
599
+ "default": true
600
+ }
601
+ },
602
+ "additionalProperties": false
603
+ }
604
+ },
605
+ "additionalProperties": false
606
+ },
607
+ "entrypoint": {
608
+ "type": "string"
609
+ },
610
+ "hotReload": {
611
+ "anyOf": [
612
+ {
613
+ "type": "boolean"
614
+ },
615
+ {
616
+ "type": "string"
617
+ }
618
+ ]
619
+ },
620
+ "allowCycles": {
621
+ "type": "boolean"
622
+ },
623
+ "inspectorOptions": {
624
+ "type": "object",
625
+ "properties": {
626
+ "host": {
627
+ "type": "string"
628
+ },
629
+ "port": {
630
+ "type": "number"
631
+ },
632
+ "breakFirstLine": {
633
+ "type": "boolean"
634
+ },
635
+ "hotReloadDisabled": {
636
+ "type": "boolean"
637
+ }
638
+ }
639
+ },
640
+ "undici": {
641
+ "type": "object",
642
+ "properties": {
643
+ "agentOptions": {
644
+ "type": "object",
645
+ "additionalProperties": true
646
+ },
647
+ "interceptors": {
648
+ "anyOf": [
649
+ {
650
+ "type": "array",
651
+ "items": {
652
+ "$ref": "#/$defs/undiciInterceptor"
653
+ }
654
+ },
655
+ {
656
+ "type": "object",
657
+ "properties": {
658
+ "Client": {
659
+ "type": "array",
660
+ "items": {
661
+ "$ref": "#/$defs/undiciInterceptor"
662
+ }
663
+ },
664
+ "Pool": {
665
+ "type": "array",
666
+ "items": {
667
+ "$ref": "#/$defs/undiciInterceptor"
668
+ }
669
+ },
670
+ "Agent": {
671
+ "type": "array",
672
+ "items": {
673
+ "$ref": "#/$defs/undiciInterceptor"
674
+ }
675
+ }
676
+ }
677
+ }
678
+ ]
679
+ }
680
+ }
681
+ },
682
+ "managementApi": {
683
+ "anyOf": [
684
+ {
685
+ "type": "boolean"
686
+ },
687
+ {
688
+ "type": "string"
689
+ },
690
+ {
691
+ "type": "object",
692
+ "properties": {
693
+ "logs": {
694
+ "maxSize": {
695
+ "type": "number",
696
+ "minimum": 5,
697
+ "default": 200
698
+ }
699
+ }
700
+ },
701
+ "additionalProperties": false
702
+ }
703
+ ],
704
+ "default": true
705
+ },
706
+ "metrics": {
707
+ "anyOf": [
708
+ {
709
+ "type": "boolean"
710
+ },
711
+ {
712
+ "type": "object",
713
+ "properties": {
714
+ "port": {
715
+ "anyOf": [
716
+ {
717
+ "type": "integer"
718
+ },
719
+ {
720
+ "type": "string"
721
+ }
722
+ ]
723
+ },
724
+ "hostname": {
725
+ "type": "string"
726
+ },
727
+ "endpoint": {
728
+ "type": "string"
729
+ },
730
+ "auth": {
731
+ "type": "object",
732
+ "properties": {
733
+ "username": {
734
+ "type": "string"
735
+ },
736
+ "password": {
737
+ "type": "string"
738
+ }
739
+ },
740
+ "additionalProperties": false,
741
+ "required": [
742
+ "username",
743
+ "password"
744
+ ]
745
+ },
746
+ "labels": {
747
+ "type": "object",
748
+ "additionalProperties": {
749
+ "type": "string"
750
+ }
751
+ }
752
+ },
753
+ "additionalProperties": false
754
+ }
755
+ ]
756
+ },
757
+ "restartOnError": {
758
+ "default": true,
759
+ "anyOf": [
760
+ {
761
+ "type": "boolean"
762
+ },
763
+ {
764
+ "type": "string"
765
+ }
766
+ ]
767
+ },
768
+ "services": {
769
+ "type": "array",
770
+ "items": {
771
+ "type": "object",
772
+ "required": [
773
+ "id",
774
+ "path",
775
+ "config"
776
+ ],
777
+ "properties": {
778
+ "id": {
779
+ "type": "string"
780
+ },
781
+ "path": {
782
+ "type": "string",
783
+ "resolvePath": true
784
+ },
785
+ "config": {
786
+ "type": "string"
787
+ },
788
+ "useHttp": {
789
+ "type": "boolean"
790
+ }
791
+ }
792
+ }
793
+ }
794
+ },
795
+ "anyOf": [
796
+ {
797
+ "required": [
798
+ "autoload",
799
+ "entrypoint"
800
+ ]
801
+ },
802
+ {
803
+ "required": [
804
+ "services",
805
+ "entrypoint"
806
+ ]
807
+ }
808
+ ],
809
+ "additionalProperties": false,
810
+ "$defs": {
811
+ "undiciInterceptor": {
812
+ "type": "object",
813
+ "properties": {
814
+ "module": {
815
+ "type": "string"
816
+ },
817
+ "options": {
818
+ "type": "object",
819
+ "additionalProperties": true
820
+ }
821
+ },
822
+ "required": [
823
+ "module",
824
+ "options"
825
+ ]
826
+ }
827
+ }
828
+ }