@platformatic/runtime 2.0.0-alpha.2 → 2.0.0-alpha.20

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 (177) hide show
  1. package/config.d.ts +218 -0
  2. package/eslint.config.js +8 -0
  3. package/fixtures/botched-start/platformatic.runtime.json +1 -1
  4. package/fixtures/botched-start/services/a/platformatic.service.json +1 -1
  5. package/fixtures/composerApp/platformatic.composer.json +1 -1
  6. package/fixtures/configs/invalid-entrypoint.json +1 -1
  7. package/fixtures/configs/invalid-schema-type.config.json +1 -1
  8. package/fixtures/configs/{invalid-autoload-with-services.json → invalid-web-with-services.json} +9 -5
  9. package/fixtures/configs/missing-property.config.json +1 -1
  10. package/fixtures/configs/missing-service-config.json +1 -1
  11. package/fixtures/configs/monorepo-composer-no-autoload.json +2 -2
  12. package/fixtures/configs/monorepo-composer.json +2 -2
  13. package/fixtures/configs/monorepo-create-cycle.json +2 -2
  14. package/fixtures/configs/monorepo-missing-dependencies.json +2 -2
  15. package/fixtures/configs/monorepo-no-cycles.json +2 -2
  16. package/fixtures/configs/monorepo-openapi.json +2 -2
  17. package/fixtures/configs/{monorepo-hotreload-env.json → monorepo-watch-env.json} +2 -2
  18. package/fixtures/configs/monorepo-watch-single.json +12 -0
  19. package/fixtures/configs/monorepo-watch.json +24 -9
  20. package/fixtures/configs/monorepo-with-dependencies.json +2 -2
  21. package/fixtures/configs/monorepo-with-management-api-without-metrics.json +21 -0
  22. package/fixtures/configs/monorepo-with-management-api.json +2 -2
  23. package/fixtures/configs/{monorepo-hotreload.json → monorepo-with-metrics.json} +5 -4
  24. package/fixtures/configs/monorepo.json +2 -2
  25. package/fixtures/configs/no-services.config.json +1 -1
  26. package/fixtures/configs/no-sources.config.json +1 -1
  27. package/fixtures/configs/service-throws-on-start.json +1 -1
  28. package/fixtures/configs/service-with-env-port.json +2 -2
  29. package/fixtures/configs/service-with-stdio.json +12 -0
  30. package/fixtures/configs/{hotreload.json → watch.json} +2 -2
  31. package/fixtures/crash-on-bootstrap/platformatic.runtime.json +15 -0
  32. package/fixtures/crash-on-bootstrap/services/service-1/platformatic.service.json +14 -0
  33. package/fixtures/crash-on-bootstrap/services/service-1/plugin.js +5 -0
  34. package/fixtures/crash-on-bootstrap/services/service-2/platformatic.service.json +14 -0
  35. package/fixtures/crash-on-bootstrap/services/service-2/plugin.js +5 -0
  36. package/fixtures/dbApp/platformatic.db.json +1 -1
  37. package/fixtures/dbAppNoName/platformatic.db.json +1 -1
  38. package/fixtures/dbAppNoPackageJson/platformatic.db.json +1 -1
  39. package/fixtures/dbAppWithMigrationError/platformatic.db.json +1 -1
  40. package/fixtures/do-not-reload-dependencies/platformatic.service.json +1 -1
  41. package/fixtures/do-not-restart-on-crash/platformatic.runtime.json +3 -2
  42. package/fixtures/do-not-restart-on-crash/services/a/platformatic.service.json +8 -6
  43. package/fixtures/express/platformatic.runtime.json +1 -1
  44. package/fixtures/express/services/a/platformatic.service.json +1 -1
  45. package/fixtures/express/services/b/platformatic.service.json +1 -1
  46. package/fixtures/external-client/platformatic.service.json +1 -1
  47. package/fixtures/interceptors/idp.js +2 -2
  48. package/fixtures/interceptors/platformatic.runtime.json +1 -1
  49. package/fixtures/interceptors/services/a/platformatic.service.json +1 -1
  50. package/fixtures/interceptors-2/platformatic.runtime.json +1 -1
  51. package/fixtures/interceptors-2/services/a/platformatic.service.json +1 -1
  52. package/fixtures/leven/platformatic.runtime.json +2 -2
  53. package/fixtures/leven/services/deeply-spittle/platformatic.service.json +1 -1
  54. package/fixtures/leven/services/rainy-empire/platformatic.composer.json +1 -1
  55. package/fixtures/management-api/platformatic.json +8 -3
  56. package/fixtures/management-api/services/service-1/platformatic.json +8 -5
  57. package/fixtures/management-api/services/service-1/plugin.js +4 -3
  58. package/fixtures/management-api/services/service-2/platformatic.json +1 -1
  59. package/fixtures/management-api/services/service-db/platformatic.db.json +1 -1
  60. package/fixtures/management-api-custom-labels/platformatic.json +2 -2
  61. package/fixtures/management-api-custom-labels/services/service-1/platformatic.json +1 -1
  62. package/fixtures/management-api-custom-labels/services/service-1/plugin.js +4 -3
  63. package/fixtures/management-api-custom-labels/services/service-2/platformatic.json +1 -1
  64. package/fixtures/management-api-custom-labels/services/service-db/platformatic.db.json +1 -1
  65. package/fixtures/management-api-without-metrics/platformatic.json +3 -2
  66. package/fixtures/management-api-without-metrics/services/service-1/platformatic.json +1 -1
  67. package/fixtures/monorepo/composerApp/platformatic.composer.json +1 -1
  68. package/fixtures/monorepo/dbApp/platformatic.db.json +1 -1
  69. package/fixtures/monorepo/serviceApp/platformatic.service.json +3 -2
  70. package/fixtures/monorepo/serviceApp/with-logger/with-logger.cjs +2 -2
  71. package/fixtures/monorepo/serviceApp/with-logger/with-logger.d.ts +7 -7
  72. package/fixtures/monorepo/serviceAppWithLogger/platformatic.service.json +1 -1
  73. package/fixtures/monorepo/serviceAppWithLogger/plugin.js +12 -0
  74. package/fixtures/monorepo/serviceAppWithMultiplePlugins/platformatic.service.json +3 -2
  75. package/fixtures/monorepo-missing-dependencies/composer/platformatic.json +1 -1
  76. package/fixtures/monorepo-openapi/serviceAppWithoutOpenapi/platformatic.service.json +1 -1
  77. package/fixtures/monorepo-watch/service1/platformatic.service.json +1 -1
  78. package/fixtures/monorepo-with-dependencies/main/platformatic.json +1 -1
  79. package/fixtures/monorepo-with-dependencies/service-1/platformatic.json +1 -1
  80. package/fixtures/monorepo-with-dependencies/service-2/platformatic.json +1 -1
  81. package/fixtures/no-env.service.json +1 -1
  82. package/fixtures/preload/platformatic.runtime.json +1 -1
  83. package/fixtures/preload/services/a/platformatic.service.json +1 -1
  84. package/fixtures/prom-server/platformatic.json +2 -2
  85. package/fixtures/prom-server/services/service-1/platformatic.json +1 -1
  86. package/fixtures/prom-server/services/service-2/platformatic.json +1 -1
  87. package/fixtures/restart-on-crash/platformatic.runtime.json +1 -1
  88. package/fixtures/restart-on-crash/services/a/platformatic.service.json +8 -6
  89. package/fixtures/sample-runtime/package.json +3 -3
  90. package/fixtures/sample-runtime/platformatic.json +2 -2
  91. package/fixtures/sample-runtime/services/rival/package.json +2 -2
  92. package/fixtures/sample-runtime/services/rival/platformatic.json +1 -1
  93. package/fixtures/sample-runtime-with-2-services/package.json +3 -3
  94. package/fixtures/sample-runtime-with-2-services/platformatic.json +2 -2
  95. package/fixtures/sample-runtime-with-2-services/services/foobar/package.json +2 -2
  96. package/fixtures/sample-runtime-with-2-services/services/foobar/platformatic.json +1 -1
  97. package/fixtures/sample-runtime-with-2-services/services/rival/package.json +2 -2
  98. package/fixtures/sample-runtime-with-2-services/services/rival/platformatic.json +1 -1
  99. package/fixtures/server/logger-transport/platformatic.runtime.json +2 -2
  100. package/fixtures/server/logger-transport/services/echo/platformatic.service.json +1 -1
  101. package/fixtures/server/overrides-service/platformatic.runtime.json +2 -2
  102. package/fixtures/server/overrides-service/services/echo/platformatic.service.json +1 -1
  103. package/fixtures/server/runtime-server/platformatic.runtime.json +2 -2
  104. package/fixtures/server/runtime-server/services/echo/platformatic.service.json +1 -1
  105. package/fixtures/serviceAppThrowsOnStart/platformatic.service.json +1 -1
  106. package/fixtures/stackables/node_modules/foo/foo.js +2 -1
  107. package/fixtures/start-command-in-runtime.js +1 -1
  108. package/fixtures/stdio/platformatic.service.json +6 -0
  109. package/fixtures/stdio/plugin.js +24 -0
  110. package/fixtures/telemetry/platformatic.runtime.json +2 -2
  111. package/fixtures/telemetry/services/echo/platformatic.service.json +1 -1
  112. package/fixtures/telemetry/services/echo/routes/span.js +16 -2
  113. package/fixtures/telemetry/services/service-1/platformatic.service.json +19 -0
  114. package/fixtures/telemetry/services/service-1/routes/echo.js +7 -0
  115. package/fixtures/typescript/platformatic.runtime.json +2 -2
  116. package/fixtures/typescript/services/composer/platformatic.composer.json +1 -1
  117. package/fixtures/typescript/services/movies/global.d.ts +2 -3
  118. package/fixtures/typescript/services/movies/platformatic.db.json +1 -1
  119. package/fixtures/typescript/services/movies/types/Movie.d.ts +3 -3
  120. package/fixtures/typescript/services/movies/types/index.d.ts +6 -6
  121. package/fixtures/typescript/services/titles/client/client.d.ts +35 -35
  122. package/fixtures/typescript/services/titles/platformatic.service.json +1 -1
  123. package/fixtures/typescript-custom-flags/platformatic.runtime.json +2 -2
  124. package/fixtures/typescript-custom-flags/services/composer/platformatic.composer.json +1 -1
  125. package/fixtures/typescript-custom-flags/services/movies/global.d.ts +2 -3
  126. package/fixtures/typescript-custom-flags/services/movies/platformatic.db.json +1 -1
  127. package/fixtures/typescript-custom-flags/services/movies/types/Movie.d.ts +3 -3
  128. package/fixtures/typescript-custom-flags/services/movies/types/index.d.ts +6 -6
  129. package/fixtures/typescript-custom-flags/services/titles/client/client.d.ts +35 -35
  130. package/fixtures/typescript-custom-flags/services/titles/platformatic.service.json +1 -1
  131. package/fixtures/typescript-no-env/platformatic.runtime.json +2 -2
  132. package/fixtures/typescript-no-env/services/composer/platformatic.composer.json +1 -1
  133. package/fixtures/typescript-no-env/services/movies/global.d.ts +2 -3
  134. package/fixtures/typescript-no-env/services/movies/platformatic.db.json +1 -1
  135. package/fixtures/typescript-no-env/services/movies/types/Movie.d.ts +3 -3
  136. package/fixtures/typescript-no-env/services/movies/types/index.d.ts +6 -6
  137. package/fixtures/typescript-no-env/services/titles/client/client.d.ts +35 -35
  138. package/fixtures/typescript-no-env/services/titles/platformatic.service.json +1 -1
  139. package/index.d.ts +7 -8
  140. package/index.js +18 -10
  141. package/index.test-d.ts +10 -12
  142. package/lib/build-server.js +11 -13
  143. package/lib/compile.js +11 -10
  144. package/lib/config.js +32 -19
  145. package/lib/dependencies.js +2 -1
  146. package/lib/errors.js +6 -3
  147. package/lib/generator/errors.js +1 -1
  148. package/lib/generator/runtime-generator.d.ts +15 -15
  149. package/lib/generator/runtime-generator.js +95 -66
  150. package/lib/logger.js +55 -0
  151. package/lib/management-api.js +40 -46
  152. package/lib/prom-server.js +5 -9
  153. package/lib/runtime.js +1012 -0
  154. package/lib/schema.js +109 -91
  155. package/lib/start.js +51 -108
  156. package/lib/upgrade.js +2 -5
  157. package/lib/utils.js +65 -1
  158. package/lib/versions/v1.36.0.js +1 -1
  159. package/lib/versions/v1.5.0.js +1 -1
  160. package/lib/versions/v2.0.0.js +26 -0
  161. package/lib/worker/app.js +266 -0
  162. package/lib/worker/default-stackable.js +33 -0
  163. package/lib/worker/itc.js +162 -0
  164. package/lib/worker/main.js +135 -0
  165. package/lib/worker/metrics.js +106 -0
  166. package/lib/worker/symbols.js +7 -0
  167. package/package.json +36 -34
  168. package/runtime.mjs +5 -5
  169. package/schema.json +639 -0
  170. package/lib/api-client.js +0 -500
  171. package/lib/api.js +0 -420
  172. package/lib/app.js +0 -397
  173. package/lib/load-config.js +0 -12
  174. package/lib/loader.mjs +0 -103
  175. package/lib/message-port-writable.js +0 -50
  176. package/lib/worker.js +0 -182
  177. /package/lib/{interceptors.js → worker/interceptors.js} +0 -0
