@platformatic/nest 3.26.0 → 3.27.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/lib/capability.js +4 -4
- package/package.json +6 -6
- package/schema.json +1 -1
package/lib/capability.js
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
ensureTrailingSlash,
|
|
6
6
|
errors,
|
|
7
7
|
getServerUrl,
|
|
8
|
-
importFile
|
|
9
|
-
resolvePackage
|
|
8
|
+
importFile
|
|
10
9
|
} from '@platformatic/basic'
|
|
10
|
+
import { resolvePackageViaCJS } from '@platformatic/basic/lib/utils.js'
|
|
11
11
|
import getPort from 'get-port'
|
|
12
12
|
import inject from 'light-my-request'
|
|
13
13
|
import { readFile } from 'node:fs/promises'
|
|
@@ -37,7 +37,7 @@ export class NestCapability extends BaseCapability {
|
|
|
37
37
|
const config = this.config
|
|
38
38
|
|
|
39
39
|
this.#isFastify = config.nest.adapter === 'fastify'
|
|
40
|
-
this.#nestjsCore = resolve(
|
|
40
|
+
this.#nestjsCore = resolve(await resolvePackageViaCJS(this.root, '@nestjs/core'))
|
|
41
41
|
// As @nest/cli is not exporting any file, we assume it's in the same folder of @nestjs/core.
|
|
42
42
|
this.#nestjsCli = resolve(this.#nestjsCore, '../../cli/bin/nest.js')
|
|
43
43
|
|
|
@@ -244,7 +244,7 @@ export class NestCapability extends BaseCapability {
|
|
|
244
244
|
this.logger.debug(`Using NestJS adapter ${toImport}.`)
|
|
245
245
|
|
|
246
246
|
try {
|
|
247
|
-
adapter = await importFile(
|
|
247
|
+
adapter = await importFile(await resolvePackageViaCJS(this.root, toImport))
|
|
248
248
|
return adapter[this.#isFastify ? 'FastifyAdapter' : 'ExpressAdapter']
|
|
249
249
|
} catch (e) {
|
|
250
250
|
throw new Error(`Cannot import the NestJS adapter. Please add ${toImport} to the dependencies and try again.`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/nest",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.27.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.
|
|
22
|
-
"@platformatic/
|
|
23
|
-
"@platformatic/
|
|
21
|
+
"@platformatic/basic": "3.27.0",
|
|
22
|
+
"@platformatic/foundation": "3.27.0",
|
|
23
|
+
"@platformatic/generators": "3.27.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/
|
|
37
|
-
"@platformatic/
|
|
36
|
+
"@platformatic/gateway": "3.27.0",
|
|
37
|
+
"@platformatic/service": "3.27.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.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/nest/3.27.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic NestJS Config",
|
|
5
5
|
"type": "object",
|