@platformatic/next 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.
Files changed (3) hide show
  1. package/config.d.ts +68 -0
  2. package/package.json +6 -6
  3. package/schema.json +167 -1
package/config.d.ts CHANGED
@@ -241,9 +241,23 @@ export interface PlatformaticNextJsConfig {
241
241
  gracePeriod?: number | string;
242
242
  maxUnhealthyChecks?: number | string;
243
243
  maxELU?: number | string;
244
+ maxELULogLevel?: (
245
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
246
+ | {
247
+ [k: string]: unknown;
248
+ }
249
+ ) &
250
+ string;
244
251
  maxEventLoopDelay?: number | string;
245
252
  maxEventLoopDelayP99?: number | string;
246
253
  maxHeapUsed?: number | string;
254
+ maxHeapUsedLogLevel?: (
255
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
256
+ | {
257
+ [k: string]: unknown;
258
+ }
259
+ ) &
260
+ string;
247
261
  maxHeapTotal?: number | string;
248
262
  maxYoungGeneration?: number | string;
249
263
  codeRangeSize?: number | string;
@@ -495,9 +509,23 @@ export interface PlatformaticNextJsConfig {
495
509
  gracePeriod?: number | string;
496
510
  maxUnhealthyChecks?: number | string;
497
511
  maxELU?: number | string;
512
+ maxELULogLevel?: (
513
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
514
+ | {
515
+ [k: string]: unknown;
516
+ }
517
+ ) &
518
+ string;
498
519
  maxEventLoopDelay?: number | string;
499
520
  maxEventLoopDelayP99?: number | string;
500
521
  maxHeapUsed?: number | string;
522
+ maxHeapUsedLogLevel?: (
523
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
524
+ | {
525
+ [k: string]: unknown;
526
+ }
527
+ ) &
528
+ string;
501
529
  maxHeapTotal?: number | string;
502
530
  maxYoungGeneration?: number | string;
503
531
  codeRangeSize?: number | string;
@@ -870,6 +898,32 @@ export interface PlatformaticNextJsConfig {
870
898
  * Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
871
899
  */
872
900
  diagLogger?: boolean | string;
901
+ /**
902
+ * 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.
903
+ */
904
+ sampler?:
905
+ | {
906
+ type:
907
+ | "always_on"
908
+ | "always_off"
909
+ | "traceidratio"
910
+ | "parentbased_always_on"
911
+ | "parentbased_always_off"
912
+ | "parentbased_traceidratio";
913
+ /**
914
+ * Options for the sampler, for instance { "ratio": 0.1 } for the ratio based ones.
915
+ */
916
+ options?: {
917
+ [k: string]: unknown;
918
+ };
919
+ }
920
+ | {
921
+ package: string;
922
+ exportName?: string;
923
+ options?: {
924
+ [k: string]: unknown;
925
+ };
926
+ };
873
927
  };
874
928
  verticalScaler?: {
875
929
  enabled?: boolean;
@@ -971,9 +1025,23 @@ export interface PlatformaticNextJsConfig {
971
1025
  gracePeriod?: number | string;
972
1026
  maxUnhealthyChecks?: number | string;
973
1027
  maxELU?: number | string;
1028
+ maxELULogLevel?: (
1029
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
1030
+ | {
1031
+ [k: string]: unknown;
1032
+ }
1033
+ ) &
1034
+ string;
974
1035
  maxEventLoopDelay?: number | string;
975
1036
  maxEventLoopDelayP99?: number | string;
976
1037
  maxHeapUsed?: number | string;
1038
+ maxHeapUsedLogLevel?: (
1039
+ | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
1040
+ | {
1041
+ [k: string]: unknown;
1042
+ }
1043
+ ) &
1044
+ string;
977
1045
  maxHeapTotal?: number | string;
978
1046
  maxYoungGeneration?: number | string;
979
1047
  codeRangeSize?: number | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/next",
3
- "version": "3.75.0",
3
+ "version": "3.76.0",
4
4
  "description": "Platformatic Next.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -19,9 +19,9 @@
19
19
  "@babel/parser": "^7.25.3",
20
20
  "@babel/traverse": "^7.25.3",
21
21
  "@babel/types": "^7.25.2",
22
- "@platformatic/basic": "3.75.0",
23
- "@platformatic/foundation": "3.75.0",
24
- "@platformatic/globals": "3.75.0",
22
+ "@platformatic/basic": "3.76.0",
23
+ "@platformatic/foundation": "3.76.0",
24
+ "@platformatic/globals": "3.76.0",
25
25
  "@platformatic/image-optimizer": "^0.2.1",
26
26
  "amaro": "^1.0.0",
27
27
  "iovalkey": "^0.4.0",
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@fastify/reply-from": "^12.0.0",
34
- "@platformatic/gateway": "3.75.0",
35
- "@platformatic/service": "3.75.0",
34
+ "@platformatic/gateway": "3.76.0",
35
+ "@platformatic/service": "3.76.0",
36
36
  "@types/node": "^22.5.0",
37
37
  "@types/react": "^19.1.11",
38
38
  "@types/react-dom": "^19.1.7",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/next/3.75.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/next/3.76.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Next.js Config",
5
5
  "type": "object",
@@ -733,6 +733,25 @@
733
733
  }
734
734
  ]
735
735
  },
736
+ "maxELULogLevel": {
737
+ "type": "string",
738
+ "oneOf": [
739
+ {
740
+ "enum": [
741
+ "fatal",
742
+ "error",
743
+ "warn",
744
+ "info",
745
+ "debug",
746
+ "trace",
747
+ "silent"
748
+ ]
749
+ },
750
+ {
751
+ "pattern": "^\\{.+\\}$"
752
+ }
753
+ ]
754
+ },
736
755
  "maxEventLoopDelay": {
737
756
  "anyOf": [
738
757
  {
@@ -767,6 +786,25 @@
767
786
  }
768
787
  ]
769
788
  },
789
+ "maxHeapUsedLogLevel": {
790
+ "type": "string",
791
+ "oneOf": [
792
+ {
793
+ "enum": [
794
+ "fatal",
795
+ "error",
796
+ "warn",
797
+ "info",
798
+ "debug",
799
+ "trace",
800
+ "silent"
801
+ ]
802
+ },
803
+ {
804
+ "pattern": "^\\{.+\\}$"
805
+ }
806
+ ]
807
+ },
770
808
  "maxHeapTotal": {
771
809
  "anyOf": [
772
810
  {
@@ -1591,6 +1629,26 @@
1591
1629
  ],
1592
1630
  "default": 0.99
1593
1631
  },
1632
+ "maxELULogLevel": {
1633
+ "type": "string",
1634
+ "oneOf": [
1635
+ {
1636
+ "enum": [
1637
+ "fatal",
1638
+ "error",
1639
+ "warn",
1640
+ "info",
1641
+ "debug",
1642
+ "trace",
1643
+ "silent"
1644
+ ]
1645
+ },
1646
+ {
1647
+ "pattern": "^\\{.+\\}$"
1648
+ }
1649
+ ],
1650
+ "default": "error"
1651
+ },
1594
1652
  "maxEventLoopDelay": {
1595
1653
  "anyOf": [
1596
1654
  {
@@ -1626,6 +1684,26 @@
1626
1684
  ],
1627
1685
  "default": 0.99
1628
1686
  },
1687
+ "maxHeapUsedLogLevel": {
1688
+ "type": "string",
1689
+ "oneOf": [
1690
+ {
1691
+ "enum": [
1692
+ "fatal",
1693
+ "error",
1694
+ "warn",
1695
+ "info",
1696
+ "debug",
1697
+ "trace",
1698
+ "silent"
1699
+ ]
1700
+ },
1701
+ {
1702
+ "pattern": "^\\{.+\\}$"
1703
+ }
1704
+ ],
1705
+ "default": "error"
1706
+ },
1629
1707
  "maxHeapTotal": {
1630
1708
  "anyOf": [
1631
1709
  {
@@ -2600,6 +2678,56 @@
2600
2678
  }
2601
2679
  ],
2602
2680
  "description": "Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level."
2681
+ },
2682
+ "sampler": {
2683
+ "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.",
2684
+ "anyOf": [
2685
+ {
2686
+ "type": "object",
2687
+ "properties": {
2688
+ "type": {
2689
+ "type": "string",
2690
+ "enum": [
2691
+ "always_on",
2692
+ "always_off",
2693
+ "traceidratio",
2694
+ "parentbased_always_on",
2695
+ "parentbased_always_off",
2696
+ "parentbased_traceidratio"
2697
+ ]
2698
+ },
2699
+ "options": {
2700
+ "type": "object",
2701
+ "description": "Options for the sampler, for instance { \"ratio\": 0.1 } for the ratio based ones.",
2702
+ "additionalProperties": true
2703
+ }
2704
+ },
2705
+ "required": [
2706
+ "type"
2707
+ ],
2708
+ "additionalProperties": false
2709
+ },
2710
+ {
2711
+ "type": "object",
2712
+ "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.",
2713
+ "properties": {
2714
+ "package": {
2715
+ "type": "string"
2716
+ },
2717
+ "exportName": {
2718
+ "type": "string"
2719
+ },
2720
+ "options": {
2721
+ "type": "object",
2722
+ "additionalProperties": true
2723
+ }
2724
+ },
2725
+ "required": [
2726
+ "package"
2727
+ ],
2728
+ "additionalProperties": false
2729
+ }
2730
+ ]
2603
2731
  }
2604
2732
  },
2605
2733
  "required": [
@@ -2968,6 +3096,25 @@
2968
3096
  }
2969
3097
  ]
2970
3098
  },
