@eventcatalog/sdk 2.5.0 → 2.5.2
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/domains.js +1 -1
- package/dist/domains.js.map +1 -1
- package/dist/domains.mjs +1 -1
- package/dist/domains.mjs.map +1 -1
- package/dist/eventcatalog.d.mts +9 -1
- package/dist/eventcatalog.d.ts +9 -1
- package/dist/eventcatalog.js +24 -4
- package/dist/eventcatalog.js.map +1 -1
- package/dist/eventcatalog.mjs +22 -3
- 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 +20 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -2
- package/dist/index.mjs.map +1 -1
- package/dist/services.js +1 -1
- package/dist/services.js.map +1 -1
- package/dist/services.mjs +1 -1
- package/dist/services.mjs.map +1 -1
- package/package.json +1 -1
package/dist/eventcatalog.mjs
CHANGED
|
@@ -404,7 +404,7 @@ import { join as join6, dirname as dirname4, extname } from "path";
|
|
|
404
404
|
var getService = (directory) => async (id, version) => getResource(directory, id, version, { type: "service" });
|
|
405
405
|
var getServices = (directory) => async (options) => getResources(directory, {
|
|
406
406
|
type: "services",
|
|
407
|
-
ignore: ["**/events/**", "**/commands/**", "**/queries/**"],
|
|
407
|
+
ignore: ["**/events/**", "**/commands/**", "**/queries/**", "**/entities/**"],
|
|
408
408
|
...options
|
|
409
409
|
});
|
|
410
410
|
var writeService = (directory) => async (service, options = {
|
|
@@ -506,7 +506,7 @@ import matter3 from "gray-matter";
|
|
|
506
506
|
var getDomain = (directory) => async (id, version) => getResource(directory, id, version, { type: "domain" });
|
|
507
507
|
var getDomains = (directory) => async (options) => getResources(directory, {
|
|
508
508
|
type: "domains",
|
|
509
|
-
ignore: ["**/services/**", "**/events/**", "**/commands/**", "**/queries/**", "**/flows/**"],
|
|
509
|
+
ignore: ["**/services/**", "**/events/**", "**/commands/**", "**/queries/**", "**/flows/**", "**/entities/**"],
|
|
510
510
|
...options
|
|
511
511
|
});
|
|
512
512
|
var writeDomain = (directory) => async (domain, options = {
|
|
@@ -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
|