@eventcatalog/sdk 2.2.2 → 2.2.3
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/eventcatalog.js +7 -3
- package/dist/eventcatalog.js.map +1 -1
- package/dist/eventcatalog.mjs +7 -3
- package/dist/eventcatalog.mjs.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -538,9 +538,13 @@ import fs8 from "fs";
|
|
|
538
538
|
import path2, { join as join9 } from "node:path";
|
|
539
539
|
var DUMP_VERSION = "0.0.1";
|
|
540
540
|
var getEventCatalogVersion = async (catalogDir) => {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
541
|
+
try {
|
|
542
|
+
const packageJson = fs8.readFileSync(join9(catalogDir, "package.json"), "utf8");
|
|
543
|
+
const packageJsonObject = JSON.parse(packageJson);
|
|
544
|
+
return packageJsonObject["dependencies"]["@eventcatalog/core"];
|
|
545
|
+
} catch (error) {
|
|
546
|
+
return "unknown";
|
|
547
|
+
}
|
|
544
548
|
};
|
|
545
549
|
var hydrateResource = async (catalogDir, resources, { attachSchema = false } = {}) => {
|
|
546
550
|
return await Promise.all(
|