@nestjs/core 8.0.7 → 8.0.11

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/Readme.md CHANGED
@@ -79,8 +79,9 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
79
79
  <a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> </td><td>
80
80
  <a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" width="100" /></a> </td><td>
81
81
  <a href="http://www.leogistics.com" target="_blank"><img src="https://nestjs.com/img/leogistics-logo.jpeg" width="150" valign="middle" /></td><td>
82
- <a href="http://www.meetdandy.com" target="_blank"><img src="https://nestjs.com/img/dandy-roles-logo.svg" width="150" valign="middle" /></td><td>
83
- <a href="https://www.castlecraft.in" target="_blank"><img src="https://nestjs.com/img/castlecraft-logo.png" width="150" valign="middle" /></td></tr></table>
82
+ <a href="https://careers.meetdandy.com/?gh_src=063ba61e3us" target="_blank"><img src="https://nestjs.com/img/dandy-roles-logo.svg" width="150" valign="middle" /></td><td>
83
+ <a href="https://www.castlecraft.in" target="_blank"><img src="https://nestjs.com/img/castlecraft-logo.png" width="150" valign="middle" /></td>
84
+ <td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td></tr></table>
84
85
 
85
86
  #### Sponsors
86
87
 
@@ -48,7 +48,7 @@ export declare class ExternalContextCreator {
48
48
  type: any;
49
49
  data: any;
50
50
  }, pipes: PipeTransform[]): Promise<any>;
51
- transformToResult(resultOrDeffered: any): Promise<any>;
51
+ transformToResult(resultOrDeferred: any): Promise<any>;
52
52
  createGuardsFn<TContext extends string = ContextType>(guards: any[], instance: Controller, callback: (...args: any[]) => any, contextType?: TContext): Function | null;
53
53
  registerRequestProvider<T = any>(request: T, contextId: ContextId): void;
54
54
  }
@@ -147,11 +147,11 @@ class ExternalContextCreator {
147
147
  ? value
148
148
  : this.pipesConsumer.apply(value, { metatype, type, data }, pipes);
149
149
  }
150
- async transformToResult(resultOrDeffered) {
151
- if (resultOrDeffered && shared_utils_1.isFunction(resultOrDeffered.subscribe)) {
152
- return rxjs_1.lastValueFrom(resultOrDeffered);
150
+ async transformToResult(resultOrDeferred) {
151
+ if (resultOrDeferred && shared_utils_1.isFunction(resultOrDeferred.subscribe)) {
152
+ return rxjs_1.lastValueFrom(resultOrDeferred);
153
153
  }
154
- return resultOrDeffered;
154
+ return resultOrDeferred;
155
155
  }
156
156
  createGuardsFn(guards, instance, callback, contextType) {
157
157
  const canActivateFn = async (args) => {
@@ -47,7 +47,7 @@ class NestContainer {
47
47
  }
48
48
  const { type, dynamicMetadata, token } = await this.moduleCompiler.compile(metatype);
49
49
  if (this.modules.has(token)) {
50
- return;
50
+ return this.modules.get(token);
51
51
  }
52
52
  const moduleRef = new module_1.Module(type, this);
53
53
  moduleRef.token = token;
@@ -5,5 +5,5 @@ import { ExecutionContextHost } from '../helpers/execution-context-host';
5
5
  export declare class InterceptorsConsumer {
6
6
  intercept<TContext extends string = ContextType>(interceptors: NestInterceptor[], args: unknown[], instance: Controller, callback: (...args: unknown[]) => unknown, next: () => Promise<unknown>, type?: TContext): Promise<unknown>;
7
7
  createContext(args: unknown[], instance: Controller, callback: (...args: unknown[]) => unknown): ExecutionContextHost;
8
- transformDeffered(next: () => Promise<any>): Observable<any>;
8
+ transformDeferred(next: () => Promise<any>): Observable<any>;
9
9
  }
@@ -12,7 +12,7 @@ class InterceptorsConsumer {
12
12
  }
13
13
  const context = this.createContext(args, instance, callback);
14
14
  context.setType(type);
15
- const start$ = rxjs_1.defer(() => this.transformDeffered(next));
15
+ const start$ = rxjs_1.defer(() => this.transformDeferred(next));
16
16
  const nextFn = (i = 0) => async () => {
17
17
  if (i >= interceptors.length) {
18
18
  return start$;
@@ -27,10 +27,10 @@ class InterceptorsConsumer {
27
27
  createContext(args, instance, callback) {
28
28
  return new execution_context_host_1.ExecutionContextHost(args, instance.constructor, callback);
29
29
  }
30
- transformDeffered(next) {
30
+ transformDeferred(next) {
31
31
  return rxjs_1.from(next()).pipe(operators_1.switchMap(res => {
32
- const isDeffered = res instanceof Promise || res instanceof rxjs_1.Observable;
33
- return isDeffered ? res : Promise.resolve(res);
32
+ const isDeferred = res instanceof Promise || res instanceof rxjs_1.Observable;
33
+ return isDeferred ? res : Promise.resolve(res);
34
34
  }));
35
35
  }
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/core",
3
- "version": "8.0.7",
3
+ "version": "8.0.11",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@core)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@nuxtjs/opencollective": "0.3.2",
31
- "fast-safe-stringify": "2.0.8",
31
+ "fast-safe-stringify": "2.1.1",
32
32
  "iterare": "1.2.1",
33
33
  "object-hash": "2.2.0",
34
34
  "path-to-regexp": "3.2.0",
@@ -36,7 +36,7 @@
36
36
  "uuid": "8.3.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@nestjs/common": "8.0.7"
39
+ "@nestjs/common": "8.0.11"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@nestjs/common": "^8.0.0",
@@ -11,8 +11,8 @@ class PipesConsumer {
11
11
  return this.applyPipes(value, { metatype, type: token, data }, pipes);
12
12
  }
13
13
  async applyPipes(value, { metatype, type, data }, transforms) {
14
- return transforms.reduce(async (defferedValue, pipe) => {
15
- const val = await defferedValue;
14
+ return transforms.reduce(async (deferredValue, pipe) => {
15
+ const val = await deferredValue;
16
16
  const result = pipe.transform(val, { metatype, type, data });
17
17
  return result;
18
18
  }, Promise.resolve(value));