@eventcatalog/sdk 2.6.3 → 2.6.4

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.
@@ -495,7 +495,7 @@ var addMessageToService = (directory) => async (id, direction, event, version) =
495
495
  if (!existingResource) {
496
496
  throw new Error(`Cannot find service ${id} in the catalog`);
497
497
  }
498
- const path4 = existingResource.split("/services")[0];
498
+ const path4 = existingResource.split(/[\\/]+services/)[0];
499
499
  const pathToResource = join6(path4, "services");
500
500
  await rmServiceById(directory)(id, version);
501
501
  await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
@@ -636,7 +636,7 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
636
636
  if (!existingResource) {
637
637
  throw new Error(`Cannot find message ${id} in the catalog`);
638
638
  }
639
- const path4 = existingResource.split(`/${collection}`)[0];
639
+ const path4 = existingResource.split(`/[\\/]+${collection}`)[0];
640
640
  const pathToResource = join8(path4, collection);
641
641
  await rmMessageById(directory)(_message.id, _message.version, true);
642
642
  await writeMessage(pathToResource)(message, { format: extension === ".md" ? "md" : "mdx" });