@platformatic/service 3.4.1 → 3.5.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 (54) hide show
  1. package/LICENSE +1 -1
  2. package/config.d.ts +450 -94
  3. package/eslint.config.js +4 -6
  4. package/index.d.ts +55 -48
  5. package/index.js +44 -179
  6. package/lib/application.js +35 -0
  7. package/lib/capability.js +281 -0
  8. package/lib/compile.js +2 -52
  9. package/lib/generator.js +426 -0
  10. package/lib/plugins/cors.js +5 -8
  11. package/lib/plugins/graphql.js +16 -14
  12. package/lib/plugins/health-check.js +6 -8
  13. package/lib/plugins/openapi.js +43 -32
  14. package/lib/plugins/plugins.js +6 -53
  15. package/lib/{root-endpoint/index.js → plugins/root.js} +9 -8
  16. package/lib/plugins/sandbox-wrapper.js +65 -63
  17. package/lib/schema.js +1075 -203
  18. package/lib/upgrade.js +6 -8
  19. package/lib/utils.js +30 -83
  20. package/lib/versions/0.16.0.js +14 -15
  21. package/lib/versions/{from-zero-twenty-eight-to-will-see.js → 0.28.0.js} +3 -6
  22. package/lib/versions/2.0.0.js +4 -7
  23. package/lib/versions/3.0.0.js +14 -0
  24. package/package.json +28 -36
  25. package/schema.json +1452 -165
  26. package/tsconfig.json +16 -6
  27. package/.c8rc +0 -6
  28. package/help/compile.txt +0 -19
  29. package/help/create.txt +0 -11
  30. package/help/help.txt +0 -8
  31. package/help/schema.txt +0 -9
  32. package/help/start.txt +0 -23
  33. package/index.test-d.ts +0 -107
  34. package/lib/create.mjs +0 -85
  35. package/lib/gen-schema.js +0 -15
  36. package/lib/gen-types.mjs +0 -38
  37. package/lib/generator/README.md +0 -31
  38. package/lib/generator/service-generator.d.ts +0 -11
  39. package/lib/generator/service-generator.js +0 -126
  40. package/lib/openapi-schema-defs.js +0 -1108
  41. package/lib/plugins/clients.js +0 -16
  42. package/lib/plugins/metrics.js +0 -244
  43. package/lib/plugins/typescript.js +0 -20
  44. package/lib/stackable.js +0 -306
  45. package/lib/start.js +0 -175
  46. package/service.mjs +0 -71
  47. /package/{lib/root-endpoint/public → public}/images/dark_mode.svg +0 -0
  48. /package/{lib/root-endpoint/public → public}/images/favicon.ico +0 -0
  49. /package/{lib/root-endpoint/public → public}/images/light_mode.svg +0 -0
  50. /package/{lib/root-endpoint/public → public}/images/platformatic-logo-dark.svg +0 -0
  51. /package/{lib/root-endpoint/public → public}/images/platformatic-logo-light.svg +0 -0
  52. /package/{lib/root-endpoint/public → public}/images/triangle_dark.svg +0 -0
  53. /package/{lib/root-endpoint/public → public}/images/triangle_light.svg +0 -0
  54. /package/{lib/root-endpoint/public → public}/index.html +0 -0
package/schema.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/service/3.4.1.json",
3
- "version": "3.4.1",
4
- "title": "Platformatic Service",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/service/3.5.0.json",
3
+ "version": "3.5.0",
4
+ "title": "Platformatic Service Config",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "basePath": {
@@ -139,17 +139,25 @@
139
139
  "type": "object",
140
140
  "properties": {
141
141
  "target": {
142
- "type": "string",
143
- "resolveModule": true
142
+ "anyOf": [
143
+ {
144
+ "type": "string",
145
+ "resolveModule": true
146
+ },
147
+ {
148
+ "type": "string",
149
+ "resolvePath": true
150
+ }
151
+ ]
144
152
  },
145
153
  "options": {
146
154
  "type": "object"
147
155
  },
148
156
  "level": {
149
157
  "type": "string"
150
- },
151
- "additionalProperties": false
152
- }
158
+ }
159
+ },
160
+ "additionalProperties": false
153
161
  }
154
162
  },
155
163
  "options": {
@@ -172,6 +180,64 @@
172
180
  }
173
181
  },
174
182
  "additionalProperties": false
183
+ },
184
+ "formatters": {
185
+ "type": "object",
186
+ "properties": {
187
+ "path": {
188
+ "type": "string",
189
+ "resolvePath": true
190
+ }
191
+ },
192
+ "required": [
193
+ "path"
194
+ ],
195
+ "additionalProperties": false
196
+ },
197
+ "timestamp": {
198
+ "enum": [
199
+ "epochTime",
200
+ "unixTime",
201
+ "nullTime",
202
+ "isoTime"
203
+ ]
204
+ },
205
+ "redact": {
206
+ "type": "object",
207
+ "properties": {
208
+ "paths": {
209
+ "type": "array",
210
+ "items": {
211
+ "type": "string"
212
+ }
213
+ },
214
+ "censor": {
215
+ "type": "string",
216
+ "default": "[redacted]"
217
+ }
218
+ },
219
+ "required": [
220
+ "paths"
221
+ ],
222
+ "additionalProperties": false
223
+ },
224
+ "base": {
225
+ "anyOf": [
226
+ {
227
+ "type": "object",
228
+ "additionalProperties": true
229
+ },
230
+ {
231
+ "type": "null"
232
+ }
233
+ ]
234
+ },
235
+ "messageKey": {
236
+ "type": "string"
237
+ },
238
+ "customLevels": {
239
+ "type": "object",
240
+ "additionalProperties": true
175
241
  }
176
242
  },
