@platformatic/nest 3.61.0 → 3.62.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 +33 -0
  2. package/package.json +8 -8
  3. package/schema.json +160 -1
package/config.d.ts CHANGED
@@ -65,6 +65,10 @@ export interface PlatformaticNestJSConfig {
65
65
  server?: {
66
66
  hostname?: string;
67
67
  port?: number | string;
68
+ /**
69
+ * Configures how entrypoint server worker ports are assigned. When set to shared, all workers listen on the same port. When set to perWorkerIncrement, each worker will use its own port, starting from port (worker 0).
70
+ */
71
+ portAssignment?: "shared" | "perWorkerIncrement";
68
72
  /**
69
73
  * The maximum length of the queue of pending connections
70
74
  */
@@ -126,6 +130,23 @@ export interface PlatformaticNestJSConfig {
126
130
  };
127
131
  runtime?: {
128
132
  preload?: string | string[];
133
+ extensions?:
134
+ | string
135
+ | {
136
+ path: string;
137
+ options?: {
138
+ [k: string]: unknown;
139
+ };
140
+ }
141
+ | (
142
+ | string
143
+ | {
144
+ path: string;
145
+ options?: {
146
+ [k: string]: unknown;
147
+ };
148
+ }
149
+ )[];
129
150
  basePath?: string;
130
151
  services?: {
131
152
  [k: string]: unknown;
@@ -204,6 +225,10 @@ export interface PlatformaticNestJSConfig {
204
225
  server?: {
205
226
  hostname?: string;
206
227
  port?: number | string;
228
+ /**
229
+ * Configures how entrypoint server worker ports are assigned. When set to shared, all workers listen on the same port. When set to perWorkerIncrement, each worker will use its own port, starting from port (worker 0).
230
+ */
231
+ portAssignment?: "shared" | "perWorkerIncrement";
207
232
  /**
208
233
  * The maximum length of the queue of pending connections
209
234
  */
@@ -255,6 +280,8 @@ export interface PlatformaticNestJSConfig {
255
280
  gracePeriod?: number | string;
256
281
  maxUnhealthyChecks?: number | string;
257
282
  maxELU?: number | string;
283
+ maxEventLoopDelay?: number | string;
284
+ maxEventLoopDelayP99?: number | string;
258
285
  maxHeapUsed?: number | string;
259
286
  maxHeapTotal?: number | string;
260
287
  maxYoungGeneration?: number | string;
@@ -725,6 +752,8 @@ export interface PlatformaticNestJSConfig {
725
752
  gracePeriod?: number | string;
726
753
  maxUnhealthyChecks?: number | string;
727
754
  maxELU?: number | string;
755
+ maxEventLoopDelay?: number | string;
756
+ maxEventLoopDelayP99?: number | string;
728
757
  maxHeapUsed?: number | string;
729
758
  maxHeapTotal?: number | string;
730
759
  maxYoungGeneration?: number | string;
@@ -732,6 +761,10 @@ export interface PlatformaticNestJSConfig {
732
761
  bufferPoolSize?: number | string;
733
762
  defaultHighWaterMark?: number | string;
734
763
  };
764
+ /**
765
+ * 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.
766
+ */
767
+ restartOnError?: boolean | number;
735
768
  arguments?: string[];
736
769
  env?: {
737
770
  [k: string]: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/nest",
3
- "version": "3.61.0",
3
+ "version": "3.62.0",
4
4
  "description": "Platformatic Nest.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,10 +18,10 @@
18
18
  "get-port": "^7.1.0",
19
19
  "light-my-request": "^6.0.0",
20
20
  "pino-http": "^10.2.0",
21
- "@platformatic/foundation": "3.61.0",
22
- "@platformatic/basic": "3.61.0",
23
- "@platformatic/generators": "3.61.0",
24
- "@platformatic/globals": "3.61.0"
21
+ "@platformatic/basic": "3.62.0",
22
+ "@platformatic/globals": "3.62.0",
23
+ "@platformatic/foundation": "3.62.0",
24
+ "@platformatic/generators": "3.62.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@nestjs/cli": "^11.0.7",
@@ -34,9 +34,9 @@
34
34
  "neostandard": "^0.12.0",
35
35
  "tstyche": "^6.2.0",
36
36
  "tsx": "^4.19.0",
37
- "typescript": "^5.5.4",
38
- "@platformatic/gateway": "3.61.0",
39
- "@platformatic/service": "3.61.0"
37
+ "typescript": "^5.9.3",
38
+ "@platformatic/service": "3.62.0",
39
+ "@platformatic/gateway": "3.62.0"
40
40
  },
41
41
  "engines": {
42
42
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.61.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.62.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic NestJS Config",
5
5
  "type": "object",
@@ -196,6 +196,14 @@
196
196
  }
197
197
  ]
198
198
  },
199
+ "portAssignment": {
200
+ "type": "string",
201
+ "enum": [
202
+ "shared",
203
+ "perWorkerIncrement"
204
+ ],
205
+ "description": "Configures how entrypoint server worker ports are assigned. When set to shared, all workers listen on the same port. When set to perWorkerIncrement, each worker will use its own port, starting from port (worker 0)."
206
+ },
199
207
  "backlog": {
200
208
  "type": "integer",
201
209
  "description": "The maximum length of the queue of pending connections"
@@ -419,6 +427,59 @@
419
427
  }
420
428
  ]
421
429
  },
430
+ "extensions": {
431
+ "anyOf": [
432
+ {
433
+ "type": "string",
434
+ "resolvePath": true
435
+ },
436
+ {
437
+ "type": "object",
438
+ "additionalProperties": false,
439
+ "required": [
440
+ "path"
441
+ ],
442
+ "properties": {
443
+ "path": {
444
+ "type": "string",
445
+ "resolvePath": true
446
+ },
447
+ "options": {
448
+ "type": "object",
449
+ "additionalProperties": true
450
+ }
451
+ }
452
+ },
453
+ {
454
+ "type": "array",
455
+ "items": {
456
+ "anyOf": [
457
+ {
458
+ "type": "string",
459
+ "resolvePath": true
460
+ },
461
+ {
462
+ "type": "object",
463
+ "additionalProperties": false,
464
+ "required": [
465
+ "path"
466
+ ],
467
+ "properties": {
468
+ "path": {
469
+ "type": "string",
470
+ "resolvePath": true
471
+ },
472
+ "options": {
473
+ "type": "object",
474
+ "additionalProperties": true
475
+ }
476
+ }
477
+ }
478
+ ]
479
+ }
480
+ }
481
+ ]
482
+ },
422
483
  "basePath": {
423
484
  "type": "string"
424
485
  },
@@ -579,6 +640,28 @@
579
640
  }
580
641
  ]
581
642
  },
643
+ "maxEventLoopDelay": {
644
+ "anyOf": [
645
+ {
646
+ "type": "number",
647
+ "minimum": 0
648
+ },
649
+ {
650
+ "type": "string"
651
+ }
652
+ ]
653
+ },
654
+ "maxEventLoopDelayP99": {
655
+ "anyOf": [
656
+ {
657
+ "type": "number",
658
+ "minimum": 0
659
+ },
660
+ {
661
+ "type": "string"
662
+ }
663
+ ]
664
+ },
582
665
  "maxHeapUsed": {
583
666
  "anyOf": [
584
667
  {
@@ -649,6 +732,18 @@
649
732
  },
650
733
  "additionalProperties": false
651
734
  },
735
+ "restartOnError": {
736
+ "description": "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.",
737
+ "anyOf": [
738
+ {
739
+ "type": "boolean"
740
+ },
741
+ {
742
+ "type": "number",
743
+ "minimum": 0
744
+ }
745
+ ]
746
+ },
652
747
  "dependencies": {
653
748
  "type": "array",
654
749
  "items": {
@@ -1074,6 +1169,14 @@
1074
1169
  }
1075
1170
  ]
1076
1171
  },
1172
+ "portAssignment": {
1173
+ "type": "string",
1174
+ "enum": [
1175
+ "shared",
1176
+ "perWorkerIncrement"
1177
+ ],
1178
+ "description": "Configures how entrypoint server worker ports are assigned. When set to shared, all workers listen on the same port. When set to perWorkerIncrement, each worker will use its own port, starting from port (worker 0)."
1179
+ },
1077
1180
  "backlog": {
1078
1181
  "type": "integer",
1079
1182
  "description": "The maximum length of the queue of pending connections"
@@ -1313,6 +1416,28 @@
1313
1416
  ],
1314
1417
  "default": 0.99
1315
1418
  },
