@eventcatalog/sdk 2.15.0 → 2.16.0
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/index.d.mts +70 -46
- package/dist/index.d.ts +70 -46
- package/dist/index.js +330 -202
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +323 -195
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -794,8 +794,8 @@ var getFiles = async (pattern, ignore = "") => {
|
|
|
794
794
|
);
|
|
795
795
|
}
|
|
796
796
|
};
|
|
797
|
-
var readMdxFile = async (
|
|
798
|
-
const { data } = matter.read(
|
|
797
|
+
var readMdxFile = async (path7) => {
|
|
798
|
+
const { data } = matter.read(path7);
|
|
799
799
|
const { markdown, ...frontmatter } = data;
|
|
800
800
|
return { ...frontmatter, markdown };
|
|
801
801
|
};
|
|
@@ -889,8 +889,8 @@ var writeResource = async (catalogDir, resource, options = {
|
|
|
889
889
|
versionExistingContent: false,
|
|
890
890
|
format: "mdx"
|
|
891
891
|
}) => {
|
|
892
|
-
const
|
|
893
|
-
const fullPath = join2(catalogDir,
|
|
892
|
+
const path7 = options.path || `/${resource.id}`;
|
|
893
|
+
const fullPath = join2(catalogDir, path7);
|
|
894
894
|
const format = options.format || "mdx";
|
|
895
895
|
fsSync2.mkdirSync(fullPath, { recursive: true });
|
|
896
896
|
const lockPath = join2(fullPath, `index.${format}`);
|
|
@@ -1024,16 +1024,16 @@ var rmResourceById = async (catalogDir, id, version, options) => {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
invalidateFileCache();
|
|
1026
1026
|
};
|
|
1027
|
-
var waitForFileRemoval = async (
|
|
1027
|
+
var waitForFileRemoval = async (path7, maxRetries = 50, delay = 10) => {
|
|
1028
1028
|
for (let i = 0; i < maxRetries; i++) {
|
|
1029
1029
|
try {
|
|
1030
|
-
await fs.access(
|
|
1030
|
+
await fs.access(path7);
|
|
1031
1031
|
await new Promise((resolve2) => setTimeout(resolve2, delay));
|
|
1032
1032
|
} catch (error) {
|
|
1033
1033
|
return;
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
throw new Error(`File/directory ${
|
|
1036
|
+
throw new Error(`File/directory ${path7} was not removed after ${maxRetries} attempts`);
|
|
1037
1037
|
};
|
|
1038
1038
|
var addFileToResource = async (catalogDir, id, file, version, options) => {
|
|
1039
1039
|
let pathToResource;
|
|
@@ -1086,8 +1086,8 @@ var writeEventToService = (directory) => async (event, service, options = { path
|
|
|
1086
1086
|
pathForEvent = join3(pathForEvent, event.id);
|
|
1087
1087
|
await writeResource(directory, { ...event }, { ...options, path: pathForEvent, type: "event" });
|
|
1088
1088
|
};
|
|
1089
|
-
var rmEvent = (directory) => async (
|
|
1090
|
-
await fs2.rm(join3(directory,
|
|
1089
|
+
var rmEvent = (directory) => async (path7) => {
|
|
1090
|
+
await fs2.rm(join3(directory, path7), { recursive: true });
|
|
1091
1091
|
invalidateFileCache();
|
|
1092
1092
|
};
|
|
1093
1093
|
var rmEventById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1123,8 +1123,8 @@ var writeCommandToService = (directory) => async (command, service, options = {
|
|
|
1123
1123
|
pathForCommand = join4(pathForCommand, command.id);
|
|
1124
1124
|
await writeResource(directory, { ...command }, { ...options, path: pathForCommand, type: "command" });
|
|
1125
1125
|
};
|
|
1126
|
-
var rmCommand = (directory) => async (
|
|
1127
|
-
await fs3.rm(join4(directory,
|
|
1126
|
+
var rmCommand = (directory) => async (path7) => {
|
|
1127
|
+
await fs3.rm(join4(directory, path7), { recursive: true });
|
|
1128
1128
|
invalidateFileCache();
|
|
1129
1129
|
};
|
|
1130
1130
|
var rmCommandById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "command", persistFiles });
|
|
@@ -1158,8 +1158,8 @@ var writeQueryToService = (directory) => async (query, service, options = { path
|
|
|
1158
1158
|
pathForQuery = join5(pathForQuery, query.id);
|
|
1159
1159
|
await writeResource(directory, { ...query }, { ...options, path: pathForQuery, type: "query" });
|
|
1160
1160
|
};
|
|
1161
|
-
var rmQuery = (directory) => async (
|
|
1162
|
-
await fs4.rm(join5(directory,
|
|
1161
|
+
var rmQuery = (directory) => async (path7) => {
|
|
1162
|
+
await fs4.rm(join5(directory, path7), { recursive: true });
|
|
1163
1163
|
invalidateFileCache();
|
|
1164
1164
|
};
|
|
1165
1165
|
var rmQueryById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1179,8 +1179,8 @@ var queryHasVersion = (directory) => async (id, version) => {
|
|
|
1179
1179
|
import fs5 from "fs/promises";
|
|
1180
1180
|
import { join as join6, dirname as dirname4, extname, relative as relative2 } from "path";
|
|
1181
1181
|
var getService = (directory) => async (id, version) => getResource(directory, id, version, { type: "service" });
|
|
1182
|
-
var getServiceByPath = (directory) => async (
|
|
1183
|
-
const service = await getResource(directory, void 0, void 0, { type: "service" },
|
|
1182
|
+
var getServiceByPath = (directory) => async (path7) => {
|
|
1183
|
+
const service = await getResource(directory, void 0, void 0, { type: "service" }, path7);
|
|
1184
1184
|
return service;
|
|
1185
1185
|
};
|
|
1186
1186
|
var getServices = (directory) => async (options) => getResources(directory, {
|
|
@@ -1215,8 +1215,8 @@ var writeService = (directory) => async (service, options = {
|
|
|
1215
1215
|
};
|
|
1216
1216
|
var writeVersionedService = (directory) => async (service) => {
|
|
1217
1217
|
const resource = { ...service };
|
|
1218
|
-
const
|
|
1219
|
-
return await writeService(directory)(resource, { path:
|
|
1218
|
+
const path7 = getVersionedDirectory(service.id, service.version);
|
|
1219
|
+
return await writeService(directory)(resource, { path: path7 });
|
|
1220
1220
|
};
|
|
1221
1221
|
var writeServiceToDomain = (directory) => async (service, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
1222
1222
|
let pathForService = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/services` : `/${domain.id}/services`;
|
|
@@ -1224,8 +1224,8 @@ var writeServiceToDomain = (directory) => async (service, domain, options = { pa
|
|
|
1224
1224
|
await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
|
|
1225
1225
|
};
|
|
1226
1226
|
var versionService = (directory) => async (id) => versionResource(directory, id);
|
|
1227
|
-
var rmService = (directory) => async (
|
|
1228
|
-
await fs5.rm(join6(directory,
|
|
1227
|
+
var rmService = (directory) => async (path7) => {
|
|
1228
|
+
await fs5.rm(join6(directory, path7), { recursive: true });
|
|
1229
1229
|
invalidateFileCache();
|
|
1230
1230
|
};
|
|
1231
1231
|
var rmServiceById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1290,8 +1290,8 @@ var addMessageToService = (directory) => async (id, direction, event, version) =
|
|
|
1290
1290
|
if (!existingResource) {
|
|
1291
1291
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
1292
1292
|
}
|
|
1293
|
-
const
|
|
1294
|
-
const pathToResource = join6(
|
|
1293
|
+
const path7 = existingResource.split(/[\\/]+services/)[0];
|
|
1294
|
+
const pathToResource = join6(path7, "services");
|
|
1295
1295
|
await rmServiceById(directory)(id, version);
|
|
1296
1296
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
1297
1297
|
};
|
|
@@ -1299,9 +1299,9 @@ var serviceHasVersion = (directory) => async (id, version) => {
|
|
|
1299
1299
|
const file = await findFileById(directory, id, version);
|
|
1300
1300
|
return !!file;
|
|
1301
1301
|
};
|
|
1302
|
-
var isService = (directory) => async (
|
|
1303
|
-
const service = await getServiceByPath(directory)(
|
|
1304
|
-
const relativePath = relative2(directory,
|
|
1302
|
+
var isService = (directory) => async (path7) => {
|
|
1303
|
+
const service = await getServiceByPath(directory)(path7);
|
|
1304
|
+
const relativePath = relative2(directory, path7);
|
|
1305
1305
|
const segments = relativePath.split(/[/\\]+/);
|
|
1306
1306
|
return !!service && segments.includes("services");
|
|
1307
1307
|
};
|
|
@@ -1323,8 +1323,8 @@ var addEntityToService = (directory) => async (id, entity, version) => {
|
|
|
1323
1323
|
if (!existingResource) {
|
|
1324
1324
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
1325
1325
|
}
|
|
1326
|
-
const
|
|
1327
|
-
const pathToResource = join6(
|
|
1326
|
+
const path7 = existingResource.split(/[\\/]+services/)[0];
|
|
1327
|
+
const pathToResource = join6(path7, "services");
|
|
1328
1328
|
await rmServiceById(directory)(id, version);
|
|
1329
1329
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
1330
1330
|
};
|
|
@@ -1359,8 +1359,8 @@ var addDataStoreToService = (directory) => async (id, operation, dataStore, vers
|
|
|
1359
1359
|
if (!existingResource) {
|
|
1360
1360
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
1361
1361
|
}
|
|
1362
|
-
const
|
|
1363
|
-
const pathToResource = join6(
|
|
1362
|
+
const path7 = existingResource.split(/[\\/]+services/)[0];
|
|
1363
|
+
const pathToResource = join6(path7, "services");
|
|
1364
1364
|
await rmServiceById(directory)(id, version);
|
|
1365
1365
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
1366
1366
|
};
|
|
@@ -1401,8 +1401,8 @@ var writeDomain = (directory) => async (domain, options = {
|
|
|
1401
1401
|
return await writeResource(directory, resource, { ...options, type: "domain" });
|
|
1402
1402
|
};
|
|
1403
1403
|
var versionDomain = (directory) => async (id) => versionResource(directory, id);
|
|
1404
|
-
var rmDomain = (directory) => async (
|
|
1405
|
-
await fs6.rm(join7(directory,
|
|
1404
|
+
var rmDomain = (directory) => async (path7) => {
|
|
1405
|
+
await fs6.rm(join7(directory, path7), { recursive: true });
|
|
1406
1406
|
invalidateFileCache();
|
|
1407
1407
|
};
|
|
1408
1408
|
var rmDomainById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "domain", persistFiles });
|
|
@@ -1533,8 +1533,8 @@ import { join as join8, extname as extname2 } from "path";
|
|
|
1533
1533
|
var getChannel = (directory) => async (id, version) => getResource(directory, id, version, { type: "channel" });
|
|
1534
1534
|
var getChannels = (directory) => async (options) => getResources(directory, { type: "channels", ...options });
|
|
1535
1535
|
var writeChannel = (directory) => async (channel, options = { path: "" }) => writeResource(directory, { ...channel }, { ...options, type: "channel" });
|
|
1536
|
-
var rmChannel = (directory) => async (
|
|
1537
|
-
await fs7.rm(join8(directory,
|
|
1536
|
+
var rmChannel = (directory) => async (path7) => {
|
|
1537
|
+
await fs7.rm(join8(directory, path7), { recursive: true });
|
|
1538
1538
|
invalidateFileCache();
|
|
1539
1539
|
};
|
|
1540
1540
|
var rmChannelById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "channel", persistFiles });
|
|
@@ -1576,8 +1576,8 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
1576
1576
|
if (!existingResource) {
|
|
1577
1577
|
throw new Error(`Cannot find message ${id} in the catalog`);
|
|
1578
1578
|
}
|
|
1579
|
-
const
|
|
1580
|
-
const pathToResource = join8(
|
|
1579
|
+
const path7 = existingResource.split(`/[\\/]+${collection}`)[0];
|
|
1580
|
+
const pathToResource = join8(path7, collection);
|
|
1581
1581
|
await rmMessageById(directory)(_message.id, _message.version, true);
|
|
1582
1582
|
await writeMessage(pathToResource)(message, { format: extension === ".md" ? "md" : "mdx" });
|
|
1583
1583
|
};
|
|
@@ -1586,8 +1586,8 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
1586
1586
|
import { dirname as dirname5 } from "path";
|
|
1587
1587
|
import matter4 from "gray-matter";
|
|
1588
1588
|
import { satisfies as satisfies4, validRange as validRange3 } from "semver";
|
|
1589
|
-
var getMessageBySchemaPath = (directory) => async (
|
|
1590
|
-
const pathToMessage = dirname5(
|
|
1589
|
+
var getMessageBySchemaPath = (directory) => async (path7, options) => {
|
|
1590
|
+
const pathToMessage = dirname5(path7);
|
|
1591
1591
|
try {
|
|
1592
1592
|
const files = await getFiles(`${directory}/${pathToMessage}/index.{md,mdx}`);
|
|
1593
1593
|
if (!files || files.length === 0) {
|
|
@@ -1659,18 +1659,18 @@ var getProducersAndConsumersForMessage = (directory) => async (id, version, opti
|
|
|
1659
1659
|
}
|
|
1660
1660
|
return { producers, consumers };
|
|
1661
1661
|
};
|
|
1662
|
-
var getConsumersOfSchema = (directory) => async (
|
|
1662
|
+
var getConsumersOfSchema = (directory) => async (path7) => {
|
|
1663
1663
|
try {
|
|
1664
|
-
const message = await getMessageBySchemaPath(directory)(
|
|
1664
|
+
const message = await getMessageBySchemaPath(directory)(path7);
|
|
1665
1665
|
const { consumers } = await getProducersAndConsumersForMessage(directory)(message.id, message.version);
|
|
1666
1666
|
return consumers;
|
|
1667
1667
|
} catch (error) {
|
|
1668
1668
|
return [];
|
|
1669
1669
|
}
|
|
1670
1670
|
};
|
|
1671
|
-
var getProducersOfSchema = (directory) => async (
|
|
1671
|
+
var getProducersOfSchema = (directory) => async (path7) => {
|
|
1672
1672
|
try {
|
|
1673
|
-
const message = await getMessageBySchemaPath(directory)(
|
|
1673
|
+
const message = await getMessageBySchemaPath(directory)(path7);
|
|
1674
1674
|
const { producers } = await getProducersAndConsumersForMessage(directory)(message.id, message.version);
|
|
1675
1675
|
return producers;
|
|
1676
1676
|
} catch (error) {
|
|
@@ -1874,8 +1874,8 @@ var filterCollection = (collection, options) => {
|
|
|
1874
1874
|
};
|
|
1875
1875
|
var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
1876
1876
|
try {
|
|
1877
|
-
const
|
|
1878
|
-
const configModule = await import(
|
|
1877
|
+
const path7 = join13(directory, "eventcatalog.config.js");
|
|
1878
|
+
const configModule = await import(path7);
|
|
1879
1879
|
return configModule.default;
|
|
1880
1880
|
} catch (error) {
|
|
1881
1881
|
console.error("Error getting event catalog configuration file", error);
|
|
@@ -1931,8 +1931,96 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
1931
1931
|
};
|
|
1932
1932
|
};
|
|
1933
1933
|
|
|
1934
|
-
// src/
|
|
1934
|
+
// src/changelogs.ts
|
|
1935
|
+
import path6, { dirname as dirname6 } from "path";
|
|
1936
|
+
import fsSync7 from "fs";
|
|
1935
1937
|
import fs11 from "fs/promises";
|
|
1938
|
+
import matter8 from "gray-matter";
|
|
1939
|
+
var writeChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
1940
|
+
const { version, format = "mdx" } = options;
|
|
1941
|
+
const resourceFile = await findFileById(catalogDir, id, version);
|
|
1942
|
+
if (!resourceFile) {
|
|
1943
|
+
throw new Error(`No resource found with id: ${id}${version ? ` and version: ${version}` : ""}`);
|
|
1944
|
+
}
|
|
1945
|
+
const resourceDir = dirname6(resourceFile);
|
|
1946
|
+
const changelogPath = path6.join(resourceDir, `changelog.${format}`);
|
|
1947
|
+
const { markdown, ...frontmatter } = changelog;
|
|
1948
|
+
const fm = { ...frontmatter };
|
|
1949
|
+
if (fm.createdAt instanceof Date) {
|
|
1950
|
+
fm.createdAt = fm.createdAt;
|
|
1951
|
+
}
|
|
1952
|
+
if (!fm.badges || fm.badges.length === 0) {
|
|
1953
|
+
delete fm.badges;
|
|
1954
|
+
}
|
|
1955
|
+
fsSync7.mkdirSync(resourceDir, { recursive: true });
|
|
1956
|
+
const document = matter8.stringify(markdown.trim(), fm);
|
|
1957
|
+
fsSync7.writeFileSync(changelogPath, document);
|
|
1958
|
+
invalidateFileCache();
|
|
1959
|
+
};
|
|
1960
|
+
var appendChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
1961
|
+
const { version, format = "mdx" } = options;
|
|
1962
|
+
const resourceFile = await findFileById(catalogDir, id, version);
|
|
1963
|
+
if (!resourceFile) {
|
|
1964
|
+
throw new Error(`No resource found with id: ${id}${version ? ` and version: ${version}` : ""}`);
|
|
1965
|
+
}
|
|
1966
|
+
const resourceDir = dirname6(resourceFile);
|
|
1967
|
+
const mdxPath = path6.join(resourceDir, "changelog.mdx");
|
|
1968
|
+
const mdPath = path6.join(resourceDir, "changelog.md");
|
|
1969
|
+
const existingPath = fsSync7.existsSync(mdxPath) ? mdxPath : fsSync7.existsSync(mdPath) ? mdPath : void 0;
|
|
1970
|
+
if (!existingPath) {
|
|
1971
|
+
return writeChangelog(catalogDir)(id, changelog, options);
|
|
1972
|
+
}
|
|
1973
|
+
const existing = matter8.read(existingPath);
|
|
1974
|
+
const existingContent = existing.content.trim();
|
|
1975
|
+
const newEntry = changelog.markdown.trim();
|
|
1976
|
+
const combined = `${newEntry}
|
|
1977
|
+
|
|
1978
|
+
---
|
|
1979
|
+
|
|
1980
|
+
${existingContent}`;
|
|
1981
|
+
const fm = { ...existing.data };
|
|
1982
|
+
fm.createdAt = changelog.createdAt;
|
|
1983
|
+
if (changelog.badges && changelog.badges.length > 0) {
|
|
1984
|
+
fm.badges = changelog.badges;
|
|
1985
|
+
} else {
|
|
1986
|
+
delete fm.badges;
|
|
1987
|
+
}
|
|
1988
|
+
const document = matter8.stringify(combined, fm);
|
|
1989
|
+
fsSync7.writeFileSync(existingPath, document);
|
|
1990
|
+
invalidateFileCache();
|
|
1991
|
+
};
|
|
1992
|
+
var getChangelog = (catalogDir) => async (id, options = {}) => {
|
|
1993
|
+
const { version } = options;
|
|
1994
|
+
const resourceFile = await findFileById(catalogDir, id, version);
|
|
1995
|
+
if (!resourceFile) return void 0;
|
|
1996
|
+
const resourceDir = dirname6(resourceFile);
|
|
1997
|
+
const mdxPath = path6.join(resourceDir, "changelog.mdx");
|
|
1998
|
+
const mdPath = path6.join(resourceDir, "changelog.md");
|
|
1999
|
+
const changelogPath = fsSync7.existsSync(mdxPath) ? mdxPath : fsSync7.existsSync(mdPath) ? mdPath : void 0;
|
|
2000
|
+
if (!changelogPath) return void 0;
|
|
2001
|
+
const { data, content } = matter8.read(changelogPath);
|
|
2002
|
+
return { ...data, markdown: content.trim() };
|
|
2003
|
+
};
|
|
2004
|
+
var rmChangelog = (catalogDir) => async (id, options = {}) => {
|
|
2005
|
+
const { version } = options;
|
|
2006
|
+
const resourceFile = await findFileById(catalogDir, id, version);
|
|
2007
|
+
if (!resourceFile) {
|
|
2008
|
+
throw new Error(`No resource found with id: ${id}${version ? ` and version: ${version}` : ""}`);
|
|
2009
|
+
}
|
|
2010
|
+
const resourceDir = dirname6(resourceFile);
|
|
2011
|
+
const mdxPath = path6.join(resourceDir, "changelog.mdx");
|
|
2012
|
+
const mdPath = path6.join(resourceDir, "changelog.md");
|
|
2013
|
+
if (fsSync7.existsSync(mdxPath)) {
|
|
2014
|
+
await fs11.rm(mdxPath);
|
|
2015
|
+
}
|
|
2016
|
+
if (fsSync7.existsSync(mdPath)) {
|
|
2017
|
+
await fs11.rm(mdPath);
|
|
2018
|
+
}
|
|
2019
|
+
invalidateFileCache();
|
|
2020
|
+
};
|
|
2021
|
+
|
|
2022
|
+
// src/entities.ts
|
|
2023
|
+
import fs12 from "fs/promises";
|
|
1936
2024
|
import { join as join14 } from "path";
|
|
1937
2025
|
var getEntity = (directory) => async (id, version) => getResource(directory, id, version, { type: "entity" });
|
|
1938
2026
|
var getEntities = (directory) => async (options) => getResources(directory, { type: "entities", latestOnly: options?.latestOnly });
|
|
@@ -1941,8 +2029,8 @@ var writeEntity = (directory) => async (entity, options = {
|
|
|
1941
2029
|
override: false,
|
|
1942
2030
|
format: "mdx"
|
|
1943
2031
|
}) => writeResource(directory, { ...entity }, { ...options, type: "entity" });
|
|
1944
|
-
var rmEntity = (directory) => async (
|
|
1945
|
-
await
|
|
2032
|
+
var rmEntity = (directory) => async (path7) => {
|
|
2033
|
+
await fs12.rm(join14(directory, path7), { recursive: true });
|
|
1946
2034
|
invalidateFileCache();
|
|
1947
2035
|
};
|
|
1948
2036
|
var rmEntityById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1955,7 +2043,7 @@ var entityHasVersion = (directory) => async (id, version) => {
|
|
|
1955
2043
|
};
|
|
1956
2044
|
|
|
1957
2045
|
// src/containers.ts
|
|
1958
|
-
import
|
|
2046
|
+
import fs13 from "fs/promises";
|
|
1959
2047
|
import { join as join15 } from "path";
|
|
1960
2048
|
var getContainer = (directory) => async (id, version) => getResource(directory, id, version, { type: "container" });
|
|
1961
2049
|
var getContainers = (directory) => async (options) => getResources(directory, { type: "containers", latestOnly: options?.latestOnly });
|
|
@@ -1965,8 +2053,8 @@ var writeContainer = (directory) => async (data, options = {
|
|
|
1965
2053
|
format: "mdx"
|
|
1966
2054
|
}) => writeResource(directory, { ...data }, { ...options, type: "container" });
|
|
1967
2055
|
var versionContainer = (directory) => async (id) => versionResource(directory, id);
|
|
1968
|
-
var rmContainer = (directory) => async (
|
|
1969
|
-
await
|
|
2056
|
+
var rmContainer = (directory) => async (path7) => {
|
|
2057
|
+
await fs13.rm(join15(directory, path7), { recursive: true });
|
|
1970
2058
|
invalidateFileCache();
|
|
1971
2059
|
};
|
|
1972
2060
|
var rmContainerById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1999,7 +2087,7 @@ var addFileToDataStore = addFileToContainer;
|
|
|
1999
2087
|
var writeDataStoreToService = writeContainerToService;
|
|
2000
2088
|
|
|
2001
2089
|
// src/data-products.ts
|
|
2002
|
-
import
|
|
2090
|
+
import fs14 from "fs/promises";
|
|
2003
2091
|
import { join as join16 } from "path";
|
|
2004
2092
|
var getDataProduct = (directory) => async (id, version) => getResource(directory, id, version, { type: "data-product" });
|
|
2005
2093
|
var getDataProducts = (directory) => async (options) => getResources(directory, { type: "data-products", latestOnly: options?.latestOnly });
|
|
@@ -2013,8 +2101,8 @@ var writeDataProductToDomain = (directory) => async (dataProduct, domain, option
|
|
|
2013
2101
|
pathForDataProduct = join16(pathForDataProduct, dataProduct.id);
|
|
2014
2102
|
await writeResource(directory, { ...dataProduct }, { ...options, path: pathForDataProduct, type: "data-product" });
|
|
2015
2103
|
};
|
|
2016
|
-
var rmDataProduct = (directory) => async (
|
|
2017
|
-
await
|
|
2104
|
+
var rmDataProduct = (directory) => async (path7) => {
|
|
2105
|
+
await fs14.rm(join16(directory, path7), { recursive: true });
|
|
2018
2106
|
invalidateFileCache();
|
|
2019
2107
|
};
|
|
2020
2108
|
var rmDataProductById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -2028,7 +2116,7 @@ var dataProductHasVersion = (directory) => async (id, version) => {
|
|
|
2028
2116
|
var addFileToDataProduct = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
2029
2117
|
|
|
2030
2118
|
// src/diagrams.ts
|
|
2031
|
-
import
|
|
2119
|
+
import fs15 from "fs/promises";
|
|
2032
2120
|
import { join as join17 } from "path";
|
|
2033
2121
|
var getDiagram = (directory) => async (id, version) => getResource(directory, id, version, { type: "diagram" });
|
|
2034
2122
|
var getDiagrams = (directory) => async (options) => getResources(directory, { type: "diagrams", latestOnly: options?.latestOnly });
|
|
@@ -2037,8 +2125,8 @@ var writeDiagram = (directory) => async (diagram, options = {
|
|
|
2037
2125
|
override: false,
|
|
2038
2126
|
format: "mdx"
|
|
2039
2127
|
}) => writeResource(directory, { ...diagram }, { ...options, type: "diagram" });
|
|
2040
|
-
var rmDiagram = (directory) => async (
|
|
2041
|
-
await
|
|
2128
|
+
var rmDiagram = (directory) => async (path7) => {
|
|
2129
|
+
await fs15.rm(join17(directory, path7), { recursive: true });
|
|
2042
2130
|
invalidateFileCache();
|
|
2043
2131
|
};
|
|
2044
2132
|
var rmDiagramById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -2052,7 +2140,7 @@ var diagramHasVersion = (directory) => async (id, version) => {
|
|
|
2052
2140
|
var addFileToDiagram = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version, { type: "diagram" });
|
|
2053
2141
|
|
|
2054
2142
|
// src/index.ts
|
|
2055
|
-
var src_default = (
|
|
2143
|
+
var src_default = (path7) => {
|
|
2056
2144
|
return {
|
|
2057
2145
|
/**
|
|
2058
2146
|
* Returns an events from EventCatalog
|
|
@@ -2060,13 +2148,13 @@ var src_default = (path6) => {
|
|
|
2060
2148
|
* @param version - Optional id of the version to get (supports semver)
|
|
2061
2149
|
* @returns Event|Undefined
|
|
2062
2150
|
*/
|
|
2063
|
-
getEvent: getEvent(join18(
|
|
2151
|
+
getEvent: getEvent(join18(path7)),
|
|
2064
2152
|
/**
|
|
2065
2153
|
* Returns all events from EventCatalog
|
|
2066
2154
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2067
2155
|
* @returns Event[]|Undefined
|
|
2068
2156
|
*/
|
|
2069
|
-
getEvents: getEvents(join18(
|
|
2157
|
+
getEvents: getEvents(join18(path7)),
|
|
2070
2158
|
/**
|
|
2071
2159
|
* Adds an event to EventCatalog
|
|
2072
2160
|
*
|
|
@@ -2074,7 +2162,7 @@ var src_default = (path6) => {
|
|
|
2074
2162
|
* @param options - Optional options to write the event
|
|
2075
2163
|
*
|
|
2076
2164
|
*/
|
|
2077
|
-
writeEvent: writeEvent(join18(
|
|
2165
|
+
writeEvent: writeEvent(join18(path7, "events")),
|
|
2078
2166
|
/**
|
|
2079
2167
|
* Adds an event to a service in EventCatalog
|
|
2080
2168
|
*
|
|
@@ -2083,26 +2171,26 @@ var src_default = (path6) => {
|
|
|
2083
2171
|
* @param options - Optional options to write the event
|
|
2084
2172
|
*
|
|
2085
2173
|
*/
|
|
2086
|
-
writeEventToService: writeEventToService(join18(
|
|
2174
|
+
writeEventToService: writeEventToService(join18(path7)),
|
|
2087
2175
|
/**
|
|
2088
2176
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
2089
2177
|
*
|
|
2090
2178
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
2091
2179
|
*
|
|
2092
2180
|
*/
|
|
2093
|
-
rmEvent: rmEvent(join18(
|
|
2181
|
+
rmEvent: rmEvent(join18(path7, "events")),
|
|
2094
2182
|
/**
|
|
2095
2183
|
* Remove an event by an Event id
|
|
2096
2184
|
*
|
|
2097
2185
|
* @param id - The id of the event you want to remove
|
|
2098
2186
|
*
|
|
2099
2187
|
*/
|
|
2100
|
-
rmEventById: rmEventById(join18(
|
|
2188
|
+
rmEventById: rmEventById(join18(path7)),
|
|
2101
2189
|
/**
|
|
2102
2190
|
* Moves a given event id to the version directory
|
|
2103
2191
|
* @param directory
|
|
2104
2192
|
*/
|
|
2105
|
-
versionEvent: versionEvent(join18(
|
|
2193
|
+
versionEvent: versionEvent(join18(path7)),
|
|
2106
2194
|
/**
|
|
2107
2195
|
* Adds a file to the given event
|
|
2108
2196
|
* @param id - The id of the event to add the file to
|
|
@@ -2110,7 +2198,7 @@ var src_default = (path6) => {
|
|
|
2110
2198
|
* @param version - Optional version of the event to add the file to
|
|
2111
2199
|
* @returns
|
|
2112
2200
|
*/
|
|
2113
|
-
addFileToEvent: addFileToEvent(join18(
|
|
2201
|
+
addFileToEvent: addFileToEvent(join18(path7)),
|
|
2114
2202
|
/**
|
|
2115
2203
|
* Adds a schema to the given event
|
|
2116
2204
|
* @param id - The id of the event to add the schema to
|
|
@@ -2118,14 +2206,14 @@ var src_default = (path6) => {
|
|
|
2118
2206
|
* @param version - Optional version of the event to add the schema to
|
|
2119
2207
|
* @returns
|
|
2120
2208
|
*/
|
|
2121
|
-
addSchemaToEvent: addSchemaToEvent(join18(
|
|
2209
|
+
addSchemaToEvent: addSchemaToEvent(join18(path7)),
|
|
2122
2210
|
/**
|
|
2123
2211
|
* Check to see if an event version exists
|
|
2124
2212
|
* @param id - The id of the event
|
|
2125
2213
|
* @param version - The version of the event (supports semver)
|
|
2126
2214
|
* @returns
|
|
2127
2215
|
*/
|
|
2128
|
-
eventHasVersion: eventHasVersion(join18(
|
|
2216
|
+
eventHasVersion: eventHasVersion(join18(path7)),
|
|
2129
2217
|
/**
|
|
2130
2218
|
* ================================
|
|
2131
2219
|
* Commands
|
|
@@ -2137,13 +2225,13 @@ var src_default = (path6) => {
|
|
|
2137
2225
|
* @param version - Optional id of the version to get (supports semver)
|
|
2138
2226
|
* @returns Command|Undefined
|
|
2139
2227
|
*/
|
|
2140
|
-
getCommand: getCommand(join18(
|
|
2228
|
+
getCommand: getCommand(join18(path7)),
|
|
2141
2229
|
/**
|
|
2142
2230
|
* Returns all commands from EventCatalog
|
|
2143
2231
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2144
2232
|
* @returns Command[]|Undefined
|
|
2145
2233
|
*/
|
|
2146
|
-
getCommands: getCommands(join18(
|
|
2234
|
+
getCommands: getCommands(join18(path7)),
|
|
2147
2235
|
/**
|
|
2148
2236
|
* Adds an command to EventCatalog
|
|
2149
2237
|
*
|
|
@@ -2151,7 +2239,7 @@ var src_default = (path6) => {
|
|
|
2151
2239
|
* @param options - Optional options to write the command
|
|
2152
2240
|
*
|
|
2153
2241
|
*/
|
|
2154
|
-
writeCommand: writeCommand(join18(
|
|
2242
|
+
writeCommand: writeCommand(join18(path7, "commands")),
|
|
2155
2243
|
/**
|
|
2156
2244
|
* Adds a command to a service in EventCatalog
|
|
2157
2245
|
*
|
|
@@ -2160,26 +2248,26 @@ var src_default = (path6) => {
|
|
|
2160
2248
|
* @param options - Optional options to write the command
|
|
2161
2249
|
*
|
|
2162
2250
|
*/
|
|
2163
|
-
writeCommandToService: writeCommandToService(join18(
|
|
2251
|
+
writeCommandToService: writeCommandToService(join18(path7)),
|
|
2164
2252
|
/**
|
|
2165
2253
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
2166
2254
|
*
|
|
2167
2255
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
2168
2256
|
*
|
|
2169
2257
|
*/
|
|
2170
|
-
rmCommand: rmCommand(join18(
|
|
2258
|
+
rmCommand: rmCommand(join18(path7, "commands")),
|
|
2171
2259
|
/**
|
|
2172
2260
|
* Remove an command by an Event id
|
|
2173
2261
|
*
|
|
2174
2262
|
* @param id - The id of the command you want to remove
|
|
2175
2263
|
*
|
|
2176
2264
|
*/
|
|
2177
|
-
rmCommandById: rmCommandById(join18(
|
|
2265
|
+
rmCommandById: rmCommandById(join18(path7)),
|
|
2178
2266
|
/**
|
|
2179
2267
|
* Moves a given command id to the version directory
|
|
2180
2268
|
* @param directory
|
|
2181
2269
|
*/
|
|
2182
|
-
versionCommand: versionCommand(join18(
|
|
2270
|
+
versionCommand: versionCommand(join18(path7)),
|
|
2183
2271
|
/**
|
|
2184
2272
|
* Adds a file to the given command
|
|
2185
2273
|
* @param id - The id of the command to add the file to
|
|
@@ -2187,7 +2275,7 @@ var src_default = (path6) => {
|
|
|
2187
2275
|
* @param version - Optional version of the command to add the file to
|
|
2188
2276
|
* @returns
|
|
2189
2277
|
*/
|
|
2190
|
-
addFileToCommand: addFileToCommand(join18(
|
|
2278
|
+
addFileToCommand: addFileToCommand(join18(path7)),
|
|
2191
2279
|
/**
|
|
2192
2280
|
* Adds a schema to the given command
|
|
2193
2281
|
* @param id - The id of the command to add the schema to
|
|
@@ -2195,14 +2283,14 @@ var src_default = (path6) => {
|
|
|
2195
2283
|
* @param version - Optional version of the command to add the schema to
|
|
2196
2284
|
* @returns
|
|
2197
2285
|
*/
|
|
2198
|
-
addSchemaToCommand: addSchemaToCommand(join18(
|
|
2286
|
+
addSchemaToCommand: addSchemaToCommand(join18(path7)),
|
|
2199
2287
|
/**
|
|
2200
2288
|
* Check to see if a command version exists
|
|
2201
2289
|
* @param id - The id of the command
|
|
2202
2290
|
* @param version - The version of the command (supports semver)
|
|
2203
2291
|
* @returns
|
|
2204
2292
|
*/
|
|
2205
|
-
commandHasVersion: commandHasVersion(join18(
|
|
2293
|
+
commandHasVersion: commandHasVersion(join18(path7)),
|
|
2206
2294
|
/**
|
|
2207
2295
|
* ================================
|
|
2208
2296
|
* Queries
|
|
@@ -2214,13 +2302,13 @@ var src_default = (path6) => {
|
|
|
2214
2302
|
* @param version - Optional id of the version to get (supports semver)
|
|
2215
2303
|
* @returns Query|Undefined
|
|
2216
2304
|
*/
|
|
2217
|
-
getQuery: getQuery(join18(
|
|
2305
|
+
getQuery: getQuery(join18(path7)),
|
|
2218
2306
|
/**
|
|
2219
2307
|
* Returns all queries from EventCatalog
|
|
2220
2308
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2221
2309
|
* @returns Query[]|Undefined
|
|
2222
2310
|
*/
|
|
2223
|
-
getQueries: getQueries(join18(
|
|
2311
|
+
getQueries: getQueries(join18(path7)),
|
|
2224
2312
|
/**
|
|
2225
2313
|
* Adds a query to EventCatalog
|
|
2226
2314
|
*
|
|
@@ -2228,7 +2316,7 @@ var src_default = (path6) => {
|
|
|
2228
2316
|
* @param options - Optional options to write the event
|
|
2229
2317
|
*
|
|
2230
2318
|
*/
|
|
2231
|
-
writeQuery: writeQuery(join18(
|
|
2319
|
+
writeQuery: writeQuery(join18(path7, "queries")),
|
|
2232
2320
|
/**
|
|
2233
2321
|
* Adds a query to a service in EventCatalog
|
|
2234
2322
|
*
|
|
@@ -2237,26 +2325,26 @@ var src_default = (path6) => {
|
|
|
2237
2325
|
* @param options - Optional options to write the query
|
|
2238
2326
|
*
|
|
2239
2327
|
*/
|
|
2240
|
-
writeQueryToService: writeQueryToService(join18(
|
|
2328
|
+
writeQueryToService: writeQueryToService(join18(path7)),
|
|
2241
2329
|
/**
|
|
2242
2330
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
2243
2331
|
*
|
|
2244
2332
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
2245
2333
|
*
|
|
2246
2334
|
*/
|
|
2247
|
-
rmQuery: rmQuery(join18(
|
|
2335
|
+
rmQuery: rmQuery(join18(path7, "queries")),
|
|
2248
2336
|
/**
|
|
2249
2337
|
* Remove a query by a Query id
|
|
2250
2338
|
*
|
|
2251
2339
|
* @param id - The id of the query you want to remove
|
|
2252
2340
|
*
|
|
2253
2341
|
*/
|
|
2254
|
-
rmQueryById: rmQueryById(join18(
|
|
2342
|
+
rmQueryById: rmQueryById(join18(path7)),
|
|
2255
2343
|
/**
|
|
2256
2344
|
* Moves a given query id to the version directory
|
|
2257
2345
|
* @param directory
|
|
2258
2346
|
*/
|
|
2259
|
-
versionQuery: versionQuery(join18(
|
|
2347
|
+
versionQuery: versionQuery(join18(path7)),
|
|
2260
2348
|
/**
|
|
2261
2349
|
* Adds a file to the given query
|
|
2262
2350
|
* @param id - The id of the query to add the file to
|
|
@@ -2264,7 +2352,7 @@ var src_default = (path6) => {
|
|
|
2264
2352
|
* @param version - Optional version of the query to add the file to
|
|
2265
2353
|
* @returns
|
|
2266
2354
|
*/
|
|
2267
|
-
addFileToQuery: addFileToQuery(join18(
|
|
2355
|
+
addFileToQuery: addFileToQuery(join18(path7)),
|
|
2268
2356
|
/**
|
|
2269
2357
|
* Adds a schema to the given query
|
|
2270
2358
|
* @param id - The id of the query to add the schema to
|
|
@@ -2272,14 +2360,14 @@ var src_default = (path6) => {
|
|
|
2272
2360
|
* @param version - Optional version of the query to add the schema to
|
|
2273
2361
|
* @returns
|
|
2274
2362
|
*/
|
|
2275
|
-
addSchemaToQuery: addSchemaToQuery(join18(
|
|
2363
|
+
addSchemaToQuery: addSchemaToQuery(join18(path7)),
|
|
2276
2364
|
/**
|
|
2277
2365
|
* Check to see if an query version exists
|
|
2278
2366
|
* @param id - The id of the query
|
|
2279
2367
|
* @param version - The version of the query (supports semver)
|
|
2280
2368
|
* @returns
|
|
2281
2369
|
*/
|
|
2282
|
-
queryHasVersion: queryHasVersion(join18(
|
|
2370
|
+
queryHasVersion: queryHasVersion(join18(path7)),
|
|
2283
2371
|
/**
|
|
2284
2372
|
* ================================
|
|
2285
2373
|
* Channels
|
|
@@ -2291,13 +2379,13 @@ var src_default = (path6) => {
|
|
|
2291
2379
|
* @param version - Optional id of the version to get (supports semver)
|
|
2292
2380
|
* @returns Channel|Undefined
|
|
2293
2381
|
*/
|
|
2294
|
-
getChannel: getChannel(join18(
|
|
2382
|
+
getChannel: getChannel(join18(path7)),
|
|
2295
2383
|
/**
|
|
2296
2384
|
* Returns all channels from EventCatalog
|
|
2297
2385
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2298
2386
|
* @returns Channel[]|Undefined
|
|
2299
2387
|
*/
|
|
2300
|
-
getChannels: getChannels(join18(
|
|
2388
|
+
getChannels: getChannels(join18(path7)),
|
|
2301
2389
|
/**
|
|
2302
2390
|
* Adds an channel to EventCatalog
|
|
2303
2391
|
*
|
|
@@ -2305,33 +2393,33 @@ var src_default = (path6) => {
|
|
|
2305
2393
|
* @param options - Optional options to write the channel
|
|
2306
2394
|
*
|
|
2307
2395
|
*/
|
|
2308
|
-
writeChannel: writeChannel(join18(
|
|
2396
|
+
writeChannel: writeChannel(join18(path7, "channels")),
|
|
2309
2397
|
/**
|
|
2310
2398
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
2311
2399
|
*
|
|
2312
2400
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
2313
2401
|
*
|
|
2314
2402
|
*/
|
|
2315
|
-
rmChannel: rmChannel(join18(
|
|
2403
|
+
rmChannel: rmChannel(join18(path7, "channels")),
|
|
2316
2404
|
/**
|
|
2317
2405
|
* Remove an channel by an Event id
|
|
2318
2406
|
*
|
|
2319
2407
|
* @param id - The id of the channel you want to remove
|
|
2320
2408
|
*
|
|
2321
2409
|
*/
|
|
2322
|
-
rmChannelById: rmChannelById(join18(
|
|
2410
|
+
rmChannelById: rmChannelById(join18(path7)),
|
|
2323
2411
|
/**
|
|
2324
2412
|
* Moves a given channel id to the version directory
|
|
2325
2413
|
* @param directory
|
|
2326
2414
|
*/
|
|
2327
|
-
versionChannel: versionChannel(join18(
|
|
2415
|
+
versionChannel: versionChannel(join18(path7)),
|
|
2328
2416
|
/**
|
|
2329
2417
|
* Check to see if a channel version exists
|
|
2330
2418
|
* @param id - The id of the channel
|
|
2331
2419
|
* @param version - The version of the channel (supports semver)
|
|
2332
2420
|
* @returns
|
|
2333
2421
|
*/
|
|
2334
|
-
channelHasVersion: channelHasVersion(join18(
|
|
2422
|
+
channelHasVersion: channelHasVersion(join18(path7)),
|
|
2335
2423
|
/**
|
|
2336
2424
|
* Add a channel to an event
|
|
2337
2425
|
*
|
|
@@ -2348,7 +2436,7 @@ var src_default = (path6) => {
|
|
|
2348
2436
|
*
|
|
2349
2437
|
* ```
|
|
2350
2438
|
*/
|
|
2351
|
-
addEventToChannel: addMessageToChannel(join18(
|
|
2439
|
+
addEventToChannel: addMessageToChannel(join18(path7), "events"),
|
|
2352
2440
|
/**
|
|
2353
2441
|
* Add a channel to an command
|
|
2354
2442
|
*
|
|
@@ -2365,7 +2453,7 @@ var src_default = (path6) => {
|
|
|
2365
2453
|
*
|
|
2366
2454
|
* ```
|
|
2367
2455
|
*/
|
|
2368
|
-
addCommandToChannel: addMessageToChannel(join18(
|
|
2456
|
+
addCommandToChannel: addMessageToChannel(join18(path7), "commands"),
|
|
2369
2457
|
/**
|
|
2370
2458
|
* Add a channel to an query
|
|
2371
2459
|
*
|
|
@@ -2382,7 +2470,7 @@ var src_default = (path6) => {
|
|
|
2382
2470
|
*
|
|
2383
2471
|
* ```
|
|
2384
2472
|
*/
|
|
2385
|
-
addQueryToChannel: addMessageToChannel(join18(
|
|
2473
|
+
addQueryToChannel: addMessageToChannel(join18(path7), "queries"),
|
|
2386
2474
|
/**
|
|
2387
2475
|
* ================================
|
|
2388
2476
|
* SERVICES
|
|
@@ -2395,14 +2483,14 @@ var src_default = (path6) => {
|
|
|
2395
2483
|
* @param options - Optional options to write the event
|
|
2396
2484
|
*
|
|
2397
2485
|
*/
|
|
2398
|
-
writeService: writeService(join18(
|
|
2486
|
+
writeService: writeService(join18(path7, "services")),
|
|
2399
2487
|
/**
|
|
2400
2488
|
* Adds a versioned service to EventCatalog
|
|
2401
2489
|
*
|
|
2402
2490
|
* @param service - The service to write
|
|
2403
2491
|
*
|
|
2404
2492
|
*/
|
|
2405
|
-
writeVersionedService: writeVersionedService(join18(
|
|
2493
|
+
writeVersionedService: writeVersionedService(join18(path7, "services")),
|
|
2406
2494
|
/**
|
|
2407
2495
|
* Adds a service to a domain in EventCatalog
|
|
2408
2496
|
*
|
|
@@ -2411,45 +2499,45 @@ var src_default = (path6) => {
|
|
|
2411
2499
|
* @param options - Optional options to write the event
|
|
2412
2500
|
*
|
|
2413
2501
|
*/
|
|
2414
|
-
writeServiceToDomain: writeServiceToDomain(join18(
|
|
2502
|
+
writeServiceToDomain: writeServiceToDomain(join18(path7, "domains")),
|
|
2415
2503
|
/**
|
|
2416
2504
|
* Returns a service from EventCatalog
|
|
2417
2505
|
* @param id - The id of the service to retrieve
|
|
2418
2506
|
* @param version - Optional id of the version to get (supports semver)
|
|
2419
2507
|
* @returns Service|Undefined
|
|
2420
2508
|
*/
|
|
2421
|
-
getService: getService(join18(
|
|
2509
|
+
getService: getService(join18(path7)),
|
|
2422
2510
|
/**
|
|
2423
2511
|
* Returns a service from EventCatalog by it's path.
|
|
2424
2512
|
* @param path - The path to the service to retrieve
|
|
2425
2513
|
* @returns Service|Undefined
|
|
2426
2514
|
*/
|
|
2427
|
-
getServiceByPath: getServiceByPath(join18(
|
|
2515
|
+
getServiceByPath: getServiceByPath(join18(path7)),
|
|
2428
2516
|
/**
|
|
2429
2517
|
* Returns all services from EventCatalog
|
|
2430
2518
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2431
2519
|
* @returns Service[]|Undefined
|
|
2432
2520
|
*/
|
|
2433
|
-
getServices: getServices(join18(
|
|
2521
|
+
getServices: getServices(join18(path7)),
|
|
2434
2522
|
/**
|
|
2435
2523
|
* Moves a given service id to the version directory
|
|
2436
2524
|
* @param directory
|
|
2437
2525
|
*/
|
|
2438
|
-
versionService: versionService(join18(
|
|
2526
|
+
versionService: versionService(join18(path7)),
|
|
2439
2527
|
/**
|
|
2440
2528
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
2441
2529
|
*
|
|
2442
2530
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
2443
2531
|
*
|
|
2444
2532
|
*/
|
|
2445
|
-
rmService: rmService(join18(
|
|
2533
|
+
rmService: rmService(join18(path7, "services")),
|
|
2446
2534
|
/**
|
|
2447
2535
|
* Remove an service by an service id
|
|
2448
2536
|
*
|
|
2449
2537
|
* @param id - The id of the service you want to remove
|
|
2450
2538
|
*
|
|
2451
2539
|
*/
|
|
2452
|
-
rmServiceById: rmServiceById(join18(
|
|
2540
|
+
rmServiceById: rmServiceById(join18(path7)),
|
|
2453
2541
|
/**
|
|
2454
2542
|
* Adds a file to the given service
|
|
2455
2543
|
* @param id - The id of the service to add the file to
|
|
@@ -2457,21 +2545,21 @@ var src_default = (path6) => {
|
|
|
2457
2545
|
* @param version - Optional version of the service to add the file to
|
|
2458
2546
|
* @returns
|
|
2459
2547
|
*/
|
|
2460
|
-
addFileToService: addFileToService(join18(
|
|
2548
|
+
addFileToService: addFileToService(join18(path7)),
|
|
2461
2549
|
/**
|
|
2462
2550
|
* Returns the specifications for a given service
|
|
2463
2551
|
* @param id - The id of the service to retrieve the specifications for
|
|
2464
2552
|
* @param version - Optional version of the service
|
|
2465
2553
|
* @returns
|
|
2466
2554
|
*/
|
|
2467
|
-
getSpecificationFilesForService: getSpecificationFilesForService(join18(
|
|
2555
|
+
getSpecificationFilesForService: getSpecificationFilesForService(join18(path7)),
|
|
2468
2556
|
/**
|
|
2469
2557
|
* Check to see if a service version exists
|
|
2470
2558
|
* @param id - The id of the service
|
|
2471
2559
|
* @param version - The version of the service (supports semver)
|
|
2472
2560
|
* @returns
|
|
2473
2561
|
*/
|
|
2474
|
-
serviceHasVersion: serviceHasVersion(join18(
|
|
2562
|
+
serviceHasVersion: serviceHasVersion(join18(path7)),
|
|
2475
2563
|
/**
|
|
2476
2564
|
* Add an event to a service by it's id.
|
|
2477
2565
|
*
|
|
@@ -2491,7 +2579,7 @@ var src_default = (path6) => {
|
|
|
2491
2579
|
*
|
|
2492
2580
|
* ```
|
|
2493
2581
|
*/
|
|
2494
|
-
addEventToService: addMessageToService(join18(
|
|
2582
|
+
addEventToService: addMessageToService(join18(path7)),
|
|
2495
2583
|
/**
|
|
2496
2584
|
* Add a data store to a service by it's id.
|
|
2497
2585
|
*
|
|
@@ -2508,7 +2596,7 @@ var src_default = (path6) => {
|
|
|
2508
2596
|
*
|
|
2509
2597
|
* ```
|
|
2510
2598
|
*/
|
|
2511
|
-
addDataStoreToService: addDataStoreToService(join18(
|
|
2599
|
+
addDataStoreToService: addDataStoreToService(join18(path7)),
|
|
2512
2600
|
/**
|
|
2513
2601
|
* Add a command to a service by it's id.
|
|
2514
2602
|
*
|
|
@@ -2528,7 +2616,7 @@ var src_default = (path6) => {
|
|
|
2528
2616
|
*
|
|
2529
2617
|
* ```
|
|
2530
2618
|
*/
|
|
2531
|
-
addCommandToService: addMessageToService(join18(
|
|
2619
|
+
addCommandToService: addMessageToService(join18(path7)),
|
|
2532
2620
|
/**
|
|
2533
2621
|
* Add a query to a service by it's id.
|
|
2534
2622
|
*
|
|
@@ -2548,7 +2636,7 @@ var src_default = (path6) => {
|
|
|
2548
2636
|
*
|
|
2549
2637
|
* ```
|
|
2550
2638
|
*/
|
|
2551
|
-
addQueryToService: addMessageToService(join18(
|
|
2639
|
+
addQueryToService: addMessageToService(join18(path7)),
|
|
2552
2640
|
/**
|
|
2553
2641
|
* Add an entity to a service by its id.
|
|
2554
2642
|
*
|
|
@@ -2566,7 +2654,7 @@ var src_default = (path6) => {
|
|
|
2566
2654
|
*
|
|
2567
2655
|
* ```
|
|
2568
2656
|
*/
|
|
2569
|
-
addEntityToService: addEntityToService(join18(
|
|
2657
|
+
addEntityToService: addEntityToService(join18(path7)),
|
|
2570
2658
|
/**
|
|
2571
2659
|
* Check to see if a service exists by it's path.
|
|
2572
2660
|
*
|
|
@@ -2583,13 +2671,13 @@ var src_default = (path6) => {
|
|
|
2583
2671
|
* @param path - The path to the service to check
|
|
2584
2672
|
* @returns boolean
|
|
2585
2673
|
*/
|
|
2586
|
-
isService: isService(join18(
|
|
2674
|
+
isService: isService(join18(path7)),
|
|
2587
2675
|
/**
|
|
2588
2676
|
* Converts a file to a service.
|
|
2589
2677
|
* @param file - The file to convert to a service.
|
|
2590
2678
|
* @returns The service.
|
|
2591
2679
|
*/
|
|
2592
|
-
toService: toService(join18(
|
|
2680
|
+
toService: toService(join18(path7)),
|
|
2593
2681
|
/**
|
|
2594
2682
|
* ================================
|
|
2595
2683
|
* Domains
|
|
@@ -2602,39 +2690,39 @@ var src_default = (path6) => {
|
|
|
2602
2690
|
* @param options - Optional options to write the event
|
|
2603
2691
|
*
|
|
2604
2692
|
*/
|
|
2605
|
-
writeDomain: writeDomain(join18(
|
|
2693
|
+
writeDomain: writeDomain(join18(path7, "domains")),
|
|
2606
2694
|
/**
|
|
2607
2695
|
* Returns a domain from EventCatalog
|
|
2608
2696
|
* @param id - The id of the domain to retrieve
|
|
2609
2697
|
* @param version - Optional id of the version to get (supports semver)
|
|
2610
2698
|
* @returns Domain|Undefined
|
|
2611
2699
|
*/
|
|
2612
|
-
getDomain: getDomain(join18(
|
|
2700
|
+
getDomain: getDomain(join18(path7, "domains")),
|
|
2613
2701
|
/**
|
|
2614
2702
|
* Returns all domains from EventCatalog
|
|
2615
2703
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2616
2704
|
* @returns Domain[]|Undefined
|
|
2617
2705
|
*/
|
|
2618
|
-
getDomains: getDomains(join18(
|
|
2706
|
+
getDomains: getDomains(join18(path7)),
|
|
2619
2707
|
/**
|
|
2620
2708
|
* Moves a given domain id to the version directory
|
|
2621
2709
|
* @param directory
|
|
2622
2710
|
*/
|
|
2623
|
-
versionDomain: versionDomain(join18(
|
|
2711
|
+
versionDomain: versionDomain(join18(path7, "domains")),
|
|
2624
2712
|
/**
|
|
2625
2713
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
2626
2714
|
*
|
|
2627
2715
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
2628
2716
|
*
|
|
2629
2717
|
*/
|
|
2630
|
-
rmDomain: rmDomain(join18(
|
|
2718
|
+
rmDomain: rmDomain(join18(path7, "domains")),
|
|
2631
2719
|
/**
|
|
2632
2720
|
* Remove an service by an domain id
|
|
2633
2721
|
*
|
|
2634
2722
|
* @param id - The id of the domain you want to remove
|
|
2635
2723
|
*
|
|
2636
2724
|
*/
|
|
2637
|
-
rmDomainById: rmDomainById(join18(
|
|
2725
|
+
rmDomainById: rmDomainById(join18(path7, "domains")),
|
|
2638
2726
|
/**
|
|
2639
2727
|
* Adds a file to the given domain
|
|
2640
2728
|
* @param id - The id of the domain to add the file to
|
|
@@ -2642,28 +2730,28 @@ var src_default = (path6) => {
|
|
|
2642
2730
|
* @param version - Optional version of the domain to add the file to
|
|
2643
2731
|
* @returns
|
|
2644
2732
|
*/
|
|
2645
|
-
addFileToDomain: addFileToDomain(join18(
|
|
2733
|
+
addFileToDomain: addFileToDomain(join18(path7, "domains")),
|
|
2646
2734
|
/**
|
|
2647
2735
|
* Adds an ubiquitous language dictionary to a domain
|
|
2648
2736
|
* @param id - The id of the domain to add the ubiquitous language to
|
|
2649
2737
|
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
2650
2738
|
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
2651
2739
|
*/
|
|
2652
|
-
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join18(
|
|
2740
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join18(path7, "domains")),
|
|
2653
2741
|
/**
|
|
2654
2742
|
* Get the ubiquitous language dictionary from a domain
|
|
2655
2743
|
* @param id - The id of the domain to get the ubiquitous language from
|
|
2656
2744
|
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
2657
2745
|
* @returns
|
|
2658
2746
|
*/
|
|
2659
|
-
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join18(
|
|
2747
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join18(path7, "domains")),
|
|
2660
2748
|
/**
|
|
2661
2749
|
* Check to see if a domain version exists
|
|
2662
2750
|
* @param id - The id of the domain
|
|
2663
2751
|
* @param version - The version of the domain (supports semver)
|
|
2664
2752
|
* @returns
|
|
2665
2753
|
*/
|
|
2666
|
-
domainHasVersion: domainHasVersion(join18(
|
|
2754
|
+
domainHasVersion: domainHasVersion(join18(path7)),
|
|
2667
2755
|
/**
|
|
2668
2756
|
* Adds a given service to a domain
|
|
2669
2757
|
* @param id - The id of the domain
|
|
@@ -2671,7 +2759,7 @@ var src_default = (path6) => {
|
|
|
2671
2759
|
* @param version - (Optional) The version of the domain to add the service to
|
|
2672
2760
|
* @returns
|
|
2673
2761
|
*/
|
|
2674
|
-
addServiceToDomain: addServiceToDomain(join18(
|
|
2762
|
+
addServiceToDomain: addServiceToDomain(join18(path7, "domains")),
|
|
2675
2763
|
/**
|
|
2676
2764
|
* Adds a given subdomain to a domain
|
|
2677
2765
|
* @param id - The id of the domain
|
|
@@ -2679,7 +2767,7 @@ var src_default = (path6) => {
|
|
|
2679
2767
|
* @param version - (Optional) The version of the domain to add the subdomain to
|
|
2680
2768
|
* @returns
|
|
2681
2769
|
*/
|
|
2682
|
-
addSubDomainToDomain: addSubDomainToDomain(join18(
|
|
2770
|
+
addSubDomainToDomain: addSubDomainToDomain(join18(path7, "domains")),
|
|
2683
2771
|
/**
|
|
2684
2772
|
* Adds an entity to a domain
|
|
2685
2773
|
* @param id - The id of the domain
|
|
@@ -2687,7 +2775,7 @@ var src_default = (path6) => {
|
|
|
2687
2775
|
* @param version - (Optional) The version of the domain to add the entity to
|
|
2688
2776
|
* @returns
|
|
2689
2777
|
*/
|
|
2690
|
-
addEntityToDomain: addEntityToDomain(join18(
|
|
2778
|
+
addEntityToDomain: addEntityToDomain(join18(path7, "domains")),
|
|
2691
2779
|
/**
|
|
2692
2780
|
* Add an event to a domain by its id.
|
|
2693
2781
|
*
|
|
@@ -2705,7 +2793,7 @@ var src_default = (path6) => {
|
|
|
2705
2793
|
*
|
|
2706
2794
|
* ```
|
|
2707
2795
|
*/
|
|
2708
|
-
addEventToDomain: addMessageToDomain(join18(
|
|
2796
|
+
addEventToDomain: addMessageToDomain(join18(path7, "domains")),
|
|
2709
2797
|
/**
|
|
2710
2798
|
* Add a command to a domain by its id.
|
|
2711
2799
|
*
|
|
@@ -2723,7 +2811,7 @@ var src_default = (path6) => {
|
|
|
2723
2811
|
*
|
|
2724
2812
|
* ```
|
|
2725
2813
|
*/
|
|
2726
|
-
addCommandToDomain: addMessageToDomain(join18(
|
|
2814
|
+
addCommandToDomain: addMessageToDomain(join18(path7, "domains")),
|
|
2727
2815
|
/**
|
|
2728
2816
|
* Add a query to a domain by its id.
|
|
2729
2817
|
*
|
|
@@ -2741,7 +2829,7 @@ var src_default = (path6) => {
|
|
|
2741
2829
|
*
|
|
2742
2830
|
* ```
|
|
2743
2831
|
*/
|
|
2744
|
-
addQueryToDomain: addMessageToDomain(join18(
|
|
2832
|
+
addQueryToDomain: addMessageToDomain(join18(path7, "domains")),
|
|
2745
2833
|
/**
|
|
2746
2834
|
* ================================
|
|
2747
2835
|
* Teams
|
|
@@ -2754,25 +2842,25 @@ var src_default = (path6) => {
|
|
|
2754
2842
|
* @param options - Optional options to write the team
|
|
2755
2843
|
*
|
|
2756
2844
|
*/
|
|
2757
|
-
writeTeam: writeTeam(join18(
|
|
2845
|
+
writeTeam: writeTeam(join18(path7, "teams")),
|
|
2758
2846
|
/**
|
|
2759
2847
|
* Returns a team from EventCatalog
|
|
2760
2848
|
* @param id - The id of the team to retrieve
|
|
2761
2849
|
* @returns Team|Undefined
|
|
2762
2850
|
*/
|
|
2763
|
-
getTeam: getTeam(join18(
|
|
2851
|
+
getTeam: getTeam(join18(path7, "teams")),
|
|
2764
2852
|
/**
|
|
2765
2853
|
* Returns all teams from EventCatalog
|
|
2766
2854
|
* @returns Team[]|Undefined
|
|
2767
2855
|
*/
|
|
2768
|
-
getTeams: getTeams(join18(
|
|
2856
|
+
getTeams: getTeams(join18(path7, "teams")),
|
|
2769
2857
|
/**
|
|
2770
2858
|
* Remove a team by the team id
|
|
2771
2859
|
*
|
|
2772
2860
|
* @param id - The id of the team you want to remove
|
|
2773
2861
|
*
|
|
2774
2862
|
*/
|
|
2775
|
-
rmTeamById: rmTeamById(join18(
|
|
2863
|
+
rmTeamById: rmTeamById(join18(path7, "teams")),
|
|
2776
2864
|
/**
|
|
2777
2865
|
* ================================
|
|
2778
2866
|
* Users
|
|
@@ -2785,25 +2873,25 @@ var src_default = (path6) => {
|
|
|
2785
2873
|
* @param options - Optional options to write the user
|
|
2786
2874
|
*
|
|
2787
2875
|
*/
|
|
2788
|
-
writeUser: writeUser(join18(
|
|
2876
|
+
writeUser: writeUser(join18(path7, "users")),
|
|
2789
2877
|
/**
|
|
2790
2878
|
* Returns a user from EventCatalog
|
|
2791
2879
|
* @param id - The id of the user to retrieve
|
|
2792
2880
|
* @returns User|Undefined
|
|
2793
2881
|
*/
|
|
2794
|
-
getUser: getUser(join18(
|
|
2882
|
+
getUser: getUser(join18(path7, "users")),
|
|
2795
2883
|
/**
|
|
2796
2884
|
* Returns all user from EventCatalog
|
|
2797
2885
|
* @returns User[]|Undefined
|
|
2798
2886
|
*/
|
|
2799
|
-
getUsers: getUsers(join18(
|
|
2887
|
+
getUsers: getUsers(join18(path7)),
|
|
2800
2888
|
/**
|
|
2801
2889
|
* Remove a user by the user id
|
|
2802
2890
|
*
|
|
2803
2891
|
* @param id - The id of the user you want to remove
|
|
2804
2892
|
*
|
|
2805
2893
|
*/
|
|
2806
|
-
rmUserById: rmUserById(join18(
|
|
2894
|
+
rmUserById: rmUserById(join18(path7, "users")),
|
|
2807
2895
|
/**
|
|
2808
2896
|
* ================================
|
|
2809
2897
|
* Custom Docs
|
|
@@ -2814,32 +2902,32 @@ var src_default = (path6) => {
|
|
|
2814
2902
|
* @param path - The path to the custom doc to retrieve
|
|
2815
2903
|
* @returns CustomDoc|Undefined
|
|
2816
2904
|
*/
|
|
2817
|
-
getCustomDoc: getCustomDoc(join18(
|
|
2905
|
+
getCustomDoc: getCustomDoc(join18(path7, "docs")),
|
|
2818
2906
|
/**
|
|
2819
2907
|
* Returns all custom docs from EventCatalog
|
|
2820
2908
|
* @param options - Optional options to get custom docs from a specific path
|
|
2821
2909
|
* @returns CustomDoc[]|Undefined
|
|
2822
2910
|
*/
|
|
2823
|
-
getCustomDocs: getCustomDocs(join18(
|
|
2911
|
+
getCustomDocs: getCustomDocs(join18(path7, "docs")),
|
|
2824
2912
|
/**
|
|
2825
2913
|
* Writes a custom doc to EventCatalog
|
|
2826
2914
|
* @param customDoc - The custom doc to write
|
|
2827
2915
|
* @param options - Optional options to write the custom doc
|
|
2828
2916
|
*
|
|
2829
2917
|
*/
|
|
2830
|
-
writeCustomDoc: writeCustomDoc(join18(
|
|
2918
|
+
writeCustomDoc: writeCustomDoc(join18(path7, "docs")),
|
|
2831
2919
|
/**
|
|
2832
2920
|
* Removes a custom doc from EventCatalog
|
|
2833
2921
|
* @param path - The path to the custom doc to remove
|
|
2834
2922
|
*
|
|
2835
2923
|
*/
|
|
2836
|
-
rmCustomDoc: rmCustomDoc(join18(
|
|
2924
|
+
rmCustomDoc: rmCustomDoc(join18(path7, "docs")),
|
|
2837
2925
|
/**
|
|
2838
2926
|
* Dumps the catalog to a JSON file.
|
|
2839
2927
|
* @param directory - The directory to dump the catalog to
|
|
2840
2928
|
* @returns A JSON file with the catalog
|
|
2841
2929
|
*/
|
|
2842
|
-
dumpCatalog: dumpCatalog(join18(
|
|
2930
|
+
dumpCatalog: dumpCatalog(join18(path7)),
|
|
2843
2931
|
/**
|
|
2844
2932
|
* Returns the event catalog configuration file.
|
|
2845
2933
|
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
@@ -2847,7 +2935,47 @@ var src_default = (path6) => {
|
|
|
2847
2935
|
* @param directory - The directory of the catalog.
|
|
2848
2936
|
* @returns A JSON object with the configuration for the event catalog.
|
|
2849
2937
|
*/
|
|
2850
|
-
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join18(
|
|
2938
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join18(path7)),
|
|
2939
|
+
/**
|
|
2940
|
+
* ================================
|
|
2941
|
+
* Changelogs
|
|
2942
|
+
* ================================
|
|
2943
|
+
*/
|
|
2944
|
+
/**
|
|
2945
|
+
* Writes a changelog entry to a resource in EventCatalog
|
|
2946
|
+
*
|
|
2947
|
+
* @param id - The id of the resource to write the changelog to
|
|
2948
|
+
* @param changelog - The changelog entry to write
|
|
2949
|
+
* @param options - Optional options (version, format)
|
|
2950
|
+
*
|
|
2951
|
+
*/
|
|
2952
|
+
writeChangelog: writeChangelog(join18(path7)),
|
|
2953
|
+
/**
|
|
2954
|
+
* Appends a changelog entry to an existing changelog for a resource.
|
|
2955
|
+
* If no changelog exists, one is created.
|
|
2956
|
+
*
|
|
2957
|
+
* @param id - The id of the resource to append the changelog to
|
|
2958
|
+
* @param changelog - The changelog entry to append
|
|
2959
|
+
* @param options - Optional options (version, format)
|
|
2960
|
+
*
|
|
2961
|
+
*/
|
|
2962
|
+
appendChangelog: appendChangelog(join18(path7)),
|
|
2963
|
+
/**
|
|
2964
|
+
* Returns the changelog for a resource in EventCatalog
|
|
2965
|
+
*
|
|
2966
|
+
* @param id - The id of the resource to get the changelog for
|
|
2967
|
+
* @param options - Optional options (version)
|
|
2968
|
+
* @returns Changelog|Undefined
|
|
2969
|
+
*/
|
|
2970
|
+
getChangelog: getChangelog(join18(path7)),
|
|
2971
|
+
/**
|
|
2972
|
+
* Removes the changelog for a resource in EventCatalog
|
|
2973
|
+
*
|
|
2974
|
+
* @param id - The id of the resource to remove the changelog from
|
|
2975
|
+
* @param options - Optional options (version)
|
|
2976
|
+
*
|
|
2977
|
+
*/
|
|
2978
|
+
rmChangelog: rmChangelog(join18(path7)),
|
|
2851
2979
|
/**
|
|
2852
2980
|
* ================================
|
|
2853
2981
|
* Resources Utils
|
|
@@ -2872,33 +3000,33 @@ var src_default = (path6) => {
|
|
|
2872
3000
|
* @param path - The path to the message to retrieve
|
|
2873
3001
|
* @returns Message|Undefined
|
|
2874
3002
|
*/
|
|
2875
|
-
getMessageBySchemaPath: getMessageBySchemaPath(join18(
|
|
3003
|
+
getMessageBySchemaPath: getMessageBySchemaPath(join18(path7)),
|
|
2876
3004
|
/**
|
|
2877
3005
|
* Returns the producers and consumers (services) for a given message
|
|
2878
3006
|
* @param id - The id of the message to get the producers and consumers for
|
|
2879
3007
|
* @param version - Optional version of the message
|
|
2880
3008
|
* @returns { producers: Service[], consumers: Service[] }
|
|
2881
3009
|
*/
|
|
2882
|
-
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join18(
|
|
3010
|
+
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join18(path7)),
|
|
2883
3011
|
/**
|
|
2884
3012
|
* Returns the consumers of a given schema path
|
|
2885
3013
|
* @param path - The path to the schema to get the consumers for
|
|
2886
3014
|
* @returns Service[]
|
|
2887
3015
|
*/
|
|
2888
|
-
getConsumersOfSchema: getConsumersOfSchema(join18(
|
|
3016
|
+
getConsumersOfSchema: getConsumersOfSchema(join18(path7)),
|
|
2889
3017
|
/**
|
|
2890
3018
|
* Returns the producers of a given schema path
|
|
2891
3019
|
* @param path - The path to the schema to get the producers for
|
|
2892
3020
|
* @returns Service[]
|
|
2893
3021
|
*/
|
|
2894
|
-
getProducersOfSchema: getProducersOfSchema(join18(
|
|
3022
|
+
getProducersOfSchema: getProducersOfSchema(join18(path7)),
|
|
2895
3023
|
/**
|
|
2896
3024
|
* Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
|
|
2897
3025
|
* @param id - The id of the resource to get the owners for
|
|
2898
3026
|
* @param version - Optional version of the resource
|
|
2899
3027
|
* @returns { owners: User[] }
|
|
2900
3028
|
*/
|
|
2901
|
-
getOwnersForResource: getOwnersForResource(join18(
|
|
3029
|
+
getOwnersForResource: getOwnersForResource(join18(path7)),
|
|
2902
3030
|
/**
|
|
2903
3031
|
* ================================
|
|
2904
3032
|
* Entities
|
|
@@ -2910,13 +3038,13 @@ var src_default = (path6) => {
|
|
|
2910
3038
|
* @param version - Optional id of the version to get (supports semver)
|
|
2911
3039
|
* @returns Entity|Undefined
|
|
2912
3040
|
*/
|
|
2913
|
-
getEntity: getEntity(join18(
|
|
3041
|
+
getEntity: getEntity(join18(path7)),
|
|
2914
3042
|
/**
|
|
2915
3043
|
* Returns all entities from EventCatalog
|
|
2916
3044
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2917
3045
|
* @returns Entity[]|Undefined
|
|
2918
3046
|
*/
|
|
2919
|
-
getEntities: getEntities(join18(
|
|
3047
|
+
getEntities: getEntities(join18(path7)),
|
|
2920
3048
|
/**
|
|
2921
3049
|
* Adds an entity to EventCatalog
|
|
2922
3050
|
*
|
|
@@ -2924,33 +3052,33 @@ var src_default = (path6) => {
|
|
|
2924
3052
|
* @param options - Optional options to write the entity
|
|
2925
3053
|
*
|
|
2926
3054
|
*/
|
|
2927
|
-
writeEntity: writeEntity(join18(
|
|
3055
|
+
writeEntity: writeEntity(join18(path7, "entities")),
|
|
2928
3056
|
/**
|
|
2929
3057
|
* Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
|
|
2930
3058
|
*
|
|
2931
3059
|
* @param path - The path to your entity, e.g. `/User`
|
|
2932
3060
|
*
|
|
2933
3061
|
*/
|
|
2934
|
-
rmEntity: rmEntity(join18(
|
|
3062
|
+
rmEntity: rmEntity(join18(path7, "entities")),
|
|
2935
3063
|
/**
|
|
2936
3064
|
* Remove an entity by an entity id
|
|
2937
3065
|
*
|
|
2938
3066
|
* @param id - The id of the entity you want to remove
|
|
2939
3067
|
*
|
|
2940
3068
|
*/
|
|
2941
|
-
rmEntityById: rmEntityById(join18(
|
|
3069
|
+
rmEntityById: rmEntityById(join18(path7)),
|
|
2942
3070
|
/**
|
|
2943
3071
|
* Moves a given entity id to the version directory
|
|
2944
3072
|
* @param id - The id of the entity to version
|
|
2945
3073
|
*/
|
|
2946
|
-
versionEntity: versionEntity(join18(
|
|
3074
|
+
versionEntity: versionEntity(join18(path7)),
|
|
2947
3075
|
/**
|
|
2948
3076
|
* Check to see if an entity version exists
|
|
2949
3077
|
* @param id - The id of the entity
|
|
2950
3078
|
* @param version - The version of the entity (supports semver)
|
|
2951
3079
|
* @returns
|
|
2952
3080
|
*/
|
|
2953
|
-
entityHasVersion: entityHasVersion(join18(
|
|
3081
|
+
entityHasVersion: entityHasVersion(join18(path7)),
|
|
2954
3082
|
/**
|
|
2955
3083
|
* ================================
|
|
2956
3084
|
* Data Stores
|
|
@@ -2962,42 +3090,42 @@ var src_default = (path6) => {
|
|
|
2962
3090
|
* @param options - Optional options to write the data store
|
|
2963
3091
|
*
|
|
2964
3092
|
*/
|
|
2965
|
-
writeDataStore: writeDataStore(join18(
|
|
3093
|
+
writeDataStore: writeDataStore(join18(path7, "containers")),
|
|
2966
3094
|
/**
|
|
2967
3095
|
* Returns a data store from EventCatalog
|
|
2968
3096
|
* @param id - The id of the data store to retrieve
|
|
2969
3097
|
* @param version - Optional id of the version to get (supports semver)
|
|
2970
3098
|
* @returns Container|Undefined
|
|
2971
3099
|
*/
|
|
2972
|
-
getDataStore: getDataStore(join18(
|
|
3100
|
+
getDataStore: getDataStore(join18(path7)),
|
|
2973
3101
|
/**
|
|
2974
3102
|
* Returns all data stores from EventCatalog
|
|
2975
3103
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2976
3104
|
* @returns Container[]|Undefined
|
|
2977
3105
|
*/
|
|
2978
|
-
getDataStores: getDataStores(join18(
|
|
3106
|
+
getDataStores: getDataStores(join18(path7)),
|
|
2979
3107
|
/**
|
|
2980
3108
|
* Version a data store by its id
|
|
2981
3109
|
* @param id - The id of the data store to version
|
|
2982
3110
|
*/
|
|
2983
|
-
versionDataStore: versionDataStore(join18(
|
|
3111
|
+
versionDataStore: versionDataStore(join18(path7, "containers")),
|
|
2984
3112
|
/**
|
|
2985
3113
|
* Remove a data store by its path
|
|
2986
3114
|
* @param path - The path to the data store to remove
|
|
2987
3115
|
*/
|
|
2988
|
-
rmDataStore: rmDataStore(join18(
|
|
3116
|
+
rmDataStore: rmDataStore(join18(path7, "containers")),
|
|
2989
3117
|
/**
|
|
2990
3118
|
* Remove a data store by its id
|
|
2991
3119
|
* @param id - The id of the data store to remove
|
|
2992
3120
|
*/
|
|
2993
|
-
rmDataStoreById: rmDataStoreById(join18(
|
|
3121
|
+
rmDataStoreById: rmDataStoreById(join18(path7)),
|
|
2994
3122
|
/**
|
|
2995
3123
|
* Check to see if a data store version exists
|
|
2996
3124
|
* @param id - The id of the data store
|
|
2997
3125
|
* @param version - The version of the data store (supports semver)
|
|
2998
3126
|
* @returns
|
|
2999
3127
|
*/
|
|
3000
|
-
dataStoreHasVersion: dataStoreHasVersion(join18(
|
|
3128
|
+
dataStoreHasVersion: dataStoreHasVersion(join18(path7)),
|
|
3001
3129
|
/**
|
|
3002
3130
|
* Adds a file to a data store by its id
|
|
3003
3131
|
* @param id - The id of the data store to add the file to
|
|
@@ -3005,14 +3133,14 @@ var src_default = (path6) => {
|
|
|
3005
3133
|
* @param version - Optional version of the data store to add the file to
|
|
3006
3134
|
* @returns
|
|
3007
3135
|
*/
|
|
3008
|
-
addFileToDataStore: addFileToDataStore(join18(
|
|
3136
|
+
addFileToDataStore: addFileToDataStore(join18(path7)),
|
|
3009
3137
|
/**
|
|
3010
3138
|
* Writes a data store to a service by its id
|
|
3011
3139
|
* @param dataStore - The data store to write
|
|
3012
3140
|
* @param service - The service to write the data store to
|
|
3013
3141
|
* @returns
|
|
3014
3142
|
*/
|
|
3015
|
-
writeDataStoreToService: writeDataStoreToService(join18(
|
|
3143
|
+
writeDataStoreToService: writeDataStoreToService(join18(path7)),
|
|
3016
3144
|
/**
|
|
3017
3145
|
* ================================
|
|
3018
3146
|
* Data Products
|
|
@@ -3024,7 +3152,7 @@ var src_default = (path6) => {
|
|
|
3024
3152
|
* @param options - Optional options to write the data product
|
|
3025
3153
|
*
|
|
3026
3154
|
*/
|
|
3027
|
-
writeDataProduct: writeDataProduct(join18(
|
|
3155
|
+
writeDataProduct: writeDataProduct(join18(path7, "data-products")),
|
|
3028
3156
|
/**
|
|
3029
3157
|
* Writes a data product to a domain in EventCatalog
|
|
3030
3158
|
* @param dataProduct - The data product to write
|
|
@@ -3032,43 +3160,43 @@ var src_default = (path6) => {
|
|
|
3032
3160
|
* @param options - Optional options to write the data product
|
|
3033
3161
|
*
|
|
3034
3162
|
*/
|
|
3035
|
-
writeDataProductToDomain: writeDataProductToDomain(join18(
|
|
3163
|
+
writeDataProductToDomain: writeDataProductToDomain(join18(path7, "domains")),
|
|
3036
3164
|
/**
|
|
3037
3165
|
* Returns a data product from EventCatalog
|
|
3038
3166
|
* @param id - The id of the data product to retrieve
|
|
3039
3167
|
* @param version - Optional id of the version to get (supports semver)
|
|
3040
3168
|
* @returns DataProduct|Undefined
|
|
3041
3169
|
*/
|
|
3042
|
-
getDataProduct: getDataProduct(join18(
|
|
3170
|
+
getDataProduct: getDataProduct(join18(path7)),
|
|
3043
3171
|
/**
|
|
3044
3172
|
* Returns all data products from EventCatalog
|
|
3045
3173
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3046
3174
|
* @returns DataProduct[]|Undefined
|
|
3047
3175
|
*/
|
|
3048
|
-
getDataProducts: getDataProducts(join18(
|
|
3176
|
+
getDataProducts: getDataProducts(join18(path7)),
|
|
3049
3177
|
/**
|
|
3050
3178
|
* Version a data product by its id
|
|
3051
3179
|
* @param id - The id of the data product to version
|
|
3052
3180
|
*/
|
|
3053
|
-
versionDataProduct: versionDataProduct(join18(
|
|
3181
|
+
versionDataProduct: versionDataProduct(join18(path7)),
|
|
3054
3182
|
/**
|
|
3055
3183
|
* Remove a data product by its path
|
|
3056
3184
|
* @param path - The path to the data product to remove
|
|
3057
3185
|
*/
|
|
3058
|
-
rmDataProduct: rmDataProduct(join18(
|
|
3186
|
+
rmDataProduct: rmDataProduct(join18(path7, "data-products")),
|
|
3059
3187
|
/**
|
|
3060
3188
|
* Remove a data product by its id
|
|
3061
3189
|
* @param id - The id of the data product to remove
|
|
3062
3190
|
* @param version - Optional version of the data product to remove
|
|
3063
3191
|
*/
|
|
3064
|
-
rmDataProductById: rmDataProductById(join18(
|
|
3192
|
+
rmDataProductById: rmDataProductById(join18(path7)),
|
|
3065
3193
|
/**
|
|
3066
3194
|
* Check to see if a data product version exists
|
|
3067
3195
|
* @param id - The id of the data product
|
|
3068
3196
|
* @param version - The version of the data product (supports semver)
|
|
3069
3197
|
* @returns
|
|
3070
3198
|
*/
|
|
3071
|
-
dataProductHasVersion: dataProductHasVersion(join18(
|
|
3199
|
+
dataProductHasVersion: dataProductHasVersion(join18(path7)),
|
|
3072
3200
|
/**
|
|
3073
3201
|
* Adds a file to a data product by its id
|
|
3074
3202
|
* @param id - The id of the data product to add the file to
|
|
@@ -3076,7 +3204,7 @@ var src_default = (path6) => {
|
|
|
3076
3204
|
* @param version - Optional version of the data product to add the file to
|
|
3077
3205
|
* @returns
|
|
3078
3206
|
*/
|
|
3079
|
-
addFileToDataProduct: addFileToDataProduct(join18(
|
|
3207
|
+
addFileToDataProduct: addFileToDataProduct(join18(path7)),
|
|
3080
3208
|
/**
|
|
3081
3209
|
* Adds a data product to a domain
|
|
3082
3210
|
* @param id - The id of the domain
|
|
@@ -3084,7 +3212,7 @@ var src_default = (path6) => {
|
|
|
3084
3212
|
* @param version - (Optional) The version of the domain to add the data product to
|
|
3085
3213
|
* @returns
|
|
3086
3214
|
*/
|
|
3087
|
-
addDataProductToDomain: addDataProductToDomain(join18(
|
|
3215
|
+
addDataProductToDomain: addDataProductToDomain(join18(path7, "domains")),
|
|
3088
3216
|
/**
|
|
3089
3217
|
* ================================
|
|
3090
3218
|
* Diagrams
|
|
@@ -3096,13 +3224,13 @@ var src_default = (path6) => {
|
|
|
3096
3224
|
* @param version - Optional id of the version to get (supports semver)
|
|
3097
3225
|
* @returns Diagram|Undefined
|
|
3098
3226
|
*/
|
|
3099
|
-
getDiagram: getDiagram(join18(
|
|
3227
|
+
getDiagram: getDiagram(join18(path7)),
|
|
3100
3228
|
/**
|
|
3101
3229
|
* Returns all diagrams from EventCatalog
|
|
3102
3230
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3103
3231
|
* @returns Diagram[]|Undefined
|
|
3104
3232
|
*/
|
|
3105
|
-
getDiagrams: getDiagrams(join18(
|
|
3233
|
+
getDiagrams: getDiagrams(join18(path7)),
|
|
3106
3234
|
/**
|
|
3107
3235
|
* Adds a diagram to EventCatalog
|
|
3108
3236
|
*
|
|
@@ -3110,33 +3238,33 @@ var src_default = (path6) => {
|
|
|
3110
3238
|
* @param options - Optional options to write the diagram
|
|
3111
3239
|
*
|
|
3112
3240
|
*/
|
|
3113
|
-
writeDiagram: writeDiagram(join18(
|
|
3241
|
+
writeDiagram: writeDiagram(join18(path7, "diagrams")),
|
|
3114
3242
|
/**
|
|
3115
3243
|
* Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3116
3244
|
*
|
|
3117
3245
|
* @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
|
|
3118
3246
|
*
|
|
3119
3247
|
*/
|
|
3120
|
-
rmDiagram: rmDiagram(join18(
|
|
3248
|
+
rmDiagram: rmDiagram(join18(path7, "diagrams")),
|
|
3121
3249
|
/**
|
|
3122
3250
|
* Remove a diagram by a diagram id
|
|
3123
3251
|
*
|
|
3124
3252
|
* @param id - The id of the diagram you want to remove
|
|
3125
3253
|
*
|
|
3126
3254
|
*/
|
|
3127
|
-
rmDiagramById: rmDiagramById(join18(
|
|
3255
|
+
rmDiagramById: rmDiagramById(join18(path7)),
|
|
3128
3256
|
/**
|
|
3129
3257
|
* Moves a given diagram id to the version directory
|
|
3130
3258
|
* @param id - The id of the diagram to version
|
|
3131
3259
|
*/
|
|
3132
|
-
versionDiagram: versionDiagram(join18(
|
|
3260
|
+
versionDiagram: versionDiagram(join18(path7)),
|
|
3133
3261
|
/**
|
|
3134
3262
|
* Check to see if a diagram version exists
|
|
3135
3263
|
* @param id - The id of the diagram
|
|
3136
3264
|
* @param version - The version of the diagram (supports semver)
|
|
3137
3265
|
* @returns
|
|
3138
3266
|
*/
|
|
3139
|
-
diagramHasVersion: diagramHasVersion(join18(
|
|
3267
|
+
diagramHasVersion: diagramHasVersion(join18(path7)),
|
|
3140
3268
|
/**
|
|
3141
3269
|
* Adds a file to the given diagram
|
|
3142
3270
|
* @param id - The id of the diagram to add the file to
|
|
@@ -3144,7 +3272,7 @@ var src_default = (path6) => {
|
|
|
3144
3272
|
* @param version - Optional version of the diagram to add the file to
|
|
3145
3273
|
* @returns
|
|
3146
3274
|
*/
|
|
3147
|
-
addFileToDiagram: addFileToDiagram(join18(
|
|
3275
|
+
addFileToDiagram: addFileToDiagram(join18(path7)),
|
|
3148
3276
|
/**
|
|
3149
3277
|
* ================================
|
|
3150
3278
|
* DSL
|
|
@@ -3163,18 +3291,18 @@ var src_default = (path6) => {
|
|
|
3163
3291
|
* const dsl = await sdk.toDSL(services, { type: 'service', hydrate: true });
|
|
3164
3292
|
* ```
|
|
3165
3293
|
*/
|
|
3166
|
-
toDSL: toDSL(join18(
|
|
3167
|
-
getEvent: getEvent(join18(
|
|
3168
|
-
getCommand: getCommand(join18(
|
|
3169
|
-
getQuery: getQuery(join18(
|
|
3170
|
-
getService: getService(join18(
|
|
3171
|
-
getServices: getServices(join18(
|
|
3172
|
-
getDomain: getDomain(join18(
|
|
3173
|
-
getChannel: getChannel(join18(
|
|
3174
|
-
getChannels: getChannels(join18(
|
|
3175
|
-
getContainer: getDataStore(join18(
|
|
3176
|
-
getTeam: getTeam(join18(
|
|
3177
|
-
getUser: getUser(join18(
|
|
3294
|
+
toDSL: toDSL(join18(path7), {
|
|
3295
|
+
getEvent: getEvent(join18(path7)),
|
|
3296
|
+
getCommand: getCommand(join18(path7)),
|
|
3297
|
+
getQuery: getQuery(join18(path7)),
|
|
3298
|
+
getService: getService(join18(path7)),
|
|
3299
|
+
getServices: getServices(join18(path7)),
|
|
3300
|
+
getDomain: getDomain(join18(path7, "domains")),
|
|
3301
|
+
getChannel: getChannel(join18(path7)),
|
|
3302
|
+
getChannels: getChannels(join18(path7)),
|
|
3303
|
+
getContainer: getDataStore(join18(path7)),
|
|
3304
|
+
getTeam: getTeam(join18(path7, "teams")),
|
|
3305
|
+
getUser: getUser(join18(path7, "users"))
|
|
3178
3306
|
})
|
|
3179
3307
|
};
|
|
3180
3308
|
};
|