@platformatic/react-router 3.33.0 → 3.34.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.
Files changed (3) hide show
  1. package/config.d.ts +21 -0
  2. package/package.json +6 -6
  3. package/schema.json +32 -1
package/config.d.ts CHANGED
@@ -231,6 +231,10 @@ export interface PlatformaticReactRouterConfig {
231
231
  gracefulShutdown?: {
232
232
  runtime: number | string;
233
233
  application: number | string;
234
+ /**
235
+ * Add Connection: close header to HTTP responses during graceful shutdown
236
+ */
237
+ closeConnections?: boolean;
234
238
  };
235
239
  health?: {
236
240
  enabled?: boolean | string;
@@ -394,6 +398,23 @@ export interface PlatformaticReactRouterConfig {
394
398
  */
395
399
  serviceVersion?: string;
396
400
  };
401
+ /**
402
+ * Custom labels to add to HTTP metrics (http_request_all_duration_seconds). Each label extracts its value from an HTTP request header.
403
+ */
404
+ httpCustomLabels?: {
405
+ /**
406
+ * The label name to use in metrics
407
+ */
408
+ name: string;
409
+ /**
410
+ * The HTTP request header to extract the value from
411
+ */
412
+ header: string;
413
+ /**
414
+ * Default value when header is missing (defaults to "unknown")
415
+ */
416
+ default?: string;
417
+ }[];
397
418
  };
398
419
  telemetry?: {
399
420
  enabled?: boolean | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/react-router",
3
- "version": "3.33.0",
3
+ "version": "3.34.0",
4
4
  "description": "Platformatic React Router Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,9 +18,9 @@
18
18
  "@fastify/static": "^8.0.0",
19
19
  "fastify": "^5.7.0",
20
20
  "semver": "^7.6.3",
21
- "@platformatic/basic": "3.33.0",
22
- "@platformatic/vite": "3.33.0",
23
- "@platformatic/foundation": "3.33.0"
21
+ "@platformatic/foundation": "3.34.0",
22
+ "@platformatic/basic": "3.34.0",
23
+ "@platformatic/vite": "3.34.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@react-router/dev": "^7.10.0",
@@ -40,8 +40,8 @@
40
40
  "typescript": "^5.5.4",
41
41
  "vite": "^7.1.7",
42
42
  "ws": "^8.18.0",
43
- "@platformatic/gateway": "3.33.0",
44
- "@platformatic/service": "3.33.0"
43
+ "@platformatic/gateway": "3.34.0",
44
+ "@platformatic/service": "3.34.0"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/react-router/3.33.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/react-router/3.34.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic React Router Config",
5
5
  "type": "object",
@@ -1111,6 +1111,11 @@
1111
1111
  }
1112
1112
  ],
1113
1113
  "default": 10000
1114
+ },
1115
+ "closeConnections": {
1116
+ "type": "boolean",
1117
+ "default": true,
1118
+ "description": "Add Connection: close header to HTTP responses during graceful shutdown"
1114
1119
  }
1115
1120
  },
1116
1121
  "default": {},
@@ -1651,6 +1656,32 @@
1651
1656
  "endpoint"
1652
1657
  ],
1653
1658
  "additionalProperties": false
1659
+ },
1660
+ "httpCustomLabels": {
1661
+ "type": "array",
1662
+ "description": "Custom labels to add to HTTP metrics (http_request_all_duration_seconds). Each label extracts its value from an HTTP request header.",
1663
+ "items": {
1664
+ "type": "object",
1665
+ "properties": {
1666
+ "name": {
1667
+ "type": "string",
1668
+ "description": "The label name to use in metrics"
1669
+ },
1670
+ "header": {
1671
+ "type": "string",
1672
+ "description": "The HTTP request header to extract the value from"
1673
+ },
1674
+ "default": {
1675
+ "type": "string",
1676
+ "description": "Default value when header is missing (defaults to \"unknown\")"
1677
+ }
1678
+ },
1679
+ "required": [
1680
+ "name",
1681
+ "header"
1682
+ ],
1683
+ "additionalProperties": false
1684
+ }
1654
1685
  }
1655
1686
  },
1656
1687
  "additionalProperties": false