@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.
package/dist/index.mjs CHANGED
@@ -491,7 +491,7 @@ var addMessageToService = (directory) => async (id, direction, event, version) =
491
491
  if (!existingResource) {
492
492
  throw new Error(`Cannot find service ${id} in the catalog`);
493
493
  }
494
- const path4 = existingResource.split("/services")[0];
494
+ const path4 = existingResource.split(/[\\/]+services/)[0];
495
495
  const pathToResource = join6(path4, "services");
496
496
  await rmServiceById(directory)(id, version);
497
497
  await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
@@ -632,7 +632,7 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
632
632
  if (!existingResource) {
633
633
  throw new Error(`Cannot find message ${id} in the catalog`);
634
634
  }
635
- const path4 = existingResource.split(`/${collection}`)[0];
635
+ const path4 = existingResource.split(`/[\\/]+${collection}`)[0];
636
636
  const pathToResource = join8(path4, collection);
637
637
  await rmMessageById(directory)(_message.id, _message.version, true);
638
638
  await writeMessage(pathToResource)(message, { format: extension === ".md" ? "md" : "mdx" });