@eventcatalog/generator-openapi 7.11.0 → 7.11.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/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2024-2026 EventCatalog Ltd
2
+
3
+ This software is dual-licensed:
4
+
5
+ * For open-source projects: licensed under the GNU Affero General Public
6
+ License v3.0 (AGPL-3.0). See LICENSE-OPENSOURCE.md for the full terms.
7
+
8
+ * For proprietary, internal, or commercial use: licensed under the EventCatalog
9
+ Commercial License. See LICENSE-COMMERCIAL.md for the full terms.
10
+
11
+ If you are using these plugins for internal business purposes and do not wish
12
+ to release your source code under AGPL-3.0, you must obtain a Commercial
13
+ License.
14
+
15
+ To obtain a Commercial License:
16
+ - Purchase a subscription at https://www.eventcatalog.dev/pricing
17
+ - Purchase individual plugins at https://eventcatalog.cloud/
18
+ - Free 14-day trial at https://eventcatalog.cloud/
19
+ - Contact us at hello@eventcatalog.dev
package/dist/index.js CHANGED
@@ -4213,7 +4213,7 @@ var import_node_path = require("path");
4213
4213
  // package.json
4214
4214
  var package_default = {
4215
4215
  name: "@eventcatalog/generator-openapi",
4216
- version: "7.11.0",
4216
+ version: "7.11.1",
4217
4217
  description: "OpenAPI generator for EventCatalog",
4218
4218
  scripts: {
4219
4219
  build: "tsup",
@@ -4431,7 +4431,7 @@ var filterMessagesByRoutes = (allMessages, routes) => {
4431
4431
  }
4432
4432
  return Array.from(matched.values());
4433
4433
  };
4434
- var mergeReceives = (existing, incoming) => {
4434
+ var mergeSends = (existing, incoming) => {
4435
4435
  const merged = /* @__PURE__ */ new Map();
4436
4436
  for (const entry of existing) {
4437
4437
  merged.set(entry.id, { ...entry });
@@ -4685,16 +4685,16 @@ Processing domain: ${domainName} (v${domainVersion})`));
4685
4685
  const consumers = serviceSpec.consumers || [];
4686
4686
  for (const consumer of consumers) {
4687
4687
  const consumerVersion = consumer.version || "1.0.0";
4688
- const filteredReceives = filterMessagesByRoutes(allGeneratedMessages, consumer.routes);
4688
+ const filteredSends = filterMessagesByRoutes(allGeneratedMessages, consumer.routes);
4689
4689
  const existingConsumer = await getService(consumer.id, consumerVersion);
4690
4690
  if (existingConsumer) {
4691
- const mergedReceives = mergeReceives(existingConsumer.receives || [], filteredReceives);
4691
+ const mergedSends = mergeSends(existingConsumer.sends || [], filteredSends);
4692
4692
  const consumerResource = await getResourcePath(process.env.PROJECT_DIR, consumer.id, consumerVersion);
4693
4693
  const consumerWritePath = consumerResource ? (0, import_node_path.join)("../", consumerResource.directory) : consumer.id;
4694
4694
  await writeService(
4695
4695
  {
4696
4696
  ...existingConsumer,
4697
- ...mergedReceives.length > 0 ? { receives: mergedReceives } : {}
4697
+ ...mergedSends.length > 0 ? { sends: mergedSends } : {}
4698
4698
  },
4699
4699
  { path: consumerWritePath, override: true }
4700
4700
  );
@@ -4707,9 +4707,9 @@ Processing domain: ${domainName} (v${domainVersion})`));
4707
4707
  options.domain.version
4708
4708
  );
4709
4709
  if (domainResource) {
4710
- consumerPath = (0, import_node_path.join)(domainResource.directory, "services", consumer.id);
4710
+ consumerPath = (0, import_node_path.join)("../", domainResource.directory, "services", consumer.id);
4711
4711
  } else {
4712
- consumerPath = (0, import_node_path.join)("domains", options.domain.id, "services", consumer.id);
4712
+ consumerPath = (0, import_node_path.join)("../", "domains", options.domain.id, "services", consumer.id);
4713
4713
  }
4714
4714
  }
4715
4715
  await writeService(
@@ -4718,7 +4718,7 @@ Processing domain: ${domainName} (v${domainVersion})`));
4718
4718
  version: consumerVersion,
4719
4719
  name: consumer.id,
4720
4720
  markdown: "<NodeGraph />",
4721
- ...filteredReceives.length > 0 ? { receives: filteredReceives } : {}
4721
+ ...filteredSends.length > 0 ? { sends: filteredSends } : {}
4722
4722
  },
4723
4723
  { path: consumerPath, override: true }
4724
4724
  );