@eventcatalog/generator-asyncapi 6.4.0 → 6.4.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.4.0",
1546
+ version: "6.4.1",
1547
1547
  description: "AsyncAPI generator for EventCatalog",
1548
1548
  scripts: {
1549
1549
  build: "tsup",
@@ -4363,6 +4363,18 @@ Processing domain: ${domainName} (v${domainVersion})`));
4363
4363
  } else {
4364
4364
  servicePath = import_path3.default.join("../", "domains", options.domain.id, "services", service.id);
4365
4365
  }
4366
+ } else {
4367
+ const existingService = await getService(serviceId, "latest");
4368
+ if (existingService) {
4369
+ const existingServiceResource = await getResourcePath(
4370
+ process.env.PROJECT_DIR,
4371
+ serviceId,
4372
+ existingService.version
4373
+ );
4374
+ if (existingServiceResource) {
4375
+ servicePath = import_path3.default.join("../", existingServiceResource.directory);
4376
+ }
4377
+ }
4366
4378
  }
4367
4379
  if (options.writeFilesToRoot) {
4368
4380
  servicePath = service.id;