@rsdk/metadata 3.3.2-next.0 → 3.4.0-next.1

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.
@@ -21,6 +21,10 @@ class RsdkMetadataProvider {
21
21
  return new RsdkMetadataProvider(resources);
22
22
  }
23
23
  static *getMetadataSource(nestDefinition) {
24
+ // TODO: throw exception
25
+ if (typeof nestDefinition !== 'object' || nestDefinition === null) {
26
+ return;
27
+ }
24
28
  if ('useClass' in nestDefinition) {
25
29
  yield nestDefinition.useClass;
26
30
  }
@@ -46,6 +50,9 @@ class RsdkMetadataProvider {
46
50
  for await (const rootModuleElement of rootModule) {
47
51
  const nestDefinitionIterator = new nest_tools_1.NestDefinitionIterator(rootModuleElement);
48
52
  for await (const nestDefinition of nestDefinitionIterator.iterate()) {
53
+ if (!['object', 'function'].includes(typeof nestDefinition)) {
54
+ continue;
55
+ }
49
56
  for (const metadataSource of this.getMetadataSource(nestDefinition)) {
50
57
  if (!['object', 'function'].includes(typeof metadataSource)) {
51
58
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdk/metadata",
3
- "version": "3.3.2-next.0",
3
+ "version": "3.4.0-next.1",
4
4
  "license": "Apache License 2.0",
5
5
  "description": "Rsdk stack metadata management",
6
6
  "main": "dist/index.js",
@@ -18,5 +18,5 @@
18
18
  "@rsdk/nest-tools": "^3.1.0",
19
19
  "reflect-metadata": "^0.1.13"
20
20
  },
21
- "gitHead": "83c9f85ba9ddcb53eeb56a45eb91013013f78e69"
21
+ "gitHead": "030b5594a033b33d4763dddc2cdf156f29257f7c"
22
22
  }