@eventcatalog/sdk 1.4.4 → 1.4.5

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
@@ -145,7 +145,7 @@ var writeResource = async (catalogDir, resource, options = {
145
145
  }
146
146
  const document = matter2.stringify(markdown.trim(), frontmatter);
147
147
  await fs2.mkdir(join2(catalogDir, path), { recursive: true });
148
- await fs2.writeFile(join2(catalogDir, path, "index.md"), document);
148
+ return await fs2.writeFile(join2(catalogDir, path, "index.md"), document);
149
149
  };
150
150
  var getResource = async (catalogDir, id, version, options) => {
151
151
  const file = await findFileById(catalogDir, id, version);
@@ -299,7 +299,7 @@ var writeService = (directory) => async (service, options = { path: "" }) => {
299
299
  if (Array.isArray(service.receives)) {
300
300
  resource.receives = uniqueVersions(service.receives);
301
301
  }
302
- return writeResource(directory, resource, { ...options, type: "service" });
302
+ return await writeResource(directory, resource, { ...options, type: "service" });
303
303
  };
304
304
  var writeVersionedService = (directory) => async (service) => {
305
305
  const resource = { ...service };
@@ -390,7 +390,7 @@ var writeDomain = (directory) => async (domain, options = { path: "" }) => {
390
390
  if (Array.isArray(domain.services)) {
391
391
  resource.services = uniqueVersions(domain.services);
392
392
  }
393
- return writeResource(directory, resource, { ...options, type: "domain" });
393
+ return await writeResource(directory, resource, { ...options, type: "domain" });
394
394
  };
395
395
  var versionDomain = (directory) => async (id) => versionResource(directory, id);
396
396
  var rmDomain = (directory) => async (path) => {