177
243
  "required": [
@@ -563,45 +629,6 @@
563
629
  }
564
630
  ]
565
631
  }
566
- },
567
- "typescript": {
568
- "anyOf": [
569
- {
570
- "type": "object",
571
- "properties": {
572
- "enabled": {
573
- "anyOf": [
574
- {
575
- "type": "boolean"
576
- },
577
- {
578
- "type": "string"
579
- }
580
- ]
581
- },
582
- "tsConfig": {
583
- "type": "string",
584
- "resolvePath": true
585
- },
586
- "outDir": {
587
- "type": "string",
588
- "resolvePath": true
589
- },
590
- "flags": {
591
- "type": "array",
592
- "items": {
593
- "type": "string"
594
- }
595
- }
596
- }
597
- },
598
- {
599
- "type": "boolean"
600
- },
601
- {
602
- "type": "string"
603
- }
604
- ]
605
632
  }
606
633
  },
607
634
  "additionalProperties": false,
@@ -618,88 +645,26 @@
618
645
  }
619
646
  ]
620
647
  },
621
- "metrics": {
622
- "anyOf": [
623
- {
624
- "type": "boolean"
625
- },
626
- {
627
- "type": "object",
628
- "properties": {
629
- "port": {
630
- "anyOf": [
631
- {
632
- "type": "integer"
633
- },
634
- {
635
- "type": "string"
636
- }
637
- ]
638
- },
639
- "hostname": {
640
- "type": "string"
641
- },
642
- "endpoint": {
643
- "type": "string"
644
- },
645
- "server": {
646
- "type": "string",
647
- "enum": [
648
- "own",
649
- "parent",
650
- "hide"
651
- ]
652
- },
653
- "defaultMetrics": {
654
- "type": "object",
655
- "properties": {
656
- "enabled": {
657
- "type": "boolean"
658
- }
659
- },
660
- "required": [
661
- "enabled"
662
- ],
663
- "additionalProperties": false
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
- },
688
- "additionalProperties": false
689
- }
690
- ]
691
- },
692
648
  "telemetry": {
693
- "$id": "/OpenTelemetry",
694
649
  "type": "object",
695
650
  "properties": {
696
- "serviceName": {
651
+ "enabled": {
652
+ "anyOf": [
653
+ {
654
+ "type": "boolean"
655
+ },
656
+ {
657
+ "type": "string"
658
+ }
659
+ ]
660
+ },
661
+ "applicationName": {
697
662
  "type": "string",
698
- "description": "The name of the service. Defaults to the folder name if not specified."
663
+ "description": "The name of the application. Defaults to the folder name if not specified."
699
664
  },
700
665
  "version": {
701
666
  "type": "string",
702
- "description": "The version of the service (optional)"
667
+ "description": "The version of the application (optional)"
703
668
  },
704
669
  "skip": {
705
670
  "type": "array",
@@ -740,7 +705,8 @@
740
705
  "console",
741
706
  "otlp",
742
707
  "zipkin",
743
- "memory"
708
+ "memory",
709
+ "file"
744
710
  ],
745
711
  "default": "console"
746
712
  },
@@ -755,6 +721,10 @@
755
721
  "headers": {
756
722
  "type": "object",
757
723
  "description": "Headers to send to the exporter. Not used for console or memory exporters."
724
+ },
725
+ "path": {
726
+ "type": "string",
727
+ "description": "The path to write the traces to. Only for file exporter."
758
728
  }
759
729
  }
760
730
  },
@@ -771,7 +741,8 @@
771
741
  "console",
772
742
  "otlp",
773
743
  "zipkin",
774
- "memory"
744
+ "memory",
745
+ "file"
775
746
  ],
776
747
  "default": "console"
777
748
  },
@@ -786,6 +757,10 @@
786
757
  "headers": {
787
758
  "type": "object",
788
759
  "description": "Headers to send to the exporter. Not used for console or memory exporters."
760
+ },
761
+ "path": {
762
+ "type": "string",
763
+ "description": "The path to write the traces to. Only for file exporter."
789
764
  }
790
765
  }
791
766
  },
@@ -796,7 +771,7 @@
796
771
  }
797
772
  },
798
773
  "required": [
799
- "serviceName"
774
+ "applicationName"
800
775
  ],
801
776
  "additionalProperties": false
802
777
  },
@@ -850,6 +825,13 @@
850
825
  "module": {
851
826
  "type": "string"
852
827
  },
828
+ "application": {
829
+ "type": "object",
830
+ "properties": {},
831
+ "additionalProperties": false,
832
+ "required": [],
833
+ "default": {}
834
+ },
853
835
  "service": {
854
836
  "type": "object",
855
837
  "properties": {
@@ -935,51 +917,1356 @@
935
917
  "type": "boolean"
936
918
  }
937
919
  ]
920
+ },
921
+ "proxy": {
922
+ "anyOf": [
923
+ {
924
+ "type": "boolean",
925
+ "const": false
926
+ },
927
+ {
928
+ "type": "object",
929
+ "properties": {
930
+ "upstream": {
931
+ "type": "string"
932
+ },
933
+ "prefix": {
934
+ "type": "string"
935
+ },
936
+ "hostname": {
937
+ "type": "string"
938
+ },
939
+ "ws": {
940
+ "type": "object",
941
+ "properties": {
942
+ "upstream": {
943
+ "type": "string"
944
+ },
945
+ "reconnect": {
946
+ "type": "object",
947
+ "properties": {
948
+ "pingInterval": {
949
+ "type": "number"
950
+ },
951
+ "maxReconnectionRetries": {
952
+ "type": "number"
953
+ },
954
+ "reconnectInterval": {
955
+ "type": "number"
956
+ },
957
+ "reconnectDecay": {
958
+ "type": "number"
959
+ },
960
+ "connectionTimeout": {
961
+ "type": "number"
962
+ },
963
+ "reconnectOnClose": {
964
+ "type": "boolean"
965
+ },
966
+ "logs": {
967
+ "type": "boolean"
968
+ }
969
+ }
970
+ },
971
+ "hooks": {
972
+ "type": "object",
973
+ "properties": {
974
+ "path": {
975
+ "type": "string"
976
+ }
977
+ },
978
+ "required": [
979
+ "path"
980
+ ],
981
+ "additionalProperties": false
982
+ }
983
+ },
984
+ "required": [],
985
+ "additionalProperties": false
986
+ }
987
+ },
988
+ "required": [],
989
+ "additionalProperties": false
990
+ }
991
+ ]
938
992
  }
