@eventcatalog/generator-asyncapi 6.1.1 → 6.2.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
@@ -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.1.1",
1546
+ version: "6.2.1",
1547
1547
  description: "AsyncAPI generator for EventCatalog",
1548
1548
  scripts: {
1549
1549
  build: "tsup",
@@ -1581,7 +1581,7 @@ var package_default = {
1581
1581
  dependencies: {
1582
1582
  "@asyncapi/avro-schema-parser": "3.0.24",
1583
1583
  "@asyncapi/parser": "3.6.0",
1584
- "@eventcatalog/sdk": "2.17.4",
1584
+ "@eventcatalog/sdk": "2.18.4",
1585
1585
  chalk: "4.1.2",
1586
1586
  "fs-extra": "^11.2.0",
1587
1587
  glob: "^12.0.0",
@@ -4210,6 +4210,7 @@ var index_default = async (config, options) => {
4210
4210
  addSchemaToQuery,
4211
4211
  addFileToService,
4212
4212
  versionDomain,
4213
+ getResourcePath,
4213
4214
  getSpecificationFilesForService,
4214
4215
  writeChannel,
4215
4216
  getChannel,
@@ -4285,6 +4286,8 @@ var index_default = async (config, options) => {
4285
4286
  let badges = null;
4286
4287
  let attachments = null;
4287
4288
  let diagrams = null;
4289
+ let flows = null;
4290
+ let entities = null;
4288
4291
  let serviceSpecifications = {};
4289
4292
  let serviceSpecificationsFiles = [];
4290
4293
  let configuredWritesTo = service.writesTo || [];
@@ -4298,10 +4301,6 @@ var index_default = async (config, options) => {
4298
4301
  markdown: generatedMarkdownForService
4299
4302
  }) : generatedMarkdownForService;
4300
4303
  let styles2 = null;
4301
- let servicePath = options.domain ? import_path3.default.join("../", "domains", options.domain.id, "services", service.id) : import_path3.default.join("../", "services", service.id);
4302
- if (options.writeFilesToRoot) {
4303
- servicePath = service.id;
4304
- }
4305
4304
  if (options.domain) {
4306
4305
  const { id: domainId, name: domainName, version: domainVersion, owners: domainOwners } = options.domain;
4307
4306
  const domain = await getDomain(options.domain.id, domainVersion || "latest");
@@ -4331,6 +4330,18 @@ Processing domain: ${domainName} (v${domainVersion})`));
4331
4330
  }
4332
4331
  await addServiceToDomain(domainId, { id: serviceId, version }, domainVersion);
4333
4332
  }
4333
+ let servicePath = import_path3.default.join("../", "services", service.id);
4334
+ if (options.domain) {
4335
+ const domainResource = await getResourcePath(process.env.PROJECT_DIR, options.domain.id, options.domain.version);
4336
+ if (domainResource) {
4337
+ servicePath = import_path3.default.join("../", domainResource.directory, "services", service.id);
4338
+ } else {
4339
+ servicePath = import_path3.default.join("../", "domains", options.domain.id, "services", service.id);
4340
+ }
4341
+ }
4342
+ if (options.writeFilesToRoot) {
4343
+ servicePath = service.id;
4344
+ }
4334
4345
  if (parseChannels) {
4335
4346
  for (const channel of channels) {
4336
4347
  const channelAsJSON = channel.json();
@@ -4514,6 +4525,8 @@ Processing domain: ${domainName} (v${domainVersion})`));
4514
4525
  badges = latestServiceInCatalog.badges || null;
4515
4526
  attachments = latestServiceInCatalog.attachments || null;
4516
4527
  diagrams = latestServiceInCatalog.diagrams || null;
4528
+ flows = latestServiceInCatalog.flows || null;
4529
+ entities = latestServiceInCatalog.entities || null;
4517
4530
  serviceWritesTo = latestServiceInCatalog.writesTo ? latestServiceInCatalog.writesTo : configuredWritesTo;
4518
4531
  serviceReadsFrom = latestServiceInCatalog.readsFrom ? latestServiceInCatalog.readsFrom : configuredReadsFrom;
4519
4532
  if (latestServiceInCatalog.version !== version) {
@@ -4547,6 +4560,8 @@ Processing domain: ${domainName} (v${domainVersion})`));
4547
4560
  ...repository && { repository },
4548
4561
  ...styles2 && { styles: styles2 },
4549
4562
  ...diagrams && { diagrams },
4563
+ ...flows && { flows },
4564
+ ...entities && { entities },
4550
4565
  ...isServiceMarkedAsDraft && { draft: true },
4551
4566
  ...attachments && { attachments },
4552
4567
  ...serviceWritesTo.length > 0 ? { writesTo: serviceWritesTo } : {},