@veloceapps/api 8.0.0-143 → 8.0.0-144

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.
@@ -446,10 +446,29 @@ class ConfigurationApiService {
446
446
  updatePortDomains(lineItem, runtimeModel) {
447
447
  const type = runtimeModel.components.get(lineItem.type);
448
448
  const portDomains = { ...lineItem.portDomains };
449
+ // loop through ports to look for 'None' type domain computations
449
450
  for (const port of type?.ports ?? []) {
450
- const portDomain = portDomains[port.name];
451
- if (portDomain?.properties?.['domainComputation'] === ('None')) {
452
- portDomain.domainTypes = port.domainTypes;
451
+ const { name: portName, type: typeName, min, max, domainTypes, properties } = port;
452
+ const portDomain = portDomains[portName];
453
+ if (portDomain) {
454
+ // there's a 'None' type domain computation
455
+ if (portDomain.properties?.['domainComputation'] === ('None')) {
456
+ portDomain.domainTypes = domainTypes;
457
+ }
458
+ }
459
+ else {
460
+ // there's no port domain so consider that as 'None' type domain computation
461
+ portDomains[portName] = {
462
+ name: portName,
463
+ type: typeName,
464
+ minCard: Number(min),
465
+ maxCard: Number(max),
466
+ domainTypes: domainTypes,
467
+ properties: {
468
+ ...properties,
469
+ domainComputation: 'None',
470
+ },
471
+ };
453
472
  }
454
473
  }
455
474
  return {