@platformatic/nest 3.57.0 → 3.58.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 +2 -1
- package/lib/capability.js +8 -2
- package/package.json +7 -7
- package/schema.json +20 -2
package/config.d.ts
CHANGED
|
@@ -240,7 +240,7 @@ export interface PlatformaticNestJSConfig {
|
|
|
240
240
|
reuseTcpPorts?: boolean;
|
|
241
241
|
startTimeout?: number;
|
|
242
242
|
restartOnError?: boolean | number;
|
|
243
|
-
exitOnUnhandledErrors?: boolean;
|
|
243
|
+
exitOnUnhandledErrors?: boolean | number;
|
|
244
244
|
gracefulShutdown?: {
|
|
245
245
|
runtime: number | string;
|
|
246
246
|
application: number | string;
|
|
@@ -262,6 +262,7 @@ export interface PlatformaticNestJSConfig {
|
|
|
262
262
|
bufferPoolSize?: number | string;
|
|
263
263
|
defaultHighWaterMark?: number | string;
|
|
264
264
|
};
|
|
265
|
+
healthProbes?: boolean | string;
|
|
265
266
|
undici?: {
|
|
266
267
|
agentOptions?: {
|
|
267
268
|
[k: string]: unknown;
|
package/lib/capability.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseCapability,
|
|
3
|
+
buildFastifyOptions,
|
|
3
4
|
buildListenOptions,
|
|
4
5
|
cleanBasePath,
|
|
5
6
|
createServerListener,
|
|
@@ -9,6 +10,7 @@ import {
|
|
|
9
10
|
importFile,
|
|
10
11
|
resolvePackageViaCJS
|
|
11
12
|
} from '@platformatic/basic'
|
|
13
|
+
import { sanitizeHTTPSOptions } from '@platformatic/foundation'
|
|
12
14
|
import { getEvents } from '@platformatic/globals'
|
|
13
15
|
import getPort from 'get-port'
|
|
14
16
|
import inject from 'light-my-request'
|
|
@@ -215,14 +217,18 @@ export class NestCapability extends BaseCapability {
|
|
|
215
217
|
|
|
216
218
|
// Create the server
|
|
217
219
|
if (this.#isFastify) {
|
|
218
|
-
this.#app = await NestFactory.create(appModule, new Adapter({
|
|
220
|
+
this.#app = await NestFactory.create(appModule, new Adapter({
|
|
221
|
+
loggerInstance: this.logger,
|
|
222
|
+
...(await buildFastifyOptions(this.serverConfig))
|
|
223
|
+
}))
|
|
219
224
|
|
|
220
225
|
setup?.(this.#app)
|
|
221
226
|
await this.#app.init()
|
|
222
227
|
|
|
223
228
|
this.#server = this.#app.getInstance()
|
|
224
229
|
} else {
|
|
225
|
-
|
|
230
|
+
const httpsOptions = await sanitizeHTTPSOptions(this.serverConfig?.https)
|
|
231
|
+
this.#app = await NestFactory.create(appModule, new Adapter(), httpsOptions ? { httpsOptions } : undefined)
|
|
226
232
|
|
|
227
233
|
const instance = this.#app.getInstance()
|
|
228
234
|
instance.disable('x-powered-by')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/nest",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.58.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/basic": "3.
|
|
22
|
-
"@platformatic/
|
|
23
|
-
"@platformatic/
|
|
24
|
-
"@platformatic/
|
|
21
|
+
"@platformatic/basic": "3.58.0",
|
|
22
|
+
"@platformatic/foundation": "3.58.0",
|
|
23
|
+
"@platformatic/generators": "3.58.0",
|
|
24
|
+
"@platformatic/globals": "3.58.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@nestjs/cli": "^11.0.7",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"tstyche": "^6.2.0",
|
|
36
36
|
"tsx": "^4.19.0",
|
|
37
37
|
"typescript": "^5.5.4",
|
|
38
|
-
"@platformatic/gateway": "3.
|
|
39
|
-
"@platformatic/service": "3.
|
|
38
|
+
"@platformatic/gateway": "3.58.0",
|
|
39
|
+
"@platformatic/service": "3.58.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.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/nest/3.58.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic NestJS Config",
|
|
5
5
|
"type": "object",
|
|
@@ -1183,7 +1183,14 @@
|
|
|
1183
1183
|
},
|
|
1184
1184
|
"exitOnUnhandledErrors": {
|
|
1185
1185
|
"default": true,
|
|
1186
|
-
"
|
|
1186
|
+
"anyOf": [
|
|
1187
|
+
{
|
|
1188
|
+
"type": "boolean"
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
"type": "number"
|
|
1192
|
+
}
|
|
1193
|
+
]
|
|
1187
1194
|
},
|
|
1188
1195
|
"gracefulShutdown": {
|
|
1189
1196
|
"type": "object",
|
|
@@ -1365,6 +1372,17 @@
|
|
|
1365
1372
|
},
|
|
1366
1373
|
"additionalProperties": false
|
|
1367
1374
|
},
|
|
1375
|
+
"healthProbes": {
|
|
1376
|
+
"anyOf": [
|
|
1377
|
+
{
|
|
1378
|
+
"type": "boolean"
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
"type": "string"
|
|
1382
|
+
}
|
|
1383
|
+
],
|
|
1384
|
+
"default": true
|
|
1385
|
+
},
|
|
1368
1386
|
"undici": {
|
|
1369
1387
|
"type": "object",
|
|
1370
1388
|
"properties": {
|