@uniformdev/transformer 1.1.14 → 1.1.15

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/cli/index.js CHANGED
@@ -3837,10 +3837,11 @@ var CompositionConverterService = class {
3837
3837
  }
3838
3838
  }
3839
3839
  const entryId = computeGuidHash(`entry${comp._id}`);
3840
+ const entryName = this.truncateName(comp._name ?? comp._id, 60);
3840
3841
  return {
3841
3842
  entry: {
3842
3843
  _id: entryId,
3843
- _name: comp._name ?? comp._id,
3844
+ _name: entryName,
3844
3845
  type: comp.type,
3845
3846
  fields: { ...comp.parameters ?? {} },
3846
3847
  ...extraRootProps
@@ -3849,10 +3850,14 @@ var CompositionConverterService = class {
3849
3850
  };
3850
3851
  }
3851
3852
  generateEntryFromFlattenedInstance(inst) {
3853
+ const entryName = this.truncateName(
3854
+ `${inst.componentType} (from ${inst.compositionName})`,
3855
+ 60
3856
+ );
3852
3857
  return {
3853
3858
  entry: {
3854
3859
  _id: inst.determinisiticId,
3855
- _name: `${inst.componentType} (from ${inst.compositionName})`,
3860
+ _name: entryName,
3856
3861
  type: inst.componentType,
3857
3862
  fields: { ...inst.instance.parameters ?? {} }
3858
3863
  }
@@ -3934,6 +3939,10 @@ var CompositionConverterService = class {
3934
3939
  if (str.length <= maxLength) return str;
3935
3940
  return str.substring(0, maxLength - 3) + "...";
3936
3941
  }
3942
+ truncateName(name, maxLength) {
3943
+ if (name.length <= maxLength) return name;
3944
+ return name.substring(0, maxLength);
3945
+ }
3937
3946
  };
3938
3947
  function computeGuidHash(guidOrSeed) {
3939
3948
  let uuidStr;
@@ -4593,7 +4602,7 @@ function createRemoveFieldCommand() {
4593
4602
  // package.json
4594
4603
  var package_default = {
4595
4604
  name: "@uniformdev/transformer",
4596
- version: "1.1.14",
4605
+ version: "1.1.15",
4597
4606
  description: "CLI tool for transforming Uniform.dev serialization files offline",
4598
4607
  type: "module",
4599
4608
  bin: {