@platformatic/db 3.4.1 → 3.5.1

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 (61) hide show
  1. package/README.md +1 -1
  2. package/config.d.ts +442 -107
  3. package/eslint.config.js +9 -5
  4. package/index.d.ts +53 -31
  5. package/index.js +30 -139
  6. package/lib/application.js +102 -0
  7. package/lib/capability.js +35 -0
  8. package/lib/commands/index.js +59 -0
  9. package/lib/commands/migrations-apply.js +63 -0
  10. package/lib/commands/migrations-create.js +48 -0
  11. package/lib/commands/print-schema.js +31 -0
  12. package/lib/commands/seed.js +74 -0
  13. package/lib/commands/types.js +22 -0
  14. package/lib/config.js +52 -0
  15. package/lib/errors.js +16 -12
  16. package/lib/generator.js +229 -0
  17. package/lib/{migrator.mjs → migrator.js} +46 -38
  18. package/lib/{root-endpoint/index.js → root.js} +6 -7
  19. package/lib/schema.js +41 -20
  20. package/lib/{generator/code-templates.js → templates.js} +57 -16
  21. package/lib/types.js +161 -0
  22. package/lib/upgrade.js +8 -12
  23. package/lib/utils.js +12 -23
  24. package/lib/versions/0.18.0.js +3 -5
  25. package/lib/versions/{from-zero-twenty-height-to-will-see.js → 0.28.0.js} +3 -5
  26. package/lib/versions/2.0.0.js +3 -5
  27. package/lib/versions/3.0.0.js +14 -0
  28. package/package.json +32 -40
  29. package/schema.json +1385 -164
  30. package/tsconfig.json +16 -6
  31. package/db.mjs +0 -86
  32. package/help/compile.txt +0 -17
  33. package/help/create.txt +0 -13
  34. package/help/help.txt +0 -11
  35. package/help/migrations apply.txt +0 -45
  36. package/help/migrations create.txt +0 -27
  37. package/help/migrations.txt +0 -4
  38. package/help/schema.txt +0 -25
  39. package/help/seed.txt +0 -36
  40. package/help/start.txt +0 -47
  41. package/help/types.txt +0 -40
  42. package/index.test-d.ts +0 -43
  43. package/lib/adjust-config.js +0 -42
  44. package/lib/create.mjs +0 -89
  45. package/lib/gen-migration.mjs +0 -53
  46. package/lib/gen-schema.mjs +0 -68
  47. package/lib/gen-types.mjs +0 -202
  48. package/lib/generator/README.md +0 -38
  49. package/lib/generator/db-generator.js +0 -260
  50. package/lib/generator.d.ts +0 -7
  51. package/lib/migrate.mjs +0 -81
  52. package/lib/seed.mjs +0 -90
  53. package/lib/stackable.js +0 -49
  54. /package/{lib/root-endpoint/public → public}/images/dark_mode.svg +0 -0
  55. /package/{lib/root-endpoint/public → public}/images/favicon.ico +0 -0
  56. /package/{lib/root-endpoint/public → public}/images/light_mode.svg +0 -0
  57. /package/{lib/root-endpoint/public → public}/images/platformatic-logo-dark.svg +0 -0
  58. /package/{lib/root-endpoint/public → public}/images/platformatic-logo-light.svg +0 -0
  59. /package/{lib/root-endpoint/public → public}/images/triangle_dark.svg +0 -0
  60. /package/{lib/root-endpoint/public → public}/images/triangle_light.svg +0 -0
  61. /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/db/3.4.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/db/3.5.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
- "title": "Platformatic DB",
4
+ "title": "Platformatic Database Config",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "basePath": {
@@ -140,17 +140,25 @@
140
140
  "type": "object",
141
141
  "properties": {
142
142
  "target": {
143
- "type": "string",
144
- "resolveModule": true
143
+ "anyOf": [
144
+ {
145
+ "type": "string",
146
+ "resolveModule": true
147
+ },
148
+ {
149
+ "type": "string",
150
+ "resolvePath": true
151
+ }
152
+ ]
145
153
  },
146
154
  "options": {
147
155
  "type": "object"
148
156
  },
149
157
  "level": {
150
158
  "type": "string"
151
- },
152
- "additionalProperties": false
153
- }
159
+ }
160
+ },
161
+ "additionalProperties": false
154
162
  }
155
163
  },
156
164
  "options": {
@@ -173,6 +181,64 @@
173
181
  }
174
182
  },
175
183
  "additionalProperties": false
184
+ },
185
+ "formatters": {
186
+ "type": "object",
187
+ "properties": {
188
+ "path": {
189
+ "type": "string",
190
+ "resolvePath": true
191
+ }
192
+ },
193
+ "required": [
194
+ "path"
195
+ ],
196
+ "additionalProperties": false
197
+ },
198
+ "timestamp": {
199
+ "enum": [
200
+ "epochTime",
201
+ "unixTime",
202
+ "nullTime",
203
+ "isoTime"
204
+ ]
205
+ },
206
+ "redact": {
207
+ "type": "object",
208
+ "properties": {
209
+ "paths": {
210
+ "type": "array",
211
+ "items": {
212
+ "type": "string"
213
+ }
214
+ },
215
+ "censor": {
216
+ "type": "string",
217
+ "default": "[redacted]"
218
+ }
219
+ },
220
+ "required": [
221
+ "paths"
222
+ ],
223
+ "additionalProperties": false
224
+ },
225
+ "base": {
226
+ "anyOf": [
227
+ {
228
+ "type": "object",
229
+ "additionalProperties": true
230
+ },
231
+ {
232
+ "type": "null"
233
+ }
234
+ ]
235
+ },
236
+ "messageKey": {
237
+ "type": "string"
238
+ },
239
+ "customLevels": {
240
+ "type": "object",
241
+ "additionalProperties": true
176
242
  }
