@platformatic/react-router 3.73.0 → 3.75.0
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 +135 -4
- package/lib/capability.js +4 -2
- package/package.json +8 -8
- package/schema.json +41 -1
package/config.d.ts
CHANGED
|
@@ -54,6 +54,14 @@ export interface PlatformaticReactRouterConfig {
|
|
|
54
54
|
[k: string]: unknown;
|
|
55
55
|
} | null;
|
|
56
56
|
messageKey?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The key used for the timestamp in emitted logs. Defaults to time.
|
|
59
|
+
*/
|
|
60
|
+
timestampKey?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The key used for the level in emitted logs. Defaults to level.
|
|
63
|
+
*/
|
|
64
|
+
levelKey?: string;
|
|
57
65
|
customLevels?: {
|
|
58
66
|
[k: string]: unknown;
|
|
59
67
|
};
|
|
@@ -114,6 +122,14 @@ export interface PlatformaticReactRouterConfig {
|
|
|
114
122
|
* The maximum length of the queue of pending connections
|
|
115
123
|
*/
|
|
116
124
|
backlog?: number;
|
|
125
|
+
/**
|
|
126
|
+
* The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed. When running behind a load balancer, set it higher than the load balancer idle timeout.
|
|
127
|
+
*/
|
|
128
|
+
keepAliveTimeout?: number;
|
|
129
|
+
/**
|
|
130
|
+
* The number of milliseconds to wait to receive the complete HTTP headers from the client. It should be greater than keepAliveTimeout.
|
|
131
|
+
*/
|
|
132
|
+
headersTimeout?: number;
|
|
117
133
|
http2?: boolean;
|
|
118
134
|
https?: {
|
|
119
135
|
allowHTTP1?: boolean;
|
|
@@ -149,8 +165,8 @@ export interface PlatformaticReactRouterConfig {
|
|
|
149
165
|
/**
|
|
150
166
|
* @minItems 1
|
|
151
167
|
*/
|
|
152
|
-
allow?: [string, ...string[]];
|
|
153
|
-
ignore?: string[];
|
|
168
|
+
allow?: [string, ...string[]] | null;
|
|
169
|
+
ignore?: string[] | null;
|
|
154
170
|
}
|
|
155
171
|
| boolean
|
|
156
172
|
| string;
|
|
@@ -191,9 +207,108 @@ export interface PlatformaticReactRouterConfig {
|
|
|
191
207
|
}
|
|
192
208
|
)[];
|
|
193
209
|
basePath?: string;
|
|
194
|
-
services?: {
|
|
210
|
+
services?: ({
|
|
195
211
|
[k: string]: unknown;
|
|
196
|
-
}
|
|
212
|
+
} & {
|
|
213
|
+
id?: string;
|
|
214
|
+
enabled?:
|
|
215
|
+
| boolean
|
|
216
|
+
| string
|
|
217
|
+
| {
|
|
218
|
+
[k: string]: boolean;
|
|
219
|
+
};
|
|
220
|
+
path?: string;
|
|
221
|
+
config?: string;
|
|
222
|
+
url?: string;
|
|
223
|
+
gitBranch?: string;
|
|
224
|
+
useHttp?: boolean;
|
|
225
|
+
websocket?: boolean;
|
|
226
|
+
reuseTcpPorts?: boolean;
|
|
227
|
+
workers?:
|
|
228
|
+
| number
|
|
229
|
+
| string
|
|
230
|
+
| {
|
|
231
|
+
static?: number;
|
|
232
|
+
minimum?: number;
|
|
233
|
+
maximum?: number;
|
|
234
|
+
scaleUpELU?: number;
|
|
235
|
+
scaleDownELU?: number;
|
|
236
|
+
[k: string]: unknown;
|
|
237
|
+
};
|
|
238
|
+
health?: {
|
|
239
|
+
enabled?: boolean | string;
|
|
240
|
+
interval?: number | string;
|
|
241
|
+
gracePeriod?: number | string;
|
|
242
|
+
maxUnhealthyChecks?: number | string;
|
|
243
|
+
maxELU?: number | string;
|
|
244
|
+
maxEventLoopDelay?: number | string;
|
|
245
|
+
maxEventLoopDelayP99?: number | string;
|
|
246
|
+
maxHeapUsed?: number | string;
|
|
247
|
+
maxHeapTotal?: number | string;
|
|
248
|
+
maxYoungGeneration?: number | string;
|
|
249
|
+
codeRangeSize?: number | string;
|
|
250
|
+
bufferPoolSize?: number | string;
|
|
251
|
+
defaultHighWaterMark?: number | string;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* 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.
|
|
255
|
+
*/
|
|
256
|
+
restartOnError?: boolean | number;
|
|
257
|
+
dependencies?: string[];
|
|
258
|
+
arguments?: string[];
|
|
259
|
+
env?: {
|
|
260
|
+
[k: string]: string;
|
|
261
|
+
};
|
|
262
|
+
envfile?: string;
|
|
263
|
+
sourceMaps?: boolean;
|
|
264
|
+
nodeModulesSourceMaps?: string[];
|
|
265
|
+
packageManager?: "npm" | "pnpm" | "yarn";
|
|
266
|
+
preload?: string | string[];
|
|
267
|
+
nodeOptions?: string;
|
|
268
|
+
execArgv?: string[];
|
|
269
|
+
permissions?: {
|
|
270
|
+
fs?: {
|
|
271
|
+
read?: string[];
|
|
272
|
+
write?: string[];
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
telemetry?: {
|
|
276
|
+
/**
|
|
277
|
+
* An array of instrumentations loaded if telemetry is enabled
|
|
278
|
+
*/
|
|
279
|
+
instrumentations?: (
|
|
280
|
+
| string
|
|
281
|
+
| {
|
|
282
|
+
package: string;
|
|
283
|
+
exportName?: string;
|
|
284
|
+
options?: {
|
|
285
|
+
[k: string]: unknown;
|
|
286
|
+
};
|
|
287
|
+
[k: string]: unknown;
|
|
288
|
+
}
|
|
289
|
+
)[];
|
|
290
|
+
[k: string]: unknown;
|
|
291
|
+
};
|
|
292
|
+
compileCache?:
|
|
293
|
+
| boolean
|
|
294
|
+
| {
|
|
295
|
+
/**
|
|
296
|
+
* Enable Node.js module compile cache for faster startup
|
|
297
|
+
*/
|
|
298
|
+
enabled?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* Directory to store compile cache. Defaults to .plt/compile-cache in app root
|
|
301
|
+
*/
|
|
302
|
+
directory?: string;
|
|
303
|
+
};
|
|
304
|
+
management?:
|
|
305
|
+
| boolean
|
|
306
|
+
| {
|
|
307
|
+
enabled?: boolean;
|
|
308
|
+
operations?: string[];
|
|
309
|
+
};
|
|
310
|
+
[k: string]: unknown;
|
|
311
|
+
})[];
|
|
197
312
|
workers?:
|
|
198
313
|
| number
|
|
199
314
|
| string
|
|
@@ -257,6 +372,14 @@ export interface PlatformaticReactRouterConfig {
|
|
|
257
372
|
[k: string]: unknown;
|
|
258
373
|
} | null;
|
|
259
374
|
messageKey?: string;
|
|
375
|
+
/**
|
|
376
|
+
* The key used for the timestamp in emitted logs. Defaults to time.
|
|
377
|
+
*/
|
|
378
|
+
timestampKey?: string;
|
|
379
|
+
/**
|
|
380
|
+
* The key used for the level in emitted logs. Defaults to level.
|
|
381
|
+
*/
|
|
382
|
+
levelKey?: string;
|
|
260
383
|
customLevels?: {
|
|
261
384
|
[k: string]: unknown;
|
|
262
385
|
};
|
|
@@ -317,6 +440,14 @@ export interface PlatformaticReactRouterConfig {
|
|
|
317
440
|
* The maximum length of the queue of pending connections
|
|
318
441
|
*/
|
|
319
442
|
backlog?: number;
|
|
443
|
+
/**
|
|
444
|
+
* The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed. When running behind a load balancer, set it higher than the load balancer idle timeout.
|
|
445
|
+
*/
|
|
446
|
+
keepAliveTimeout?: number;
|
|
447
|
+
/**
|
|
448
|
+
* The number of milliseconds to wait to receive the complete HTTP headers from the client. It should be greater than keepAliveTimeout.
|
|
449
|
+
*/
|
|
450
|
+
headersTimeout?: number;
|
|
320
451
|
http2?: boolean;
|
|
321
452
|
https?: {
|
|
322
453
|
allowHTTP1?: boolean;
|
package/lib/capability.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
buildFastifyOptions,
|
|
4
4
|
buildListenOptions,
|
|
5
5
|
cleanBasePath,
|
|
6
|
+
buildServerListenerOptions,
|
|
6
7
|
createServerListener,
|
|
7
8
|
ensureTrailingSlash,
|
|
8
9
|
errors,
|
|
@@ -128,8 +129,9 @@ export class ReactRouterCapability extends ViteCapability {
|
|
|
128
129
|
const serverOptions = this.serverConfig
|
|
129
130
|
const listenOptions = buildListenOptions(serverOptions)
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
const listenerOptions = buildServerListenerOptions(serverOptions)
|
|
133
|
+
if (Object.keys(listenerOptions).length > 0) {
|
|
134
|
+
createServerListener(false, false, listenerOptions)
|
|
133
135
|
}
|
|
134
136
|
|
|
135
137
|
await this.#app.listen(listenOptions)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/react-router",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.75.0",
|
|
4
4
|
"description": "Platformatic React Router Capability",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"homepage": "https://github.com/platformatic/platformatic#readme",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@fastify/static": "^10.0.0",
|
|
19
|
-
"@platformatic/basic": "3.
|
|
20
|
-
"@platformatic/foundation": "3.
|
|
21
|
-
"@platformatic/globals": "3.
|
|
22
|
-
"@platformatic/vite": "3.
|
|
19
|
+
"@platformatic/basic": "3.75.0",
|
|
20
|
+
"@platformatic/foundation": "3.75.0",
|
|
21
|
+
"@platformatic/globals": "3.75.0",
|
|
22
|
+
"@platformatic/vite": "3.75.0",
|
|
23
23
|
"fastify": "^5.0.0",
|
|
24
24
|
"semver": "^7.6.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@platformatic/gateway": "3.
|
|
28
|
-
"@platformatic/service": "3.
|
|
27
|
+
"@platformatic/gateway": "3.75.0",
|
|
28
|
+
"@platformatic/service": "3.75.0",
|
|
29
29
|
"@react-router/dev": "^7.10.0",
|
|
30
30
|
"@react-router/node": "^7.10.0",
|
|
31
31
|
"@types/react": "^19.1.11",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"eslint": "9",
|
|
35
35
|
"fastify": "^5.0.0",
|
|
36
36
|
"isbot": "^5.1.17",
|
|
37
|
-
"json-schema-to-typescript": "^
|
|
37
|
+
"json-schema-to-typescript": "^16.0.0",
|
|
38
38
|
"tstyche": "^7.0.0",
|
|
39
39
|
"neostandard": "^0.14.0",
|
|
40
40
|
"react": "^19.1.0",
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/react-router/3.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/react-router/3.75.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic React Router Config",
|
|
5
5
|
"type": "object",
|
|
@@ -141,6 +141,16 @@
|
|
|
141
141
|
"messageKey": {
|
|
142
142
|
"type": "string"
|
|
143
143
|
},
|
|
144
|
+
"timestampKey": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"minLength": 1,
|
|
147
|
+
"description": "The key used for the timestamp in emitted logs. Defaults to time."
|
|
148
|
+
},
|
|
149
|
+
"levelKey": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"minLength": 1,
|
|
152
|
+
"description": "The key used for the level in emitted logs. Defaults to level."
|
|
153
|
+
},
|
|
144
154
|
"customLevels": {
|
|
145
155
|
"type": "object",
|
|
146
156
|
"additionalProperties": true
|
|
@@ -270,6 +280,16 @@
|
|
|
270
280
|
"type": "integer",
|
|
271
281
|
"description": "The maximum length of the queue of pending connections"
|
|
272
282
|
},
|
|
283
|
+
"keepAliveTimeout": {
|
|
284
|
+
"type": "integer",
|
|
285
|
+
"minimum": 0,
|
|
286
|
+
"description": "The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed. When running behind a load balancer, set it higher than the load balancer idle timeout."
|
|
287
|
+
},
|
|
288
|
+
"headersTimeout": {
|
|
289
|
+
"type": "integer",
|
|
290
|
+
"minimum": 0,
|
|
291
|
+
"description": "The number of milliseconds to wait to receive the complete HTTP headers from the client. It should be greater than keepAliveTimeout."
|
|
292
|
+
},
|
|
273
293
|
"http2": {
|
|
274
294
|
"type": "boolean"
|
|
275
295
|
},
|
|
@@ -1187,6 +1207,16 @@
|
|
|
1187
1207
|
"messageKey": {
|
|
1188
1208
|
"type": "string"
|
|
1189
1209
|
},
|
|
1210
|
+
"timestampKey": {
|
|
1211
|
+
"type": "string",
|
|
1212
|
+
"minLength": 1,
|
|
1213
|
+
"description": "The key used for the timestamp in emitted logs. Defaults to time."
|
|
1214
|
+
},
|
|
1215
|
+
"levelKey": {
|
|
1216
|
+
"type": "string",
|
|
1217
|
+
"minLength": 1,
|
|
1218
|
+
"description": "The key used for the level in emitted logs. Defaults to level."
|
|
1219
|
+
},
|
|
1190
1220
|
"customLevels": {
|
|
1191
1221
|
"type": "object",
|
|
1192
1222
|
"additionalProperties": true
|
|
@@ -1316,6 +1346,16 @@
|
|
|
1316
1346
|
"type": "integer",
|
|
1317
1347
|
"description": "The maximum length of the queue of pending connections"
|
|
1318
1348
|
},
|
|
1349
|
+
"keepAliveTimeout": {
|
|
1350
|
+
"type": "integer",
|
|
1351
|
+
"minimum": 0,
|
|
1352
|
+
"description": "The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed. When running behind a load balancer, set it higher than the load balancer idle timeout."
|
|
1353
|
+
},
|
|
1354
|
+
"headersTimeout": {
|
|
1355
|
+
"type": "integer",
|
|
1356
|
+
"minimum": 0,
|
|
1357
|
+
"description": "The number of milliseconds to wait to receive the complete HTTP headers from the client. It should be greater than keepAliveTimeout."
|
|
1358
|
+
},
|
|
1319
1359
|
"http2": {
|
|
1320
1360
|
"type": "boolean"
|
|
1321
1361
|
},
|