1419
+ "maxEventLoopDelay": {
1420
+ "anyOf": [
1421
+ {
1422
+ "type": "number",
1423
+ "minimum": 0
1424
+ },
1425
+ {
1426
+ "type": "string"
1427
+ }
1428
+ ]
1429
+ },
1430
+ "maxEventLoopDelayP99": {
1431
+ "anyOf": [
1432
+ {
1433
+ "type": "number",
1434
+ "minimum": 0
1435
+ },
1436
+ {
1437
+ "type": "string"
1438
+ }
1439
+ ]
1440
+ },
1316
1441
  "maxHeapUsed": {
1317
1442
  "anyOf": [
1318
1443
  {
@@ -2657,6 +2782,28 @@
2657
2782
  }
2658
2783
  ]
2659
2784
  },
2785
+ "maxEventLoopDelay": {
2786
+ "anyOf": [
2787
+ {
2788
+ "type": "number",
2789
+ "minimum": 0
2790
+ },
2791
+ {
2792
+ "type": "string"
2793
+ }
2794
+ ]
2795
+ },
2796
+ "maxEventLoopDelayP99": {
2797
+ "anyOf": [
2798
+ {
2799
+ "type": "number",
2800
+ "minimum": 0
2801
+ },
2802
+ {
2803
+ "type": "string"
2804
+ }
2805
+ ]
2806
+ },
2660
2807
  "maxHeapUsed": {
2661
2808
  "anyOf": [
2662
2809
  {
@@ -2727,6 +2874,18 @@
2727
2874
  },
2728
2875
  "additionalProperties": false
2729
2876
  },
2877
+ "restartOnError": {
2878
+ "description": "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.",
2879
+ "anyOf": [
2880
+ {
2881
+ "type": "boolean"
2882
+ },
2883
+ {
2884
+ "type": "number",
2885
+ "minimum": 0
2886
+ }
2887
+ ]
2888
+ },
2730
2889
  "arguments": {
2731
2890
  "type": "array",
2732
2891
  "items": {