177
243
  },
178
244
  "required": [
@@ -875,6 +941,9 @@
875
941
  },
876
942
  "delete": {
877
943
  "$ref": "#/$defs/crud-operation-auth"
944
+ },
945
+ "updateMany": {
946
+ "$ref": "#/$defs/crud-operation-auth"
878
947
  }
879
948
  },
880
949
  "required": [
@@ -911,6 +980,9 @@
911
980
  },
912
981
  "delete": {
913
982
  "$ref": "#/$defs/crud-operation-auth"
983
+ },
984
+ "updateMany": {
985
+ "$ref": "#/$defs/crud-operation-auth"
914
986
  }
915
987
  },
916
988
  "required": [
@@ -966,77 +1038,6 @@
966
1038
  "dir"
967
1039
  ]
968
1040
  },
969
- "metrics": {
970
- "anyOf": [
971
- {
972
- "type": "boolean"
973
- },
974
- {
975
- "type": "object",
976
- "properties": {
977
- "port": {
978
- "anyOf": [
979
- {
980
- "type": "integer"
981
- },
982
- {
983
- "type": "string"
984
- }
985
- ]
986
- },
987
- "hostname": {
988
- "type": "string"
989
- },
990
- "endpoint": {
991
- "type": "string"
992
- },
993
- "server": {
994
- "type": "string",
995
- "enum": [
996
- "own",
997
- "parent",
998
- "hide"
999
- ]
1000
- },
1001
- "defaultMetrics": {
1002
- "type": "object",
1003
- "properties": {
1004
- "enabled": {
1005
- "type": "boolean"
1006
- }
1007
- },
1008
- "required": [
1009
- "enabled"
1010
- ],
1011
- "additionalProperties": false
1012
- },
1013
- "auth": {
1014
- "type": "object",
1015
- "properties": {
1016
- "username": {
1017
- "type": "string"
1018
- },
1019
- "password": {
1020
- "type": "string"
1021
- }
1022
- },
1023
- "additionalProperties": false,
1024
- "required": [
1025
- "username",
1026
- "password"
1027
- ]
1028
- },
1029
- "labels": {
1030
- "type": "object",
1031
- "additionalProperties": {
1032
- "type": "string"
1033
- }
1034
- }
1035
- },
1036
- "additionalProperties": false
1037
- }
1038
- ]
1039
- },
1040
1041
  "types": {
1041
1042
  "type": "object",
1042
1043
  "properties": {
@@ -1150,45 +1151,6 @@
1150
1151
  }
1151
1152
  ]
1152
1153
  }
1153
- },
1154
- "typescript": {
1155
- "anyOf": [
1156
- {
1157
- "type": "object",
1158
- "properties": {
1159
- "enabled": {
1160
- "anyOf": [
1161
- {
1162
- "type": "boolean"
1163
- },
1164
- {
1165
- "type": "string"
1166
- }
1167
- ]
1168
- },
1169
- "tsConfig": {
1170
- "type": "string",
1171
- "resolvePath": true
1172
- },
1173
- "outDir": {
1174
- "type": "string",
1175
- "resolvePath": true
1176
- },
1177
- "flags": {
1178
- "type": "array",
1179
- "items": {
1180
- "type": "string"
1181
- }
1182
- }
1183
- }
1184
- },
1185
- {
1186
- "type": "boolean"
1187
- },
1188
- {
1189
- "type": "string"
1190
- }
1191
- ]
1192
1154
  }
1193
1155
  },
1194
1156
  "additionalProperties": false,
@@ -1205,17 +1167,33 @@
1205
1167
  }
1206
1168
  ]
1207
1169
  },
1170
+ "application": {
1171
+ "type": "object",
1172
+ "properties": {},
1173
+ "additionalProperties": false,
1174
+ "required": [],
1175
+ "default": {}
1176
+ },
1208
1177
  "telemetry": {
1209
- "$id": "/OpenTelemetry",
1210
1178
  "type": "object",
1211
1179
  "properties": {
1212
- "serviceName": {
1180
+ "enabled": {
1181
+ "anyOf": [
1182
+ {
1183
+ "type": "boolean"
1184
+ },
1185
+ {
1186
+ "type": "string"
1187
+ }
1188
+ ]
1189
+ },
1190
+ "applicationName": {
1213
1191
  "type": "string",
1214
- "description": "The name of the service. Defaults to the folder name if not specified."
1192
+ "description": "The name of the application. Defaults to the folder name if not specified."
1215
1193
  },
1216
1194
  "version": {
1217
1195
  "type": "string",
1218
- "description": "The version of the service (optional)"
1196
+ "description": "The version of the application (optional)"
1219
1197
  },
1220
1198
  "skip": {
1221
1199
  "type": "array",
@@ -1256,7 +1234,8 @@
1256
1234
  "console",
1257
1235
  "otlp",
1258
1236
  "zipkin",
1259
- "memory"
1237
+ "memory",
1238
+ "file"
1260
1239
  ],
1261
1240
  "default": "console"
1262
1241
  },
@@ -1271,6 +1250,10 @@
1271
1250
  "headers": {
1272
1251
  "type": "object",
1273
1252
  "description": "Headers to send to the exporter. Not used for console or memory exporters."
1253
+ },
1254
+ "path": {
1255
+ "type": "string",
1256
+ "description": "The path to write the traces to. Only for file exporter."
1274
1257
  }
1275
1258
  }
1276
1259
  },
@@ -1287,7 +1270,8 @@
1287
1270
  "console",
1288
1271
  "otlp",
1289
1272
  "zipkin",
1290
- "memory"
1273
+ "memory",
1274
+ "file"
1291
1275
  ],
