@platformatic/nest 3.14.0 → 3.15.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
@@ -214,6 +214,7 @@ export interface PlatformaticNestJSConfig {
214
214
  rejectUnauthorized?: boolean;
215
215
  };
216
216
  };
217
+ reuseTcpPorts?: boolean;
217
218
  startTimeout?: number;
218
219
  restartOnError?: boolean | number;
219
220
  exitOnUnhandledErrors?: boolean;
package/lib/capability.js CHANGED
@@ -7,7 +7,6 @@ import {
7
7
  importFile,
8
8
  resolvePackage
9
9
  } from '@platformatic/basic'
10
- import { features } from '@platformatic/foundation'
11
10
  import getPort from 'get-port'
12
11
  import inject from 'light-my-request'
13
12
  import { readFile } from 'node:fs/promises'
@@ -62,6 +61,8 @@ export class NestCapability extends BaseCapability {
62
61
  return this.url
63
62
  }
64
63
 
64
+ await super._start({ listen })
65
+
65
66
  const config = this.config
66
67
  const command = config.application.commands[this.isProduction ? 'production' : 'development']
67
68
 
@@ -225,10 +226,6 @@ export class NestCapability extends BaseCapability {
225
226
  const serverOptions = this.serverConfig
226
227
  const listenOptions = { host: serverOptions?.hostname || '127.0.0.1', port: serverOptions?.port || 0 }
227
228
 
228
- if (this.isProduction && features.node.reusePort) {
229
- listenOptions.reusePort = true
230
- }
231
-
232
229
  await this.#app.listen(listenOptions)
233
230
  this.url = getServerUrl(this.#isFastify ? this.#server.server : this.#server)
234
231
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/nest",
3
- "version": "3.14.0",
3
+ "version": "3.15.0",
4
4
  "description": "Platformatic Nest.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,9 +18,9 @@
18
18
  "get-port": "^7.1.0",
19
19
  "light-my-request": "^6.0.0",
20
20
  "pino-http": "^10.2.0",
21
- "@platformatic/basic": "3.14.0",
22
- "@platformatic/generators": "3.14.0",
23
- "@platformatic/foundation": "3.14.0"
21
+ "@platformatic/foundation": "3.15.0",
22
+ "@platformatic/generators": "3.15.0",
23
+ "@platformatic/basic": "3.15.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@nestjs/cli": "^11.0.7",
@@ -33,8 +33,8 @@
33
33
  "neostandard": "^0.12.0",
34
34
  "tsx": "^4.19.0",
35
35
  "typescript": "^5.5.4",
36
- "@platformatic/gateway": "3.14.0",
37
- "@platformatic/service": "3.14.0"
36
+ "@platformatic/gateway": "3.15.0",
37
+ "@platformatic/service": "3.15.0"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.14.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.15.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic NestJS Config",
5
5
  "type": "object",
@@ -426,6 +426,10 @@
426
426
  "useHttp": {
427
427
  "type": "boolean"
428
428
  },
429
+ "reuseTcpPorts": {
430
+ "type": "boolean",
431
+ "default": true
432
+ },
429
433
  "workers": {
430
434
  "anyOf": [
431
435
  {
@@ -992,6 +996,10 @@
992
996
  },
993
997
  "additionalProperties": false
994
998
  },
999
+ "reuseTcpPorts": {
1000
+ "type": "boolean",
1001
+ "default": true
1002
+ },
995
1003
  "startTimeout": {
996
1004
  "default": 30000,
997
1005
  "type": "number",