@rsdk/nest-tools 2.4.2-next.0 → 2.6.0-next.3
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,16 @@
|
|
|
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
|
+
# [2.6.0-next.3](https://github.com/R-Vision/rsdk/compare/v2.6.0-next.2...v2.6.0-next.3) (2023-07-07)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add data-source extractor from PlatformApp ([#76](https://github.com/R-Vision/rsdk/issues/76)) ([c668f12](https://github.com/R-Vision/rsdk/commit/c668f12142a009ac7c4bc5adc84b6fa8b85d413a))
|
|
11
|
+
|
|
12
|
+
## [2.4.2](https://github.com/R-Vision/rsdk/compare/v2.4.2-next.0...v2.4.2) (2023-06-16)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @rsdk/nest-tools
|
|
15
|
+
|
|
6
16
|
## [2.4.2-next.0](https://github.com/R-Vision/rsdk/compare/v2.4.1...v2.4.2-next.0) (2023-06-15)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
package/dist/constants.js
CHANGED
|
@@ -8,4 +8,4 @@ var NestDefinitionType;
|
|
|
8
8
|
NestDefinitionType[NestDefinitionType["Controllers"] = 2] = "Controllers";
|
|
9
9
|
NestDefinitionType[NestDefinitionType["Providers"] = 4] = "Providers";
|
|
10
10
|
NestDefinitionType[NestDefinitionType["Exports"] = 8] = "Exports";
|
|
11
|
-
})(NestDefinitionType
|
|
11
|
+
})(NestDefinitionType || (exports.NestDefinitionType = NestDefinitionType = {}));
|
|
@@ -10,4 +10,5 @@ export declare class NestDefinitionIterator {
|
|
|
10
10
|
* @param type
|
|
11
11
|
*/
|
|
12
12
|
iterate(type?: NestDefinitionType): AsyncIterableIterator<NestModuleDefinition | Provider>;
|
|
13
|
+
find<R extends NestModuleDefinition | Provider>(predicate: (definition: NestModuleDefinition | Provider) => boolean, type?: NestDefinitionType): Promise<R | null>;
|
|
13
14
|
}
|
|
@@ -49,5 +49,14 @@ class NestDefinitionIterator {
|
|
|
49
49
|
yield* new NestDefinitionIterator(nestImport).iterate(type);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
async find(predicate, type) {
|
|
53
|
+
for await (const definition of this.iterate(type)) {
|
|
54
|
+
const isNeeded = predicate(definition);
|
|
55
|
+
if (isNeeded) {
|
|
56
|
+
return definition;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
52
61
|
}
|
|
53
62
|
exports.NestDefinitionIterator = NestDefinitionIterator;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/nest-tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0-next.3",
|
|
4
4
|
"license": "Apache License 2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
"@nestjs/common": "^9.0.0",
|
|
11
11
|
"@nestjs/core": "^9.0.0"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "db498c874d3d6179b00e9e7f80c739cf3f76646c"
|
|
14
14
|
}
|
|
@@ -63,4 +63,17 @@ export class NestDefinitionIterator {
|
|
|
63
63
|
yield* new NestDefinitionIterator(nestImport).iterate(type);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
async find<R extends NestModuleDefinition | Provider>(
|
|
68
|
+
predicate: (definition: NestModuleDefinition | Provider) => boolean,
|
|
69
|
+
type?: NestDefinitionType,
|
|
70
|
+
): Promise<R | null> {
|
|
71
|
+
for await (const definition of this.iterate(type)) {
|
|
72
|
+
const isNeeded = predicate(definition);
|
|
73
|
+
if (isNeeded) {
|
|
74
|
+
return definition as R;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
66
79
|
}
|