@platformatic/next 3.72.0 → 4.0.0-alpha.2

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