@eventcatalog/sdk 2.18.2 → 2.18.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/LICENSE +28 -0
- package/dist/index.d.mts +80 -36
- package/dist/index.d.ts +80 -36
- package/dist/index.js +53 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1970,7 +1970,19 @@ var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
};
|
|
1972
1972
|
var dumpCatalog = (directory) => async (options) => {
|
|
1973
|
-
const {
|
|
1973
|
+
const {
|
|
1974
|
+
getDomains: getDomains2,
|
|
1975
|
+
getServices: getServices2,
|
|
1976
|
+
getEvents: getEvents2,
|
|
1977
|
+
getQueries: getQueries2,
|
|
1978
|
+
getCommands: getCommands2,
|
|
1979
|
+
getChannels: getChannels2,
|
|
1980
|
+
getTeams: getTeams2,
|
|
1981
|
+
getUsers: getUsers3,
|
|
1982
|
+
getEntities: getEntities2,
|
|
1983
|
+
getDataStores: getDataStores2,
|
|
1984
|
+
getFlows: getFlows2
|
|
1985
|
+
} = src_default(directory);
|
|
1974
1986
|
const { includeMarkdown = true } = options || {};
|
|
1975
1987
|
const domains = await getDomains2();
|
|
1976
1988
|
const services = await getServices2();
|
|
@@ -1980,6 +1992,9 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
1980
1992
|
const teams = await getTeams2();
|
|
1981
1993
|
const users = await getUsers3();
|
|
1982
1994
|
const channels = await getChannels2();
|
|
1995
|
+
const entities = await getEntities2();
|
|
1996
|
+
const containers = await getDataStores2();
|
|
1997
|
+
const flows = await getFlows2();
|
|
1983
1998
|
const [
|
|
1984
1999
|
hydratedDomains,
|
|
1985
2000
|
hydratedServices,
|
|
@@ -1988,7 +2003,10 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
1988
2003
|
hydratedCommands,
|
|
1989
2004
|
hydratedTeams,
|
|
1990
2005
|
hydratedUsers,
|
|
1991
|
-
hydratedChannels
|
|
2006
|
+
hydratedChannels,
|
|
2007
|
+
hydratedEntities,
|
|
2008
|
+
hydratedContainers,
|
|
2009
|
+
hydratedFlows
|
|
1992
2010
|
] = await Promise.all([
|
|
1993
2011
|
hydrateResource(directory, domains),
|
|
1994
2012
|
hydrateResource(directory, services),
|
|
@@ -1997,7 +2015,10 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
1997
2015
|
hydrateResource(directory, commands),
|
|
1998
2016
|
hydrateResource(directory, teams),
|
|
1999
2017
|
hydrateResource(directory, users),
|
|
2000
|
-
hydrateResource(directory, channels)
|
|
2018
|
+
hydrateResource(directory, channels),
|
|
2019
|
+
hydrateResource(directory, entities),
|
|
2020
|
+
hydrateResource(directory, containers),
|
|
2021
|
+
hydrateResource(directory, flows)
|
|
2001
2022
|
]);
|
|
2002
2023
|
return {
|
|
2003
2024
|
version: DUMP_VERSION,
|
|
@@ -2013,7 +2034,10 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2013
2034
|
},
|
|
2014
2035
|
teams: filterCollection(hydratedTeams, { includeMarkdown }),
|
|
2015
2036
|
users: filterCollection(hydratedUsers, { includeMarkdown }),
|
|
2016
|
-
channels: filterCollection(hydratedChannels, { includeMarkdown })
|
|
2037
|
+
channels: filterCollection(hydratedChannels, { includeMarkdown }),
|
|
2038
|
+
entities: filterCollection(hydratedEntities, { includeMarkdown }),
|
|
2039
|
+
containers: filterCollection(hydratedContainers, { includeMarkdown }),
|
|
2040
|
+
flows: filterCollection(hydratedFlows, { includeMarkdown })
|
|
2017
2041
|
}
|
|
2018
2042
|
};
|
|
2019
2043
|
};
|
|
@@ -2458,6 +2482,10 @@ var entityHasVersion = (directory) => async (id, version) => {
|
|
|
2458
2482
|
return !!file;
|
|
2459
2483
|
};
|
|
2460
2484
|
|
|
2485
|
+
// src/flows.ts
|
|
2486
|
+
var getFlow = (directory) => async (id, version) => getResource(directory, id, version, { type: "flow" });
|
|
2487
|
+
var getFlows = (directory) => async (options) => getResources(directory, { type: "flows", latestOnly: options?.latestOnly });
|
|
2488
|
+
|
|
2461
2489
|
// src/containers.ts
|
|
2462
2490
|
import fs14 from "fs/promises";
|
|
2463
2491
|
import { join as join15 } from "path";
|
|
@@ -3512,6 +3540,27 @@ var src_default = (path8) => {
|
|
|
3512
3540
|
* @returns
|
|
3513
3541
|
*/
|
|
3514
3542
|
entityHasVersion: entityHasVersion(join18(path8)),
|
|
3543
|
+
/**
|
|
3544
|
+
* ================================
|
|
3545
|
+
* Flows
|
|
3546
|
+
* ================================
|
|
3547
|
+
*/
|
|
3548
|
+
/**
|
|
3549
|
+
* Returns a flow from EventCatalog
|
|
3550
|
+
*
|
|
3551
|
+
* @param id - The id of the flow to retrieve
|
|
3552
|
+
* @param version - Optional version of the flow
|
|
3553
|
+
* @returns Flow
|
|
3554
|
+
*/
|
|
3555
|
+
getFlow: getFlow(join18(path8)),
|
|
3556
|
+
/**
|
|
3557
|
+
* Returns all flows from EventCatalog
|
|
3558
|
+
*
|
|
3559
|
+
* @param options - optional options to get flows
|
|
3560
|
+
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3561
|
+
* @returns Flow[]|Undefined
|
|
3562
|
+
*/
|
|
3563
|
+
getFlows: getFlows(join18(path8)),
|
|
3515
3564
|
/**
|
|
3516
3565
|
* ================================
|
|
3517
3566
|
* Data Stores
|