@contrail/flexplm 1.1.23 → 1.1.24

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.
@@ -327,13 +327,17 @@ class DataConverter {
327
327
  if (!nd) {
328
328
  return objectReferenceId;
329
329
  }
330
+ if (this.transformMapFile) {
331
+ const mapKey = await type_conversion_utils_1.TypeConversionUtils.getMapKeyFromObject(this.transformMapFile, this.mapFileUtil, nd, type_conversion_utils_1.TypeConversionUtils.FLEX2VIBE_DIRECTION);
332
+ nd = await map_utils_1.MapUtil.applyTransformMap(this.transformMapFile, this.mapFileUtil, nd, mapKey, type_conversion_utils_1.TypeConversionUtils.FLEX2VIBE_DIRECTION);
333
+ }
330
334
  const entityType = prop['referencedTypeRootSlug'];
331
335
  const entityTypePath = prop['referencedTypePath'];
332
336
  const entityKeys = Object.keys(nd);
333
337
  const identifierKeys = await type_conversion_utils_1.TypeConversionUtils.getIdentifierPropertiesFromObject(this.transformMapFile, this.mapFileUtil, nd);
334
338
  const hasAllIdentifiers = identifierKeys.every(key => entityKeys.includes(key));
335
339
  if (identifierKeys.length == 0 || !hasAllIdentifiers) {
336
- console.warn(`The inbound ${entityType} doesnt have all "identifier properties, so there is no processing. Identifier properties: ${identifierKeys}`);
340
+ console.warn(`The inbound ${entityType} for prop '${prop['slug']}' doesnt have all "identifier" properties, so there is no processing. Identifier properties: ${identifierKeys}`);
337
341
  return objectReferenceId;
338
342
  }
339
343
  const rootType = await this.typeUtils.getByRootAndPath({ root: entityType });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/flexplm",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "description": "Library used for integration with flexplm.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -405,6 +405,10 @@ export class DataConverter {
405
405
  if(!nd) {
406
406
  return objectReferenceId;
407
407
  }
408
+ if(this.transformMapFile){
409
+ const mapKey = await TypeConversionUtils.getMapKeyFromObject(this.transformMapFile, this.mapFileUtil, nd, TypeConversionUtils.FLEX2VIBE_DIRECTION);
410
+ nd = await MapUtil.applyTransformMap(this.transformMapFile, this.mapFileUtil, nd, mapKey, TypeConversionUtils.FLEX2VIBE_DIRECTION)
411
+ }
408
412
 
409
413
  const entityType = prop['referencedTypeRootSlug'];
410
414
  const entityTypePath = prop['referencedTypePath'];
@@ -412,7 +416,7 @@ export class DataConverter {
412
416
  const identifierKeys = await TypeConversionUtils.getIdentifierPropertiesFromObject(this.transformMapFile, this.mapFileUtil, nd)
413
417
  const hasAllIdentifiers = identifierKeys.every(key => entityKeys.includes(key));
414
418
  if(identifierKeys.length == 0 || !hasAllIdentifiers){
415
- console.warn(`The inbound ${entityType} doesnt have all "identifier properties, so there is no processing. Identifier properties: ${identifierKeys}`);
419
+ console.warn(`The inbound ${entityType} for prop '${prop['slug']}' doesnt have all "identifier" properties, so there is no processing. Identifier properties: ${identifierKeys}`);
416
420
  return objectReferenceId;
417
421
  }
418
422