@eventcatalog/generator-asyncapi 6.1.1 → 6.2.0
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 +15 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
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.
|
|
1546
|
+
version: "6.2.0",
|
|
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.
|
|
1584
|
+
"@eventcatalog/sdk": "2.18.2",
|
|
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,
|
|
@@ -4298,10 +4299,6 @@ var index_default = async (config, options) => {
|
|
|
4298
4299
|
markdown: generatedMarkdownForService
|
|
4299
4300
|
}) : generatedMarkdownForService;
|
|
4300
4301
|
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
4302
|
if (options.domain) {
|
|
4306
4303
|
const { id: domainId, name: domainName, version: domainVersion, owners: domainOwners } = options.domain;
|
|
4307
4304
|
const domain = await getDomain(options.domain.id, domainVersion || "latest");
|
|
@@ -4331,6 +4328,18 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
4331
4328
|
}
|
|
4332
4329
|
await addServiceToDomain(domainId, { id: serviceId, version }, domainVersion);
|
|
4333
4330
|
}
|
|
4331
|
+
let servicePath = import_path3.default.join("../", "services", service.id);
|
|
4332
|
+
if (options.domain) {
|
|
4333
|
+
const domainResource = await getResourcePath(process.env.PROJECT_DIR, options.domain.id, options.domain.version);
|
|
4334
|
+
if (domainResource) {
|
|
4335
|
+
servicePath = import_path3.default.join("../", domainResource.directory, "services", service.id);
|
|
4336
|
+
} else {
|
|
4337
|
+
servicePath = import_path3.default.join("../", "domains", options.domain.id, "services", service.id);
|
|
4338
|
+
}
|
|
4339
|
+
}
|
|
4340
|
+
if (options.writeFilesToRoot) {
|
|
4341
|
+
servicePath = service.id;
|
|
4342
|
+
}
|
|
4334
4343
|
if (parseChannels) {
|
|
4335
4344
|
for (const channel of channels) {
|
|
4336
4345
|
const channelAsJSON = channel.json();
|