@uniformdev/transformer 1.1.33 → 1.1.35

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
@@ -175,6 +175,9 @@ interface FlattenBlockFieldOptions extends GlobalOptions {
175
175
  parameterId: string;
176
176
  excludeFields?: string;
177
177
  }
178
+ interface RemoveOrphanEntriesOptions extends GlobalOptions {
179
+ rootContentTypes: string;
180
+ }
178
181
 
179
182
  declare class TransformError extends Error {
180
183
  constructor(message: string);
@@ -608,4 +611,4 @@ declare class FieldRemoverService {
608
611
  private removeKeysFromMap;
609
612
  }
610
613
 
611
- export { type AddComponentOptions, type AddComponentParameterOptions, type AddComponentPatternOptions, type AddContentTypeFieldOptions, ComponentAdderService, ComponentAlreadyExistsError, type ComponentDefinition, type ComponentInstance, ComponentNotFoundError, ComponentRenamerService, ComponentService, type Composition, CompositionConverterService, type CompositionOverrides, type CompositionPatternCandidatesOptions, type CompositionRoot, CompositionService, type ContentTypeDefinition$1 as ContentTypeDefinition, type ContentTypeField$1 as ContentTypeField, type ConvertCompositionsToEntriesOptions, DuplicateIdError, FieldRemoverService, FileNotFoundError, FileSystemService, type FlattenBlockFieldOptions, type GlobalOptions, InvalidYamlError, Logger, type PackSerializationOptions, type Parameter, ParameterRemoverService, type ParameterValue, type PropagateRootComponentPropertyOptions, type PropagateRootComponentSlotOptions, PropertyNotFoundError, PropertyPropagatorService, type RemoveFieldOptions, type RemoveParameterOptions, type RenameComponentOptions, type RenameSlotOptions, SlotAlreadyExistsError, type SlotDefinition, SlotNotFoundError, SlotRenamerService, TransformError, type UnpackSerializationOptions, computeGuidHash, regenerateIds };
614
+ export { type AddComponentOptions, type AddComponentParameterOptions, type AddComponentPatternOptions, type AddContentTypeFieldOptions, ComponentAdderService, ComponentAlreadyExistsError, type ComponentDefinition, type ComponentInstance, ComponentNotFoundError, ComponentRenamerService, ComponentService, type Composition, CompositionConverterService, type CompositionOverrides, type CompositionPatternCandidatesOptions, type CompositionRoot, CompositionService, type ContentTypeDefinition$1 as ContentTypeDefinition, type ContentTypeField$1 as ContentTypeField, type ConvertCompositionsToEntriesOptions, DuplicateIdError, FieldRemoverService, FileNotFoundError, FileSystemService, type FlattenBlockFieldOptions, type GlobalOptions, InvalidYamlError, Logger, type PackSerializationOptions, type Parameter, ParameterRemoverService, type ParameterValue, type PropagateRootComponentPropertyOptions, type PropagateRootComponentSlotOptions, PropertyNotFoundError, PropertyPropagatorService, type RemoveFieldOptions, type RemoveOrphanEntriesOptions, type RemoveParameterOptions, type RenameComponentOptions, type RenameSlotOptions, SlotAlreadyExistsError, type SlotDefinition, SlotNotFoundError, SlotRenamerService, TransformError, type UnpackSerializationOptions, computeGuidHash, regenerateIds };
package/dist/index.js CHANGED
@@ -2090,16 +2090,7 @@ var ComponentAdderService = class {
2090
2090
  throw new TransformError("parentComponentType cannot be empty");
2091
2091
  }
2092
2092
  this.logger.info(`Validating new component: ${newComponentType}`);
2093
- try {
2094
- await this.componentService.loadComponent(fullComponentsDir, newComponentType, findOptions);
2095
- } catch (error) {
2096
- if (error instanceof ComponentNotFoundError) {
2097
- throw new TransformError(
2098
- `Component type "${newComponentType}" not found in ${fullComponentsDir}`
2099
- );
2100
- }
2101
- throw error;
2102
- }
2093
+ await this.componentService.loadComponent(fullComponentsDir, newComponentType, findOptions);
2103
2094
  let allowedComponentsUpdated = false;
2104
2095
  const resolvedParentTypes = [];
2105
2096
  for (const parentType of parentTypes) {
@@ -2733,6 +2724,7 @@ var FieldRemoverService = class {
2733
2724
  this.logger = logger;
2734
2725
  }
2735
2726
  compareIds(id1, id2, strict) {
2727
+ if (id2 === "*") return true;
2736
2728
  if (strict) {
2737
2729
  return id1 === id2;
2738
2730
  }