@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.js
CHANGED
|
@@ -572,9 +572,13 @@ var import_fs = __toESM(require("fs"));
|
|
|
572
572
|
var import_node_path8 = __toESM(require("path"));
|
|
573
573
|
var DUMP_VERSION = "0.0.1";
|
|
574
574
|
var getEventCatalogVersion = async (catalogDir) => {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
575
|
+
try {
|
|
576
|
+
const packageJson = import_fs.default.readFileSync((0, import_node_path8.join)(catalogDir, "package.json"), "utf8");
|
|
577
|
+
const packageJsonObject = JSON.parse(packageJson);
|
|
578
|
+
return packageJsonObject["dependencies"]["@eventcatalog/core"];
|
|
579
|
+
} catch (error) {
|
|
580
|
+
return "unknown";
|
|
581
|
+
}
|
|
578
582
|
};
|
|
579
583
|
var hydrateResource = async (catalogDir, resources, { attachSchema = false } = {}) => {
|
|
580
584
|
return await Promise.all(
|