1292
1276
  "default": "console"
1293
1277
  },
@@ -1302,6 +1286,10 @@
1302
1286
  "headers": {
1303
1287
  "type": "object",
1304
1288
  "description": "Headers to send to the exporter. Not used for console or memory exporters."
1289
+ },
1290
+ "path": {
1291
+ "type": "string",
1292
+ "description": "The path to write the traces to. Only for file exporter."
1305
1293
  }
1306
1294
  }
1307
1295
  },
@@ -1312,51 +1300,1284 @@
1312
1300
  }
1313
1301
  },
1314
1302
  "required": [
1315
- "serviceName"
1303
+ "applicationName"
1316
1304
  ],
1317
1305
  "additionalProperties": false
1318
1306
  },
1319
- "clients": {
1320
- "type": "array",
1321
- "items": {
1322
- "type": "object",
1323
- "properties": {
1324
- "serviceId": {
1325
- "type": "string"
1326
- },
1327
- "name": {
1328
- "type": "string"
1329
- },
1330
- "type": {
1331
- "type": "string",
1332
- "enum": [
1333
- "openapi",
1334
- "graphql"
1335
- ]
1336
- },
1337
- "path": {
1338
- "type": "string",
1339
- "resolvePath": true
1340
- },
1341
- "schema": {
1342
- "type": "string",
1343
- "resolvePath": true
1344
- },
1345
- "url": {
1346
- "type": "string"
1347
- },
1348
- "fullResponse": {
1349
- "type": "boolean"
1350
- },
1351
- "fullRequest": {
1352
- "type": "boolean"
1353
- },
1354
- "validateResponse": {
1355
- "type": "boolean"
1356
- }
1307
+ "runtime": {
1308
+ "type": "object",
1309
+ "properties": {
1310
+ "preload": {
1311
+ "anyOf": [
1312
+ {
1313
+ "type": "string",
1314
+ "resolvePath": true
1315
+ },
1316
+ {
1317
+ "type": "array",
1318
+ "items": {
1319
+ "type": "string",
1320
+ "resolvePath": true
1321
+ }
1322
+ }
1323
+ ]
1357
1324
  },
1358
- "additionalProperties": false
1359
- }
1325
+ "basePath": {
1326
+ "type": "string"
1327
+ },
1328
+ "services": {
1329
+ "type": "array",
1330
+ "items": {
1331
+ "type": "object",
1332
+ "anyOf": [
1333
+ {
1334
+ "required": [
1335
+ "id",
1336
+ "path"
1337
+ ]
1338
+ },
1339
+ {
1340
+ "required": [
1341
+ "id",
1342
+ "url"
1343
+ ]
1344
+ }
1345
+ ],
1346
+ "properties": {
1347
+ "id": {
1348
+ "type": "string"
1349
+ },
1350
+ "path": {
1351
+ "type": "string",
1352
+ "allowEmptyPaths": true,
1353
+ "resolvePath": true
1354
+ },
1355
+ "config": {
1356
+ "type": "string"
1357
+ },
1358
+ "url": {
1359
+ "type": "string"
1360
+ },
1361
+ "gitBranch": {
1362
+ "type": "string",
1363
+ "default": "main"
1364
+ },
1365
+ "useHttp": {
1366
+ "type": "boolean"
1367
+ },
1368
+ "workers": {
1369
+ "anyOf": [
1370
+ {
1371
+ "type": "number",
1372
+ "minimum": 1
1373
+ },
1374
+ {
1375
+ "type": "string"
1376
+ }
1377
+ ]
1378
+ },
1379
+ "health": {
1380
+ "type": "object",
1381
+ "default": {},
1382
+ "properties": {
1383
+ "enabled": {
1384
+ "anyOf": [
1385
+ {
1386
+ "type": "boolean"
1387
+ },
1388
+ {
1389
+ "type": "string"
1390
+ }
1391
+ ]
1392
+ },
1393
+ "interval": {
1394
+ "anyOf": [
1395
+ {
1396
+ "type": "number",
1397
+ "minimum": 0
1398
+ },
1399
+ {
1400
+ "type": "string"
1401
+ }
1402
+ ]
1403
+ },
1404
+ "gracePeriod": {
1405
+ "anyOf": [
1406
+ {
1407
+ "type": "number",
1408
+ "minimum": 0
1409
+ },
1410
+ {
1411
+ "type": "string"
1412
+ }
1413
+ ]
1414
+ },
1415
+ "maxUnhealthyChecks": {
1416
+ "anyOf": [
1417
+ {
1418
+ "type": "number",
1419
+ "minimum": 1
1420
+ },
1421
+ {
1422
+ "type": "string"
1423
+ }
1424
+ ]
1425
+ },
1426
+ "maxELU": {
1427
+ "anyOf": [
1428
+ {
1429
+ "type": "number",
1430
+ "minimum": 0,
1431
+ "maximum": 1
1432
+ },
1433
+ {
1434
+ "type": "string"
1435
+ }
1436
+ ]
1437
+ },
1438
+ "maxHeapUsed": {
1439
+ "anyOf": [
1440
+ {
1441
+ "type": "number",
1442
+ "minimum": 0,
1443
+ "maximum": 1
1444
+ },
1445
+ {
1446
+ "type": "string"
1447
+ }
1448
+ ]
1449
+ },
1450
+ "maxHeapTotal": {
1451
+ "anyOf": [
1452
+ {
1453
+ "type": "number",
1454
+ "minimum": 0
1455
+ },
1456
+ {
1457
+ "type": "string"
1458
+ }
1459
+ ]
1460
+ },
1461
+ "maxYoungGeneration": {
1462
+ "anyOf": [
1463
+ {
1464
+ "type": "number",
1465
+ "minimum": 0
1466
+ },
1467
+ {
1468
+ "type": "string"
1469
+ }
1470
+ ]
1471
+ }
1472
+ },
1473
+ "additionalProperties": false
1474
+ },
1475
+ "dependencies": {
1476
+ "type": "array",
1477
+ "items": {
1478
+ "type": "string"
1479
+ },
1480
+ "default": []
1481
+ },
1482
+ "arguments": {
1483
+ "type": "array",
1484
+ "items": {
1485
+ "type": "string"
1486
+ }
1487
+ },
1488
+ "env": {
1489
+ "type": "object",
1490
+ "additionalProperties": {
1491
+ "type": "string"
1492
+ }
1493
+ },
1494
+ "envfile": {
1495
+ "type": "string"
1496
+ },
1497
+ "sourceMaps": {
1498
+ "type": "boolean",
1499
+ "default": false
1500
+ },
1501
+ "packageManager": {
1502
+ "type": "string",
1503
+ "enum": [
1504
+ "npm",
1505
+ "pnpm",
1506
+ "yarn"
1507
+ ]
1508
+ },
1509
+ "preload": {
1510
+ "anyOf": [
1511
+ {
1512
+ "type": "string",
1513
+ "resolvePath": true
1514
+ },
1515
+ {
1516
+ "type": "array",
1517
+ "items": {
1518
+ "type": "string",
1519
+ "resolvePath": true
1520
+ }
1521
+ }
1522
+ ]
1523
+ },
1524
+ "nodeOptions": {
1525
+ "type": "string"
1526
+ },
1527
+ "telemetry": {
1528
+ "type": "object",
1529
+ "properties": {
1530
+ "instrumentations": {
1531
+ "type": "array",
1532
+ "description": "An array of instrumentations loaded if telemetry is enabled",
1533
+ "items": {
1534
+ "oneOf": [
1535
+ {
1536
+ "type": "string"
1537
+ },
1538
+ {
1539
+ "type": "object",
1540
+ "properties": {
1541
+ "package": {
1542
+ "type": "string"
1543
+ },
1544
+ "exportName": {
1545
+ "type": "string"
1546
+ },
1547
+ "options": {
1548
+ "type": "object",
1549
+ "additionalProperties": true
1550
+ }
1551
+ },
1552
+ "required": [
1553
+ "package"
1554
+ ]
1555
+ }
1556
+ ]
1557
+ }
1558
+ }
1559
+ }
1560
+ }
1561
+ }
1562
+ }
1563
+ },
1564
+ "workers": {
1565
+ "anyOf": [
1566
+ {
1567
+ "type": "number",
1568
+ "minimum": 1
1569
+ },
1570
+ {
1571
+ "type": "string"
1572
+ }
1573
+ ],
1574
+ "default": 1
1575
+ },
1576
+ "logger": {
1577
+ "type": "object",
1578
+ "properties": {
1579
+ "level": {
1580
+ "type": "string",
1581
+ "default": "info",
1582
+ "oneOf": [
1583
+ {
1584
+ "enum": [
1585
+ "fatal",
1586
+ "error",
1587
+ "warn",
1588
+ "info",
1589
+ "debug",
1590
+ "trace",
1591
+ "silent"
1592
+ ]
1593
+ },
1594
+ {
1595
+ "pattern": "^\\{.+\\}$"
1596
+ }
1597
+ ]
1598
+ },
1599
+ "transport": {
1600
+ "anyOf": [
1601
+ {
1602
+ "type": "object",
1603
+ "properties": {
1604
+ "target": {
1605
+ "type": "string",
1606
+ "resolveModule": true
1607
+ },
1608
+ "options": {
1609
+ "type": "object"
1610
+ }
1611
+ },
1612
+ "additionalProperties": false
1613
+ },
1614
+ {
1615
+ "type": "object",
1616
+ "properties": {
1617
+ "targets": {
1618
+ "type": "array",
1619
+ "items": {
1620
+ "type": "object",
1621
+ "properties": {
1622
+ "target": {
1623
+ "anyOf": [
1624
+ {
1625
+ "type": "string",
1626
+ "resolveModule": true
1627
+ },
1628
+ {
1629
+ "type": "string",
1630
+ "resolvePath": true
1631
+ }
1632
+ ]
1633
+ },
1634
+ "options": {
1635
+ "type": "object"
1636
+ },
1637
+ "level": {
1638
+ "type": "string"
1639
+ }
1640
+ },
1641
+ "additionalProperties": false
1642
+ }
1643
+ },
1644
+ "options": {
1645
+ "type": "object"
1646
+ }
1647
+ },
1648
+ "additionalProperties": false
1649
+ }
1650
+ ]
1651
+ },
1652
+ "pipeline": {
1653
+ "type": "object",
1654
+ "properties": {
1655
+ "target": {
1656
+ "type": "string",
1657
+ "resolveModule": true
1658
+ },
1659
+ "options": {
1660
+ "type": "object"
1661
+ }
1662
+ },
1663
+ "additionalProperties": false
1664
+ },
1665
+ "formatters": {
1666
+ "type": "object",
1667
+ "properties": {
1668
+ "path": {
1669
+ "type": "string",
1670
+ "resolvePath": true
1671
+ }
1672
+ },
1673
+ "required": [
1674
+ "path"
1675
+ ],
1676
+ "additionalProperties": false
1677
+ },
1678
+ "timestamp": {
1679
+ "enum": [
1680
+ "epochTime",
1681
+ "unixTime",
1682
+ "nullTime",
1683
+ "isoTime"
1684
+ ]
1685
+ },
1686
+ "redact": {
1687
+ "type": "object",
1688
+ "properties": {
1689
+ "paths": {
1690
+ "type": "array",
1691
+ "items": {
1692
+ "type": "string"
1693
+ }
1694
+ },
1695
+ "censor": {
1696
+ "type": "string",
1697
+ "default": "[redacted]"
1698
+ }
1699
+ },
1700
+ "required": [
1701
+ "paths"
1702
+ ],
1703
+ "additionalProperties": false
1704
+ },
1705
+ "base": {
1706
+ "anyOf": [
1707
+ {
1708
+ "type": "object",
1709
+ "additionalProperties": true
1710
+ },
1711
+ {
1712
+ "type": "null"
1713
+ }
1714
+ ]
1715
+ },
1716
+ "messageKey": {
1717
+ "type": "string"
1718
+ },
1719
+ "customLevels": {
1720
+ "type": "object",
1721
+ "additionalProperties": true
1722
+ }
1723
+ },
1724
+ "required": [
1725
+ "level"
1726
+ ],
1727
+ "default": {},
1728
+ "additionalProperties": true
1729
+ },
1730
+ "server": {
1731
+ "type": "object",
1732
+ "properties": {
1733
+ "hostname": {
1734
+ "type": "string",
1735
+ "default": "127.0.0.1"
1736
+ },
1737
+ "port": {
1738
+ "anyOf": [
1739
+ {
1740
+ "type": "integer"
1741
+ },
1742
+ {
1743
+ "type": "string"
1744
+ }
1745
+ ]
1746
+ },
1747
+ "http2": {
1748
+ "type": "boolean"
1749
+ },
1750
+ "https": {
1751
+ "type": "object",
1752
+ "properties": {
1753
+ "allowHTTP1": {
1754
+ "type": "boolean"
1755
+ },
1756
+ "key": {
1757
+ "anyOf": [
1758
+ {
1759
+ "type": "string"
1760
+ },
1761
+ {
1762
+ "type": "object",
1763
+ "properties": {
1764
+ "path": {
1765
+ "type": "string",
1766
+ "resolvePath": true
1767
+ }
1768
+ },
1769
+ "additionalProperties": false
1770
+ },
1771
+ {
1772
+ "type": "array",
1773
+ "items": {
1774
+ "anyOf": [
1775
+ {
1776
+ "type": "string"
1777
+ },
1778
+ {
1779
+ "type": "object",
1780
+ "properties": {
1781
+ "path": {
1782
+ "type": "string",
1783
+ "resolvePath": true
1784
+ }
1785
+ },
1786
+ "additionalProperties": false
1787
+ }
1788
+ ]
1789
+ }
1790
+ }
1791
+ ]
1792
+ },
1793
+ "cert": {
1794
+ "anyOf": [
1795
+ {
1796
+ "type": "string"
1797
+ },
1798
+ {
1799
+ "type": "object",
1800
+ "properties": {
1801
+ "path": {
1802
+ "type": "string",
1803
+ "resolvePath": true
1804
+ }
1805
+ },
1806
+ "additionalProperties": false
1807
+ },
1808
+ {
1809
+ "type": "array",
1810
+ "items": {
1811
+ "anyOf": [
1812
+ {
1813
+ "type": "string"
1814
+ },
1815
+ {
1816
+ "type": "object",
1817
+ "properties": {
1818
+ "path": {
1819
+ "type": "string",
1820
+ "resolvePath": true
1821
+ }
1822
+ },
1823
+ "additionalProperties": false
1824
+ }
1825
+ ]
1826
+ }
1827
+ }
1828
+ ]
1829
+ },
1830
+ "requestCert": {
1831
+ "type": "boolean"
1832
+ },
1833
+ "rejectUnauthorized": {
1834
+ "type": "boolean"
1835
+ }
1836
+ },
1837
+ "additionalProperties": false,
1838
+ "required": [
1839
+ "key",
1840
+ "cert"
1841
+ ]
1842
+ }
1843
+ },
1844
+ "additionalProperties": false
1845
+ },
1846
+ "startTimeout": {
1847
+ "default": 30000,
1848
+ "type": "number",
1849
+ "minimum": 0
1850
+ },
1851
+ "restartOnError": {
1852
+ "default": true,
1853
+ "anyOf": [
1854
+ {
1855
+ "type": "boolean"
1856
+ },
1857
+ {
1858
+ "type": "number",
1859
+ "minimum": 0
1860
+ }
1861
+ ]
1862
+ },
1863
+ "exitOnUnhandledErrors": {
1864
+ "default": true,
1865
+ "type": "boolean"
1866
+ },
1867
+ "gracefulShutdown": {
1868
+ "type": "object",
1869
+ "properties": {
1870
+ "runtime": {
1871
+ "anyOf": [
1872
+ {
1873
+ "type": "number",
1874
+ "minimum": 1
1875
+ },
1876
+ {
1877
+ "type": "string"
1878
+ }
1879
+ ],
1880
+ "default": 10000
1881
+ },
1882
+ "application": {
1883
+ "anyOf": [
1884
+ {
1885
+ "type": "number",
1886
+ "minimum": 1
1887
+ },
1888
+ {
1889
+ "type": "string"
1890
+ }
1891
+ ],
1892
+ "default": 10000
1893
+ }
1894
+ },
1895
+ "default": {},
1896
+ "required": [
1897
+ "runtime",
1898
+ "application"
1899
+ ],
1900
+ "additionalProperties": false
1901
+ },
1902
+ "health": {
1903
+ "type": "object",
1904
+ "default": {},
1905
+ "properties": {
1906
+ "enabled": {
1907
+ "anyOf": [
1908
+ {
1909
+ "type": "boolean"
1910
+ },
1911
+ {
1912
+ "type": "string"
1913
+ }
1914
+ ],
1915
+ "default": true
1916
+ },
1917
+ "interval": {
1918
+ "anyOf": [
1919
+ {
1920
+ "type": "number",
1921
+ "minimum": 0
1922
+ },
1923
+ {
1924
+ "type": "string"
1925
+ }
1926
+ ],
1927
+ "default": 30000
1928
+ },
1929
+ "gracePeriod": {
1930
+ "anyOf": [
1931
+ {
1932
+ "type": "number",
1933
+ "minimum": 0
1934
+ },
1935
+ {
1936
+ "type": "string"
1937
+ }
1938
+ ],
1939
+ "default": 30000
1940
+ },
1941
+ "maxUnhealthyChecks": {
1942
+ "anyOf": [
1943
+ {
1944
+ "type": "number",
1945
+ "minimum": 1
1946
+ },
1947
+ {
1948
+ "type": "string"
1949
+ }
1950
+ ],
1951
+ "default": 10
1952
+ },
1953
+ "maxELU": {
1954
+ "anyOf": [
1955
+ {
1956
+ "type": "number",
1957
+ "minimum": 0,
1958
+ "maximum": 1
1959
+ },
1960
+ {
1961
+ "type": "string"
1962
+ }
1963
+ ],
1964
+ "default": 0.99
1965
+ },
1966
+ "maxHeapUsed": {
1967
+ "anyOf": [
1968
+ {
1969
+ "type": "number",
1970
+ "minimum": 0,
1971
+ "maximum": 1
1972
+ },
1973
+ {
1974
+ "type": "string"
1975
+ }
1976
+ ],
1977
+ "default": 0.99
1978
+ },
1979
+ "maxHeapTotal": {
1980
+ "anyOf": [
1981
+ {
1982
+ "type": "number",
1983
+ "minimum": 0
1984
+ },
1985
+ {
1986
+ "type": "string"
1987
+ }
1988
+ ],
1989
+ "default": 4294967296
1990
+ },
1991
+ "maxYoungGeneration": {
1992
+ "anyOf": [
1993
+ {
1994
+ "type": "number",
1995
+ "minimum": 0
1996
+ },
1997
+ {
1998
+ "type": "string"
1999
+ }
2000
+ ]
2001
+ }
2002
+ },
2003
+ "additionalProperties": false
2004
+ },
2005
+ "undici": {
2006
+ "type": "object",
2007
+ "properties": {
2008
+ "agentOptions": {
2009
+ "type": "object",
2010
+ "additionalProperties": true
2011
+ },
2012
+ "interceptors": {
2013
+ "anyOf": [
2014
+ {
2015
+ "type": "array",
2016
+ "items": {
2017
+ "type": "object",
2018
+ "properties": {
2019
+ "module": {
2020
+ "type": "string"
2021
+ },
2022
+ "options": {
2023
+ "type": "object",
2024
+ "additionalProperties": true
2025
+ }
2026
+ },
2027
+ "required": [
2028
+ "module",
2029
+ "options"
2030
+ ]
2031
+ }
2032
+ },
2033
+ {
2034
+ "type": "object",
2035
+ "properties": {
2036
+ "Client": {
2037
+ "type": "array",
2038
+ "items": {
2039
+ "type": "object",
2040
+ "properties": {
2041
+ "module": {
2042
+ "type": "string"
2043
+ },
2044
+ "options": {
2045
+ "type": "object",
2046
+ "additionalProperties": true
2047
+ }
2048
+ },
2049
+ "required": [
2050
+ "module",
2051
+ "options"
2052
+ ]
2053
+ }
2054
+ },
2055
+ "Pool": {
2056
+ "type": "array",
2057
+ "items": {
2058
+ "type": "object",
2059
+ "properties": {
2060
+ "module": {
2061
+ "type": "string"
2062
+ },
2063
+ "options": {
2064
+ "type": "object",
2065
+ "additionalProperties": true
2066
+ }
2067
+ },
2068
+ "required": [
2069
+ "module",
2070
+ "options"
2071
+ ]
2072
+ }
2073
+ },
2074
+ "Agent": {
2075
+ "type": "array",
2076
+ "items": {
2077
+ "type": "object",
2078
+ "properties": {
2079
+ "module": {
2080
+ "type": "string"
2081
+ },
2082
+ "options": {
2083
+ "type": "object",
2084
+ "additionalProperties": true
2085
+ }
2086
+ },
2087
+ "required": [
2088
+ "module",
2089
+ "options"
2090
+ ]
2091
+ }
2092
+ }
2093
+ }
2094
+ }
2095
+ ]
2096
+ }
2097
+ }
2098
+ },
2099
+ "httpCache": {
2100
+ "oneOf": [
2101
+ {
2102
+ "type": "boolean"
2103
+ },
2104
+ {
2105
+ "type": "object",
2106
+ "properties": {
2107
+ "store": {
2108
+ "type": "string"
2109
+ },
2110
+ "methods": {
2111
+ "type": "array",
2112
+ "items": {
2113
+ "type": "string"
2114
+ },
2115
+ "default": [
2116
+ "GET",
2117
+ "HEAD"
2118
+ ],
2119
+ "minItems": 1
2120
+ },
2121
+ "cacheTagsHeader": {
2122
+ "type": "string"
2123
+ },
2124
+ "maxSize": {
2125
+ "type": "integer"
2126
+ },
2127
+ "maxEntrySize": {
2128
+ "type": "integer"
2129
+ },
2130
+ "maxCount": {
2131
+ "type": "integer"
2132
+ }
2133
+ }
2134
+ }
2135
+ ]
2136
+ },
2137
+ "watch": {
2138
+ "anyOf": [
2139
+ {
2140
+ "type": "boolean"
2141
+ },
2142
+ {
2143
+ "type": "string"
2144
+ }
2145
+ ]
2146
+ },
2147
+ "managementApi": {
2148
+ "anyOf": [
2149
+ {
2150
+ "type": "boolean"
2151
+ },
2152
+ {
2153
+ "type": "string"
2154
+ },
2155
+ {
2156
+ "type": "object",
2157
+ "properties": {
2158
+ "logs": {
2159
+ "type": "object",
2160
+ "properties": {
2161
+ "maxSize": {
2162
+ "type": "number",
2163
+ "minimum": 5,
2164
+ "default": 200
2165
+ }
2166
+ },
2167
+ "additionalProperties": false
2168
+ }
2169
+ },
2170
+ "additionalProperties": false
2171
+ }
2172
+ ],
2173
+ "default": true
2174
+ },
2175
+ "metrics": {
2176
+ "anyOf": [
2177
+ {
2178
+ "type": "boolean"
2179
+ },
2180
+ {
2181
+ "type": "object",
2182
+ "properties": {
2183
+ "port": {
2184
+ "anyOf": [
2185
+ {
2186
+ "type": "integer"
2187
+ },
2188
+ {
2189
+ "type": "string"
2190
+ }
2191
+ ]
2192
+ },
2193
+ "enabled": {
2194
+ "anyOf": [
2195
+ {
2196
+ "type": "boolean"
2197
+ },
2198
+ {
2199
+ "type": "string"
2200
+ }
2201
+ ]
2202
+ },
2203
+ "hostname": {
2204
+ "type": "string"
2205
+ },
2206
+ "endpoint": {
2207
+ "type": "string"
2208
+ },
2209
+ "auth": {
2210
+ "type": "object",
2211
+ "properties": {
2212
+ "username": {
2213
+ "type": "string"
2214
+ },
2215
+ "password": {
2216
+ "type": "string"
2217
+ }
2218
+ },
2219
+ "additionalProperties": false,
2220
+ "required": [
2221
+ "username",
2222
+ "password"
2223
+ ]
2224
+ },
2225
+ "labels": {
2226
+ "type": "object",
2227
+ "additionalProperties": {
2228
+ "type": "string"
2229
+ }
2230
+ },
2231
+ "applicationLabel": {
2232
+ "type": "string",
2233
+ "default": "applicationId",
2234
+ "description": "The label name to use for the application identifier in metrics (e.g., applicationId, serviceId)"
2235
+ },
2236
+ "readiness": {
2237
+ "anyOf": [
2238
+ {
2239
+ "type": "boolean"
2240
+ },
2241
+ {
2242
+ "type": "object",
2243
+ "properties": {
2244
+ "endpoint": {
2245
+ "type": "string"
2246
+ },
2247
+ "success": {
2248
+ "type": "object",
2249
+ "properties": {
2250
+ "statusCode": {
2251
+ "type": "number"
2252
+ },
2253
+ "body": {
2254
+ "type": "string"
2255
+ }
2256
+ },
2257
+ "additionalProperties": false
2258
+ },
2259
+ "fail": {
2260
+ "type": "object",
2261
+ "properties": {
2262
+ "statusCode": {
2263
+ "type": "number"
2264
+ },
2265
+ "body": {
2266
+ "type": "string"
2267
+ }
2268
+ },
2269
+ "additionalProperties": false
2270
+ }
2271
+ },
2272
+ "additionalProperties": false
2273
+ }
2274
+ ]
2275
+ },
2276
+ "liveness": {
2277
+ "anyOf": [
2278
+ {
2279
+ "type": "boolean"
2280
+ },
2281
+ {
2282
+ "type": "object",
2283
+ "properties": {
2284
+ "endpoint": {
2285
+ "type": "string"
2286
+ },
2287
+ "success": {
2288
+ "type": "object",
2289
+ "properties": {
2290
+ "statusCode": {
2291
+ "type": "number"
2292
+ },
2293
+ "body": {
2294
+ "type": "string"
2295
+ }
2296
+ },
2297
+ "additionalProperties": false
2298
+ },
2299
+ "fail": {
2300
+ "type": "object",
2301
+ "properties": {
2302
+ "statusCode": {
2303
+ "type": "number"
2304
+ },
2305
+ "body": {
2306
+ "type": "string"
2307
+ }
2308
+ },
2309
+ "additionalProperties": false
2310
+ }
2311
+ },
2312
+ "additionalProperties": false
2313
+ }
2314
+ ]
2315
+ },
2316
+ "plugins": {
2317
+ "type": "array",
2318
+ "items": {
2319
+ "anyOf": [
2320
+ {
2321
+ "type": "string",
2322
+ "resolvePath": true
2323
+ }
2324
+ ]
2325
+ }
2326
+ }
2327
+ },
2328
+ "additionalProperties": false
2329
+ }
2330
+ ]
2331
+ },
2332
+ "telemetry": {
2333
+ "type": "object",
2334
+ "properties": {
2335
+ "enabled": {
2336
+ "anyOf": [
2337
+ {
2338
+ "type": "boolean"
2339
+ },
2340
+ {
2341
+ "type": "string"
2342
+ }
2343
+ ]
2344
+ },
2345
+ "applicationName": {
2346
+ "type": "string",
2347
+ "description": "The name of the application. Defaults to the folder name if not specified."
2348
+ },
2349
+ "version": {
2350
+ "type": "string",
2351
+ "description": "The version of the application (optional)"
2352
+ },
2353
+ "skip": {
2354
+ "type": "array",
2355
+ "description": "An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.",
2356
+ "items": {
2357
+ "type": "object",
2358
+ "properties": {
2359
+ "path": {
2360
+ "type": "string",
2361
+ "description": "The path to skip. Can be a string or a regex."
2362
+ },
2363
+ "method": {
2364
+ "description": "HTTP method to skip",
2365
+ "type": "string",
2366
+ "enum": [
2367
+ "GET",
2368
+ "POST",
2369
+ "PUT",
2370
+ "DELETE",
2371
+ "PATCH",
2372
+ "HEAD",
2373
+ "OPTIONS"
2374
+ ]
2375
+ }
2376
+ }
2377
+ }
2378
+ },
2379
+ "exporter": {
2380
+ "anyOf": [
2381
+ {
2382
+ "type": "array",
2383
+ "items": {
2384
+ "type": "object",
2385
+ "properties": {
2386
+ "type": {
2387
+ "type": "string",
2388
+ "enum": [
2389
+ "console",
2390
+ "otlp",
2391
+ "zipkin",
2392
+ "memory",
2393
+ "file"
2394
+ ],
2395
+ "default": "console"
2396
+ },
2397
+ "options": {
2398
+ "type": "object",
2399
+ "description": "Options for the exporter. These are passed directly to the exporter.",
2400
+ "properties": {
2401
+ "url": {
2402
+ "type": "string",
2403
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
2404
+ },
2405
+ "headers": {
2406
+ "type": "object",
2407
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
2408
+ },
2409
+ "path": {
2410
+ "type": "string",
2411
+ "description": "The path to write the traces to. Only for file exporter."
2412
+ }
2413
+ }
2414
+ },
2415
+ "additionalProperties": false
2416
+ }
2417
+ }
2418
+ },
2419
+ {
2420
+ "type": "object",
2421
+ "properties": {
2422
+ "type": {
2423
+ "type": "string",
2424
+ "enum": [
2425
+ "console",
2426
+ "otlp",
2427
+ "zipkin",
2428
+ "memory",
2429
+ "file"
2430
+ ],
2431
+ "default": "console"
2432
+ },
2433
+ "options": {
2434
+ "type": "object",
2435
+ "description": "Options for the exporter. These are passed directly to the exporter.",
2436
+ "properties": {
2437
+ "url": {
2438
+ "type": "string",
2439
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
2440
+ },
2441
+ "headers": {
2442
+ "type": "object",
2443
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
2444
+ },
2445
+ "path": {
2446
+ "type": "string",
2447
+ "description": "The path to write the traces to. Only for file exporter."
2448
+ }
2449
+ }
2450
+ },
2451
+ "additionalProperties": false
2452
+ }
2453
+ }
2454
+ ]
2455
+ }
2456
+ },
2457
+ "required": [
2458
+ "applicationName"
2459
+ ],
2460
+ "additionalProperties": false
2461
+ },
2462
+ "inspectorOptions": {
2463
+ "type": "object",
2464
+ "properties": {
2465
+ "host": {
2466
+ "type": "string"
2467
+ },
2468
+ "port": {
2469
+ "type": "number"
2470
+ },
2471
+ "breakFirstLine": {
2472
+ "type": "boolean"
2473
+ },
2474
+ "watchDisabled": {
2475
+ "type": "boolean"
2476
+ }
2477
+ }
2478
+ },
2479
+ "applicationTimeout": {
2480
+ "anyOf": [
2481
+ {
2482
+ "type": "number",
2483
+ "minimum": 1
2484
+ },
2485
+ {
2486
+ "type": "string"
2487
+ }
2488
+ ],
2489
+ "default": 300000
2490
+ },
2491
+ "messagingTimeout": {
2492
+ "anyOf": [
2493
+ {
2494
+ "type": "number",
2495
+ "minimum": 1
2496
+ },
2497
+ {
2498
+ "type": "string"
2499
+ }
2500
+ ],
2501
+ "default": 30000
2502
+ },
2503
+ "env": {
2504
+ "type": "object",
2505
+ "additionalProperties": {
2506
+ "type": "string"
2507
+ }
2508
+ },
2509
+ "sourceMaps": {
2510
+ "type": "boolean",
2511
+ "default": false
2512
+ },
2513
+ "scheduler": {
2514
+ "type": "array",
2515
+ "items": {
2516
+ "type": "object",
2517
+ "properties": {
2518
+ "enabled": {
2519
+ "anyOf": [
2520
+ {
2521
+ "type": "boolean"
2522
+ },
2523
+ {
2524
+ "type": "string"
2525
+ }
2526
+ ],
2527
+ "default": true
2528
+ },
2529
+ "name": {
2530
+ "type": "string"
2531
+ },
2532
+ "cron": {
2533
+ "type": "string"
2534
+ },
2535
+ "callbackUrl": {
2536
+ "type": "string"
2537
+ },
2538
+ "method": {
2539
+ "type": "string",
2540
+ "enum": [
2541
+ "GET",
2542
+ "POST",
2543
+ "PUT",
2544
+ "PATCH",
2545
+ "DELETE"
2546
+ ],
2547
+ "default": "GET"
2548
+ },
2549
+ "headers": {
2550
+ "type": "object",
2551
+ "additionalProperties": {
2552
+ "type": "string"
2553
+ }
2554
+ },
2555
+ "body": {
2556
+ "anyOf": [
2557
+ {
2558
+ "type": "string"
2559
+ },
2560
+ {
2561
+ "type": "object",
2562
+ "additionalProperties": true
2563
+ }
2564
+ ]
2565
+ },
2566
+ "maxRetries": {
2567
+ "type": "number",
2568
+ "minimum": 0,
2569
+ "default": 3
2570
+ }
2571
+ },
2572
+ "required": [
2573
+ "name",
2574
+ "cron",
2575
+ "callbackUrl"
2576
+ ]
2577
+ }
2578
+ }
2579
+ },
2580
+ "additionalProperties": false
1360
2581
  },
1361
2582
  "watch": {
1362
2583
  "anyOf": [