@eventcatalog/sdk 2.4.0 → 2.5.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/eventcatalog.d.mts +9 -1
- package/dist/eventcatalog.d.ts +9 -1
- package/dist/eventcatalog.js +22 -2
- package/dist/eventcatalog.js.map +1 -1
- package/dist/eventcatalog.mjs +20 -1
- package/dist/eventcatalog.mjs.map +1 -1
- package/dist/index.d.mts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +118 -100
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +120 -102
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.d.mts +11 -2
- package/dist/types.d.d.ts +11 -2
- package/dist/types.d.js.map +1 -1
- package/package.json +1 -1
package/dist/eventcatalog.mjs
CHANGED
|
@@ -1427,6 +1427,14 @@ var index_default = (path4) => {
|
|
|
1427
1427
|
* @returns A JSON file with the catalog
|
|
1428
1428
|
*/
|
|
1429
1429
|
dumpCatalog: dumpCatalog(join12(path4)),
|
|
1430
|
+
/**
|
|
1431
|
+
* Returns the event catalog configuration file.
|
|
1432
|
+
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
1433
|
+
*
|
|
1434
|
+
* @param directory - The directory of the catalog.
|
|
1435
|
+
* @returns A JSON object with the configuration for the event catalog.
|
|
1436
|
+
*/
|
|
1437
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join12(path4)),
|
|
1430
1438
|
/**
|
|
1431
1439
|
* ================================
|
|
1432
1440
|
* Resources Utils
|
|
@@ -1475,6 +1483,16 @@ var filterCollection = (collection, options) => {
|
|
|
1475
1483
|
markdown: options?.includeMarkdown ? item.markdown : void 0
|
|
1476
1484
|
}));
|
|
1477
1485
|
};
|
|
1486
|
+
var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
1487
|
+
try {
|
|
1488
|
+
const path4 = join13(directory, "eventcatalog.config.js");
|
|
1489
|
+
const configModule = await import(path4);
|
|
1490
|
+
return configModule.default;
|
|
1491
|
+
} catch (error) {
|
|
1492
|
+
console.error("Error getting event catalog configuration file", error);
|
|
1493
|
+
return null;
|
|
1494
|
+
}
|
|
1495
|
+
};
|
|
1478
1496
|
var dumpCatalog = (directory) => async (options) => {
|
|
1479
1497
|
const { getDomains: getDomains2, getServices: getServices2, getEvents: getEvents2, getQueries: getQueries2, getCommands: getCommands2, getChannels: getChannels2, getTeams: getTeams2, getUsers: getUsers2 } = index_default(directory);
|
|
1480
1498
|
const { includeMarkdown = true } = options || {};
|
|
@@ -1524,6 +1542,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
1524
1542
|
};
|
|
1525
1543
|
};
|
|
1526
1544
|
export {
|
|
1527
|
-
dumpCatalog
|
|
1545
|
+
dumpCatalog,
|
|
1546
|
+
getEventCatalogConfigurationFile
|
|
1528
1547
|
};
|
|
1529
1548
|
//# sourceMappingURL=eventcatalog.mjs.map
|