@eventcatalog/generator-asyncapi 6.3.0 → 6.3.1

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.js CHANGED
@@ -1543,7 +1543,7 @@ var import_path3 = __toESM(require("path"));
1543
1543
  // package.json
1544
1544
  var package_default = {
1545
1545
  name: "@eventcatalog/generator-asyncapi",
1546
- version: "6.3.0",
1546
+ version: "6.3.1",
1547
1547
  description: "AsyncAPI generator for EventCatalog",
1548
1548
  scripts: {
1549
1549
  build: "tsup",
@@ -4173,10 +4173,12 @@ var consolidateMessages = (array) => {
4173
4173
  const existing = map.get(key);
4174
4174
  if (existing) {
4175
4175
  if (item.to) {
4176
- existing.to = [...existing.to || [], ...item.to];
4176
+ const merged = [...existing.to || [], ...item.to];
4177
+ existing.to = merged.filter((ch, i, arr) => i === arr.findIndex((c) => c.id === ch.id));
4177
4178
  }
4178
4179
  if (item.from) {
4179
- existing.from = [...existing.from || [], ...item.from];
4180
+ const merged = [...existing.from || [], ...item.from];
4181
+ existing.from = merged.filter((ch, i, arr) => i === arr.findIndex((c) => c.id === ch.id));
4180
4182
  }
4181
4183
  } else {
4182
4184
  map.set(key, { ...item });