@platformatic/nuxt 0.0.1 → 3.58.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/LICENSE +201 -0
- package/README.md +26 -0
- package/config.d.ts +749 -0
- package/eslint.config.js +3 -0
- package/index.d.ts +35 -0
- package/index.js +31 -0
- package/lib/capability.js +255 -0
- package/lib/schema.js +50 -0
- package/package.json +39 -18
- package/schema.json +2805 -0
- package/test/backlog.test.js +88 -0
- package/test/development.test.js +216 -0
- package/test/fetch.test.js +67 -0
- package/test/fixtures/composer-autodetect-prefix/package.json +10 -0
- package/test/fixtures/composer-autodetect-prefix/platformatic.runtime.json +24 -0
- package/test/fixtures/composer-autodetect-prefix/services/frontend/app.vue +8 -0
- package/test/fixtures/composer-autodetect-prefix/services/frontend/nuxt.config.js +16 -0
- package/test/fixtures/composer-autodetect-prefix/services/frontend/package.json +9 -0
- package/test/fixtures/composer-autodetect-prefix/services/frontend/platformatic.application.json +6 -0
- package/test/fixtures/composer-custom-commands/package.json +11 -0
- package/test/fixtures/composer-custom-commands/platformatic.runtime.json +24 -0
- package/test/fixtures/composer-custom-commands/services/frontend/app.vue +8 -0
- package/test/fixtures/composer-custom-commands/services/frontend/nuxt.config.js +16 -0
- package/test/fixtures/composer-custom-commands/services/frontend/package.json +16 -0
- package/test/fixtures/composer-custom-commands/services/frontend/platformatic.application.json +11 -0
- package/test/fixtures/composer-with-prefix/package.json +10 -0
- package/test/fixtures/composer-with-prefix/platformatic.runtime.json +24 -0
- package/test/fixtures/composer-with-prefix/services/frontend/app.vue +8 -0
- package/test/fixtures/composer-with-prefix/services/frontend/nuxt.config.js +16 -0
- package/test/fixtures/composer-with-prefix/services/frontend/package.json +9 -0
- package/test/fixtures/composer-with-prefix/services/frontend/platformatic.application.json +6 -0
- package/test/fixtures/composer-without-prefix/package.json +10 -0
- package/test/fixtures/composer-without-prefix/platformatic.runtime.json +24 -0
- package/test/fixtures/composer-without-prefix/services/frontend/app.vue +8 -0
- package/test/fixtures/composer-without-prefix/services/frontend/nuxt.config.js +13 -0
- package/test/fixtures/composer-without-prefix/services/frontend/package.json +9 -0
- package/test/fixtures/composer-without-prefix/services/frontend/platformatic.application.json +3 -0
- package/test/fixtures/fetch-test/package.json +10 -0
- package/test/fixtures/fetch-test/platformatic.runtime.json +24 -0
- package/test/fixtures/fetch-test/services/frontend/app.vue +29 -0
- package/test/fixtures/fetch-test/services/frontend/nuxt.config.js +15 -0
- package/test/fixtures/fetch-test/services/frontend/package.json +9 -0
- package/test/fixtures/fetch-test/services/frontend/platformatic.application.json +6 -0
- package/test/fixtures/logger/package.json +8 -0
- package/test/fixtures/logger/platformatic.runtime.json +15 -0
- package/test/fixtures/logger/services/frontend/app.vue +12 -0
- package/test/fixtures/logger/services/frontend/logger-formatters.js +7 -0
- package/test/fixtures/logger/services/frontend/nuxt.config.js +12 -0
- package/test/fixtures/logger/services/frontend/package.json +9 -0
- package/test/fixtures/logger/services/frontend/platformatic.application.json +14 -0
- package/test/fixtures/metrics/package.json +10 -0
- package/test/fixtures/metrics/platformatic.runtime.json +25 -0
- package/test/fixtures/metrics/services/backend/package.json +6 -0
- package/test/fixtures/metrics/services/backend/platformatic.json +16 -0
- package/test/fixtures/metrics/services/backend/plugins/example.js +3 -0
- package/test/fixtures/metrics/services/backend/routes/root.js +30 -0
- package/test/fixtures/metrics/services/composer/package.json +6 -0
- package/test/fixtures/metrics/services/composer/platformatic.json +14 -0
- package/test/fixtures/metrics/services/frontend/app.vue +8 -0
- package/test/fixtures/metrics/services/frontend/nuxt.config.js +15 -0
- package/test/fixtures/metrics/services/frontend/package.json +9 -0
- package/test/fixtures/metrics/services/frontend/platformatic.application.json +6 -0
- package/test/fixtures/ssr-autodetect-prefix/package.json +10 -0
- package/test/fixtures/ssr-autodetect-prefix/platformatic.runtime.json +24 -0
- package/test/fixtures/ssr-autodetect-prefix/services/frontend/app.vue +8 -0
- package/test/fixtures/ssr-autodetect-prefix/services/frontend/nuxt.config.js +15 -0
- package/test/fixtures/ssr-autodetect-prefix/services/frontend/package.json +9 -0
- package/test/fixtures/ssr-autodetect-prefix/services/frontend/platformatic.application.json +6 -0
- package/test/fixtures/ssr-custom-commands/package.json +11 -0
- package/test/fixtures/ssr-custom-commands/platformatic.runtime.json +24 -0
- package/test/fixtures/ssr-custom-commands/services/frontend/app.vue +8 -0
- package/test/fixtures/ssr-custom-commands/services/frontend/nuxt.config.js +15 -0
- package/test/fixtures/ssr-custom-commands/services/frontend/package.json +16 -0
- package/test/fixtures/ssr-custom-commands/services/frontend/platformatic.application.json +11 -0
- package/test/fixtures/ssr-standalone/package.json +8 -0
- package/test/fixtures/ssr-standalone/platformatic.runtime.json +15 -0
- package/test/fixtures/ssr-standalone/services/frontend/app.vue +8 -0
- package/test/fixtures/ssr-standalone/services/frontend/nuxt.config.js +12 -0
- package/test/fixtures/ssr-standalone/services/frontend/package.json +9 -0
- package/test/fixtures/ssr-standalone/services/frontend/platformatic.application.json +3 -0
- package/test/fixtures/ssr-with-prefix/package.json +10 -0
- package/test/fixtures/ssr-with-prefix/platformatic.runtime.json +24 -0
- package/test/fixtures/ssr-with-prefix/services/frontend/app.vue +8 -0
- package/test/fixtures/ssr-with-prefix/services/frontend/nuxt.config.js +15 -0
- package/test/fixtures/ssr-with-prefix/services/frontend/package.json +9 -0
- package/test/fixtures/ssr-with-prefix/services/frontend/platformatic.application.json +6 -0
- package/test/fixtures/ssr-without-prefix/package.json +10 -0
- package/test/fixtures/ssr-without-prefix/platformatic.runtime.json +24 -0
- package/test/fixtures/ssr-without-prefix/services/frontend/app.vue +8 -0
- package/test/fixtures/ssr-without-prefix/services/frontend/nuxt.config.js +12 -0
- package/test/fixtures/ssr-without-prefix/services/frontend/package.json +9 -0
- package/test/fixtures/ssr-without-prefix/services/frontend/platformatic.application.json +3 -0
- package/test/fixtures/standalone/package.json +8 -0
- package/test/fixtures/standalone/platformatic.runtime.json +15 -0
- package/test/fixtures/standalone/services/frontend/app.vue +8 -0
- package/test/fixtures/standalone/services/frontend/nuxt.config.js +13 -0
- package/test/fixtures/standalone/services/frontend/package.json +9 -0
- package/test/fixtures/standalone/services/frontend/platformatic.application.json +3 -0
- package/test/helper.js +1 -0
- package/test/https.test.js +43 -0
- package/test/logger.test.js +31 -0
- package/test/metrics.test.js +46 -0
- package/test/miscellaneous.test.js +33 -0
- package/test/production.test.js +153 -0
- package/test/types/index.tst.ts +34 -0
- package/test/version-check.test.js +29 -0
package/config.d.ts
ADDED
|
@@ -0,0 +1,749 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface PlatformaticNuxtConfig {
|
|
9
|
+
$schema?: string;
|
|
10
|
+
module?: string;
|
|
11
|
+
logger?: {
|
|
12
|
+
level?: (
|
|
13
|
+
| ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
|
|
14
|
+
| {
|
|
15
|
+
[k: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
) &
|
|
18
|
+
string;
|
|
19
|
+
transport?:
|
|
20
|
+
| {
|
|
21
|
+
target?: string;
|
|
22
|
+
options?: {
|
|
23
|
+
[k: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
| {
|
|
27
|
+
targets?: {
|
|
28
|
+
target?: string;
|
|
29
|
+
options?: {
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
level?: string;
|
|
33
|
+
}[];
|
|
34
|
+
options?: {
|
|
35
|
+
[k: string]: unknown;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
pipeline?: {
|
|
39
|
+
target?: string;
|
|
40
|
+
options?: {
|
|
41
|
+
[k: string]: unknown;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
formatters?: {
|
|
45
|
+
path: string;
|
|
46
|
+
};
|
|
47
|
+
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
48
|
+
redact?: {
|
|
49
|
+
paths: string[];
|
|
50
|
+
censor?: string;
|
|
51
|
+
};
|
|
52
|
+
base?: {
|
|
53
|
+
[k: string]: unknown;
|
|
54
|
+
} | null;
|
|
55
|
+
messageKey?: string;
|
|
56
|
+
customLevels?: {
|
|
57
|
+
[k: string]: unknown;
|
|
58
|
+
};
|
|
59
|
+
openTelemetryExporter?: {
|
|
60
|
+
protocol: "grpc" | "http";
|
|
61
|
+
url: string;
|
|
62
|
+
};
|
|
63
|
+
[k: string]: unknown;
|
|
64
|
+
};
|
|
65
|
+
server?: {
|
|
66
|
+
hostname?: string;
|
|
67
|
+
port?: number | string;
|
|
68
|
+
/**
|
|
69
|
+
* The maximum length of the queue of pending connections
|
|
70
|
+
*/
|
|
71
|
+
backlog?: number;
|
|
72
|
+
http2?: boolean;
|
|
73
|
+
https?: {
|
|
74
|
+
allowHTTP1?: boolean;
|
|
75
|
+
key:
|
|
76
|
+
| string
|
|
77
|
+
| {
|
|
78
|
+
path?: string;
|
|
79
|
+
}
|
|
80
|
+
| (
|
|
81
|
+
| string
|
|
82
|
+
| {
|
|
83
|
+
path?: string;
|
|
84
|
+
}
|
|
85
|
+
)[];
|
|
86
|
+
cert:
|
|
87
|
+
| string
|
|
88
|
+
| {
|
|
89
|
+
path?: string;
|
|
90
|
+
}
|
|
91
|
+
| (
|
|
92
|
+
| string
|
|
93
|
+
| {
|
|
94
|
+
path?: string;
|
|
95
|
+
}
|
|
96
|
+
)[];
|
|
97
|
+
requestCert?: boolean;
|
|
98
|
+
rejectUnauthorized?: boolean;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
watch?:
|
|
102
|
+
| {
|
|
103
|
+
enabled?: boolean | string;
|
|
104
|
+
/**
|
|
105
|
+
* @minItems 1
|
|
106
|
+
*/
|
|
107
|
+
allow?: [string, ...string[]];
|
|
108
|
+
ignore?: string[];
|
|
109
|
+
}
|
|
110
|
+
| boolean
|
|
111
|
+
| string;
|
|
112
|
+
application?: {
|
|
113
|
+
basePath?: string;
|
|
114
|
+
outputDirectory?: string;
|
|
115
|
+
include?: string[];
|
|
116
|
+
commands?: {
|
|
117
|
+
install?: string;
|
|
118
|
+
build?: string;
|
|
119
|
+
development?: string;
|
|
120
|
+
production?: string;
|
|
121
|
+
};
|
|
122
|
+
entrypointPort?: number;
|
|
123
|
+
changeDirectoryBeforeExecution?: boolean;
|
|
124
|
+
preferLocalCommands?: boolean;
|
|
125
|
+
processSpawner?: string;
|
|
126
|
+
};
|
|
127
|
+
runtime?: {
|
|
128
|
+
preload?: string | string[];
|
|
129
|
+
basePath?: string;
|
|
130
|
+
services?: {
|
|
131
|
+
[k: string]: unknown;
|
|
132
|
+
}[];
|
|
133
|
+
workers?:
|
|
134
|
+
| number
|
|
135
|
+
| string
|
|
136
|
+
| {
|
|
137
|
+
static?: number;
|
|
138
|
+
dynamic?: boolean;
|
|
139
|
+
minimum?: number;
|
|
140
|
+
maximum?: number;
|
|
141
|
+
total?: number;
|
|
142
|
+
maxMemory?: number;
|
|
143
|
+
cooldown?: number;
|
|
144
|
+
gracePeriod?: number;
|
|
145
|
+
scaleUpELU?: number;
|
|
146
|
+
scaleDownELU?: number;
|
|
147
|
+
[k: string]: unknown;
|
|
148
|
+
};
|
|
149
|
+
workersRestartDelay?: number | string;
|
|
150
|
+
logger?: {
|
|
151
|
+
level?: (
|
|
152
|
+
| ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
|
|
153
|
+
| {
|
|
154
|
+
[k: string]: unknown;
|
|
155
|
+
}
|
|
156
|
+
) &
|
|
157
|
+
string;
|
|
158
|
+
transport?:
|
|
159
|
+
| {
|
|
160
|
+
target?: string;
|
|
161
|
+
options?: {
|
|
162
|
+
[k: string]: unknown;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
| {
|
|
166
|
+
targets?: {
|
|
167
|
+
target?: string;
|
|
168
|
+
options?: {
|
|
169
|
+
[k: string]: unknown;
|
|
170
|
+
};
|
|
171
|
+
level?: string;
|
|
172
|
+
}[];
|
|
173
|
+
options?: {
|
|
174
|
+
[k: string]: unknown;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
pipeline?: {
|
|
178
|
+
target?: string;
|
|
179
|
+
options?: {
|
|
180
|
+
[k: string]: unknown;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
formatters?: {
|
|
184
|
+
path: string;
|
|
185
|
+
};
|
|
186
|
+
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
187
|
+
redact?: {
|
|
188
|
+
paths: string[];
|
|
189
|
+
censor?: string;
|
|
190
|
+
};
|
|
191
|
+
base?: {
|
|
192
|
+
[k: string]: unknown;
|
|
193
|
+
} | null;
|
|
194
|
+
messageKey?: string;
|
|
195
|
+
customLevels?: {
|
|
196
|
+
[k: string]: unknown;
|
|
197
|
+
};
|
|
198
|
+
openTelemetryExporter?: {
|
|
199
|
+
protocol: "grpc" | "http";
|
|
200
|
+
url: string;
|
|
201
|
+
};
|
|
202
|
+
[k: string]: unknown;
|
|
203
|
+
};
|
|
204
|
+
server?: {
|
|
205
|
+
hostname?: string;
|
|
206
|
+
port?: number | string;
|
|
207
|
+
/**
|
|
208
|
+
* The maximum length of the queue of pending connections
|
|
209
|
+
*/
|
|
210
|
+
backlog?: number;
|
|
211
|
+
http2?: boolean;
|
|
212
|
+
https?: {
|
|
213
|
+
allowHTTP1?: boolean;
|
|
214
|
+
key:
|
|
215
|
+
| string
|
|
216
|
+
| {
|
|
217
|
+
path?: string;
|
|
218
|
+
}
|
|
219
|
+
| (
|
|
220
|
+
| string
|
|
221
|
+
| {
|
|
222
|
+
path?: string;
|
|
223
|
+
}
|
|
224
|
+
)[];
|
|
225
|
+
cert:
|
|
226
|
+
| string
|
|
227
|
+
| {
|
|
228
|
+
path?: string;
|
|
229
|
+
}
|
|
230
|
+
| (
|
|
231
|
+
| string
|
|
232
|
+
| {
|
|
233
|
+
path?: string;
|
|
234
|
+
}
|
|
235
|
+
)[];
|
|
236
|
+
requestCert?: boolean;
|
|
237
|
+
rejectUnauthorized?: boolean;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
reuseTcpPorts?: boolean;
|
|
241
|
+
startTimeout?: number;
|
|
242
|
+
restartOnError?: boolean | number;
|
|
243
|
+
exitOnUnhandledErrors?: boolean | number;
|
|
244
|
+
gracefulShutdown?: {
|
|
245
|
+
runtime: number | string;
|
|
246
|
+
application: number | string;
|
|
247
|
+
/**
|
|
248
|
+
* Add Connection: close header to HTTP responses during graceful shutdown
|
|
249
|
+
*/
|
|
250
|
+
closeConnections?: boolean;
|
|
251
|
+
};
|
|
252
|
+
health?: {
|
|
253
|
+
enabled?: boolean | string;
|
|
254
|
+
interval?: number | string;
|
|
255
|
+
gracePeriod?: number | string;
|
|
256
|
+
maxUnhealthyChecks?: number | string;
|
|
257
|
+
maxELU?: number | string;
|
|
258
|
+
maxHeapUsed?: number | string;
|
|
259
|
+
maxHeapTotal?: number | string;
|
|
260
|
+
maxYoungGeneration?: number | string;
|
|
261
|
+
codeRangeSize?: number | string;
|
|
262
|
+
bufferPoolSize?: number | string;
|
|
263
|
+
defaultHighWaterMark?: number | string;
|
|
264
|
+
};
|
|
265
|
+
healthProbes?: boolean | string;
|
|
266
|
+
undici?: {
|
|
267
|
+
agentOptions?: {
|
|
268
|
+
[k: string]: unknown;
|
|
269
|
+
};
|
|
270
|
+
interceptors?:
|
|
271
|
+
| {
|
|
272
|
+
module: string;
|
|
273
|
+
options: {
|
|
274
|
+
[k: string]: unknown;
|
|
275
|
+
};
|
|
276
|
+
[k: string]: unknown;
|
|
277
|
+
}[]
|
|
278
|
+
| {
|
|
279
|
+
Client?: {
|
|
280
|
+
module: string;
|
|
281
|
+
options: {
|
|
282
|
+
[k: string]: unknown;
|
|
283
|
+
};
|
|
284
|
+
[k: string]: unknown;
|
|
285
|
+
}[];
|
|
286
|
+
Pool?: {
|
|
287
|
+
module: string;
|
|
288
|
+
options: {
|
|
289
|
+
[k: string]: unknown;
|
|
290
|
+
};
|
|
291
|
+
[k: string]: unknown;
|
|
292
|
+
}[];
|
|
293
|
+
Agent?: {
|
|
294
|
+
module: string;
|
|
295
|
+
options: {
|
|
296
|
+
[k: string]: unknown;
|
|
297
|
+
};
|
|
298
|
+
[k: string]: unknown;
|
|
299
|
+
}[];
|
|
300
|
+
[k: string]: unknown;
|
|
301
|
+
};
|
|
302
|
+
[k: string]: unknown;
|
|
303
|
+
};
|
|
304
|
+
httpCache?:
|
|
305
|
+
| boolean
|
|
306
|
+
| {
|
|
307
|
+
store?: string;
|
|
308
|
+
/**
|
|
309
|
+
* @minItems 1
|
|
310
|
+
*/
|
|
311
|
+
methods?: [string, ...string[]];
|
|
312
|
+
cacheTagsHeader?: string;
|
|
313
|
+
maxSize?: number;
|
|
314
|
+
maxEntrySize?: number;
|
|
315
|
+
maxCount?: number;
|
|
316
|
+
/**
|
|
317
|
+
* Whitelist of origins to cache. Supports exact strings and regex patterns (e.g., "/https:\\/\\/.*\\.example\\.com/").
|
|
318
|
+
*/
|
|
319
|
+
origins?: string[];
|
|
320
|
+
/**
|
|
321
|
+
* Default cache duration in seconds for responses without explicit expiration headers.
|
|
322
|
+
*/
|
|
323
|
+
cacheByDefault?: number;
|
|
324
|
+
/**
|
|
325
|
+
* Cache type. "shared" caches may be shared between users, "private" caches are user-specific.
|
|
326
|
+
*/
|
|
327
|
+
type?: "shared" | "private";
|
|
328
|
+
[k: string]: unknown;
|
|
329
|
+
};
|
|
330
|
+
watch?: boolean | string;
|
|
331
|
+
managementApi?:
|
|
332
|
+
| boolean
|
|
333
|
+
| string
|
|
334
|
+
| {
|
|
335
|
+
logs?: {
|
|
336
|
+
maxSize?: number;
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* Custom path for the control socket. If not specified, uses the default platform-specific location.
|
|
340
|
+
*/
|
|
341
|
+
socket?: string;
|
|
342
|
+
};
|
|
343
|
+
management?:
|
|
344
|
+
| boolean
|
|
345
|
+
| {
|
|
346
|
+
enabled?: boolean;
|
|
347
|
+
operations?: string[];
|
|
348
|
+
};
|
|
349
|
+
metrics?:
|
|
350
|
+
| boolean
|
|
351
|
+
| {
|
|
352
|
+
port?: number | string;
|
|
353
|
+
enabled?: boolean | string;
|
|
354
|
+
hostname?: string;
|
|
355
|
+
endpoint?: string;
|
|
356
|
+
https?: {
|
|
357
|
+
allowHTTP1?: boolean;
|
|
358
|
+
key:
|
|
359
|
+
| string
|
|
360
|
+
| {
|
|
361
|
+
path?: string;
|
|
362
|
+
}
|
|
363
|
+
| (
|
|
364
|
+
| string
|
|
365
|
+
| {
|
|
366
|
+
path?: string;
|
|
367
|
+
}
|
|
368
|
+
)[];
|
|
369
|
+
cert:
|
|
370
|
+
| string
|
|
371
|
+
| {
|
|
372
|
+
path?: string;
|
|
373
|
+
}
|
|
374
|
+
| (
|
|
375
|
+
| string
|
|
376
|
+
| {
|
|
377
|
+
path?: string;
|
|
378
|
+
}
|
|
379
|
+
)[];
|
|
380
|
+
requestCert?: boolean;
|
|
381
|
+
rejectUnauthorized?: boolean;
|
|
382
|
+
};
|
|
383
|
+
auth?: {
|
|
384
|
+
username: string;
|
|
385
|
+
password: string;
|
|
386
|
+
};
|
|
387
|
+
labels?: {
|
|
388
|
+
[k: string]: string;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* The label name to use for the application identifier in metrics (e.g., applicationId, serviceId)
|
|
392
|
+
*/
|
|
393
|
+
applicationLabel?: string;
|
|
394
|
+
/**
|
|
395
|
+
* Enable outgoing HTTP client request duration metrics
|
|
396
|
+
*/
|
|
397
|
+
httpClientMetrics?: boolean | string;
|
|
398
|
+
readiness?:
|
|
399
|
+
| boolean
|
|
400
|
+
| {
|
|
401
|
+
endpoint?: string;
|
|
402
|
+
success?: {
|
|
403
|
+
statusCode?: number;
|
|
404
|
+
body?: string;
|
|
405
|
+
};
|
|
406
|
+
fail?: {
|
|
407
|
+
statusCode?: number;
|
|
408
|
+
body?: string;
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
liveness?:
|
|
412
|
+
| boolean
|
|
413
|
+
| {
|
|
414
|
+
endpoint?: string;
|
|
415
|
+
success?: {
|
|
416
|
+
statusCode?: number;
|
|
417
|
+
body?: string;
|
|
418
|
+
};
|
|
419
|
+
fail?: {
|
|
420
|
+
statusCode?: number;
|
|
421
|
+
body?: string;
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
healthChecksTimeouts?: number | string;
|
|
425
|
+
plugins?: string[];
|
|
426
|
+
timeout?: number | string;
|
|
427
|
+
/**
|
|
428
|
+
* Configuration for exporting metrics to an OTLP endpoint
|
|
429
|
+
*/
|
|
430
|
+
otlpExporter?: {
|
|
431
|
+
/**
|
|
432
|
+
* Enable or disable OTLP metrics export
|
|
433
|
+
*/
|
|
434
|
+
enabled?: boolean | string;
|
|
435
|
+
/**
|
|
436
|
+
* OTLP endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
437
|
+
*/
|
|
438
|
+
endpoint: string;
|
|
439
|
+
/**
|
|
440
|
+
* Interval in milliseconds between metric pushes
|
|
441
|
+
*/
|
|
442
|
+
interval?: number | string;
|
|
443
|
+
/**
|
|
444
|
+
* Additional HTTP headers for authentication
|
|
445
|
+
*/
|
|
446
|
+
headers?: {
|
|
447
|
+
[k: string]: string;
|
|
448
|
+
};
|
|
449
|
+
/**
|
|
450
|
+
* Service name for OTLP resource attributes
|
|
451
|
+
*/
|
|
452
|
+
serviceName?: string;
|
|
453
|
+
/**
|
|
454
|
+
* Service version for OTLP resource attributes
|
|
455
|
+
*/
|
|
456
|
+
serviceVersion?: string;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* Custom labels to add to HTTP metrics (http_request_all_duration_seconds). Each label extracts its value from an HTTP request header.
|
|
460
|
+
*/
|
|
461
|
+
httpCustomLabels?: {
|
|
462
|
+
/**
|
|
463
|
+
* The label name to use in metrics
|
|
464
|
+
*/
|
|
465
|
+
name: string;
|
|
466
|
+
/**
|
|
467
|
+
* The HTTP request header to extract the value from
|
|
468
|
+
*/
|
|
469
|
+
header: string;
|
|
470
|
+
/**
|
|
471
|
+
* Default value when header is missing (defaults to "unknown")
|
|
472
|
+
*/
|
|
473
|
+
default?: string;
|
|
474
|
+
}[];
|
|
475
|
+
};
|
|
476
|
+
telemetry?: {
|
|
477
|
+
enabled?: boolean | string;
|
|
478
|
+
/**
|
|
479
|
+
* The name of the application. Defaults to the folder name if not specified.
|
|
480
|
+
*/
|
|
481
|
+
applicationName: string;
|
|
482
|
+
/**
|
|
483
|
+
* The version of the application (optional)
|
|
484
|
+
*/
|
|
485
|
+
version?: string;
|
|
486
|
+
/**
|
|
487
|
+
* An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.
|
|
488
|
+
*/
|
|
489
|
+
skip?: {
|
|
490
|
+
/**
|
|
491
|
+
* The path to skip. Can be a string or a regex.
|
|
492
|
+
*/
|
|
493
|
+
path?: string;
|
|
494
|
+
/**
|
|
495
|
+
* HTTP method to skip
|
|
496
|
+
*/
|
|
497
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
498
|
+
[k: string]: unknown;
|
|
499
|
+
}[];
|
|
500
|
+
exporter?:
|
|
501
|
+
| {
|
|
502
|
+
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
503
|
+
/**
|
|
504
|
+
* Options for the exporter. These are passed directly to the exporter.
|
|
505
|
+
*/
|
|
506
|
+
options?: {
|
|
507
|
+
/**
|
|
508
|
+
* The URL to send the traces to. Not used for console or memory exporters.
|
|
509
|
+
*/
|
|
510
|
+
url?: string;
|
|
511
|
+
/**
|
|
512
|
+
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
513
|
+
*/
|
|
514
|
+
headers?: {
|
|
515
|
+
[k: string]: unknown;
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* The path to write the traces to. Only for file exporter.
|
|
519
|
+
*/
|
|
520
|
+
path?: string;
|
|
521
|
+
/**
|
|
522
|
+
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
523
|
+
*/
|
|
524
|
+
protocol?: "http" | "grpc";
|
|
525
|
+
/**
|
|
526
|
+
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
527
|
+
*/
|
|
528
|
+
transport?: "http" | "grpc";
|
|
529
|
+
[k: string]: unknown;
|
|
530
|
+
};
|
|
531
|
+
additionalProperties?: never;
|
|
532
|
+
[k: string]: unknown;
|
|
533
|
+
}[]
|
|
534
|
+
| {
|
|
535
|
+
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
536
|
+
/**
|
|
537
|
+
* Options for the exporter. These are passed directly to the exporter.
|
|
538
|
+
*/
|
|
539
|
+
options?: {
|
|
540
|
+
/**
|
|
541
|
+
* The URL to send the traces to. Not used for console or memory exporters.
|
|
542
|
+
*/
|
|
543
|
+
url?: string;
|
|
544
|
+
/**
|
|
545
|
+
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
546
|
+
*/
|
|
547
|
+
headers?: {
|
|
548
|
+
[k: string]: unknown;
|
|
549
|
+
};
|
|
550
|
+
/**
|
|
551
|
+
* The path to write the traces to. Only for file exporter.
|
|
552
|
+
*/
|
|
553
|
+
path?: string;
|
|
554
|
+
/**
|
|
555
|
+
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
556
|
+
*/
|
|
557
|
+
protocol?: "http" | "grpc";
|
|
558
|
+
/**
|
|
559
|
+
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
560
|
+
*/
|
|
561
|
+
transport?: "http" | "grpc";
|
|
562
|
+
[k: string]: unknown;
|
|
563
|
+
};
|
|
564
|
+
additionalProperties?: never;
|
|
565
|
+
[k: string]: unknown;
|
|
566
|
+
};
|
|
567
|
+
/**
|
|
568
|
+
* Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
|
|
569
|
+
*/
|
|
570
|
+
diagLogger?: boolean | string;
|
|
571
|
+
};
|
|
572
|
+
verticalScaler?: {
|
|
573
|
+
enabled?: boolean;
|
|
574
|
+
maxTotalWorkers?: number;
|
|
575
|
+
maxTotalMemory?: number;
|
|
576
|
+
minWorkers?: number;
|
|
577
|
+
maxWorkers?: number;
|
|
578
|
+
cooldownSec?: number;
|
|
579
|
+
gracePeriod?: number;
|
|
580
|
+
scaleUpELU?: number;
|
|
581
|
+
scaleDownELU?: number;
|
|
582
|
+
/**
|
|
583
|
+
* @deprecated
|
|
584
|
+
*/
|
|
585
|
+
timeWindowSec?: number;
|
|
586
|
+
/**
|
|
587
|
+
* @deprecated
|
|
588
|
+
*/
|
|
589
|
+
scaleDownTimeWindowSec?: number;
|
|
590
|
+
/**
|
|
591
|
+
* @deprecated
|
|
592
|
+
*/
|
|
593
|
+
scaleIntervalSec?: number;
|
|
594
|
+
};
|
|
595
|
+
inspectorOptions?: {
|
|
596
|
+
host?: string;
|
|
597
|
+
port?: number;
|
|
598
|
+
breakFirstLine?: boolean;
|
|
599
|
+
watchDisabled?: boolean;
|
|
600
|
+
[k: string]: unknown;
|
|
601
|
+
};
|
|
602
|
+
applicationTimeout?: number | string;
|
|
603
|
+
startupConcurrency?: number | string;
|
|
604
|
+
messagingTimeout?: number | string;
|
|
605
|
+
env?: {
|
|
606
|
+
[k: string]: string;
|
|
607
|
+
};
|
|
608
|
+
envfile?: string;
|
|
609
|
+
sourceMaps?: boolean;
|
|
610
|
+
nodeModulesSourceMaps?: string[];
|
|
611
|
+
scheduler?: {
|
|
612
|
+
enabled?: boolean | string;
|
|
613
|
+
name: string;
|
|
614
|
+
cron: string;
|
|
615
|
+
callbackUrl: string;
|
|
616
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
617
|
+
headers?: {
|
|
618
|
+
[k: string]: string;
|
|
619
|
+
};
|
|
620
|
+
body?:
|
|
621
|
+
| string
|
|
622
|
+
| {
|
|
623
|
+
[k: string]: unknown;
|
|
624
|
+
};
|
|
625
|
+
maxRetries?: number;
|
|
626
|
+
[k: string]: unknown;
|
|
627
|
+
}[];
|
|
628
|
+
policies?: {
|
|
629
|
+
deny: {
|
|
630
|
+
/**
|
|
631
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
632
|
+
* via the `patternProperty` "^.*$".
|
|
633
|
+
*/
|
|
634
|
+
[k: string]: string | [string, ...string[]];
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
compileCache?:
|
|
638
|
+
| boolean
|
|
639
|
+
| {
|
|
640
|
+
/**
|
|
641
|
+
* Enable Node.js module compile cache for faster startup
|
|
642
|
+
*/
|
|
643
|
+
enabled?: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* Directory to store compile cache. Defaults to .plt/compile-cache in app root
|
|
646
|
+
*/
|
|
647
|
+
directory?: string;
|
|
648
|
+
};
|
|
649
|
+
application?: {
|
|
650
|
+
reuseTcpPorts?: boolean;
|
|
651
|
+
workers?:
|
|
652
|
+
| number
|
|
653
|
+
| string
|
|
654
|
+
| {
|
|
655
|
+
static?: number;
|
|
656
|
+
minimum?: number;
|
|
657
|
+
maximum?: number;
|
|
658
|
+
scaleUpELU?: number;
|
|
659
|
+
scaleDownELU?: number;
|
|
660
|
+
[k: string]: unknown;
|
|
661
|
+
};
|
|
662
|
+
health?: {
|
|
663
|
+
enabled?: boolean | string;
|
|
664
|
+
interval?: number | string;
|
|
665
|
+
gracePeriod?: number | string;
|
|
666
|
+
maxUnhealthyChecks?: number | string;
|
|
667
|
+
maxELU?: number | string;
|
|
668
|
+
maxHeapUsed?: number | string;
|
|
669
|
+
maxHeapTotal?: number | string;
|
|
670
|
+
maxYoungGeneration?: number | string;
|
|
671
|
+
codeRangeSize?: number | string;
|
|
672
|
+
bufferPoolSize?: number | string;
|
|
673
|
+
defaultHighWaterMark?: number | string;
|
|
674
|
+
};
|
|
675
|
+
arguments?: string[];
|
|
676
|
+
env?: {
|
|
677
|
+
[k: string]: string;
|
|
678
|
+
};
|
|
679
|
+
envfile?: string;
|
|
680
|
+
sourceMaps?: boolean;
|
|
681
|
+
nodeModulesSourceMaps?: string[];
|
|
682
|
+
packageManager?: "npm" | "pnpm" | "yarn";
|
|
683
|
+
preload?: string | string[];
|
|
684
|
+
nodeOptions?: string;
|
|
685
|
+
execArgv?: string[];
|
|
686
|
+
permissions?: {
|
|
687
|
+
fs?: {
|
|
688
|
+
read?: string[];
|
|
689
|
+
write?: string[];
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
telemetry?: {
|
|
693
|
+
/**
|
|
694
|
+
* An array of instrumentations loaded if telemetry is enabled
|
|
695
|
+
*/
|
|
696
|
+
instrumentations?: (
|
|
697
|
+
| string
|
|
698
|
+
| {
|
|
699
|
+
package: string;
|
|
700
|
+
exportName?: string;
|
|
701
|
+
options?: {
|
|
702
|
+
[k: string]: unknown;
|
|
703
|
+
};
|
|
704
|
+
[k: string]: unknown;
|
|
705
|
+
}
|
|
706
|
+
)[];
|
|
707
|
+
[k: string]: unknown;
|
|
708
|
+
};
|
|
709
|
+
compileCache?:
|
|
710
|
+
| boolean
|
|
711
|
+
| {
|
|
712
|
+
/**
|
|
713
|
+
* Enable Node.js module compile cache for faster startup
|
|
714
|
+
*/
|
|
715
|
+
enabled?: boolean;
|
|
716
|
+
/**
|
|
717
|
+
* Directory to store compile cache. Defaults to .plt/compile-cache in app root
|
|
718
|
+
*/
|
|
719
|
+
directory?: string;
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
vite?: {
|
|
724
|
+
configFile?: string | boolean;
|
|
725
|
+
devServer?: {
|
|
726
|
+
strict?: boolean;
|
|
727
|
+
};
|
|
728
|
+
ssr?:
|
|
729
|
+
| {
|
|
730
|
+
enabled?: boolean;
|
|
731
|
+
entrypoint: string;
|
|
732
|
+
clientDirectory?: string;
|
|
733
|
+
serverDirectory?: string;
|
|
734
|
+
}
|
|
735
|
+
| boolean;
|
|
736
|
+
notFoundHandler?:
|
|
737
|
+
| boolean
|
|
738
|
+
| string
|
|
739
|
+
| {
|
|
740
|
+
enabled?: boolean;
|
|
741
|
+
path?: string;
|
|
742
|
+
contentType?: string;
|
|
743
|
+
statusCode?: number;
|
|
744
|
+
};
|
|
745
|
+
};
|
|
746
|
+
nuxt?: {
|
|
747
|
+
outputDirectory?: string;
|
|
748
|
+
};
|
|
749
|
+
}
|