@platformatic/nitro 3.75.0 → 3.76.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 CHANGED
@@ -240,9 +240,23 @@ export interface PlatformaticNitroConfig {
240
240
  gracePeriod?: number | string;
241
241
  maxUnhealthyChecks?: number | string;
242
242
  maxELU?: number | string;
243
+ maxELULogLevel?: (
244
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
245
+ | {
246
+ [k: string]: unknown;
247
+ }
248
+ ) &
249
+ string;
243
250
  maxEventLoopDelay?: number | string;
244
251
  maxEventLoopDelayP99?: number | string;
245
252
  maxHeapUsed?: number | string;
253
+ maxHeapUsedLogLevel?: (
254
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
255
+ | {
256
+ [k: string]: unknown;
257
+ }
258
+ ) &
259
+ string;
246
260
  maxHeapTotal?: number | string;
247
261
  maxYoungGeneration?: number | string;
248
262
  codeRangeSize?: number | string;
@@ -494,9 +508,23 @@ export interface PlatformaticNitroConfig {
494
508
  gracePeriod?: number | string;
495
509
  maxUnhealthyChecks?: number | string;
496
510
  maxELU?: number | string;
511
+ maxELULogLevel?: (
512
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
513
+ | {
514
+ [k: string]: unknown;
515
+ }
516
+ ) &
517
+ string;
497
518
  maxEventLoopDelay?: number | string;
498
519
  maxEventLoopDelayP99?: number | string;
499
520
  maxHeapUsed?: number | string;
521
+ maxHeapUsedLogLevel?: (
522
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
523
+ | {
524
+ [k: string]: unknown;
525
+ }
526
+ ) &
527
+ string;
500
528
  maxHeapTotal?: number | string;
501
529
  maxYoungGeneration?: number | string;
502
530
  codeRangeSize?: number | string;
@@ -869,6 +897,32 @@ export interface PlatformaticNitroConfig {
869
897
  * Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
870
898
  */
871
899
  diagLogger?: boolean | string;
900
+ /**
901
+ * How much to trace. Omitted, everything is recorded. Either a type out of the set OpenTelemetry defines for OTEL_TRACES_SAMPLER, or a package exporting a sampler.
902
+ */
903
+ sampler?:
904
+ | {
905
+ type:
906
+ | "always_on"
907
+ | "always_off"
908
+ | "traceidratio"
909
+ | "parentbased_always_on"
910
+ | "parentbased_always_off"
911
+ | "parentbased_traceidratio";
912
+ /**
913
+ * Options for the sampler, for instance { "ratio": 0.1 } for the ratio based ones.
914
+ */
915
+ options?: {
916
+ [k: string]: unknown;
917
+ };
918
+ }
919
+ | {
920
+ package: string;
921
+ exportName?: string;
922
+ options?: {
923
+ [k: string]: unknown;
924
+ };
925
+ };
872
926
  };
873
927
  verticalScaler?: {
874
928
  enabled?: boolean;
@@ -970,9 +1024,23 @@ export interface PlatformaticNitroConfig {
970
1024
  gracePeriod?: number | string;
971
1025
  maxUnhealthyChecks?: number | string;
972
1026
  maxELU?: number | string;
1027
+ maxELULogLevel?: (
1028
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
1029
+ | {
1030
+ [k: string]: unknown;
1031
+ }
1032
+ ) &
1033
+ string;
973
1034
  maxEventLoopDelay?: number | string;
974
1035
  maxEventLoopDelayP99?: number | string;
975
1036
  maxHeapUsed?: number | string;
1037
+ maxHeapUsedLogLevel?: (
1038
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
1039
+ | {
1040
+ [k: string]: unknown;
1041
+ }
1042
+ ) &
1043
+ string;
976
1044
  maxHeapTotal?: number | string;
977
1045
  maxYoungGeneration?: number | string;
978
1046
  codeRangeSize?: number | string;
package/lib/schema.js CHANGED
@@ -32,6 +32,7 @@ delete server.properties.http2
32
32
  const vite = structuredClone(viteSchemaComponents.vite)
33
33
  delete vite.properties.ssr
34
34
  delete vite.properties.notFoundHandler
35
+ delete vite.properties.preCompressed
35
36
 
36
37
  export const schemaComponents = { nitro, vite }
37
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/nitro",
3
- "version": "3.75.0",
3
+ "version": "3.76.0",
4
4
  "description": "Platformatic Nitro Capability",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -29,16 +29,16 @@
29
29
  },
30
30
  "homepage": "https://github.com/platformatic/platformatic#readme",
31
31
  "dependencies": {
32
- "@platformatic/basic": "3.75.0",
33
- "@platformatic/foundation": "3.75.0",
34
- "@platformatic/globals": "3.75.0",
35
- "@platformatic/vite": "3.75.0",
32
+ "@platformatic/basic": "3.76.0",
33
+ "@platformatic/foundation": "3.76.0",
34
+ "@platformatic/globals": "3.76.0",
35
+ "@platformatic/vite": "3.76.0",
36
36
  "light-my-request": "^6.6.0",
37
37
  "semver": "^7.6.3"
38
38
  },
39
39
  "devDependencies": {
40
- "@platformatic/gateway": "3.75.0",
41
- "@platformatic/service": "3.75.0",
40
+ "@platformatic/gateway": "3.76.0",
41
+ "@platformatic/service": "3.76.0",
42
42
  "cleaner-spec-reporter": "^2.0.0",
43
43
  "eslint": "9",
44
44
  "json-schema-to-typescript": "^16.0.0",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/nitro/3.75.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/nitro/3.76.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Nitro Config",
5
5
  "type": "object",
@@ -727,6 +727,25 @@
727
727
  }
728
728
  ]
729
729
  },
730
+ "maxELULogLevel": {
731
+ "type": "string",
732
+ "oneOf": [
733
+ {
734
+ "enum": [
735
+ "fatal",
736
+ "error",
737
+ "warn",
738
+ "info",
739
+ "debug",
740
+ "trace",
741
+ "silent"
742
+ ]
743
+ },
744
+ {
745
+ "pattern": "^\\{.+\\}$"
746
+ }
747
+ ]
748
+ },
730
749
  "maxEventLoopDelay": {
731
750
  "anyOf": [
732
751
  {
@@ -761,6 +780,25 @@
761
780
  }
762
781
  ]
763
782
  },
783
+ "maxHeapUsedLogLevel": {
784
+ "type": "string",
785
+ "oneOf": [
786
+ {
787
+ "enum": [
788
+ "fatal",
789
+ "error",
790
+ "warn",
791
+ "info",
792
+ "debug",
793
+ "trace",
794
+ "silent"
795
+ ]
796
+ },
797
+ {
798
+ "pattern": "^\\{.+\\}$"
799
+ }
800
+ ]
801
+ },
764
802
  "maxHeapTotal": {
765
803
  "anyOf": [
766
804
  {
@@ -1585,6 +1623,26 @@
1585
1623
  ],
1586
1624
  "default": 0.99
1587
1625
  },
1626
+ "maxELULogLevel": {
1627
+ "type": "string",
1628
+ "oneOf": [
1629
+ {
1630
+ "enum": [
1631
+ "fatal",
1632
+ "error",
1633
+ "warn",
1634
+ "info",
1635
+ "debug",
1636
+ "trace",
1637
+ "silent"
1638
+ ]
1639
+ },
1640
+ {
1641
+ "pattern": "^\\{.+\\}$"
1642
+ }
1643
+ ],
1644
+ "default": "error"
1645
+ },
1588
1646
  "maxEventLoopDelay": {
1589
1647
  "anyOf": [
1590
1648
  {
@@ -1620,6 +1678,26 @@
1620
1678
  ],
1621
1679
  "default": 0.99
1622
1680
  },
1681
+ "maxHeapUsedLogLevel": {
1682
+ "type": "string",
1683
+ "oneOf": [
1684
+ {
1685
+ "enum": [
1686
+ "fatal",
1687
+ "error",
1688
+ "warn",
1689
+ "info",
1690
+ "debug",
1691
+ "trace",
1692
+ "silent"
1693
+ ]
1694
+ },
1695
+ {
1696
+ "pattern": "^\\{.+\\}$"
1697
+ }
1698
+ ],
1699
+ "default": "error"
1700
+ },
1623
1701
  "maxHeapTotal": {
1624
1702
  "anyOf": [
1625
1703
  {
@@ -2594,6 +2672,56 @@
2594
2672
  }
2595
2673
  ],
2596
2674
  "description": "Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level."
2675
+ },
2676
+ "sampler": {
2677
+ "description": "How much to trace. Omitted, everything is recorded. Either a type out of the set OpenTelemetry defines for OTEL_TRACES_SAMPLER, or a package exporting a sampler.",
2678
+ "anyOf": [
2679
+ {
2680
+ "type": "object",
2681
+ "properties": {
2682
+ "type": {
2683
+ "type": "string",
2684
+ "enum": [
2685
+ "always_on",
2686
+ "always_off",
2687
+ "traceidratio",
2688
+ "parentbased_always_on",
2689
+ "parentbased_always_off",
2690
+ "parentbased_traceidratio"
2691
+ ]
2692
+ },
2693
+ "options": {
2694
+ "type": "object",
2695
+ "description": "Options for the sampler, for instance { \"ratio\": 0.1 } for the ratio based ones.",
2696
+ "additionalProperties": true
2697
+ }
2698
+ },
2699
+ "required": [
2700
+ "type"
2701
+ ],
2702
+ "additionalProperties": false
2703
+ },
2704
+ {
2705
+ "type": "object",
2706
+ "description": "A module exporting a sampler, or a factory which receives the options and returns one. A relative path is resolved against the application directory.",
2707
+ "properties": {
2708
+ "package": {
2709
+ "type": "string"
2710
+ },
2711
+ "exportName": {
2712
+ "type": "string"
2713
+ },
2714
+ "options": {
2715
+ "type": "object",
2716
+ "additionalProperties": true
2717
+ }
2718
+ },
2719
+ "required": [
2720
+ "package"
2721
+ ],
2722
+ "additionalProperties": false
2723
+ }
2724
+ ]
2597
2725
  }
2598
2726
  },
2599
2727
  "required": [
@@ -2962,6 +3090,25 @@
2962
3090
  }
2963
3091
  ]
2964
3092
  },
