@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.d.mts
CHANGED
|
@@ -250,14 +250,21 @@ declare const _default: (path: string) => {
|
|
|
250
250
|
*/
|
|
251
251
|
writeQueryToService: (query: Query, service: {
|
|
252
252
|
id: string;
|
|
253
|
-
version
|
|
253
|
+
version?: string;
|
|
254
|
+
}, options?: {
|
|
255
|
+
path
|
|
256
|
+
/**
|
|
257
|
+
* Returns a command from EventCatalog
|
|
258
|
+
* @param id - The id of the command to retrieve
|
|
259
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
260
|
+
* @returns Command|Undefined
|
|
261
|
+
*/
|
|
262
|
+
? /**
|
|
254
263
|
* Returns a command from EventCatalog
|
|
255
264
|
* @param id - The id of the command to retrieve
|
|
256
265
|
* @param version - Optional id of the version to get (supports semver)
|
|
257
266
|
* @returns Command|Undefined
|
|
258
267
|
*/: string;
|
|
259
|
-
}, options?: {
|
|
260
|
-
path?: string;
|
|
261
268
|
format?: "md" | "mdx";
|
|
262
269
|
override?: boolean;
|
|
263
270
|
}) => Promise<void>;
|
|
@@ -823,6 +830,14 @@ declare const _default: (path: string) => {
|
|
|
823
830
|
dumpCatalog: (options?: {
|
|
824
831
|
includeMarkdown?: boolean;
|
|
825
832
|
}) => Promise<EventCatalogObject>;
|
|
833
|
+
/**
|
|
834
|
+
* Returns the event catalog configuration file.
|
|
835
|
+
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
836
|
+
*
|
|
837
|
+
* @param directory - The directory of the catalog.
|
|
838
|
+
* @returns A JSON object with the configuration for the event catalog.
|
|
839
|
+
*/
|
|
840
|
+
getEventCatalogConfigurationFile: () => Promise<any>;
|
|
826
841
|
/**
|
|
827
842
|
* ================================
|
|
828
843
|
* Resources Utils
|
package/dist/index.d.ts
CHANGED
|
@@ -250,14 +250,21 @@ declare const _default: (path: string) => {
|
|
|
250
250
|
*/
|
|
251
251
|
writeQueryToService: (query: Query, service: {
|
|
252
252
|
id: string;
|
|
253
|
-
version
|
|
253
|
+
version?: string;
|
|
254
|
+
}, options?: {
|
|
255
|
+
path
|
|
256
|
+
/**
|
|
257
|
+
* Returns a command from EventCatalog
|
|
258
|
+
* @param id - The id of the command to retrieve
|
|
259
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
260
|
+
* @returns Command|Undefined
|
|
261
|
+
*/
|
|
262
|
+
? /**
|
|
254
263
|
* Returns a command from EventCatalog
|
|
255
264
|
* @param id - The id of the command to retrieve
|
|
256
265
|
* @param version - Optional id of the version to get (supports semver)
|
|
257
266
|
* @returns Command|Undefined
|
|
258
267
|
*/: string;
|
|
259
|
-
}, options?: {
|
|
260
|
-
path?: string;
|
|
261
268
|
format?: "md" | "mdx";
|
|
262
269
|
override?: boolean;
|
|
263
270
|
}) => Promise<void>;
|
|
@@ -823,6 +830,14 @@ declare const _default: (path: string) => {
|
|
|
823
830
|
dumpCatalog: (options?: {
|
|
824
831
|
includeMarkdown?: boolean;
|
|
825
832
|
}) => Promise<EventCatalogObject>;
|
|
833
|
+
/**
|
|
834
|
+
* Returns the event catalog configuration file.
|
|
835
|
+
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
836
|
+
*
|
|
837
|
+
* @param directory - The directory of the catalog.
|
|
838
|
+
* @returns A JSON object with the configuration for the event catalog.
|
|
839
|
+
*/
|
|
840
|
+
getEventCatalogConfigurationFile: () => Promise<any>;
|
|
826
841
|
/**
|
|
827
842
|
* ================================
|
|
828
843
|
* Resources Utils
|
package/dist/index.js
CHANGED
|
@@ -832,6 +832,16 @@ var filterCollection = (collection, options) => {
|
|
|
832
832
|
markdown: options?.includeMarkdown ? item.markdown : void 0
|
|
833
833
|
}));
|
|
834
834
|
};
|
|
835
|
+
var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
836
|
+
try {
|
|
837
|
+
const path4 = (0, import_node_path11.join)(directory, "eventcatalog.config.js");
|
|
838
|
+
const configModule = await import(path4);
|
|
839
|
+
return configModule.default;
|
|
840
|
+
} catch (error) {
|
|
841
|
+
console.error("Error getting event catalog configuration file", error);
|
|
842
|
+
return null;
|
|
843
|
+
}
|
|
844
|
+
};
|
|
835
845
|
var dumpCatalog = (directory) => async (options) => {
|
|
836
846
|
const { getDomains: getDomains2, getServices: getServices2, getEvents: getEvents2, getQueries: getQueries2, getCommands: getCommands2, getChannels: getChannels2, getTeams: getTeams2, getUsers: getUsers2 } = index_default(directory);
|
|
837
847
|
const { includeMarkdown = true } = options || {};
|
|
@@ -1544,6 +1554,14 @@ var index_default = (path4) => {
|
|
|
1544
1554
|
* @returns A JSON file with the catalog
|
|
1545
1555
|
*/
|
|
1546
1556
|
dumpCatalog: dumpCatalog((0, import_node_path12.join)(path4)),
|
|
1557
|
+
/**
|
|
1558
|
+
* Returns the event catalog configuration file.
|
|
1559
|
+
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
1560
|
+
*
|
|
1561
|
+
* @param directory - The directory of the catalog.
|
|
1562
|
+
* @returns A JSON object with the configuration for the event catalog.
|
|
1563
|
+
*/
|
|
1564
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0, import_node_path12.join)(path4)),
|
|
1547
1565
|
/**
|
|
1548
1566
|
* ================================
|
|
1549
1567
|
* Resources Utils
|