@nestjs/core 12.0.0-alpha.0 → 12.0.0-alpha.2
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/helpers/load-adapter.js +1 -1
- package/injector/injector.js +1 -1
- package/nest-application.js +3 -3
- package/package.json +5 -26
package/helpers/load-adapter.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger } from '@nestjs/common';
|
|
2
|
-
const MISSING_REQUIRED_DEPENDENCY = (defaultPlatform, transport) => `No driver (${transport}) has been selected. In order to
|
|
2
|
+
const MISSING_REQUIRED_DEPENDENCY = (defaultPlatform, transport) => `No driver (${transport}) has been selected. In order to use the default driver, please, install the "${defaultPlatform}" package ($ npm install ${defaultPlatform}).`;
|
|
3
3
|
const logger = new Logger('PackageLoader');
|
|
4
4
|
export async function loadAdapter(defaultPlatform, transport, loaderFn) {
|
|
5
5
|
try {
|
package/injector/injector.js
CHANGED
|
@@ -214,7 +214,7 @@ export class Injector {
|
|
|
214
214
|
return paramtypes;
|
|
215
215
|
}
|
|
216
216
|
reflectOptionalParams(type) {
|
|
217
|
-
return Reflect.
|
|
217
|
+
return Reflect.getOwnMetadata(OPTIONAL_DEPS_METADATA, type) || [];
|
|
218
218
|
}
|
|
219
219
|
reflectSelfParams(type) {
|
|
220
220
|
return Reflect.getMetadata(SELF_DECLARED_DEPS_METADATA, type) || [];
|
package/nest-application.js
CHANGED
|
@@ -11,7 +11,7 @@ import { mapToExcludeRoute } from './middleware/utils.js';
|
|
|
11
11
|
import { NestApplicationContext } from './nest-application-context.js';
|
|
12
12
|
import { RoutesResolver } from './router/routes-resolver.js';
|
|
13
13
|
import { Logger } from '@nestjs/common';
|
|
14
|
-
import { loadPackage, loadPackageCached, addLeadingSlash, isFunction, isObject, isString, } from '@nestjs/common/internal';
|
|
14
|
+
import { loadPackage, loadPackageCached, tryLoadPackage, addLeadingSlash, isFunction, isObject, isString, } from '@nestjs/common/internal';
|
|
15
15
|
/**
|
|
16
16
|
* @publicApi
|
|
17
17
|
*/
|
|
@@ -317,8 +317,8 @@ export class NestApplication extends NestApplicationContext {
|
|
|
317
317
|
*/
|
|
318
318
|
async preloadLazyPackages() {
|
|
319
319
|
// Best-effort: silently swallow if packages are not installed
|
|
320
|
-
await
|
|
321
|
-
await
|
|
320
|
+
await tryLoadPackage('@nestjs/platform-express', () => import('@nestjs/platform-express'));
|
|
321
|
+
await tryLoadPackage('@nestjs/microservices', () => import('@nestjs/microservices'));
|
|
322
322
|
}
|
|
323
323
|
host() {
|
|
324
324
|
const address = this.httpServer.address();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/core",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.2",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,30 +8,9 @@
|
|
|
8
8
|
"main": "./index.js",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": "./index.js",
|
|
11
|
+
"./internal": "./internal.js",
|
|
11
12
|
"./*.js": "./*.js",
|
|
12
|
-
"./*": "./*.js"
|
|
13
|
-
"./adapters": "./adapters/index.js",
|
|
14
|
-
"./discovery": "./discovery/index.js",
|
|
15
|
-
"./errors/exceptions": "./errors/exceptions/index.js",
|
|
16
|
-
"./exceptions": "./exceptions/index.js",
|
|
17
|
-
"./guards": "./guards/index.js",
|
|
18
|
-
"./helpers": "./helpers/index.js",
|
|
19
|
-
"./helpers/interfaces": "./helpers/interfaces/index.js",
|
|
20
|
-
"./hooks": "./hooks/index.js",
|
|
21
|
-
"./injector": "./injector/index.js",
|
|
22
|
-
"./injector/inquirer": "./injector/inquirer/index.js",
|
|
23
|
-
"./injector/internal-core-module": "./injector/internal-core-module/index.js",
|
|
24
|
-
"./inspector": "./inspector/index.js",
|
|
25
|
-
"./interceptors": "./interceptors/index.js",
|
|
26
|
-
"./middleware": "./middleware/index.js",
|
|
27
|
-
"./pipes": "./pipes/index.js",
|
|
28
|
-
"./repl": "./repl/index.js",
|
|
29
|
-
"./repl/native-functions": "./repl/native-functions/index.js",
|
|
30
|
-
"./router": "./router/index.js",
|
|
31
|
-
"./router/interfaces": "./router/interfaces/index.js",
|
|
32
|
-
"./router/request": "./router/request/index.js",
|
|
33
|
-
"./router/utils": "./router/utils/index.js",
|
|
34
|
-
"./services": "./services/index.js"
|
|
13
|
+
"./*": "./*.js"
|
|
35
14
|
},
|
|
36
15
|
"homepage": "https://nestjs.com",
|
|
37
16
|
"funding": {
|
|
@@ -68,7 +47,7 @@
|
|
|
68
47
|
"uid": "2.0.2"
|
|
69
48
|
},
|
|
70
49
|
"devDependencies": {
|
|
71
|
-
"@nestjs/common": "^12.0.0-alpha.
|
|
50
|
+
"@nestjs/common": "^12.0.0-alpha.2"
|
|
72
51
|
},
|
|
73
52
|
"peerDependencies": {
|
|
74
53
|
"@nestjs/common": "^11.0.0",
|
|
@@ -89,5 +68,5 @@
|
|
|
89
68
|
"optional": true
|
|
90
69
|
}
|
|
91
70
|
},
|
|
92
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "011bff66014e24e82b25f7acf9302b9efb70b02b"
|
|
93
72
|
}
|