939
993
  },
940
994
  "additionalProperties": false
941
995
  },
942
- "clients": {
943
- "type": "array",
944
- "items": {
945
- "type": "object",
946
- "properties": {
947
- "serviceId": {
948
- "type": "string"
949
- },
950
- "name": {
951
- "type": "string"
952
- },
953
- "type": {
954
- "type": "string",
955
- "enum": [
956
- "openapi",
957
- "graphql"
958
- ]
959
- },
960
- "path": {
961
- "type": "string",
962
- "resolvePath": true
963
- },
964
- "schema": {
965
- "type": "string",
966
- "resolvePath": true
967
- },
968
- "url": {
969
- "type": "string"
970
- },
971
- "fullResponse": {
972
- "type": "boolean"
973
- },
974
- "fullRequest": {
975
- "type": "boolean"
976
- },
977
- "validateResponse": {
978
- "type": "boolean"
979
- }
996
+ "runtime": {
997
+ "type": "object",
998
+ "properties": {
999
+ "preload": {
1000
+ "anyOf": [
1001
+ {
1002
+ "type": "string",
1003
+ "resolvePath": true
1004
+ },
1005
+ {
1006
+ "type": "array",
1007
+ "items": {
1008
+ "type": "string",
1009
+ "resolvePath": true
1010
+ }
1011
+ }
1012
+ ]
980
1013
  },
981
- "additionalProperties": false
982
- }
1014
+ "basePath": {
1015
+ "type": "string"
1016
+ },
1017
+ "services": {
1018
+ "type": "array",
1019
+ "items": {
1020
+ "type": "object",
1021
+ "anyOf": [
1022
+ {
1023
+ "required": [
1024
+ "id",
1025
+ "path"
1026
+ ]
1027
+ },
1028
+ {
1029
+ "required": [
1030
+ "id",
1031
+ "url"
1032
+ ]
1033
+ }
1034
+ ],
1035
+ "properties": {
1036
+ "id": {
1037
+ "type": "string"
1038
+ },
1039
+ "path": {
1040
+ "type": "string",
1041
+ "allowEmptyPaths": true,
1042
+ "resolvePath": true
1043
+ },
1044
+ "config": {
1045
+ "type": "string"
1046
+ },
1047
+ "url": {
1048
+ "type": "string"
1049
+ },
1050
+ "gitBranch": {
1051
+ "type": "string",
1052
+ "default": "main"
1053
+ },
1054
+ "useHttp": {
1055
+ "type": "boolean"
1056
+ },
1057
+ "workers": {
1058
+ "anyOf": [
1059
+ {
1060
+ "type": "number",
1061
+ "minimum": 1
1062
+ },
1063
+ {
1064
+ "type": "string"
1065
+ }
1066
+ ]
1067
+ },
1068
+ "health": {
1069
+ "type": "object",
1070
+ "default": {},
1071
+ "properties": {
1072
+ "enabled": {
1073
+ "anyOf": [
1074
+ {
1075
+ "type": "boolean"
1076
+ },
1077
+ {
1078
+ "type": "string"
1079
+ }
1080
+ ]
1081
+ },
1082
+ "interval": {
1083
+ "anyOf": [
1084
+ {
1085
+ "type": "number",
1086
+ "minimum": 0
1087
+ },
1088
+ {
1089
+ "type": "string"
1090
+ }
1091
+ ]
1092
+ },
1093
+ "gracePeriod": {
1094
+ "anyOf": [
1095
+ {
1096
+ "type": "number",
1097
+ "minimum": 0
1098
+ },
1099
+ {
1100
+ "type": "string"
1101
+ }
1102
+ ]
1103
+ },
1104
+ "maxUnhealthyChecks": {
1105
+ "anyOf": [
1106
+ {
1107
+ "type": "number",
1108
+ "minimum": 1
1109
+ },
1110
+ {
1111
+ "type": "string"
1112
+ }
1113
+ ]
1114
+ },
1115
+ "maxELU": {
1116
+ "anyOf": [
1117
+ {
1118
+ "type": "number",
1119
+ "minimum": 0,
1120
+ "maximum": 1
1121
+ },
1122
+ {
1123
+ "type": "string"
1124
+ }
1125
+ ]
1126
+ },
1127
+ "maxHeapUsed": {
1128
+ "anyOf": [
1129
+ {
1130
+ "type": "number",
1131
+ "minimum": 0,
1132
+ "maximum": 1
1133
+ },
1134
+ {
1135
+ "type": "string"
1136
+ }
1137
+ ]
1138
+ },
1139
+ "maxHeapTotal": {
1140
+ "anyOf": [
1141
+ {
1142
+ "type": "number",
1143
+ "minimum": 0
1144
+ },
1145
+ {
1146
+ "type": "string"
1147
+ }
1148
+ ]
1149
+ },
1150
+ "maxYoungGeneration": {
1151
+ "anyOf": [
1152
+ {
1153
+ "type": "number",
1154
+ "minimum": 0
1155
+ },
1156
+ {
1157
+ "type": "string"
1158
+ }
1159
+ ]
1160
+ }
1161
+ },
1162
+ "additionalProperties": false
1163
+ },
1164
+ "dependencies": {
1165
+ "type": "array",
1166
+ "items": {
1167
+ "type": "string"
1168
+ },
1169
+ "default": []
1170
+ },
1171
+ "arguments": {
1172
+ "type": "array",
1173
+ "items": {
1174
+ "type": "string"
1175
+ }
1176
+ },
1177
+ "env": {
1178
+ "type": "object",
1179
+ "additionalProperties": {
1180
+ "type": "string"
1181
+ }
1182
+ },
1183
+ "envfile": {
1184
+ "type": "string"
1185
+ },
1186
+ "sourceMaps": {
1187
+ "type": "boolean",
1188
+ "default": false
1189
+ },
1190
+ "packageManager": {
1191
+ "type": "string",
1192
+ "enum": [
1193
+ "npm",
1194
+ "pnpm",
1195
+ "yarn"
1196
+ ]
1197
+ },
1198
+ "preload": {
1199
+ "anyOf": [
1200
+ {
1201
+ "type": "string",
1202
+ "resolvePath": true
1203
+ },
1204
+ {
1205
+ "type": "array",
1206
+ "items": {
1207
+ "type": "string",
1208
+ "resolvePath": true
1209
+ }
1210
+ }
1211
+ ]
1212
+ },
1213
+ "nodeOptions": {
1214
+ "type": "string"
1215
+ },
1216
+ "telemetry": {
1217
+ "type": "object",
1218
+ "properties": {
1219
+ "instrumentations": {
1220
+ "type": "array",
1221
+ "description": "An array of instrumentations loaded if telemetry is enabled",
1222
+ "items": {
1223
+ "oneOf": [
1224
+ {
1225
+ "type": "string"
1226
+ },
1227
+ {
1228
+ "type": "object",
1229
+ "properties": {
1230
+ "package": {
1231
+ "type": "string"
1232
+ },
1233
+ "exportName": {
1234
+ "type": "string"
1235
+ },
1236
+ "options": {
1237
+ "type": "object",
1238
+ "additionalProperties": true
1239
+ }
1240
+ },
1241
+ "required": [
1242
+ "package"
1243
+ ]
1244
+ }
1245
+ ]
1246
+ }
1247
+ }
1248
+ }
1249
+ }
1250
+ }
1251
+ }
1252
+ },
1253
+ "workers": {
1254
+ "anyOf": [
1255
+ {
1256
+ "type": "number",
1257
+ "minimum": 1
1258
+ },
1259
+ {
1260
+ "type": "string"
1261
+ }
1262
+ ],
1263
+ "default": 1
1264
+ },
1265
+ "logger": {
1266
+ "type": "object",
1267
+ "properties": {
1268
+ "level": {
1269
+ "type": "string",
1270
+ "default": "info",
1271
+ "oneOf": [
1272
+ {
1273
+ "enum": [
1274
+ "fatal",
1275
+ "error",
1276
+ "warn",
1277
+ "info",
1278
+ "debug",
1279
+ "trace",
1280
+ "silent"
1281
+ ]
1282
+ },
1283
+ {
1284
+ "pattern": "^\\{.+\\}$"
1285
+ }
1286
+ ]
1287
+ },
1288
+ "transport": {
1289
+ "anyOf": [
1290
+ {
1291
+ "type": "object",
1292
+ "properties": {
1293
+ "target": {
1294
+ "type": "string",
1295
+ "resolveModule": true
1296
+ },
1297
+ "options": {
1298
+ "type": "object"
1299
+ }
1300
+ },
1301
+ "additionalProperties": false
1302
+ },
1303
+ {
1304
+ "type": "object",
1305
+ "properties": {
1306
+ "targets": {
1307
+ "type": "array",
1308
+ "items": {
1309
+ "type": "object",
1310
+ "properties": {
1311
+ "target": {
1312
+ "anyOf": [
1313
+ {
1314
+ "type": "string",
1315
+ "resolveModule": true
1316
+ },
1317
+ {
1318
+ "type": "string",
1319
+ "resolvePath": true
1320
+ }
1321
+ ]
1322
+ },
1323
+ "options": {
1324
+ "type": "object"
1325
+ },
1326
+ "level": {
1327
+ "type": "string"
1328
+ }
1329
+ },
1330
+ "additionalProperties": false
1331
+ }
1332
+ },
1333
+ "options": {
1334
+ "type": "object"
1335
+ }
1336
+ },
1337
+ "additionalProperties": false
1338
+ }
1339
+ ]
1340
+ },
1341
+ "pipeline": {
1342
+ "type": "object",
1343
+ "properties": {
1344
+ "target": {
1345
+ "type": "string",
1346
+ "resolveModule": true
1347
+ },
1348
+ "options": {
1349
+ "type": "object"
1350
+ }
1351
+ },
1352
+ "additionalProperties": false
1353
+ },
1354
+ "formatters": {
1355
+ "type": "object",
1356
+ "properties": {
1357
+ "path": {
1358
+ "type": "string",
1359
+ "resolvePath": true
1360
+ }
1361
+ },
1362
+ "required": [
1363
+ "path"
1364
+ ],
1365
+ "additionalProperties": false
1366
+ },
1367
+ "timestamp": {
1368
+ "enum": [
1369
+ "epochTime",
1370
+ "unixTime",
1371
+ "nullTime",
1372
+ "isoTime"
1373
+ ]
1374
+ },
1375
+ "redact": {
1376
+ "type": "object",
1377
+ "properties": {
1378
+ "paths": {
1379
+ "type": "array",
1380
+ "items": {
1381
+ "type": "string"
1382
+ }
1383
+ },
1384
+ "censor": {
1385
+ "type": "string",
1386
+ "default": "[redacted]"
1387
+ }
1388
+ },
1389
+ "required": [
1390
+ "paths"
1391
+ ],
1392
+ "additionalProperties": false
1393
+ },
1394
+ "base": {
1395
+ "anyOf": [
1396
+ {
1397
+ "type": "object",
1398
+ "additionalProperties": true
1399
+ },
1400
+ {
1401
+ "type": "null"
1402
+ }
1403
+ ]
1404
+ },
1405
+ "messageKey": {
1406
+ "type": "string"
1407
+ },
1408
+ "customLevels": {
1409
+ "type": "object",
1410
+ "additionalProperties": true
1411
+ }
1412
+ },
1413
+ "required": [
1414
+ "level"
1415
+ ],
1416
+ "default": {},
1417
+ "additionalProperties": true
1418
+ },
1419
+ "server": {
1420
+ "type": "object",
1421
+ "properties": {
1422
+ "hostname": {
1423
+ "type": "string",
1424
+ "default": "127.0.0.1"
1425
+ },
1426
+ "port": {
1427
+ "anyOf": [
1428
+ {
1429
+ "type": "integer"
1430
+ },
1431
+ {
1432
+ "type": "string"
1433
+ }
1434
+ ]
1435
+ },
1436
+ "http2": {
1437
+ "type": "boolean"
1438
+ },
1439
+ "https": {
1440
+ "type": "object",
1441
+ "properties": {
1442
+ "allowHTTP1": {
1443
+ "type": "boolean"
1444
+ },
1445
+ "key": {
1446
+ "anyOf": [
1447
+ {
1448
+ "type": "string"
1449
+ },
1450
+ {
1451
+ "type": "object",
1452
+ "properties": {
1453
+ "path": {
1454
+ "type": "string",
1455
+ "resolvePath": true
1456
+ }
1457
+ },
1458
+ "additionalProperties": false
1459
+ },
1460
+ {
1461
+ "type": "array",
1462
+ "items": {
1463
+ "anyOf": [
1464
+ {
1465
+ "type": "string"
1466
+ },
1467
+ {
1468
+ "type": "object",
1469
+ "properties": {
1470
+ "path": {
1471
+ "type": "string",
1472
+ "resolvePath": true
1473
+ }
1474
+ },
1475
+ "additionalProperties": false
1476
+ }
1477
+ ]
1478
+ }
1479
+ }
1480
+ ]
1481
+ },
1482
+ "cert": {
1483
+ "anyOf": [
1484
+ {
1485
+ "type": "string"
1486
+ },
1487
+ {
1488
+ "type": "object",
1489
+ "properties": {
1490
+ "path": {
1491
+ "type": "string",
1492
+ "resolvePath": true
1493
+ }
1494
+ },
1495
+ "additionalProperties": false
1496
+ },
1497
+ {
1498
+ "type": "array",
1499
+ "items": {
1500
+ "anyOf": [
1501
+ {
1502
+ "type": "string"
1503
+ },
1504
+ {
1505
+ "type": "object",
1506
+ "properties": {
1507
+ "path": {
1508
+ "type": "string",
1509
+ "resolvePath": true
1510
+ }
1511
+ },
1512
+ "additionalProperties": false
1513
+ }
1514
+ ]
1515
+ }
1516
+ }
1517
+ ]
1518
+ },
1519
+ "requestCert": {
1520
+ "type": "boolean"
1521
+ },
1522
+ "rejectUnauthorized": {
1523
+ "type": "boolean"
1524
+ }
1525
+ },
1526
+ "additionalProperties": false,
1527
+ "required": [
1528
+ "key",
1529
+ "cert"
1530
+ ]
1531
+ }
1532
+ },
1533
+ "additionalProperties": false
1534
+ },
1535
+ "startTimeout": {
1536
+ "default": 30000,
1537
+ "type": "number",
1538
+ "minimum": 0
1539
+ },
1540
+ "restartOnError": {
1541
+ "default": true,
1542
+ "anyOf": [
1543
+ {
1544
+ "type": "boolean"
1545
+ },
1546
+ {
1547
+ "type": "number",
1548
+ "minimum": 0
1549
+ }
1550
+ ]
1551
+ },
1552
+ "exitOnUnhandledErrors": {
1553
+ "default": true,
1554
+ "type": "boolean"
1555
+ },
1556
+ "gracefulShutdown": {
1557
+ "type": "object",
1558
+ "properties": {
1559
+ "runtime": {
1560
+ "anyOf": [
1561
+ {
1562
+ "type": "number",
1563
+ "minimum": 1
1564
+ },
1565
+ {
1566
+ "type": "string"
1567
+ }
1568
+ ],
1569
+ "default": 10000
1570
+ },
1571
+ "application": {
1572
+ "anyOf": [
1573
+ {
1574
+ "type": "number",
1575
+ "minimum": 1
1576
+ },
1577
+ {
1578
+ "type": "string"
1579
+ }
1580
+ ],
1581
+ "default": 10000
1582
+ }
1583
+ },
1584
+ "default": {},
1585
+ "required": [
1586
+ "runtime",
1587
+ "application"
1588
+ ],
1589
+ "additionalProperties": false
1590
+ },
1591
+ "health": {
1592
+ "type": "object",
1593
+ "default": {},
1594
+ "properties": {
1595
+ "enabled": {
1596
+ "anyOf": [
1597
+ {
1598
+ "type": "boolean"
1599
+ },
1600
+ {
1601
+ "type": "string"
1602
+ }
1603
+ ],
1604
+ "default": true
1605
+ },
1606
+ "interval": {
1607
+ "anyOf": [
1608
+ {
1609
+ "type": "number",
1610
+ "minimum": 0
1611
+ },
1612
+ {
1613
+ "type": "string"
1614
+ }
1615
+ ],
1616
+ "default": 30000
1617
+ },
1618
+ "gracePeriod": {
1619
+ "anyOf": [
1620
+ {
1621
+ "type": "number",
1622
+ "minimum": 0
1623
+ },
1624
+ {
1625
+ "type": "string"
1626
+ }
1627
+ ],
1628
+ "default": 30000
1629
+ },
1630
+ "maxUnhealthyChecks": {
1631
+ "anyOf": [
1632
+ {
1633
+ "type": "number",
1634
+ "minimum": 1
1635
+ },
1636
+ {
1637
+ "type": "string"
1638
+ }
1639
+ ],
1640
+ "default": 10
1641
+ },
1642
+ "maxELU": {
1643
+ "anyOf": [
1644
+ {
1645
+ "type": "number",
1646
+ "minimum": 0,
1647
+ "maximum": 1
1648
+ },
1649
+ {
1650
+ "type": "string"
1651
+ }
1652
+ ],
1653
+ "default": 0.99
1654
+ },
1655
+ "maxHeapUsed": {
1656
+ "anyOf": [
1657
+ {
1658
+ "type": "number",
1659
+ "minimum": 0,
1660
+ "maximum": 1
1661
+ },
1662
+ {
1663
+ "type": "string"
1664
+ }
1665
+ ],
1666
+ "default": 0.99
1667
+ },
1668
+ "maxHeapTotal": {
1669
+ "anyOf": [
1670
+ {
1671
+ "type": "number",
1672
+ "minimum": 0
1673
+ },
1674
+ {
1675
+ "type": "string"
1676
+ }
1677
+ ],
1678
+ "default": 4294967296
1679
+ },
1680
+ "maxYoungGeneration": {
1681
+ "anyOf": [
1682
+ {
1683
+ "type": "number",
1684
+ "minimum": 0
1685
+ },
1686
+ {
1687
+ "type": "string"
1688
+ }
1689
+ ]
1690
+ }
1691
+ },
1692
+ "additionalProperties": false
1693
+ },
1694
+ "undici": {
1695
+ "type": "object",
1696
+ "properties": {
1697
+ "agentOptions": {
1698
+ "type": "object",
1699
+ "additionalProperties": true
1700
+ },
1701
+ "interceptors": {
1702
+ "anyOf": [
1703
+ {
1704
+ "type": "array",
1705
+ "items": {
1706
+ "type": "object",
1707
+ "properties": {
1708
+ "module": {
1709
+ "type": "string"
1710
+ },
1711
+ "options": {
1712
+ "type": "object",
1713
+ "additionalProperties": true
1714
+ }
1715
+ },
1716
+ "required": [
1717
+ "module",
1718
+ "options"
1719
+ ]
1720
+ }
1721
+ },
1722
+ {
1723
+ "type": "object",
1724
+ "properties": {
1725
+ "Client": {
1726
+ "type": "array",
1727
+ "items": {
1728
+ "type": "object",
1729
+ "properties": {
1730
+ "module": {
1731
+ "type": "string"
1732
+ },
1733
+ "options": {
1734
+ "type": "object",
1735
+ "additionalProperties": true
1736
+ }
1737
+ },
1738
+ "required": [
1739
+ "module",
1740
+ "options"
1741
+ ]
1742
+ }
1743
+ },
1744
+ "Pool": {
1745
+ "type": "array",
1746
+ "items": {
1747
+ "type": "object",
1748
+ "properties": {
1749
+ "module": {
1750
+ "type": "string"
1751
+ },
1752
+ "options": {
1753
+ "type": "object",
1754
+ "additionalProperties": true
1755
+ }
1756
+ },
1757
+ "required": [
1758
+ "module",
1759
+ "options"
1760
+ ]
1761
+ }
1762
+ },
1763
+ "Agent": {
1764
+ "type": "array",
1765
+ "items": {
1766
+ "type": "object",
1767
+ "properties": {
1768
+ "module": {
1769
+ "type": "string"
1770
+ },
1771
+ "options": {
1772
+ "type": "object",
1773
+ "additionalProperties": true
1774
+ }
1775
+ },
1776
+ "required": [
1777
+ "module",
1778
+ "options"
1779
+ ]
1780
+ }
1781
+ }
1782
+ }
1783
+ }
1784
+ ]
1785
+ }
1786
+ }
1787
+ },
1788
+ "httpCache": {
1789
+ "oneOf": [
1790
+ {
1791
+ "type": "boolean"
1792
+ },
1793
+ {
1794
+ "type": "object",
1795
+ "properties": {
1796
+ "store": {
1797
+ "type": "string"
1798
+ },
1799
+ "methods": {
1800
+ "type": "array",
1801
+ "items": {
1802
+ "type": "string"
1803
+ },
1804
+ "default": [
1805
+ "GET",
1806
+ "HEAD"
1807
+ ],
1808
+ "minItems": 1
1809
+ },
1810
+ "cacheTagsHeader": {
1811
+ "type": "string"
1812
+ },
1813
+ "maxSize": {
1814
+ "type": "integer"
1815
+ },
1816
+ "maxEntrySize": {
1817
+ "type": "integer"
1818
+ },
1819
+ "maxCount": {
1820
+ "type": "integer"
1821
+ }
1822
+ }
1823
+ }
1824
+ ]
1825
+ },
1826
+ "watch": {
1827
+ "anyOf": [
1828
+ {
1829
+ "type": "boolean"
1830
+ },
1831
+ {
1832
+ "type": "string"
1833
+ }
1834
+ ]
1835
+ },
1836
+ "managementApi": {
1837
+ "anyOf": [
1838
+ {
1839
+ "type": "boolean"
1840
+ },
1841
+ {
1842
+ "type": "string"
1843
+ },
1844
+ {
1845
+ "type": "object",
1846
+ "properties": {
1847
+ "logs": {
1848
+ "type": "object",
1849
+ "properties": {
1850
+ "maxSize": {
1851
+ "type": "number",
1852
+ "minimum": 5,
1853
+ "default": 200
1854
+ }
1855
+ },
1856
+ "additionalProperties": false
1857
+ }
1858
+ },
1859
+ "additionalProperties": false
1860
+ }
1861
+ ],
1862
+ "default": true
1863
+ },
1864
+ "metrics": {
1865
+ "anyOf": [
1866
+ {
1867
+ "type": "boolean"
1868
+ },
1869
+ {
1870
+ "type": "object",
1871
+ "properties": {
1872
+ "port": {
1873
+ "anyOf": [
1874
+ {
1875
+ "type": "integer"
1876
+ },
1877
+ {
1878
+ "type": "string"
1879
+ }
1880
+ ]
1881
+ },
1882
+ "enabled": {
1883
+ "anyOf": [
1884
+ {
1885
+ "type": "boolean"
1886
+ },
1887
+ {
1888
+ "type": "string"
1889
+ }
1890
+ ]
1891
+ },
1892
+ "hostname": {
1893
+ "type": "string"
1894
+ },
1895
+ "endpoint": {
1896
+ "type": "string"
1897
+ },
1898
+ "auth": {
1899
+ "type": "object",
1900
+ "properties": {
1901
+ "username": {
1902
+ "type": "string"
1903
+ },
1904
+ "password": {
1905
+ "type": "string"
1906
+ }
1907
+ },
1908
+ "additionalProperties": false,
1909
+ "required": [
1910
+ "username",
1911
+ "password"
1912
+ ]
1913
+ },
1914
+ "labels": {
1915
+ "type": "object",
1916
+ "additionalProperties": {
1917
+ "type": "string"
1918
+ }
1919
+ },
1920
+ "applicationLabel": {
1921
+ "type": "string",
1922
+ "default": "applicationId",
1923
+ "description": "The label name to use for the application identifier in metrics (e.g., applicationId, serviceId)"
1924
+ },
1925
+ "readiness": {
1926
+ "anyOf": [
1927
+ {
1928
+ "type": "boolean"
1929
+ },
1930
+ {
1931
+ "type": "object",
1932
+ "properties": {
1933
+ "endpoint": {
1934
+ "type": "string"
1935
+ },
1936
+ "success": {
1937
+ "type": "object",
1938
+ "properties": {
1939
+ "statusCode": {
1940
+ "type": "number"
1941
+ },
1942
+ "body": {
1943
+ "type": "string"
1944
+ }
1945
+ },
1946
+ "additionalProperties": false
1947
+ },
1948
+ "fail": {
1949
+ "type": "object",
1950
+ "properties": {
1951
+ "statusCode": {
1952
+ "type": "number"
1953
+ },
1954
+ "body": {
1955
+ "type": "string"
1956
+ }
1957
+ },
1958
+ "additionalProperties": false
1959
+ }
1960
+ },
1961
+ "additionalProperties": false
1962
+ }
1963
+ ]
1964
+ },
1965
+ "liveness": {
1966
+ "anyOf": [
1967
+ {
1968
+ "type": "boolean"
1969
+ },
1970
+ {
1971
+ "type": "object",
1972
+ "properties": {
1973
+ "endpoint": {
1974
+ "type": "string"
1975
+ },
1976
+ "success": {
1977
+ "type": "object",
1978
+ "properties": {
1979
+ "statusCode": {
1980
+ "type": "number"
1981
+ },
1982
+ "body": {
1983
+ "type": "string"
1984
+ }
1985
+ },
1986
+ "additionalProperties": false
1987
+ },
1988
+ "fail": {
1989
+ "type": "object",
1990
+ "properties": {
1991
+ "statusCode": {
1992
+ "type": "number"
1993
+ },
1994
+ "body": {
1995
+ "type": "string"
1996
+ }
1997
+ },
1998
+ "additionalProperties": false
1999
+ }
2000
+ },
2001
+ "additionalProperties": false
2002
+ }
2003
+ ]
2004
+ },
2005
+ "plugins": {
2006
+ "type": "array",
2007
+ "items": {
2008
+ "anyOf": [
2009
+ {
2010
+ "type": "string",
2011
+ "resolvePath": true
2012
+ }
2013
+ ]
2014
+ }
2015
+ }
2016
+ },
2017
+ "additionalProperties": false
2018
+ }
2019
+ ]
2020
+ },
2021
+ "telemetry": {
2022
+ "type": "object",
2023
+ "properties": {
2024
+ "enabled": {
2025
+ "anyOf": [
2026
+ {
2027
+ "type": "boolean"
2028
+ },
2029
+ {
2030
+ "type": "string"
2031
+ }
2032
+ ]
2033
+ },
2034
+ "applicationName": {
2035
+ "type": "string",
2036
+ "description": "The name of the application. Defaults to the folder name if not specified."
2037
+ },
2038
+ "version": {
2039
+ "type": "string",
2040
+ "description": "The version of the application (optional)"
2041
+ },
2042
+ "skip": {
2043
+ "type": "array",
2044
+ "description": "An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.",
2045
+ "items": {
2046
+ "type": "object",
2047
+ "properties": {
2048
+ "path": {
2049
+ "type": "string",
2050
+ "description": "The path to skip. Can be a string or a regex."
2051
+ },
2052
+ "method": {
2053
+ "description": "HTTP method to skip",
2054
+ "type": "string",
2055
+ "enum": [
2056
+ "GET",
2057
+ "POST",
2058
+ "PUT",
2059
+ "DELETE",
2060
+ "PATCH",
2061
+ "HEAD",
2062
+ "OPTIONS"
2063
+ ]
2064
+ }
2065
+ }
2066
+ }
2067
+ },
2068
+ "exporter": {
2069
+ "anyOf": [
2070
+ {
2071
+ "type": "array",
2072
+ "items": {
2073
+ "type": "object",
2074
+ "properties": {
2075
+ "type": {
2076
+ "type": "string",
2077
+ "enum": [
2078
+ "console",
2079
+ "otlp",
2080
+ "zipkin",
2081
+ "memory",
2082
+ "file"
2083
+ ],
2084
+ "default": "console"
2085
+ },
2086
+ "options": {
2087
+ "type": "object",
2088
+ "description": "Options for the exporter. These are passed directly to the exporter.",
2089
+ "properties": {
2090
+ "url": {
2091
+ "type": "string",
2092
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
2093
+ },
2094
+ "headers": {
2095
+ "type": "object",
2096
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
2097
+ },
2098
+ "path": {
2099
+ "type": "string",
2100
+ "description": "The path to write the traces to. Only for file exporter."
2101
+ }
2102
+ }
2103
+ },
2104
+ "additionalProperties": false
2105
+ }
2106
+ }
2107
+ },
2108
+ {
2109
+ "type": "object",
2110
+ "properties": {
2111
+ "type": {
2112
+ "type": "string",
2113
+ "enum": [
2114
+ "console",
2115
+ "otlp",
2116
+ "zipkin",
2117
+ "memory",
2118
+ "file"
2119
+ ],
2120
+ "default": "console"
2121
+ },
2122
+ "options": {
2123
+ "type": "object",
2124
+ "description": "Options for the exporter. These are passed directly to the exporter.",
2125
+ "properties": {
2126
+ "url": {
2127
+ "type": "string",
2128
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
2129
+ },
2130
+ "headers": {
2131
+ "type": "object",
2132
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
2133
+ },
2134
+ "path": {
2135
+ "type": "string",
2136
+ "description": "The path to write the traces to. Only for file exporter."
2137
+ }
2138
+ }
2139
+ },
2140
+ "additionalProperties": false
2141
+ }
2142
+ }
2143
+ ]
2144
+ }
2145
+ },
2146
+ "required": [
2147
+ "applicationName"
2148
+ ],
2149
+ "additionalProperties": false
2150
+ },
2151
+ "inspectorOptions": {
2152
+ "type": "object",
2153
+ "properties": {
2154
+ "host": {
2155
+ "type": "string"
2156
+ },
2157
+ "port": {
2158
+ "type": "number"
2159
+ },
2160
+ "breakFirstLine": {
2161
+ "type": "boolean"
2162
+ },
2163
+ "watchDisabled": {
2164
+ "type": "boolean"
2165
+ }
2166
+ }
2167
+ },
2168
+ "applicationTimeout": {
2169
+ "anyOf": [
2170
+ {
2171
+ "type": "number",
2172
+ "minimum": 1
2173
+ },
2174
+ {
2175
+ "type": "string"
2176
+ }
2177
+ ],
2178
+ "default": 300000
2179
+ },
2180
+ "messagingTimeout": {
2181
+ "anyOf": [
2182
+ {
2183
+ "type": "number",
2184
+ "minimum": 1
2185
+ },
2186
+ {
2187
+ "type": "string"
2188
+ }
2189
+ ],
2190
+ "default": 30000
2191
+ },
2192
+ "env": {
2193
+ "type": "object",
2194
+ "additionalProperties": {
2195
+ "type": "string"
2196
+ }
2197
+ },
2198
+ "sourceMaps": {
2199
+ "type": "boolean",
2200
+ "default": false
2201
+ },
2202
+ "scheduler": {
2203
+ "type": "array",
2204
+ "items": {
2205
+ "type": "object",
2206
+ "properties": {
2207
+ "enabled": {
2208
+ "anyOf": [
2209
+ {
2210
+ "type": "boolean"
2211
+ },
2212
+ {
2213
+ "type": "string"
2214
+ }
2215
+ ],
2216
+ "default": true
2217
+ },
2218
+ "name": {
2219
+ "type": "string"
2220
+ },
2221
+ "cron": {
2222
+ "type": "string"
2223
+ },
2224
+ "callbackUrl": {
2225
+ "type": "string"
2226
+ },
2227
+ "method": {
2228
+ "type": "string",
2229
+ "enum": [
2230
+ "GET",
2231
+ "POST",
2232
+ "PUT",
2233
+ "PATCH",
2234
+ "DELETE"
2235
+ ],
2236
+ "default": "GET"
2237
+ },
2238
+ "headers": {
2239
+ "type": "object",
2240
+ "additionalProperties": {
2241
+ "type": "string"
2242
+ }
2243
+ },
2244
+ "body": {
2245
+ "anyOf": [
2246
+ {
2247
+ "type": "string"
2248
+ },
2249
+ {
2250
+ "type": "object",
2251
+ "additionalProperties": true
2252
+ }
2253
+ ]
2254
+ },
2255
+ "maxRetries": {
2256
+ "type": "number",
2257
+ "minimum": 0,
2258
+ "default": 3
2259
+ }
2260
+ },
2261
+ "required": [
2262
+ "name",
2263
+ "cron",
2264
+ "callbackUrl"
2265
+ ]
2266
+ }
2267
+ }
2268
+ },
2269
+ "additionalProperties": false
983
2270
  }
984
2271
  },
985
2272
  "additionalProperties": false,