@platformatic/node 3.14.0 → 3.16.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 +1 -0
- package/lib/capability.js +2 -5
- package/package.json +6 -6
- package/schema.json +9 -1
package/config.d.ts
CHANGED
package/lib/capability.js
CHANGED
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
importFile,
|
|
8
8
|
injectViaRequest
|
|
9
9
|
} from '@platformatic/basic'
|
|
10
|
-
import { features } from '@platformatic/foundation'
|
|
11
10
|
import { Unpromise } from '@watchable/unpromise'
|
|
12
11
|
import inject from 'light-my-request'
|
|
13
12
|
import { once } from 'node:events'
|
|
@@ -112,6 +111,8 @@ export class NodeCapability extends BaseCapability {
|
|
|
112
111
|
return this.url
|
|
113
112
|
}
|
|
114
113
|
|
|
114
|
+
await super._start({ listen })
|
|
115
|
+
|
|
115
116
|
// Listen if entrypoint
|
|
116
117
|
if (this.#app && listen) {
|
|
117
118
|
await this._listen()
|
|
@@ -341,10 +342,6 @@ export class NodeCapability extends BaseCapability {
|
|
|
341
342
|
const serverOptions = this.serverConfig
|
|
342
343
|
const listenOptions = { host: serverOptions?.hostname || '127.0.0.1', port: serverOptions?.port || 0 }
|
|
343
344
|
|
|
344
|
-
if (this.isProduction && features.node.reusePort) {
|
|
345
|
-
listenOptions.reusePort = true
|
|
346
|
-
}
|
|
347
|
-
|
|
348
345
|
if (this.#isFastify) {
|
|
349
346
|
await this.#app.listen(listenOptions)
|
|
350
347
|
this.url = getServerUrl(this.#app.server)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/node",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
4
4
|
"description": "Platformatic Node.js Capability",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"@watchable/unpromise": "^1.0.2",
|
|
19
19
|
"json5": "^2.2.3",
|
|
20
20
|
"light-my-request": "^6.0.0",
|
|
21
|
-
"@platformatic/
|
|
22
|
-
"@platformatic/
|
|
23
|
-
"@platformatic/generators": "3.
|
|
21
|
+
"@platformatic/basic": "3.16.0",
|
|
22
|
+
"@platformatic/foundation": "3.16.0",
|
|
23
|
+
"@platformatic/generators": "3.16.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"cleaner-spec-reporter": "^0.5.0",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"neostandard": "^0.12.0",
|
|
33
33
|
"tsx": "^4.19.0",
|
|
34
34
|
"typescript": "^5.5.4",
|
|
35
|
-
"@platformatic/
|
|
36
|
-
"@platformatic/
|
|
35
|
+
"@platformatic/service": "3.16.0",
|
|
36
|
+
"@platformatic/gateway": "3.16.0"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=22.19.0"
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/node/3.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/node/3.16.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Node.js 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",
|