@eventcatalog/sdk 2.24.1 → 2.25.0-beta.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 +194 -9
- package/dist/index.d.ts +194 -9
- package/dist/index.js +521 -283
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +498 -260
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import { join as
|
|
2
|
+
import { join as join21 } from "path";
|
|
3
3
|
|
|
4
4
|
// src/dsl/utils.ts
|
|
5
5
|
import { globSync } from "glob";
|
|
@@ -1317,6 +1317,14 @@ var writeServiceToDomain = (directory) => async (service, domain, options = { pa
|
|
|
1317
1317
|
pathForService = join6(pathForService, service.id);
|
|
1318
1318
|
await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
|
|
1319
1319
|
};
|
|
1320
|
+
var writeServiceToSystem = (directory) => async (service, system, options = { path: "", format: "mdx", override: false }) => {
|
|
1321
|
+
const resourcePath = await getResourcePath(directory, system.id, system.version);
|
|
1322
|
+
if (!resourcePath) {
|
|
1323
|
+
throw new Error("System not found");
|
|
1324
|
+
}
|
|
1325
|
+
const pathForService = join6(resourcePath.directory, "services", service.id);
|
|
1326
|
+
await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
|
|
1327
|
+
};
|
|
1320
1328
|
var versionService = (directory) => async (id) => versionResource(directory, id);
|
|
1321
1329
|
var rmService = (directory) => async (path9) => {
|
|
1322
1330
|
await fs5.rm(join6(directory, path9), { recursive: true });
|
|
@@ -1459,15 +1467,129 @@ var addDataStoreToService = (directory) => async (id, operation, dataStore, vers
|
|
|
1459
1467
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
1460
1468
|
};
|
|
1461
1469
|
|
|
1462
|
-
// src/
|
|
1470
|
+
// src/systems.ts
|
|
1463
1471
|
import fs6 from "fs/promises";
|
|
1464
1472
|
import { extname as extname2, join as join7, relative as relative3 } from "path";
|
|
1473
|
+
var SYSTEM_RESOURCE_IGNORES = [
|
|
1474
|
+
"**/systems/**/agents/**",
|
|
1475
|
+
"**/systems/**/services/**",
|
|
1476
|
+
"**/systems/**/events/**",
|
|
1477
|
+
"**/systems/**/commands/**",
|
|
1478
|
+
"**/systems/**/queries/**",
|
|
1479
|
+
"**/systems/**/flows/**",
|
|
1480
|
+
"**/systems/**/channels/**",
|
|
1481
|
+
"**/systems/**/entities/**",
|
|
1482
|
+
"**/systems/**/containers/**",
|
|
1483
|
+
"**/systems/**/diagrams/**",
|
|
1484
|
+
"**/systems/**/data-products/**",
|
|
1485
|
+
"**/systems/**/adrs/**",
|
|
1486
|
+
"**/systems/**/docs/**"
|
|
1487
|
+
];
|
|
1488
|
+
var normalizeResourcePointers = (system) => {
|
|
1489
|
+
const resource = { ...system };
|
|
1490
|
+
if (Array.isArray(system.services)) {
|
|
1491
|
+
resource.services = uniqueVersions(system.services);
|
|
1492
|
+
}
|
|
1493
|
+
if (Array.isArray(system.flows)) {
|
|
1494
|
+
resource.flows = uniqueVersions(system.flows);
|
|
1495
|
+
}
|
|
1496
|
+
if (Array.isArray(system.entities)) {
|
|
1497
|
+
resource.entities = uniqueVersions(system.entities);
|
|
1498
|
+
}
|
|
1499
|
+
if (Array.isArray(system.containers)) {
|
|
1500
|
+
resource.containers = uniqueVersions(system.containers);
|
|
1501
|
+
}
|
|
1502
|
+
return resource;
|
|
1503
|
+
};
|
|
1504
|
+
var persistSystemAtExistingPath = async (directory, system, version) => {
|
|
1505
|
+
const systemPath = await getResourcePath(directory, system.id, version);
|
|
1506
|
+
const extension = extname2(systemPath?.fullPath || "");
|
|
1507
|
+
if (!systemPath) {
|
|
1508
|
+
throw new Error(`Cannot find system ${system.id} in the catalog`);
|
|
1509
|
+
}
|
|
1510
|
+
await rmSystemById(directory)(system.id, version, true);
|
|
1511
|
+
await writeSystem(directory)(system, {
|
|
1512
|
+
path: systemPath.directory,
|
|
1513
|
+
format: extension === ".md" ? "md" : "mdx"
|
|
1514
|
+
});
|
|
1515
|
+
};
|
|
1516
|
+
var getSystem = (directory) => async (id, version) => getResource(directory, id, version, { type: "system" });
|
|
1517
|
+
var getSystemByPath = (directory) => async (path9) => {
|
|
1518
|
+
const system = await getResource(directory, void 0, void 0, { type: "system" }, path9);
|
|
1519
|
+
return system;
|
|
1520
|
+
};
|
|
1521
|
+
var getSystems = (directory) => async (options) => getResources(directory, {
|
|
1522
|
+
type: "systems",
|
|
1523
|
+
ignore: SYSTEM_RESOURCE_IGNORES,
|
|
1524
|
+
latestOnly: options?.latestOnly
|
|
1525
|
+
});
|
|
1526
|
+
var writeSystem = (directory) => async (system, options = {
|
|
1527
|
+
path: "",
|
|
1528
|
+
override: false,
|
|
1529
|
+
format: "mdx"
|
|
1530
|
+
}) => {
|
|
1531
|
+
const resource = normalizeResourcePointers(system);
|
|
1532
|
+
return await writeResource(directory, resource, { ...options, type: "system" });
|
|
1533
|
+
};
|
|
1534
|
+
var writeSystemToDomain = (directory) => async (system, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
1535
|
+
const resourcePath = await getResourcePath(directory, domain.id, domain.version);
|
|
1536
|
+
if (!resourcePath) {
|
|
1537
|
+
throw new Error("Domain not found");
|
|
1538
|
+
}
|
|
1539
|
+
const pathForSystem = join7(resourcePath.directory, "systems", system.id);
|
|
1540
|
+
await writeSystem(directory)({ ...system }, { ...options, path: pathForSystem });
|
|
1541
|
+
};
|
|
1542
|
+
var versionSystem = (directory) => async (id) => versionResource(directory, id);
|
|
1543
|
+
var rmSystem = (directory) => async (path9) => {
|
|
1544
|
+
await fs6.rm(join7(directory, path9), { recursive: true });
|
|
1545
|
+
invalidateFileCache();
|
|
1546
|
+
};
|
|
1547
|
+
var rmSystemById = (directory) => async (id, version, persistFiles) => {
|
|
1548
|
+
await rmResourceById(directory, id, version, { type: "system", persistFiles });
|
|
1549
|
+
};
|
|
1550
|
+
var addFileToSystem = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
1551
|
+
var systemHasVersion = (directory) => async (id, version) => {
|
|
1552
|
+
const file = await findFileById(directory, id, version);
|
|
1553
|
+
return !!file;
|
|
1554
|
+
};
|
|
1555
|
+
var isSystem = (directory) => async (path9) => {
|
|
1556
|
+
const system = await getSystemByPath(directory)(path9);
|
|
1557
|
+
const relativePath = relative3(directory, path9);
|
|
1558
|
+
const segments = relativePath.split(/[/\\]+/);
|
|
1559
|
+
return !!system && segments.includes("systems");
|
|
1560
|
+
};
|
|
1561
|
+
var toSystem = (directory) => async (file) => toResource(directory, file);
|
|
1562
|
+
var addResourceToSystem = (directory, resourceField) => async (id, resource, version) => {
|
|
1563
|
+
const system = await getSystem(directory)(id, version);
|
|
1564
|
+
if (!system) {
|
|
1565
|
+
throw new Error(`Cannot find system ${id} in the catalog`);
|
|
1566
|
+
}
|
|
1567
|
+
if (system[resourceField] === void 0) {
|
|
1568
|
+
system[resourceField] = [];
|
|
1569
|
+
}
|
|
1570
|
+
const resourceExistsInList = system[resourceField]?.some(
|
|
1571
|
+
(item) => item.id === resource.id && item.version === resource.version
|
|
1572
|
+
);
|
|
1573
|
+
if (resourceExistsInList) {
|
|
1574
|
+
return;
|
|
1575
|
+
}
|
|
1576
|
+
system[resourceField]?.push(resource);
|
|
1577
|
+
await persistSystemAtExistingPath(directory, system, version);
|
|
1578
|
+
};
|
|
1579
|
+
var addServiceToSystem = (directory) => addResourceToSystem(directory, "services");
|
|
1580
|
+
var addFlowToSystem = (directory) => addResourceToSystem(directory, "flows");
|
|
1581
|
+
var addEntityToSystem = (directory) => addResourceToSystem(directory, "entities");
|
|
1582
|
+
var addContainerToSystem = (directory) => addResourceToSystem(directory, "containers");
|
|
1583
|
+
|
|
1584
|
+
// src/agents.ts
|
|
1585
|
+
import fs7 from "fs/promises";
|
|
1586
|
+
import { extname as extname3, join as join8, relative as relative4 } from "path";
|
|
1465
1587
|
var rewriteAgent = async (directory, id, agent, version) => {
|
|
1466
1588
|
const agentPath = await getResourcePath(directory, id, version);
|
|
1467
1589
|
if (!agentPath) {
|
|
1468
1590
|
throw new Error(`Cannot find agent ${id} in the catalog`);
|
|
1469
1591
|
}
|
|
1470
|
-
const extension =
|
|
1592
|
+
const extension = extname3(agentPath.fullPath);
|
|
1471
1593
|
await rmAgentById(directory)(id, version, true);
|
|
1472
1594
|
await writeAgent(directory)(agent, { path: agentPath.directory, format: extension === ".md" ? "md" : "mdx" });
|
|
1473
1595
|
};
|
|
@@ -1511,12 +1633,12 @@ var writeVersionedAgent = (directory) => async (agent) => {
|
|
|
1511
1633
|
};
|
|
1512
1634
|
var writeAgentToDomain = (directory) => async (agent, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
1513
1635
|
let pathForAgent = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/agents` : `/${domain.id}/agents`;
|
|
1514
|
-
pathForAgent =
|
|
1636
|
+
pathForAgent = join8(pathForAgent, agent.id);
|
|
1515
1637
|
await writeResource(directory, { ...agent }, { ...options, path: pathForAgent, type: "agent" });
|
|
1516
1638
|
};
|
|
1517
1639
|
var versionAgent = (directory) => async (id) => versionResource(directory, id);
|
|
1518
1640
|
var rmAgent = (directory) => async (path9) => {
|
|
1519
|
-
await
|
|
1641
|
+
await fs7.rm(join8(directory, path9), { recursive: true });
|
|
1520
1642
|
invalidateFileCache();
|
|
1521
1643
|
};
|
|
1522
1644
|
var rmAgentById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1590,15 +1712,15 @@ var agentHasVersion = (directory) => async (id, version) => {
|
|
|
1590
1712
|
};
|
|
1591
1713
|
var isAgent = (directory) => async (path9) => {
|
|
1592
1714
|
const agent = await getAgentByPath(directory)(path9);
|
|
1593
|
-
const relativePath =
|
|
1715
|
+
const relativePath = relative4(directory, path9);
|
|
1594
1716
|
const segments = relativePath.split(/[/\\]+/);
|
|
1595
1717
|
return !!agent && segments.includes("agents");
|
|
1596
1718
|
};
|
|
1597
1719
|
var toAgent = (directory) => async (file) => toResource(directory, file);
|
|
1598
1720
|
|
|
1599
1721
|
// src/domains.ts
|
|
1600
|
-
import
|
|
1601
|
-
import path2, { join as
|
|
1722
|
+
import fs8 from "fs/promises";
|
|
1723
|
+
import path2, { join as join9 } from "path";
|
|
1602
1724
|
import fsSync3 from "fs";
|
|
1603
1725
|
import matter3 from "gray-matter";
|
|
1604
1726
|
var resolveDomainWriteDirectory = async (directory, id, version) => {
|
|
@@ -1642,6 +1764,9 @@ var writeDomain = (directory) => async (domain, options = {
|
|
|
1642
1764
|
if (Array.isArray(domain.domains)) {
|
|
1643
1765
|
resource.domains = uniqueVersions(domain.domains);
|
|
1644
1766
|
}
|
|
1767
|
+
if (Array.isArray(domain.systems)) {
|
|
1768
|
+
resource.systems = uniqueVersions(domain.systems);
|
|
1769
|
+
}
|
|
1645
1770
|
if (Array.isArray(domain.sends)) {
|
|
1646
1771
|
resource.sends = uniqueVersions(domain.sends);
|
|
1647
1772
|
}
|
|
@@ -1655,7 +1780,7 @@ var writeDomain = (directory) => async (domain, options = {
|
|
|
1655
1780
|
};
|
|
1656
1781
|
var versionDomain = (directory) => async (id) => versionResource(directory, id);
|
|
1657
1782
|
var rmDomain = (directory) => async (path9) => {
|
|
1658
|
-
await
|
|
1783
|
+
await fs8.rm(join9(directory, path9), { recursive: true });
|
|
1659
1784
|
invalidateFileCache();
|
|
1660
1785
|
};
|
|
1661
1786
|
var rmDomainById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "domain", persistFiles });
|
|
@@ -1728,6 +1853,22 @@ var addSubDomainToDomain = (directory) => async (id, subDomain, version) => {
|
|
|
1728
1853
|
await rmDomainById(directory)(id, version, true);
|
|
1729
1854
|
await writeDomain(writeDir)(domain, { format: extension === ".md" ? "md" : "mdx" });
|
|
1730
1855
|
};
|
|
1856
|
+
var addSystemToDomain = (directory) => async (id, system, version) => {
|
|
1857
|
+
let domain = await getDomain(directory)(id, version);
|
|
1858
|
+
const domainPath = await getResourcePath(directory, id, version);
|
|
1859
|
+
const extension = path2.extname(domainPath?.fullPath || "");
|
|
1860
|
+
if (domain.systems === void 0) {
|
|
1861
|
+
domain.systems = [];
|
|
1862
|
+
}
|
|
1863
|
+
const systemExistsInList = domain.systems.some((s) => s.id === system.id && s.version === system.version);
|
|
1864
|
+
if (systemExistsInList) {
|
|
1865
|
+
return;
|
|
1866
|
+
}
|
|
1867
|
+
domain.systems.push(system);
|
|
1868
|
+
const writeDir = await resolveDomainWriteDirectory(directory, id, version);
|
|
1869
|
+
await rmDomainById(directory)(id, version, true);
|
|
1870
|
+
await writeDomain(writeDir)(domain, { format: extension === ".md" ? "md" : "mdx" });
|
|
1871
|
+
};
|
|
1731
1872
|
var addEntityToDomain = (directory) => async (id, entity, version) => {
|
|
1732
1873
|
let domain = await getDomain(directory)(id, version);
|
|
1733
1874
|
const domainPath = await getResourcePath(directory, id, version);
|
|
@@ -1795,13 +1936,13 @@ var addMessageToDomain = (directory) => async (id, direction, message, version)
|
|
|
1795
1936
|
};
|
|
1796
1937
|
|
|
1797
1938
|
// src/channels.ts
|
|
1798
|
-
import
|
|
1799
|
-
import { join as
|
|
1939
|
+
import fs9 from "fs/promises";
|
|
1940
|
+
import { join as join10, extname as extname4 } from "path";
|
|
1800
1941
|
var getChannel = (directory) => async (id, version) => getResource(directory, id, version, { type: "channel" });
|
|
1801
1942
|
var getChannels = (directory) => async (options) => getResources(directory, { type: "channels", ...options });
|
|
1802
1943
|
var writeChannel = (directory) => async (channel, options = { path: "" }) => writeResource(directory, { ...channel }, { ...options, type: "channel" });
|
|
1803
1944
|
var rmChannel = (directory) => async (path9) => {
|
|
1804
|
-
await
|
|
1945
|
+
await fs9.rm(join10(directory, path9), { recursive: true });
|
|
1805
1946
|
invalidateFileCache();
|
|
1806
1947
|
};
|
|
1807
1948
|
var rmChannelById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "channel", persistFiles });
|
|
@@ -1832,7 +1973,7 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
1832
1973
|
const { getMessage: getMessage2, rmMessageById, writeMessage } = functions[collection];
|
|
1833
1974
|
const message = await getMessage2(directory)(_message.id, _message.version);
|
|
1834
1975
|
const messagePath = await getResourcePath(directory, _message.id, _message.version);
|
|
1835
|
-
const extension =
|
|
1976
|
+
const extension = extname4(messagePath?.fullPath || "");
|
|
1836
1977
|
if (!message) throw new Error(`Message ${_message.id} with version ${_message.version} not found`);
|
|
1837
1978
|
if (message.channels === void 0) {
|
|
1838
1979
|
message.channels = [];
|
|
@@ -1844,13 +1985,13 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
1844
1985
|
throw new Error(`Cannot find message ${id} in the catalog`);
|
|
1845
1986
|
}
|
|
1846
1987
|
const path9 = existingResource.split(new RegExp(`[\\\\/]+${collection}`))[0];
|
|
1847
|
-
const pathToResource =
|
|
1988
|
+
const pathToResource = join10(path9, collection);
|
|
1848
1989
|
await rmMessageById(directory)(_message.id, _message.version, true);
|
|
1849
1990
|
await writeMessage(pathToResource)(message, { format: extension === ".md" ? "md" : "mdx" });
|
|
1850
1991
|
};
|
|
1851
1992
|
|
|
1852
1993
|
// src/messages.ts
|
|
1853
|
-
import { dirname as dirname5, join as
|
|
1994
|
+
import { dirname as dirname5, join as join11 } from "path";
|
|
1854
1995
|
import fsSync4 from "fs";
|
|
1855
1996
|
import matter4 from "gray-matter";
|
|
1856
1997
|
import { satisfies as satisfies4, validRange as validRange3 } from "semver";
|
|
@@ -1954,7 +2095,7 @@ var getSchemaForMessage = (directory) => async (id, version) => {
|
|
|
1954
2095
|
const { data } = matter4.read(file);
|
|
1955
2096
|
if (!data.schemaPath) return void 0;
|
|
1956
2097
|
const resourceDirectory = dirname5(file);
|
|
1957
|
-
const pathToSchema =
|
|
2098
|
+
const pathToSchema = join11(resourceDirectory, data.schemaPath);
|
|
1958
2099
|
if (!fsSync4.existsSync(pathToSchema)) return void 0;
|
|
1959
2100
|
const schema = fsSync4.readFileSync(pathToSchema, "utf8");
|
|
1960
2101
|
return {
|
|
@@ -1964,9 +2105,9 @@ var getSchemaForMessage = (directory) => async (id, version) => {
|
|
|
1964
2105
|
};
|
|
1965
2106
|
|
|
1966
2107
|
// src/custom-docs.ts
|
|
1967
|
-
import path3, { join as
|
|
2108
|
+
import path3, { join as join12 } from "path";
|
|
1968
2109
|
import fsSync5 from "fs";
|
|
1969
|
-
import
|
|
2110
|
+
import fs10 from "fs/promises";
|
|
1970
2111
|
import matter5 from "gray-matter";
|
|
1971
2112
|
import slugify from "slugify";
|
|
1972
2113
|
var getCustomDoc = (directory) => async (filePath) => {
|
|
@@ -1997,24 +2138,24 @@ var writeCustomDoc = (directory) => async (customDoc, options = { path: "" }) =>
|
|
|
1997
2138
|
};
|
|
1998
2139
|
var rmCustomDoc = (directory) => async (filePath) => {
|
|
1999
2140
|
const withExtension = filePath.endsWith(".mdx") ? filePath : `${filePath}.mdx`;
|
|
2000
|
-
await
|
|
2141
|
+
await fs10.rm(join12(directory, withExtension), { recursive: true });
|
|
2001
2142
|
invalidateFileCache();
|
|
2002
2143
|
};
|
|
2003
2144
|
|
|
2004
2145
|
// src/teams.ts
|
|
2005
|
-
import
|
|
2146
|
+
import fs12 from "fs/promises";
|
|
2006
2147
|
import fsSync7 from "fs";
|
|
2007
|
-
import { join as
|
|
2148
|
+
import { join as join14 } from "path";
|
|
2008
2149
|
import matter7 from "gray-matter";
|
|
2009
2150
|
import path5 from "path";
|
|
2010
2151
|
|
|
2011
2152
|
// src/users.ts
|
|
2012
2153
|
import fsSync6 from "fs";
|
|
2013
|
-
import { join as
|
|
2154
|
+
import { join as join13 } from "path";
|
|
2014
2155
|
import matter6 from "gray-matter";
|
|
2015
2156
|
|
|
2016
2157
|
// src/internal/directory-store.ts
|
|
2017
|
-
import
|
|
2158
|
+
import fs11 from "fs";
|
|
2018
2159
|
import path4 from "path";
|
|
2019
2160
|
var DIRECTORY_STORE_PATH = path4.join(".eventcatalog", "store", "directory.json");
|
|
2020
2161
|
var getCatalogRoot = (catalogDir, collection) => {
|
|
@@ -2025,9 +2166,9 @@ var getDirectoryStorePath = (catalogDir, collection) => {
|
|
|
2025
2166
|
};
|
|
2026
2167
|
var readDirectoryStoreResources = (catalogDir, collection) => {
|
|
2027
2168
|
const storePath = getDirectoryStorePath(catalogDir, collection);
|
|
2028
|
-
if (!
|
|
2169
|
+
if (!fs11.existsSync(storePath)) return [];
|
|
2029
2170
|
try {
|
|
2030
|
-
const store = JSON.parse(
|
|
2171
|
+
const store = JSON.parse(fs11.readFileSync(storePath, "utf8"));
|
|
2031
2172
|
const resources = store.resources?.[collection];
|
|
2032
2173
|
return Array.isArray(resources) ? resources : [];
|
|
2033
2174
|
} catch {
|
|
@@ -2079,12 +2220,12 @@ var writeUser = (catalogDir) => async (user, options = {}) => {
|
|
|
2079
2220
|
}
|
|
2080
2221
|
const { markdown, ...frontmatter } = resource;
|
|
2081
2222
|
const document = matter6.stringify(markdown, frontmatter);
|
|
2082
|
-
fsSync6.mkdirSync(
|
|
2083
|
-
fsSync6.writeFileSync(
|
|
2223
|
+
fsSync6.mkdirSync(join13(catalogDir, ""), { recursive: true });
|
|
2224
|
+
fsSync6.writeFileSync(join13(catalogDir, "", `${resource.id}.mdx`), document);
|
|
2084
2225
|
invalidateFileCache();
|
|
2085
2226
|
};
|
|
2086
2227
|
var rmUserById = (catalogDir) => async (id) => {
|
|
2087
|
-
fsSync6.rmSync(
|
|
2228
|
+
fsSync6.rmSync(join13(catalogDir, `${id}.mdx`), { recursive: true });
|
|
2088
2229
|
invalidateFileCache();
|
|
2089
2230
|
};
|
|
2090
2231
|
|
|
@@ -2123,12 +2264,12 @@ var writeTeam = (catalogDir) => async (team, options = {}) => {
|
|
|
2123
2264
|
}
|
|
2124
2265
|
const { markdown, ...frontmatter } = resource;
|
|
2125
2266
|
const document = matter7.stringify(markdown, frontmatter);
|
|
2126
|
-
fsSync7.mkdirSync(
|
|
2127
|
-
fsSync7.writeFileSync(
|
|
2267
|
+
fsSync7.mkdirSync(join14(catalogDir, ""), { recursive: true });
|
|
2268
|
+
fsSync7.writeFileSync(join14(catalogDir, "", `${resource.id}.mdx`), document);
|
|
2128
2269
|
invalidateFileCache();
|
|
2129
2270
|
};
|
|
2130
2271
|
var rmTeamById = (catalogDir) => async (id) => {
|
|
2131
|
-
await
|
|
2272
|
+
await fs12.rm(join14(catalogDir, `${id}.mdx`), { recursive: true });
|
|
2132
2273
|
invalidateFileCache();
|
|
2133
2274
|
};
|
|
2134
2275
|
var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
@@ -2151,12 +2292,12 @@ var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
|
2151
2292
|
};
|
|
2152
2293
|
|
|
2153
2294
|
// src/eventcatalog.ts
|
|
2154
|
-
import
|
|
2155
|
-
import path6, { join as
|
|
2295
|
+
import fs13 from "fs";
|
|
2296
|
+
import path6, { join as join15 } from "path";
|
|
2156
2297
|
var DUMP_VERSION = "0.0.1";
|
|
2157
2298
|
var getEventCatalogVersion = async (catalogDir) => {
|
|
2158
2299
|
try {
|
|
2159
|
-
const packageJson =
|
|
2300
|
+
const packageJson = fs13.readFileSync(join15(catalogDir, "package.json"), "utf8");
|
|
2160
2301
|
const packageJsonObject = JSON.parse(packageJson);
|
|
2161
2302
|
return packageJsonObject["dependencies"]["@eventcatalog/core"];
|
|
2162
2303
|
} catch (error) {
|
|
@@ -2170,8 +2311,8 @@ var hydrateResource = async (catalogDir, resources = [], { attachSchema = false
|
|
|
2170
2311
|
let schema = "";
|
|
2171
2312
|
if (resource.schemaPath && resourcePath?.fullPath) {
|
|
2172
2313
|
const pathToSchema = path6.join(path6.dirname(resourcePath?.fullPath), resource.schemaPath);
|
|
2173
|
-
if (
|
|
2174
|
-
schema =
|
|
2314
|
+
if (fs13.existsSync(pathToSchema)) {
|
|
2315
|
+
schema = fs13.readFileSync(pathToSchema, "utf8");
|
|
2175
2316
|
}
|
|
2176
2317
|
}
|
|
2177
2318
|
const eventcatalog = schema ? { directory: resourcePath?.directory, schema } : { directory: resourcePath?.directory };
|
|
@@ -2190,7 +2331,7 @@ var filterCollection = (collection, options) => {
|
|
|
2190
2331
|
};
|
|
2191
2332
|
var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
2192
2333
|
try {
|
|
2193
|
-
const path9 =
|
|
2334
|
+
const path9 = join15(directory, "eventcatalog.config.js");
|
|
2194
2335
|
const configModule = await import(path9);
|
|
2195
2336
|
return configModule.default;
|
|
2196
2337
|
} catch (error) {
|
|
@@ -2201,6 +2342,7 @@ var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
|
2201
2342
|
var dumpCatalog = (directory) => async (options) => {
|
|
2202
2343
|
const {
|
|
2203
2344
|
getDomains: getDomains2,
|
|
2345
|
+
getSystems: getSystems2,
|
|
2204
2346
|
getServices: getServices2,
|
|
2205
2347
|
getAgents: getAgents2,
|
|
2206
2348
|
getEvents: getEvents2,
|
|
@@ -2215,6 +2357,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2215
2357
|
} = src_default(directory);
|
|
2216
2358
|
const { includeMarkdown = true } = options || {};
|
|
2217
2359
|
const domains = await getDomains2();
|
|
2360
|
+
const systems = await getSystems2();
|
|
2218
2361
|
const services = await getServices2();
|
|
2219
2362
|
const agents = await getAgents2();
|
|
2220
2363
|
const events = await getEvents2();
|
|
@@ -2228,6 +2371,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2228
2371
|
const flows = await getFlows2();
|
|
2229
2372
|
const [
|
|
2230
2373
|
hydratedDomains,
|
|
2374
|
+
hydratedSystems,
|
|
2231
2375
|
hydratedServices,
|
|
2232
2376
|
hydratedAgents,
|
|
2233
2377
|
hydratedEvents,
|
|
@@ -2241,6 +2385,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2241
2385
|
hydratedFlows
|
|
2242
2386
|
] = await Promise.all([
|
|
2243
2387
|
hydrateResource(directory, domains),
|
|
2388
|
+
hydrateResource(directory, systems),
|
|
2244
2389
|
hydrateResource(directory, services),
|
|
2245
2390
|
hydrateResource(directory, agents),
|
|
2246
2391
|
hydrateResource(directory, events),
|
|
@@ -2259,6 +2404,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2259
2404
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2260
2405
|
resources: {
|
|
2261
2406
|
domains: filterCollection(hydratedDomains, { includeMarkdown }),
|
|
2407
|
+
systems: filterCollection(hydratedSystems, { includeMarkdown }),
|
|
2262
2408
|
services: filterCollection(hydratedServices, { includeMarkdown }),
|
|
2263
2409
|
agents: filterCollection(hydratedAgents, { includeMarkdown }),
|
|
2264
2410
|
messages: {
|
|
@@ -2277,7 +2423,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2277
2423
|
};
|
|
2278
2424
|
|
|
2279
2425
|
// src/snapshots.ts
|
|
2280
|
-
import
|
|
2426
|
+
import fs14 from "fs";
|
|
2281
2427
|
import path7 from "path";
|
|
2282
2428
|
import { createHash } from "crypto";
|
|
2283
2429
|
import { execSync } from "child_process";
|
|
@@ -2458,7 +2604,7 @@ var computeRelationshipDiff = (snapshotA, snapshotB) => {
|
|
|
2458
2604
|
var SNAPSHOT_VERSION = "1.0.0";
|
|
2459
2605
|
var getEventCatalogVersion2 = (catalogDir) => {
|
|
2460
2606
|
try {
|
|
2461
|
-
const packageJson =
|
|
2607
|
+
const packageJson = fs14.readFileSync(path7.join(catalogDir, "package.json"), "utf8");
|
|
2462
2608
|
const packageJsonObject = JSON.parse(packageJson);
|
|
2463
2609
|
return packageJsonObject["dependencies"]?.["@eventcatalog/core"] ?? "unknown";
|
|
2464
2610
|
} catch {
|
|
@@ -2556,16 +2702,16 @@ var createSnapshot = (directory) => {
|
|
|
2556
2702
|
}
|
|
2557
2703
|
};
|
|
2558
2704
|
const snapshotsDir = outputDir || path7.join(directory, ".snapshots");
|
|
2559
|
-
|
|
2705
|
+
fs14.mkdirSync(snapshotsDir, { recursive: true });
|
|
2560
2706
|
const fileName = `${snapshotLabel}.snapshot.json`;
|
|
2561
2707
|
const filePath = path7.join(snapshotsDir, fileName);
|
|
2562
|
-
|
|
2708
|
+
fs14.writeFileSync(filePath, JSON.stringify(snapshot));
|
|
2563
2709
|
return { filePath, snapshot };
|
|
2564
2710
|
};
|
|
2565
2711
|
};
|
|
2566
2712
|
var diffSnapshots = (directory) => async (snapshotAPath, snapshotBPath) => {
|
|
2567
|
-
const snapshotA = JSON.parse(
|
|
2568
|
-
const snapshotB = JSON.parse(
|
|
2713
|
+
const snapshotA = JSON.parse(fs14.readFileSync(snapshotAPath, "utf-8"));
|
|
2714
|
+
const snapshotB = JSON.parse(fs14.readFileSync(snapshotBPath, "utf-8"));
|
|
2569
2715
|
const resourceChanges = computeResourceDiff(snapshotA, snapshotB);
|
|
2570
2716
|
const relationshipChanges = computeRelationshipDiff(snapshotA, snapshotB);
|
|
2571
2717
|
const resourceCounts = { added: 0, removed: 0, modified: 0, versioned: 0 };
|
|
@@ -2590,13 +2736,13 @@ var diffSnapshots = (directory) => async (snapshotAPath, snapshotBPath) => {
|
|
|
2590
2736
|
};
|
|
2591
2737
|
var listSnapshots = (directory) => async () => {
|
|
2592
2738
|
const snapshotsDir = path7.join(directory, ".snapshots");
|
|
2593
|
-
if (!
|
|
2594
|
-
const files =
|
|
2739
|
+
if (!fs14.existsSync(snapshotsDir)) return [];
|
|
2740
|
+
const files = fs14.readdirSync(snapshotsDir).filter((f) => f.endsWith(".snapshot.json"));
|
|
2595
2741
|
const snapshots = [];
|
|
2596
2742
|
for (const file of files) {
|
|
2597
2743
|
try {
|
|
2598
2744
|
const filePath = path7.join(snapshotsDir, file);
|
|
2599
|
-
const content = JSON.parse(
|
|
2745
|
+
const content = JSON.parse(fs14.readFileSync(filePath, "utf-8"));
|
|
2600
2746
|
snapshots.push({
|
|
2601
2747
|
label: content.label,
|
|
2602
2748
|
createdAt: content.createdAt,
|
|
@@ -2612,7 +2758,7 @@ var listSnapshots = (directory) => async () => {
|
|
|
2612
2758
|
// src/changelogs.ts
|
|
2613
2759
|
import path8, { dirname as dirname6 } from "path";
|
|
2614
2760
|
import fsSync8 from "fs";
|
|
2615
|
-
import
|
|
2761
|
+
import fs15 from "fs/promises";
|
|
2616
2762
|
import matter8 from "gray-matter";
|
|
2617
2763
|
var writeChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
2618
2764
|
const { version, format = "mdx" } = options;
|
|
@@ -2689,17 +2835,17 @@ var rmChangelog = (catalogDir) => async (id, options = {}) => {
|
|
|
2689
2835
|
const mdxPath = path8.join(resourceDir, "changelog.mdx");
|
|
2690
2836
|
const mdPath = path8.join(resourceDir, "changelog.md");
|
|
2691
2837
|
if (fsSync8.existsSync(mdxPath)) {
|
|
2692
|
-
await
|
|
2838
|
+
await fs15.rm(mdxPath);
|
|
2693
2839
|
}
|
|
2694
2840
|
if (fsSync8.existsSync(mdPath)) {
|
|
2695
|
-
await
|
|
2841
|
+
await fs15.rm(mdPath);
|
|
2696
2842
|
}
|
|
2697
2843
|
invalidateFileCache();
|
|
2698
2844
|
};
|
|
2699
2845
|
|
|
2700
2846
|
// src/entities.ts
|
|
2701
|
-
import
|
|
2702
|
-
import { join as
|
|
2847
|
+
import fs16 from "fs/promises";
|
|
2848
|
+
import { join as join16 } from "path";
|
|
2703
2849
|
var getEntity = (directory) => async (id, version) => getResource(directory, id, version, { type: "entity" });
|
|
2704
2850
|
var getEntities = (directory) => async (options) => getResources(directory, { type: "entities", latestOnly: options?.latestOnly });
|
|
2705
2851
|
var writeEntity = (directory) => async (entity, options = {
|
|
@@ -2707,8 +2853,16 @@ var writeEntity = (directory) => async (entity, options = {
|
|
|
2707
2853
|
override: false,
|
|
2708
2854
|
format: "mdx"
|
|
2709
2855
|
}) => writeResource(directory, { ...entity }, { ...options, type: "entity" });
|
|
2856
|
+
var writeEntityToSystem = (directory) => async (entity, system, options = { path: "", format: "mdx", override: false }) => {
|
|
2857
|
+
const resourcePath = await getResourcePath(directory, system.id, system.version);
|
|
2858
|
+
if (!resourcePath) {
|
|
2859
|
+
throw new Error("System not found");
|
|
2860
|
+
}
|
|
2861
|
+
const pathForEntity = join16(resourcePath.directory, "entities", entity.id);
|
|
2862
|
+
await writeResource(directory, { ...entity }, { ...options, path: pathForEntity, type: "entity" });
|
|
2863
|
+
};
|
|
2710
2864
|
var rmEntity = (directory) => async (path9) => {
|
|
2711
|
-
await
|
|
2865
|
+
await fs16.rm(join16(directory, path9), { recursive: true });
|
|
2712
2866
|
invalidateFileCache();
|
|
2713
2867
|
};
|
|
2714
2868
|
var rmEntityById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -2721,8 +2875,8 @@ var entityHasVersion = (directory) => async (id, version) => {
|
|
|
2721
2875
|
};
|
|
2722
2876
|
|
|
2723
2877
|
// src/flows.ts
|
|
2724
|
-
import
|
|
2725
|
-
import { join as
|
|
2878
|
+
import fs17 from "fs/promises";
|
|
2879
|
+
import { join as join17 } from "path";
|
|
2726
2880
|
|
|
2727
2881
|
// src/flow-builder.ts
|
|
2728
2882
|
var cloneStep = (step) => ({
|
|
@@ -3204,21 +3358,29 @@ var writeVersionedFlow = (directory) => async (flow) => {
|
|
|
3204
3358
|
};
|
|
3205
3359
|
var writeFlowToDomain = (directory) => async (flow, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
3206
3360
|
let pathForFlow = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/flows` : `/${domain.id}/flows`;
|
|
3207
|
-
pathForFlow =
|
|
3361
|
+
pathForFlow = join17(pathForFlow, flow.id);
|
|
3208
3362
|
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3209
3363
|
};
|
|
3210
3364
|
var writeFlowToService = (directory) => async (flow, service, options = { path: "", format: "mdx", override: false }) => {
|
|
3211
3365
|
let pathForFlow = service.version && service.version !== "latest" ? `/${service.id}/versioned/${service.version}/flows` : `/${service.id}/flows`;
|
|
3212
|
-
pathForFlow =
|
|
3366
|
+
pathForFlow = join17(pathForFlow, flow.id);
|
|
3367
|
+
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3368
|
+
};
|
|
3369
|
+
var writeFlowToSystem = (directory) => async (flow, system, options = { path: "", format: "mdx", override: false }) => {
|
|
3370
|
+
const resourcePath = await getResourcePath(directory, system.id, system.version);
|
|
3371
|
+
if (!resourcePath) {
|
|
3372
|
+
throw new Error("System not found");
|
|
3373
|
+
}
|
|
3374
|
+
const pathForFlow = join17(resourcePath.directory, "flows", flow.id);
|
|
3213
3375
|
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3214
3376
|
};
|
|
3215
3377
|
var writeFlowToAgent = (directory) => async (flow, agent, options = { path: "", format: "mdx", override: false }) => {
|
|
3216
3378
|
let pathForFlow = agent.version && agent.version !== "latest" ? `/${agent.id}/versioned/${agent.version}/flows` : `/${agent.id}/flows`;
|
|
3217
|
-
pathForFlow =
|
|
3379
|
+
pathForFlow = join17(pathForFlow, flow.id);
|
|
3218
3380
|
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3219
3381
|
};
|
|
3220
3382
|
var rmFlow = (directory) => async (path9) => {
|
|
3221
|
-
await
|
|
3383
|
+
await fs17.rm(join17(directory, path9), { recursive: true });
|
|
3222
3384
|
invalidateFileCache();
|
|
3223
3385
|
};
|
|
3224
3386
|
var rmFlowById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3232,8 +3394,8 @@ var flowHasVersion = (directory) => async (id, version) => {
|
|
|
3232
3394
|
var addFileToFlow = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version, { type: "flow" });
|
|
3233
3395
|
|
|
3234
3396
|
// src/containers.ts
|
|
3235
|
-
import
|
|
3236
|
-
import { join as
|
|
3397
|
+
import fs18 from "fs/promises";
|
|
3398
|
+
import { join as join18 } from "path";
|
|
3237
3399
|
var getContainer = (directory) => async (id, version) => getResource(directory, id, version, { type: "container" });
|
|
3238
3400
|
var getContainers = (directory) => async (options) => getResources(directory, { type: "containers", latestOnly: options?.latestOnly });
|
|
3239
3401
|
var writeContainer = (directory) => async (data, options = {
|
|
@@ -3243,7 +3405,7 @@ var writeContainer = (directory) => async (data, options = {
|
|
|
3243
3405
|
}) => writeResource(directory, { ...data }, { ...options, type: "container" });
|
|
3244
3406
|
var versionContainer = (directory) => async (id) => versionResource(directory, id);
|
|
3245
3407
|
var rmContainer = (directory) => async (path9) => {
|
|
3246
|
-
await
|
|
3408
|
+
await fs18.rm(join18(directory, path9), { recursive: true });
|
|
3247
3409
|
invalidateFileCache();
|
|
3248
3410
|
};
|
|
3249
3411
|
var rmContainerById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3260,7 +3422,15 @@ var writeContainerToService = (directory) => async (container, service, options
|
|
|
3260
3422
|
throw new Error("Service not found");
|
|
3261
3423
|
}
|
|
3262
3424
|
let pathForContainer = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/containers` : `${resourcePath.directory}/containers`;
|
|
3263
|
-
pathForContainer =
|
|
3425
|
+
pathForContainer = join18(pathForContainer, container.id);
|
|
3426
|
+
await writeResource(directory, { ...container }, { ...options, path: pathForContainer, type: "container" });
|
|
3427
|
+
};
|
|
3428
|
+
var writeContainerToSystem = (directory) => async (container, system, options = { path: "", format: "mdx", override: false }) => {
|
|
3429
|
+
const resourcePath = await getResourcePath(directory, system.id, system.version);
|
|
3430
|
+
if (!resourcePath) {
|
|
3431
|
+
throw new Error("System not found");
|
|
3432
|
+
}
|
|
3433
|
+
const pathForContainer = join18(resourcePath.directory, "containers", container.id);
|
|
3264
3434
|
await writeResource(directory, { ...container }, { ...options, path: pathForContainer, type: "container" });
|
|
3265
3435
|
};
|
|
3266
3436
|
|
|
@@ -3274,10 +3444,11 @@ var rmDataStoreById = rmContainerById;
|
|
|
3274
3444
|
var dataStoreHasVersion = containerHasVersion;
|
|
3275
3445
|
var addFileToDataStore = addFileToContainer;
|
|
3276
3446
|
var writeDataStoreToService = writeContainerToService;
|
|
3447
|
+
var writeDataStoreToSystem = writeContainerToSystem;
|
|
3277
3448
|
|
|
3278
3449
|
// src/data-products.ts
|
|
3279
|
-
import
|
|
3280
|
-
import { join as
|
|
3450
|
+
import fs19 from "fs/promises";
|
|
3451
|
+
import { join as join19 } from "path";
|
|
3281
3452
|
var getDataProduct = (directory) => async (id, version) => getResource(directory, id, version, { type: "data-product" });
|
|
3282
3453
|
var getDataProducts = (directory) => async (options) => getResources(directory, { type: "data-products", latestOnly: options?.latestOnly });
|
|
3283
3454
|
var writeDataProduct = (directory) => async (dataProduct, options = {
|
|
@@ -3287,11 +3458,11 @@ var writeDataProduct = (directory) => async (dataProduct, options = {
|
|
|
3287
3458
|
}) => writeResource(directory, { ...dataProduct }, { ...options, type: "data-product" });
|
|
3288
3459
|
var writeDataProductToDomain = (directory) => async (dataProduct, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
3289
3460
|
let pathForDataProduct = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/data-products` : `/${domain.id}/data-products`;
|
|
3290
|
-
pathForDataProduct =
|
|
3461
|
+
pathForDataProduct = join19(pathForDataProduct, dataProduct.id);
|
|
3291
3462
|
await writeResource(directory, { ...dataProduct }, { ...options, path: pathForDataProduct, type: "data-product" });
|
|
3292
3463
|
};
|
|
3293
3464
|
var rmDataProduct = (directory) => async (path9) => {
|
|
3294
|
-
await
|
|
3465
|
+
await fs19.rm(join19(directory, path9), { recursive: true });
|
|
3295
3466
|
invalidateFileCache();
|
|
3296
3467
|
};
|
|
3297
3468
|
var rmDataProductById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3305,8 +3476,8 @@ var dataProductHasVersion = (directory) => async (id, version) => {
|
|
|
3305
3476
|
var addFileToDataProduct = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
3306
3477
|
|
|
3307
3478
|
// src/diagrams.ts
|
|
3308
|
-
import
|
|
3309
|
-
import { join as
|
|
3479
|
+
import fs20 from "fs/promises";
|
|
3480
|
+
import { join as join20 } from "path";
|
|
3310
3481
|
var getDiagram = (directory) => async (id, version) => getResource(directory, id, version, { type: "diagram" });
|
|
3311
3482
|
var getDiagrams = (directory) => async (options) => getResources(directory, { type: "diagrams", latestOnly: options?.latestOnly });
|
|
3312
3483
|
var writeDiagram = (directory) => async (diagram, options = {
|
|
@@ -3315,7 +3486,7 @@ var writeDiagram = (directory) => async (diagram, options = {
|
|
|
3315
3486
|
format: "mdx"
|
|
3316
3487
|
}) => writeResource(directory, { ...diagram }, { ...options, type: "diagram" });
|
|
3317
3488
|
var rmDiagram = (directory) => async (path9) => {
|
|
3318
|
-
await
|
|
3489
|
+
await fs20.rm(join20(directory, path9), { recursive: true });
|
|
3319
3490
|
invalidateFileCache();
|
|
3320
3491
|
};
|
|
3321
3492
|
var rmDiagramById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3337,13 +3508,13 @@ var src_default = (path9) => {
|
|
|
3337
3508
|
* @param version - Optional id of the version to get (supports semver)
|
|
3338
3509
|
* @returns Event|Undefined
|
|
3339
3510
|
*/
|
|
3340
|
-
getEvent: getEvent(
|
|
3511
|
+
getEvent: getEvent(join21(path9)),
|
|
3341
3512
|
/**
|
|
3342
3513
|
* Returns all events from EventCatalog
|
|
3343
3514
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3344
3515
|
* @returns Event[]|Undefined
|
|
3345
3516
|
*/
|
|
3346
|
-
getEvents: getEvents(
|
|
3517
|
+
getEvents: getEvents(join21(path9)),
|
|
3347
3518
|
/**
|
|
3348
3519
|
* Adds an event to EventCatalog
|
|
3349
3520
|
*
|
|
@@ -3351,7 +3522,7 @@ var src_default = (path9) => {
|
|
|
3351
3522
|
* @param options - Optional options to write the event
|
|
3352
3523
|
*
|
|
3353
3524
|
*/
|
|
3354
|
-
writeEvent: writeEvent(
|
|
3525
|
+
writeEvent: writeEvent(join21(path9, "events")),
|
|
3355
3526
|
/**
|
|
3356
3527
|
* Adds an event to a service in EventCatalog
|
|
3357
3528
|
*
|
|
@@ -3360,7 +3531,7 @@ var src_default = (path9) => {
|
|
|
3360
3531
|
* @param options - Optional options to write the event
|
|
3361
3532
|
*
|
|
3362
3533
|
*/
|
|
3363
|
-
writeEventToService: writeEventToService(
|
|
3534
|
+
writeEventToService: writeEventToService(join21(path9)),
|
|
3364
3535
|
/**
|
|
3365
3536
|
* Adds an event to an agent in EventCatalog
|
|
3366
3537
|
*
|
|
@@ -3369,26 +3540,26 @@ var src_default = (path9) => {
|
|
|
3369
3540
|
* @param options - Optional options to write the event
|
|
3370
3541
|
*
|
|
3371
3542
|
*/
|
|
3372
|
-
writeEventToAgent: writeEventToAgent(
|
|
3543
|
+
writeEventToAgent: writeEventToAgent(join21(path9)),
|
|
3373
3544
|
/**
|
|
3374
3545
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3375
3546
|
*
|
|
3376
3547
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
3377
3548
|
*
|
|
3378
3549
|
*/
|
|
3379
|
-
rmEvent: rmEvent(
|
|
3550
|
+
rmEvent: rmEvent(join21(path9, "events")),
|
|
3380
3551
|
/**
|
|
3381
3552
|
* Remove an event by an Event id
|
|
3382
3553
|
*
|
|
3383
3554
|
* @param id - The id of the event you want to remove
|
|
3384
3555
|
*
|
|
3385
3556
|
*/
|
|
3386
|
-
rmEventById: rmEventById(
|
|
3557
|
+
rmEventById: rmEventById(join21(path9)),
|
|
3387
3558
|
/**
|
|
3388
3559
|
* Moves a given event id to the version directory
|
|
3389
3560
|
* @param directory
|
|
3390
3561
|
*/
|
|
3391
|
-
versionEvent: versionEvent(
|
|
3562
|
+
versionEvent: versionEvent(join21(path9)),
|
|
3392
3563
|
/**
|
|
3393
3564
|
* Adds a file to the given event
|
|
3394
3565
|
* @param id - The id of the event to add the file to
|
|
@@ -3396,7 +3567,7 @@ var src_default = (path9) => {
|
|
|
3396
3567
|
* @param version - Optional version of the event to add the file to
|
|
3397
3568
|
* @returns
|
|
3398
3569
|
*/
|
|
3399
|
-
addFileToEvent: addFileToEvent(
|
|
3570
|
+
addFileToEvent: addFileToEvent(join21(path9)),
|
|
3400
3571
|
/**
|
|
3401
3572
|
* Adds a schema to the given event
|
|
3402
3573
|
* @param id - The id of the event to add the schema to
|
|
@@ -3404,17 +3575,17 @@ var src_default = (path9) => {
|
|
|
3404
3575
|
* @param version - Optional version of the event to add the schema to
|
|
3405
3576
|
* @returns
|
|
3406
3577
|
*/
|
|
3407
|
-
addSchemaToEvent: addSchemaToEvent(
|
|
3578
|
+
addSchemaToEvent: addSchemaToEvent(join21(path9)),
|
|
3408
3579
|
/**
|
|
3409
3580
|
* Check to see if an event version exists
|
|
3410
3581
|
* @param id - The id of the event
|
|
3411
3582
|
* @param version - The version of the event (supports semver)
|
|
3412
3583
|
* @returns
|
|
3413
3584
|
*/
|
|
3414
|
-
eventHasVersion: eventHasVersion(
|
|
3415
|
-
addExampleToEvent: addExampleToEvent(
|
|
3416
|
-
getExamplesFromEvent: getExamplesFromEvent(
|
|
3417
|
-
removeExampleFromEvent: removeExampleFromEvent(
|
|
3585
|
+
eventHasVersion: eventHasVersion(join21(path9)),
|
|
3586
|
+
addExampleToEvent: addExampleToEvent(join21(path9)),
|
|
3587
|
+
getExamplesFromEvent: getExamplesFromEvent(join21(path9)),
|
|
3588
|
+
removeExampleFromEvent: removeExampleFromEvent(join21(path9)),
|
|
3418
3589
|
/**
|
|
3419
3590
|
* ================================
|
|
3420
3591
|
* Commands
|
|
@@ -3426,13 +3597,13 @@ var src_default = (path9) => {
|
|
|
3426
3597
|
* @param version - Optional id of the version to get (supports semver)
|
|
3427
3598
|
* @returns Command|Undefined
|
|
3428
3599
|
*/
|
|
3429
|
-
getCommand: getCommand(
|
|
3600
|
+
getCommand: getCommand(join21(path9)),
|
|
3430
3601
|
/**
|
|
3431
3602
|
* Returns all commands from EventCatalog
|
|
3432
3603
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3433
3604
|
* @returns Command[]|Undefined
|
|
3434
3605
|
*/
|
|
3435
|
-
getCommands: getCommands(
|
|
3606
|
+
getCommands: getCommands(join21(path9)),
|
|
3436
3607
|
/**
|
|
3437
3608
|
* Adds an command to EventCatalog
|
|
3438
3609
|
*
|
|
@@ -3440,7 +3611,7 @@ var src_default = (path9) => {
|
|
|
3440
3611
|
* @param options - Optional options to write the command
|
|
3441
3612
|
*
|
|
3442
3613
|
*/
|
|
3443
|
-
writeCommand: writeCommand(
|
|
3614
|
+
writeCommand: writeCommand(join21(path9, "commands")),
|
|
3444
3615
|
/**
|
|
3445
3616
|
* Adds a command to a service in EventCatalog
|
|
3446
3617
|
*
|
|
@@ -3449,7 +3620,7 @@ var src_default = (path9) => {
|
|
|
3449
3620
|
* @param options - Optional options to write the command
|
|
3450
3621
|
*
|
|
3451
3622
|
*/
|
|
3452
|
-
writeCommandToService: writeCommandToService(
|
|
3623
|
+
writeCommandToService: writeCommandToService(join21(path9)),
|
|
3453
3624
|
/**
|
|
3454
3625
|
* Adds a command to an agent in EventCatalog
|
|
3455
3626
|
*
|
|
@@ -3458,26 +3629,26 @@ var src_default = (path9) => {
|
|
|
3458
3629
|
* @param options - Optional options to write the command
|
|
3459
3630
|
*
|
|
3460
3631
|
*/
|
|
3461
|
-
writeCommandToAgent: writeCommandToAgent(
|
|
3632
|
+
writeCommandToAgent: writeCommandToAgent(join21(path9)),
|
|
3462
3633
|
/**
|
|
3463
3634
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3464
3635
|
*
|
|
3465
3636
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
3466
3637
|
*
|
|
3467
3638
|
*/
|
|
3468
|
-
rmCommand: rmCommand(
|
|
3639
|
+
rmCommand: rmCommand(join21(path9, "commands")),
|
|
3469
3640
|
/**
|
|
3470
3641
|
* Remove an command by an Event id
|
|
3471
3642
|
*
|
|
3472
3643
|
* @param id - The id of the command you want to remove
|
|
3473
3644
|
*
|
|
3474
3645
|
*/
|
|
3475
|
-
rmCommandById: rmCommandById(
|
|
3646
|
+
rmCommandById: rmCommandById(join21(path9)),
|
|
3476
3647
|
/**
|
|
3477
3648
|
* Moves a given command id to the version directory
|
|
3478
3649
|
* @param directory
|
|
3479
3650
|
*/
|
|
3480
|
-
versionCommand: versionCommand(
|
|
3651
|
+
versionCommand: versionCommand(join21(path9)),
|
|
3481
3652
|
/**
|
|
3482
3653
|
* Adds a file to the given command
|
|
3483
3654
|
* @param id - The id of the command to add the file to
|
|
@@ -3485,7 +3656,7 @@ var src_default = (path9) => {
|
|
|
3485
3656
|
* @param version - Optional version of the command to add the file to
|
|
3486
3657
|
* @returns
|
|
3487
3658
|
*/
|
|
3488
|
-
addFileToCommand: addFileToCommand(
|
|
3659
|
+
addFileToCommand: addFileToCommand(join21(path9)),
|
|
3489
3660
|
/**
|
|
3490
3661
|
* Adds a schema to the given command
|
|
3491
3662
|
* @param id - The id of the command to add the schema to
|
|
@@ -3493,17 +3664,17 @@ var src_default = (path9) => {
|
|
|
3493
3664
|
* @param version - Optional version of the command to add the schema to
|
|
3494
3665
|
* @returns
|
|
3495
3666
|
*/
|
|
3496
|
-
addSchemaToCommand: addSchemaToCommand(
|
|
3667
|
+
addSchemaToCommand: addSchemaToCommand(join21(path9)),
|
|
3497
3668
|
/**
|
|
3498
3669
|
* Check to see if a command version exists
|
|
3499
3670
|
* @param id - The id of the command
|
|
3500
3671
|
* @param version - The version of the command (supports semver)
|
|
3501
3672
|
* @returns
|
|
3502
3673
|
*/
|
|
3503
|
-
commandHasVersion: commandHasVersion(
|
|
3504
|
-
addExampleToCommand: addExampleToCommand(
|
|
3505
|
-
getExamplesFromCommand: getExamplesFromCommand(
|
|
3506
|
-
removeExampleFromCommand: removeExampleFromCommand(
|
|
3674
|
+
commandHasVersion: commandHasVersion(join21(path9)),
|
|
3675
|
+
addExampleToCommand: addExampleToCommand(join21(path9)),
|
|
3676
|
+
getExamplesFromCommand: getExamplesFromCommand(join21(path9)),
|
|
3677
|
+
removeExampleFromCommand: removeExampleFromCommand(join21(path9)),
|
|
3507
3678
|
/**
|
|
3508
3679
|
* ================================
|
|
3509
3680
|
* Queries
|
|
@@ -3515,13 +3686,13 @@ var src_default = (path9) => {
|
|
|
3515
3686
|
* @param version - Optional id of the version to get (supports semver)
|
|
3516
3687
|
* @returns Query|Undefined
|
|
3517
3688
|
*/
|
|
3518
|
-
getQuery: getQuery(
|
|
3689
|
+
getQuery: getQuery(join21(path9)),
|
|
3519
3690
|
/**
|
|
3520
3691
|
* Returns all queries from EventCatalog
|
|
3521
3692
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3522
3693
|
* @returns Query[]|Undefined
|
|
3523
3694
|
*/
|
|
3524
|
-
getQueries: getQueries(
|
|
3695
|
+
getQueries: getQueries(join21(path9)),
|
|
3525
3696
|
/**
|
|
3526
3697
|
* Adds a query to EventCatalog
|
|
3527
3698
|
*
|
|
@@ -3529,7 +3700,7 @@ var src_default = (path9) => {
|
|
|
3529
3700
|
* @param options - Optional options to write the event
|
|
3530
3701
|
*
|
|
3531
3702
|
*/
|
|
3532
|
-
writeQuery: writeQuery(
|
|
3703
|
+
writeQuery: writeQuery(join21(path9, "queries")),
|
|
3533
3704
|
/**
|
|
3534
3705
|
* Adds a query to a service in EventCatalog
|
|
3535
3706
|
*
|
|
@@ -3538,7 +3709,7 @@ var src_default = (path9) => {
|
|
|
3538
3709
|
* @param options - Optional options to write the query
|
|
3539
3710
|
*
|
|
3540
3711
|
*/
|
|
3541
|
-
writeQueryToService: writeQueryToService(
|
|
3712
|
+
writeQueryToService: writeQueryToService(join21(path9)),
|
|
3542
3713
|
/**
|
|
3543
3714
|
* Adds a query to an agent in EventCatalog
|
|
3544
3715
|
*
|
|
@@ -3547,26 +3718,26 @@ var src_default = (path9) => {
|
|
|
3547
3718
|
* @param options - Optional options to write the query
|
|
3548
3719
|
*
|
|
3549
3720
|
*/
|
|
3550
|
-
writeQueryToAgent: writeQueryToAgent(
|
|
3721
|
+
writeQueryToAgent: writeQueryToAgent(join21(path9)),
|
|
3551
3722
|
/**
|
|
3552
3723
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3553
3724
|
*
|
|
3554
3725
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
3555
3726
|
*
|
|
3556
3727
|
*/
|
|
3557
|
-
rmQuery: rmQuery(
|
|
3728
|
+
rmQuery: rmQuery(join21(path9, "queries")),
|
|
3558
3729
|
/**
|
|
3559
3730
|
* Remove a query by a Query id
|
|
3560
3731
|
*
|
|
3561
3732
|
* @param id - The id of the query you want to remove
|
|
3562
3733
|
*
|
|
3563
3734
|
*/
|
|
3564
|
-
rmQueryById: rmQueryById(
|
|
3735
|
+
rmQueryById: rmQueryById(join21(path9)),
|
|
3565
3736
|
/**
|
|
3566
3737
|
* Moves a given query id to the version directory
|
|
3567
3738
|
* @param directory
|
|
3568
3739
|
*/
|
|
3569
|
-
versionQuery: versionQuery(
|
|
3740
|
+
versionQuery: versionQuery(join21(path9)),
|
|
3570
3741
|
/**
|
|
3571
3742
|
* Adds a file to the given query
|
|
3572
3743
|
* @param id - The id of the query to add the file to
|
|
@@ -3574,7 +3745,7 @@ var src_default = (path9) => {
|
|
|
3574
3745
|
* @param version - Optional version of the query to add the file to
|
|
3575
3746
|
* @returns
|
|
3576
3747
|
*/
|
|
3577
|
-
addFileToQuery: addFileToQuery(
|
|
3748
|
+
addFileToQuery: addFileToQuery(join21(path9)),
|
|
3578
3749
|
/**
|
|
3579
3750
|
* Adds a schema to the given query
|
|
3580
3751
|
* @param id - The id of the query to add the schema to
|
|
@@ -3582,17 +3753,17 @@ var src_default = (path9) => {
|
|
|
3582
3753
|
* @param version - Optional version of the query to add the schema to
|
|
3583
3754
|
* @returns
|
|
3584
3755
|
*/
|
|
3585
|
-
addSchemaToQuery: addSchemaToQuery(
|
|
3756
|
+
addSchemaToQuery: addSchemaToQuery(join21(path9)),
|
|
3586
3757
|
/**
|
|
3587
3758
|
* Check to see if an query version exists
|
|
3588
3759
|
* @param id - The id of the query
|
|
3589
3760
|
* @param version - The version of the query (supports semver)
|
|
3590
3761
|
* @returns
|
|
3591
3762
|
*/
|
|
3592
|
-
queryHasVersion: queryHasVersion(
|
|
3593
|
-
addExampleToQuery: addExampleToQuery(
|
|
3594
|
-
getExamplesFromQuery: getExamplesFromQuery(
|
|
3595
|
-
removeExampleFromQuery: removeExampleFromQuery(
|
|
3763
|
+
queryHasVersion: queryHasVersion(join21(path9)),
|
|
3764
|
+
addExampleToQuery: addExampleToQuery(join21(path9)),
|
|
3765
|
+
getExamplesFromQuery: getExamplesFromQuery(join21(path9)),
|
|
3766
|
+
removeExampleFromQuery: removeExampleFromQuery(join21(path9)),
|
|
3596
3767
|
/**
|
|
3597
3768
|
* ================================
|
|
3598
3769
|
* Channels
|
|
@@ -3604,13 +3775,13 @@ var src_default = (path9) => {
|
|
|
3604
3775
|
* @param version - Optional id of the version to get (supports semver)
|
|
3605
3776
|
* @returns Channel|Undefined
|
|
3606
3777
|
*/
|
|
3607
|
-
getChannel: getChannel(
|
|
3778
|
+
getChannel: getChannel(join21(path9)),
|
|
3608
3779
|
/**
|
|
3609
3780
|
* Returns all channels from EventCatalog
|
|
3610
3781
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3611
3782
|
* @returns Channel[]|Undefined
|
|
3612
3783
|
*/
|
|
3613
|
-
getChannels: getChannels(
|
|
3784
|
+
getChannels: getChannels(join21(path9)),
|
|
3614
3785
|
/**
|
|
3615
3786
|
* Adds an channel to EventCatalog
|
|
3616
3787
|
*
|
|
@@ -3618,33 +3789,33 @@ var src_default = (path9) => {
|
|
|
3618
3789
|
* @param options - Optional options to write the channel
|
|
3619
3790
|
*
|
|
3620
3791
|
*/
|
|
3621
|
-
writeChannel: writeChannel(
|
|
3792
|
+
writeChannel: writeChannel(join21(path9, "channels")),
|
|
3622
3793
|
/**
|
|
3623
3794
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3624
3795
|
*
|
|
3625
3796
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
3626
3797
|
*
|
|
3627
3798
|
*/
|
|
3628
|
-
rmChannel: rmChannel(
|
|
3799
|
+
rmChannel: rmChannel(join21(path9, "channels")),
|
|
3629
3800
|
/**
|
|
3630
3801
|
* Remove an channel by an Event id
|
|
3631
3802
|
*
|
|
3632
3803
|
* @param id - The id of the channel you want to remove
|
|
3633
3804
|
*
|
|
3634
3805
|
*/
|
|
3635
|
-
rmChannelById: rmChannelById(
|
|
3806
|
+
rmChannelById: rmChannelById(join21(path9)),
|
|
3636
3807
|
/**
|
|
3637
3808
|
* Moves a given channel id to the version directory
|
|
3638
3809
|
* @param directory
|
|
3639
3810
|
*/
|
|
3640
|
-
versionChannel: versionChannel(
|
|
3811
|
+
versionChannel: versionChannel(join21(path9)),
|
|
3641
3812
|
/**
|
|
3642
3813
|
* Check to see if a channel version exists
|
|
3643
3814
|
* @param id - The id of the channel
|
|
3644
3815
|
* @param version - The version of the channel (supports semver)
|
|
3645
3816
|
* @returns
|
|
3646
3817
|
*/
|
|
3647
|
-
channelHasVersion: channelHasVersion(
|
|
3818
|
+
channelHasVersion: channelHasVersion(join21(path9)),
|
|
3648
3819
|
/**
|
|
3649
3820
|
* Add a channel to an event
|
|
3650
3821
|
*
|
|
@@ -3661,7 +3832,7 @@ var src_default = (path9) => {
|
|
|
3661
3832
|
*
|
|
3662
3833
|
* ```
|
|
3663
3834
|
*/
|
|
3664
|
-
addEventToChannel: addMessageToChannel(
|
|
3835
|
+
addEventToChannel: addMessageToChannel(join21(path9), "events"),
|
|
3665
3836
|
/**
|
|
3666
3837
|
* Add a channel to an command
|
|
3667
3838
|
*
|
|
@@ -3678,7 +3849,7 @@ var src_default = (path9) => {
|
|
|
3678
3849
|
*
|
|
3679
3850
|
* ```
|
|
3680
3851
|
*/
|
|
3681
|
-
addCommandToChannel: addMessageToChannel(
|
|
3852
|
+
addCommandToChannel: addMessageToChannel(join21(path9), "commands"),
|
|
3682
3853
|
/**
|
|
3683
3854
|
* Add a channel to an query
|
|
3684
3855
|
*
|
|
@@ -3695,7 +3866,7 @@ var src_default = (path9) => {
|
|
|
3695
3866
|
*
|
|
3696
3867
|
* ```
|
|
3697
3868
|
*/
|
|
3698
|
-
addQueryToChannel: addMessageToChannel(
|
|
3869
|
+
addQueryToChannel: addMessageToChannel(join21(path9), "queries"),
|
|
3699
3870
|
/**
|
|
3700
3871
|
* ================================
|
|
3701
3872
|
* SERVICES
|
|
@@ -3708,14 +3879,14 @@ var src_default = (path9) => {
|
|
|
3708
3879
|
* @param options - Optional options to write the event
|
|
3709
3880
|
*
|
|
3710
3881
|
*/
|
|
3711
|
-
writeService: writeService(
|
|
3882
|
+
writeService: writeService(join21(path9, "services")),
|
|
3712
3883
|
/**
|
|
3713
3884
|
* Adds a versioned service to EventCatalog
|
|
3714
3885
|
*
|
|
3715
3886
|
* @param service - The service to write
|
|
3716
3887
|
*
|
|
3717
3888
|
*/
|
|
3718
|
-
writeVersionedService: writeVersionedService(
|
|
3889
|
+
writeVersionedService: writeVersionedService(join21(path9, "services")),
|
|
3719
3890
|
/**
|
|
3720
3891
|
* Adds a service to a domain in EventCatalog
|
|
3721
3892
|
*
|
|
@@ -3724,45 +3895,54 @@ var src_default = (path9) => {
|
|
|
3724
3895
|
* @param options - Optional options to write the event
|
|
3725
3896
|
*
|
|
3726
3897
|
*/
|
|
3727
|
-
writeServiceToDomain: writeServiceToDomain(
|
|
3898
|
+
writeServiceToDomain: writeServiceToDomain(join21(path9, "domains")),
|
|
3899
|
+
/**
|
|
3900
|
+
* Adds a service to a system in EventCatalog
|
|
3901
|
+
*
|
|
3902
|
+
* @param service - The service to write
|
|
3903
|
+
* @param system - The system to add the service to
|
|
3904
|
+
* @param options - Optional options to write the service
|
|
3905
|
+
*
|
|
3906
|
+
*/
|
|
3907
|
+
writeServiceToSystem: writeServiceToSystem(join21(path9)),
|
|
3728
3908
|
/**
|
|
3729
3909
|
* Returns a service from EventCatalog
|
|
3730
3910
|
* @param id - The id of the service to retrieve
|
|
3731
3911
|
* @param version - Optional id of the version to get (supports semver)
|
|
3732
3912
|
* @returns Service|Undefined
|
|
3733
3913
|
*/
|
|
3734
|
-
getService: getService(
|
|
3914
|
+
getService: getService(join21(path9)),
|
|
3735
3915
|
/**
|
|
3736
3916
|
* Returns a service from EventCatalog by it's path.
|
|
3737
3917
|
* @param path - The path to the service to retrieve
|
|
3738
3918
|
* @returns Service|Undefined
|
|
3739
3919
|
*/
|
|
3740
|
-
getServiceByPath: getServiceByPath(
|
|
3920
|
+
getServiceByPath: getServiceByPath(join21(path9)),
|
|
3741
3921
|
/**
|
|
3742
3922
|
* Returns all services from EventCatalog
|
|
3743
3923
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3744
3924
|
* @returns Service[]|Undefined
|
|
3745
3925
|
*/
|
|
3746
|
-
getServices: getServices(
|
|
3926
|
+
getServices: getServices(join21(path9)),
|
|
3747
3927
|
/**
|
|
3748
3928
|
* Moves a given service id to the version directory
|
|
3749
3929
|
* @param directory
|
|
3750
3930
|
*/
|
|
3751
|
-
versionService: versionService(
|
|
3931
|
+
versionService: versionService(join21(path9)),
|
|
3752
3932
|
/**
|
|
3753
3933
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3754
3934
|
*
|
|
3755
3935
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
3756
3936
|
*
|
|
3757
3937
|
*/
|
|
3758
|
-
rmService: rmService(
|
|
3938
|
+
rmService: rmService(join21(path9, "services")),
|
|
3759
3939
|
/**
|
|
3760
3940
|
* Remove an service by an service id
|
|
3761
3941
|
*
|
|
3762
3942
|
* @param id - The id of the service you want to remove
|
|
3763
3943
|
*
|
|
3764
3944
|
*/
|
|
3765
|
-
rmServiceById: rmServiceById(
|
|
3945
|
+
rmServiceById: rmServiceById(join21(path9)),
|
|
3766
3946
|
/**
|
|
3767
3947
|
* Adds a file to the given service
|
|
3768
3948
|
* @param id - The id of the service to add the file to
|
|
@@ -3770,21 +3950,21 @@ var src_default = (path9) => {
|
|
|
3770
3950
|
* @param version - Optional version of the service to add the file to
|
|
3771
3951
|
* @returns
|
|
3772
3952
|
*/
|
|
3773
|
-
addFileToService: addFileToService(
|
|
3953
|
+
addFileToService: addFileToService(join21(path9)),
|
|
3774
3954
|
/**
|
|
3775
3955
|
* Returns the specifications for a given service
|
|
3776
3956
|
* @param id - The id of the service to retrieve the specifications for
|
|
3777
3957
|
* @param version - Optional version of the service
|
|
3778
3958
|
* @returns
|
|
3779
3959
|
*/
|
|
3780
|
-
getSpecificationFilesForService: getSpecificationFilesForService(
|
|
3960
|
+
getSpecificationFilesForService: getSpecificationFilesForService(join21(path9)),
|
|
3781
3961
|
/**
|
|
3782
3962
|
* Check to see if a service version exists
|
|
3783
3963
|
* @param id - The id of the service
|
|
3784
3964
|
* @param version - The version of the service (supports semver)
|
|
3785
3965
|
* @returns
|
|
3786
3966
|
*/
|
|
3787
|
-
serviceHasVersion: serviceHasVersion(
|
|
3967
|
+
serviceHasVersion: serviceHasVersion(join21(path9)),
|
|
3788
3968
|
/**
|
|
3789
3969
|
* Add an event to a service by it's id.
|
|
3790
3970
|
*
|
|
@@ -3804,7 +3984,7 @@ var src_default = (path9) => {
|
|
|
3804
3984
|
*
|
|
3805
3985
|
* ```
|
|
3806
3986
|
*/
|
|
3807
|
-
addEventToService: addMessageToService(
|
|
3987
|
+
addEventToService: addMessageToService(join21(path9)),
|
|
3808
3988
|
/**
|
|
3809
3989
|
* Add a data store to a service by it's id.
|
|
3810
3990
|
*
|
|
@@ -3821,7 +4001,7 @@ var src_default = (path9) => {
|
|
|
3821
4001
|
*
|
|
3822
4002
|
* ```
|
|
3823
4003
|
*/
|
|
3824
|
-
addDataStoreToService: addDataStoreToService(
|
|
4004
|
+
addDataStoreToService: addDataStoreToService(join21(path9)),
|
|
3825
4005
|
/**
|
|
3826
4006
|
* Add a command to a service by it's id.
|
|
3827
4007
|
*
|
|
@@ -3841,7 +4021,7 @@ var src_default = (path9) => {
|
|
|
3841
4021
|
*
|
|
3842
4022
|
* ```
|
|
3843
4023
|
*/
|
|
3844
|
-
addCommandToService: addMessageToService(
|
|
4024
|
+
addCommandToService: addMessageToService(join21(path9)),
|
|
3845
4025
|
/**
|
|
3846
4026
|
* Add a query to a service by it's id.
|
|
3847
4027
|
*
|
|
@@ -3861,7 +4041,7 @@ var src_default = (path9) => {
|
|
|
3861
4041
|
*
|
|
3862
4042
|
* ```
|
|
3863
4043
|
*/
|
|
3864
|
-
addQueryToService: addMessageToService(
|
|
4044
|
+
addQueryToService: addMessageToService(join21(path9)),
|
|
3865
4045
|
/**
|
|
3866
4046
|
* Add an entity to a service by its id.
|
|
3867
4047
|
*
|
|
@@ -3879,7 +4059,7 @@ var src_default = (path9) => {
|
|
|
3879
4059
|
*
|
|
3880
4060
|
* ```
|
|
3881
4061
|
*/
|
|
3882
|
-
addEntityToService: addEntityToService(
|
|
4062
|
+
addEntityToService: addEntityToService(join21(path9)),
|
|
3883
4063
|
/**
|
|
3884
4064
|
* Check to see if a service exists by it's path.
|
|
3885
4065
|
*
|
|
@@ -3896,36 +4076,57 @@ var src_default = (path9) => {
|
|
|
3896
4076
|
* @param path - The path to the service to check
|
|
3897
4077
|
* @returns boolean
|
|
3898
4078
|
*/
|
|
3899
|
-
isService: isService(
|
|
4079
|
+
isService: isService(join21(path9)),
|
|
3900
4080
|
/**
|
|
3901
4081
|
* Converts a file to a service.
|
|
3902
4082
|
* @param file - The file to convert to a service.
|
|
3903
4083
|
* @returns The service.
|
|
3904
4084
|
*/
|
|
3905
|
-
toService: toService(
|
|
4085
|
+
toService: toService(join21(path9)),
|
|
4086
|
+
/**
|
|
4087
|
+
* ================================
|
|
4088
|
+
* Systems
|
|
4089
|
+
* ================================
|
|
4090
|
+
*/
|
|
4091
|
+
writeSystem: writeSystem(join21(path9, "systems")),
|
|
4092
|
+
writeSystemToDomain: writeSystemToDomain(join21(path9)),
|
|
4093
|
+
getSystem: getSystem(join21(path9)),
|
|
4094
|
+
getSystemByPath: getSystemByPath(join21(path9)),
|
|
4095
|
+
getSystems: getSystems(join21(path9)),
|
|
4096
|
+
versionSystem: versionSystem(join21(path9)),
|
|
4097
|
+
rmSystem: rmSystem(join21(path9, "systems")),
|
|
4098
|
+
rmSystemById: rmSystemById(join21(path9)),
|
|
4099
|
+
addFileToSystem: addFileToSystem(join21(path9)),
|
|
4100
|
+
addServiceToSystem: addServiceToSystem(join21(path9)),
|
|
4101
|
+
addFlowToSystem: addFlowToSystem(join21(path9)),
|
|
4102
|
+
addEntityToSystem: addEntityToSystem(join21(path9)),
|
|
4103
|
+
addContainerToSystem: addContainerToSystem(join21(path9)),
|
|
4104
|
+
systemHasVersion: systemHasVersion(join21(path9)),
|
|
4105
|
+
isSystem: isSystem(join21(path9)),
|
|
4106
|
+
toSystem: toSystem(join21(path9)),
|
|
3906
4107
|
/**
|
|
3907
4108
|
* ================================
|
|
3908
4109
|
* Agents
|
|
3909
4110
|
* ================================
|
|
3910
4111
|
*/
|
|
3911
|
-
writeAgent: writeAgent(
|
|
3912
|
-
writeVersionedAgent: writeVersionedAgent(
|
|
3913
|
-
writeAgentToDomain: writeAgentToDomain(
|
|
3914
|
-
getAgent: getAgent(
|
|
3915
|
-
getAgentByPath: getAgentByPath(
|
|
3916
|
-
getAgents: getAgents(
|
|
3917
|
-
versionAgent: versionAgent(
|
|
3918
|
-
rmAgent: rmAgent(
|
|
3919
|
-
rmAgentById: rmAgentById(
|
|
3920
|
-
addFileToAgent: addFileToAgent(
|
|
3921
|
-
addEventToAgent: addMessageToAgent(
|
|
3922
|
-
addCommandToAgent: addMessageToAgent(
|
|
3923
|
-
addQueryToAgent: addMessageToAgent(
|
|
3924
|
-
addDataStoreToAgent: addDataStoreToAgent(
|
|
3925
|
-
addFlowToAgent: addFlowToAgent(
|
|
3926
|
-
agentHasVersion: agentHasVersion(
|
|
3927
|
-
isAgent: isAgent(
|
|
3928
|
-
toAgent: toAgent(
|
|
4112
|
+
writeAgent: writeAgent(join21(path9, "agents")),
|
|
4113
|
+
writeVersionedAgent: writeVersionedAgent(join21(path9, "agents")),
|
|
4114
|
+
writeAgentToDomain: writeAgentToDomain(join21(path9, "domains")),
|
|
4115
|
+
getAgent: getAgent(join21(path9)),
|
|
4116
|
+
getAgentByPath: getAgentByPath(join21(path9)),
|
|
4117
|
+
getAgents: getAgents(join21(path9)),
|
|
4118
|
+
versionAgent: versionAgent(join21(path9)),
|
|
4119
|
+
rmAgent: rmAgent(join21(path9, "agents")),
|
|
4120
|
+
rmAgentById: rmAgentById(join21(path9)),
|
|
4121
|
+
addFileToAgent: addFileToAgent(join21(path9)),
|
|
4122
|
+
addEventToAgent: addMessageToAgent(join21(path9)),
|
|
4123
|
+
addCommandToAgent: addMessageToAgent(join21(path9)),
|
|
4124
|
+
addQueryToAgent: addMessageToAgent(join21(path9)),
|
|
4125
|
+
addDataStoreToAgent: addDataStoreToAgent(join21(path9)),
|
|
4126
|
+
addFlowToAgent: addFlowToAgent(join21(path9)),
|
|
4127
|
+
agentHasVersion: agentHasVersion(join21(path9)),
|
|
4128
|
+
isAgent: isAgent(join21(path9)),
|
|
4129
|
+
toAgent: toAgent(join21(path9)),
|
|
3929
4130
|
/**
|
|
3930
4131
|
* ================================
|
|
3931
4132
|
* Domains
|
|
@@ -3938,39 +4139,39 @@ var src_default = (path9) => {
|
|
|
3938
4139
|
* @param options - Optional options to write the event
|
|
3939
4140
|
*
|
|
3940
4141
|
*/
|
|
3941
|
-
writeDomain: writeDomain(
|
|
4142
|
+
writeDomain: writeDomain(join21(path9, "domains")),
|
|
3942
4143
|
/**
|
|
3943
4144
|
* Returns a domain from EventCatalog
|
|
3944
4145
|
* @param id - The id of the domain to retrieve
|
|
3945
4146
|
* @param version - Optional id of the version to get (supports semver)
|
|
3946
4147
|
* @returns Domain|Undefined
|
|
3947
4148
|
*/
|
|
3948
|
-
getDomain: getDomain(
|
|
4149
|
+
getDomain: getDomain(join21(path9, "domains")),
|
|
3949
4150
|
/**
|
|
3950
4151
|
* Returns all domains from EventCatalog
|
|
3951
4152
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3952
4153
|
* @returns Domain[]|Undefined
|
|
3953
4154
|
*/
|
|
3954
|
-
getDomains: getDomains(
|
|
4155
|
+
getDomains: getDomains(join21(path9)),
|
|
3955
4156
|
/**
|
|
3956
4157
|
* Moves a given domain id to the version directory
|
|
3957
4158
|
* @param directory
|
|
3958
4159
|
*/
|
|
3959
|
-
versionDomain: versionDomain(
|
|
4160
|
+
versionDomain: versionDomain(join21(path9, "domains")),
|
|
3960
4161
|
/**
|
|
3961
4162
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3962
4163
|
*
|
|
3963
4164
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
3964
4165
|
*
|
|
3965
4166
|
*/
|
|
3966
|
-
rmDomain: rmDomain(
|
|
4167
|
+
rmDomain: rmDomain(join21(path9, "domains")),
|
|
3967
4168
|
/**
|
|
3968
4169
|
* Remove an service by an domain id
|
|
3969
4170
|
*
|
|
3970
4171
|
* @param id - The id of the domain you want to remove
|
|
3971
4172
|
*
|
|
3972
4173
|
*/
|
|
3973
|
-
rmDomainById: rmDomainById(
|
|
4174
|
+
rmDomainById: rmDomainById(join21(path9, "domains")),
|
|
3974
4175
|
/**
|
|
3975
4176
|
* Adds a file to the given domain
|
|
3976
4177
|
* @param id - The id of the domain to add the file to
|
|
@@ -3978,28 +4179,28 @@ var src_default = (path9) => {
|
|
|
3978
4179
|
* @param version - Optional version of the domain to add the file to
|
|
3979
4180
|
* @returns
|
|
3980
4181
|
*/
|
|
3981
|
-
addFileToDomain: addFileToDomain(
|
|
4182
|
+
addFileToDomain: addFileToDomain(join21(path9, "domains")),
|
|
3982
4183
|
/**
|
|
3983
4184
|
* Adds an ubiquitous language dictionary to a domain
|
|
3984
4185
|
* @param id - The id of the domain to add the ubiquitous language to
|
|
3985
4186
|
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
3986
4187
|
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
3987
4188
|
*/
|
|
3988
|
-
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(
|
|
4189
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join21(path9, "domains")),
|
|
3989
4190
|
/**
|
|
3990
4191
|
* Get the ubiquitous language dictionary from a domain
|
|
3991
4192
|
* @param id - The id of the domain to get the ubiquitous language from
|
|
3992
4193
|
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
3993
4194
|
* @returns
|
|
3994
4195
|
*/
|
|
3995
|
-
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(
|
|
4196
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join21(path9, "domains")),
|
|
3996
4197
|
/**
|
|
3997
4198
|
* Check to see if a domain version exists
|
|
3998
4199
|
* @param id - The id of the domain
|
|
3999
4200
|
* @param version - The version of the domain (supports semver)
|
|
4000
4201
|
* @returns
|
|
4001
4202
|
*/
|
|
4002
|
-
domainHasVersion: domainHasVersion(
|
|
4203
|
+
domainHasVersion: domainHasVersion(join21(path9)),
|
|
4003
4204
|
/**
|
|
4004
4205
|
* Adds a given service to a domain
|
|
4005
4206
|
* @param id - The id of the domain
|
|
@@ -4007,7 +4208,7 @@ var src_default = (path9) => {
|
|
|
4007
4208
|
* @param version - (Optional) The version of the domain to add the service to
|
|
4008
4209
|
* @returns
|
|
4009
4210
|
*/
|
|
4010
|
-
addServiceToDomain: addServiceToDomain(
|
|
4211
|
+
addServiceToDomain: addServiceToDomain(join21(path9, "domains")),
|
|
4011
4212
|
/**
|
|
4012
4213
|
* Adds a given agent to a domain
|
|
4013
4214
|
* @param id - The id of the domain
|
|
@@ -4015,7 +4216,7 @@ var src_default = (path9) => {
|
|
|
4015
4216
|
* @param version - (Optional) The version of the domain to add the agent to
|
|
4016
4217
|
* @returns
|
|
4017
4218
|
*/
|
|
4018
|
-
addAgentToDomain: addAgentToDomain(
|
|
4219
|
+
addAgentToDomain: addAgentToDomain(join21(path9, "domains")),
|
|
4019
4220
|
/**
|
|
4020
4221
|
* Adds a given subdomain to a domain
|
|
4021
4222
|
* @param id - The id of the domain
|
|
@@ -4023,7 +4224,15 @@ var src_default = (path9) => {
|
|
|
4023
4224
|
* @param version - (Optional) The version of the domain to add the subdomain to
|
|
4024
4225
|
* @returns
|
|
4025
4226
|
*/
|
|
4026
|
-
addSubDomainToDomain: addSubDomainToDomain(
|
|
4227
|
+
addSubDomainToDomain: addSubDomainToDomain(join21(path9, "domains")),
|
|
4228
|
+
/**
|
|
4229
|
+
* Adds a given system to a domain
|
|
4230
|
+
* @param id - The id of the domain
|
|
4231
|
+
* @param system - The id and version of the system to add
|
|
4232
|
+
* @param version - (Optional) The version of the domain to add the system to
|
|
4233
|
+
* @returns
|
|
4234
|
+
*/
|
|
4235
|
+
addSystemToDomain: addSystemToDomain(join21(path9, "domains")),
|
|
4027
4236
|
/**
|
|
4028
4237
|
* Adds an entity to a domain
|
|
4029
4238
|
* @param id - The id of the domain
|
|
@@ -4031,7 +4240,7 @@ var src_default = (path9) => {
|
|
|
4031
4240
|
* @param version - (Optional) The version of the domain to add the entity to
|
|
4032
4241
|
* @returns
|
|
4033
4242
|
*/
|
|
4034
|
-
addEntityToDomain: addEntityToDomain(
|
|
4243
|
+
addEntityToDomain: addEntityToDomain(join21(path9, "domains")),
|
|
4035
4244
|
/**
|
|
4036
4245
|
* Add an event to a domain by its id.
|
|
4037
4246
|
*
|
|
@@ -4049,7 +4258,7 @@ var src_default = (path9) => {
|
|
|
4049
4258
|
*
|
|
4050
4259
|
* ```
|
|
4051
4260
|
*/
|
|
4052
|
-
addEventToDomain: addMessageToDomain(
|
|
4261
|
+
addEventToDomain: addMessageToDomain(join21(path9, "domains")),
|
|
4053
4262
|
/**
|
|
4054
4263
|
* Add a command to a domain by its id.
|
|
4055
4264
|
*
|
|
@@ -4067,7 +4276,7 @@ var src_default = (path9) => {
|
|
|
4067
4276
|
*
|
|
4068
4277
|
* ```
|
|
4069
4278
|
*/
|
|
4070
|
-
addCommandToDomain: addMessageToDomain(
|
|
4279
|
+
addCommandToDomain: addMessageToDomain(join21(path9, "domains")),
|
|
4071
4280
|
/**
|
|
4072
4281
|
* Add a query to a domain by its id.
|
|
4073
4282
|
*
|
|
@@ -4085,7 +4294,7 @@ var src_default = (path9) => {
|
|
|
4085
4294
|
*
|
|
4086
4295
|
* ```
|
|
4087
4296
|
*/
|
|
4088
|
-
addQueryToDomain: addMessageToDomain(
|
|
4297
|
+
addQueryToDomain: addMessageToDomain(join21(path9, "domains")),
|
|
4089
4298
|
/**
|
|
4090
4299
|
* ================================
|
|
4091
4300
|
* Teams
|
|
@@ -4098,25 +4307,25 @@ var src_default = (path9) => {
|
|
|
4098
4307
|
* @param options - Optional options to write the team
|
|
4099
4308
|
*
|
|
4100
4309
|
*/
|
|
4101
|
-
writeTeam: writeTeam(
|
|
4310
|
+
writeTeam: writeTeam(join21(path9, "teams")),
|
|
4102
4311
|
/**
|
|
4103
4312
|
* Returns a team from EventCatalog
|
|
4104
4313
|
* @param id - The id of the team to retrieve
|
|
4105
4314
|
* @returns Team|Undefined
|
|
4106
4315
|
*/
|
|
4107
|
-
getTeam: getTeam(
|
|
4316
|
+
getTeam: getTeam(join21(path9, "teams")),
|
|
4108
4317
|
/**
|
|
4109
4318
|
* Returns all teams from EventCatalog
|
|
4110
4319
|
* @returns Team[]|Undefined
|
|
4111
4320
|
*/
|
|
4112
|
-
getTeams: getTeams(
|
|
4321
|
+
getTeams: getTeams(join21(path9, "teams")),
|
|
4113
4322
|
/**
|
|
4114
4323
|
* Remove a team by the team id
|
|
4115
4324
|
*
|
|
4116
4325
|
* @param id - The id of the team you want to remove
|
|
4117
4326
|
*
|
|
4118
4327
|
*/
|
|
4119
|
-
rmTeamById: rmTeamById(
|
|
4328
|
+
rmTeamById: rmTeamById(join21(path9, "teams")),
|
|
4120
4329
|
/**
|
|
4121
4330
|
* ================================
|
|
4122
4331
|
* Users
|
|
@@ -4129,25 +4338,25 @@ var src_default = (path9) => {
|
|
|
4129
4338
|
* @param options - Optional options to write the user
|
|
4130
4339
|
*
|
|
4131
4340
|
*/
|
|
4132
|
-
writeUser: writeUser(
|
|
4341
|
+
writeUser: writeUser(join21(path9, "users")),
|
|
4133
4342
|
/**
|
|
4134
4343
|
* Returns a user from EventCatalog
|
|
4135
4344
|
* @param id - The id of the user to retrieve
|
|
4136
4345
|
* @returns User|Undefined
|
|
4137
4346
|
*/
|
|
4138
|
-
getUser: getUser(
|
|
4347
|
+
getUser: getUser(join21(path9, "users")),
|
|
4139
4348
|
/**
|
|
4140
4349
|
* Returns all user from EventCatalog
|
|
4141
4350
|
* @returns User[]|Undefined
|
|
4142
4351
|
*/
|
|
4143
|
-
getUsers: getUsers(
|
|
4352
|
+
getUsers: getUsers(join21(path9)),
|
|
4144
4353
|
/**
|
|
4145
4354
|
* Remove a user by the user id
|
|
4146
4355
|
*
|
|
4147
4356
|
* @param id - The id of the user you want to remove
|
|
4148
4357
|
*
|
|
4149
4358
|
*/
|
|
4150
|
-
rmUserById: rmUserById(
|
|
4359
|
+
rmUserById: rmUserById(join21(path9, "users")),
|
|
4151
4360
|
/**
|
|
4152
4361
|
* ================================
|
|
4153
4362
|
* Custom Docs
|
|
@@ -4158,32 +4367,32 @@ var src_default = (path9) => {
|
|
|
4158
4367
|
* @param path - The path to the custom doc to retrieve
|
|
4159
4368
|
* @returns CustomDoc|Undefined
|
|
4160
4369
|
*/
|
|
4161
|
-
getCustomDoc: getCustomDoc(
|
|
4370
|
+
getCustomDoc: getCustomDoc(join21(path9, "docs")),
|
|
4162
4371
|
/**
|
|
4163
4372
|
* Returns all custom docs from EventCatalog
|
|
4164
4373
|
* @param options - Optional options to get custom docs from a specific path
|
|
4165
4374
|
* @returns CustomDoc[]|Undefined
|
|
4166
4375
|
*/
|
|
4167
|
-
getCustomDocs: getCustomDocs(
|
|
4376
|
+
getCustomDocs: getCustomDocs(join21(path9, "docs")),
|
|
4168
4377
|
/**
|
|
4169
4378
|
* Writes a custom doc to EventCatalog
|
|
4170
4379
|
* @param customDoc - The custom doc to write
|
|
4171
4380
|
* @param options - Optional options to write the custom doc
|
|
4172
4381
|
*
|
|
4173
4382
|
*/
|
|
4174
|
-
writeCustomDoc: writeCustomDoc(
|
|
4383
|
+
writeCustomDoc: writeCustomDoc(join21(path9, "docs")),
|
|
4175
4384
|
/**
|
|
4176
4385
|
* Removes a custom doc from EventCatalog
|
|
4177
4386
|
* @param path - The path to the custom doc to remove
|
|
4178
4387
|
*
|
|
4179
4388
|
*/
|
|
4180
|
-
rmCustomDoc: rmCustomDoc(
|
|
4389
|
+
rmCustomDoc: rmCustomDoc(join21(path9, "docs")),
|
|
4181
4390
|
/**
|
|
4182
4391
|
* Dumps the catalog to a JSON file.
|
|
4183
4392
|
* @param directory - The directory to dump the catalog to
|
|
4184
4393
|
* @returns A JSON file with the catalog
|
|
4185
4394
|
*/
|
|
4186
|
-
dumpCatalog: dumpCatalog(
|
|
4395
|
+
dumpCatalog: dumpCatalog(join21(path9)),
|
|
4187
4396
|
/**
|
|
4188
4397
|
* Returns the event catalog configuration file.
|
|
4189
4398
|
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
@@ -4191,7 +4400,7 @@ var src_default = (path9) => {
|
|
|
4191
4400
|
* @param directory - The directory of the catalog.
|
|
4192
4401
|
* @returns A JSON object with the configuration for the event catalog.
|
|
4193
4402
|
*/
|
|
4194
|
-
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(
|
|
4403
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join21(path9)),
|
|
4195
4404
|
/**
|
|
4196
4405
|
* ================================
|
|
4197
4406
|
* Changelogs
|
|
@@ -4205,7 +4414,7 @@ var src_default = (path9) => {
|
|
|
4205
4414
|
* @param options - Optional options (version, format)
|
|
4206
4415
|
*
|
|
4207
4416
|
*/
|
|
4208
|
-
writeChangelog: writeChangelog(
|
|
4417
|
+
writeChangelog: writeChangelog(join21(path9)),
|
|
4209
4418
|
/**
|
|
4210
4419
|
* Appends a changelog entry to an existing changelog for a resource.
|
|
4211
4420
|
* If no changelog exists, one is created.
|
|
@@ -4215,7 +4424,7 @@ var src_default = (path9) => {
|
|
|
4215
4424
|
* @param options - Optional options (version, format)
|
|
4216
4425
|
*
|
|
4217
4426
|
*/
|
|
4218
|
-
appendChangelog: appendChangelog(
|
|
4427
|
+
appendChangelog: appendChangelog(join21(path9)),
|
|
4219
4428
|
/**
|
|
4220
4429
|
* Returns the changelog for a resource in EventCatalog
|
|
4221
4430
|
*
|
|
@@ -4223,7 +4432,7 @@ var src_default = (path9) => {
|
|
|
4223
4432
|
* @param options - Optional options (version)
|
|
4224
4433
|
* @returns Changelog|Undefined
|
|
4225
4434
|
*/
|
|
4226
|
-
getChangelog: getChangelog(
|
|
4435
|
+
getChangelog: getChangelog(join21(path9)),
|
|
4227
4436
|
/**
|
|
4228
4437
|
* Removes the changelog for a resource in EventCatalog
|
|
4229
4438
|
*
|
|
@@ -4231,7 +4440,7 @@ var src_default = (path9) => {
|
|
|
4231
4440
|
* @param options - Optional options (version)
|
|
4232
4441
|
*
|
|
4233
4442
|
*/
|
|
4234
|
-
rmChangelog: rmChangelog(
|
|
4443
|
+
rmChangelog: rmChangelog(join21(path9)),
|
|
4235
4444
|
/**
|
|
4236
4445
|
* ================================
|
|
4237
4446
|
* Resources Utils
|
|
@@ -4245,6 +4454,10 @@ var src_default = (path9) => {
|
|
|
4245
4454
|
* Returns the folder name of a given resource
|
|
4246
4455
|
*/
|
|
4247
4456
|
getResourceFolderName,
|
|
4457
|
+
/**
|
|
4458
|
+
* Returns resources from the catalog for a given type
|
|
4459
|
+
*/
|
|
4460
|
+
getResources,
|
|
4248
4461
|
/**
|
|
4249
4462
|
* ================================
|
|
4250
4463
|
* General Message Utils
|
|
@@ -4256,26 +4469,26 @@ var src_default = (path9) => {
|
|
|
4256
4469
|
* @param path - The path to the message to retrieve
|
|
4257
4470
|
* @returns Message|Undefined
|
|
4258
4471
|
*/
|
|
4259
|
-
getMessageBySchemaPath: getMessageBySchemaPath(
|
|
4472
|
+
getMessageBySchemaPath: getMessageBySchemaPath(join21(path9)),
|
|
4260
4473
|
/**
|
|
4261
4474
|
* Returns the producers and consumers (services and agents) for a given message
|
|
4262
4475
|
* @param id - The id of the message to get the producers and consumers for
|
|
4263
4476
|
* @param version - Optional version of the message
|
|
4264
4477
|
* @returns { producers: (Service|Agent)[], consumers: (Service|Agent)[] }
|
|
4265
4478
|
*/
|
|
4266
|
-
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(
|
|
4479
|
+
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join21(path9)),
|
|
4267
4480
|
/**
|
|
4268
4481
|
* Returns the consumers of a given schema path
|
|
4269
4482
|
* @param path - The path to the schema to get the consumers for
|
|
4270
4483
|
* @returns (Service|Agent)[]
|
|
4271
4484
|
*/
|
|
4272
|
-
getConsumersOfSchema: getConsumersOfSchema(
|
|
4485
|
+
getConsumersOfSchema: getConsumersOfSchema(join21(path9)),
|
|
4273
4486
|
/**
|
|
4274
4487
|
* Returns the producers of a given schema path
|
|
4275
4488
|
* @param path - The path to the schema to get the producers for
|
|
4276
4489
|
* @returns (Service|Agent)[]
|
|
4277
4490
|
*/
|
|
4278
|
-
getProducersOfSchema: getProducersOfSchema(
|
|
4491
|
+
getProducersOfSchema: getProducersOfSchema(join21(path9)),
|
|
4279
4492
|
/**
|
|
4280
4493
|
* Returns the schema for a given message (event, command or query) by its id and version.
|
|
4281
4494
|
* If no version is given, the latest version is used.
|
|
@@ -4283,14 +4496,14 @@ var src_default = (path9) => {
|
|
|
4283
4496
|
* @param version - Optional version of the message
|
|
4284
4497
|
* @returns { schema: string, fileName: string } | undefined
|
|
4285
4498
|
*/
|
|
4286
|
-
getSchemaForMessage: getSchemaForMessage(
|
|
4499
|
+
getSchemaForMessage: getSchemaForMessage(join21(path9)),
|
|
4287
4500
|
/**
|
|
4288
4501
|
* Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
|
|
4289
4502
|
* @param id - The id of the resource to get the owners for
|
|
4290
4503
|
* @param version - Optional version of the resource
|
|
4291
4504
|
* @returns { owners: User[] }
|
|
4292
4505
|
*/
|
|
4293
|
-
getOwnersForResource: getOwnersForResource(
|
|
4506
|
+
getOwnersForResource: getOwnersForResource(join21(path9)),
|
|
4294
4507
|
/**
|
|
4295
4508
|
* ================================
|
|
4296
4509
|
* Entities
|
|
@@ -4302,13 +4515,13 @@ var src_default = (path9) => {
|
|
|
4302
4515
|
* @param version - Optional id of the version to get (supports semver)
|
|
4303
4516
|
* @returns Entity|Undefined
|
|
4304
4517
|
*/
|
|
4305
|
-
getEntity: getEntity(
|
|
4518
|
+
getEntity: getEntity(join21(path9)),
|
|
4306
4519
|
/**
|
|
4307
4520
|
* Returns all entities from EventCatalog
|
|
4308
4521
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4309
4522
|
* @returns Entity[]|Undefined
|
|
4310
4523
|
*/
|
|
4311
|
-
getEntities: getEntities(
|
|
4524
|
+
getEntities: getEntities(join21(path9)),
|
|
4312
4525
|
/**
|
|
4313
4526
|
* Adds an entity to EventCatalog
|
|
4314
4527
|
*
|
|
@@ -4316,33 +4529,42 @@ var src_default = (path9) => {
|
|
|
4316
4529
|
* @param options - Optional options to write the entity
|
|
4317
4530
|
*
|
|
4318
4531
|
*/
|
|
4319
|
-
writeEntity: writeEntity(
|
|
4532
|
+
writeEntity: writeEntity(join21(path9, "entities")),
|
|
4533
|
+
/**
|
|
4534
|
+
* Adds an entity to a system in EventCatalog
|
|
4535
|
+
*
|
|
4536
|
+
* @param entity - The entity to write to the system
|
|
4537
|
+
* @param system - The system and its id to write the entity to
|
|
4538
|
+
* @param options - Optional options to write the entity
|
|
4539
|
+
*
|
|
4540
|
+
*/
|
|
4541
|
+
writeEntityToSystem: writeEntityToSystem(join21(path9)),
|
|
4320
4542
|
/**
|
|
4321
4543
|
* Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4322
4544
|
*
|
|
4323
4545
|
* @param path - The path to your entity, e.g. `/User`
|
|
4324
4546
|
*
|
|
4325
4547
|
*/
|
|
4326
|
-
rmEntity: rmEntity(
|
|
4548
|
+
rmEntity: rmEntity(join21(path9, "entities")),
|
|
4327
4549
|
/**
|
|
4328
4550
|
* Remove an entity by an entity id
|
|
4329
4551
|
*
|
|
4330
4552
|
* @param id - The id of the entity you want to remove
|
|
4331
4553
|
*
|
|
4332
4554
|
*/
|
|
4333
|
-
rmEntityById: rmEntityById(
|
|
4555
|
+
rmEntityById: rmEntityById(join21(path9)),
|
|
4334
4556
|
/**
|
|
4335
4557
|
* Moves a given entity id to the version directory
|
|
4336
4558
|
* @param id - The id of the entity to version
|
|
4337
4559
|
*/
|
|
4338
|
-
versionEntity: versionEntity(
|
|
4560
|
+
versionEntity: versionEntity(join21(path9)),
|
|
4339
4561
|
/**
|
|
4340
4562
|
* Check to see if an entity version exists
|
|
4341
4563
|
* @param id - The id of the entity
|
|
4342
4564
|
* @param version - The version of the entity (supports semver)
|
|
4343
4565
|
* @returns
|
|
4344
4566
|
*/
|
|
4345
|
-
entityHasVersion: entityHasVersion(
|
|
4567
|
+
entityHasVersion: entityHasVersion(join21(path9)),
|
|
4346
4568
|
/**
|
|
4347
4569
|
* ================================
|
|
4348
4570
|
* Flows
|
|
@@ -4355,7 +4577,7 @@ var src_default = (path9) => {
|
|
|
4355
4577
|
* @param version - Optional version of the flow
|
|
4356
4578
|
* @returns Flow
|
|
4357
4579
|
*/
|
|
4358
|
-
getFlow: getFlow(
|
|
4580
|
+
getFlow: getFlow(join21(path9)),
|
|
4359
4581
|
/**
|
|
4360
4582
|
* Returns all flows from EventCatalog
|
|
4361
4583
|
*
|
|
@@ -4363,7 +4585,7 @@ var src_default = (path9) => {
|
|
|
4363
4585
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4364
4586
|
* @returns Flow[]|Undefined
|
|
4365
4587
|
*/
|
|
4366
|
-
getFlows: getFlows(
|
|
4588
|
+
getFlows: getFlows(join21(path9)),
|
|
4367
4589
|
/**
|
|
4368
4590
|
* Adds a flow to EventCatalog
|
|
4369
4591
|
*
|
|
@@ -4371,14 +4593,14 @@ var src_default = (path9) => {
|
|
|
4371
4593
|
* @param options - Optional options to write the flow
|
|
4372
4594
|
*
|
|
4373
4595
|
*/
|
|
4374
|
-
writeFlow: writeFlow(
|
|
4596
|
+
writeFlow: writeFlow(join21(path9, "flows")),
|
|
4375
4597
|
/**
|
|
4376
4598
|
* Adds a versioned flow to EventCatalog
|
|
4377
4599
|
*
|
|
4378
4600
|
* @param flow - The flow to write
|
|
4379
4601
|
*
|
|
4380
4602
|
*/
|
|
4381
|
-
writeVersionedFlow: writeVersionedFlow(
|
|
4603
|
+
writeVersionedFlow: writeVersionedFlow(join21(path9, "flows")),
|
|
4382
4604
|
/**
|
|
4383
4605
|
* Adds a flow to a domain in EventCatalog
|
|
4384
4606
|
*
|
|
@@ -4387,7 +4609,7 @@ var src_default = (path9) => {
|
|
|
4387
4609
|
* @param options - Optional options to write the flow
|
|
4388
4610
|
*
|
|
4389
4611
|
*/
|
|
4390
|
-
writeFlowToDomain: writeFlowToDomain(
|
|
4612
|
+
writeFlowToDomain: writeFlowToDomain(join21(path9, "domains")),
|
|
4391
4613
|
/**
|
|
4392
4614
|
* Adds a flow to a service in EventCatalog
|
|
4393
4615
|
*
|
|
@@ -4396,7 +4618,16 @@ var src_default = (path9) => {
|
|
|
4396
4618
|
* @param options - Optional options to write the flow
|
|
4397
4619
|
*
|
|
4398
4620
|
*/
|
|
4399
|
-
writeFlowToService: writeFlowToService(
|
|
4621
|
+
writeFlowToService: writeFlowToService(join21(path9, "services")),
|
|
4622
|
+
/**
|
|
4623
|
+
* Adds a flow to a system in EventCatalog
|
|
4624
|
+
*
|
|
4625
|
+
* @param flow - The flow to write to the system
|
|
4626
|
+
* @param system - The system and its id to write the flow to
|
|
4627
|
+
* @param options - Optional options to write the flow
|
|
4628
|
+
*
|
|
4629
|
+
*/
|
|
4630
|
+
writeFlowToSystem: writeFlowToSystem(join21(path9)),
|
|
4400
4631
|
/**
|
|
4401
4632
|
* Adds a flow to an agent in EventCatalog
|
|
4402
4633
|
*
|
|
@@ -4405,33 +4636,33 @@ var src_default = (path9) => {
|
|
|
4405
4636
|
* @param options - Optional options to write the flow
|
|
4406
4637
|
*
|
|
4407
4638
|
*/
|
|
4408
|
-
writeFlowToAgent: writeFlowToAgent(
|
|
4639
|
+
writeFlowToAgent: writeFlowToAgent(join21(path9, "agents")),
|
|
4409
4640
|
/**
|
|
4410
4641
|
* Remove a flow from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4411
4642
|
*
|
|
4412
4643
|
* @param path - The path to your flow, e.g. `/PaymentFlow`
|
|
4413
4644
|
*
|
|
4414
4645
|
*/
|
|
4415
|
-
rmFlow: rmFlow(
|
|
4646
|
+
rmFlow: rmFlow(join21(path9, "flows")),
|
|
4416
4647
|
/**
|
|
4417
4648
|
* Remove a flow by a flow id
|
|
4418
4649
|
*
|
|
4419
4650
|
* @param id - The id of the flow you want to remove
|
|
4420
4651
|
*
|
|
4421
4652
|
*/
|
|
4422
|
-
rmFlowById: rmFlowById(
|
|
4653
|
+
rmFlowById: rmFlowById(join21(path9)),
|
|
4423
4654
|
/**
|
|
4424
4655
|
* Moves a given flow id to the version directory
|
|
4425
4656
|
* @param id - The id of the flow to version
|
|
4426
4657
|
*/
|
|
4427
|
-
versionFlow: versionFlow(
|
|
4658
|
+
versionFlow: versionFlow(join21(path9)),
|
|
4428
4659
|
/**
|
|
4429
4660
|
* Check to see if a flow version exists
|
|
4430
4661
|
* @param id - The id of the flow
|
|
4431
4662
|
* @param version - The version of the flow (supports semver)
|
|
4432
4663
|
* @returns
|
|
4433
4664
|
*/
|
|
4434
|
-
flowHasVersion: flowHasVersion(
|
|
4665
|
+
flowHasVersion: flowHasVersion(join21(path9)),
|
|
4435
4666
|
/**
|
|
4436
4667
|
* Adds a file to the given flow
|
|
4437
4668
|
* @param id - The id of the flow to add the file to
|
|
@@ -4439,7 +4670,7 @@ var src_default = (path9) => {
|
|
|
4439
4670
|
* @param version - Optional version of the flow to add the file to
|
|
4440
4671
|
* @returns
|
|
4441
4672
|
*/
|
|
4442
|
-
addFileToFlow: addFileToFlow(
|
|
4673
|
+
addFileToFlow: addFileToFlow(join21(path9)),
|
|
4443
4674
|
/**
|
|
4444
4675
|
* ================================
|
|
4445
4676
|
* Data Stores
|
|
@@ -4451,42 +4682,42 @@ var src_default = (path9) => {
|
|
|
4451
4682
|
* @param options - Optional options to write the data store
|
|
4452
4683
|
*
|
|
4453
4684
|
*/
|
|
4454
|
-
writeDataStore: writeDataStore(
|
|
4685
|
+
writeDataStore: writeDataStore(join21(path9, "containers")),
|
|
4455
4686
|
/**
|
|
4456
4687
|
* Returns a data store from EventCatalog
|
|
4457
4688
|
* @param id - The id of the data store to retrieve
|
|
4458
4689
|
* @param version - Optional id of the version to get (supports semver)
|
|
4459
4690
|
* @returns Container|Undefined
|
|
4460
4691
|
*/
|
|
4461
|
-
getDataStore: getDataStore(
|
|
4692
|
+
getDataStore: getDataStore(join21(path9)),
|
|
4462
4693
|
/**
|
|
4463
4694
|
* Returns all data stores from EventCatalog
|
|
4464
4695
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4465
4696
|
* @returns Container[]|Undefined
|
|
4466
4697
|
*/
|
|
4467
|
-
getDataStores: getDataStores(
|
|
4698
|
+
getDataStores: getDataStores(join21(path9)),
|
|
4468
4699
|
/**
|
|
4469
4700
|
* Version a data store by its id
|
|
4470
4701
|
* @param id - The id of the data store to version
|
|
4471
4702
|
*/
|
|
4472
|
-
versionDataStore: versionDataStore(
|
|
4703
|
+
versionDataStore: versionDataStore(join21(path9, "containers")),
|
|
4473
4704
|
/**
|
|
4474
4705
|
* Remove a data store by its path
|
|
4475
4706
|
* @param path - The path to the data store to remove
|
|
4476
4707
|
*/
|
|
4477
|
-
rmDataStore: rmDataStore(
|
|
4708
|
+
rmDataStore: rmDataStore(join21(path9, "containers")),
|
|
4478
4709
|
/**
|
|
4479
4710
|
* Remove a data store by its id
|
|
4480
4711
|
* @param id - The id of the data store to remove
|
|
4481
4712
|
*/
|
|
4482
|
-
rmDataStoreById: rmDataStoreById(
|
|
4713
|
+
rmDataStoreById: rmDataStoreById(join21(path9)),
|
|
4483
4714
|
/**
|
|
4484
4715
|
* Check to see if a data store version exists
|
|
4485
4716
|
* @param id - The id of the data store
|
|
4486
4717
|
* @param version - The version of the data store (supports semver)
|
|
4487
4718
|
* @returns
|
|
4488
4719
|
*/
|
|
4489
|
-
dataStoreHasVersion: dataStoreHasVersion(
|
|
4720
|
+
dataStoreHasVersion: dataStoreHasVersion(join21(path9)),
|
|
4490
4721
|
/**
|
|
4491
4722
|
* Adds a file to a data store by its id
|
|
4492
4723
|
* @param id - The id of the data store to add the file to
|
|
@@ -4494,14 +4725,21 @@ var src_default = (path9) => {
|
|
|
4494
4725
|
* @param version - Optional version of the data store to add the file to
|
|
4495
4726
|
* @returns
|
|
4496
4727
|
*/
|
|
4497
|
-
addFileToDataStore: addFileToDataStore(
|
|
4728
|
+
addFileToDataStore: addFileToDataStore(join21(path9)),
|
|
4498
4729
|
/**
|
|
4499
4730
|
* Writes a data store to a service by its id
|
|
4500
4731
|
* @param dataStore - The data store to write
|
|
4501
4732
|
* @param service - The service to write the data store to
|
|
4502
4733
|
* @returns
|
|
4503
4734
|
*/
|
|
4504
|
-
writeDataStoreToService: writeDataStoreToService(
|
|
4735
|
+
writeDataStoreToService: writeDataStoreToService(join21(path9)),
|
|
4736
|
+
/**
|
|
4737
|
+
* Writes a data store to a system by its id
|
|
4738
|
+
* @param dataStore - The data store to write
|
|
4739
|
+
* @param system - The system to write the data store to
|
|
4740
|
+
* @returns
|
|
4741
|
+
*/
|
|
4742
|
+
writeDataStoreToSystem: writeDataStoreToSystem(join21(path9)),
|
|
4505
4743
|
/**
|
|
4506
4744
|
* ================================
|
|
4507
4745
|
* Data Products
|
|
@@ -4513,7 +4751,7 @@ var src_default = (path9) => {
|
|
|
4513
4751
|
* @param options - Optional options to write the data product
|
|
4514
4752
|
*
|
|
4515
4753
|
*/
|
|
4516
|
-
writeDataProduct: writeDataProduct(
|
|
4754
|
+
writeDataProduct: writeDataProduct(join21(path9, "data-products")),
|
|
4517
4755
|
/**
|
|
4518
4756
|
* Writes a data product to a domain in EventCatalog
|
|
4519
4757
|
* @param dataProduct - The data product to write
|
|
@@ -4521,43 +4759,43 @@ var src_default = (path9) => {
|
|
|
4521
4759
|
* @param options - Optional options to write the data product
|
|
4522
4760
|
*
|
|
4523
4761
|
*/
|
|
4524
|
-
writeDataProductToDomain: writeDataProductToDomain(
|
|
4762
|
+
writeDataProductToDomain: writeDataProductToDomain(join21(path9, "domains")),
|
|
4525
4763
|
/**
|
|
4526
4764
|
* Returns a data product from EventCatalog
|
|
4527
4765
|
* @param id - The id of the data product to retrieve
|
|
4528
4766
|
* @param version - Optional id of the version to get (supports semver)
|
|
4529
4767
|
* @returns DataProduct|Undefined
|
|
4530
4768
|
*/
|
|
4531
|
-
getDataProduct: getDataProduct(
|
|
4769
|
+
getDataProduct: getDataProduct(join21(path9)),
|
|
4532
4770
|
/**
|
|
4533
4771
|
* Returns all data products from EventCatalog
|
|
4534
4772
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4535
4773
|
* @returns DataProduct[]|Undefined
|
|
4536
4774
|
*/
|
|
4537
|
-
getDataProducts: getDataProducts(
|
|
4775
|
+
getDataProducts: getDataProducts(join21(path9)),
|
|
4538
4776
|
/**
|
|
4539
4777
|
* Version a data product by its id
|
|
4540
4778
|
* @param id - The id of the data product to version
|
|
4541
4779
|
*/
|
|
4542
|
-
versionDataProduct: versionDataProduct(
|
|
4780
|
+
versionDataProduct: versionDataProduct(join21(path9)),
|
|
4543
4781
|
/**
|
|
4544
4782
|
* Remove a data product by its path
|
|
4545
4783
|
* @param path - The path to the data product to remove
|
|
4546
4784
|
*/
|
|
4547
|
-
rmDataProduct: rmDataProduct(
|
|
4785
|
+
rmDataProduct: rmDataProduct(join21(path9, "data-products")),
|
|
4548
4786
|
/**
|
|
4549
4787
|
* Remove a data product by its id
|
|
4550
4788
|
* @param id - The id of the data product to remove
|
|
4551
4789
|
* @param version - Optional version of the data product to remove
|
|
4552
4790
|
*/
|
|
4553
|
-
rmDataProductById: rmDataProductById(
|
|
4791
|
+
rmDataProductById: rmDataProductById(join21(path9)),
|
|
4554
4792
|
/**
|
|
4555
4793
|
* Check to see if a data product version exists
|
|
4556
4794
|
* @param id - The id of the data product
|
|
4557
4795
|
* @param version - The version of the data product (supports semver)
|
|
4558
4796
|
* @returns
|
|
4559
4797
|
*/
|
|
4560
|
-
dataProductHasVersion: dataProductHasVersion(
|
|
4798
|
+
dataProductHasVersion: dataProductHasVersion(join21(path9)),
|
|
4561
4799
|
/**
|
|
4562
4800
|
* Adds a file to a data product by its id
|
|
4563
4801
|
* @param id - The id of the data product to add the file to
|
|
@@ -4565,7 +4803,7 @@ var src_default = (path9) => {
|
|
|
4565
4803
|
* @param version - Optional version of the data product to add the file to
|
|
4566
4804
|
* @returns
|
|
4567
4805
|
*/
|
|
4568
|
-
addFileToDataProduct: addFileToDataProduct(
|
|
4806
|
+
addFileToDataProduct: addFileToDataProduct(join21(path9)),
|
|
4569
4807
|
/**
|
|
4570
4808
|
* Adds a data product to a domain
|
|
4571
4809
|
* @param id - The id of the domain
|
|
@@ -4573,7 +4811,7 @@ var src_default = (path9) => {
|
|
|
4573
4811
|
* @param version - (Optional) The version of the domain to add the data product to
|
|
4574
4812
|
* @returns
|
|
4575
4813
|
*/
|
|
4576
|
-
addDataProductToDomain: addDataProductToDomain(
|
|
4814
|
+
addDataProductToDomain: addDataProductToDomain(join21(path9, "domains")),
|
|
4577
4815
|
/**
|
|
4578
4816
|
* ================================
|
|
4579
4817
|
* Diagrams
|
|
@@ -4585,13 +4823,13 @@ var src_default = (path9) => {
|
|
|
4585
4823
|
* @param version - Optional id of the version to get (supports semver)
|
|
4586
4824
|
* @returns Diagram|Undefined
|
|
4587
4825
|
*/
|
|
4588
|
-
getDiagram: getDiagram(
|
|
4826
|
+
getDiagram: getDiagram(join21(path9)),
|
|
4589
4827
|
/**
|
|
4590
4828
|
* Returns all diagrams from EventCatalog
|
|
4591
4829
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4592
4830
|
* @returns Diagram[]|Undefined
|
|
4593
4831
|
*/
|
|
4594
|
-
getDiagrams: getDiagrams(
|
|
4832
|
+
getDiagrams: getDiagrams(join21(path9)),
|
|
4595
4833
|
/**
|
|
4596
4834
|
* Adds a diagram to EventCatalog
|
|
4597
4835
|
*
|
|
@@ -4599,33 +4837,33 @@ var src_default = (path9) => {
|
|
|
4599
4837
|
* @param options - Optional options to write the diagram
|
|
4600
4838
|
*
|
|
4601
4839
|
*/
|
|
4602
|
-
writeDiagram: writeDiagram(
|
|
4840
|
+
writeDiagram: writeDiagram(join21(path9, "diagrams")),
|
|
4603
4841
|
/**
|
|
4604
4842
|
* Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4605
4843
|
*
|
|
4606
4844
|
* @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
|
|
4607
4845
|
*
|
|
4608
4846
|
*/
|
|
4609
|
-
rmDiagram: rmDiagram(
|
|
4847
|
+
rmDiagram: rmDiagram(join21(path9, "diagrams")),
|
|
4610
4848
|
/**
|
|
4611
4849
|
* Remove a diagram by a diagram id
|
|
4612
4850
|
*
|
|
4613
4851
|
* @param id - The id of the diagram you want to remove
|
|
4614
4852
|
*
|
|
4615
4853
|
*/
|
|
4616
|
-
rmDiagramById: rmDiagramById(
|
|
4854
|
+
rmDiagramById: rmDiagramById(join21(path9)),
|
|
4617
4855
|
/**
|
|
4618
4856
|
* Moves a given diagram id to the version directory
|
|
4619
4857
|
* @param id - The id of the diagram to version
|
|
4620
4858
|
*/
|
|
4621
|
-
versionDiagram: versionDiagram(
|
|
4859
|
+
versionDiagram: versionDiagram(join21(path9)),
|
|
4622
4860
|
/**
|
|
4623
4861
|
* Check to see if a diagram version exists
|
|
4624
4862
|
* @param id - The id of the diagram
|
|
4625
4863
|
* @param version - The version of the diagram (supports semver)
|
|
4626
4864
|
* @returns
|
|
4627
4865
|
*/
|
|
4628
|
-
diagramHasVersion: diagramHasVersion(
|
|
4866
|
+
diagramHasVersion: diagramHasVersion(join21(path9)),
|
|
4629
4867
|
/**
|
|
4630
4868
|
* Adds a file to the given diagram
|
|
4631
4869
|
* @param id - The id of the diagram to add the file to
|
|
@@ -4633,7 +4871,7 @@ var src_default = (path9) => {
|
|
|
4633
4871
|
* @param version - Optional version of the diagram to add the file to
|
|
4634
4872
|
* @returns
|
|
4635
4873
|
*/
|
|
4636
|
-
addFileToDiagram: addFileToDiagram(
|
|
4874
|
+
addFileToDiagram: addFileToDiagram(join21(path9)),
|
|
4637
4875
|
/**
|
|
4638
4876
|
* ================================
|
|
4639
4877
|
* DSL
|
|
@@ -4652,21 +4890,21 @@ var src_default = (path9) => {
|
|
|
4652
4890
|
* const dsl = await sdk.toDSL(services, { type: 'service', hydrate: true });
|
|
4653
4891
|
* ```
|
|
4654
4892
|
*/
|
|
4655
|
-
createSnapshot: createSnapshot(
|
|
4656
|
-
diffSnapshots: diffSnapshots(
|
|
4657
|
-
listSnapshots: listSnapshots(
|
|
4658
|
-
toDSL: toDSL(
|
|
4659
|
-
getEvent: getEvent(
|
|
4660
|
-
getCommand: getCommand(
|
|
4661
|
-
getQuery: getQuery(
|
|
4662
|
-
getService: getService(
|
|
4663
|
-
getServices: getServices(
|
|
4664
|
-
getDomain: getDomain(
|
|
4665
|
-
getChannel: getChannel(
|
|
4666
|
-
getChannels: getChannels(
|
|
4667
|
-
getContainer: getDataStore(
|
|
4668
|
-
getTeam: getTeam(
|
|
4669
|
-
getUser: getUser(
|
|
4893
|
+
createSnapshot: createSnapshot(join21(path9)),
|
|
4894
|
+
diffSnapshots: diffSnapshots(join21(path9)),
|
|
4895
|
+
listSnapshots: listSnapshots(join21(path9)),
|
|
4896
|
+
toDSL: toDSL(join21(path9), {
|
|
4897
|
+
getEvent: getEvent(join21(path9)),
|
|
4898
|
+
getCommand: getCommand(join21(path9)),
|
|
4899
|
+
getQuery: getQuery(join21(path9)),
|
|
4900
|
+
getService: getService(join21(path9)),
|
|
4901
|
+
getServices: getServices(join21(path9)),
|
|
4902
|
+
getDomain: getDomain(join21(path9, "domains")),
|
|
4903
|
+
getChannel: getChannel(join21(path9)),
|
|
4904
|
+
getChannels: getChannels(join21(path9)),
|
|
4905
|
+
getContainer: getDataStore(join21(path9)),
|
|
4906
|
+
getTeam: getTeam(join21(path9, "teams")),
|
|
4907
|
+
getUser: getUser(join21(path9, "users"))
|
|
4670
4908
|
})
|
|
4671
4909
|
};
|
|
4672
4910
|
};
|