@rsdk/nest-tools 3.0.2 → 3.1.0-next.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.1.0-next.0](https://github.com/R-Vision/rsdk/compare/v3.0.2...v3.1.0-next.0) (2023-08-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rsdk/nest-tools
|
|
9
|
+
|
|
6
10
|
## [3.0.2](https://github.com/R-Vision/rsdk/compare/v3.0.1...v3.0.2) (2023-08-07)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @rsdk/nest-tools
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/nest-tools",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.1.0-next.0",
|
|
4
4
|
"license": "Apache License 2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
"@nestjs/common": "^10.1.3",
|
|
11
11
|
"@nestjs/core": "^10.1.3"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "55598931db264fb6d5b5c4787c48298ed86bbc0d"
|
|
14
14
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Provider } from '@nestjs/common';
|
|
2
|
-
import { NestDefinitionType } from './constants';
|
|
3
|
-
import type { NestModuleDefinition } from './nest-definition';
|
|
4
|
-
export declare class NestDefinitionMediator {
|
|
5
|
-
private nestModuleDefinition;
|
|
6
|
-
constructor(nestModuleDefinition: NestModuleDefinition);
|
|
7
|
-
iterate(type?: NestDefinitionType): AsyncIterableIterator<NestModuleDefinition | Provider>;
|
|
8
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NestDefinitionMediator = void 0;
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
|
-
const nest_definition_1 = require("./nest-definition");
|
|
6
|
-
class NestDefinitionMediator {
|
|
7
|
-
nestModuleDefinition;
|
|
8
|
-
constructor(nestModuleDefinition) {
|
|
9
|
-
this.nestModuleDefinition = nestModuleDefinition;
|
|
10
|
-
}
|
|
11
|
-
async *iterate(type) {
|
|
12
|
-
const iterateAll = typeof type === 'undefined';
|
|
13
|
-
const iterateModule = iterateAll || type & constants_1.NestDefinitionType.Module;
|
|
14
|
-
if (iterateModule) {
|
|
15
|
-
yield this.nestModuleDefinition;
|
|
16
|
-
}
|
|
17
|
-
const nestDefinition = new nest_definition_1.NestDefinition(this.nestModuleDefinition);
|
|
18
|
-
const nestImports = await nestDefinition.getImports();
|
|
19
|
-
const iterateProviders = iterateAll || type & constants_1.NestDefinitionType.Providers;
|
|
20
|
-
if (iterateProviders) {
|
|
21
|
-
const providers = nestDefinition.getProviders();
|
|
22
|
-
for (const provider of providers ?? []) {
|
|
23
|
-
yield provider;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
const iterateExports = iterateAll || type & constants_1.NestDefinitionType.Exports;
|
|
27
|
-
if (iterateExports) {
|
|
28
|
-
const exports = nestDefinition.getExports();
|
|
29
|
-
for (const nestExport of exports ?? []) {
|
|
30
|
-
yield nestExport;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
const iterateControllers = iterateAll || type & constants_1.NestDefinitionType.Controllers;
|
|
34
|
-
if (iterateControllers) {
|
|
35
|
-
const controllers = nestDefinition.getControllers();
|
|
36
|
-
for (const controller of controllers ?? []) {
|
|
37
|
-
yield controller;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
for (const nestImport of nestImports ?? []) {
|
|
41
|
-
yield* new NestDefinitionMediator(nestImport).iterate(type);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.NestDefinitionMediator = NestDefinitionMediator;
|