@eventcatalog/sdk 2.23.0 → 2.24.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 +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +353 -322
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +333 -302
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
default: () => src_default
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(src_exports);
|
|
37
|
-
var
|
|
37
|
+
var import_node_path25 = require("path");
|
|
38
38
|
|
|
39
39
|
// src/dsl/utils.ts
|
|
40
40
|
var import_glob = require("glob");
|
|
@@ -829,8 +829,8 @@ var getFiles = async (pattern, ignore = "") => {
|
|
|
829
829
|
);
|
|
830
830
|
}
|
|
831
831
|
};
|
|
832
|
-
var readMdxFile = async (
|
|
833
|
-
const { data } = import_gray_matter.default.read(
|
|
832
|
+
var readMdxFile = async (path9) => {
|
|
833
|
+
const { data } = import_gray_matter.default.read(path9);
|
|
834
834
|
const { markdown, ...frontmatter } = data;
|
|
835
835
|
return { ...frontmatter, markdown };
|
|
836
836
|
};
|
|
@@ -933,8 +933,8 @@ var writeResource = async (catalogDir, resource, options = {
|
|
|
933
933
|
versionExistingContent: false,
|
|
934
934
|
format: "mdx"
|
|
935
935
|
}) => {
|
|
936
|
-
const
|
|
937
|
-
const fullPath = (0, import_path.join)(catalogDir,
|
|
936
|
+
const path9 = options.path || `/${resource.id}`;
|
|
937
|
+
const fullPath = (0, import_path.join)(catalogDir, path9);
|
|
938
938
|
const format = options.format || "mdx";
|
|
939
939
|
import_node_fs2.default.mkdirSync(fullPath, { recursive: true });
|
|
940
940
|
const lockPath = (0, import_path.join)(fullPath, `index.${format}`);
|
|
@@ -1068,16 +1068,16 @@ var rmResourceById = async (catalogDir, id, version, options) => {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
invalidateFileCache();
|
|
1070
1070
|
};
|
|
1071
|
-
var waitForFileRemoval = async (
|
|
1071
|
+
var waitForFileRemoval = async (path9, maxRetries = 50, delay = 10) => {
|
|
1072
1072
|
for (let i = 0; i < maxRetries; i++) {
|
|
1073
1073
|
try {
|
|
1074
|
-
await import_promises.default.access(
|
|
1074
|
+
await import_promises.default.access(path9);
|
|
1075
1075
|
await new Promise((resolve2) => setTimeout(resolve2, delay));
|
|
1076
1076
|
} catch (error) {
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
|
-
throw new Error(`File/directory ${
|
|
1080
|
+
throw new Error(`File/directory ${path9} was not removed after ${maxRetries} attempts`);
|
|
1081
1081
|
};
|
|
1082
1082
|
var addFileToResource = async (catalogDir, id, file, version, options) => {
|
|
1083
1083
|
let pathToResource;
|
|
@@ -1188,8 +1188,8 @@ var writeEventToAgent = (directory) => async (event, agent, options = { path: ""
|
|
|
1188
1188
|
pathForEvent = (0, import_node_path4.join)(pathForEvent, event.id);
|
|
1189
1189
|
await writeResource(directory, { ...event }, { ...options, path: pathForEvent, type: "event" });
|
|
1190
1190
|
};
|
|
1191
|
-
var rmEvent = (directory) => async (
|
|
1192
|
-
await import_promises2.default.rm((0, import_node_path4.join)(directory,
|
|
1191
|
+
var rmEvent = (directory) => async (path9) => {
|
|
1192
|
+
await import_promises2.default.rm((0, import_node_path4.join)(directory, path9), { recursive: true });
|
|
1193
1193
|
invalidateFileCache();
|
|
1194
1194
|
};
|
|
1195
1195
|
var rmEventById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1237,8 +1237,8 @@ var writeCommandToAgent = (directory) => async (command, agent, options = { path
|
|
|
1237
1237
|
pathForCommand = (0, import_node_path5.join)(pathForCommand, command.id);
|
|
1238
1238
|
await writeResource(directory, { ...command }, { ...options, path: pathForCommand, type: "command" });
|
|
1239
1239
|
};
|
|
1240
|
-
var rmCommand = (directory) => async (
|
|
1241
|
-
await import_promises3.default.rm((0, import_node_path5.join)(directory,
|
|
1240
|
+
var rmCommand = (directory) => async (path9) => {
|
|
1241
|
+
await import_promises3.default.rm((0, import_node_path5.join)(directory, path9), { recursive: true });
|
|
1242
1242
|
invalidateFileCache();
|
|
1243
1243
|
};
|
|
1244
1244
|
var rmCommandById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "command", persistFiles });
|
|
@@ -1284,8 +1284,8 @@ var writeQueryToAgent = (directory) => async (query, agent, options = { path: ""
|
|
|
1284
1284
|
pathForQuery = (0, import_node_path6.join)(pathForQuery, query.id);
|
|
1285
1285
|
await writeResource(directory, { ...query }, { ...options, path: pathForQuery, type: "query" });
|
|
1286
1286
|
};
|
|
1287
|
-
var rmQuery = (directory) => async (
|
|
1288
|
-
await import_promises4.default.rm((0, import_node_path6.join)(directory,
|
|
1287
|
+
var rmQuery = (directory) => async (path9) => {
|
|
1288
|
+
await import_promises4.default.rm((0, import_node_path6.join)(directory, path9), { recursive: true });
|
|
1289
1289
|
invalidateFileCache();
|
|
1290
1290
|
};
|
|
1291
1291
|
var rmQueryById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1308,8 +1308,8 @@ var removeExampleFromQuery = (directory) => async (id, fileName, version) => rem
|
|
|
1308
1308
|
var import_promises5 = __toESM(require("fs/promises"));
|
|
1309
1309
|
var import_node_path7 = require("path");
|
|
1310
1310
|
var getService = (directory) => async (id, version) => getResource(directory, id, version, { type: "service" });
|
|
1311
|
-
var getServiceByPath = (directory) => async (
|
|
1312
|
-
const service = await getResource(directory, void 0, void 0, { type: "service" },
|
|
1311
|
+
var getServiceByPath = (directory) => async (path9) => {
|
|
1312
|
+
const service = await getResource(directory, void 0, void 0, { type: "service" }, path9);
|
|
1313
1313
|
return service;
|
|
1314
1314
|
};
|
|
1315
1315
|
var getServices = (directory) => async (options) => getResources(directory, {
|
|
@@ -1344,8 +1344,8 @@ var writeService = (directory) => async (service, options = {
|
|
|
1344
1344
|
};
|
|
1345
1345
|
var writeVersionedService = (directory) => async (service) => {
|
|
1346
1346
|
const resource = { ...service };
|
|
1347
|
-
const
|
|
1348
|
-
return await writeService(directory)(resource, { path:
|
|
1347
|
+
const path9 = getVersionedDirectory(service.id, service.version);
|
|
1348
|
+
return await writeService(directory)(resource, { path: path9 });
|
|
1349
1349
|
};
|
|
1350
1350
|
var writeServiceToDomain = (directory) => async (service, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
1351
1351
|
let pathForService = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/services` : `/${domain.id}/services`;
|
|
@@ -1353,8 +1353,8 @@ var writeServiceToDomain = (directory) => async (service, domain, options = { pa
|
|
|
1353
1353
|
await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
|
|
1354
1354
|
};
|
|
1355
1355
|
var versionService = (directory) => async (id) => versionResource(directory, id);
|
|
1356
|
-
var rmService = (directory) => async (
|
|
1357
|
-
await import_promises5.default.rm((0, import_node_path7.join)(directory,
|
|
1356
|
+
var rmService = (directory) => async (path9) => {
|
|
1357
|
+
await import_promises5.default.rm((0, import_node_path7.join)(directory, path9), { recursive: true });
|
|
1358
1358
|
invalidateFileCache();
|
|
1359
1359
|
};
|
|
1360
1360
|
var rmServiceById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1419,8 +1419,8 @@ var addMessageToService = (directory) => async (id, direction, event, version) =
|
|
|
1419
1419
|
if (!existingResource) {
|
|
1420
1420
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
1421
1421
|
}
|
|
1422
|
-
const
|
|
1423
|
-
const pathToResource = (0, import_node_path7.join)(
|
|
1422
|
+
const path9 = existingResource.split(/[\\/]+services/)[0];
|
|
1423
|
+
const pathToResource = (0, import_node_path7.join)(path9, "services");
|
|
1424
1424
|
await rmServiceById(directory)(id, version, true);
|
|
1425
1425
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
1426
1426
|
};
|
|
@@ -1428,9 +1428,9 @@ var serviceHasVersion = (directory) => async (id, version) => {
|
|
|
1428
1428
|
const file = await findFileById(directory, id, version);
|
|
1429
1429
|
return !!file;
|
|
1430
1430
|
};
|
|
1431
|
-
var isService = (directory) => async (
|
|
1432
|
-
const service = await getServiceByPath(directory)(
|
|
1433
|
-
const relativePath = (0, import_node_path7.relative)(directory,
|
|
1431
|
+
var isService = (directory) => async (path9) => {
|
|
1432
|
+
const service = await getServiceByPath(directory)(path9);
|
|
1433
|
+
const relativePath = (0, import_node_path7.relative)(directory, path9);
|
|
1434
1434
|
const segments = relativePath.split(/[/\\]+/);
|
|
1435
1435
|
return !!service && segments.includes("services");
|
|
1436
1436
|
};
|
|
@@ -1452,8 +1452,8 @@ var addEntityToService = (directory) => async (id, entity, version) => {
|
|
|
1452
1452
|
if (!existingResource) {
|
|
1453
1453
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
1454
1454
|
}
|
|
1455
|
-
const
|
|
1456
|
-
const pathToResource = (0, import_node_path7.join)(
|
|
1455
|
+
const path9 = existingResource.split(/[\\/]+services/)[0];
|
|
1456
|
+
const pathToResource = (0, import_node_path7.join)(path9, "services");
|
|
1457
1457
|
await rmServiceById(directory)(id, version, true);
|
|
1458
1458
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
1459
1459
|
};
|
|
@@ -1488,8 +1488,8 @@ var addDataStoreToService = (directory) => async (id, operation, dataStore, vers
|
|
|
1488
1488
|
if (!existingResource) {
|
|
1489
1489
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
1490
1490
|
}
|
|
1491
|
-
const
|
|
1492
|
-
const pathToResource = (0, import_node_path7.join)(
|
|
1491
|
+
const path9 = existingResource.split(/[\\/]+services/)[0];
|
|
1492
|
+
const pathToResource = (0, import_node_path7.join)(path9, "services");
|
|
1493
1493
|
await rmServiceById(directory)(id, version, true);
|
|
1494
1494
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
1495
1495
|
};
|
|
@@ -1507,8 +1507,8 @@ var rewriteAgent = async (directory, id, agent, version) => {
|
|
|
1507
1507
|
await writeAgent(directory)(agent, { path: agentPath.directory, format: extension === ".md" ? "md" : "mdx" });
|
|
1508
1508
|
};
|
|
1509
1509
|
var getAgent = (directory) => async (id, version) => getResource(directory, id, version, { type: "agent" });
|
|
1510
|
-
var getAgentByPath = (directory) => async (
|
|
1511
|
-
const agent = await getResource(directory, void 0, void 0, { type: "agent" },
|
|
1510
|
+
var getAgentByPath = (directory) => async (path9) => {
|
|
1511
|
+
const agent = await getResource(directory, void 0, void 0, { type: "agent" }, path9);
|
|
1512
1512
|
return agent;
|
|
1513
1513
|
};
|
|
1514
1514
|
var getAgents = (directory) => async (options) => getResources(directory, {
|
|
@@ -1541,8 +1541,8 @@ var writeAgent = (directory) => async (agent, options = {
|
|
|
1541
1541
|
return await writeResource(directory, resource, { ...options, type: "agent" });
|
|
1542
1542
|
};
|
|
1543
1543
|
var writeVersionedAgent = (directory) => async (agent) => {
|
|
1544
|
-
const
|
|
1545
|
-
return await writeAgent(directory)({ ...agent }, { path:
|
|
1544
|
+
const path9 = getVersionedDirectory(agent.id, agent.version);
|
|
1545
|
+
return await writeAgent(directory)({ ...agent }, { path: path9 });
|
|
1546
1546
|
};
|
|
1547
1547
|
var writeAgentToDomain = (directory) => async (agent, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
1548
1548
|
let pathForAgent = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/agents` : `/${domain.id}/agents`;
|
|
@@ -1550,8 +1550,8 @@ var writeAgentToDomain = (directory) => async (agent, domain, options = { path:
|
|
|
1550
1550
|
await writeResource(directory, { ...agent }, { ...options, path: pathForAgent, type: "agent" });
|
|
1551
1551
|
};
|
|
1552
1552
|
var versionAgent = (directory) => async (id) => versionResource(directory, id);
|
|
1553
|
-
var rmAgent = (directory) => async (
|
|
1554
|
-
await import_promises6.default.rm((0, import_node_path8.join)(directory,
|
|
1553
|
+
var rmAgent = (directory) => async (path9) => {
|
|
1554
|
+
await import_promises6.default.rm((0, import_node_path8.join)(directory, path9), { recursive: true });
|
|
1555
1555
|
invalidateFileCache();
|
|
1556
1556
|
};
|
|
1557
1557
|
var rmAgentById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1623,9 +1623,9 @@ var agentHasVersion = (directory) => async (id, version) => {
|
|
|
1623
1623
|
const file = await findFileById(directory, id, version);
|
|
1624
1624
|
return !!file;
|
|
1625
1625
|
};
|
|
1626
|
-
var isAgent = (directory) => async (
|
|
1627
|
-
const agent = await getAgentByPath(directory)(
|
|
1628
|
-
const relativePath = (0, import_node_path8.relative)(directory,
|
|
1626
|
+
var isAgent = (directory) => async (path9) => {
|
|
1627
|
+
const agent = await getAgentByPath(directory)(path9);
|
|
1628
|
+
const relativePath = (0, import_node_path8.relative)(directory, path9);
|
|
1629
1629
|
const segments = relativePath.split(/[/\\]+/);
|
|
1630
1630
|
return !!agent && segments.includes("agents");
|
|
1631
1631
|
};
|
|
@@ -1689,8 +1689,8 @@ var writeDomain = (directory) => async (domain, options = {
|
|
|
1689
1689
|
return await writeResource(directory, resource, { ...options, type: "domain" });
|
|
1690
1690
|
};
|
|
1691
1691
|
var versionDomain = (directory) => async (id) => versionResource(directory, id);
|
|
1692
|
-
var rmDomain = (directory) => async (
|
|
1693
|
-
await import_promises7.default.rm((0, import_node_path9.join)(directory,
|
|
1692
|
+
var rmDomain = (directory) => async (path9) => {
|
|
1693
|
+
await import_promises7.default.rm((0, import_node_path9.join)(directory, path9), { recursive: true });
|
|
1694
1694
|
invalidateFileCache();
|
|
1695
1695
|
};
|
|
1696
1696
|
var rmDomainById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "domain", persistFiles });
|
|
@@ -1835,8 +1835,8 @@ var import_node_path10 = require("path");
|
|
|
1835
1835
|
var getChannel = (directory) => async (id, version) => getResource(directory, id, version, { type: "channel" });
|
|
1836
1836
|
var getChannels = (directory) => async (options) => getResources(directory, { type: "channels", ...options });
|
|
1837
1837
|
var writeChannel = (directory) => async (channel, options = { path: "" }) => writeResource(directory, { ...channel }, { ...options, type: "channel" });
|
|
1838
|
-
var rmChannel = (directory) => async (
|
|
1839
|
-
await import_promises8.default.rm((0, import_node_path10.join)(directory,
|
|
1838
|
+
var rmChannel = (directory) => async (path9) => {
|
|
1839
|
+
await import_promises8.default.rm((0, import_node_path10.join)(directory, path9), { recursive: true });
|
|
1840
1840
|
invalidateFileCache();
|
|
1841
1841
|
};
|
|
1842
1842
|
var rmChannelById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "channel", persistFiles });
|
|
@@ -1878,8 +1878,8 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
1878
1878
|
if (!existingResource) {
|
|
1879
1879
|
throw new Error(`Cannot find message ${id} in the catalog`);
|
|
1880
1880
|
}
|
|
1881
|
-
const
|
|
1882
|
-
const pathToResource = (0, import_node_path10.join)(
|
|
1881
|
+
const path9 = existingResource.split(new RegExp(`[\\\\/]+${collection}`))[0];
|
|
1882
|
+
const pathToResource = (0, import_node_path10.join)(path9, collection);
|
|
1883
1883
|
await rmMessageById(directory)(_message.id, _message.version, true);
|
|
1884
1884
|
await writeMessage(pathToResource)(message, { format: extension === ".md" ? "md" : "mdx" });
|
|
1885
1885
|
};
|
|
@@ -1889,8 +1889,8 @@ var import_node_path11 = require("path");
|
|
|
1889
1889
|
var import_node_fs4 = __toESM(require("fs"));
|
|
1890
1890
|
var import_gray_matter4 = __toESM(require("gray-matter"));
|
|
1891
1891
|
var import_semver5 = require("semver");
|
|
1892
|
-
var getMessageBySchemaPath = (directory) => async (
|
|
1893
|
-
const pathToMessage = (0, import_node_path11.dirname)(
|
|
1892
|
+
var getMessageBySchemaPath = (directory) => async (path9, options) => {
|
|
1893
|
+
const pathToMessage = (0, import_node_path11.dirname)(path9);
|
|
1894
1894
|
try {
|
|
1895
1895
|
const files = await getFiles(`${directory}/${pathToMessage}/index.{md,mdx}`);
|
|
1896
1896
|
if (!files || files.length === 0) {
|
|
@@ -1965,18 +1965,18 @@ var getProducersAndConsumersForMessage = (directory) => async (id, version, opti
|
|
|
1965
1965
|
}
|
|
1966
1966
|
return { producers, consumers };
|
|
1967
1967
|
};
|
|
1968
|
-
var getConsumersOfSchema = (directory) => async (
|
|
1968
|
+
var getConsumersOfSchema = (directory) => async (path9) => {
|
|
1969
1969
|
try {
|
|
1970
|
-
const message = await getMessageBySchemaPath(directory)(
|
|
1970
|
+
const message = await getMessageBySchemaPath(directory)(path9);
|
|
1971
1971
|
const { consumers } = await getProducersAndConsumersForMessage(directory)(message.id, message.version);
|
|
1972
1972
|
return consumers;
|
|
1973
1973
|
} catch (error) {
|
|
1974
1974
|
return [];
|
|
1975
1975
|
}
|
|
1976
1976
|
};
|
|
1977
|
-
var getProducersOfSchema = (directory) => async (
|
|
1977
|
+
var getProducersOfSchema = (directory) => async (path9) => {
|
|
1978
1978
|
try {
|
|
1979
|
-
const message = await getMessageBySchemaPath(directory)(
|
|
1979
|
+
const message = await getMessageBySchemaPath(directory)(path9);
|
|
1980
1980
|
const { producers } = await getProducersAndConsumersForMessage(directory)(message.id, message.version);
|
|
1981
1981
|
return producers;
|
|
1982
1982
|
} catch (error) {
|
|
@@ -2038,18 +2038,49 @@ var rmCustomDoc = (directory) => async (filePath) => {
|
|
|
2038
2038
|
|
|
2039
2039
|
// src/teams.ts
|
|
2040
2040
|
var import_promises10 = __toESM(require("fs/promises"));
|
|
2041
|
-
var
|
|
2042
|
-
var
|
|
2041
|
+
var import_node_fs8 = __toESM(require("fs"));
|
|
2042
|
+
var import_node_path15 = require("path");
|
|
2043
2043
|
var import_gray_matter7 = __toESM(require("gray-matter"));
|
|
2044
|
-
var
|
|
2044
|
+
var import_node_path16 = __toESM(require("path"));
|
|
2045
2045
|
|
|
2046
2046
|
// src/users.ts
|
|
2047
|
-
var
|
|
2048
|
-
var
|
|
2047
|
+
var import_node_fs7 = __toESM(require("fs"));
|
|
2048
|
+
var import_node_path14 = require("path");
|
|
2049
2049
|
var import_gray_matter6 = __toESM(require("gray-matter"));
|
|
2050
|
+
|
|
2051
|
+
// src/internal/directory-store.ts
|
|
2052
|
+
var import_node_fs6 = __toESM(require("fs"));
|
|
2053
|
+
var import_node_path13 = __toESM(require("path"));
|
|
2054
|
+
var DIRECTORY_STORE_PATH = import_node_path13.default.join(".eventcatalog", "store", "directory.json");
|
|
2055
|
+
var getCatalogRoot = (catalogDir, collection) => {
|
|
2056
|
+
return import_node_path13.default.basename(catalogDir) === collection ? import_node_path13.default.dirname(catalogDir) : catalogDir;
|
|
2057
|
+
};
|
|
2058
|
+
var getDirectoryStorePath = (catalogDir, collection) => {
|
|
2059
|
+
return import_node_path13.default.join(getCatalogRoot(catalogDir, collection), DIRECTORY_STORE_PATH);
|
|
2060
|
+
};
|
|
2061
|
+
var readDirectoryStoreResources = (catalogDir, collection) => {
|
|
2062
|
+
const storePath = getDirectoryStorePath(catalogDir, collection);
|
|
2063
|
+
if (!import_node_fs6.default.existsSync(storePath)) return [];
|
|
2064
|
+
try {
|
|
2065
|
+
const store = JSON.parse(import_node_fs6.default.readFileSync(storePath, "utf8"));
|
|
2066
|
+
const resources = store.resources?.[collection];
|
|
2067
|
+
return Array.isArray(resources) ? resources : [];
|
|
2068
|
+
} catch {
|
|
2069
|
+
return [];
|
|
2070
|
+
}
|
|
2071
|
+
};
|
|
2072
|
+
var readDirectoryStoreResource = (catalogDir, collection, id) => {
|
|
2073
|
+
return readDirectoryStoreResources(catalogDir, collection).find((resource) => resource.id === id);
|
|
2074
|
+
};
|
|
2075
|
+
var mergeDirectoryStoreResources = (local, directory) => {
|
|
2076
|
+
const localIds = new Set(local.map((resource) => resource.id));
|
|
2077
|
+
return [...local, ...directory.filter((resource) => !localIds.has(resource.id))];
|
|
2078
|
+
};
|
|
2079
|
+
|
|
2080
|
+
// src/users.ts
|
|
2050
2081
|
var getUser = (catalogDir) => async (id) => {
|
|
2051
2082
|
const files = await getFiles(`${catalogDir}/${id}.{md,mdx}`);
|
|
2052
|
-
if (files.length == 0) return
|
|
2083
|
+
if (files.length == 0) return readDirectoryStoreResource(catalogDir, "users", id);
|
|
2053
2084
|
const file = files[0];
|
|
2054
2085
|
const { data, content } = import_gray_matter6.default.read(file);
|
|
2055
2086
|
return {
|
|
@@ -2062,8 +2093,7 @@ var getUser = (catalogDir) => async (id) => {
|
|
|
2062
2093
|
};
|
|
2063
2094
|
var getUsers = (catalogDir) => async (options) => {
|
|
2064
2095
|
const files = await getFiles(`${catalogDir}/users/*.{md,mdx}`);
|
|
2065
|
-
|
|
2066
|
-
return files.map((file) => {
|
|
2096
|
+
const localUsers = files.map((file) => {
|
|
2067
2097
|
const { data, content } = import_gray_matter6.default.read(file);
|
|
2068
2098
|
return {
|
|
2069
2099
|
...data,
|
|
@@ -2073,6 +2103,7 @@ var getUsers = (catalogDir) => async (options) => {
|
|
|
2073
2103
|
markdown: content.trim()
|
|
2074
2104
|
};
|
|
2075
2105
|
});
|
|
2106
|
+
return mergeDirectoryStoreResources(localUsers, readDirectoryStoreResources(catalogDir, "users"));
|
|
2076
2107
|
};
|
|
2077
2108
|
var writeUser = (catalogDir) => async (user, options = {}) => {
|
|
2078
2109
|
const resource = { ...user };
|
|
@@ -2083,19 +2114,19 @@ var writeUser = (catalogDir) => async (user, options = {}) => {
|
|
|
2083
2114
|
}
|
|
2084
2115
|
const { markdown, ...frontmatter } = resource;
|
|
2085
2116
|
const document = import_gray_matter6.default.stringify(markdown, frontmatter);
|
|
2086
|
-
|
|
2087
|
-
|
|
2117
|
+
import_node_fs7.default.mkdirSync((0, import_node_path14.join)(catalogDir, ""), { recursive: true });
|
|
2118
|
+
import_node_fs7.default.writeFileSync((0, import_node_path14.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
2088
2119
|
invalidateFileCache();
|
|
2089
2120
|
};
|
|
2090
2121
|
var rmUserById = (catalogDir) => async (id) => {
|
|
2091
|
-
|
|
2122
|
+
import_node_fs7.default.rmSync((0, import_node_path14.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
2092
2123
|
invalidateFileCache();
|
|
2093
2124
|
};
|
|
2094
2125
|
|
|
2095
2126
|
// src/teams.ts
|
|
2096
2127
|
var getTeam = (catalogDir) => async (id) => {
|
|
2097
2128
|
const files = await getFiles(`${catalogDir}/${id}.{md,mdx}`);
|
|
2098
|
-
if (files.length == 0) return
|
|
2129
|
+
if (files.length == 0) return readDirectoryStoreResource(catalogDir, "teams", id);
|
|
2099
2130
|
const file = files[0];
|
|
2100
2131
|
const { data, content } = import_gray_matter7.default.read(file);
|
|
2101
2132
|
return {
|
|
@@ -2107,8 +2138,7 @@ var getTeam = (catalogDir) => async (id) => {
|
|
|
2107
2138
|
};
|
|
2108
2139
|
var getTeams = (catalogDir) => async (options) => {
|
|
2109
2140
|
const files = await getFiles(`${catalogDir}/*.{md,mdx}`);
|
|
2110
|
-
|
|
2111
|
-
return files.map((file) => {
|
|
2141
|
+
const localTeams = files.map((file) => {
|
|
2112
2142
|
const { data, content } = import_gray_matter7.default.read(file);
|
|
2113
2143
|
return {
|
|
2114
2144
|
...data,
|
|
@@ -2117,6 +2147,7 @@ var getTeams = (catalogDir) => async (options) => {
|
|
|
2117
2147
|
markdown: content.trim()
|
|
2118
2148
|
};
|
|
2119
2149
|
});
|
|
2150
|
+
return mergeDirectoryStoreResources(localTeams, readDirectoryStoreResources(catalogDir, "teams"));
|
|
2120
2151
|
};
|
|
2121
2152
|
var writeTeam = (catalogDir) => async (team, options = {}) => {
|
|
2122
2153
|
const resource = { ...team };
|
|
@@ -2127,12 +2158,12 @@ var writeTeam = (catalogDir) => async (team, options = {}) => {
|
|
|
2127
2158
|
}
|
|
2128
2159
|
const { markdown, ...frontmatter } = resource;
|
|
2129
2160
|
const document = import_gray_matter7.default.stringify(markdown, frontmatter);
|
|
2130
|
-
|
|
2131
|
-
|
|
2161
|
+
import_node_fs8.default.mkdirSync((0, import_node_path15.join)(catalogDir, ""), { recursive: true });
|
|
2162
|
+
import_node_fs8.default.writeFileSync((0, import_node_path15.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
2132
2163
|
invalidateFileCache();
|
|
2133
2164
|
};
|
|
2134
2165
|
var rmTeamById = (catalogDir) => async (id) => {
|
|
2135
|
-
await import_promises10.default.rm((0,
|
|
2166
|
+
await import_promises10.default.rm((0, import_node_path15.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
2136
2167
|
invalidateFileCache();
|
|
2137
2168
|
};
|
|
2138
2169
|
var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
@@ -2141,11 +2172,11 @@ var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
|
2141
2172
|
if (!resource) return [];
|
|
2142
2173
|
if (!resource.owners) return [];
|
|
2143
2174
|
for (const owner of resource.owners) {
|
|
2144
|
-
const team = await getTeam(
|
|
2175
|
+
const team = await getTeam(import_node_path16.default.join(catalogDir, "teams"))(owner);
|
|
2145
2176
|
if (team) {
|
|
2146
2177
|
owners.push(team);
|
|
2147
2178
|
} else {
|
|
2148
|
-
const user = await getUser(
|
|
2179
|
+
const user = await getUser(import_node_path16.default.join(catalogDir, "users"))(owner);
|
|
2149
2180
|
if (user) {
|
|
2150
2181
|
owners.push(user);
|
|
2151
2182
|
}
|
|
@@ -2156,11 +2187,11 @@ var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
|
2156
2187
|
|
|
2157
2188
|
// src/eventcatalog.ts
|
|
2158
2189
|
var import_fs = __toESM(require("fs"));
|
|
2159
|
-
var
|
|
2190
|
+
var import_node_path17 = __toESM(require("path"));
|
|
2160
2191
|
var DUMP_VERSION = "0.0.1";
|
|
2161
2192
|
var getEventCatalogVersion = async (catalogDir) => {
|
|
2162
2193
|
try {
|
|
2163
|
-
const packageJson = import_fs.default.readFileSync((0,
|
|
2194
|
+
const packageJson = import_fs.default.readFileSync((0, import_node_path17.join)(catalogDir, "package.json"), "utf8");
|
|
2164
2195
|
const packageJsonObject = JSON.parse(packageJson);
|
|
2165
2196
|
return packageJsonObject["dependencies"]["@eventcatalog/core"];
|
|
2166
2197
|
} catch (error) {
|
|
@@ -2173,7 +2204,7 @@ var hydrateResource = async (catalogDir, resources = [], { attachSchema = false
|
|
|
2173
2204
|
const resourcePath = await getResourcePath(catalogDir, resource.id, resource.version);
|
|
2174
2205
|
let schema = "";
|
|
2175
2206
|
if (resource.schemaPath && resourcePath?.fullPath) {
|
|
2176
|
-
const pathToSchema =
|
|
2207
|
+
const pathToSchema = import_node_path17.default.join(import_node_path17.default.dirname(resourcePath?.fullPath), resource.schemaPath);
|
|
2177
2208
|
if (import_fs.default.existsSync(pathToSchema)) {
|
|
2178
2209
|
schema = import_fs.default.readFileSync(pathToSchema, "utf8");
|
|
2179
2210
|
}
|
|
@@ -2194,8 +2225,8 @@ var filterCollection = (collection, options) => {
|
|
|
2194
2225
|
};
|
|
2195
2226
|
var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
2196
2227
|
try {
|
|
2197
|
-
const
|
|
2198
|
-
const configModule = await import(
|
|
2228
|
+
const path9 = (0, import_node_path17.join)(directory, "eventcatalog.config.js");
|
|
2229
|
+
const configModule = await import(path9);
|
|
2199
2230
|
return configModule.default;
|
|
2200
2231
|
} catch (error) {
|
|
2201
2232
|
console.error("Error getting event catalog configuration file", error);
|
|
@@ -2281,8 +2312,8 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2281
2312
|
};
|
|
2282
2313
|
|
|
2283
2314
|
// src/snapshots.ts
|
|
2284
|
-
var
|
|
2285
|
-
var
|
|
2315
|
+
var import_node_fs9 = __toESM(require("fs"));
|
|
2316
|
+
var import_node_path18 = __toESM(require("path"));
|
|
2286
2317
|
var import_node_crypto = require("crypto");
|
|
2287
2318
|
var import_node_child_process = require("child_process");
|
|
2288
2319
|
var import_semver6 = require("semver");
|
|
@@ -2462,7 +2493,7 @@ var computeRelationshipDiff = (snapshotA, snapshotB) => {
|
|
|
2462
2493
|
var SNAPSHOT_VERSION = "1.0.0";
|
|
2463
2494
|
var getEventCatalogVersion2 = (catalogDir) => {
|
|
2464
2495
|
try {
|
|
2465
|
-
const packageJson =
|
|
2496
|
+
const packageJson = import_node_fs9.default.readFileSync(import_node_path18.default.join(catalogDir, "package.json"), "utf8");
|
|
2466
2497
|
const packageJsonObject = JSON.parse(packageJson);
|
|
2467
2498
|
return packageJsonObject["dependencies"]?.["@eventcatalog/core"] ?? "unknown";
|
|
2468
2499
|
} catch {
|
|
@@ -2559,17 +2590,17 @@ var createSnapshot = (directory) => {
|
|
|
2559
2590
|
channels: snapshotChannels
|
|
2560
2591
|
}
|
|
2561
2592
|
};
|
|
2562
|
-
const snapshotsDir = outputDir ||
|
|
2563
|
-
|
|
2593
|
+
const snapshotsDir = outputDir || import_node_path18.default.join(directory, ".snapshots");
|
|
2594
|
+
import_node_fs9.default.mkdirSync(snapshotsDir, { recursive: true });
|
|
2564
2595
|
const fileName = `${snapshotLabel}.snapshot.json`;
|
|
2565
|
-
const filePath =
|
|
2566
|
-
|
|
2596
|
+
const filePath = import_node_path18.default.join(snapshotsDir, fileName);
|
|
2597
|
+
import_node_fs9.default.writeFileSync(filePath, JSON.stringify(snapshot));
|
|
2567
2598
|
return { filePath, snapshot };
|
|
2568
2599
|
};
|
|
2569
2600
|
};
|
|
2570
2601
|
var diffSnapshots = (directory) => async (snapshotAPath, snapshotBPath) => {
|
|
2571
|
-
const snapshotA = JSON.parse(
|
|
2572
|
-
const snapshotB = JSON.parse(
|
|
2602
|
+
const snapshotA = JSON.parse(import_node_fs9.default.readFileSync(snapshotAPath, "utf-8"));
|
|
2603
|
+
const snapshotB = JSON.parse(import_node_fs9.default.readFileSync(snapshotBPath, "utf-8"));
|
|
2573
2604
|
const resourceChanges = computeResourceDiff(snapshotA, snapshotB);
|
|
2574
2605
|
const relationshipChanges = computeRelationshipDiff(snapshotA, snapshotB);
|
|
2575
2606
|
const resourceCounts = { added: 0, removed: 0, modified: 0, versioned: 0 };
|
|
@@ -2593,14 +2624,14 @@ var diffSnapshots = (directory) => async (snapshotAPath, snapshotBPath) => {
|
|
|
2593
2624
|
};
|
|
2594
2625
|
};
|
|
2595
2626
|
var listSnapshots = (directory) => async () => {
|
|
2596
|
-
const snapshotsDir =
|
|
2597
|
-
if (!
|
|
2598
|
-
const files =
|
|
2627
|
+
const snapshotsDir = import_node_path18.default.join(directory, ".snapshots");
|
|
2628
|
+
if (!import_node_fs9.default.existsSync(snapshotsDir)) return [];
|
|
2629
|
+
const files = import_node_fs9.default.readdirSync(snapshotsDir).filter((f) => f.endsWith(".snapshot.json"));
|
|
2599
2630
|
const snapshots = [];
|
|
2600
2631
|
for (const file of files) {
|
|
2601
2632
|
try {
|
|
2602
|
-
const filePath =
|
|
2603
|
-
const content = JSON.parse(
|
|
2633
|
+
const filePath = import_node_path18.default.join(snapshotsDir, file);
|
|
2634
|
+
const content = JSON.parse(import_node_fs9.default.readFileSync(filePath, "utf-8"));
|
|
2604
2635
|
snapshots.push({
|
|
2605
2636
|
label: content.label,
|
|
2606
2637
|
createdAt: content.createdAt,
|
|
@@ -2614,8 +2645,8 @@ var listSnapshots = (directory) => async () => {
|
|
|
2614
2645
|
};
|
|
2615
2646
|
|
|
2616
2647
|
// src/changelogs.ts
|
|
2617
|
-
var
|
|
2618
|
-
var
|
|
2648
|
+
var import_node_path19 = __toESM(require("path"));
|
|
2649
|
+
var import_node_fs10 = __toESM(require("fs"));
|
|
2619
2650
|
var import_promises11 = __toESM(require("fs/promises"));
|
|
2620
2651
|
var import_gray_matter8 = __toESM(require("gray-matter"));
|
|
2621
2652
|
var writeChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
@@ -2624,8 +2655,8 @@ var writeChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
|
2624
2655
|
if (!resourceFile) {
|
|
2625
2656
|
throw new Error(`No resource found with id: ${id}${version ? ` and version: ${version}` : ""}`);
|
|
2626
2657
|
}
|
|
2627
|
-
const resourceDir = (0,
|
|
2628
|
-
const changelogPath =
|
|
2658
|
+
const resourceDir = (0, import_node_path19.dirname)(resourceFile);
|
|
2659
|
+
const changelogPath = import_node_path19.default.join(resourceDir, `changelog.${format}`);
|
|
2629
2660
|
const { markdown, ...frontmatter } = changelog;
|
|
2630
2661
|
const fm = { ...frontmatter };
|
|
2631
2662
|
if (fm.createdAt instanceof Date) {
|
|
@@ -2634,9 +2665,9 @@ var writeChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
|
2634
2665
|
if (!fm.badges || fm.badges.length === 0) {
|
|
2635
2666
|
delete fm.badges;
|
|
2636
2667
|
}
|
|
2637
|
-
|
|
2668
|
+
import_node_fs10.default.mkdirSync(resourceDir, { recursive: true });
|
|
2638
2669
|
const document = import_gray_matter8.default.stringify(markdown.trim(), fm);
|
|
2639
|
-
|
|
2670
|
+
import_node_fs10.default.writeFileSync(changelogPath, document);
|
|
2640
2671
|
invalidateFileCache();
|
|
2641
2672
|
};
|
|
2642
2673
|
var appendChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
@@ -2645,10 +2676,10 @@ var appendChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
|
2645
2676
|
if (!resourceFile) {
|
|
2646
2677
|
throw new Error(`No resource found with id: ${id}${version ? ` and version: ${version}` : ""}`);
|
|
2647
2678
|
}
|
|
2648
|
-
const resourceDir = (0,
|
|
2649
|
-
const mdxPath =
|
|
2650
|
-
const mdPath =
|
|
2651
|
-
const existingPath =
|
|
2679
|
+
const resourceDir = (0, import_node_path19.dirname)(resourceFile);
|
|
2680
|
+
const mdxPath = import_node_path19.default.join(resourceDir, "changelog.mdx");
|
|
2681
|
+
const mdPath = import_node_path19.default.join(resourceDir, "changelog.md");
|
|
2682
|
+
const existingPath = import_node_fs10.default.existsSync(mdxPath) ? mdxPath : import_node_fs10.default.existsSync(mdPath) ? mdPath : void 0;
|
|
2652
2683
|
if (!existingPath) {
|
|
2653
2684
|
return writeChangelog(catalogDir)(id, changelog, options);
|
|
2654
2685
|
}
|
|
@@ -2668,17 +2699,17 @@ ${existingContent}`;
|
|
|
2668
2699
|
delete fm.badges;
|
|
2669
2700
|
}
|
|
2670
2701
|
const document = import_gray_matter8.default.stringify(combined, fm);
|
|
2671
|
-
|
|
2702
|
+
import_node_fs10.default.writeFileSync(existingPath, document);
|
|
2672
2703
|
invalidateFileCache();
|
|
2673
2704
|
};
|
|
2674
2705
|
var getChangelog = (catalogDir) => async (id, options = {}) => {
|
|
2675
2706
|
const { version } = options;
|
|
2676
2707
|
const resourceFile = await findFileById(catalogDir, id, version);
|
|
2677
2708
|
if (!resourceFile) return void 0;
|
|
2678
|
-
const resourceDir = (0,
|
|
2679
|
-
const mdxPath =
|
|
2680
|
-
const mdPath =
|
|
2681
|
-
const changelogPath =
|
|
2709
|
+
const resourceDir = (0, import_node_path19.dirname)(resourceFile);
|
|
2710
|
+
const mdxPath = import_node_path19.default.join(resourceDir, "changelog.mdx");
|
|
2711
|
+
const mdPath = import_node_path19.default.join(resourceDir, "changelog.md");
|
|
2712
|
+
const changelogPath = import_node_fs10.default.existsSync(mdxPath) ? mdxPath : import_node_fs10.default.existsSync(mdPath) ? mdPath : void 0;
|
|
2682
2713
|
if (!changelogPath) return void 0;
|
|
2683
2714
|
const { data, content } = import_gray_matter8.default.read(changelogPath);
|
|
2684
2715
|
return { ...data, markdown: content.trim() };
|
|
@@ -2689,13 +2720,13 @@ var rmChangelog = (catalogDir) => async (id, options = {}) => {
|
|
|
2689
2720
|
if (!resourceFile) {
|
|
2690
2721
|
throw new Error(`No resource found with id: ${id}${version ? ` and version: ${version}` : ""}`);
|
|
2691
2722
|
}
|
|
2692
|
-
const resourceDir = (0,
|
|
2693
|
-
const mdxPath =
|
|
2694
|
-
const mdPath =
|
|
2695
|
-
if (
|
|
2723
|
+
const resourceDir = (0, import_node_path19.dirname)(resourceFile);
|
|
2724
|
+
const mdxPath = import_node_path19.default.join(resourceDir, "changelog.mdx");
|
|
2725
|
+
const mdPath = import_node_path19.default.join(resourceDir, "changelog.md");
|
|
2726
|
+
if (import_node_fs10.default.existsSync(mdxPath)) {
|
|
2696
2727
|
await import_promises11.default.rm(mdxPath);
|
|
2697
2728
|
}
|
|
2698
|
-
if (
|
|
2729
|
+
if (import_node_fs10.default.existsSync(mdPath)) {
|
|
2699
2730
|
await import_promises11.default.rm(mdPath);
|
|
2700
2731
|
}
|
|
2701
2732
|
invalidateFileCache();
|
|
@@ -2703,7 +2734,7 @@ var rmChangelog = (catalogDir) => async (id, options = {}) => {
|
|
|
2703
2734
|
|
|
2704
2735
|
// src/entities.ts
|
|
2705
2736
|
var import_promises12 = __toESM(require("fs/promises"));
|
|
2706
|
-
var
|
|
2737
|
+
var import_node_path20 = require("path");
|
|
2707
2738
|
var getEntity = (directory) => async (id, version) => getResource(directory, id, version, { type: "entity" });
|
|
2708
2739
|
var getEntities = (directory) => async (options) => getResources(directory, { type: "entities", latestOnly: options?.latestOnly });
|
|
2709
2740
|
var writeEntity = (directory) => async (entity, options = {
|
|
@@ -2711,8 +2742,8 @@ var writeEntity = (directory) => async (entity, options = {
|
|
|
2711
2742
|
override: false,
|
|
2712
2743
|
format: "mdx"
|
|
2713
2744
|
}) => writeResource(directory, { ...entity }, { ...options, type: "entity" });
|
|
2714
|
-
var rmEntity = (directory) => async (
|
|
2715
|
-
await import_promises12.default.rm((0,
|
|
2745
|
+
var rmEntity = (directory) => async (path9) => {
|
|
2746
|
+
await import_promises12.default.rm((0, import_node_path20.join)(directory, path9), { recursive: true });
|
|
2716
2747
|
invalidateFileCache();
|
|
2717
2748
|
};
|
|
2718
2749
|
var rmEntityById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -2726,7 +2757,7 @@ var entityHasVersion = (directory) => async (id, version) => {
|
|
|
2726
2757
|
|
|
2727
2758
|
// src/flows.ts
|
|
2728
2759
|
var import_promises13 = __toESM(require("fs/promises"));
|
|
2729
|
-
var
|
|
2760
|
+
var import_node_path21 = require("path");
|
|
2730
2761
|
|
|
2731
2762
|
// src/flow-builder.ts
|
|
2732
2763
|
var cloneStep = (step) => ({
|
|
@@ -3203,26 +3234,26 @@ var writeFlow = (directory) => async (flow, options = {
|
|
|
3203
3234
|
format: "mdx"
|
|
3204
3235
|
}) => writeResource(directory, { ...flow }, { ...options, type: "flow" });
|
|
3205
3236
|
var writeVersionedFlow = (directory) => async (flow) => {
|
|
3206
|
-
const
|
|
3207
|
-
return await writeFlow(directory)({ ...flow }, { path:
|
|
3237
|
+
const path9 = getVersionedDirectory(flow.id, flow.version);
|
|
3238
|
+
return await writeFlow(directory)({ ...flow }, { path: path9 });
|
|
3208
3239
|
};
|
|
3209
3240
|
var writeFlowToDomain = (directory) => async (flow, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
3210
3241
|
let pathForFlow = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/flows` : `/${domain.id}/flows`;
|
|
3211
|
-
pathForFlow = (0,
|
|
3242
|
+
pathForFlow = (0, import_node_path21.join)(pathForFlow, flow.id);
|
|
3212
3243
|
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3213
3244
|
};
|
|
3214
3245
|
var writeFlowToService = (directory) => async (flow, service, options = { path: "", format: "mdx", override: false }) => {
|
|
3215
3246
|
let pathForFlow = service.version && service.version !== "latest" ? `/${service.id}/versioned/${service.version}/flows` : `/${service.id}/flows`;
|
|
3216
|
-
pathForFlow = (0,
|
|
3247
|
+
pathForFlow = (0, import_node_path21.join)(pathForFlow, flow.id);
|
|
3217
3248
|
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3218
3249
|
};
|
|
3219
3250
|
var writeFlowToAgent = (directory) => async (flow, agent, options = { path: "", format: "mdx", override: false }) => {
|
|
3220
3251
|
let pathForFlow = agent.version && agent.version !== "latest" ? `/${agent.id}/versioned/${agent.version}/flows` : `/${agent.id}/flows`;
|
|
3221
|
-
pathForFlow = (0,
|
|
3252
|
+
pathForFlow = (0, import_node_path21.join)(pathForFlow, flow.id);
|
|
3222
3253
|
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3223
3254
|
};
|
|
3224
|
-
var rmFlow = (directory) => async (
|
|
3225
|
-
await import_promises13.default.rm((0,
|
|
3255
|
+
var rmFlow = (directory) => async (path9) => {
|
|
3256
|
+
await import_promises13.default.rm((0, import_node_path21.join)(directory, path9), { recursive: true });
|
|
3226
3257
|
invalidateFileCache();
|
|
3227
3258
|
};
|
|
3228
3259
|
var rmFlowById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3237,7 +3268,7 @@ var addFileToFlow = (directory) => async (id, file, version) => addFileToResourc
|
|
|
3237
3268
|
|
|
3238
3269
|
// src/containers.ts
|
|
3239
3270
|
var import_promises14 = __toESM(require("fs/promises"));
|
|
3240
|
-
var
|
|
3271
|
+
var import_node_path22 = require("path");
|
|
3241
3272
|
var getContainer = (directory) => async (id, version) => getResource(directory, id, version, { type: "container" });
|
|
3242
3273
|
var getContainers = (directory) => async (options) => getResources(directory, { type: "containers", latestOnly: options?.latestOnly });
|
|
3243
3274
|
var writeContainer = (directory) => async (data, options = {
|
|
@@ -3246,8 +3277,8 @@ var writeContainer = (directory) => async (data, options = {
|
|
|
3246
3277
|
format: "mdx"
|
|
3247
3278
|
}) => writeResource(directory, { ...data }, { ...options, type: "container" });
|
|
3248
3279
|
var versionContainer = (directory) => async (id) => versionResource(directory, id);
|
|
3249
|
-
var rmContainer = (directory) => async (
|
|
3250
|
-
await import_promises14.default.rm((0,
|
|
3280
|
+
var rmContainer = (directory) => async (path9) => {
|
|
3281
|
+
await import_promises14.default.rm((0, import_node_path22.join)(directory, path9), { recursive: true });
|
|
3251
3282
|
invalidateFileCache();
|
|
3252
3283
|
};
|
|
3253
3284
|
var rmContainerById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3264,7 +3295,7 @@ var writeContainerToService = (directory) => async (container, service, options
|
|
|
3264
3295
|
throw new Error("Service not found");
|
|
3265
3296
|
}
|
|
3266
3297
|
let pathForContainer = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/containers` : `${resourcePath.directory}/containers`;
|
|
3267
|
-
pathForContainer = (0,
|
|
3298
|
+
pathForContainer = (0, import_node_path22.join)(pathForContainer, container.id);
|
|
3268
3299
|
await writeResource(directory, { ...container }, { ...options, path: pathForContainer, type: "container" });
|
|
3269
3300
|
};
|
|
3270
3301
|
|
|
@@ -3281,7 +3312,7 @@ var writeDataStoreToService = writeContainerToService;
|
|
|
3281
3312
|
|
|
3282
3313
|
// src/data-products.ts
|
|
3283
3314
|
var import_promises15 = __toESM(require("fs/promises"));
|
|
3284
|
-
var
|
|
3315
|
+
var import_node_path23 = require("path");
|
|
3285
3316
|
var getDataProduct = (directory) => async (id, version) => getResource(directory, id, version, { type: "data-product" });
|
|
3286
3317
|
var getDataProducts = (directory) => async (options) => getResources(directory, { type: "data-products", latestOnly: options?.latestOnly });
|
|
3287
3318
|
var writeDataProduct = (directory) => async (dataProduct, options = {
|
|
@@ -3291,11 +3322,11 @@ var writeDataProduct = (directory) => async (dataProduct, options = {
|
|
|
3291
3322
|
}) => writeResource(directory, { ...dataProduct }, { ...options, type: "data-product" });
|
|
3292
3323
|
var writeDataProductToDomain = (directory) => async (dataProduct, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
3293
3324
|
let pathForDataProduct = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/data-products` : `/${domain.id}/data-products`;
|
|
3294
|
-
pathForDataProduct = (0,
|
|
3325
|
+
pathForDataProduct = (0, import_node_path23.join)(pathForDataProduct, dataProduct.id);
|
|
3295
3326
|
await writeResource(directory, { ...dataProduct }, { ...options, path: pathForDataProduct, type: "data-product" });
|
|
3296
3327
|
};
|
|
3297
|
-
var rmDataProduct = (directory) => async (
|
|
3298
|
-
await import_promises15.default.rm((0,
|
|
3328
|
+
var rmDataProduct = (directory) => async (path9) => {
|
|
3329
|
+
await import_promises15.default.rm((0, import_node_path23.join)(directory, path9), { recursive: true });
|
|
3299
3330
|
invalidateFileCache();
|
|
3300
3331
|
};
|
|
3301
3332
|
var rmDataProductById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3310,7 +3341,7 @@ var addFileToDataProduct = (directory) => async (id, file, version) => addFileTo
|
|
|
3310
3341
|
|
|
3311
3342
|
// src/diagrams.ts
|
|
3312
3343
|
var import_promises16 = __toESM(require("fs/promises"));
|
|
3313
|
-
var
|
|
3344
|
+
var import_node_path24 = require("path");
|
|
3314
3345
|
var getDiagram = (directory) => async (id, version) => getResource(directory, id, version, { type: "diagram" });
|
|
3315
3346
|
var getDiagrams = (directory) => async (options) => getResources(directory, { type: "diagrams", latestOnly: options?.latestOnly });
|
|
3316
3347
|
var writeDiagram = (directory) => async (diagram, options = {
|
|
@@ -3318,8 +3349,8 @@ var writeDiagram = (directory) => async (diagram, options = {
|
|
|
3318
3349
|
override: false,
|
|
3319
3350
|
format: "mdx"
|
|
3320
3351
|
}) => writeResource(directory, { ...diagram }, { ...options, type: "diagram" });
|
|
3321
|
-
var rmDiagram = (directory) => async (
|
|
3322
|
-
await import_promises16.default.rm((0,
|
|
3352
|
+
var rmDiagram = (directory) => async (path9) => {
|
|
3353
|
+
await import_promises16.default.rm((0, import_node_path24.join)(directory, path9), { recursive: true });
|
|
3323
3354
|
invalidateFileCache();
|
|
3324
3355
|
};
|
|
3325
3356
|
var rmDiagramById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3333,7 +3364,7 @@ var diagramHasVersion = (directory) => async (id, version) => {
|
|
|
3333
3364
|
var addFileToDiagram = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version, { type: "diagram" });
|
|
3334
3365
|
|
|
3335
3366
|
// src/index.ts
|
|
3336
|
-
var src_default = (
|
|
3367
|
+
var src_default = (path9) => {
|
|
3337
3368
|
return {
|
|
3338
3369
|
/**
|
|
3339
3370
|
* Returns an events from EventCatalog
|
|
@@ -3341,13 +3372,13 @@ var src_default = (path8) => {
|
|
|
3341
3372
|
* @param version - Optional id of the version to get (supports semver)
|
|
3342
3373
|
* @returns Event|Undefined
|
|
3343
3374
|
*/
|
|
3344
|
-
getEvent: getEvent((0,
|
|
3375
|
+
getEvent: getEvent((0, import_node_path25.join)(path9)),
|
|
3345
3376
|
/**
|
|
3346
3377
|
* Returns all events from EventCatalog
|
|
3347
3378
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3348
3379
|
* @returns Event[]|Undefined
|
|
3349
3380
|
*/
|
|
3350
|
-
getEvents: getEvents((0,
|
|
3381
|
+
getEvents: getEvents((0, import_node_path25.join)(path9)),
|
|
3351
3382
|
/**
|
|
3352
3383
|
* Adds an event to EventCatalog
|
|
3353
3384
|
*
|
|
@@ -3355,7 +3386,7 @@ var src_default = (path8) => {
|
|
|
3355
3386
|
* @param options - Optional options to write the event
|
|
3356
3387
|
*
|
|
3357
3388
|
*/
|
|
3358
|
-
writeEvent: writeEvent((0,
|
|
3389
|
+
writeEvent: writeEvent((0, import_node_path25.join)(path9, "events")),
|
|
3359
3390
|
/**
|
|
3360
3391
|
* Adds an event to a service in EventCatalog
|
|
3361
3392
|
*
|
|
@@ -3364,7 +3395,7 @@ var src_default = (path8) => {
|
|
|
3364
3395
|
* @param options - Optional options to write the event
|
|
3365
3396
|
*
|
|
3366
3397
|
*/
|
|
3367
|
-
writeEventToService: writeEventToService((0,
|
|
3398
|
+
writeEventToService: writeEventToService((0, import_node_path25.join)(path9)),
|
|
3368
3399
|
/**
|
|
3369
3400
|
* Adds an event to an agent in EventCatalog
|
|
3370
3401
|
*
|
|
@@ -3373,26 +3404,26 @@ var src_default = (path8) => {
|
|
|
3373
3404
|
* @param options - Optional options to write the event
|
|
3374
3405
|
*
|
|
3375
3406
|
*/
|
|
3376
|
-
writeEventToAgent: writeEventToAgent((0,
|
|
3407
|
+
writeEventToAgent: writeEventToAgent((0, import_node_path25.join)(path9)),
|
|
3377
3408
|
/**
|
|
3378
3409
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3379
3410
|
*
|
|
3380
3411
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
3381
3412
|
*
|
|
3382
3413
|
*/
|
|
3383
|
-
rmEvent: rmEvent((0,
|
|
3414
|
+
rmEvent: rmEvent((0, import_node_path25.join)(path9, "events")),
|
|
3384
3415
|
/**
|
|
3385
3416
|
* Remove an event by an Event id
|
|
3386
3417
|
*
|
|
3387
3418
|
* @param id - The id of the event you want to remove
|
|
3388
3419
|
*
|
|
3389
3420
|
*/
|
|
3390
|
-
rmEventById: rmEventById((0,
|
|
3421
|
+
rmEventById: rmEventById((0, import_node_path25.join)(path9)),
|
|
3391
3422
|
/**
|
|
3392
3423
|
* Moves a given event id to the version directory
|
|
3393
3424
|
* @param directory
|
|
3394
3425
|
*/
|
|
3395
|
-
versionEvent: versionEvent((0,
|
|
3426
|
+
versionEvent: versionEvent((0, import_node_path25.join)(path9)),
|
|
3396
3427
|
/**
|
|
3397
3428
|
* Adds a file to the given event
|
|
3398
3429
|
* @param id - The id of the event to add the file to
|
|
@@ -3400,7 +3431,7 @@ var src_default = (path8) => {
|
|
|
3400
3431
|
* @param version - Optional version of the event to add the file to
|
|
3401
3432
|
* @returns
|
|
3402
3433
|
*/
|
|
3403
|
-
addFileToEvent: addFileToEvent((0,
|
|
3434
|
+
addFileToEvent: addFileToEvent((0, import_node_path25.join)(path9)),
|
|
3404
3435
|
/**
|
|
3405
3436
|
* Adds a schema to the given event
|
|
3406
3437
|
* @param id - The id of the event to add the schema to
|
|
@@ -3408,17 +3439,17 @@ var src_default = (path8) => {
|
|
|
3408
3439
|
* @param version - Optional version of the event to add the schema to
|
|
3409
3440
|
* @returns
|
|
3410
3441
|
*/
|
|
3411
|
-
addSchemaToEvent: addSchemaToEvent((0,
|
|
3442
|
+
addSchemaToEvent: addSchemaToEvent((0, import_node_path25.join)(path9)),
|
|
3412
3443
|
/**
|
|
3413
3444
|
* Check to see if an event version exists
|
|
3414
3445
|
* @param id - The id of the event
|
|
3415
3446
|
* @param version - The version of the event (supports semver)
|
|
3416
3447
|
* @returns
|
|
3417
3448
|
*/
|
|
3418
|
-
eventHasVersion: eventHasVersion((0,
|
|
3419
|
-
addExampleToEvent: addExampleToEvent((0,
|
|
3420
|
-
getExamplesFromEvent: getExamplesFromEvent((0,
|
|
3421
|
-
removeExampleFromEvent: removeExampleFromEvent((0,
|
|
3449
|
+
eventHasVersion: eventHasVersion((0, import_node_path25.join)(path9)),
|
|
3450
|
+
addExampleToEvent: addExampleToEvent((0, import_node_path25.join)(path9)),
|
|
3451
|
+
getExamplesFromEvent: getExamplesFromEvent((0, import_node_path25.join)(path9)),
|
|
3452
|
+
removeExampleFromEvent: removeExampleFromEvent((0, import_node_path25.join)(path9)),
|
|
3422
3453
|
/**
|
|
3423
3454
|
* ================================
|
|
3424
3455
|
* Commands
|
|
@@ -3430,13 +3461,13 @@ var src_default = (path8) => {
|
|
|
3430
3461
|
* @param version - Optional id of the version to get (supports semver)
|
|
3431
3462
|
* @returns Command|Undefined
|
|
3432
3463
|
*/
|
|
3433
|
-
getCommand: getCommand((0,
|
|
3464
|
+
getCommand: getCommand((0, import_node_path25.join)(path9)),
|
|
3434
3465
|
/**
|
|
3435
3466
|
* Returns all commands from EventCatalog
|
|
3436
3467
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3437
3468
|
* @returns Command[]|Undefined
|
|
3438
3469
|
*/
|
|
3439
|
-
getCommands: getCommands((0,
|
|
3470
|
+
getCommands: getCommands((0, import_node_path25.join)(path9)),
|
|
3440
3471
|
/**
|
|
3441
3472
|
* Adds an command to EventCatalog
|
|
3442
3473
|
*
|
|
@@ -3444,7 +3475,7 @@ var src_default = (path8) => {
|
|
|
3444
3475
|
* @param options - Optional options to write the command
|
|
3445
3476
|
*
|
|
3446
3477
|
*/
|
|
3447
|
-
writeCommand: writeCommand((0,
|
|
3478
|
+
writeCommand: writeCommand((0, import_node_path25.join)(path9, "commands")),
|
|
3448
3479
|
/**
|
|
3449
3480
|
* Adds a command to a service in EventCatalog
|
|
3450
3481
|
*
|
|
@@ -3453,7 +3484,7 @@ var src_default = (path8) => {
|
|
|
3453
3484
|
* @param options - Optional options to write the command
|
|
3454
3485
|
*
|
|
3455
3486
|
*/
|
|
3456
|
-
writeCommandToService: writeCommandToService((0,
|
|
3487
|
+
writeCommandToService: writeCommandToService((0, import_node_path25.join)(path9)),
|
|
3457
3488
|
/**
|
|
3458
3489
|
* Adds a command to an agent in EventCatalog
|
|
3459
3490
|
*
|
|
@@ -3462,26 +3493,26 @@ var src_default = (path8) => {
|
|
|
3462
3493
|
* @param options - Optional options to write the command
|
|
3463
3494
|
*
|
|
3464
3495
|
*/
|
|
3465
|
-
writeCommandToAgent: writeCommandToAgent((0,
|
|
3496
|
+
writeCommandToAgent: writeCommandToAgent((0, import_node_path25.join)(path9)),
|
|
3466
3497
|
/**
|
|
3467
3498
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3468
3499
|
*
|
|
3469
3500
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
3470
3501
|
*
|
|
3471
3502
|
*/
|
|
3472
|
-
rmCommand: rmCommand((0,
|
|
3503
|
+
rmCommand: rmCommand((0, import_node_path25.join)(path9, "commands")),
|
|
3473
3504
|
/**
|
|
3474
3505
|
* Remove an command by an Event id
|
|
3475
3506
|
*
|
|
3476
3507
|
* @param id - The id of the command you want to remove
|
|
3477
3508
|
*
|
|
3478
3509
|
*/
|
|
3479
|
-
rmCommandById: rmCommandById((0,
|
|
3510
|
+
rmCommandById: rmCommandById((0, import_node_path25.join)(path9)),
|
|
3480
3511
|
/**
|
|
3481
3512
|
* Moves a given command id to the version directory
|
|
3482
3513
|
* @param directory
|
|
3483
3514
|
*/
|
|
3484
|
-
versionCommand: versionCommand((0,
|
|
3515
|
+
versionCommand: versionCommand((0, import_node_path25.join)(path9)),
|
|
3485
3516
|
/**
|
|
3486
3517
|
* Adds a file to the given command
|
|
3487
3518
|
* @param id - The id of the command to add the file to
|
|
@@ -3489,7 +3520,7 @@ var src_default = (path8) => {
|
|
|
3489
3520
|
* @param version - Optional version of the command to add the file to
|
|
3490
3521
|
* @returns
|
|
3491
3522
|
*/
|
|
3492
|
-
addFileToCommand: addFileToCommand((0,
|
|
3523
|
+
addFileToCommand: addFileToCommand((0, import_node_path25.join)(path9)),
|
|
3493
3524
|
/**
|
|
3494
3525
|
* Adds a schema to the given command
|
|
3495
3526
|
* @param id - The id of the command to add the schema to
|
|
@@ -3497,17 +3528,17 @@ var src_default = (path8) => {
|
|
|
3497
3528
|
* @param version - Optional version of the command to add the schema to
|
|
3498
3529
|
* @returns
|
|
3499
3530
|
*/
|
|
3500
|
-
addSchemaToCommand: addSchemaToCommand((0,
|
|
3531
|
+
addSchemaToCommand: addSchemaToCommand((0, import_node_path25.join)(path9)),
|
|
3501
3532
|
/**
|
|
3502
3533
|
* Check to see if a command version exists
|
|
3503
3534
|
* @param id - The id of the command
|
|
3504
3535
|
* @param version - The version of the command (supports semver)
|
|
3505
3536
|
* @returns
|
|
3506
3537
|
*/
|
|
3507
|
-
commandHasVersion: commandHasVersion((0,
|
|
3508
|
-
addExampleToCommand: addExampleToCommand((0,
|
|
3509
|
-
getExamplesFromCommand: getExamplesFromCommand((0,
|
|
3510
|
-
removeExampleFromCommand: removeExampleFromCommand((0,
|
|
3538
|
+
commandHasVersion: commandHasVersion((0, import_node_path25.join)(path9)),
|
|
3539
|
+
addExampleToCommand: addExampleToCommand((0, import_node_path25.join)(path9)),
|
|
3540
|
+
getExamplesFromCommand: getExamplesFromCommand((0, import_node_path25.join)(path9)),
|
|
3541
|
+
removeExampleFromCommand: removeExampleFromCommand((0, import_node_path25.join)(path9)),
|
|
3511
3542
|
/**
|
|
3512
3543
|
* ================================
|
|
3513
3544
|
* Queries
|
|
@@ -3519,13 +3550,13 @@ var src_default = (path8) => {
|
|
|
3519
3550
|
* @param version - Optional id of the version to get (supports semver)
|
|
3520
3551
|
* @returns Query|Undefined
|
|
3521
3552
|
*/
|
|
3522
|
-
getQuery: getQuery((0,
|
|
3553
|
+
getQuery: getQuery((0, import_node_path25.join)(path9)),
|
|
3523
3554
|
/**
|
|
3524
3555
|
* Returns all queries from EventCatalog
|
|
3525
3556
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3526
3557
|
* @returns Query[]|Undefined
|
|
3527
3558
|
*/
|
|
3528
|
-
getQueries: getQueries((0,
|
|
3559
|
+
getQueries: getQueries((0, import_node_path25.join)(path9)),
|
|
3529
3560
|
/**
|
|
3530
3561
|
* Adds a query to EventCatalog
|
|
3531
3562
|
*
|
|
@@ -3533,7 +3564,7 @@ var src_default = (path8) => {
|
|
|
3533
3564
|
* @param options - Optional options to write the event
|
|
3534
3565
|
*
|
|
3535
3566
|
*/
|
|
3536
|
-
writeQuery: writeQuery((0,
|
|
3567
|
+
writeQuery: writeQuery((0, import_node_path25.join)(path9, "queries")),
|
|
3537
3568
|
/**
|
|
3538
3569
|
* Adds a query to a service in EventCatalog
|
|
3539
3570
|
*
|
|
@@ -3542,7 +3573,7 @@ var src_default = (path8) => {
|
|
|
3542
3573
|
* @param options - Optional options to write the query
|
|
3543
3574
|
*
|
|
3544
3575
|
*/
|
|
3545
|
-
writeQueryToService: writeQueryToService((0,
|
|
3576
|
+
writeQueryToService: writeQueryToService((0, import_node_path25.join)(path9)),
|
|
3546
3577
|
/**
|
|
3547
3578
|
* Adds a query to an agent in EventCatalog
|
|
3548
3579
|
*
|
|
@@ -3551,26 +3582,26 @@ var src_default = (path8) => {
|
|
|
3551
3582
|
* @param options - Optional options to write the query
|
|
3552
3583
|
*
|
|
3553
3584
|
*/
|
|
3554
|
-
writeQueryToAgent: writeQueryToAgent((0,
|
|
3585
|
+
writeQueryToAgent: writeQueryToAgent((0, import_node_path25.join)(path9)),
|
|
3555
3586
|
/**
|
|
3556
3587
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3557
3588
|
*
|
|
3558
3589
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
3559
3590
|
*
|
|
3560
3591
|
*/
|
|
3561
|
-
rmQuery: rmQuery((0,
|
|
3592
|
+
rmQuery: rmQuery((0, import_node_path25.join)(path9, "queries")),
|
|
3562
3593
|
/**
|
|
3563
3594
|
* Remove a query by a Query id
|
|
3564
3595
|
*
|
|
3565
3596
|
* @param id - The id of the query you want to remove
|
|
3566
3597
|
*
|
|
3567
3598
|
*/
|
|
3568
|
-
rmQueryById: rmQueryById((0,
|
|
3599
|
+
rmQueryById: rmQueryById((0, import_node_path25.join)(path9)),
|
|
3569
3600
|
/**
|
|
3570
3601
|
* Moves a given query id to the version directory
|
|
3571
3602
|
* @param directory
|
|
3572
3603
|
*/
|
|
3573
|
-
versionQuery: versionQuery((0,
|
|
3604
|
+
versionQuery: versionQuery((0, import_node_path25.join)(path9)),
|
|
3574
3605
|
/**
|
|
3575
3606
|
* Adds a file to the given query
|
|
3576
3607
|
* @param id - The id of the query to add the file to
|
|
@@ -3578,7 +3609,7 @@ var src_default = (path8) => {
|
|
|
3578
3609
|
* @param version - Optional version of the query to add the file to
|
|
3579
3610
|
* @returns
|
|
3580
3611
|
*/
|
|
3581
|
-
addFileToQuery: addFileToQuery((0,
|
|
3612
|
+
addFileToQuery: addFileToQuery((0, import_node_path25.join)(path9)),
|
|
3582
3613
|
/**
|
|
3583
3614
|
* Adds a schema to the given query
|
|
3584
3615
|
* @param id - The id of the query to add the schema to
|
|
@@ -3586,17 +3617,17 @@ var src_default = (path8) => {
|
|
|
3586
3617
|
* @param version - Optional version of the query to add the schema to
|
|
3587
3618
|
* @returns
|
|
3588
3619
|
*/
|
|
3589
|
-
addSchemaToQuery: addSchemaToQuery((0,
|
|
3620
|
+
addSchemaToQuery: addSchemaToQuery((0, import_node_path25.join)(path9)),
|
|
3590
3621
|
/**
|
|
3591
3622
|
* Check to see if an query version exists
|
|
3592
3623
|
* @param id - The id of the query
|
|
3593
3624
|
* @param version - The version of the query (supports semver)
|
|
3594
3625
|
* @returns
|
|
3595
3626
|
*/
|
|
3596
|
-
queryHasVersion: queryHasVersion((0,
|
|
3597
|
-
addExampleToQuery: addExampleToQuery((0,
|
|
3598
|
-
getExamplesFromQuery: getExamplesFromQuery((0,
|
|
3599
|
-
removeExampleFromQuery: removeExampleFromQuery((0,
|
|
3627
|
+
queryHasVersion: queryHasVersion((0, import_node_path25.join)(path9)),
|
|
3628
|
+
addExampleToQuery: addExampleToQuery((0, import_node_path25.join)(path9)),
|
|
3629
|
+
getExamplesFromQuery: getExamplesFromQuery((0, import_node_path25.join)(path9)),
|
|
3630
|
+
removeExampleFromQuery: removeExampleFromQuery((0, import_node_path25.join)(path9)),
|
|
3600
3631
|
/**
|
|
3601
3632
|
* ================================
|
|
3602
3633
|
* Channels
|
|
@@ -3608,13 +3639,13 @@ var src_default = (path8) => {
|
|
|
3608
3639
|
* @param version - Optional id of the version to get (supports semver)
|
|
3609
3640
|
* @returns Channel|Undefined
|
|
3610
3641
|
*/
|
|
3611
|
-
getChannel: getChannel((0,
|
|
3642
|
+
getChannel: getChannel((0, import_node_path25.join)(path9)),
|
|
3612
3643
|
/**
|
|
3613
3644
|
* Returns all channels from EventCatalog
|
|
3614
3645
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3615
3646
|
* @returns Channel[]|Undefined
|
|
3616
3647
|
*/
|
|
3617
|
-
getChannels: getChannels((0,
|
|
3648
|
+
getChannels: getChannels((0, import_node_path25.join)(path9)),
|
|
3618
3649
|
/**
|
|
3619
3650
|
* Adds an channel to EventCatalog
|
|
3620
3651
|
*
|
|
@@ -3622,33 +3653,33 @@ var src_default = (path8) => {
|
|
|
3622
3653
|
* @param options - Optional options to write the channel
|
|
3623
3654
|
*
|
|
3624
3655
|
*/
|
|
3625
|
-
writeChannel: writeChannel((0,
|
|
3656
|
+
writeChannel: writeChannel((0, import_node_path25.join)(path9, "channels")),
|
|
3626
3657
|
/**
|
|
3627
3658
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3628
3659
|
*
|
|
3629
3660
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
3630
3661
|
*
|
|
3631
3662
|
*/
|
|
3632
|
-
rmChannel: rmChannel((0,
|
|
3663
|
+
rmChannel: rmChannel((0, import_node_path25.join)(path9, "channels")),
|
|
3633
3664
|
/**
|
|
3634
3665
|
* Remove an channel by an Event id
|
|
3635
3666
|
*
|
|
3636
3667
|
* @param id - The id of the channel you want to remove
|
|
3637
3668
|
*
|
|
3638
3669
|
*/
|
|
3639
|
-
rmChannelById: rmChannelById((0,
|
|
3670
|
+
rmChannelById: rmChannelById((0, import_node_path25.join)(path9)),
|
|
3640
3671
|
/**
|
|
3641
3672
|
* Moves a given channel id to the version directory
|
|
3642
3673
|
* @param directory
|
|
3643
3674
|
*/
|
|
3644
|
-
versionChannel: versionChannel((0,
|
|
3675
|
+
versionChannel: versionChannel((0, import_node_path25.join)(path9)),
|
|
3645
3676
|
/**
|
|
3646
3677
|
* Check to see if a channel version exists
|
|
3647
3678
|
* @param id - The id of the channel
|
|
3648
3679
|
* @param version - The version of the channel (supports semver)
|
|
3649
3680
|
* @returns
|
|
3650
3681
|
*/
|
|
3651
|
-
channelHasVersion: channelHasVersion((0,
|
|
3682
|
+
channelHasVersion: channelHasVersion((0, import_node_path25.join)(path9)),
|
|
3652
3683
|
/**
|
|
3653
3684
|
* Add a channel to an event
|
|
3654
3685
|
*
|
|
@@ -3665,7 +3696,7 @@ var src_default = (path8) => {
|
|
|
3665
3696
|
*
|
|
3666
3697
|
* ```
|
|
3667
3698
|
*/
|
|
3668
|
-
addEventToChannel: addMessageToChannel((0,
|
|
3699
|
+
addEventToChannel: addMessageToChannel((0, import_node_path25.join)(path9), "events"),
|
|
3669
3700
|
/**
|
|
3670
3701
|
* Add a channel to an command
|
|
3671
3702
|
*
|
|
@@ -3682,7 +3713,7 @@ var src_default = (path8) => {
|
|
|
3682
3713
|
*
|
|
3683
3714
|
* ```
|
|
3684
3715
|
*/
|
|
3685
|
-
addCommandToChannel: addMessageToChannel((0,
|
|
3716
|
+
addCommandToChannel: addMessageToChannel((0, import_node_path25.join)(path9), "commands"),
|
|
3686
3717
|
/**
|
|
3687
3718
|
* Add a channel to an query
|
|
3688
3719
|
*
|
|
@@ -3699,7 +3730,7 @@ var src_default = (path8) => {
|
|
|
3699
3730
|
*
|
|
3700
3731
|
* ```
|
|
3701
3732
|
*/
|
|
3702
|
-
addQueryToChannel: addMessageToChannel((0,
|
|
3733
|
+
addQueryToChannel: addMessageToChannel((0, import_node_path25.join)(path9), "queries"),
|
|
3703
3734
|
/**
|
|
3704
3735
|
* ================================
|
|
3705
3736
|
* SERVICES
|
|
@@ -3712,14 +3743,14 @@ var src_default = (path8) => {
|
|
|
3712
3743
|
* @param options - Optional options to write the event
|
|
3713
3744
|
*
|
|
3714
3745
|
*/
|
|
3715
|
-
writeService: writeService((0,
|
|
3746
|
+
writeService: writeService((0, import_node_path25.join)(path9, "services")),
|
|
3716
3747
|
/**
|
|
3717
3748
|
* Adds a versioned service to EventCatalog
|
|
3718
3749
|
*
|
|
3719
3750
|
* @param service - The service to write
|
|
3720
3751
|
*
|
|
3721
3752
|
*/
|
|
3722
|
-
writeVersionedService: writeVersionedService((0,
|
|
3753
|
+
writeVersionedService: writeVersionedService((0, import_node_path25.join)(path9, "services")),
|
|
3723
3754
|
/**
|
|
3724
3755
|
* Adds a service to a domain in EventCatalog
|
|
3725
3756
|
*
|
|
@@ -3728,45 +3759,45 @@ var src_default = (path8) => {
|
|
|
3728
3759
|
* @param options - Optional options to write the event
|
|
3729
3760
|
*
|
|
3730
3761
|
*/
|
|
3731
|
-
writeServiceToDomain: writeServiceToDomain((0,
|
|
3762
|
+
writeServiceToDomain: writeServiceToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
3732
3763
|
/**
|
|
3733
3764
|
* Returns a service from EventCatalog
|
|
3734
3765
|
* @param id - The id of the service to retrieve
|
|
3735
3766
|
* @param version - Optional id of the version to get (supports semver)
|
|
3736
3767
|
* @returns Service|Undefined
|
|
3737
3768
|
*/
|
|
3738
|
-
getService: getService((0,
|
|
3769
|
+
getService: getService((0, import_node_path25.join)(path9)),
|
|
3739
3770
|
/**
|
|
3740
3771
|
* Returns a service from EventCatalog by it's path.
|
|
3741
3772
|
* @param path - The path to the service to retrieve
|
|
3742
3773
|
* @returns Service|Undefined
|
|
3743
3774
|
*/
|
|
3744
|
-
getServiceByPath: getServiceByPath((0,
|
|
3775
|
+
getServiceByPath: getServiceByPath((0, import_node_path25.join)(path9)),
|
|
3745
3776
|
/**
|
|
3746
3777
|
* Returns all services from EventCatalog
|
|
3747
3778
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3748
3779
|
* @returns Service[]|Undefined
|
|
3749
3780
|
*/
|
|
3750
|
-
getServices: getServices((0,
|
|
3781
|
+
getServices: getServices((0, import_node_path25.join)(path9)),
|
|
3751
3782
|
/**
|
|
3752
3783
|
* Moves a given service id to the version directory
|
|
3753
3784
|
* @param directory
|
|
3754
3785
|
*/
|
|
3755
|
-
versionService: versionService((0,
|
|
3786
|
+
versionService: versionService((0, import_node_path25.join)(path9)),
|
|
3756
3787
|
/**
|
|
3757
3788
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3758
3789
|
*
|
|
3759
3790
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
3760
3791
|
*
|
|
3761
3792
|
*/
|
|
3762
|
-
rmService: rmService((0,
|
|
3793
|
+
rmService: rmService((0, import_node_path25.join)(path9, "services")),
|
|
3763
3794
|
/**
|
|
3764
3795
|
* Remove an service by an service id
|
|
3765
3796
|
*
|
|
3766
3797
|
* @param id - The id of the service you want to remove
|
|
3767
3798
|
*
|
|
3768
3799
|
*/
|
|
3769
|
-
rmServiceById: rmServiceById((0,
|
|
3800
|
+
rmServiceById: rmServiceById((0, import_node_path25.join)(path9)),
|
|
3770
3801
|
/**
|
|
3771
3802
|
* Adds a file to the given service
|
|
3772
3803
|
* @param id - The id of the service to add the file to
|
|
@@ -3774,21 +3805,21 @@ var src_default = (path8) => {
|
|
|
3774
3805
|
* @param version - Optional version of the service to add the file to
|
|
3775
3806
|
* @returns
|
|
3776
3807
|
*/
|
|
3777
|
-
addFileToService: addFileToService((0,
|
|
3808
|
+
addFileToService: addFileToService((0, import_node_path25.join)(path9)),
|
|
3778
3809
|
/**
|
|
3779
3810
|
* Returns the specifications for a given service
|
|
3780
3811
|
* @param id - The id of the service to retrieve the specifications for
|
|
3781
3812
|
* @param version - Optional version of the service
|
|
3782
3813
|
* @returns
|
|
3783
3814
|
*/
|
|
3784
|
-
getSpecificationFilesForService: getSpecificationFilesForService((0,
|
|
3815
|
+
getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path25.join)(path9)),
|
|
3785
3816
|
/**
|
|
3786
3817
|
* Check to see if a service version exists
|
|
3787
3818
|
* @param id - The id of the service
|
|
3788
3819
|
* @param version - The version of the service (supports semver)
|
|
3789
3820
|
* @returns
|
|
3790
3821
|
*/
|
|
3791
|
-
serviceHasVersion: serviceHasVersion((0,
|
|
3822
|
+
serviceHasVersion: serviceHasVersion((0, import_node_path25.join)(path9)),
|
|
3792
3823
|
/**
|
|
3793
3824
|
* Add an event to a service by it's id.
|
|
3794
3825
|
*
|
|
@@ -3808,7 +3839,7 @@ var src_default = (path8) => {
|
|
|
3808
3839
|
*
|
|
3809
3840
|
* ```
|
|
3810
3841
|
*/
|
|
3811
|
-
addEventToService: addMessageToService((0,
|
|
3842
|
+
addEventToService: addMessageToService((0, import_node_path25.join)(path9)),
|
|
3812
3843
|
/**
|
|
3813
3844
|
* Add a data store to a service by it's id.
|
|
3814
3845
|
*
|
|
@@ -3825,7 +3856,7 @@ var src_default = (path8) => {
|
|
|
3825
3856
|
*
|
|
3826
3857
|
* ```
|
|
3827
3858
|
*/
|
|
3828
|
-
addDataStoreToService: addDataStoreToService((0,
|
|
3859
|
+
addDataStoreToService: addDataStoreToService((0, import_node_path25.join)(path9)),
|
|
3829
3860
|
/**
|
|
3830
3861
|
* Add a command to a service by it's id.
|
|
3831
3862
|
*
|
|
@@ -3845,7 +3876,7 @@ var src_default = (path8) => {
|
|
|
3845
3876
|
*
|
|
3846
3877
|
* ```
|
|
3847
3878
|
*/
|
|
3848
|
-
addCommandToService: addMessageToService((0,
|
|
3879
|
+
addCommandToService: addMessageToService((0, import_node_path25.join)(path9)),
|
|
3849
3880
|
/**
|
|
3850
3881
|
* Add a query to a service by it's id.
|
|
3851
3882
|
*
|
|
@@ -3865,7 +3896,7 @@ var src_default = (path8) => {
|
|
|
3865
3896
|
*
|
|
3866
3897
|
* ```
|
|
3867
3898
|
*/
|
|
3868
|
-
addQueryToService: addMessageToService((0,
|
|
3899
|
+
addQueryToService: addMessageToService((0, import_node_path25.join)(path9)),
|
|
3869
3900
|
/**
|
|
3870
3901
|
* Add an entity to a service by its id.
|
|
3871
3902
|
*
|
|
@@ -3883,7 +3914,7 @@ var src_default = (path8) => {
|
|
|
3883
3914
|
*
|
|
3884
3915
|
* ```
|
|
3885
3916
|
*/
|
|
3886
|
-
addEntityToService: addEntityToService((0,
|
|
3917
|
+
addEntityToService: addEntityToService((0, import_node_path25.join)(path9)),
|
|
3887
3918
|
/**
|
|
3888
3919
|
* Check to see if a service exists by it's path.
|
|
3889
3920
|
*
|
|
@@ -3900,36 +3931,36 @@ var src_default = (path8) => {
|
|
|
3900
3931
|
* @param path - The path to the service to check
|
|
3901
3932
|
* @returns boolean
|
|
3902
3933
|
*/
|
|
3903
|
-
isService: isService((0,
|
|
3934
|
+
isService: isService((0, import_node_path25.join)(path9)),
|
|
3904
3935
|
/**
|
|
3905
3936
|
* Converts a file to a service.
|
|
3906
3937
|
* @param file - The file to convert to a service.
|
|
3907
3938
|
* @returns The service.
|
|
3908
3939
|
*/
|
|
3909
|
-
toService: toService((0,
|
|
3940
|
+
toService: toService((0, import_node_path25.join)(path9)),
|
|
3910
3941
|
/**
|
|
3911
3942
|
* ================================
|
|
3912
3943
|
* Agents
|
|
3913
3944
|
* ================================
|
|
3914
3945
|
*/
|
|
3915
|
-
writeAgent: writeAgent((0,
|
|
3916
|
-
writeVersionedAgent: writeVersionedAgent((0,
|
|
3917
|
-
writeAgentToDomain: writeAgentToDomain((0,
|
|
3918
|
-
getAgent: getAgent((0,
|
|
3919
|
-
getAgentByPath: getAgentByPath((0,
|
|
3920
|
-
getAgents: getAgents((0,
|
|
3921
|
-
versionAgent: versionAgent((0,
|
|
3922
|
-
rmAgent: rmAgent((0,
|
|
3923
|
-
rmAgentById: rmAgentById((0,
|
|
3924
|
-
addFileToAgent: addFileToAgent((0,
|
|
3925
|
-
addEventToAgent: addMessageToAgent((0,
|
|
3926
|
-
addCommandToAgent: addMessageToAgent((0,
|
|
3927
|
-
addQueryToAgent: addMessageToAgent((0,
|
|
3928
|
-
addDataStoreToAgent: addDataStoreToAgent((0,
|
|
3929
|
-
addFlowToAgent: addFlowToAgent((0,
|
|
3930
|
-
agentHasVersion: agentHasVersion((0,
|
|
3931
|
-
isAgent: isAgent((0,
|
|
3932
|
-
toAgent: toAgent((0,
|
|
3946
|
+
writeAgent: writeAgent((0, import_node_path25.join)(path9, "agents")),
|
|
3947
|
+
writeVersionedAgent: writeVersionedAgent((0, import_node_path25.join)(path9, "agents")),
|
|
3948
|
+
writeAgentToDomain: writeAgentToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
3949
|
+
getAgent: getAgent((0, import_node_path25.join)(path9)),
|
|
3950
|
+
getAgentByPath: getAgentByPath((0, import_node_path25.join)(path9)),
|
|
3951
|
+
getAgents: getAgents((0, import_node_path25.join)(path9)),
|
|
3952
|
+
versionAgent: versionAgent((0, import_node_path25.join)(path9)),
|
|
3953
|
+
rmAgent: rmAgent((0, import_node_path25.join)(path9, "agents")),
|
|
3954
|
+
rmAgentById: rmAgentById((0, import_node_path25.join)(path9)),
|
|
3955
|
+
addFileToAgent: addFileToAgent((0, import_node_path25.join)(path9)),
|
|
3956
|
+
addEventToAgent: addMessageToAgent((0, import_node_path25.join)(path9)),
|
|
3957
|
+
addCommandToAgent: addMessageToAgent((0, import_node_path25.join)(path9)),
|
|
3958
|
+
addQueryToAgent: addMessageToAgent((0, import_node_path25.join)(path9)),
|
|
3959
|
+
addDataStoreToAgent: addDataStoreToAgent((0, import_node_path25.join)(path9)),
|
|
3960
|
+
addFlowToAgent: addFlowToAgent((0, import_node_path25.join)(path9)),
|
|
3961
|
+
agentHasVersion: agentHasVersion((0, import_node_path25.join)(path9)),
|
|
3962
|
+
isAgent: isAgent((0, import_node_path25.join)(path9)),
|
|
3963
|
+
toAgent: toAgent((0, import_node_path25.join)(path9)),
|
|
3933
3964
|
/**
|
|
3934
3965
|
* ================================
|
|
3935
3966
|
* Domains
|
|
@@ -3942,39 +3973,39 @@ var src_default = (path8) => {
|
|
|
3942
3973
|
* @param options - Optional options to write the event
|
|
3943
3974
|
*
|
|
3944
3975
|
*/
|
|
3945
|
-
writeDomain: writeDomain((0,
|
|
3976
|
+
writeDomain: writeDomain((0, import_node_path25.join)(path9, "domains")),
|
|
3946
3977
|
/**
|
|
3947
3978
|
* Returns a domain from EventCatalog
|
|
3948
3979
|
* @param id - The id of the domain to retrieve
|
|
3949
3980
|
* @param version - Optional id of the version to get (supports semver)
|
|
3950
3981
|
* @returns Domain|Undefined
|
|
3951
3982
|
*/
|
|
3952
|
-
getDomain: getDomain((0,
|
|
3983
|
+
getDomain: getDomain((0, import_node_path25.join)(path9, "domains")),
|
|
3953
3984
|
/**
|
|
3954
3985
|
* Returns all domains from EventCatalog
|
|
3955
3986
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3956
3987
|
* @returns Domain[]|Undefined
|
|
3957
3988
|
*/
|
|
3958
|
-
getDomains: getDomains((0,
|
|
3989
|
+
getDomains: getDomains((0, import_node_path25.join)(path9)),
|
|
3959
3990
|
/**
|
|
3960
3991
|
* Moves a given domain id to the version directory
|
|
3961
3992
|
* @param directory
|
|
3962
3993
|
*/
|
|
3963
|
-
versionDomain: versionDomain((0,
|
|
3994
|
+
versionDomain: versionDomain((0, import_node_path25.join)(path9, "domains")),
|
|
3964
3995
|
/**
|
|
3965
3996
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3966
3997
|
*
|
|
3967
3998
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
3968
3999
|
*
|
|
3969
4000
|
*/
|
|
3970
|
-
rmDomain: rmDomain((0,
|
|
4001
|
+
rmDomain: rmDomain((0, import_node_path25.join)(path9, "domains")),
|
|
3971
4002
|
/**
|
|
3972
4003
|
* Remove an service by an domain id
|
|
3973
4004
|
*
|
|
3974
4005
|
* @param id - The id of the domain you want to remove
|
|
3975
4006
|
*
|
|
3976
4007
|
*/
|
|
3977
|
-
rmDomainById: rmDomainById((0,
|
|
4008
|
+
rmDomainById: rmDomainById((0, import_node_path25.join)(path9, "domains")),
|
|
3978
4009
|
/**
|
|
3979
4010
|
* Adds a file to the given domain
|
|
3980
4011
|
* @param id - The id of the domain to add the file to
|
|
@@ -3982,28 +4013,28 @@ var src_default = (path8) => {
|
|
|
3982
4013
|
* @param version - Optional version of the domain to add the file to
|
|
3983
4014
|
* @returns
|
|
3984
4015
|
*/
|
|
3985
|
-
addFileToDomain: addFileToDomain((0,
|
|
4016
|
+
addFileToDomain: addFileToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
3986
4017
|
/**
|
|
3987
4018
|
* Adds an ubiquitous language dictionary to a domain
|
|
3988
4019
|
* @param id - The id of the domain to add the ubiquitous language to
|
|
3989
4020
|
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
3990
4021
|
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
3991
4022
|
*/
|
|
3992
|
-
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0,
|
|
4023
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
3993
4024
|
/**
|
|
3994
4025
|
* Get the ubiquitous language dictionary from a domain
|
|
3995
4026
|
* @param id - The id of the domain to get the ubiquitous language from
|
|
3996
4027
|
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
3997
4028
|
* @returns
|
|
3998
4029
|
*/
|
|
3999
|
-
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0,
|
|
4030
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4000
4031
|
/**
|
|
4001
4032
|
* Check to see if a domain version exists
|
|
4002
4033
|
* @param id - The id of the domain
|
|
4003
4034
|
* @param version - The version of the domain (supports semver)
|
|
4004
4035
|
* @returns
|
|
4005
4036
|
*/
|
|
4006
|
-
domainHasVersion: domainHasVersion((0,
|
|
4037
|
+
domainHasVersion: domainHasVersion((0, import_node_path25.join)(path9)),
|
|
4007
4038
|
/**
|
|
4008
4039
|
* Adds a given service to a domain
|
|
4009
4040
|
* @param id - The id of the domain
|
|
@@ -4011,7 +4042,7 @@ var src_default = (path8) => {
|
|
|
4011
4042
|
* @param version - (Optional) The version of the domain to add the service to
|
|
4012
4043
|
* @returns
|
|
4013
4044
|
*/
|
|
4014
|
-
addServiceToDomain: addServiceToDomain((0,
|
|
4045
|
+
addServiceToDomain: addServiceToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4015
4046
|
/**
|
|
4016
4047
|
* Adds a given agent to a domain
|
|
4017
4048
|
* @param id - The id of the domain
|
|
@@ -4019,7 +4050,7 @@ var src_default = (path8) => {
|
|
|
4019
4050
|
* @param version - (Optional) The version of the domain to add the agent to
|
|
4020
4051
|
* @returns
|
|
4021
4052
|
*/
|
|
4022
|
-
addAgentToDomain: addAgentToDomain((0,
|
|
4053
|
+
addAgentToDomain: addAgentToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4023
4054
|
/**
|
|
4024
4055
|
* Adds a given subdomain to a domain
|
|
4025
4056
|
* @param id - The id of the domain
|
|
@@ -4027,7 +4058,7 @@ var src_default = (path8) => {
|
|
|
4027
4058
|
* @param version - (Optional) The version of the domain to add the subdomain to
|
|
4028
4059
|
* @returns
|
|
4029
4060
|
*/
|
|
4030
|
-
addSubDomainToDomain: addSubDomainToDomain((0,
|
|
4061
|
+
addSubDomainToDomain: addSubDomainToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4031
4062
|
/**
|
|
4032
4063
|
* Adds an entity to a domain
|
|
4033
4064
|
* @param id - The id of the domain
|
|
@@ -4035,7 +4066,7 @@ var src_default = (path8) => {
|
|
|
4035
4066
|
* @param version - (Optional) The version of the domain to add the entity to
|
|
4036
4067
|
* @returns
|
|
4037
4068
|
*/
|
|
4038
|
-
addEntityToDomain: addEntityToDomain((0,
|
|
4069
|
+
addEntityToDomain: addEntityToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4039
4070
|
/**
|
|
4040
4071
|
* Add an event to a domain by its id.
|
|
4041
4072
|
*
|
|
@@ -4053,7 +4084,7 @@ var src_default = (path8) => {
|
|
|
4053
4084
|
*
|
|
4054
4085
|
* ```
|
|
4055
4086
|
*/
|
|
4056
|
-
addEventToDomain: addMessageToDomain((0,
|
|
4087
|
+
addEventToDomain: addMessageToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4057
4088
|
/**
|
|
4058
4089
|
* Add a command to a domain by its id.
|
|
4059
4090
|
*
|
|
@@ -4071,7 +4102,7 @@ var src_default = (path8) => {
|
|
|
4071
4102
|
*
|
|
4072
4103
|
* ```
|
|
4073
4104
|
*/
|
|
4074
|
-
addCommandToDomain: addMessageToDomain((0,
|
|
4105
|
+
addCommandToDomain: addMessageToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4075
4106
|
/**
|
|
4076
4107
|
* Add a query to a domain by its id.
|
|
4077
4108
|
*
|
|
@@ -4089,7 +4120,7 @@ var src_default = (path8) => {
|
|
|
4089
4120
|
*
|
|
4090
4121
|
* ```
|
|
4091
4122
|
*/
|
|
4092
|
-
addQueryToDomain: addMessageToDomain((0,
|
|
4123
|
+
addQueryToDomain: addMessageToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4093
4124
|
/**
|
|
4094
4125
|
* ================================
|
|
4095
4126
|
* Teams
|
|
@@ -4102,25 +4133,25 @@ var src_default = (path8) => {
|
|
|
4102
4133
|
* @param options - Optional options to write the team
|
|
4103
4134
|
*
|
|
4104
4135
|
*/
|
|
4105
|
-
writeTeam: writeTeam((0,
|
|
4136
|
+
writeTeam: writeTeam((0, import_node_path25.join)(path9, "teams")),
|
|
4106
4137
|
/**
|
|
4107
4138
|
* Returns a team from EventCatalog
|
|
4108
4139
|
* @param id - The id of the team to retrieve
|
|
4109
4140
|
* @returns Team|Undefined
|
|
4110
4141
|
*/
|
|
4111
|
-
getTeam: getTeam((0,
|
|
4142
|
+
getTeam: getTeam((0, import_node_path25.join)(path9, "teams")),
|
|
4112
4143
|
/**
|
|
4113
4144
|
* Returns all teams from EventCatalog
|
|
4114
4145
|
* @returns Team[]|Undefined
|
|
4115
4146
|
*/
|
|
4116
|
-
getTeams: getTeams((0,
|
|
4147
|
+
getTeams: getTeams((0, import_node_path25.join)(path9, "teams")),
|
|
4117
4148
|
/**
|
|
4118
4149
|
* Remove a team by the team id
|
|
4119
4150
|
*
|
|
4120
4151
|
* @param id - The id of the team you want to remove
|
|
4121
4152
|
*
|
|
4122
4153
|
*/
|
|
4123
|
-
rmTeamById: rmTeamById((0,
|
|
4154
|
+
rmTeamById: rmTeamById((0, import_node_path25.join)(path9, "teams")),
|
|
4124
4155
|
/**
|
|
4125
4156
|
* ================================
|
|
4126
4157
|
* Users
|
|
@@ -4133,25 +4164,25 @@ var src_default = (path8) => {
|
|
|
4133
4164
|
* @param options - Optional options to write the user
|
|
4134
4165
|
*
|
|
4135
4166
|
*/
|
|
4136
|
-
writeUser: writeUser((0,
|
|
4167
|
+
writeUser: writeUser((0, import_node_path25.join)(path9, "users")),
|
|
4137
4168
|
/**
|
|
4138
4169
|
* Returns a user from EventCatalog
|
|
4139
4170
|
* @param id - The id of the user to retrieve
|
|
4140
4171
|
* @returns User|Undefined
|
|
4141
4172
|
*/
|
|
4142
|
-
getUser: getUser((0,
|
|
4173
|
+
getUser: getUser((0, import_node_path25.join)(path9, "users")),
|
|
4143
4174
|
/**
|
|
4144
4175
|
* Returns all user from EventCatalog
|
|
4145
4176
|
* @returns User[]|Undefined
|
|
4146
4177
|
*/
|
|
4147
|
-
getUsers: getUsers((0,
|
|
4178
|
+
getUsers: getUsers((0, import_node_path25.join)(path9)),
|
|
4148
4179
|
/**
|
|
4149
4180
|
* Remove a user by the user id
|
|
4150
4181
|
*
|
|
4151
4182
|
* @param id - The id of the user you want to remove
|
|
4152
4183
|
*
|
|
4153
4184
|
*/
|
|
4154
|
-
rmUserById: rmUserById((0,
|
|
4185
|
+
rmUserById: rmUserById((0, import_node_path25.join)(path9, "users")),
|
|
4155
4186
|
/**
|
|
4156
4187
|
* ================================
|
|
4157
4188
|
* Custom Docs
|
|
@@ -4162,32 +4193,32 @@ var src_default = (path8) => {
|
|
|
4162
4193
|
* @param path - The path to the custom doc to retrieve
|
|
4163
4194
|
* @returns CustomDoc|Undefined
|
|
4164
4195
|
*/
|
|
4165
|
-
getCustomDoc: getCustomDoc((0,
|
|
4196
|
+
getCustomDoc: getCustomDoc((0, import_node_path25.join)(path9, "docs")),
|
|
4166
4197
|
/**
|
|
4167
4198
|
* Returns all custom docs from EventCatalog
|
|
4168
4199
|
* @param options - Optional options to get custom docs from a specific path
|
|
4169
4200
|
* @returns CustomDoc[]|Undefined
|
|
4170
4201
|
*/
|
|
4171
|
-
getCustomDocs: getCustomDocs((0,
|
|
4202
|
+
getCustomDocs: getCustomDocs((0, import_node_path25.join)(path9, "docs")),
|
|
4172
4203
|
/**
|
|
4173
4204
|
* Writes a custom doc to EventCatalog
|
|
4174
4205
|
* @param customDoc - The custom doc to write
|
|
4175
4206
|
* @param options - Optional options to write the custom doc
|
|
4176
4207
|
*
|
|
4177
4208
|
*/
|
|
4178
|
-
writeCustomDoc: writeCustomDoc((0,
|
|
4209
|
+
writeCustomDoc: writeCustomDoc((0, import_node_path25.join)(path9, "docs")),
|
|
4179
4210
|
/**
|
|
4180
4211
|
* Removes a custom doc from EventCatalog
|
|
4181
4212
|
* @param path - The path to the custom doc to remove
|
|
4182
4213
|
*
|
|
4183
4214
|
*/
|
|
4184
|
-
rmCustomDoc: rmCustomDoc((0,
|
|
4215
|
+
rmCustomDoc: rmCustomDoc((0, import_node_path25.join)(path9, "docs")),
|
|
4185
4216
|
/**
|
|
4186
4217
|
* Dumps the catalog to a JSON file.
|
|
4187
4218
|
* @param directory - The directory to dump the catalog to
|
|
4188
4219
|
* @returns A JSON file with the catalog
|
|
4189
4220
|
*/
|
|
4190
|
-
dumpCatalog: dumpCatalog((0,
|
|
4221
|
+
dumpCatalog: dumpCatalog((0, import_node_path25.join)(path9)),
|
|
4191
4222
|
/**
|
|
4192
4223
|
* Returns the event catalog configuration file.
|
|
4193
4224
|
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
@@ -4195,7 +4226,7 @@ var src_default = (path8) => {
|
|
|
4195
4226
|
* @param directory - The directory of the catalog.
|
|
4196
4227
|
* @returns A JSON object with the configuration for the event catalog.
|
|
4197
4228
|
*/
|
|
4198
|
-
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0,
|
|
4229
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0, import_node_path25.join)(path9)),
|
|
4199
4230
|
/**
|
|
4200
4231
|
* ================================
|
|
4201
4232
|
* Changelogs
|
|
@@ -4209,7 +4240,7 @@ var src_default = (path8) => {
|
|
|
4209
4240
|
* @param options - Optional options (version, format)
|
|
4210
4241
|
*
|
|
4211
4242
|
*/
|
|
4212
|
-
writeChangelog: writeChangelog((0,
|
|
4243
|
+
writeChangelog: writeChangelog((0, import_node_path25.join)(path9)),
|
|
4213
4244
|
/**
|
|
4214
4245
|
* Appends a changelog entry to an existing changelog for a resource.
|
|
4215
4246
|
* If no changelog exists, one is created.
|
|
@@ -4219,7 +4250,7 @@ var src_default = (path8) => {
|
|
|
4219
4250
|
* @param options - Optional options (version, format)
|
|
4220
4251
|
*
|
|
4221
4252
|
*/
|
|
4222
|
-
appendChangelog: appendChangelog((0,
|
|
4253
|
+
appendChangelog: appendChangelog((0, import_node_path25.join)(path9)),
|
|
4223
4254
|
/**
|
|
4224
4255
|
* Returns the changelog for a resource in EventCatalog
|
|
4225
4256
|
*
|
|
@@ -4227,7 +4258,7 @@ var src_default = (path8) => {
|
|
|
4227
4258
|
* @param options - Optional options (version)
|
|
4228
4259
|
* @returns Changelog|Undefined
|
|
4229
4260
|
*/
|
|
4230
|
-
getChangelog: getChangelog((0,
|
|
4261
|
+
getChangelog: getChangelog((0, import_node_path25.join)(path9)),
|
|
4231
4262
|
/**
|
|
4232
4263
|
* Removes the changelog for a resource in EventCatalog
|
|
4233
4264
|
*
|
|
@@ -4235,7 +4266,7 @@ var src_default = (path8) => {
|
|
|
4235
4266
|
* @param options - Optional options (version)
|
|
4236
4267
|
*
|
|
4237
4268
|
*/
|
|
4238
|
-
rmChangelog: rmChangelog((0,
|
|
4269
|
+
rmChangelog: rmChangelog((0, import_node_path25.join)(path9)),
|
|
4239
4270
|
/**
|
|
4240
4271
|
* ================================
|
|
4241
4272
|
* Resources Utils
|
|
@@ -4260,26 +4291,26 @@ var src_default = (path8) => {
|
|
|
4260
4291
|
* @param path - The path to the message to retrieve
|
|
4261
4292
|
* @returns Message|Undefined
|
|
4262
4293
|
*/
|
|
4263
|
-
getMessageBySchemaPath: getMessageBySchemaPath((0,
|
|
4294
|
+
getMessageBySchemaPath: getMessageBySchemaPath((0, import_node_path25.join)(path9)),
|
|
4264
4295
|
/**
|
|
4265
4296
|
* Returns the producers and consumers (services and agents) for a given message
|
|
4266
4297
|
* @param id - The id of the message to get the producers and consumers for
|
|
4267
4298
|
* @param version - Optional version of the message
|
|
4268
4299
|
* @returns { producers: (Service|Agent)[], consumers: (Service|Agent)[] }
|
|
4269
4300
|
*/
|
|
4270
|
-
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage((0,
|
|
4301
|
+
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage((0, import_node_path25.join)(path9)),
|
|
4271
4302
|
/**
|
|
4272
4303
|
* Returns the consumers of a given schema path
|
|
4273
4304
|
* @param path - The path to the schema to get the consumers for
|
|
4274
4305
|
* @returns (Service|Agent)[]
|
|
4275
4306
|
*/
|
|
4276
|
-
getConsumersOfSchema: getConsumersOfSchema((0,
|
|
4307
|
+
getConsumersOfSchema: getConsumersOfSchema((0, import_node_path25.join)(path9)),
|
|
4277
4308
|
/**
|
|
4278
4309
|
* Returns the producers of a given schema path
|
|
4279
4310
|
* @param path - The path to the schema to get the producers for
|
|
4280
4311
|
* @returns (Service|Agent)[]
|
|
4281
4312
|
*/
|
|
4282
|
-
getProducersOfSchema: getProducersOfSchema((0,
|
|
4313
|
+
getProducersOfSchema: getProducersOfSchema((0, import_node_path25.join)(path9)),
|
|
4283
4314
|
/**
|
|
4284
4315
|
* Returns the schema for a given message (event, command or query) by its id and version.
|
|
4285
4316
|
* If no version is given, the latest version is used.
|
|
@@ -4287,14 +4318,14 @@ var src_default = (path8) => {
|
|
|
4287
4318
|
* @param version - Optional version of the message
|
|
4288
4319
|
* @returns { schema: string, fileName: string } | undefined
|
|
4289
4320
|
*/
|
|
4290
|
-
getSchemaForMessage: getSchemaForMessage((0,
|
|
4321
|
+
getSchemaForMessage: getSchemaForMessage((0, import_node_path25.join)(path9)),
|
|
4291
4322
|
/**
|
|
4292
4323
|
* Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
|
|
4293
4324
|
* @param id - The id of the resource to get the owners for
|
|
4294
4325
|
* @param version - Optional version of the resource
|
|
4295
4326
|
* @returns { owners: User[] }
|
|
4296
4327
|
*/
|
|
4297
|
-
getOwnersForResource: getOwnersForResource((0,
|
|
4328
|
+
getOwnersForResource: getOwnersForResource((0, import_node_path25.join)(path9)),
|
|
4298
4329
|
/**
|
|
4299
4330
|
* ================================
|
|
4300
4331
|
* Entities
|
|
@@ -4306,13 +4337,13 @@ var src_default = (path8) => {
|
|
|
4306
4337
|
* @param version - Optional id of the version to get (supports semver)
|
|
4307
4338
|
* @returns Entity|Undefined
|
|
4308
4339
|
*/
|
|
4309
|
-
getEntity: getEntity((0,
|
|
4340
|
+
getEntity: getEntity((0, import_node_path25.join)(path9)),
|
|
4310
4341
|
/**
|
|
4311
4342
|
* Returns all entities from EventCatalog
|
|
4312
4343
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4313
4344
|
* @returns Entity[]|Undefined
|
|
4314
4345
|
*/
|
|
4315
|
-
getEntities: getEntities((0,
|
|
4346
|
+
getEntities: getEntities((0, import_node_path25.join)(path9)),
|
|
4316
4347
|
/**
|
|
4317
4348
|
* Adds an entity to EventCatalog
|
|
4318
4349
|
*
|
|
@@ -4320,33 +4351,33 @@ var src_default = (path8) => {
|
|
|
4320
4351
|
* @param options - Optional options to write the entity
|
|
4321
4352
|
*
|
|
4322
4353
|
*/
|
|
4323
|
-
writeEntity: writeEntity((0,
|
|
4354
|
+
writeEntity: writeEntity((0, import_node_path25.join)(path9, "entities")),
|
|
4324
4355
|
/**
|
|
4325
4356
|
* Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4326
4357
|
*
|
|
4327
4358
|
* @param path - The path to your entity, e.g. `/User`
|
|
4328
4359
|
*
|
|
4329
4360
|
*/
|
|
4330
|
-
rmEntity: rmEntity((0,
|
|
4361
|
+
rmEntity: rmEntity((0, import_node_path25.join)(path9, "entities")),
|
|
4331
4362
|
/**
|
|
4332
4363
|
* Remove an entity by an entity id
|
|
4333
4364
|
*
|
|
4334
4365
|
* @param id - The id of the entity you want to remove
|
|
4335
4366
|
*
|
|
4336
4367
|
*/
|
|
4337
|
-
rmEntityById: rmEntityById((0,
|
|
4368
|
+
rmEntityById: rmEntityById((0, import_node_path25.join)(path9)),
|
|
4338
4369
|
/**
|
|
4339
4370
|
* Moves a given entity id to the version directory
|
|
4340
4371
|
* @param id - The id of the entity to version
|
|
4341
4372
|
*/
|
|
4342
|
-
versionEntity: versionEntity((0,
|
|
4373
|
+
versionEntity: versionEntity((0, import_node_path25.join)(path9)),
|
|
4343
4374
|
/**
|
|
4344
4375
|
* Check to see if an entity version exists
|
|
4345
4376
|
* @param id - The id of the entity
|
|
4346
4377
|
* @param version - The version of the entity (supports semver)
|
|
4347
4378
|
* @returns
|
|
4348
4379
|
*/
|
|
4349
|
-
entityHasVersion: entityHasVersion((0,
|
|
4380
|
+
entityHasVersion: entityHasVersion((0, import_node_path25.join)(path9)),
|
|
4350
4381
|
/**
|
|
4351
4382
|
* ================================
|
|
4352
4383
|
* Flows
|
|
@@ -4359,7 +4390,7 @@ var src_default = (path8) => {
|
|
|
4359
4390
|
* @param version - Optional version of the flow
|
|
4360
4391
|
* @returns Flow
|
|
4361
4392
|
*/
|
|
4362
|
-
getFlow: getFlow((0,
|
|
4393
|
+
getFlow: getFlow((0, import_node_path25.join)(path9)),
|
|
4363
4394
|
/**
|
|
4364
4395
|
* Returns all flows from EventCatalog
|
|
4365
4396
|
*
|
|
@@ -4367,7 +4398,7 @@ var src_default = (path8) => {
|
|
|
4367
4398
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4368
4399
|
* @returns Flow[]|Undefined
|
|
4369
4400
|
*/
|
|
4370
|
-
getFlows: getFlows((0,
|
|
4401
|
+
getFlows: getFlows((0, import_node_path25.join)(path9)),
|
|
4371
4402
|
/**
|
|
4372
4403
|
* Adds a flow to EventCatalog
|
|
4373
4404
|
*
|
|
@@ -4375,14 +4406,14 @@ var src_default = (path8) => {
|
|
|
4375
4406
|
* @param options - Optional options to write the flow
|
|
4376
4407
|
*
|
|
4377
4408
|
*/
|
|
4378
|
-
writeFlow: writeFlow((0,
|
|
4409
|
+
writeFlow: writeFlow((0, import_node_path25.join)(path9, "flows")),
|
|
4379
4410
|
/**
|
|
4380
4411
|
* Adds a versioned flow to EventCatalog
|
|
4381
4412
|
*
|
|
4382
4413
|
* @param flow - The flow to write
|
|
4383
4414
|
*
|
|
4384
4415
|
*/
|
|
4385
|
-
writeVersionedFlow: writeVersionedFlow((0,
|
|
4416
|
+
writeVersionedFlow: writeVersionedFlow((0, import_node_path25.join)(path9, "flows")),
|
|
4386
4417
|
/**
|
|
4387
4418
|
* Adds a flow to a domain in EventCatalog
|
|
4388
4419
|
*
|
|
@@ -4391,7 +4422,7 @@ var src_default = (path8) => {
|
|
|
4391
4422
|
* @param options - Optional options to write the flow
|
|
4392
4423
|
*
|
|
4393
4424
|
*/
|
|
4394
|
-
writeFlowToDomain: writeFlowToDomain((0,
|
|
4425
|
+
writeFlowToDomain: writeFlowToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4395
4426
|
/**
|
|
4396
4427
|
* Adds a flow to a service in EventCatalog
|
|
4397
4428
|
*
|
|
@@ -4400,7 +4431,7 @@ var src_default = (path8) => {
|
|
|
4400
4431
|
* @param options - Optional options to write the flow
|
|
4401
4432
|
*
|
|
4402
4433
|
*/
|
|
4403
|
-
writeFlowToService: writeFlowToService((0,
|
|
4434
|
+
writeFlowToService: writeFlowToService((0, import_node_path25.join)(path9, "services")),
|
|
4404
4435
|
/**
|
|
4405
4436
|
* Adds a flow to an agent in EventCatalog
|
|
4406
4437
|
*
|
|
@@ -4409,33 +4440,33 @@ var src_default = (path8) => {
|
|
|
4409
4440
|
* @param options - Optional options to write the flow
|
|
4410
4441
|
*
|
|
4411
4442
|
*/
|
|
4412
|
-
writeFlowToAgent: writeFlowToAgent((0,
|
|
4443
|
+
writeFlowToAgent: writeFlowToAgent((0, import_node_path25.join)(path9, "agents")),
|
|
4413
4444
|
/**
|
|
4414
4445
|
* Remove a flow from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4415
4446
|
*
|
|
4416
4447
|
* @param path - The path to your flow, e.g. `/PaymentFlow`
|
|
4417
4448
|
*
|
|
4418
4449
|
*/
|
|
4419
|
-
rmFlow: rmFlow((0,
|
|
4450
|
+
rmFlow: rmFlow((0, import_node_path25.join)(path9, "flows")),
|
|
4420
4451
|
/**
|
|
4421
4452
|
* Remove a flow by a flow id
|
|
4422
4453
|
*
|
|
4423
4454
|
* @param id - The id of the flow you want to remove
|
|
4424
4455
|
*
|
|
4425
4456
|
*/
|
|
4426
|
-
rmFlowById: rmFlowById((0,
|
|
4457
|
+
rmFlowById: rmFlowById((0, import_node_path25.join)(path9)),
|
|
4427
4458
|
/**
|
|
4428
4459
|
* Moves a given flow id to the version directory
|
|
4429
4460
|
* @param id - The id of the flow to version
|
|
4430
4461
|
*/
|
|
4431
|
-
versionFlow: versionFlow((0,
|
|
4462
|
+
versionFlow: versionFlow((0, import_node_path25.join)(path9)),
|
|
4432
4463
|
/**
|
|
4433
4464
|
* Check to see if a flow version exists
|
|
4434
4465
|
* @param id - The id of the flow
|
|
4435
4466
|
* @param version - The version of the flow (supports semver)
|
|
4436
4467
|
* @returns
|
|
4437
4468
|
*/
|
|
4438
|
-
flowHasVersion: flowHasVersion((0,
|
|
4469
|
+
flowHasVersion: flowHasVersion((0, import_node_path25.join)(path9)),
|
|
4439
4470
|
/**
|
|
4440
4471
|
* Adds a file to the given flow
|
|
4441
4472
|
* @param id - The id of the flow to add the file to
|
|
@@ -4443,7 +4474,7 @@ var src_default = (path8) => {
|
|
|
4443
4474
|
* @param version - Optional version of the flow to add the file to
|
|
4444
4475
|
* @returns
|
|
4445
4476
|
*/
|
|
4446
|
-
addFileToFlow: addFileToFlow((0,
|
|
4477
|
+
addFileToFlow: addFileToFlow((0, import_node_path25.join)(path9)),
|
|
4447
4478
|
/**
|
|
4448
4479
|
* ================================
|
|
4449
4480
|
* Data Stores
|
|
@@ -4455,42 +4486,42 @@ var src_default = (path8) => {
|
|
|
4455
4486
|
* @param options - Optional options to write the data store
|
|
4456
4487
|
*
|
|
4457
4488
|
*/
|
|
4458
|
-
writeDataStore: writeDataStore((0,
|
|
4489
|
+
writeDataStore: writeDataStore((0, import_node_path25.join)(path9, "containers")),
|
|
4459
4490
|
/**
|
|
4460
4491
|
* Returns a data store from EventCatalog
|
|
4461
4492
|
* @param id - The id of the data store to retrieve
|
|
4462
4493
|
* @param version - Optional id of the version to get (supports semver)
|
|
4463
4494
|
* @returns Container|Undefined
|
|
4464
4495
|
*/
|
|
4465
|
-
getDataStore: getDataStore((0,
|
|
4496
|
+
getDataStore: getDataStore((0, import_node_path25.join)(path9)),
|
|
4466
4497
|
/**
|
|
4467
4498
|
* Returns all data stores from EventCatalog
|
|
4468
4499
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4469
4500
|
* @returns Container[]|Undefined
|
|
4470
4501
|
*/
|
|
4471
|
-
getDataStores: getDataStores((0,
|
|
4502
|
+
getDataStores: getDataStores((0, import_node_path25.join)(path9)),
|
|
4472
4503
|
/**
|
|
4473
4504
|
* Version a data store by its id
|
|
4474
4505
|
* @param id - The id of the data store to version
|
|
4475
4506
|
*/
|
|
4476
|
-
versionDataStore: versionDataStore((0,
|
|
4507
|
+
versionDataStore: versionDataStore((0, import_node_path25.join)(path9, "containers")),
|
|
4477
4508
|
/**
|
|
4478
4509
|
* Remove a data store by its path
|
|
4479
4510
|
* @param path - The path to the data store to remove
|
|
4480
4511
|
*/
|
|
4481
|
-
rmDataStore: rmDataStore((0,
|
|
4512
|
+
rmDataStore: rmDataStore((0, import_node_path25.join)(path9, "containers")),
|
|
4482
4513
|
/**
|
|
4483
4514
|
* Remove a data store by its id
|
|
4484
4515
|
* @param id - The id of the data store to remove
|
|
4485
4516
|
*/
|
|
4486
|
-
rmDataStoreById: rmDataStoreById((0,
|
|
4517
|
+
rmDataStoreById: rmDataStoreById((0, import_node_path25.join)(path9)),
|
|
4487
4518
|
/**
|
|
4488
4519
|
* Check to see if a data store version exists
|
|
4489
4520
|
* @param id - The id of the data store
|
|
4490
4521
|
* @param version - The version of the data store (supports semver)
|
|
4491
4522
|
* @returns
|
|
4492
4523
|
*/
|
|
4493
|
-
dataStoreHasVersion: dataStoreHasVersion((0,
|
|
4524
|
+
dataStoreHasVersion: dataStoreHasVersion((0, import_node_path25.join)(path9)),
|
|
4494
4525
|
/**
|
|
4495
4526
|
* Adds a file to a data store by its id
|
|
4496
4527
|
* @param id - The id of the data store to add the file to
|
|
@@ -4498,14 +4529,14 @@ var src_default = (path8) => {
|
|
|
4498
4529
|
* @param version - Optional version of the data store to add the file to
|
|
4499
4530
|
* @returns
|
|
4500
4531
|
*/
|
|
4501
|
-
addFileToDataStore: addFileToDataStore((0,
|
|
4532
|
+
addFileToDataStore: addFileToDataStore((0, import_node_path25.join)(path9)),
|
|
4502
4533
|
/**
|
|
4503
4534
|
* Writes a data store to a service by its id
|
|
4504
4535
|
* @param dataStore - The data store to write
|
|
4505
4536
|
* @param service - The service to write the data store to
|
|
4506
4537
|
* @returns
|
|
4507
4538
|
*/
|
|
4508
|
-
writeDataStoreToService: writeDataStoreToService((0,
|
|
4539
|
+
writeDataStoreToService: writeDataStoreToService((0, import_node_path25.join)(path9)),
|
|
4509
4540
|
/**
|
|
4510
4541
|
* ================================
|
|
4511
4542
|
* Data Products
|
|
@@ -4517,7 +4548,7 @@ var src_default = (path8) => {
|
|
|
4517
4548
|
* @param options - Optional options to write the data product
|
|
4518
4549
|
*
|
|
4519
4550
|
*/
|
|
4520
|
-
writeDataProduct: writeDataProduct((0,
|
|
4551
|
+
writeDataProduct: writeDataProduct((0, import_node_path25.join)(path9, "data-products")),
|
|
4521
4552
|
/**
|
|
4522
4553
|
* Writes a data product to a domain in EventCatalog
|
|
4523
4554
|
* @param dataProduct - The data product to write
|
|
@@ -4525,43 +4556,43 @@ var src_default = (path8) => {
|
|
|
4525
4556
|
* @param options - Optional options to write the data product
|
|
4526
4557
|
*
|
|
4527
4558
|
*/
|
|
4528
|
-
writeDataProductToDomain: writeDataProductToDomain((0,
|
|
4559
|
+
writeDataProductToDomain: writeDataProductToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4529
4560
|
/**
|
|
4530
4561
|
* Returns a data product from EventCatalog
|
|
4531
4562
|
* @param id - The id of the data product to retrieve
|
|
4532
4563
|
* @param version - Optional id of the version to get (supports semver)
|
|
4533
4564
|
* @returns DataProduct|Undefined
|
|
4534
4565
|
*/
|
|
4535
|
-
getDataProduct: getDataProduct((0,
|
|
4566
|
+
getDataProduct: getDataProduct((0, import_node_path25.join)(path9)),
|
|
4536
4567
|
/**
|
|
4537
4568
|
* Returns all data products from EventCatalog
|
|
4538
4569
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4539
4570
|
* @returns DataProduct[]|Undefined
|
|
4540
4571
|
*/
|
|
4541
|
-
getDataProducts: getDataProducts((0,
|
|
4572
|
+
getDataProducts: getDataProducts((0, import_node_path25.join)(path9)),
|
|
4542
4573
|
/**
|
|
4543
4574
|
* Version a data product by its id
|
|
4544
4575
|
* @param id - The id of the data product to version
|
|
4545
4576
|
*/
|
|
4546
|
-
versionDataProduct: versionDataProduct((0,
|
|
4577
|
+
versionDataProduct: versionDataProduct((0, import_node_path25.join)(path9)),
|
|
4547
4578
|
/**
|
|
4548
4579
|
* Remove a data product by its path
|
|
4549
4580
|
* @param path - The path to the data product to remove
|
|
4550
4581
|
*/
|
|
4551
|
-
rmDataProduct: rmDataProduct((0,
|
|
4582
|
+
rmDataProduct: rmDataProduct((0, import_node_path25.join)(path9, "data-products")),
|
|
4552
4583
|
/**
|
|
4553
4584
|
* Remove a data product by its id
|
|
4554
4585
|
* @param id - The id of the data product to remove
|
|
4555
4586
|
* @param version - Optional version of the data product to remove
|
|
4556
4587
|
*/
|
|
4557
|
-
rmDataProductById: rmDataProductById((0,
|
|
4588
|
+
rmDataProductById: rmDataProductById((0, import_node_path25.join)(path9)),
|
|
4558
4589
|
/**
|
|
4559
4590
|
* Check to see if a data product version exists
|
|
4560
4591
|
* @param id - The id of the data product
|
|
4561
4592
|
* @param version - The version of the data product (supports semver)
|
|
4562
4593
|
* @returns
|
|
4563
4594
|
*/
|
|
4564
|
-
dataProductHasVersion: dataProductHasVersion((0,
|
|
4595
|
+
dataProductHasVersion: dataProductHasVersion((0, import_node_path25.join)(path9)),
|
|
4565
4596
|
/**
|
|
4566
4597
|
* Adds a file to a data product by its id
|
|
4567
4598
|
* @param id - The id of the data product to add the file to
|
|
@@ -4569,7 +4600,7 @@ var src_default = (path8) => {
|
|
|
4569
4600
|
* @param version - Optional version of the data product to add the file to
|
|
4570
4601
|
* @returns
|
|
4571
4602
|
*/
|
|
4572
|
-
addFileToDataProduct: addFileToDataProduct((0,
|
|
4603
|
+
addFileToDataProduct: addFileToDataProduct((0, import_node_path25.join)(path9)),
|
|
4573
4604
|
/**
|
|
4574
4605
|
* Adds a data product to a domain
|
|
4575
4606
|
* @param id - The id of the domain
|
|
@@ -4577,7 +4608,7 @@ var src_default = (path8) => {
|
|
|
4577
4608
|
* @param version - (Optional) The version of the domain to add the data product to
|
|
4578
4609
|
* @returns
|
|
4579
4610
|
*/
|
|
4580
|
-
addDataProductToDomain: addDataProductToDomain((0,
|
|
4611
|
+
addDataProductToDomain: addDataProductToDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4581
4612
|
/**
|
|
4582
4613
|
* ================================
|
|
4583
4614
|
* Diagrams
|
|
@@ -4589,13 +4620,13 @@ var src_default = (path8) => {
|
|
|
4589
4620
|
* @param version - Optional id of the version to get (supports semver)
|
|
4590
4621
|
* @returns Diagram|Undefined
|
|
4591
4622
|
*/
|
|
4592
|
-
getDiagram: getDiagram((0,
|
|
4623
|
+
getDiagram: getDiagram((0, import_node_path25.join)(path9)),
|
|
4593
4624
|
/**
|
|
4594
4625
|
* Returns all diagrams from EventCatalog
|
|
4595
4626
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4596
4627
|
* @returns Diagram[]|Undefined
|
|
4597
4628
|
*/
|
|
4598
|
-
getDiagrams: getDiagrams((0,
|
|
4629
|
+
getDiagrams: getDiagrams((0, import_node_path25.join)(path9)),
|
|
4599
4630
|
/**
|
|
4600
4631
|
* Adds a diagram to EventCatalog
|
|
4601
4632
|
*
|
|
@@ -4603,33 +4634,33 @@ var src_default = (path8) => {
|
|
|
4603
4634
|
* @param options - Optional options to write the diagram
|
|
4604
4635
|
*
|
|
4605
4636
|
*/
|
|
4606
|
-
writeDiagram: writeDiagram((0,
|
|
4637
|
+
writeDiagram: writeDiagram((0, import_node_path25.join)(path9, "diagrams")),
|
|
4607
4638
|
/**
|
|
4608
4639
|
* Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4609
4640
|
*
|
|
4610
4641
|
* @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
|
|
4611
4642
|
*
|
|
4612
4643
|
*/
|
|
4613
|
-
rmDiagram: rmDiagram((0,
|
|
4644
|
+
rmDiagram: rmDiagram((0, import_node_path25.join)(path9, "diagrams")),
|
|
4614
4645
|
/**
|
|
4615
4646
|
* Remove a diagram by a diagram id
|
|
4616
4647
|
*
|
|
4617
4648
|
* @param id - The id of the diagram you want to remove
|
|
4618
4649
|
*
|
|
4619
4650
|
*/
|
|
4620
|
-
rmDiagramById: rmDiagramById((0,
|
|
4651
|
+
rmDiagramById: rmDiagramById((0, import_node_path25.join)(path9)),
|
|
4621
4652
|
/**
|
|
4622
4653
|
* Moves a given diagram id to the version directory
|
|
4623
4654
|
* @param id - The id of the diagram to version
|
|
4624
4655
|
*/
|
|
4625
|
-
versionDiagram: versionDiagram((0,
|
|
4656
|
+
versionDiagram: versionDiagram((0, import_node_path25.join)(path9)),
|
|
4626
4657
|
/**
|
|
4627
4658
|
* Check to see if a diagram version exists
|
|
4628
4659
|
* @param id - The id of the diagram
|
|
4629
4660
|
* @param version - The version of the diagram (supports semver)
|
|
4630
4661
|
* @returns
|
|
4631
4662
|
*/
|
|
4632
|
-
diagramHasVersion: diagramHasVersion((0,
|
|
4663
|
+
diagramHasVersion: diagramHasVersion((0, import_node_path25.join)(path9)),
|
|
4633
4664
|
/**
|
|
4634
4665
|
* Adds a file to the given diagram
|
|
4635
4666
|
* @param id - The id of the diagram to add the file to
|
|
@@ -4637,7 +4668,7 @@ var src_default = (path8) => {
|
|
|
4637
4668
|
* @param version - Optional version of the diagram to add the file to
|
|
4638
4669
|
* @returns
|
|
4639
4670
|
*/
|
|
4640
|
-
addFileToDiagram: addFileToDiagram((0,
|
|
4671
|
+
addFileToDiagram: addFileToDiagram((0, import_node_path25.join)(path9)),
|
|
4641
4672
|
/**
|
|
4642
4673
|
* ================================
|
|
4643
4674
|
* DSL
|
|
@@ -4656,21 +4687,21 @@ var src_default = (path8) => {
|
|
|
4656
4687
|
* const dsl = await sdk.toDSL(services, { type: 'service', hydrate: true });
|
|
4657
4688
|
* ```
|
|
4658
4689
|
*/
|
|
4659
|
-
createSnapshot: createSnapshot((0,
|
|
4660
|
-
diffSnapshots: diffSnapshots((0,
|
|
4661
|
-
listSnapshots: listSnapshots((0,
|
|
4662
|
-
toDSL: toDSL((0,
|
|
4663
|
-
getEvent: getEvent((0,
|
|
4664
|
-
getCommand: getCommand((0,
|
|
4665
|
-
getQuery: getQuery((0,
|
|
4666
|
-
getService: getService((0,
|
|
4667
|
-
getServices: getServices((0,
|
|
4668
|
-
getDomain: getDomain((0,
|
|
4669
|
-
getChannel: getChannel((0,
|
|
4670
|
-
getChannels: getChannels((0,
|
|
4671
|
-
getContainer: getDataStore((0,
|
|
4672
|
-
getTeam: getTeam((0,
|
|
4673
|
-
getUser: getUser((0,
|
|
4690
|
+
createSnapshot: createSnapshot((0, import_node_path25.join)(path9)),
|
|
4691
|
+
diffSnapshots: diffSnapshots((0, import_node_path25.join)(path9)),
|
|
4692
|
+
listSnapshots: listSnapshots((0, import_node_path25.join)(path9)),
|
|
4693
|
+
toDSL: toDSL((0, import_node_path25.join)(path9), {
|
|
4694
|
+
getEvent: getEvent((0, import_node_path25.join)(path9)),
|
|
4695
|
+
getCommand: getCommand((0, import_node_path25.join)(path9)),
|
|
4696
|
+
getQuery: getQuery((0, import_node_path25.join)(path9)),
|
|
4697
|
+
getService: getService((0, import_node_path25.join)(path9)),
|
|
4698
|
+
getServices: getServices((0, import_node_path25.join)(path9)),
|
|
4699
|
+
getDomain: getDomain((0, import_node_path25.join)(path9, "domains")),
|
|
4700
|
+
getChannel: getChannel((0, import_node_path25.join)(path9)),
|
|
4701
|
+
getChannels: getChannels((0, import_node_path25.join)(path9)),
|
|
4702
|
+
getContainer: getDataStore((0, import_node_path25.join)(path9)),
|
|
4703
|
+
getTeam: getTeam((0, import_node_path25.join)(path9, "teams")),
|
|
4704
|
+
getUser: getUser((0, import_node_path25.join)(path9, "users"))
|
|
4674
4705
|
})
|
|
4675
4706
|
};
|
|
4676
4707
|
};
|