@eventcatalog/sdk 2.5.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 +18 -3
- package/dist/index.d.ts +18 -3
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -798,6 +798,16 @@ var filterCollection = (collection, options) => {
|
|
|
798
798
|
markdown: options?.includeMarkdown ? item.markdown : void 0
|
|
799
799
|
}));
|
|
800
800
|
};
|
|
801
|
+
var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
802
|
+
try {
|
|
803
|
+
const path4 = join12(directory, "eventcatalog.config.js");
|
|
804
|
+
const configModule = await import(path4);
|
|
805
|
+
return configModule.default;
|
|
806
|
+
} catch (error) {
|
|
807
|
+
console.error("Error getting event catalog configuration file", error);
|
|
808
|
+
return null;
|
|
809
|
+
}
|
|
810
|
+
};
|
|
801
811
|
var dumpCatalog = (directory) => async (options) => {
|
|
802
812
|
const { getDomains: getDomains2, getServices: getServices2, getEvents: getEvents2, getQueries: getQueries2, getCommands: getCommands2, getChannels: getChannels2, getTeams: getTeams2, getUsers: getUsers2 } = index_default(directory);
|
|
803
813
|
const { includeMarkdown = true } = options || {};
|
|
@@ -1510,6 +1520,14 @@ var index_default = (path4) => {
|
|
|
1510
1520
|
* @returns A JSON file with the catalog
|
|
1511
1521
|
*/
|
|
1512
1522
|
dumpCatalog: dumpCatalog(join13(path4)),
|
|
1523
|
+
/**
|
|
1524
|
+
* Returns the event catalog configuration file.
|
|
1525
|
+
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
1526
|
+
*
|
|
1527
|
+
* @param directory - The directory of the catalog.
|
|
1528
|
+
* @returns A JSON object with the configuration for the event catalog.
|
|
1529
|
+
*/
|
|
1530
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join13(path4)),
|
|
1513
1531
|
/**
|
|
1514
1532
|
* ================================
|
|
1515
1533
|
* Resources Utils
|