@eventcatalog/sdk 2.23.0 → 2.23.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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1878,7 +1878,7 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
1878
1878
|
if (!existingResource) {
|
|
1879
1879
|
throw new Error(`Cannot find message ${id} in the catalog`);
|
|
1880
1880
|
}
|
|
1881
|
-
const path8 = existingResource.split(
|
|
1881
|
+
const path8 = existingResource.split(new RegExp(`[\\\\/]+${collection}`))[0];
|
|
1882
1882
|
const pathToResource = (0, import_node_path10.join)(path8, collection);
|
|
1883
1883
|
await rmMessageById(directory)(_message.id, _message.version, true);
|
|
1884
1884
|
await writeMessage(pathToResource)(message, { format: extension === ".md" ? "md" : "mdx" });
|