@platformatic/nest 3.71.1-alpha.0 → 4.0.0-alpha.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.
- package/config.d.ts +761 -827
- package/index.d.ts +8 -1
- package/index.js +9 -9
- package/lib/capability.js +62 -39
- package/lib/factory.js +7 -0
- package/lib/schema.js +5 -2
- package/package.json +14 -8
- package/schema.js +7 -0
- package/schema.json +180 -390
package/config.d.ts
CHANGED
|
@@ -5,911 +5,845 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
export type ApplicationEntry = {
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
|
|
8
12
|
export interface PlatformaticNestJSConfig {
|
|
9
13
|
$schema?: string;
|
|
10
14
|
module?: string;
|
|
11
|
-
logger?:
|
|
15
|
+
logger?: AppLoggerOptions;
|
|
16
|
+
server?: AppServerOptions;
|
|
17
|
+
watch?: WatchOptions | boolean | string;
|
|
18
|
+
application?: BuildableApplicationOptions;
|
|
19
|
+
runtime?: {
|
|
20
|
+
preload?: string | string[];
|
|
21
|
+
extensions?: string | ExtensionEntry | (string | ExtensionEntry1)[];
|
|
22
|
+
basePath?: string;
|
|
23
|
+
services?: ApplicationEntry[];
|
|
24
|
+
workers?: number | string | WorkersOptions;
|
|
25
|
+
workersRestartDelay?: number | string;
|
|
26
|
+
logger?: AppLoggerOptions1;
|
|
27
|
+
reuseTcpPorts?: boolean;
|
|
28
|
+
startTimeout?: number;
|
|
29
|
+
restartOnError?: boolean | number;
|
|
30
|
+
exitOnUnhandledErrors?: boolean | number;
|
|
31
|
+
gracefulShutdown?: GracefulShutdownOptions;
|
|
32
|
+
health?: HealthOptions;
|
|
33
|
+
healthProbes?: boolean | string | HealthProbesOptions;
|
|
34
|
+
undici?: UndiciOptions;
|
|
35
|
+
httpCache?: boolean | HttpCacheOptions;
|
|
36
|
+
watch?: boolean | string;
|
|
37
|
+
managementApi?: boolean | string | ManagementApiOptions;
|
|
38
|
+
management?:
|
|
39
|
+
| boolean
|
|
40
|
+
| {
|
|
41
|
+
enabled?: boolean;
|
|
42
|
+
operations?: string[];
|
|
43
|
+
};
|
|
44
|
+
metrics?: boolean | MetricsOptions;
|
|
45
|
+
tracing?: TelemetryOptions;
|
|
46
|
+
inspectorOptions?: {
|
|
47
|
+
host?: string;
|
|
48
|
+
port?: number;
|
|
49
|
+
breakFirstLine?: boolean;
|
|
50
|
+
watchDisabled?: boolean;
|
|
51
|
+
[k: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
applicationTimeout?: number | string;
|
|
54
|
+
startupConcurrency?: number | string;
|
|
55
|
+
messagingTimeout?: number | string;
|
|
56
|
+
env?: {
|
|
57
|
+
[k: string]: string;
|
|
58
|
+
};
|
|
59
|
+
envfile?: string;
|
|
12
60
|
/**
|
|
13
|
-
*
|
|
61
|
+
* When set to true, the configuration loading fails if a {PLT_*} placeholder references an environment variable which is not set. When set to "warn", a warning listing the missing variables is logged but the placeholders are still replaced with an empty string. Defaults to false.
|
|
14
62
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
63
|
+
strictEnv?: boolean | string;
|
|
64
|
+
sourceMaps?: boolean;
|
|
65
|
+
nodeModulesSourceMaps?: string[];
|
|
66
|
+
policies?: {
|
|
67
|
+
deny: {
|
|
68
|
+
/**
|
|
69
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
70
|
+
* via the `patternProperty` "^.*$".
|
|
71
|
+
*/
|
|
72
|
+
[k: string]: string | [string, ...string[]];
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
compileCache?: boolean | CompileCacheOptions;
|
|
76
|
+
application?: {
|
|
77
|
+
reuseTcpPorts?: boolean;
|
|
78
|
+
workers?: number | string | ApplicationWorkersOptions;
|
|
79
|
+
health?: ApplicationHealthOptions;
|
|
80
|
+
/**
|
|
81
|
+
* Overrides the runtime-level restartOnError for this application. Set to false or 0 to never restart the application when it crashes, a positive number to wait that amount of milliseconds between restarts, or true to use the default delay.
|
|
82
|
+
*/
|
|
83
|
+
restartOnError?: boolean | number;
|
|
84
|
+
arguments?: string[];
|
|
85
|
+
env?: {
|
|
86
|
+
[k: string]: string;
|
|
87
|
+
};
|
|
88
|
+
envfile?: string;
|
|
89
|
+
sourceMaps?: boolean;
|
|
90
|
+
nodeModulesSourceMaps?: string[];
|
|
91
|
+
packageManager?: "npm" | "pnpm" | "yarn";
|
|
92
|
+
preload?: string | string[];
|
|
93
|
+
nodeOptions?: string;
|
|
94
|
+
execArgv?: string[];
|
|
95
|
+
permissions?: PermissionsOptions;
|
|
96
|
+
tracing?: ApplicationTelemetryOverrides;
|
|
97
|
+
compileCache?: boolean | CompileCacheOptions1;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
nest?: {
|
|
101
|
+
adapter?: "express" | "fastify";
|
|
102
|
+
appModule?: {
|
|
103
|
+
path?: string;
|
|
104
|
+
name?: string;
|
|
105
|
+
};
|
|
106
|
+
setup?: {
|
|
107
|
+
path?: string;
|
|
108
|
+
name?: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export interface AppLoggerOptions {
|
|
113
|
+
/**
|
|
114
|
+
* A standard Pino log level or a level defined in customLevels.
|
|
115
|
+
*/
|
|
116
|
+
level?: string;
|
|
117
|
+
transport?:
|
|
118
|
+
| {
|
|
119
|
+
target?: string;
|
|
120
|
+
options?: {
|
|
121
|
+
[k: string]: unknown;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
| {
|
|
125
|
+
targets?: {
|
|
18
126
|
target?: string;
|
|
19
127
|
options?: {
|
|
20
128
|
[k: string]: unknown;
|
|
21
129
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
130
|
+
level?: string;
|
|
131
|
+
}[];
|
|
132
|
+
options?: {
|
|
133
|
+
[k: string]: unknown;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
pipeline?: {
|
|
137
|
+
target?: string;
|
|
138
|
+
options?: {
|
|
139
|
+
[k: string]: unknown;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
formatters?: {
|
|
143
|
+
path: string;
|
|
144
|
+
};
|
|
145
|
+
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
146
|
+
redact?: {
|
|
147
|
+
paths: string[];
|
|
148
|
+
censor?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Remove the redacted keys entirely instead of replacing their values with the censor. Defaults to false.
|
|
151
|
+
*/
|
|
152
|
+
remove?: boolean;
|
|
153
|
+
};
|
|
154
|
+
base?: {
|
|
155
|
+
[k: string]: unknown;
|
|
156
|
+
} | null;
|
|
157
|
+
messageKey?: string;
|
|
158
|
+
customLevels?: {
|
|
159
|
+
[k: string]: unknown;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* The numeric value of the level defined in level, when it is not one of the standard pino levels.
|
|
163
|
+
*/
|
|
164
|
+
levelVal?: number;
|
|
165
|
+
/**
|
|
166
|
+
* Only use the levels defined in customLevels and omit the standard pino ones.
|
|
167
|
+
*/
|
|
168
|
+
useOnlyCustomLevels?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* How log levels are compared to the logger level. Use DESC when lower values are more severe. Defaults to ASC.
|
|
171
|
+
*/
|
|
172
|
+
levelComparison?: "ASC" | "DESC";
|
|
173
|
+
/**
|
|
174
|
+
* A string prefixed to every message, including the ones of child loggers.
|
|
175
|
+
*/
|
|
176
|
+
msgPrefix?: string;
|
|
177
|
+
/**
|
|
178
|
+
* The key under which any logged object is placed.
|
|
179
|
+
*/
|
|
180
|
+
nestedKey?: string;
|
|
181
|
+
/**
|
|
182
|
+
* The key used for the serialized error in the log object. Defaults to err.
|
|
183
|
+
*/
|
|
184
|
+
errorKey?: string;
|
|
185
|
+
/**
|
|
186
|
+
* The stringification limit at a specific nesting depth when logging circular objects. Defaults to 5.
|
|
187
|
+
*/
|
|
188
|
+
depthLimit?: number;
|
|
189
|
+
/**
|
|
190
|
+
* The stringification limit of properties or elements when logging a circular object or array. Defaults to 100.
|
|
191
|
+
*/
|
|
192
|
+
edgeLimit?: number;
|
|
193
|
+
/**
|
|
194
|
+
* Terminate each log line with \r\n instead of \n. Defaults to false.
|
|
195
|
+
*/
|
|
196
|
+
crlf?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Set to false to disable logging entirely. Defaults to true.
|
|
199
|
+
*/
|
|
200
|
+
enabled?: boolean;
|
|
201
|
+
openTelemetryExporter?: {
|
|
202
|
+
protocol: "grpc" | "http";
|
|
203
|
+
url: string;
|
|
204
|
+
};
|
|
205
|
+
[k: string]: unknown;
|
|
206
|
+
}
|
|
207
|
+
export interface AppServerOptions {
|
|
208
|
+
hostname?: string;
|
|
209
|
+
port?: number | string;
|
|
210
|
+
/**
|
|
211
|
+
* Configures how the port is assigned when the application runs multiple workers. When set to shared (the default), all workers listen on the same port (which requires SO_REUSEPORT support). When set to perWorkerIncrement, each worker listens on its own port, starting from port (worker 0) and incrementing by one for each additional worker.
|
|
212
|
+
*/
|
|
213
|
+
portAssignment?: "shared" | "perWorkerIncrement";
|
|
214
|
+
/**
|
|
215
|
+
* The maximum length of the queue of pending connections
|
|
216
|
+
*/
|
|
217
|
+
backlog?: number;
|
|
218
|
+
http2?: boolean;
|
|
219
|
+
https?: HttpsOptions;
|
|
220
|
+
}
|
|
221
|
+
export interface HttpsOptions {
|
|
222
|
+
allowHTTP1?: boolean;
|
|
223
|
+
key:
|
|
224
|
+
| string
|
|
225
|
+
| {
|
|
226
|
+
path?: string;
|
|
227
|
+
}
|
|
228
|
+
| (
|
|
229
|
+
| string
|
|
230
|
+
| {
|
|
231
|
+
path?: string;
|
|
232
|
+
}
|
|
233
|
+
)[];
|
|
234
|
+
cert:
|
|
235
|
+
| string
|
|
236
|
+
| {
|
|
237
|
+
path?: string;
|
|
238
|
+
}
|
|
239
|
+
| (
|
|
240
|
+
| string
|
|
241
|
+
| {
|
|
242
|
+
path?: string;
|
|
243
|
+
}
|
|
244
|
+
)[];
|
|
245
|
+
requestCert?: boolean;
|
|
246
|
+
rejectUnauthorized?: boolean;
|
|
247
|
+
}
|
|
248
|
+
export interface WatchOptions {
|
|
249
|
+
enabled?: boolean | string;
|
|
250
|
+
/**
|
|
251
|
+
* @minItems 1
|
|
252
|
+
*/
|
|
253
|
+
allow?: [string, ...string[]];
|
|
254
|
+
ignore?: string[];
|
|
255
|
+
}
|
|
256
|
+
export interface BuildableApplicationOptions {
|
|
257
|
+
basePath?: string;
|
|
258
|
+
outputDirectory?: string;
|
|
259
|
+
include?: string[];
|
|
260
|
+
commands?: {
|
|
261
|
+
install?: string;
|
|
262
|
+
build?: string;
|
|
263
|
+
development?: string;
|
|
264
|
+
production?: string;
|
|
265
|
+
};
|
|
266
|
+
changeDirectoryBeforeExecution?: boolean;
|
|
267
|
+
preferLocalCommands?: boolean;
|
|
268
|
+
processSpawner?: string;
|
|
269
|
+
}
|
|
270
|
+
export interface ExtensionEntry {
|
|
271
|
+
path: string;
|
|
272
|
+
options?: {
|
|
273
|
+
[k: string]: unknown;
|
|
274
|
+
};
|
|
275
|
+
build?: boolean;
|
|
276
|
+
}
|
|
277
|
+
export interface ExtensionEntry1 {
|
|
278
|
+
path: string;
|
|
279
|
+
options?: {
|
|
280
|
+
[k: string]: unknown;
|
|
281
|
+
};
|
|
282
|
+
build?: boolean;
|
|
283
|
+
}
|
|
284
|
+
export interface WorkersOptions {
|
|
285
|
+
static?: number;
|
|
286
|
+
dynamic?: boolean;
|
|
287
|
+
minimum?: number;
|
|
288
|
+
maximum?: number;
|
|
289
|
+
total?: number;
|
|
290
|
+
maxMemory?: number;
|
|
291
|
+
eluThreshold?: number;
|
|
292
|
+
heapThresholdMb?: number;
|
|
293
|
+
processIntervalMs?: number;
|
|
294
|
+
maxScaleUpStep?: number;
|
|
295
|
+
redistributionMs?: number;
|
|
296
|
+
alphaUp?: number;
|
|
297
|
+
alphaDown?: number;
|
|
298
|
+
betaUp?: number;
|
|
299
|
+
betaDown?: number;
|
|
300
|
+
cooldowns?: {
|
|
301
|
+
scaleUpAfterScaleUpMs?: number;
|
|
302
|
+
scaleUpAfterScaleDownMs?: number;
|
|
303
|
+
scaleDownAfterScaleUpMs?: number;
|
|
304
|
+
scaleDownAfterScaleDownMs?: number;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
export interface AppLoggerOptions1 {
|
|
308
|
+
/**
|
|
309
|
+
* A standard Pino log level or a level defined in customLevels.
|
|
310
|
+
*/
|
|
311
|
+
level?: string;
|
|
312
|
+
transport?:
|
|
313
|
+
| {
|
|
314
|
+
target?: string;
|
|
315
|
+
options?: {
|
|
316
|
+
[k: string]: unknown;
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
| {
|
|
320
|
+
targets?: {
|
|
321
|
+
target?: string;
|
|
31
322
|
options?: {
|
|
32
323
|
[k: string]: unknown;
|
|
33
324
|
};
|
|
325
|
+
level?: string;
|
|
326
|
+
}[];
|
|
327
|
+
options?: {
|
|
328
|
+
[k: string]: unknown;
|
|
34
329
|
};
|
|
35
|
-
pipeline?: {
|
|
36
|
-
target?: string;
|
|
37
|
-
options?: {
|
|
38
|
-
[k: string]: unknown;
|
|
39
330
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
45
|
-
redact?: {
|
|
46
|
-
paths: string[];
|
|
47
|
-
censor?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Remove the redacted keys entirely instead of replacing their values with the censor. Defaults to false.
|
|
50
|
-
*/
|
|
51
|
-
remove?: boolean;
|
|
52
|
-
};
|
|
53
|
-
base?: {
|
|
54
|
-
[k: string]: unknown;
|
|
55
|
-
} | null;
|
|
56
|
-
messageKey?: string;
|
|
57
|
-
customLevels?: {
|
|
331
|
+
pipeline?: {
|
|
332
|
+
target?: string;
|
|
333
|
+
options?: {
|
|
58
334
|
[k: string]: unknown;
|
|
59
335
|
};
|
|
336
|
+
};
|
|
337
|
+
formatters?: {
|
|
338
|
+
path: string;
|
|
339
|
+
};
|
|
340
|
+
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
341
|
+
redact?: {
|
|
342
|
+
paths: string[];
|
|
343
|
+
censor?: string;
|
|
60
344
|
/**
|
|
61
|
-
*
|
|
345
|
+
* Remove the redacted keys entirely instead of replacing their values with the censor. Defaults to false.
|
|
62
346
|
*/
|
|
63
|
-
|
|
347
|
+
remove?: boolean;
|
|
348
|
+
};
|
|
349
|
+
base?: {
|
|
350
|
+
[k: string]: unknown;
|
|
351
|
+
} | null;
|
|
352
|
+
messageKey?: string;
|
|
353
|
+
customLevels?: {
|
|
354
|
+
[k: string]: unknown;
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* The numeric value of the level defined in level, when it is not one of the standard pino levels.
|
|
358
|
+
*/
|
|
359
|
+
levelVal?: number;
|
|
360
|
+
/**
|
|
361
|
+
* Only use the levels defined in customLevels and omit the standard pino ones.
|
|
362
|
+
*/
|
|
363
|
+
useOnlyCustomLevels?: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* How log levels are compared to the logger level. Use DESC when lower values are more severe. Defaults to ASC.
|
|
366
|
+
*/
|
|
367
|
+
levelComparison?: "ASC" | "DESC";
|
|
368
|
+
/**
|
|
369
|
+
* A string prefixed to every message, including the ones of child loggers.
|
|
370
|
+
*/
|
|
371
|
+
msgPrefix?: string;
|
|
372
|
+
/**
|
|
373
|
+
* The key under which any logged object is placed.
|
|
374
|
+
*/
|
|
375
|
+
nestedKey?: string;
|
|
376
|
+
/**
|
|
377
|
+
* The key used for the serialized error in the log object. Defaults to err.
|
|
378
|
+
*/
|
|
379
|
+
errorKey?: string;
|
|
380
|
+
/**
|
|
381
|
+
* The stringification limit at a specific nesting depth when logging circular objects. Defaults to 5.
|
|
382
|
+
*/
|
|
383
|
+
depthLimit?: number;
|
|
384
|
+
/**
|
|
385
|
+
* The stringification limit of properties or elements when logging a circular object or array. Defaults to 100.
|
|
386
|
+
*/
|
|
387
|
+
edgeLimit?: number;
|
|
388
|
+
/**
|
|
389
|
+
* Terminate each log line with \r\n instead of \n. Defaults to false.
|
|
390
|
+
*/
|
|
391
|
+
crlf?: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Set to false to disable logging entirely. Defaults to true.
|
|
394
|
+
*/
|
|
395
|
+
enabled?: boolean;
|
|
396
|
+
openTelemetryExporter?: {
|
|
397
|
+
protocol: "grpc" | "http";
|
|
398
|
+
url: string;
|
|
399
|
+
};
|
|
400
|
+
[k: string]: unknown;
|
|
401
|
+
}
|
|
402
|
+
export interface GracefulShutdownOptions {
|
|
403
|
+
runtime: number | string;
|
|
404
|
+
application: number | string;
|
|
405
|
+
/**
|
|
406
|
+
* Add Connection: close header to HTTP responses during graceful shutdown
|
|
407
|
+
*/
|
|
408
|
+
closeConnections?: boolean;
|
|
409
|
+
}
|
|
410
|
+
export interface HealthOptions {
|
|
411
|
+
enabled?: boolean | string;
|
|
412
|
+
interval?: number | string;
|
|
413
|
+
gracePeriod?: number | string;
|
|
414
|
+
maxUnhealthyChecks?: number | string;
|
|
415
|
+
maxELU?: number | string;
|
|
416
|
+
maxEventLoopDelay?: number | string;
|
|
417
|
+
maxEventLoopDelayP99?: number | string;
|
|
418
|
+
maxHeapUsed?: number | string;
|
|
419
|
+
maxHeapTotal?: number | string;
|
|
420
|
+
maxYoungGeneration?: number | string;
|
|
421
|
+
codeRangeSize?: number | string;
|
|
422
|
+
bufferPoolSize?: number | string;
|
|
423
|
+
defaultHighWaterMark?: number | string;
|
|
424
|
+
}
|
|
425
|
+
export interface HealthProbesOptions {
|
|
426
|
+
enabled?: boolean | string;
|
|
427
|
+
hostname?: string;
|
|
428
|
+
port?: number | string;
|
|
429
|
+
readiness?:
|
|
430
|
+
| boolean
|
|
431
|
+
| {
|
|
432
|
+
endpoint?: string;
|
|
433
|
+
success?: {
|
|
434
|
+
statusCode?: number;
|
|
435
|
+
body?: string;
|
|
436
|
+
};
|
|
437
|
+
fail?: {
|
|
438
|
+
statusCode?: number;
|
|
439
|
+
body?: string;
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
liveness?:
|
|
443
|
+
| boolean
|
|
444
|
+
| {
|
|
445
|
+
endpoint?: string;
|
|
446
|
+
success?: {
|
|
447
|
+
statusCode?: number;
|
|
448
|
+
body?: string;
|
|
449
|
+
};
|
|
450
|
+
fail?: {
|
|
451
|
+
statusCode?: number;
|
|
452
|
+
body?: string;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
export interface UndiciOptions {
|
|
457
|
+
agentOptions?: {
|
|
458
|
+
[k: string]: unknown;
|
|
459
|
+
};
|
|
460
|
+
interceptors?:
|
|
461
|
+
| {
|
|
462
|
+
module: string;
|
|
463
|
+
options: {
|
|
464
|
+
[k: string]: unknown;
|
|
465
|
+
};
|
|
466
|
+
[k: string]: unknown;
|
|
467
|
+
}[]
|
|
468
|
+
| {
|
|
469
|
+
Client?: {
|
|
470
|
+
module: string;
|
|
471
|
+
options: {
|
|
472
|
+
[k: string]: unknown;
|
|
473
|
+
};
|
|
474
|
+
[k: string]: unknown;
|
|
475
|
+
}[];
|
|
476
|
+
Pool?: {
|
|
477
|
+
module: string;
|
|
478
|
+
options: {
|
|
479
|
+
[k: string]: unknown;
|
|
480
|
+
};
|
|
481
|
+
[k: string]: unknown;
|
|
482
|
+
}[];
|
|
483
|
+
Agent?: {
|
|
484
|
+
module: string;
|
|
485
|
+
options: {
|
|
486
|
+
[k: string]: unknown;
|
|
487
|
+
};
|
|
488
|
+
[k: string]: unknown;
|
|
489
|
+
}[];
|
|
490
|
+
[k: string]: unknown;
|
|
491
|
+
};
|
|
492
|
+
[k: string]: unknown;
|
|
493
|
+
}
|
|
494
|
+
export interface HttpCacheOptions {
|
|
495
|
+
store?: string;
|
|
496
|
+
/**
|
|
497
|
+
* @minItems 1
|
|
498
|
+
*/
|
|
499
|
+
methods?: [string, ...string[]];
|
|
500
|
+
cacheTagsHeader?: string;
|
|
501
|
+
maxSize?: number;
|
|
502
|
+
maxEntrySize?: number;
|
|
503
|
+
maxCount?: number;
|
|
504
|
+
/**
|
|
505
|
+
* Whitelist of origins to cache. Supports exact strings and regex patterns (e.g., "/https:\\/\\/.*\\.example\\.com/").
|
|
506
|
+
*/
|
|
507
|
+
origins?: string[];
|
|
508
|
+
/**
|
|
509
|
+
* Default cache duration in seconds for responses without explicit expiration headers.
|
|
510
|
+
*/
|
|
511
|
+
cacheByDefault?: number;
|
|
512
|
+
/**
|
|
513
|
+
* Cache type. "shared" caches may be shared between users, "private" caches are user-specific.
|
|
514
|
+
*/
|
|
515
|
+
type?: "shared" | "private";
|
|
516
|
+
[k: string]: unknown;
|
|
517
|
+
}
|
|
518
|
+
export interface ManagementApiOptions {
|
|
519
|
+
logs?: {
|
|
520
|
+
maxSize?: number;
|
|
521
|
+
};
|
|
522
|
+
/**
|
|
523
|
+
* Custom path for the control socket. If not specified, uses the default platform-specific location.
|
|
524
|
+
*/
|
|
525
|
+
socket?: string;
|
|
526
|
+
}
|
|
527
|
+
export interface MetricsOptions {
|
|
528
|
+
port?: number | string;
|
|
529
|
+
enabled?: boolean | string;
|
|
530
|
+
hostname?: string;
|
|
531
|
+
endpoint?: string;
|
|
532
|
+
https?: HttpsOptions1;
|
|
533
|
+
auth?: {
|
|
534
|
+
username: string;
|
|
535
|
+
password: string;
|
|
536
|
+
};
|
|
537
|
+
labels?: {
|
|
538
|
+
[k: string]: string;
|
|
539
|
+
};
|
|
540
|
+
/**
|
|
541
|
+
* The label name to use for the application identifier in metrics (e.g., applicationId, serviceId)
|
|
542
|
+
*/
|
|
543
|
+
applicationLabel?: string;
|
|
544
|
+
/**
|
|
545
|
+
* Enable outgoing HTTP client request duration metrics
|
|
546
|
+
*/
|
|
547
|
+
httpClientMetrics?: boolean | string;
|
|
548
|
+
readiness?:
|
|
549
|
+
| boolean
|
|
550
|
+
| {
|
|
551
|
+
endpoint?: string;
|
|
552
|
+
success?: {
|
|
553
|
+
statusCode?: number;
|
|
554
|
+
body?: string;
|
|
555
|
+
};
|
|
556
|
+
fail?: {
|
|
557
|
+
statusCode?: number;
|
|
558
|
+
body?: string;
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
liveness?:
|
|
562
|
+
| boolean
|
|
563
|
+
| {
|
|
564
|
+
endpoint?: string;
|
|
565
|
+
success?: {
|
|
566
|
+
statusCode?: number;
|
|
567
|
+
body?: string;
|
|
568
|
+
};
|
|
569
|
+
fail?: {
|
|
570
|
+
statusCode?: number;
|
|
571
|
+
body?: string;
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
/**
|
|
575
|
+
* @deprecated
|
|
576
|
+
* Deprecated. Health probe timeout configuration is no longer used.
|
|
577
|
+
*/
|
|
578
|
+
healthChecksTimeouts?: number | string;
|
|
579
|
+
plugins?: string[];
|
|
580
|
+
timeout?: number | string;
|
|
581
|
+
/**
|
|
582
|
+
* Configuration for exporting metrics to an OTLP endpoint
|
|
583
|
+
*/
|
|
584
|
+
otlpExporter?: {
|
|
64
585
|
/**
|
|
65
|
-
*
|
|
586
|
+
* Enable or disable OTLP metrics export
|
|
66
587
|
*/
|
|
67
|
-
|
|
588
|
+
enabled?: boolean | string;
|
|
68
589
|
/**
|
|
69
|
-
*
|
|
590
|
+
* OTLP endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
70
591
|
*/
|
|
71
|
-
|
|
592
|
+
endpoint: string;
|
|
72
593
|
/**
|
|
73
|
-
*
|
|
594
|
+
* Interval in milliseconds between metric pushes
|
|
74
595
|
*/
|
|
75
|
-
|
|
596
|
+
interval?: number | string;
|
|
76
597
|
/**
|
|
77
|
-
*
|
|
598
|
+
* Additional HTTP headers for authentication
|
|
78
599
|
*/
|
|
79
|
-
|
|
600
|
+
headers?: {
|
|
601
|
+
[k: string]: string;
|
|
602
|
+
};
|
|
80
603
|
/**
|
|
81
|
-
*
|
|
604
|
+
* Service name for OTLP resource attributes
|
|
82
605
|
*/
|
|
83
|
-
|
|
606
|
+
serviceName?: string;
|
|
84
607
|
/**
|
|
85
|
-
*
|
|
608
|
+
* Service version for OTLP resource attributes
|
|
86
609
|
*/
|
|
87
|
-
|
|
610
|
+
serviceVersion?: string;
|
|
611
|
+
};
|
|
612
|
+
/**
|
|
613
|
+
* Configuration for forwarding user OpenTelemetry metrics to an OTLP endpoint
|
|
614
|
+
*/
|
|
615
|
+
opentelemetry?: {
|
|
88
616
|
/**
|
|
89
|
-
*
|
|
617
|
+
* Enable or disable OpenTelemetry metrics forwarding
|
|
90
618
|
*/
|
|
91
|
-
|
|
619
|
+
enabled?: boolean | string;
|
|
92
620
|
/**
|
|
93
|
-
*
|
|
621
|
+
* OTLP metrics endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
94
622
|
*/
|
|
95
|
-
|
|
623
|
+
endpoint: string;
|
|
96
624
|
/**
|
|
97
|
-
*
|
|
625
|
+
* Interval in milliseconds between metric forwards
|
|
98
626
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
627
|
+
interval?: number | string;
|
|
628
|
+
/**
|
|
629
|
+
* Additional HTTP headers for authentication
|
|
630
|
+
*/
|
|
631
|
+
headers?: {
|
|
632
|
+
[k: string]: string;
|
|
103
633
|
};
|
|
104
|
-
[k: string]: unknown;
|
|
105
634
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
635
|
+
/**
|
|
636
|
+
* Custom labels to add to HTTP metrics (http_request_all_duration_seconds). Each label extracts its value from an HTTP request header.
|
|
637
|
+
*/
|
|
638
|
+
httpCustomLabels?: {
|
|
109
639
|
/**
|
|
110
|
-
*
|
|
640
|
+
* The label name to use in metrics
|
|
111
641
|
*/
|
|
112
|
-
|
|
642
|
+
name: string;
|
|
113
643
|
/**
|
|
114
|
-
* The
|
|
644
|
+
* The HTTP request header to extract the value from
|
|
115
645
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
646
|
+
header: string;
|
|
647
|
+
/**
|
|
648
|
+
* Default value when header is missing (defaults to "unknown")
|
|
649
|
+
*/
|
|
650
|
+
default?: string;
|
|
651
|
+
}[];
|
|
652
|
+
}
|
|
653
|
+
export interface HttpsOptions1 {
|
|
654
|
+
allowHTTP1?: boolean;
|
|
655
|
+
key:
|
|
656
|
+
| string
|
|
657
|
+
| {
|
|
658
|
+
path?: string;
|
|
659
|
+
}
|
|
660
|
+
| (
|
|
121
661
|
| string
|
|
122
662
|
| {
|
|
123
663
|
path?: string;
|
|
124
664
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
665
|
+
)[];
|
|
666
|
+
cert:
|
|
667
|
+
| string
|
|
668
|
+
| {
|
|
669
|
+
path?: string;
|
|
670
|
+
}
|
|
671
|
+
| (
|
|
132
672
|
| string
|
|
133
673
|
| {
|
|
134
674
|
path?: string;
|
|
135
675
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
676
|
+
)[];
|
|
677
|
+
requestCert?: boolean;
|
|
678
|
+
rejectUnauthorized?: boolean;
|
|
679
|
+
}
|
|
680
|
+
export interface TelemetryOptions {
|
|
681
|
+
enabled?: boolean | string;
|
|
682
|
+
/**
|
|
683
|
+
* The name of the application. Defaults to the folder name if not specified.
|
|
684
|
+
*/
|
|
685
|
+
applicationName: string;
|
|
686
|
+
/**
|
|
687
|
+
* The version of the application (optional)
|
|
688
|
+
*/
|
|
689
|
+
version?: string;
|
|
690
|
+
/**
|
|
691
|
+
* An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.
|
|
692
|
+
*/
|
|
693
|
+
skip?: {
|
|
694
|
+
/**
|
|
695
|
+
* The path to skip. Can be a string or a regex.
|
|
696
|
+
*/
|
|
697
|
+
path?: string;
|
|
698
|
+
/**
|
|
699
|
+
* HTTP method to skip
|
|
700
|
+
*/
|
|
701
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
702
|
+
[k: string]: unknown;
|
|
703
|
+
}[];
|
|
704
|
+
exporter?:
|
|
147
705
|
| {
|
|
148
|
-
|
|
706
|
+
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
149
707
|
/**
|
|
150
|
-
*
|
|
708
|
+
* Options for the exporter. These are passed directly to the exporter.
|
|
151
709
|
*/
|
|
152
|
-
allow?: [string, ...string[]];
|
|
153
|
-
ignore?: string[];
|
|
154
|
-
}
|
|
155
|
-
| boolean
|
|
156
|
-
| string;
|
|
157
|
-
application?: {
|
|
158
|
-
basePath?: string;
|
|
159
|
-
outputDirectory?: string;
|
|
160
|
-
include?: string[];
|
|
161
|
-
commands?: {
|
|
162
|
-
install?: string;
|
|
163
|
-
build?: string;
|
|
164
|
-
development?: string;
|
|
165
|
-
production?: string;
|
|
166
|
-
};
|
|
167
|
-
entrypointPort?: number;
|
|
168
|
-
changeDirectoryBeforeExecution?: boolean;
|
|
169
|
-
preferLocalCommands?: boolean;
|
|
170
|
-
processSpawner?: string;
|
|
171
|
-
};
|
|
172
|
-
runtime?: {
|
|
173
|
-
preload?: string | string[];
|
|
174
|
-
extensions?:
|
|
175
|
-
| string
|
|
176
|
-
| {
|
|
177
|
-
path: string;
|
|
178
|
-
options?: {
|
|
179
|
-
[k: string]: unknown;
|
|
180
|
-
};
|
|
181
|
-
build?: boolean;
|
|
182
|
-
}
|
|
183
|
-
| (
|
|
184
|
-
| string
|
|
185
|
-
| {
|
|
186
|
-
path: string;
|
|
187
|
-
options?: {
|
|
188
|
-
[k: string]: unknown;
|
|
189
|
-
};
|
|
190
|
-
build?: boolean;
|
|
191
|
-
}
|
|
192
|
-
)[];
|
|
193
|
-
basePath?: string;
|
|
194
|
-
services?: {
|
|
195
|
-
[k: string]: unknown;
|
|
196
|
-
}[];
|
|
197
|
-
workers?:
|
|
198
|
-
| number
|
|
199
|
-
| string
|
|
200
|
-
| {
|
|
201
|
-
static?: number;
|
|
202
|
-
dynamic?: boolean;
|
|
203
|
-
minimum?: number;
|
|
204
|
-
maximum?: number;
|
|
205
|
-
total?: number;
|
|
206
|
-
maxMemory?: number;
|
|
207
|
-
cooldown?: number;
|
|
208
|
-
gracePeriod?: number;
|
|
209
|
-
scaleUpELU?: number;
|
|
210
|
-
scaleDownELU?: number;
|
|
211
|
-
[k: string]: unknown;
|
|
212
|
-
};
|
|
213
|
-
workersRestartDelay?: number | string;
|
|
214
|
-
logger?: {
|
|
215
|
-
/**
|
|
216
|
-
* The log level. It must be one of the standard pino levels (fatal, error, warn, info, debug, trace, silent) or, when customLevels is set, one of the custom levels.
|
|
217
|
-
*/
|
|
218
|
-
level?: string;
|
|
219
|
-
transport?:
|
|
220
|
-
| {
|
|
221
|
-
target?: string;
|
|
222
|
-
options?: {
|
|
223
|
-
[k: string]: unknown;
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
| {
|
|
227
|
-
targets?: {
|
|
228
|
-
target?: string;
|
|
229
|
-
options?: {
|
|
230
|
-
[k: string]: unknown;
|
|
231
|
-
};
|
|
232
|
-
level?: string;
|
|
233
|
-
}[];
|
|
234
|
-
options?: {
|
|
235
|
-
[k: string]: unknown;
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
pipeline?: {
|
|
239
|
-
target?: string;
|
|
240
710
|
options?: {
|
|
241
|
-
[k: string]: unknown;
|
|
242
|
-
};
|
|
243
|
-
};
|
|
244
|
-
formatters?: {
|
|
245
|
-
path: string;
|
|
246
|
-
};
|
|
247
|
-
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
248
|
-
redact?: {
|
|
249
|
-
paths: string[];
|
|
250
|
-
censor?: string;
|
|
251
|
-
/**
|
|
252
|
-
* Remove the redacted keys entirely instead of replacing their values with the censor. Defaults to false.
|
|
253
|
-
*/
|
|
254
|
-
remove?: boolean;
|
|
255
|
-
};
|
|
256
|
-
base?: {
|
|
257
|
-
[k: string]: unknown;
|
|
258
|
-
} | null;
|
|
259
|
-
messageKey?: string;
|
|
260
|
-
customLevels?: {
|
|
261
|
-
[k: string]: unknown;
|
|
262
|
-
};
|
|
263
|
-
/**
|
|
264
|
-
* The numeric value of the level defined in level, when it is not one of the standard pino levels.
|
|
265
|
-
*/
|
|
266
|
-
levelVal?: number;
|
|
267
|
-
/**
|
|
268
|
-
* Only use the levels defined in customLevels and omit the standard pino ones.
|
|
269
|
-
*/
|
|
270
|
-
useOnlyCustomLevels?: boolean;
|
|
271
|
-
/**
|
|
272
|
-
* How log levels are compared to the logger level. Use DESC when lower values are more severe. Defaults to ASC.
|
|
273
|
-
*/
|
|
274
|
-
levelComparison?: "ASC" | "DESC";
|
|
275
|
-
/**
|
|
276
|
-
* A string prefixed to every message, including the ones of child loggers.
|
|
277
|
-
*/
|
|
278
|
-
msgPrefix?: string;
|
|
279
|
-
/**
|
|
280
|
-
* The key under which any logged object is placed.
|
|
281
|
-
*/
|
|
282
|
-
nestedKey?: string;
|
|
283
|
-
/**
|
|
284
|
-
* The key used for the serialized error in the log object. Defaults to err.
|
|
285
|
-
*/
|
|
286
|
-
errorKey?: string;
|
|
287
|
-
/**
|
|
288
|
-
* The stringification limit at a specific nesting depth when logging circular objects. Defaults to 5.
|
|
289
|
-
*/
|
|
290
|
-
depthLimit?: number;
|
|
291
|
-
/**
|
|
292
|
-
* The stringification limit of properties or elements when logging a circular object or array. Defaults to 100.
|
|
293
|
-
*/
|
|
294
|
-
edgeLimit?: number;
|
|
295
|
-
/**
|
|
296
|
-
* Terminate each log line with \r\n instead of \n. Defaults to false.
|
|
297
|
-
*/
|
|
298
|
-
crlf?: boolean;
|
|
299
|
-
/**
|
|
300
|
-
* Set to false to disable logging entirely. Defaults to true.
|
|
301
|
-
*/
|
|
302
|
-
enabled?: boolean;
|
|
303
|
-
openTelemetryExporter?: {
|
|
304
|
-
protocol: "grpc" | "http";
|
|
305
|
-
url: string;
|
|
306
|
-
};
|
|
307
|
-
[k: string]: unknown;
|
|
308
|
-
};
|
|
309
|
-
server?: {
|
|
310
|
-
hostname?: string;
|
|
311
|
-
port?: number | string;
|
|
312
|
-
/**
|
|
313
|
-
* Configures how entrypoint server worker ports are assigned. When set to shared, all workers listen on the same port. When set to perWorkerIncrement, each worker will use its own port, starting from port (worker 0).
|
|
314
|
-
*/
|
|
315
|
-
portAssignment?: "shared" | "perWorkerIncrement";
|
|
316
|
-
/**
|
|
317
|
-
* The maximum length of the queue of pending connections
|
|
318
|
-
*/
|
|
319
|
-
backlog?: number;
|
|
320
|
-
http2?: boolean;
|
|
321
|
-
https?: {
|
|
322
|
-
allowHTTP1?: boolean;
|
|
323
|
-
key:
|
|
324
|
-
| string
|
|
325
|
-
| {
|
|
326
|
-
path?: string;
|
|
327
|
-
}
|
|
328
|
-
| (
|
|
329
|
-
| string
|
|
330
|
-
| {
|
|
331
|
-
path?: string;
|
|
332
|
-
}
|
|
333
|
-
)[];
|
|
334
|
-
cert:
|
|
335
|
-
| string
|
|
336
|
-
| {
|
|
337
|
-
path?: string;
|
|
338
|
-
}
|
|
339
|
-
| (
|
|
340
|
-
| string
|
|
341
|
-
| {
|
|
342
|
-
path?: string;
|
|
343
|
-
}
|
|
344
|
-
)[];
|
|
345
|
-
requestCert?: boolean;
|
|
346
|
-
rejectUnauthorized?: boolean;
|
|
347
|
-
};
|
|
348
|
-
};
|
|
349
|
-
reuseTcpPorts?: boolean;
|
|
350
|
-
startTimeout?: number;
|
|
351
|
-
restartOnError?: boolean | number;
|
|
352
|
-
exitOnUnhandledErrors?: boolean | number;
|
|
353
|
-
gracefulShutdown?: {
|
|
354
|
-
runtime: number | string;
|
|
355
|
-
application: number | string;
|
|
356
|
-
/**
|
|
357
|
-
* Add Connection: close header to HTTP responses during graceful shutdown
|
|
358
|
-
*/
|
|
359
|
-
closeConnections?: boolean;
|
|
360
|
-
};
|
|
361
|
-
health?: {
|
|
362
|
-
enabled?: boolean | string;
|
|
363
|
-
interval?: number | string;
|
|
364
|
-
gracePeriod?: number | string;
|
|
365
|
-
maxUnhealthyChecks?: number | string;
|
|
366
|
-
maxELU?: number | string;
|
|
367
|
-
maxEventLoopDelay?: number | string;
|
|
368
|
-
maxEventLoopDelayP99?: number | string;
|
|
369
|
-
maxHeapUsed?: number | string;
|
|
370
|
-
maxHeapTotal?: number | string;
|
|
371
|
-
maxYoungGeneration?: number | string;
|
|
372
|
-
codeRangeSize?: number | string;
|
|
373
|
-
bufferPoolSize?: number | string;
|
|
374
|
-
defaultHighWaterMark?: number | string;
|
|
375
|
-
};
|
|
376
|
-
healthProbes?:
|
|
377
|
-
| boolean
|
|
378
|
-
| string
|
|
379
|
-
| {
|
|
380
|
-
enabled?: boolean | string;
|
|
381
|
-
hostname?: string;
|
|
382
|
-
port?: number | string;
|
|
383
|
-
readiness?:
|
|
384
|
-
| boolean
|
|
385
|
-
| {
|
|
386
|
-
endpoint?: string;
|
|
387
|
-
success?: {
|
|
388
|
-
statusCode?: number;
|
|
389
|
-
body?: string;
|
|
390
|
-
};
|
|
391
|
-
fail?: {
|
|
392
|
-
statusCode?: number;
|
|
393
|
-
body?: string;
|
|
394
|
-
};
|
|
395
|
-
};
|
|
396
|
-
liveness?:
|
|
397
|
-
| boolean
|
|
398
|
-
| {
|
|
399
|
-
endpoint?: string;
|
|
400
|
-
success?: {
|
|
401
|
-
statusCode?: number;
|
|
402
|
-
body?: string;
|
|
403
|
-
};
|
|
404
|
-
fail?: {
|
|
405
|
-
statusCode?: number;
|
|
406
|
-
body?: string;
|
|
407
|
-
};
|
|
408
|
-
};
|
|
409
|
-
};
|
|
410
|
-
undici?: {
|
|
411
|
-
agentOptions?: {
|
|
412
|
-
[k: string]: unknown;
|
|
413
|
-
};
|
|
414
|
-
interceptors?:
|
|
415
|
-
| {
|
|
416
|
-
module: string;
|
|
417
|
-
options: {
|
|
418
|
-
[k: string]: unknown;
|
|
419
|
-
};
|
|
420
|
-
[k: string]: unknown;
|
|
421
|
-
}[]
|
|
422
|
-
| {
|
|
423
|
-
Client?: {
|
|
424
|
-
module: string;
|
|
425
|
-
options: {
|
|
426
|
-
[k: string]: unknown;
|
|
427
|
-
};
|
|
428
|
-
[k: string]: unknown;
|
|
429
|
-
}[];
|
|
430
|
-
Pool?: {
|
|
431
|
-
module: string;
|
|
432
|
-
options: {
|
|
433
|
-
[k: string]: unknown;
|
|
434
|
-
};
|
|
435
|
-
[k: string]: unknown;
|
|
436
|
-
}[];
|
|
437
|
-
Agent?: {
|
|
438
|
-
module: string;
|
|
439
|
-
options: {
|
|
440
|
-
[k: string]: unknown;
|
|
441
|
-
};
|
|
442
|
-
[k: string]: unknown;
|
|
443
|
-
}[];
|
|
444
|
-
[k: string]: unknown;
|
|
445
|
-
};
|
|
446
|
-
[k: string]: unknown;
|
|
447
|
-
};
|
|
448
|
-
httpCache?:
|
|
449
|
-
| boolean
|
|
450
|
-
| {
|
|
451
|
-
store?: string;
|
|
452
|
-
/**
|
|
453
|
-
* @minItems 1
|
|
454
|
-
*/
|
|
455
|
-
methods?: [string, ...string[]];
|
|
456
|
-
cacheTagsHeader?: string;
|
|
457
|
-
maxSize?: number;
|
|
458
|
-
maxEntrySize?: number;
|
|
459
|
-
maxCount?: number;
|
|
460
|
-
/**
|
|
461
|
-
* Whitelist of origins to cache. Supports exact strings and regex patterns (e.g., "/https:\\/\\/.*\\.example\\.com/").
|
|
462
|
-
*/
|
|
463
|
-
origins?: string[];
|
|
464
711
|
/**
|
|
465
|
-
*
|
|
712
|
+
* The URL to send the traces to. Not used for console or memory exporters.
|
|
466
713
|
*/
|
|
467
|
-
|
|
714
|
+
url?: string;
|
|
468
715
|
/**
|
|
469
|
-
*
|
|
716
|
+
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
470
717
|
*/
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
};
|
|
474
|
-
watch?: boolean | string;
|
|
475
|
-
managementApi?:
|
|
476
|
-
| boolean
|
|
477
|
-
| string
|
|
478
|
-
| {
|
|
479
|
-
logs?: {
|
|
480
|
-
maxSize?: number;
|
|
481
|
-
};
|
|
482
|
-
/**
|
|
483
|
-
* Custom path for the control socket. If not specified, uses the default platform-specific location.
|
|
484
|
-
*/
|
|
485
|
-
socket?: string;
|
|
486
|
-
};
|
|
487
|
-
management?:
|
|
488
|
-
| boolean
|
|
489
|
-
| {
|
|
490
|
-
enabled?: boolean;
|
|
491
|
-
operations?: string[];
|
|
492
|
-
};
|
|
493
|
-
metrics?:
|
|
494
|
-
| boolean
|
|
495
|
-
| {
|
|
496
|
-
port?: number | string;
|
|
497
|
-
enabled?: boolean | string;
|
|
498
|
-
hostname?: string;
|
|
499
|
-
endpoint?: string;
|
|
500
|
-
https?: {
|
|
501
|
-
allowHTTP1?: boolean;
|
|
502
|
-
key:
|
|
503
|
-
| string
|
|
504
|
-
| {
|
|
505
|
-
path?: string;
|
|
506
|
-
}
|
|
507
|
-
| (
|
|
508
|
-
| string
|
|
509
|
-
| {
|
|
510
|
-
path?: string;
|
|
511
|
-
}
|
|
512
|
-
)[];
|
|
513
|
-
cert:
|
|
514
|
-
| string
|
|
515
|
-
| {
|
|
516
|
-
path?: string;
|
|
517
|
-
}
|
|
518
|
-
| (
|
|
519
|
-
| string
|
|
520
|
-
| {
|
|
521
|
-
path?: string;
|
|
522
|
-
}
|
|
523
|
-
)[];
|
|
524
|
-
requestCert?: boolean;
|
|
525
|
-
rejectUnauthorized?: boolean;
|
|
526
|
-
};
|
|
527
|
-
auth?: {
|
|
528
|
-
username: string;
|
|
529
|
-
password: string;
|
|
530
|
-
};
|
|
531
|
-
labels?: {
|
|
532
|
-
[k: string]: string;
|
|
718
|
+
headers?: {
|
|
719
|
+
[k: string]: unknown;
|
|
533
720
|
};
|
|
534
721
|
/**
|
|
535
|
-
* The
|
|
722
|
+
* The path to write the traces to. Only for file exporter.
|
|
536
723
|
*/
|
|
537
|
-
|
|
724
|
+
path?: string;
|
|
538
725
|
/**
|
|
539
|
-
*
|
|
726
|
+
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
540
727
|
*/
|
|
541
|
-
|
|
542
|
-
readiness?:
|
|
543
|
-
| boolean
|
|
544
|
-
| {
|
|
545
|
-
endpoint?: string;
|
|
546
|
-
success?: {
|
|
547
|
-
statusCode?: number;
|
|
548
|
-
body?: string;
|
|
549
|
-
};
|
|
550
|
-
fail?: {
|
|
551
|
-
statusCode?: number;
|
|
552
|
-
body?: string;
|
|
553
|
-
};
|
|
554
|
-
};
|
|
555
|
-
liveness?:
|
|
556
|
-
| boolean
|
|
557
|
-
| {
|
|
558
|
-
endpoint?: string;
|
|
559
|
-
success?: {
|
|
560
|
-
statusCode?: number;
|
|
561
|
-
body?: string;
|
|
562
|
-
};
|
|
563
|
-
fail?: {
|
|
564
|
-
statusCode?: number;
|
|
565
|
-
body?: string;
|
|
566
|
-
};
|
|
567
|
-
};
|
|
728
|
+
protocol?: "http" | "grpc";
|
|
568
729
|
/**
|
|
569
|
-
*
|
|
570
|
-
* Deprecated. Health probe timeout configuration is no longer used.
|
|
730
|
+
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
571
731
|
*/
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
732
|
+
transport?: "http" | "grpc";
|
|
733
|
+
[k: string]: unknown;
|
|
734
|
+
};
|
|
735
|
+
additionalProperties?: never;
|
|
736
|
+
[k: string]: unknown;
|
|
737
|
+
}[]
|
|
738
|
+
| {
|
|
739
|
+
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
740
|
+
/**
|
|
741
|
+
* Options for the exporter. These are passed directly to the exporter.
|
|
742
|
+
*/
|
|
743
|
+
options?: {
|
|
575
744
|
/**
|
|
576
|
-
*
|
|
745
|
+
* The URL to send the traces to. Not used for console or memory exporters.
|
|
577
746
|
*/
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* Enable or disable OTLP metrics export
|
|
581
|
-
*/
|
|
582
|
-
enabled?: boolean | string;
|
|
583
|
-
/**
|
|
584
|
-
* OTLP endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
585
|
-
*/
|
|
586
|
-
endpoint: string;
|
|
587
|
-
/**
|
|
588
|
-
* Interval in milliseconds between metric pushes
|
|
589
|
-
*/
|
|
590
|
-
interval?: number | string;
|
|
591
|
-
/**
|
|
592
|
-
* Additional HTTP headers for authentication
|
|
593
|
-
*/
|
|
594
|
-
headers?: {
|
|
595
|
-
[k: string]: string;
|
|
596
|
-
};
|
|
597
|
-
/**
|
|
598
|
-
* Service name for OTLP resource attributes
|
|
599
|
-
*/
|
|
600
|
-
serviceName?: string;
|
|
601
|
-
/**
|
|
602
|
-
* Service version for OTLP resource attributes
|
|
603
|
-
*/
|
|
604
|
-
serviceVersion?: string;
|
|
605
|
-
};
|
|
747
|
+
url?: string;
|
|
606
748
|
/**
|
|
607
|
-
*
|
|
749
|
+
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
608
750
|
*/
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
* Enable or disable OpenTelemetry metrics forwarding
|
|
612
|
-
*/
|
|
613
|
-
enabled?: boolean | string;
|
|
614
|
-
/**
|
|
615
|
-
* OTLP metrics endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
616
|
-
*/
|
|
617
|
-
endpoint: string;
|
|
618
|
-
/**
|
|
619
|
-
* Interval in milliseconds between metric forwards
|
|
620
|
-
*/
|
|
621
|
-
interval?: number | string;
|
|
622
|
-
/**
|
|
623
|
-
* Additional HTTP headers for authentication
|
|
624
|
-
*/
|
|
625
|
-
headers?: {
|
|
626
|
-
[k: string]: string;
|
|
627
|
-
};
|
|
751
|
+
headers?: {
|
|
752
|
+
[k: string]: unknown;
|
|
628
753
|
};
|
|
629
754
|
/**
|
|
630
|
-
*
|
|
755
|
+
* The path to write the traces to. Only for file exporter.
|
|
631
756
|
*/
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* The label name to use in metrics
|
|
635
|
-
*/
|
|
636
|
-
name: string;
|
|
637
|
-
/**
|
|
638
|
-
* The HTTP request header to extract the value from
|
|
639
|
-
*/
|
|
640
|
-
header: string;
|
|
641
|
-
/**
|
|
642
|
-
* Default value when header is missing (defaults to "unknown")
|
|
643
|
-
*/
|
|
644
|
-
default?: string;
|
|
645
|
-
}[];
|
|
646
|
-
};
|
|
647
|
-
telemetry?: {
|
|
648
|
-
enabled?: boolean | string;
|
|
649
|
-
/**
|
|
650
|
-
* The name of the application. Defaults to the folder name if not specified.
|
|
651
|
-
*/
|
|
652
|
-
applicationName: string;
|
|
653
|
-
/**
|
|
654
|
-
* The version of the application (optional)
|
|
655
|
-
*/
|
|
656
|
-
version?: string;
|
|
657
|
-
/**
|
|
658
|
-
* An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.
|
|
659
|
-
*/
|
|
660
|
-
skip?: {
|
|
661
|
-
/**
|
|
662
|
-
* The path to skip. Can be a string or a regex.
|
|
663
|
-
*/
|
|
664
|
-
path?: string;
|
|
665
|
-
/**
|
|
666
|
-
* HTTP method to skip
|
|
667
|
-
*/
|
|
668
|
-
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
669
|
-
[k: string]: unknown;
|
|
670
|
-
}[];
|
|
671
|
-
exporter?:
|
|
672
|
-
| {
|
|
673
|
-
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
674
|
-
/**
|
|
675
|
-
* Options for the exporter. These are passed directly to the exporter.
|
|
676
|
-
*/
|
|
677
|
-
options?: {
|
|
678
|
-
/**
|
|
679
|
-
* The URL to send the traces to. Not used for console or memory exporters.
|
|
680
|
-
*/
|
|
681
|
-
url?: string;
|
|
682
|
-
/**
|
|
683
|
-
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
684
|
-
*/
|
|
685
|
-
headers?: {
|
|
686
|
-
[k: string]: unknown;
|
|
687
|
-
};
|
|
688
|
-
/**
|
|
689
|
-
* The path to write the traces to. Only for file exporter.
|
|
690
|
-
*/
|
|
691
|
-
path?: string;
|
|
692
|
-
/**
|
|
693
|
-
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
694
|
-
*/
|
|
695
|
-
protocol?: "http" | "grpc";
|
|
696
|
-
/**
|
|
697
|
-
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
698
|
-
*/
|
|
699
|
-
transport?: "http" | "grpc";
|
|
700
|
-
[k: string]: unknown;
|
|
701
|
-
};
|
|
702
|
-
additionalProperties?: never;
|
|
703
|
-
[k: string]: unknown;
|
|
704
|
-
}[]
|
|
705
|
-
| {
|
|
706
|
-
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
707
|
-
/**
|
|
708
|
-
* Options for the exporter. These are passed directly to the exporter.
|
|
709
|
-
*/
|
|
710
|
-
options?: {
|
|
711
|
-
/**
|
|
712
|
-
* The URL to send the traces to. Not used for console or memory exporters.
|
|
713
|
-
*/
|
|
714
|
-
url?: string;
|
|
715
|
-
/**
|
|
716
|
-
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
717
|
-
*/
|
|
718
|
-
headers?: {
|
|
719
|
-
[k: string]: unknown;
|
|
720
|
-
};
|
|
721
|
-
/**
|
|
722
|
-
* The path to write the traces to. Only for file exporter.
|
|
723
|
-
*/
|
|
724
|
-
path?: string;
|
|
725
|
-
/**
|
|
726
|
-
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
727
|
-
*/
|
|
728
|
-
protocol?: "http" | "grpc";
|
|
729
|
-
/**
|
|
730
|
-
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
731
|
-
*/
|
|
732
|
-
transport?: "http" | "grpc";
|
|
733
|
-
[k: string]: unknown;
|
|
734
|
-
};
|
|
735
|
-
additionalProperties?: never;
|
|
736
|
-
[k: string]: unknown;
|
|
737
|
-
};
|
|
738
|
-
/**
|
|
739
|
-
* Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
|
|
740
|
-
*/
|
|
741
|
-
diagLogger?: boolean | string;
|
|
742
|
-
};
|
|
743
|
-
verticalScaler?: {
|
|
744
|
-
enabled?: boolean;
|
|
745
|
-
maxTotalWorkers?: number;
|
|
746
|
-
maxTotalMemory?: number;
|
|
747
|
-
minWorkers?: number;
|
|
748
|
-
maxWorkers?: number;
|
|
749
|
-
cooldownSec?: number;
|
|
750
|
-
gracePeriod?: number;
|
|
751
|
-
scaleUpELU?: number;
|
|
752
|
-
scaleDownELU?: number;
|
|
753
|
-
/**
|
|
754
|
-
* @deprecated
|
|
755
|
-
*/
|
|
756
|
-
timeWindowSec?: number;
|
|
757
|
-
/**
|
|
758
|
-
* @deprecated
|
|
759
|
-
*/
|
|
760
|
-
scaleDownTimeWindowSec?: number;
|
|
761
|
-
/**
|
|
762
|
-
* @deprecated
|
|
763
|
-
*/
|
|
764
|
-
scaleIntervalSec?: number;
|
|
765
|
-
};
|
|
766
|
-
inspectorOptions?: {
|
|
767
|
-
host?: string;
|
|
768
|
-
port?: number;
|
|
769
|
-
breakFirstLine?: boolean;
|
|
770
|
-
watchDisabled?: boolean;
|
|
771
|
-
[k: string]: unknown;
|
|
772
|
-
};
|
|
773
|
-
applicationTimeout?: number | string;
|
|
774
|
-
startupConcurrency?: number | string;
|
|
775
|
-
messagingTimeout?: number | string;
|
|
776
|
-
env?: {
|
|
777
|
-
[k: string]: string;
|
|
778
|
-
};
|
|
779
|
-
envfile?: string;
|
|
780
|
-
/**
|
|
781
|
-
* When set to true, the configuration loading fails if a {PLT_*} placeholder references an environment variable which is not set. When set to "warn", a warning listing the missing variables is logged but the placeholders are still replaced with an empty string. Defaults to false.
|
|
782
|
-
*/
|
|
783
|
-
strictEnv?: boolean | string;
|
|
784
|
-
sourceMaps?: boolean;
|
|
785
|
-
nodeModulesSourceMaps?: string[];
|
|
786
|
-
scheduler?: {
|
|
787
|
-
enabled?: boolean | string;
|
|
788
|
-
name: string;
|
|
789
|
-
cron: string;
|
|
790
|
-
callbackUrl: string;
|
|
791
|
-
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
792
|
-
headers?: {
|
|
793
|
-
[k: string]: string;
|
|
794
|
-
};
|
|
795
|
-
body?:
|
|
796
|
-
| string
|
|
797
|
-
| {
|
|
798
|
-
[k: string]: unknown;
|
|
799
|
-
};
|
|
800
|
-
maxRetries?: number;
|
|
801
|
-
[k: string]: unknown;
|
|
802
|
-
}[];
|
|
803
|
-
policies?: {
|
|
804
|
-
deny: {
|
|
805
|
-
/**
|
|
806
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
807
|
-
* via the `patternProperty` "^.*$".
|
|
808
|
-
*/
|
|
809
|
-
[k: string]: string | [string, ...string[]];
|
|
810
|
-
};
|
|
811
|
-
};
|
|
812
|
-
compileCache?:
|
|
813
|
-
| boolean
|
|
814
|
-
| {
|
|
757
|
+
path?: string;
|
|
815
758
|
/**
|
|
816
|
-
*
|
|
759
|
+
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
817
760
|
*/
|
|
818
|
-
|
|
761
|
+
protocol?: "http" | "grpc";
|
|
819
762
|
/**
|
|
820
|
-
*
|
|
763
|
+
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
821
764
|
*/
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
application?: {
|
|
825
|
-
reuseTcpPorts?: boolean;
|
|
826
|
-
workers?:
|
|
827
|
-
| number
|
|
828
|
-
| string
|
|
829
|
-
| {
|
|
830
|
-
static?: number;
|
|
831
|
-
minimum?: number;
|
|
832
|
-
maximum?: number;
|
|
833
|
-
scaleUpELU?: number;
|
|
834
|
-
scaleDownELU?: number;
|
|
835
|
-
[k: string]: unknown;
|
|
836
|
-
};
|
|
837
|
-
health?: {
|
|
838
|
-
enabled?: boolean | string;
|
|
839
|
-
interval?: number | string;
|
|
840
|
-
gracePeriod?: number | string;
|
|
841
|
-
maxUnhealthyChecks?: number | string;
|
|
842
|
-
maxELU?: number | string;
|
|
843
|
-
maxEventLoopDelay?: number | string;
|
|
844
|
-
maxEventLoopDelayP99?: number | string;
|
|
845
|
-
maxHeapUsed?: number | string;
|
|
846
|
-
maxHeapTotal?: number | string;
|
|
847
|
-
maxYoungGeneration?: number | string;
|
|
848
|
-
codeRangeSize?: number | string;
|
|
849
|
-
bufferPoolSize?: number | string;
|
|
850
|
-
defaultHighWaterMark?: number | string;
|
|
851
|
-
};
|
|
852
|
-
/**
|
|
853
|
-
* Overrides the runtime-level restartOnError for this application. Set to false or 0 to never restart the application when it crashes, a positive number to wait that amount of milliseconds between restarts, or true to use the default delay.
|
|
854
|
-
*/
|
|
855
|
-
restartOnError?: boolean | number;
|
|
856
|
-
arguments?: string[];
|
|
857
|
-
env?: {
|
|
858
|
-
[k: string]: string;
|
|
859
|
-
};
|
|
860
|
-
envfile?: string;
|
|
861
|
-
sourceMaps?: boolean;
|
|
862
|
-
nodeModulesSourceMaps?: string[];
|
|
863
|
-
packageManager?: "npm" | "pnpm" | "yarn";
|
|
864
|
-
preload?: string | string[];
|
|
865
|
-
nodeOptions?: string;
|
|
866
|
-
execArgv?: string[];
|
|
867
|
-
permissions?: {
|
|
868
|
-
fs?: {
|
|
869
|
-
read?: string[];
|
|
870
|
-
write?: string[];
|
|
765
|
+
transport?: "http" | "grpc";
|
|
766
|
+
[k: string]: unknown;
|
|
871
767
|
};
|
|
872
|
-
|
|
873
|
-
telemetry?: {
|
|
874
|
-
/**
|
|
875
|
-
* An array of instrumentations loaded if telemetry is enabled
|
|
876
|
-
*/
|
|
877
|
-
instrumentations?: (
|
|
878
|
-
| string
|
|
879
|
-
| {
|
|
880
|
-
package: string;
|
|
881
|
-
exportName?: string;
|
|
882
|
-
options?: {
|
|
883
|
-
[k: string]: unknown;
|
|
884
|
-
};
|
|
885
|
-
[k: string]: unknown;
|
|
886
|
-
}
|
|
887
|
-
)[];
|
|
768
|
+
additionalProperties?: never;
|
|
888
769
|
[k: string]: unknown;
|
|
889
770
|
};
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
771
|
+
/**
|
|
772
|
+
* Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
|
|
773
|
+
*/
|
|
774
|
+
diagLogger?: boolean | string;
|
|
775
|
+
}
|
|
776
|
+
export interface CompileCacheOptions {
|
|
777
|
+
/**
|
|
778
|
+
* Enable Node.js module compile cache for faster startup
|
|
779
|
+
*/
|
|
780
|
+
enabled?: boolean;
|
|
781
|
+
/**
|
|
782
|
+
* Directory to store compile cache. Defaults to .plt/compile-cache in app root
|
|
783
|
+
*/
|
|
784
|
+
directory?: string;
|
|
785
|
+
/**
|
|
786
|
+
* Wait for the first worker to start before starting the remaining workers
|
|
787
|
+
*/
|
|
788
|
+
awaitFirstWorker?: boolean;
|
|
789
|
+
}
|
|
790
|
+
export interface ApplicationWorkersOptions {
|
|
791
|
+
static?: number;
|
|
792
|
+
dynamic?: boolean;
|
|
793
|
+
minimum?: number;
|
|
794
|
+
maximum?: number;
|
|
795
|
+
eluThreshold?: number;
|
|
796
|
+
heapThresholdMb?: number;
|
|
797
|
+
}
|
|
798
|
+
export interface ApplicationHealthOptions {
|
|
799
|
+
enabled?: boolean | string;
|
|
800
|
+
interval?: number | string;
|
|
801
|
+
gracePeriod?: number | string;
|
|
802
|
+
maxUnhealthyChecks?: number | string;
|
|
803
|
+
maxELU?: number | string;
|
|
804
|
+
maxEventLoopDelay?: number | string;
|
|
805
|
+
maxEventLoopDelayP99?: number | string;
|
|
806
|
+
maxHeapUsed?: number | string;
|
|
807
|
+
maxHeapTotal?: number | string;
|
|
808
|
+
maxYoungGeneration?: number | string;
|
|
809
|
+
codeRangeSize?: number | string;
|
|
810
|
+
bufferPoolSize?: number | string;
|
|
811
|
+
defaultHighWaterMark?: number | string;
|
|
812
|
+
}
|
|
813
|
+
export interface PermissionsOptions {
|
|
814
|
+
fs?: {
|
|
815
|
+
read?: string[];
|
|
816
|
+
write?: string[];
|
|
914
817
|
};
|
|
915
818
|
}
|
|
819
|
+
export interface ApplicationTelemetryOverrides {
|
|
820
|
+
/**
|
|
821
|
+
* An array of instrumentations loaded if tracing is enabled
|
|
822
|
+
*/
|
|
823
|
+
instrumentations?: (
|
|
824
|
+
| string
|
|
825
|
+
| {
|
|
826
|
+
package: string;
|
|
827
|
+
exportName?: string;
|
|
828
|
+
options?: {
|
|
829
|
+
[k: string]: unknown;
|
|
830
|
+
};
|
|
831
|
+
[k: string]: unknown;
|
|
832
|
+
}
|
|
833
|
+
)[];
|
|
834
|
+
[k: string]: unknown;
|
|
835
|
+
}
|
|
836
|
+
export interface CompileCacheOptions1 {
|
|
837
|
+
/**
|
|
838
|
+
* Enable Node.js module compile cache for faster startup
|
|
839
|
+
*/
|
|
840
|
+
enabled?: boolean;
|
|
841
|
+
/**
|
|
842
|
+
* Directory to store compile cache. Defaults to .plt/compile-cache in app root
|
|
843
|
+
*/
|
|
844
|
+
directory?: string;
|
|
845
|
+
/**
|
|
846
|
+
* Wait for the first worker to start before starting the remaining workers
|
|
847
|
+
*/
|
|
848
|
+
awaitFirstWorker?: boolean;
|
|
849
|
+
}
|