package/schema.json ADDED
@@ -0,0 +1,639 @@
1
+ {
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.0.0-alpha.20.json",
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
+ "entrypoint": {
14
+ "type": "string"
15
+ },
16
+ "autoload": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": [
20
+ "path"
21
+ ],
22
+ "properties": {
23
+ "path": {
24
+ "type": "string",
25
+ "resolvePath": true
26
+ },
27
+ "exclude": {
28
+ "type": "array",
29
+ "default": [],
30
+ "items": {
31
+ "type": "string"
32
+ }
33
+ },
34
+ "mappings": {
35
+ "type": "object",
36
+ "additionalProperties": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": [
40
+ "id"
41
+ ],
42
+ "properties": {
43
+ "id": {
44
+ "type": "string"
45
+ },
46
+ "config": {
47
+ "type": "string"
48
+ },
49
+ "useHttp": {
50
+ "type": "boolean"
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "services": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "object",
61
+ "anyOf": [
62
+ {
63
+ "required": [
64
+ "id",
65
+ "path"
66
+ ]
67
+ },
68
+ {
69
+ "required": [
70
+ "id",
71
+ "url"
72
+ ]
73
+ }
74
+ ],
75
+ "properties": {
76
+ "id": {
77
+ "type": "string"
78
+ },
79
+ "path": {
80
+ "type": "string",
81
+ "resolvePath": true
82
+ },
83
+ "config": {
84
+ "type": "string"
85
+ },
86
+ "url": {
87
+ "type": "string"
88
+ },
89
+ "useHttp": {
90
+ "type": "boolean"
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "web": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "object",
99
+ "anyOf": [
100
+ {
101
+ "required": [
102
+ "id",
103
+ "path"
104
+ ]
105
+ },
106
+ {
107
+ "required": [
108
+ "id",
109
+ "url"
110
+ ]
111
+ }
112
+ ],
113
+ "properties": {
114
+ "id": {
115
+ "type": "string"
116
+ },
117
+ "path": {
118
+ "type": "string",
119
+ "resolvePath": true
120
+ },
121
+ "config": {
122
+ "type": "string"
123
+ },
124
+ "url": {
125
+ "type": "string"
126
+ },
127
+ "useHttp": {
128
+ "type": "boolean"
129
+ }
130
+ }
131
+ }
132
+ },
133
+ "logger": {
134
+ "type": "object",
135
+ "properties": {
136
+ "level": {
137
+ "type": "string",
138
+ "default": "info",
139
+ "oneOf": [
140
+ {
141
+ "enum": [
142
+ "fatal",
143
+ "error",
144
+ "warn",
145
+ "info",
146
+ "debug",
147
+ "trace",
148
+ "silent"
149
+ ]
150
+ },
151
+ {
152
+ "pattern": "^\\{.+\\}$"
153
+ }
154
+ ]
155
+ },
156
+ "transport": {
157
+ "anyOf": [
158
+ {
159
+ "type": "object",
160
+ "properties": {
161
+ "target": {
162
+ "type": "string",
163
+ "resolveModule": true
164
+ },
165
+ "options": {
166
+ "type": "object"
167
+ }
168
+ },
169
+ "additionalProperties": false
170
+ },
171
+ {
172
+ "type": "object",
173
+ "properties": {
174
+ "targets": {
175
+ "type": "array",
176
+ "items": {
177
+ "type": "object",
178
+ "properties": {
179
+ "target": {
180
+ "type": "string",
181
+ "resolveModule": true
182
+ },
183
+ "options": {
184
+ "type": "object"
185
+ },
186
+ "level": {
187
+ "type": "string"
188
+ },
189
+ "additionalProperties": false
190
+ }
191
+ }
192
+ },
193
+ "options": {
194
+ "type": "object"
195
+ }
196
+ },
197
+ "additionalProperties": false
198
+ }
199
+ ]
200
+ },
201
+ "pipeline": {
202
+ "type": "object",
203
+ "properties": {
204
+ "target": {
205
+ "type": "string",
206
+ "resolveModule": true
207
+ },
208
+ "options": {
209
+ "type": "object"
210
+ }
211
+ },
212
+ "additionalProperties": false
213
+ }
214
+ },
215
+ "required": [
216
+ "level"
217
+ ],
218
+ "default": {},
219
+ "additionalProperties": true
220
+ },
221
+ "server": {
222
+ "type": "object",
223
+ "properties": {
224
+ "hostname": {
225
+ "type": "string",
226
+ "default": "127.0.0.1"
227
+ },
228
+ "port": {
229
+ "anyOf": [
230
+ {
231
+ "type": "integer"
232
+ },
233
+ {
234
+ "type": "string"
235
+ }
236
+ ]
237
+ },
238
+ "http2": {
239
+ "type": "boolean"
240
+ },
241
+ "https": {
242
+ "type": "object",
243
+ "properties": {
244
+ "key": {
245
+ "anyOf": [
246
+ {
247
+ "type": "string"
248
+ },
249
+ {
250
+ "type": "object",
251
+ "properties": {
252
+ "path": {
253
+ "type": "string",
254
+ "resolvePath": true
255
+ }
256
+ },
257
+ "additionalProperties": false
258
+ },
259
+ {
260
+ "type": "array",
261
+ "items": {
262
+ "anyOf": [
263
+ {
264
+ "type": "string"
265
+ },
266
+ {
267
+ "type": "object",
268
+ "properties": {
269
+ "path": {
270
+ "type": "string",
271
+ "resolvePath": true
272
+ }
273
+ },
274
+ "additionalProperties": false
275
+ }
276
+ ]
277
+ }
278
+ }
279
+ ]
280
+ },
281
+ "cert": {
282
+ "anyOf": [
283
+ {
284
+ "type": "string"
285
+ },
286
+ {
287
+ "type": "object",
288
+ "properties": {
289
+ "path": {
290
+ "type": "string",
291
+ "resolvePath": true
292
+ }
293
+ },
294
+ "additionalProperties": false
295
+ },
296
+ {
297
+ "type": "array",
298
+ "items": {
299
+ "anyOf": [
300
+ {
301
+ "type": "string"
302
+ },
303
+ {
304
+ "type": "object",
305
+ "properties": {
306
+ "path": {
307
+ "type": "string",
308
+ "resolvePath": true
309
+ }
310
+ },
311
+ "additionalProperties": false
312
+ }
313
+ ]
314
+ }
315
+ }
316
+ ]
317
+ }
318
+ },
319
+ "additionalProperties": false,
320
+ "required": [
321
+ "key",
322
+ "cert"
323
+ ]
324
+ }
325
+ },
326
+ "additionalProperties": false
327
+ },
328
+ "restartOnError": {
329
+ "default": true,
330
+ "anyOf": [
331
+ {
332
+ "type": "boolean"
333
+ },
334
+ {
335
+ "type": "number",
336
+ "minimum": 100
337
+ }
338
+ ]
339
+ },
340
+ "undici": {
341
+ "type": "object",
342
+ "properties": {
343
+ "agentOptions": {
344
+ "type": "object",
345
+ "additionalProperties": true
346
+ },
347
+ "interceptors": {
348
+ "anyOf": [
349
+ {
350
+ "type": "array",
351
+ "items": {
352
+ "$ref": "#/$defs/undiciInterceptor"
353
+ }
354
+ },
355
+ {
356
+ "type": "object",
357
+ "properties": {
358
+ "Client": {
359
+ "type": "array",
360
+ "items": {
361
+ "$ref": "#/$defs/undiciInterceptor"
362
+ }
363
+ },
364
+ "Pool": {
365
+ "type": "array",
366
+ "items": {
367
+ "$ref": "#/$defs/undiciInterceptor"
368
+ }
369
+ },
370
+ "Agent": {
371
+ "type": "array",
372
+ "items": {
373
+ "$ref": "#/$defs/undiciInterceptor"
374
+ }
375
+ }
376
+ }
377
+ }
378
+ ]
379
+ }
380
+ }
381
+ },
382
+ "watch": {
383
+ "anyOf": [
384
+ {
385
+ "type": "boolean"
386
+ },
387
+ {
388
+ "type": "string"
389
+ }
390
+ ]
391
+ },
392
+ "managementApi": {
393
+ "anyOf": [
394
+ {
395
+ "type": "boolean"
396
+ },
397
+ {
398
+ "type": "string"
399
+ },
400
+ {
401
+ "type": "object",
402
+ "properties": {
403
+ "logs": {
404
+ "type": "object",
405
+ "properties": {
406
+ "maxSize": {
407
+ "type": "number",
408
+ "minimum": 5,
409
+ "default": 200
410
+ }
411
+ },
412
+ "additionalProperties": false
413
+ }
414
+ },
415
+ "additionalProperties": false
416
+ }
417
+ ],
418
+ "default": true
419
+ },
420
+ "metrics": {
421
+ "anyOf": [
422
+ {
423
+ "type": "boolean"
424
+ },
425
+ {
426
+ "type": "object",
427
+ "properties": {
428
+ "port": {
429
+ "anyOf": [
430
+ {
431
+ "type": "integer"
432
+ },
433
+ {
434
+ "type": "string"
435
+ }
436
+ ]
437
+ },
438
+ "hostname": {
439
+ "type": "string"
440
+ },
441
+ "endpoint": {
442
+ "type": "string"
443
+ },
444
+ "auth": {
445
+ "type": "object",
446
+ "properties": {
447
+ "username": {
448
+ "type": "string"
449
+ },
450
+ "password": {
451
+ "type": "string"
452
+ }
453
+ },
454
+ "additionalProperties": false,
455
+ "required": [
456
+ "username",
457
+ "password"
458
+ ]
459
+ },
460
+ "labels": {
461
+ "type": "object",
462
+ "additionalProperties": {
463
+ "type": "string"
464
+ }
465
+ }
466
+ },
467
+ "additionalProperties": false
468
+ }
469
+ ]
470
+ },
471
+ "telemetry": {
472
+ "$id": "/OpenTelemetry",
473
+ "type": "object",
474
+ "properties": {
475
+ "serviceName": {
476
+ "type": "string",
477
+ "description": "The name of the service. Defaults to the folder name if not specified."
478
+ },
479
+ "version": {
480
+ "type": "string",
481
+ "description": "The version of the service (optional)"
482
+ },
483
+ "skip": {
484
+ "type": "array",
485
+ "description": "An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.",
486
+ "items": {
487
+ "type": "object",
488
+ "properties": {
489
+ "path": {
490
+ "type": "string",
491
+ "description": "The path to skip. Can be a string or a regex."
492
+ },
493
+ "method": {
494
+ "description": "HTTP method to skip",
495
+ "type": "string",
496
+ "enum": [
497
+ "GET",
498
+ "POST",
499
+ "PUT",
500
+ "DELETE",
501
+ "PATCH",
502
+ "HEAD",
503
+ "OPTIONS"
504
+ ]
505
+ }
506
+ }
507
+ }
508
+ },
509
+ "exporter": {
510
+ "anyOf": [
511
+ {
512
+ "type": "array",
513
+ "items": {
514
+ "type": "object",
515
+ "properties": {
516
+ "type": {
517
+ "type": "string",
518
+ "enum": [
519
+ "console",
520
+ "otlp",
521
+ "zipkin",
522
+ "memory"
523
+ ],
524
+ "default": "console"
525
+ },
526
+ "options": {
527
+ "type": "object",
528
+ "description": "Options for the exporter. These are passed directly to the exporter.",
529
+ "properties": {
530
+ "url": {
531
+ "type": "string",
532
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
533
+ },
534
+ "headers": {
535
+ "type": "object",
536
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
537
+ }
538
+ }
539
+ },
540
+ "additionalProperties": false
541
+ }
542
+ }
543
+ },
544
+ {
545
+ "type": "object",
546
+ "properties": {
547
+ "type": {
548
+ "type": "string",
549
+ "enum": [
550
+ "console",
551
+ "otlp",
552
+ "zipkin",
553
+ "memory"
554
+ ],
555
+ "default": "console"
556
+ },
557
+ "options": {
558
+ "type": "object",
559
+ "description": "Options for the exporter. These are passed directly to the exporter.",
560
+ "properties": {
561
+ "url": {
562
+ "type": "string",
563
+ "description": "The URL to send the traces to. Not used for console or memory exporters."
564
+ },
565
+ "headers": {
566
+ "type": "object",
567
+ "description": "Headers to send to the exporter. Not used for console or memory exporters."
568
+ }
569
+ }
570
+ },
571
+ "additionalProperties": false
572
+ }
573
+ }
574
+ ]
575
+ }
576
+ },
577
+ "required": [
578
+ "serviceName"
579
+ ],
580
+ "additionalProperties": false
581
+ },
582
+ "inspectorOptions": {
583
+ "type": "object",
584
+ "properties": {
585
+ "host": {
586
+ "type": "string"
587
+ },
588
+ "port": {
589
+ "type": "number"
590
+ },
591
+ "breakFirstLine": {
592
+ "type": "boolean"
593
+ },
594
+ "watchDisabled": {
595
+ "type": "boolean"
596
+ }
597
+ }
598
+ }
599
+ },
600
+ "anyOf": [
601
+ {
602
+ "required": [
603
+ "autoload",
604
+ "entrypoint"
605
+ ]
606
+ },
607
+ {
608
+ "required": [
609
+ "services",
610
+ "entrypoint"
611
+ ]
612
+ },
613
+ {
614
+ "required": [
615
+ "web",
616
+ "entrypoint"
617
+ ]
618
+ }
619
+ ],
620
+ "additionalProperties": false,
621
+ "$defs": {
622
+ "undiciInterceptor": {
623
+ "type": "object",
624
+ "properties": {
625
+ "module": {
626
+ "type": "string"
627
+ },
628
+ "options": {
629
+ "type": "object",
630
+ "additionalProperties": true
631
+ }
632
+ },
633
+ "required": [
634
+ "module",
635
+ "options"
636
+ ]
637
+ }
638
+ }
639
+ }