3099
+ "maxELULogLevel": {
3100
+ "type": "string",
3101
+ "oneOf": [
3102
+ {
3103
+ "enum": [
3104
+ "fatal",
3105
+ "error",
3106
+ "warn",
3107
+ "info",
3108
+ "debug",
3109
+ "trace",
3110
+ "silent"
3111
+ ]
3112
+ },
3113
+ {
3114
+ "pattern": "^\\{.+\\}$"
3115
+ }
3116
+ ]
3117
+ },
2971
3118
  "maxEventLoopDelay": {
2972
3119
  "anyOf": [
2973
3120
  {
@@ -3002,6 +3149,25 @@
3002
3149
  }
3003
3150
  ]
3004
3151
  },
3152
+ "maxHeapUsedLogLevel": {
3153
+ "type": "string",
3154
+ "oneOf": [
3155
+ {
3156
+ "enum": [
3157
+ "fatal",
3158
+ "error",
3159
+ "warn",
3160
+ "info",
3161
+ "debug",
3162
+ "trace",
3163
+ "silent"
3164
+ ]
3165
+ },
3166
+ {
3167
+ "pattern": "^\\{.+\\}$"
3168
+ }
3169
+ ]
3170
+ },
3005
3171
  "maxHeapTotal": {
3006
3172
  "anyOf": [
3007
3173
  {