@uniformdev/transformer 1.1.40 → 1.1.42

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/dist/index.d.ts CHANGED
@@ -183,9 +183,9 @@ interface RemoveOrphanEntriesOptions extends GlobalOptions {
183
183
  interface RemoveUnusedContentTypesOptions extends GlobalOptions {
184
184
  }
185
185
  interface RemoveUnusedComponentTypesOptions extends GlobalOptions {
186
+ excludeComponentTypes?: string;
186
187
  }
187
188
  interface GenerateMissingProjectMapNodesOptions extends GlobalOptions {
188
- rootContentTypes: string;
189
189
  }
190
190
 
191
191
  declare class TransformError extends Error {
package/dist/index.js CHANGED
@@ -1601,6 +1601,11 @@ function walkAndRegenerate(value, currentPath) {
1601
1601
  return value;
1602
1602
  }
1603
1603
 
1604
+ // src/core/utils.ts
1605
+ function splitList(value) {
1606
+ return value.split(/[,;|]/).map((s) => s.trim()).filter((s) => s.length > 0);
1607
+ }
1608
+
1604
1609
  // src/core/services/property-propagator.service.ts
1605
1610
  var PropertyPropagatorService = class {
1606
1611
  constructor(fileSystem, componentService, compositionService, logger) {
@@ -1644,7 +1649,7 @@ var PropertyPropagatorService = class {
1644
1649
  this.logger.info(`Loading component: ${targetComponentType}`);
1645
1650
  const { component: targetComponent, filePath: targetFilePath } = await this.componentService.loadComponent(fullComponentsDir, targetComponentType, findOptions);
1646
1651
  this.logger.debug(`Loaded target component "${targetComponentType}" from ${targetFilePath}`);
1647
- const propertyNames = property.split("|").map((p) => p.trim()).filter((p) => p.length > 0);
1652
+ const propertyNames = splitList(property);
1648
1653
  const resolvedParams = [];
1649
1654
  const resolvedNames = [];
1650
1655
  for (const { sourceType, sourceComponent } of sourceComponents) {
@@ -1882,7 +1887,7 @@ var PropertyPropagatorService = class {
1882
1887
  };
1883
1888
  }
1884
1889
  parsePipeSeparatedValues(value, strict) {
1885
- const entries = value.split("|").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
1890
+ const entries = splitList(value);
1886
1891
  const normalized = [];
1887
1892
  for (const entry of entries) {
1888
1893
  const exists = normalized.some(
@@ -2318,7 +2323,7 @@ var ComponentAdderService = class {
2318
2323
  return id1.toLowerCase() === id2.toLowerCase();
2319
2324
  }
2320
2325
  parseParentComponentTypes(parentComponentType) {
2321
- return parentComponentType.split("|").map((t) => t.trim()).filter((t) => t.length > 0);
2326
+ return splitList(parentComponentType);
2322
2327
  }
2323
2328
  matchesAnyParentType(instanceType, parentTypes, strict) {
2324
2329
  return parentTypes.some((pt) => this.compareIds(instanceType, pt, strict));