3093
+ "maxELULogLevel": {
3094
+ "type": "string",
3095
+ "oneOf": [
3096
+ {
3097
+ "enum": [
3098
+ "fatal",
3099
+ "error",
3100
+ "warn",
3101
+ "info",
3102
+ "debug",
3103
+ "trace",
3104
+ "silent"
3105
+ ]
3106
+ },
3107
+ {
3108
+ "pattern": "^\\{.+\\}$"
3109
+ }
3110
+ ]
3111
+ },
2965
3112
  "maxEventLoopDelay": {
2966
3113
  "anyOf": [
2967
3114
  {
@@ -2996,6 +3143,25 @@
2996
3143
  }
2997
3144
  ]
2998
3145
  },
3146
+ "maxHeapUsedLogLevel": {
3147
+ "type": "string",
3148
+ "oneOf": [
3149
+ {
3150
+ "enum": [
3151
+ "fatal",
3152
+ "error",
3153
+ "warn",
3154
+ "info",
3155
+ "debug",
3156
+ "trace",
3157
+ "silent"
3158
+ ]
3159
+ },
3160
+ {
3161
+ "pattern": "^\\{.+\\}$"
3162
+ }
3163
+ ]
3164
+ },
2999
3165
  "maxHeapTotal": {
3000
3166
  "anyOf": [
3001
3167
  {