@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.js
CHANGED
|
@@ -34,7 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
default: () => src_default
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(src_exports);
|
|
37
|
-
var
|
|
37
|
+
var import_node_path26 = require("path");
|
|
38
38
|
|
|
39
39
|
// src/dsl/utils.ts
|
|
40
40
|
var import_glob = require("glob");
|
|
@@ -1352,6 +1352,14 @@ var writeServiceToDomain = (directory) => async (service, domain, options = { pa
|
|
|
1352
1352
|
pathForService = (0, import_node_path7.join)(pathForService, service.id);
|
|
1353
1353
|
await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
|
|
1354
1354
|
};
|
|
1355
|
+
var writeServiceToSystem = (directory) => async (service, system, options = { path: "", format: "mdx", override: false }) => {
|
|
1356
|
+
const resourcePath = await getResourcePath(directory, system.id, system.version);
|
|
1357
|
+
if (!resourcePath) {
|
|
1358
|
+
throw new Error("System not found");
|
|
1359
|
+
}
|
|
1360
|
+
const pathForService = (0, import_node_path7.join)(resourcePath.directory, "services", service.id);
|
|
1361
|
+
await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
|
|
1362
|
+
};
|
|
1355
1363
|
var versionService = (directory) => async (id) => versionResource(directory, id);
|
|
1356
1364
|
var rmService = (directory) => async (path9) => {
|
|
1357
1365
|
await import_promises5.default.rm((0, import_node_path7.join)(directory, path9), { recursive: true });
|
|
@@ -1494,15 +1502,129 @@ var addDataStoreToService = (directory) => async (id, operation, dataStore, vers
|
|
|
1494
1502
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
1495
1503
|
};
|
|
1496
1504
|
|
|
1497
|
-
// src/
|
|
1505
|
+
// src/systems.ts
|
|
1498
1506
|
var import_promises6 = __toESM(require("fs/promises"));
|
|
1499
1507
|
var import_node_path8 = require("path");
|
|
1508
|
+
var SYSTEM_RESOURCE_IGNORES = [
|
|
1509
|
+
"**/systems/**/agents/**",
|
|
1510
|
+
"**/systems/**/services/**",
|
|
1511
|
+
"**/systems/**/events/**",
|
|
1512
|
+
"**/systems/**/commands/**",
|
|
1513
|
+
"**/systems/**/queries/**",
|
|
1514
|
+
"**/systems/**/flows/**",
|
|
1515
|
+
"**/systems/**/channels/**",
|
|
1516
|
+
"**/systems/**/entities/**",
|
|
1517
|
+
"**/systems/**/containers/**",
|
|
1518
|
+
"**/systems/**/diagrams/**",
|
|
1519
|
+
"**/systems/**/data-products/**",
|
|
1520
|
+
"**/systems/**/adrs/**",
|
|
1521
|
+
"**/systems/**/docs/**"
|
|
1522
|
+
];
|
|
1523
|
+
var normalizeResourcePointers = (system) => {
|
|
1524
|
+
const resource = { ...system };
|
|
1525
|
+
if (Array.isArray(system.services)) {
|
|
1526
|
+
resource.services = uniqueVersions(system.services);
|
|
1527
|
+
}
|
|
1528
|
+
if (Array.isArray(system.flows)) {
|
|
1529
|
+
resource.flows = uniqueVersions(system.flows);
|
|
1530
|
+
}
|
|
1531
|
+
if (Array.isArray(system.entities)) {
|
|
1532
|
+
resource.entities = uniqueVersions(system.entities);
|
|
1533
|
+
}
|
|
1534
|
+
if (Array.isArray(system.containers)) {
|
|
1535
|
+
resource.containers = uniqueVersions(system.containers);
|
|
1536
|
+
}
|
|
1537
|
+
return resource;
|
|
1538
|
+
};
|
|
1539
|
+
var persistSystemAtExistingPath = async (directory, system, version) => {
|
|
1540
|
+
const systemPath = await getResourcePath(directory, system.id, version);
|
|
1541
|
+
const extension = (0, import_node_path8.extname)(systemPath?.fullPath || "");
|
|
1542
|
+
if (!systemPath) {
|
|
1543
|
+
throw new Error(`Cannot find system ${system.id} in the catalog`);
|
|
1544
|
+
}
|
|
1545
|
+
await rmSystemById(directory)(system.id, version, true);
|
|
1546
|
+
await writeSystem(directory)(system, {
|
|
1547
|
+
path: systemPath.directory,
|
|
1548
|
+
format: extension === ".md" ? "md" : "mdx"
|
|
1549
|
+
});
|
|
1550
|
+
};
|
|
1551
|
+
var getSystem = (directory) => async (id, version) => getResource(directory, id, version, { type: "system" });
|
|
1552
|
+
var getSystemByPath = (directory) => async (path9) => {
|
|
1553
|
+
const system = await getResource(directory, void 0, void 0, { type: "system" }, path9);
|
|
1554
|
+
return system;
|
|
1555
|
+
};
|
|
1556
|
+
var getSystems = (directory) => async (options) => getResources(directory, {
|
|
1557
|
+
type: "systems",
|
|
1558
|
+
ignore: SYSTEM_RESOURCE_IGNORES,
|
|
1559
|
+
latestOnly: options?.latestOnly
|
|
1560
|
+
});
|
|
1561
|
+
var writeSystem = (directory) => async (system, options = {
|
|
1562
|
+
path: "",
|
|
1563
|
+
override: false,
|
|
1564
|
+
format: "mdx"
|
|
1565
|
+
}) => {
|
|
1566
|
+
const resource = normalizeResourcePointers(system);
|
|
1567
|
+
return await writeResource(directory, resource, { ...options, type: "system" });
|
|
1568
|
+
};
|
|
1569
|
+
var writeSystemToDomain = (directory) => async (system, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
1570
|
+
const resourcePath = await getResourcePath(directory, domain.id, domain.version);
|
|
1571
|
+
if (!resourcePath) {
|
|
1572
|
+
throw new Error("Domain not found");
|
|
1573
|
+
}
|
|
1574
|
+
const pathForSystem = (0, import_node_path8.join)(resourcePath.directory, "systems", system.id);
|
|
1575
|
+
await writeSystem(directory)({ ...system }, { ...options, path: pathForSystem });
|
|
1576
|
+
};
|
|
1577
|
+
var versionSystem = (directory) => async (id) => versionResource(directory, id);
|
|
1578
|
+
var rmSystem = (directory) => async (path9) => {
|
|
1579
|
+
await import_promises6.default.rm((0, import_node_path8.join)(directory, path9), { recursive: true });
|
|
1580
|
+
invalidateFileCache();
|
|
1581
|
+
};
|
|
1582
|
+
var rmSystemById = (directory) => async (id, version, persistFiles) => {
|
|
1583
|
+
await rmResourceById(directory, id, version, { type: "system", persistFiles });
|
|
1584
|
+
};
|
|
1585
|
+
var addFileToSystem = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
1586
|
+
var systemHasVersion = (directory) => async (id, version) => {
|
|
1587
|
+
const file = await findFileById(directory, id, version);
|
|
1588
|
+
return !!file;
|
|
1589
|
+
};
|
|
1590
|
+
var isSystem = (directory) => async (path9) => {
|
|
1591
|
+
const system = await getSystemByPath(directory)(path9);
|
|
1592
|
+
const relativePath = (0, import_node_path8.relative)(directory, path9);
|
|
1593
|
+
const segments = relativePath.split(/[/\\]+/);
|
|
1594
|
+
return !!system && segments.includes("systems");
|
|
1595
|
+
};
|
|
1596
|
+
var toSystem = (directory) => async (file) => toResource(directory, file);
|
|
1597
|
+
var addResourceToSystem = (directory, resourceField) => async (id, resource, version) => {
|
|
1598
|
+
const system = await getSystem(directory)(id, version);
|
|
1599
|
+
if (!system) {
|
|
1600
|
+
throw new Error(`Cannot find system ${id} in the catalog`);
|
|
1601
|
+
}
|
|
1602
|
+
if (system[resourceField] === void 0) {
|
|
1603
|
+
system[resourceField] = [];
|
|
1604
|
+
}
|
|
1605
|
+
const resourceExistsInList = system[resourceField]?.some(
|
|
1606
|
+
(item) => item.id === resource.id && item.version === resource.version
|
|
1607
|
+
);
|
|
1608
|
+
if (resourceExistsInList) {
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1611
|
+
system[resourceField]?.push(resource);
|
|
1612
|
+
await persistSystemAtExistingPath(directory, system, version);
|
|
1613
|
+
};
|
|
1614
|
+
var addServiceToSystem = (directory) => addResourceToSystem(directory, "services");
|
|
1615
|
+
var addFlowToSystem = (directory) => addResourceToSystem(directory, "flows");
|
|
1616
|
+
var addEntityToSystem = (directory) => addResourceToSystem(directory, "entities");
|
|
1617
|
+
var addContainerToSystem = (directory) => addResourceToSystem(directory, "containers");
|
|
1618
|
+
|
|
1619
|
+
// src/agents.ts
|
|
1620
|
+
var import_promises7 = __toESM(require("fs/promises"));
|
|
1621
|
+
var import_node_path9 = require("path");
|
|
1500
1622
|
var rewriteAgent = async (directory, id, agent, version) => {
|
|
1501
1623
|
const agentPath = await getResourcePath(directory, id, version);
|
|
1502
1624
|
if (!agentPath) {
|
|
1503
1625
|
throw new Error(`Cannot find agent ${id} in the catalog`);
|
|
1504
1626
|
}
|
|
1505
|
-
const extension = (0,
|
|
1627
|
+
const extension = (0, import_node_path9.extname)(agentPath.fullPath);
|
|
1506
1628
|
await rmAgentById(directory)(id, version, true);
|
|
1507
1629
|
await writeAgent(directory)(agent, { path: agentPath.directory, format: extension === ".md" ? "md" : "mdx" });
|
|
1508
1630
|
};
|
|
@@ -1546,12 +1668,12 @@ var writeVersionedAgent = (directory) => async (agent) => {
|
|
|
1546
1668
|
};
|
|
1547
1669
|
var writeAgentToDomain = (directory) => async (agent, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
1548
1670
|
let pathForAgent = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/agents` : `/${domain.id}/agents`;
|
|
1549
|
-
pathForAgent = (0,
|
|
1671
|
+
pathForAgent = (0, import_node_path9.join)(pathForAgent, agent.id);
|
|
1550
1672
|
await writeResource(directory, { ...agent }, { ...options, path: pathForAgent, type: "agent" });
|
|
1551
1673
|
};
|
|
1552
1674
|
var versionAgent = (directory) => async (id) => versionResource(directory, id);
|
|
1553
1675
|
var rmAgent = (directory) => async (path9) => {
|
|
1554
|
-
await
|
|
1676
|
+
await import_promises7.default.rm((0, import_node_path9.join)(directory, path9), { recursive: true });
|
|
1555
1677
|
invalidateFileCache();
|
|
1556
1678
|
};
|
|
1557
1679
|
var rmAgentById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -1625,15 +1747,15 @@ var agentHasVersion = (directory) => async (id, version) => {
|
|
|
1625
1747
|
};
|
|
1626
1748
|
var isAgent = (directory) => async (path9) => {
|
|
1627
1749
|
const agent = await getAgentByPath(directory)(path9);
|
|
1628
|
-
const relativePath = (0,
|
|
1750
|
+
const relativePath = (0, import_node_path9.relative)(directory, path9);
|
|
1629
1751
|
const segments = relativePath.split(/[/\\]+/);
|
|
1630
1752
|
return !!agent && segments.includes("agents");
|
|
1631
1753
|
};
|
|
1632
1754
|
var toAgent = (directory) => async (file) => toResource(directory, file);
|
|
1633
1755
|
|
|
1634
1756
|
// src/domains.ts
|
|
1635
|
-
var
|
|
1636
|
-
var
|
|
1757
|
+
var import_promises8 = __toESM(require("fs/promises"));
|
|
1758
|
+
var import_node_path10 = __toESM(require("path"));
|
|
1637
1759
|
var import_node_fs3 = __toESM(require("fs"));
|
|
1638
1760
|
var import_gray_matter3 = __toESM(require("gray-matter"));
|
|
1639
1761
|
var resolveDomainWriteDirectory = async (directory, id, version) => {
|
|
@@ -1677,6 +1799,9 @@ var writeDomain = (directory) => async (domain, options = {
|
|
|
1677
1799
|
if (Array.isArray(domain.domains)) {
|
|
1678
1800
|
resource.domains = uniqueVersions(domain.domains);
|
|
1679
1801
|
}
|
|
1802
|
+
if (Array.isArray(domain.systems)) {
|
|
1803
|
+
resource.systems = uniqueVersions(domain.systems);
|
|
1804
|
+
}
|
|
1680
1805
|
if (Array.isArray(domain.sends)) {
|
|
1681
1806
|
resource.sends = uniqueVersions(domain.sends);
|
|
1682
1807
|
}
|
|
@@ -1690,7 +1815,7 @@ var writeDomain = (directory) => async (domain, options = {
|
|
|
1690
1815
|
};
|
|
1691
1816
|
var versionDomain = (directory) => async (id) => versionResource(directory, id);
|
|
1692
1817
|
var rmDomain = (directory) => async (path9) => {
|
|
1693
|
-
await
|
|
1818
|
+
await import_promises8.default.rm((0, import_node_path10.join)(directory, path9), { recursive: true });
|
|
1694
1819
|
invalidateFileCache();
|
|
1695
1820
|
};
|
|
1696
1821
|
var rmDomainById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "domain", persistFiles });
|
|
@@ -1703,7 +1828,7 @@ var addUbiquitousLanguageToDomain = (directory) => async (id, ubiquitousLanguage
|
|
|
1703
1828
|
};
|
|
1704
1829
|
var getUbiquitousLanguageFromDomain = (directory) => async (id, version) => {
|
|
1705
1830
|
const pathToDomain = await findFileById(directory, id, version) || "";
|
|
1706
|
-
const pathToUbiquitousLanguage =
|
|
1831
|
+
const pathToUbiquitousLanguage = import_node_path10.default.join(import_node_path10.default.dirname(pathToDomain), "ubiquitous-language.mdx");
|
|
1707
1832
|
const fileExists = import_node_fs3.default.existsSync(pathToUbiquitousLanguage);
|
|
1708
1833
|
if (!fileExists) {
|
|
1709
1834
|
return void 0;
|
|
@@ -1718,7 +1843,7 @@ var domainHasVersion = (directory) => async (id, version) => {
|
|
|
1718
1843
|
var addServiceToDomain = (directory) => async (id, service, version) => {
|
|
1719
1844
|
let domain = await getDomain(directory)(id, version);
|
|
1720
1845
|
const domainPath = await getResourcePath(directory, id, version);
|
|
1721
|
-
const extension =
|
|
1846
|
+
const extension = import_node_path10.default.extname(domainPath?.fullPath || "");
|
|
1722
1847
|
if (domain.services === void 0) {
|
|
1723
1848
|
domain.services = [];
|
|
1724
1849
|
}
|
|
@@ -1734,7 +1859,7 @@ var addServiceToDomain = (directory) => async (id, service, version) => {
|
|
|
1734
1859
|
var addAgentToDomain = (directory) => async (id, agent, version) => {
|
|
1735
1860
|
let domain = await getDomain(directory)(id, version);
|
|
1736
1861
|
const domainPath = await getResourcePath(directory, id, version);
|
|
1737
|
-
const extension =
|
|
1862
|
+
const extension = import_node_path10.default.extname(domainPath?.fullPath || "");
|
|
1738
1863
|
if (domain.agents === void 0) {
|
|
1739
1864
|
domain.agents = [];
|
|
1740
1865
|
}
|
|
@@ -1750,7 +1875,7 @@ var addAgentToDomain = (directory) => async (id, agent, version) => {
|
|
|
1750
1875
|
var addSubDomainToDomain = (directory) => async (id, subDomain, version) => {
|
|
1751
1876
|
let domain = await getDomain(directory)(id, version);
|
|
1752
1877
|
const domainPath = await getResourcePath(directory, id, version);
|
|
1753
|
-
const extension =
|
|
1878
|
+
const extension = import_node_path10.default.extname(domainPath?.fullPath || "");
|
|
1754
1879
|
if (domain.domains === void 0) {
|
|
1755
1880
|
domain.domains = [];
|
|
1756
1881
|
}
|
|
@@ -1763,10 +1888,26 @@ var addSubDomainToDomain = (directory) => async (id, subDomain, version) => {
|
|
|
1763
1888
|
await rmDomainById(directory)(id, version, true);
|
|
1764
1889
|
await writeDomain(writeDir)(domain, { format: extension === ".md" ? "md" : "mdx" });
|
|
1765
1890
|
};
|
|
1891
|
+
var addSystemToDomain = (directory) => async (id, system, version) => {
|
|
1892
|
+
let domain = await getDomain(directory)(id, version);
|
|
1893
|
+
const domainPath = await getResourcePath(directory, id, version);
|
|
1894
|
+
const extension = import_node_path10.default.extname(domainPath?.fullPath || "");
|
|
1895
|
+
if (domain.systems === void 0) {
|
|
1896
|
+
domain.systems = [];
|
|
1897
|
+
}
|
|
1898
|
+
const systemExistsInList = domain.systems.some((s) => s.id === system.id && s.version === system.version);
|
|
1899
|
+
if (systemExistsInList) {
|
|
1900
|
+
return;
|
|
1901
|
+
}
|
|
1902
|
+
domain.systems.push(system);
|
|
1903
|
+
const writeDir = await resolveDomainWriteDirectory(directory, id, version);
|
|
1904
|
+
await rmDomainById(directory)(id, version, true);
|
|
1905
|
+
await writeDomain(writeDir)(domain, { format: extension === ".md" ? "md" : "mdx" });
|
|
1906
|
+
};
|
|
1766
1907
|
var addEntityToDomain = (directory) => async (id, entity, version) => {
|
|
1767
1908
|
let domain = await getDomain(directory)(id, version);
|
|
1768
1909
|
const domainPath = await getResourcePath(directory, id, version);
|
|
1769
|
-
const extension =
|
|
1910
|
+
const extension = import_node_path10.default.extname(domainPath?.fullPath || "");
|
|
1770
1911
|
if (domain.entities === void 0) {
|
|
1771
1912
|
domain.entities = [];
|
|
1772
1913
|
}
|
|
@@ -1782,7 +1923,7 @@ var addEntityToDomain = (directory) => async (id, entity, version) => {
|
|
|
1782
1923
|
var addDataProductToDomain = (directory) => async (id, dataProduct, version) => {
|
|
1783
1924
|
let domain = await getDomain(directory)(id, version);
|
|
1784
1925
|
const domainPath = await getResourcePath(directory, id, version);
|
|
1785
|
-
const extension =
|
|
1926
|
+
const extension = import_node_path10.default.extname(domainPath?.fullPath || "");
|
|
1786
1927
|
if (domain.dataProducts === void 0) {
|
|
1787
1928
|
domain.dataProducts = [];
|
|
1788
1929
|
}
|
|
@@ -1800,7 +1941,7 @@ var addDataProductToDomain = (directory) => async (id, dataProduct, version) =>
|
|
|
1800
1941
|
var addMessageToDomain = (directory) => async (id, direction, message, version) => {
|
|
1801
1942
|
let domain = await getDomain(directory)(id, version);
|
|
1802
1943
|
const domainPath = await getResourcePath(directory, id, version);
|
|
1803
|
-
const extension =
|
|
1944
|
+
const extension = import_node_path10.default.extname(domainPath?.fullPath || "");
|
|
1804
1945
|
if (direction === "sends") {
|
|
1805
1946
|
if (domain.sends === void 0) {
|
|
1806
1947
|
domain.sends = [];
|
|
@@ -1830,13 +1971,13 @@ var addMessageToDomain = (directory) => async (id, direction, message, version)
|
|
|
1830
1971
|
};
|
|
1831
1972
|
|
|
1832
1973
|
// src/channels.ts
|
|
1833
|
-
var
|
|
1834
|
-
var
|
|
1974
|
+
var import_promises9 = __toESM(require("fs/promises"));
|
|
1975
|
+
var import_node_path11 = require("path");
|
|
1835
1976
|
var getChannel = (directory) => async (id, version) => getResource(directory, id, version, { type: "channel" });
|
|
1836
1977
|
var getChannels = (directory) => async (options) => getResources(directory, { type: "channels", ...options });
|
|
1837
1978
|
var writeChannel = (directory) => async (channel, options = { path: "" }) => writeResource(directory, { ...channel }, { ...options, type: "channel" });
|
|
1838
1979
|
var rmChannel = (directory) => async (path9) => {
|
|
1839
|
-
await
|
|
1980
|
+
await import_promises9.default.rm((0, import_node_path11.join)(directory, path9), { recursive: true });
|
|
1840
1981
|
invalidateFileCache();
|
|
1841
1982
|
};
|
|
1842
1983
|
var rmChannelById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "channel", persistFiles });
|
|
@@ -1867,7 +2008,7 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
1867
2008
|
const { getMessage: getMessage2, rmMessageById, writeMessage } = functions[collection];
|
|
1868
2009
|
const message = await getMessage2(directory)(_message.id, _message.version);
|
|
1869
2010
|
const messagePath = await getResourcePath(directory, _message.id, _message.version);
|
|
1870
|
-
const extension = (0,
|
|
2011
|
+
const extension = (0, import_node_path11.extname)(messagePath?.fullPath || "");
|
|
1871
2012
|
if (!message) throw new Error(`Message ${_message.id} with version ${_message.version} not found`);
|
|
1872
2013
|
if (message.channels === void 0) {
|
|
1873
2014
|
message.channels = [];
|
|
@@ -1879,18 +2020,18 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
1879
2020
|
throw new Error(`Cannot find message ${id} in the catalog`);
|
|
1880
2021
|
}
|
|
1881
2022
|
const path9 = existingResource.split(new RegExp(`[\\\\/]+${collection}`))[0];
|
|
1882
|
-
const pathToResource = (0,
|
|
2023
|
+
const pathToResource = (0, import_node_path11.join)(path9, collection);
|
|
1883
2024
|
await rmMessageById(directory)(_message.id, _message.version, true);
|
|
1884
2025
|
await writeMessage(pathToResource)(message, { format: extension === ".md" ? "md" : "mdx" });
|
|
1885
2026
|
};
|
|
1886
2027
|
|
|
1887
2028
|
// src/messages.ts
|
|
1888
|
-
var
|
|
2029
|
+
var import_node_path12 = require("path");
|
|
1889
2030
|
var import_node_fs4 = __toESM(require("fs"));
|
|
1890
2031
|
var import_gray_matter4 = __toESM(require("gray-matter"));
|
|
1891
2032
|
var import_semver5 = require("semver");
|
|
1892
2033
|
var getMessageBySchemaPath = (directory) => async (path9, options) => {
|
|
1893
|
-
const pathToMessage = (0,
|
|
2034
|
+
const pathToMessage = (0, import_node_path12.dirname)(path9);
|
|
1894
2035
|
try {
|
|
1895
2036
|
const files = await getFiles(`${directory}/${pathToMessage}/index.{md,mdx}`);
|
|
1896
2037
|
if (!files || files.length === 0) {
|
|
@@ -1988,8 +2129,8 @@ var getSchemaForMessage = (directory) => async (id, version) => {
|
|
|
1988
2129
|
if (!file || !import_node_fs4.default.existsSync(file)) return void 0;
|
|
1989
2130
|
const { data } = import_gray_matter4.default.read(file);
|
|
1990
2131
|
if (!data.schemaPath) return void 0;
|
|
1991
|
-
const resourceDirectory = (0,
|
|
1992
|
-
const pathToSchema = (0,
|
|
2132
|
+
const resourceDirectory = (0, import_node_path12.dirname)(file);
|
|
2133
|
+
const pathToSchema = (0, import_node_path12.join)(resourceDirectory, data.schemaPath);
|
|
1993
2134
|
if (!import_node_fs4.default.existsSync(pathToSchema)) return void 0;
|
|
1994
2135
|
const schema = import_node_fs4.default.readFileSync(pathToSchema, "utf8");
|
|
1995
2136
|
return {
|
|
@@ -1999,13 +2140,13 @@ var getSchemaForMessage = (directory) => async (id, version) => {
|
|
|
1999
2140
|
};
|
|
2000
2141
|
|
|
2001
2142
|
// src/custom-docs.ts
|
|
2002
|
-
var
|
|
2143
|
+
var import_node_path13 = __toESM(require("path"));
|
|
2003
2144
|
var import_node_fs5 = __toESM(require("fs"));
|
|
2004
|
-
var
|
|
2145
|
+
var import_promises10 = __toESM(require("fs/promises"));
|
|
2005
2146
|
var import_gray_matter5 = __toESM(require("gray-matter"));
|
|
2006
2147
|
var import_slugify = __toESM(require("slugify"));
|
|
2007
2148
|
var getCustomDoc = (directory) => async (filePath) => {
|
|
2008
|
-
const fullPath =
|
|
2149
|
+
const fullPath = import_node_path13.default.join(directory, filePath);
|
|
2009
2150
|
const fullPathWithExtension = fullPath.endsWith(".mdx") ? fullPath : `${fullPath}.mdx`;
|
|
2010
2151
|
const fileExists = import_node_fs5.default.existsSync(fullPathWithExtension);
|
|
2011
2152
|
if (!fileExists) {
|
|
@@ -2024,39 +2165,39 @@ var writeCustomDoc = (directory) => async (customDoc, options = { path: "" }) =>
|
|
|
2024
2165
|
const { fileName, ...rest } = customDoc;
|
|
2025
2166
|
const name = fileName || (0, import_slugify.default)(customDoc.title, { lower: true });
|
|
2026
2167
|
const withExtension = name.endsWith(".mdx") ? name : `${name}.mdx`;
|
|
2027
|
-
const fullPath =
|
|
2028
|
-
import_node_fs5.default.mkdirSync(
|
|
2168
|
+
const fullPath = import_node_path13.default.join(directory, options.path || "", withExtension);
|
|
2169
|
+
import_node_fs5.default.mkdirSync(import_node_path13.default.dirname(fullPath), { recursive: true });
|
|
2029
2170
|
const document = import_gray_matter5.default.stringify(customDoc.markdown.trim(), rest);
|
|
2030
2171
|
import_node_fs5.default.writeFileSync(fullPath, document);
|
|
2031
2172
|
invalidateFileCache();
|
|
2032
2173
|
};
|
|
2033
2174
|
var rmCustomDoc = (directory) => async (filePath) => {
|
|
2034
2175
|
const withExtension = filePath.endsWith(".mdx") ? filePath : `${filePath}.mdx`;
|
|
2035
|
-
await
|
|
2176
|
+
await import_promises10.default.rm((0, import_node_path13.join)(directory, withExtension), { recursive: true });
|
|
2036
2177
|
invalidateFileCache();
|
|
2037
2178
|
};
|
|
2038
2179
|
|
|
2039
2180
|
// src/teams.ts
|
|
2040
|
-
var
|
|
2181
|
+
var import_promises11 = __toESM(require("fs/promises"));
|
|
2041
2182
|
var import_node_fs8 = __toESM(require("fs"));
|
|
2042
|
-
var
|
|
2183
|
+
var import_node_path16 = require("path");
|
|
2043
2184
|
var import_gray_matter7 = __toESM(require("gray-matter"));
|
|
2044
|
-
var
|
|
2185
|
+
var import_node_path17 = __toESM(require("path"));
|
|
2045
2186
|
|
|
2046
2187
|
// src/users.ts
|
|
2047
2188
|
var import_node_fs7 = __toESM(require("fs"));
|
|
2048
|
-
var
|
|
2189
|
+
var import_node_path15 = require("path");
|
|
2049
2190
|
var import_gray_matter6 = __toESM(require("gray-matter"));
|
|
2050
2191
|
|
|
2051
2192
|
// src/internal/directory-store.ts
|
|
2052
2193
|
var import_node_fs6 = __toESM(require("fs"));
|
|
2053
|
-
var
|
|
2054
|
-
var DIRECTORY_STORE_PATH =
|
|
2194
|
+
var import_node_path14 = __toESM(require("path"));
|
|
2195
|
+
var DIRECTORY_STORE_PATH = import_node_path14.default.join(".eventcatalog", "store", "directory.json");
|
|
2055
2196
|
var getCatalogRoot = (catalogDir, collection) => {
|
|
2056
|
-
return
|
|
2197
|
+
return import_node_path14.default.basename(catalogDir) === collection ? import_node_path14.default.dirname(catalogDir) : catalogDir;
|
|
2057
2198
|
};
|
|
2058
2199
|
var getDirectoryStorePath = (catalogDir, collection) => {
|
|
2059
|
-
return
|
|
2200
|
+
return import_node_path14.default.join(getCatalogRoot(catalogDir, collection), DIRECTORY_STORE_PATH);
|
|
2060
2201
|
};
|
|
2061
2202
|
var readDirectoryStoreResources = (catalogDir, collection) => {
|
|
2062
2203
|
const storePath = getDirectoryStorePath(catalogDir, collection);
|
|
@@ -2114,12 +2255,12 @@ var writeUser = (catalogDir) => async (user, options = {}) => {
|
|
|
2114
2255
|
}
|
|
2115
2256
|
const { markdown, ...frontmatter } = resource;
|
|
2116
2257
|
const document = import_gray_matter6.default.stringify(markdown, frontmatter);
|
|
2117
|
-
import_node_fs7.default.mkdirSync((0,
|
|
2118
|
-
import_node_fs7.default.writeFileSync((0,
|
|
2258
|
+
import_node_fs7.default.mkdirSync((0, import_node_path15.join)(catalogDir, ""), { recursive: true });
|
|
2259
|
+
import_node_fs7.default.writeFileSync((0, import_node_path15.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
2119
2260
|
invalidateFileCache();
|
|
2120
2261
|
};
|
|
2121
2262
|
var rmUserById = (catalogDir) => async (id) => {
|
|
2122
|
-
import_node_fs7.default.rmSync((0,
|
|
2263
|
+
import_node_fs7.default.rmSync((0, import_node_path15.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
2123
2264
|
invalidateFileCache();
|
|
2124
2265
|
};
|
|
2125
2266
|
|
|
@@ -2158,12 +2299,12 @@ var writeTeam = (catalogDir) => async (team, options = {}) => {
|
|
|
2158
2299
|
}
|
|
2159
2300
|
const { markdown, ...frontmatter } = resource;
|
|
2160
2301
|
const document = import_gray_matter7.default.stringify(markdown, frontmatter);
|
|
2161
|
-
import_node_fs8.default.mkdirSync((0,
|
|
2162
|
-
import_node_fs8.default.writeFileSync((0,
|
|
2302
|
+
import_node_fs8.default.mkdirSync((0, import_node_path16.join)(catalogDir, ""), { recursive: true });
|
|
2303
|
+
import_node_fs8.default.writeFileSync((0, import_node_path16.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
2163
2304
|
invalidateFileCache();
|
|
2164
2305
|
};
|
|
2165
2306
|
var rmTeamById = (catalogDir) => async (id) => {
|
|
2166
|
-
await
|
|
2307
|
+
await import_promises11.default.rm((0, import_node_path16.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
2167
2308
|
invalidateFileCache();
|
|
2168
2309
|
};
|
|
2169
2310
|
var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
@@ -2172,11 +2313,11 @@ var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
|
2172
2313
|
if (!resource) return [];
|
|
2173
2314
|
if (!resource.owners) return [];
|
|
2174
2315
|
for (const owner of resource.owners) {
|
|
2175
|
-
const team = await getTeam(
|
|
2316
|
+
const team = await getTeam(import_node_path17.default.join(catalogDir, "teams"))(owner);
|
|
2176
2317
|
if (team) {
|
|
2177
2318
|
owners.push(team);
|
|
2178
2319
|
} else {
|
|
2179
|
-
const user = await getUser(
|
|
2320
|
+
const user = await getUser(import_node_path17.default.join(catalogDir, "users"))(owner);
|
|
2180
2321
|
if (user) {
|
|
2181
2322
|
owners.push(user);
|
|
2182
2323
|
}
|
|
@@ -2187,11 +2328,11 @@ var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
|
2187
2328
|
|
|
2188
2329
|
// src/eventcatalog.ts
|
|
2189
2330
|
var import_fs = __toESM(require("fs"));
|
|
2190
|
-
var
|
|
2331
|
+
var import_node_path18 = __toESM(require("path"));
|
|
2191
2332
|
var DUMP_VERSION = "0.0.1";
|
|
2192
2333
|
var getEventCatalogVersion = async (catalogDir) => {
|
|
2193
2334
|
try {
|
|
2194
|
-
const packageJson = import_fs.default.readFileSync((0,
|
|
2335
|
+
const packageJson = import_fs.default.readFileSync((0, import_node_path18.join)(catalogDir, "package.json"), "utf8");
|
|
2195
2336
|
const packageJsonObject = JSON.parse(packageJson);
|
|
2196
2337
|
return packageJsonObject["dependencies"]["@eventcatalog/core"];
|
|
2197
2338
|
} catch (error) {
|
|
@@ -2204,7 +2345,7 @@ var hydrateResource = async (catalogDir, resources = [], { attachSchema = false
|
|
|
2204
2345
|
const resourcePath = await getResourcePath(catalogDir, resource.id, resource.version);
|
|
2205
2346
|
let schema = "";
|
|
2206
2347
|
if (resource.schemaPath && resourcePath?.fullPath) {
|
|
2207
|
-
const pathToSchema =
|
|
2348
|
+
const pathToSchema = import_node_path18.default.join(import_node_path18.default.dirname(resourcePath?.fullPath), resource.schemaPath);
|
|
2208
2349
|
if (import_fs.default.existsSync(pathToSchema)) {
|
|
2209
2350
|
schema = import_fs.default.readFileSync(pathToSchema, "utf8");
|
|
2210
2351
|
}
|
|
@@ -2225,7 +2366,7 @@ var filterCollection = (collection, options) => {
|
|
|
2225
2366
|
};
|
|
2226
2367
|
var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
2227
2368
|
try {
|
|
2228
|
-
const path9 = (0,
|
|
2369
|
+
const path9 = (0, import_node_path18.join)(directory, "eventcatalog.config.js");
|
|
2229
2370
|
const configModule = await import(path9);
|
|
2230
2371
|
return configModule.default;
|
|
2231
2372
|
} catch (error) {
|
|
@@ -2236,6 +2377,7 @@ var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
|
2236
2377
|
var dumpCatalog = (directory) => async (options) => {
|
|
2237
2378
|
const {
|
|
2238
2379
|
getDomains: getDomains2,
|
|
2380
|
+
getSystems: getSystems2,
|
|
2239
2381
|
getServices: getServices2,
|
|
2240
2382
|
getAgents: getAgents2,
|
|
2241
2383
|
getEvents: getEvents2,
|
|
@@ -2250,6 +2392,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2250
2392
|
} = src_default(directory);
|
|
2251
2393
|
const { includeMarkdown = true } = options || {};
|
|
2252
2394
|
const domains = await getDomains2();
|
|
2395
|
+
const systems = await getSystems2();
|
|
2253
2396
|
const services = await getServices2();
|
|
2254
2397
|
const agents = await getAgents2();
|
|
2255
2398
|
const events = await getEvents2();
|
|
@@ -2263,6 +2406,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2263
2406
|
const flows = await getFlows2();
|
|
2264
2407
|
const [
|
|
2265
2408
|
hydratedDomains,
|
|
2409
|
+
hydratedSystems,
|
|
2266
2410
|
hydratedServices,
|
|
2267
2411
|
hydratedAgents,
|
|
2268
2412
|
hydratedEvents,
|
|
@@ -2276,6 +2420,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2276
2420
|
hydratedFlows
|
|
2277
2421
|
] = await Promise.all([
|
|
2278
2422
|
hydrateResource(directory, domains),
|
|
2423
|
+
hydrateResource(directory, systems),
|
|
2279
2424
|
hydrateResource(directory, services),
|
|
2280
2425
|
hydrateResource(directory, agents),
|
|
2281
2426
|
hydrateResource(directory, events),
|
|
@@ -2294,6 +2439,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2294
2439
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2295
2440
|
resources: {
|
|
2296
2441
|
domains: filterCollection(hydratedDomains, { includeMarkdown }),
|
|
2442
|
+
systems: filterCollection(hydratedSystems, { includeMarkdown }),
|
|
2297
2443
|
services: filterCollection(hydratedServices, { includeMarkdown }),
|
|
2298
2444
|
agents: filterCollection(hydratedAgents, { includeMarkdown }),
|
|
2299
2445
|
messages: {
|
|
@@ -2313,7 +2459,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
2313
2459
|
|
|
2314
2460
|
// src/snapshots.ts
|
|
2315
2461
|
var import_node_fs9 = __toESM(require("fs"));
|
|
2316
|
-
var
|
|
2462
|
+
var import_node_path19 = __toESM(require("path"));
|
|
2317
2463
|
var import_node_crypto = require("crypto");
|
|
2318
2464
|
var import_node_child_process = require("child_process");
|
|
2319
2465
|
var import_semver6 = require("semver");
|
|
@@ -2493,7 +2639,7 @@ var computeRelationshipDiff = (snapshotA, snapshotB) => {
|
|
|
2493
2639
|
var SNAPSHOT_VERSION = "1.0.0";
|
|
2494
2640
|
var getEventCatalogVersion2 = (catalogDir) => {
|
|
2495
2641
|
try {
|
|
2496
|
-
const packageJson = import_node_fs9.default.readFileSync(
|
|
2642
|
+
const packageJson = import_node_fs9.default.readFileSync(import_node_path19.default.join(catalogDir, "package.json"), "utf8");
|
|
2497
2643
|
const packageJsonObject = JSON.parse(packageJson);
|
|
2498
2644
|
return packageJsonObject["dependencies"]?.["@eventcatalog/core"] ?? "unknown";
|
|
2499
2645
|
} catch {
|
|
@@ -2590,10 +2736,10 @@ var createSnapshot = (directory) => {
|
|
|
2590
2736
|
channels: snapshotChannels
|
|
2591
2737
|
}
|
|
2592
2738
|
};
|
|
2593
|
-
const snapshotsDir = outputDir ||
|
|
2739
|
+
const snapshotsDir = outputDir || import_node_path19.default.join(directory, ".snapshots");
|
|
2594
2740
|
import_node_fs9.default.mkdirSync(snapshotsDir, { recursive: true });
|
|
2595
2741
|
const fileName = `${snapshotLabel}.snapshot.json`;
|
|
2596
|
-
const filePath =
|
|
2742
|
+
const filePath = import_node_path19.default.join(snapshotsDir, fileName);
|
|
2597
2743
|
import_node_fs9.default.writeFileSync(filePath, JSON.stringify(snapshot));
|
|
2598
2744
|
return { filePath, snapshot };
|
|
2599
2745
|
};
|
|
@@ -2624,13 +2770,13 @@ var diffSnapshots = (directory) => async (snapshotAPath, snapshotBPath) => {
|
|
|
2624
2770
|
};
|
|
2625
2771
|
};
|
|
2626
2772
|
var listSnapshots = (directory) => async () => {
|
|
2627
|
-
const snapshotsDir =
|
|
2773
|
+
const snapshotsDir = import_node_path19.default.join(directory, ".snapshots");
|
|
2628
2774
|
if (!import_node_fs9.default.existsSync(snapshotsDir)) return [];
|
|
2629
2775
|
const files = import_node_fs9.default.readdirSync(snapshotsDir).filter((f) => f.endsWith(".snapshot.json"));
|
|
2630
2776
|
const snapshots = [];
|
|
2631
2777
|
for (const file of files) {
|
|
2632
2778
|
try {
|
|
2633
|
-
const filePath =
|
|
2779
|
+
const filePath = import_node_path19.default.join(snapshotsDir, file);
|
|
2634
2780
|
const content = JSON.parse(import_node_fs9.default.readFileSync(filePath, "utf-8"));
|
|
2635
2781
|
snapshots.push({
|
|
2636
2782
|
label: content.label,
|
|
@@ -2645,9 +2791,9 @@ var listSnapshots = (directory) => async () => {
|
|
|
2645
2791
|
};
|
|
2646
2792
|
|
|
2647
2793
|
// src/changelogs.ts
|
|
2648
|
-
var
|
|
2794
|
+
var import_node_path20 = __toESM(require("path"));
|
|
2649
2795
|
var import_node_fs10 = __toESM(require("fs"));
|
|
2650
|
-
var
|
|
2796
|
+
var import_promises12 = __toESM(require("fs/promises"));
|
|
2651
2797
|
var import_gray_matter8 = __toESM(require("gray-matter"));
|
|
2652
2798
|
var writeChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
2653
2799
|
const { version, format = "mdx" } = options;
|
|
@@ -2655,8 +2801,8 @@ var writeChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
|
2655
2801
|
if (!resourceFile) {
|
|
2656
2802
|
throw new Error(`No resource found with id: ${id}${version ? ` and version: ${version}` : ""}`);
|
|
2657
2803
|
}
|
|
2658
|
-
const resourceDir = (0,
|
|
2659
|
-
const changelogPath =
|
|
2804
|
+
const resourceDir = (0, import_node_path20.dirname)(resourceFile);
|
|
2805
|
+
const changelogPath = import_node_path20.default.join(resourceDir, `changelog.${format}`);
|
|
2660
2806
|
const { markdown, ...frontmatter } = changelog;
|
|
2661
2807
|
const fm = { ...frontmatter };
|
|
2662
2808
|
if (fm.createdAt instanceof Date) {
|
|
@@ -2676,9 +2822,9 @@ var appendChangelog = (catalogDir) => async (id, changelog, options = {}) => {
|
|
|
2676
2822
|
if (!resourceFile) {
|
|
2677
2823
|
throw new Error(`No resource found with id: ${id}${version ? ` and version: ${version}` : ""}`);
|
|
2678
2824
|
}
|
|
2679
|
-
const resourceDir = (0,
|
|
2680
|
-
const mdxPath =
|
|
2681
|
-
const mdPath =
|
|
2825
|
+
const resourceDir = (0, import_node_path20.dirname)(resourceFile);
|
|
2826
|
+
const mdxPath = import_node_path20.default.join(resourceDir, "changelog.mdx");
|
|
2827
|
+
const mdPath = import_node_path20.default.join(resourceDir, "changelog.md");
|
|
2682
2828
|
const existingPath = import_node_fs10.default.existsSync(mdxPath) ? mdxPath : import_node_fs10.default.existsSync(mdPath) ? mdPath : void 0;
|
|
2683
2829
|
if (!existingPath) {
|
|
2684
2830
|
return writeChangelog(catalogDir)(id, changelog, options);
|
|
@@ -2706,9 +2852,9 @@ var getChangelog = (catalogDir) => async (id, options = {}) => {
|
|
|
2706
2852
|
const { version } = options;
|
|
2707
2853
|
const resourceFile = await findFileById(catalogDir, id, version);
|
|
2708
2854
|
if (!resourceFile) return void 0;
|
|
2709
|
-
const resourceDir = (0,
|
|
2710
|
-
const mdxPath =
|
|
2711
|
-
const mdPath =
|
|
2855
|
+
const resourceDir = (0, import_node_path20.dirname)(resourceFile);
|
|
2856
|
+
const mdxPath = import_node_path20.default.join(resourceDir, "changelog.mdx");
|
|
2857
|
+
const mdPath = import_node_path20.default.join(resourceDir, "changelog.md");
|
|
2712
2858
|
const changelogPath = import_node_fs10.default.existsSync(mdxPath) ? mdxPath : import_node_fs10.default.existsSync(mdPath) ? mdPath : void 0;
|
|
2713
2859
|
if (!changelogPath) return void 0;
|
|
2714
2860
|
const { data, content } = import_gray_matter8.default.read(changelogPath);
|
|
@@ -2720,21 +2866,21 @@ var rmChangelog = (catalogDir) => async (id, options = {}) => {
|
|
|
2720
2866
|
if (!resourceFile) {
|
|
2721
2867
|
throw new Error(`No resource found with id: ${id}${version ? ` and version: ${version}` : ""}`);
|
|
2722
2868
|
}
|
|
2723
|
-
const resourceDir = (0,
|
|
2724
|
-
const mdxPath =
|
|
2725
|
-
const mdPath =
|
|
2869
|
+
const resourceDir = (0, import_node_path20.dirname)(resourceFile);
|
|
2870
|
+
const mdxPath = import_node_path20.default.join(resourceDir, "changelog.mdx");
|
|
2871
|
+
const mdPath = import_node_path20.default.join(resourceDir, "changelog.md");
|
|
2726
2872
|
if (import_node_fs10.default.existsSync(mdxPath)) {
|
|
2727
|
-
await
|
|
2873
|
+
await import_promises12.default.rm(mdxPath);
|
|
2728
2874
|
}
|
|
2729
2875
|
if (import_node_fs10.default.existsSync(mdPath)) {
|
|
2730
|
-
await
|
|
2876
|
+
await import_promises12.default.rm(mdPath);
|
|
2731
2877
|
}
|
|
2732
2878
|
invalidateFileCache();
|
|
2733
2879
|
};
|
|
2734
2880
|
|
|
2735
2881
|
// src/entities.ts
|
|
2736
|
-
var
|
|
2737
|
-
var
|
|
2882
|
+
var import_promises13 = __toESM(require("fs/promises"));
|
|
2883
|
+
var import_node_path21 = require("path");
|
|
2738
2884
|
var getEntity = (directory) => async (id, version) => getResource(directory, id, version, { type: "entity" });
|
|
2739
2885
|
var getEntities = (directory) => async (options) => getResources(directory, { type: "entities", latestOnly: options?.latestOnly });
|
|
2740
2886
|
var writeEntity = (directory) => async (entity, options = {
|
|
@@ -2742,8 +2888,16 @@ var writeEntity = (directory) => async (entity, options = {
|
|
|
2742
2888
|
override: false,
|
|
2743
2889
|
format: "mdx"
|
|
2744
2890
|
}) => writeResource(directory, { ...entity }, { ...options, type: "entity" });
|
|
2891
|
+
var writeEntityToSystem = (directory) => async (entity, system, options = { path: "", format: "mdx", override: false }) => {
|
|
2892
|
+
const resourcePath = await getResourcePath(directory, system.id, system.version);
|
|
2893
|
+
if (!resourcePath) {
|
|
2894
|
+
throw new Error("System not found");
|
|
2895
|
+
}
|
|
2896
|
+
const pathForEntity = (0, import_node_path21.join)(resourcePath.directory, "entities", entity.id);
|
|
2897
|
+
await writeResource(directory, { ...entity }, { ...options, path: pathForEntity, type: "entity" });
|
|
2898
|
+
};
|
|
2745
2899
|
var rmEntity = (directory) => async (path9) => {
|
|
2746
|
-
await
|
|
2900
|
+
await import_promises13.default.rm((0, import_node_path21.join)(directory, path9), { recursive: true });
|
|
2747
2901
|
invalidateFileCache();
|
|
2748
2902
|
};
|
|
2749
2903
|
var rmEntityById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -2756,8 +2910,8 @@ var entityHasVersion = (directory) => async (id, version) => {
|
|
|
2756
2910
|
};
|
|
2757
2911
|
|
|
2758
2912
|
// src/flows.ts
|
|
2759
|
-
var
|
|
2760
|
-
var
|
|
2913
|
+
var import_promises14 = __toESM(require("fs/promises"));
|
|
2914
|
+
var import_node_path22 = require("path");
|
|
2761
2915
|
|
|
2762
2916
|
// src/flow-builder.ts
|
|
2763
2917
|
var cloneStep = (step) => ({
|
|
@@ -3239,21 +3393,29 @@ var writeVersionedFlow = (directory) => async (flow) => {
|
|
|
3239
3393
|
};
|
|
3240
3394
|
var writeFlowToDomain = (directory) => async (flow, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
3241
3395
|
let pathForFlow = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/flows` : `/${domain.id}/flows`;
|
|
3242
|
-
pathForFlow = (0,
|
|
3396
|
+
pathForFlow = (0, import_node_path22.join)(pathForFlow, flow.id);
|
|
3243
3397
|
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3244
3398
|
};
|
|
3245
3399
|
var writeFlowToService = (directory) => async (flow, service, options = { path: "", format: "mdx", override: false }) => {
|
|
3246
3400
|
let pathForFlow = service.version && service.version !== "latest" ? `/${service.id}/versioned/${service.version}/flows` : `/${service.id}/flows`;
|
|
3247
|
-
pathForFlow = (0,
|
|
3401
|
+
pathForFlow = (0, import_node_path22.join)(pathForFlow, flow.id);
|
|
3402
|
+
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3403
|
+
};
|
|
3404
|
+
var writeFlowToSystem = (directory) => async (flow, system, options = { path: "", format: "mdx", override: false }) => {
|
|
3405
|
+
const resourcePath = await getResourcePath(directory, system.id, system.version);
|
|
3406
|
+
if (!resourcePath) {
|
|
3407
|
+
throw new Error("System not found");
|
|
3408
|
+
}
|
|
3409
|
+
const pathForFlow = (0, import_node_path22.join)(resourcePath.directory, "flows", flow.id);
|
|
3248
3410
|
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3249
3411
|
};
|
|
3250
3412
|
var writeFlowToAgent = (directory) => async (flow, agent, options = { path: "", format: "mdx", override: false }) => {
|
|
3251
3413
|
let pathForFlow = agent.version && agent.version !== "latest" ? `/${agent.id}/versioned/${agent.version}/flows` : `/${agent.id}/flows`;
|
|
3252
|
-
pathForFlow = (0,
|
|
3414
|
+
pathForFlow = (0, import_node_path22.join)(pathForFlow, flow.id);
|
|
3253
3415
|
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
3254
3416
|
};
|
|
3255
3417
|
var rmFlow = (directory) => async (path9) => {
|
|
3256
|
-
await
|
|
3418
|
+
await import_promises14.default.rm((0, import_node_path22.join)(directory, path9), { recursive: true });
|
|
3257
3419
|
invalidateFileCache();
|
|
3258
3420
|
};
|
|
3259
3421
|
var rmFlowById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3267,8 +3429,8 @@ var flowHasVersion = (directory) => async (id, version) => {
|
|
|
3267
3429
|
var addFileToFlow = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version, { type: "flow" });
|
|
3268
3430
|
|
|
3269
3431
|
// src/containers.ts
|
|
3270
|
-
var
|
|
3271
|
-
var
|
|
3432
|
+
var import_promises15 = __toESM(require("fs/promises"));
|
|
3433
|
+
var import_node_path23 = require("path");
|
|
3272
3434
|
var getContainer = (directory) => async (id, version) => getResource(directory, id, version, { type: "container" });
|
|
3273
3435
|
var getContainers = (directory) => async (options) => getResources(directory, { type: "containers", latestOnly: options?.latestOnly });
|
|
3274
3436
|
var writeContainer = (directory) => async (data, options = {
|
|
@@ -3278,7 +3440,7 @@ var writeContainer = (directory) => async (data, options = {
|
|
|
3278
3440
|
}) => writeResource(directory, { ...data }, { ...options, type: "container" });
|
|
3279
3441
|
var versionContainer = (directory) => async (id) => versionResource(directory, id);
|
|
3280
3442
|
var rmContainer = (directory) => async (path9) => {
|
|
3281
|
-
await
|
|
3443
|
+
await import_promises15.default.rm((0, import_node_path23.join)(directory, path9), { recursive: true });
|
|
3282
3444
|
invalidateFileCache();
|
|
3283
3445
|
};
|
|
3284
3446
|
var rmContainerById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3295,7 +3457,15 @@ var writeContainerToService = (directory) => async (container, service, options
|
|
|
3295
3457
|
throw new Error("Service not found");
|
|
3296
3458
|
}
|
|
3297
3459
|
let pathForContainer = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/containers` : `${resourcePath.directory}/containers`;
|
|
3298
|
-
pathForContainer = (0,
|
|
3460
|
+
pathForContainer = (0, import_node_path23.join)(pathForContainer, container.id);
|
|
3461
|
+
await writeResource(directory, { ...container }, { ...options, path: pathForContainer, type: "container" });
|
|
3462
|
+
};
|
|
3463
|
+
var writeContainerToSystem = (directory) => async (container, system, options = { path: "", format: "mdx", override: false }) => {
|
|
3464
|
+
const resourcePath = await getResourcePath(directory, system.id, system.version);
|
|
3465
|
+
if (!resourcePath) {
|
|
3466
|
+
throw new Error("System not found");
|
|
3467
|
+
}
|
|
3468
|
+
const pathForContainer = (0, import_node_path23.join)(resourcePath.directory, "containers", container.id);
|
|
3299
3469
|
await writeResource(directory, { ...container }, { ...options, path: pathForContainer, type: "container" });
|
|
3300
3470
|
};
|
|
3301
3471
|
|
|
@@ -3309,10 +3479,11 @@ var rmDataStoreById = rmContainerById;
|
|
|
3309
3479
|
var dataStoreHasVersion = containerHasVersion;
|
|
3310
3480
|
var addFileToDataStore = addFileToContainer;
|
|
3311
3481
|
var writeDataStoreToService = writeContainerToService;
|
|
3482
|
+
var writeDataStoreToSystem = writeContainerToSystem;
|
|
3312
3483
|
|
|
3313
3484
|
// src/data-products.ts
|
|
3314
|
-
var
|
|
3315
|
-
var
|
|
3485
|
+
var import_promises16 = __toESM(require("fs/promises"));
|
|
3486
|
+
var import_node_path24 = require("path");
|
|
3316
3487
|
var getDataProduct = (directory) => async (id, version) => getResource(directory, id, version, { type: "data-product" });
|
|
3317
3488
|
var getDataProducts = (directory) => async (options) => getResources(directory, { type: "data-products", latestOnly: options?.latestOnly });
|
|
3318
3489
|
var writeDataProduct = (directory) => async (dataProduct, options = {
|
|
@@ -3322,11 +3493,11 @@ var writeDataProduct = (directory) => async (dataProduct, options = {
|
|
|
3322
3493
|
}) => writeResource(directory, { ...dataProduct }, { ...options, type: "data-product" });
|
|
3323
3494
|
var writeDataProductToDomain = (directory) => async (dataProduct, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
3324
3495
|
let pathForDataProduct = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/data-products` : `/${domain.id}/data-products`;
|
|
3325
|
-
pathForDataProduct = (0,
|
|
3496
|
+
pathForDataProduct = (0, import_node_path24.join)(pathForDataProduct, dataProduct.id);
|
|
3326
3497
|
await writeResource(directory, { ...dataProduct }, { ...options, path: pathForDataProduct, type: "data-product" });
|
|
3327
3498
|
};
|
|
3328
3499
|
var rmDataProduct = (directory) => async (path9) => {
|
|
3329
|
-
await
|
|
3500
|
+
await import_promises16.default.rm((0, import_node_path24.join)(directory, path9), { recursive: true });
|
|
3330
3501
|
invalidateFileCache();
|
|
3331
3502
|
};
|
|
3332
3503
|
var rmDataProductById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3340,8 +3511,8 @@ var dataProductHasVersion = (directory) => async (id, version) => {
|
|
|
3340
3511
|
var addFileToDataProduct = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
3341
3512
|
|
|
3342
3513
|
// src/diagrams.ts
|
|
3343
|
-
var
|
|
3344
|
-
var
|
|
3514
|
+
var import_promises17 = __toESM(require("fs/promises"));
|
|
3515
|
+
var import_node_path25 = require("path");
|
|
3345
3516
|
var getDiagram = (directory) => async (id, version) => getResource(directory, id, version, { type: "diagram" });
|
|
3346
3517
|
var getDiagrams = (directory) => async (options) => getResources(directory, { type: "diagrams", latestOnly: options?.latestOnly });
|
|
3347
3518
|
var writeDiagram = (directory) => async (diagram, options = {
|
|
@@ -3350,7 +3521,7 @@ var writeDiagram = (directory) => async (diagram, options = {
|
|
|
3350
3521
|
format: "mdx"
|
|
3351
3522
|
}) => writeResource(directory, { ...diagram }, { ...options, type: "diagram" });
|
|
3352
3523
|
var rmDiagram = (directory) => async (path9) => {
|
|
3353
|
-
await
|
|
3524
|
+
await import_promises17.default.rm((0, import_node_path25.join)(directory, path9), { recursive: true });
|
|
3354
3525
|
invalidateFileCache();
|
|
3355
3526
|
};
|
|
3356
3527
|
var rmDiagramById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -3372,13 +3543,13 @@ var src_default = (path9) => {
|
|
|
3372
3543
|
* @param version - Optional id of the version to get (supports semver)
|
|
3373
3544
|
* @returns Event|Undefined
|
|
3374
3545
|
*/
|
|
3375
|
-
getEvent: getEvent((0,
|
|
3546
|
+
getEvent: getEvent((0, import_node_path26.join)(path9)),
|
|
3376
3547
|
/**
|
|
3377
3548
|
* Returns all events from EventCatalog
|
|
3378
3549
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3379
3550
|
* @returns Event[]|Undefined
|
|
3380
3551
|
*/
|
|
3381
|
-
getEvents: getEvents((0,
|
|
3552
|
+
getEvents: getEvents((0, import_node_path26.join)(path9)),
|
|
3382
3553
|
/**
|
|
3383
3554
|
* Adds an event to EventCatalog
|
|
3384
3555
|
*
|
|
@@ -3386,7 +3557,7 @@ var src_default = (path9) => {
|
|
|
3386
3557
|
* @param options - Optional options to write the event
|
|
3387
3558
|
*
|
|
3388
3559
|
*/
|
|
3389
|
-
writeEvent: writeEvent((0,
|
|
3560
|
+
writeEvent: writeEvent((0, import_node_path26.join)(path9, "events")),
|
|
3390
3561
|
/**
|
|
3391
3562
|
* Adds an event to a service in EventCatalog
|
|
3392
3563
|
*
|
|
@@ -3395,7 +3566,7 @@ var src_default = (path9) => {
|
|
|
3395
3566
|
* @param options - Optional options to write the event
|
|
3396
3567
|
*
|
|
3397
3568
|
*/
|
|
3398
|
-
writeEventToService: writeEventToService((0,
|
|
3569
|
+
writeEventToService: writeEventToService((0, import_node_path26.join)(path9)),
|
|
3399
3570
|
/**
|
|
3400
3571
|
* Adds an event to an agent in EventCatalog
|
|
3401
3572
|
*
|
|
@@ -3404,26 +3575,26 @@ var src_default = (path9) => {
|
|
|
3404
3575
|
* @param options - Optional options to write the event
|
|
3405
3576
|
*
|
|
3406
3577
|
*/
|
|
3407
|
-
writeEventToAgent: writeEventToAgent((0,
|
|
3578
|
+
writeEventToAgent: writeEventToAgent((0, import_node_path26.join)(path9)),
|
|
3408
3579
|
/**
|
|
3409
3580
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3410
3581
|
*
|
|
3411
3582
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
3412
3583
|
*
|
|
3413
3584
|
*/
|
|
3414
|
-
rmEvent: rmEvent((0,
|
|
3585
|
+
rmEvent: rmEvent((0, import_node_path26.join)(path9, "events")),
|
|
3415
3586
|
/**
|
|
3416
3587
|
* Remove an event by an Event id
|
|
3417
3588
|
*
|
|
3418
3589
|
* @param id - The id of the event you want to remove
|
|
3419
3590
|
*
|
|
3420
3591
|
*/
|
|
3421
|
-
rmEventById: rmEventById((0,
|
|
3592
|
+
rmEventById: rmEventById((0, import_node_path26.join)(path9)),
|
|
3422
3593
|
/**
|
|
3423
3594
|
* Moves a given event id to the version directory
|
|
3424
3595
|
* @param directory
|
|
3425
3596
|
*/
|
|
3426
|
-
versionEvent: versionEvent((0,
|
|
3597
|
+
versionEvent: versionEvent((0, import_node_path26.join)(path9)),
|
|
3427
3598
|
/**
|
|
3428
3599
|
* Adds a file to the given event
|
|
3429
3600
|
* @param id - The id of the event to add the file to
|
|
@@ -3431,7 +3602,7 @@ var src_default = (path9) => {
|
|
|
3431
3602
|
* @param version - Optional version of the event to add the file to
|
|
3432
3603
|
* @returns
|
|
3433
3604
|
*/
|
|
3434
|
-
addFileToEvent: addFileToEvent((0,
|
|
3605
|
+
addFileToEvent: addFileToEvent((0, import_node_path26.join)(path9)),
|
|
3435
3606
|
/**
|
|
3436
3607
|
* Adds a schema to the given event
|
|
3437
3608
|
* @param id - The id of the event to add the schema to
|
|
@@ -3439,17 +3610,17 @@ var src_default = (path9) => {
|
|
|
3439
3610
|
* @param version - Optional version of the event to add the schema to
|
|
3440
3611
|
* @returns
|
|
3441
3612
|
*/
|
|
3442
|
-
addSchemaToEvent: addSchemaToEvent((0,
|
|
3613
|
+
addSchemaToEvent: addSchemaToEvent((0, import_node_path26.join)(path9)),
|
|
3443
3614
|
/**
|
|
3444
3615
|
* Check to see if an event version exists
|
|
3445
3616
|
* @param id - The id of the event
|
|
3446
3617
|
* @param version - The version of the event (supports semver)
|
|
3447
3618
|
* @returns
|
|
3448
3619
|
*/
|
|
3449
|
-
eventHasVersion: eventHasVersion((0,
|
|
3450
|
-
addExampleToEvent: addExampleToEvent((0,
|
|
3451
|
-
getExamplesFromEvent: getExamplesFromEvent((0,
|
|
3452
|
-
removeExampleFromEvent: removeExampleFromEvent((0,
|
|
3620
|
+
eventHasVersion: eventHasVersion((0, import_node_path26.join)(path9)),
|
|
3621
|
+
addExampleToEvent: addExampleToEvent((0, import_node_path26.join)(path9)),
|
|
3622
|
+
getExamplesFromEvent: getExamplesFromEvent((0, import_node_path26.join)(path9)),
|
|
3623
|
+
removeExampleFromEvent: removeExampleFromEvent((0, import_node_path26.join)(path9)),
|
|
3453
3624
|
/**
|
|
3454
3625
|
* ================================
|
|
3455
3626
|
* Commands
|
|
@@ -3461,13 +3632,13 @@ var src_default = (path9) => {
|
|
|
3461
3632
|
* @param version - Optional id of the version to get (supports semver)
|
|
3462
3633
|
* @returns Command|Undefined
|
|
3463
3634
|
*/
|
|
3464
|
-
getCommand: getCommand((0,
|
|
3635
|
+
getCommand: getCommand((0, import_node_path26.join)(path9)),
|
|
3465
3636
|
/**
|
|
3466
3637
|
* Returns all commands from EventCatalog
|
|
3467
3638
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3468
3639
|
* @returns Command[]|Undefined
|
|
3469
3640
|
*/
|
|
3470
|
-
getCommands: getCommands((0,
|
|
3641
|
+
getCommands: getCommands((0, import_node_path26.join)(path9)),
|
|
3471
3642
|
/**
|
|
3472
3643
|
* Adds an command to EventCatalog
|
|
3473
3644
|
*
|
|
@@ -3475,7 +3646,7 @@ var src_default = (path9) => {
|
|
|
3475
3646
|
* @param options - Optional options to write the command
|
|
3476
3647
|
*
|
|
3477
3648
|
*/
|
|
3478
|
-
writeCommand: writeCommand((0,
|
|
3649
|
+
writeCommand: writeCommand((0, import_node_path26.join)(path9, "commands")),
|
|
3479
3650
|
/**
|
|
3480
3651
|
* Adds a command to a service in EventCatalog
|
|
3481
3652
|
*
|
|
@@ -3484,7 +3655,7 @@ var src_default = (path9) => {
|
|
|
3484
3655
|
* @param options - Optional options to write the command
|
|
3485
3656
|
*
|
|
3486
3657
|
*/
|
|
3487
|
-
writeCommandToService: writeCommandToService((0,
|
|
3658
|
+
writeCommandToService: writeCommandToService((0, import_node_path26.join)(path9)),
|
|
3488
3659
|
/**
|
|
3489
3660
|
* Adds a command to an agent in EventCatalog
|
|
3490
3661
|
*
|
|
@@ -3493,26 +3664,26 @@ var src_default = (path9) => {
|
|
|
3493
3664
|
* @param options - Optional options to write the command
|
|
3494
3665
|
*
|
|
3495
3666
|
*/
|
|
3496
|
-
writeCommandToAgent: writeCommandToAgent((0,
|
|
3667
|
+
writeCommandToAgent: writeCommandToAgent((0, import_node_path26.join)(path9)),
|
|
3497
3668
|
/**
|
|
3498
3669
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3499
3670
|
*
|
|
3500
3671
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
3501
3672
|
*
|
|
3502
3673
|
*/
|
|
3503
|
-
rmCommand: rmCommand((0,
|
|
3674
|
+
rmCommand: rmCommand((0, import_node_path26.join)(path9, "commands")),
|
|
3504
3675
|
/**
|
|
3505
3676
|
* Remove an command by an Event id
|
|
3506
3677
|
*
|
|
3507
3678
|
* @param id - The id of the command you want to remove
|
|
3508
3679
|
*
|
|
3509
3680
|
*/
|
|
3510
|
-
rmCommandById: rmCommandById((0,
|
|
3681
|
+
rmCommandById: rmCommandById((0, import_node_path26.join)(path9)),
|
|
3511
3682
|
/**
|
|
3512
3683
|
* Moves a given command id to the version directory
|
|
3513
3684
|
* @param directory
|
|
3514
3685
|
*/
|
|
3515
|
-
versionCommand: versionCommand((0,
|
|
3686
|
+
versionCommand: versionCommand((0, import_node_path26.join)(path9)),
|
|
3516
3687
|
/**
|
|
3517
3688
|
* Adds a file to the given command
|
|
3518
3689
|
* @param id - The id of the command to add the file to
|
|
@@ -3520,7 +3691,7 @@ var src_default = (path9) => {
|
|
|
3520
3691
|
* @param version - Optional version of the command to add the file to
|
|
3521
3692
|
* @returns
|
|
3522
3693
|
*/
|
|
3523
|
-
addFileToCommand: addFileToCommand((0,
|
|
3694
|
+
addFileToCommand: addFileToCommand((0, import_node_path26.join)(path9)),
|
|
3524
3695
|
/**
|
|
3525
3696
|
* Adds a schema to the given command
|
|
3526
3697
|
* @param id - The id of the command to add the schema to
|
|
@@ -3528,17 +3699,17 @@ var src_default = (path9) => {
|
|
|
3528
3699
|
* @param version - Optional version of the command to add the schema to
|
|
3529
3700
|
* @returns
|
|
3530
3701
|
*/
|
|
3531
|
-
addSchemaToCommand: addSchemaToCommand((0,
|
|
3702
|
+
addSchemaToCommand: addSchemaToCommand((0, import_node_path26.join)(path9)),
|
|
3532
3703
|
/**
|
|
3533
3704
|
* Check to see if a command version exists
|
|
3534
3705
|
* @param id - The id of the command
|
|
3535
3706
|
* @param version - The version of the command (supports semver)
|
|
3536
3707
|
* @returns
|
|
3537
3708
|
*/
|
|
3538
|
-
commandHasVersion: commandHasVersion((0,
|
|
3539
|
-
addExampleToCommand: addExampleToCommand((0,
|
|
3540
|
-
getExamplesFromCommand: getExamplesFromCommand((0,
|
|
3541
|
-
removeExampleFromCommand: removeExampleFromCommand((0,
|
|
3709
|
+
commandHasVersion: commandHasVersion((0, import_node_path26.join)(path9)),
|
|
3710
|
+
addExampleToCommand: addExampleToCommand((0, import_node_path26.join)(path9)),
|
|
3711
|
+
getExamplesFromCommand: getExamplesFromCommand((0, import_node_path26.join)(path9)),
|
|
3712
|
+
removeExampleFromCommand: removeExampleFromCommand((0, import_node_path26.join)(path9)),
|
|
3542
3713
|
/**
|
|
3543
3714
|
* ================================
|
|
3544
3715
|
* Queries
|
|
@@ -3550,13 +3721,13 @@ var src_default = (path9) => {
|
|
|
3550
3721
|
* @param version - Optional id of the version to get (supports semver)
|
|
3551
3722
|
* @returns Query|Undefined
|
|
3552
3723
|
*/
|
|
3553
|
-
getQuery: getQuery((0,
|
|
3724
|
+
getQuery: getQuery((0, import_node_path26.join)(path9)),
|
|
3554
3725
|
/**
|
|
3555
3726
|
* Returns all queries from EventCatalog
|
|
3556
3727
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3557
3728
|
* @returns Query[]|Undefined
|
|
3558
3729
|
*/
|
|
3559
|
-
getQueries: getQueries((0,
|
|
3730
|
+
getQueries: getQueries((0, import_node_path26.join)(path9)),
|
|
3560
3731
|
/**
|
|
3561
3732
|
* Adds a query to EventCatalog
|
|
3562
3733
|
*
|
|
@@ -3564,7 +3735,7 @@ var src_default = (path9) => {
|
|
|
3564
3735
|
* @param options - Optional options to write the event
|
|
3565
3736
|
*
|
|
3566
3737
|
*/
|
|
3567
|
-
writeQuery: writeQuery((0,
|
|
3738
|
+
writeQuery: writeQuery((0, import_node_path26.join)(path9, "queries")),
|
|
3568
3739
|
/**
|
|
3569
3740
|
* Adds a query to a service in EventCatalog
|
|
3570
3741
|
*
|
|
@@ -3573,7 +3744,7 @@ var src_default = (path9) => {
|
|
|
3573
3744
|
* @param options - Optional options to write the query
|
|
3574
3745
|
*
|
|
3575
3746
|
*/
|
|
3576
|
-
writeQueryToService: writeQueryToService((0,
|
|
3747
|
+
writeQueryToService: writeQueryToService((0, import_node_path26.join)(path9)),
|
|
3577
3748
|
/**
|
|
3578
3749
|
* Adds a query to an agent in EventCatalog
|
|
3579
3750
|
*
|
|
@@ -3582,26 +3753,26 @@ var src_default = (path9) => {
|
|
|
3582
3753
|
* @param options - Optional options to write the query
|
|
3583
3754
|
*
|
|
3584
3755
|
*/
|
|
3585
|
-
writeQueryToAgent: writeQueryToAgent((0,
|
|
3756
|
+
writeQueryToAgent: writeQueryToAgent((0, import_node_path26.join)(path9)),
|
|
3586
3757
|
/**
|
|
3587
3758
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3588
3759
|
*
|
|
3589
3760
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
3590
3761
|
*
|
|
3591
3762
|
*/
|
|
3592
|
-
rmQuery: rmQuery((0,
|
|
3763
|
+
rmQuery: rmQuery((0, import_node_path26.join)(path9, "queries")),
|
|
3593
3764
|
/**
|
|
3594
3765
|
* Remove a query by a Query id
|
|
3595
3766
|
*
|
|
3596
3767
|
* @param id - The id of the query you want to remove
|
|
3597
3768
|
*
|
|
3598
3769
|
*/
|
|
3599
|
-
rmQueryById: rmQueryById((0,
|
|
3770
|
+
rmQueryById: rmQueryById((0, import_node_path26.join)(path9)),
|
|
3600
3771
|
/**
|
|
3601
3772
|
* Moves a given query id to the version directory
|
|
3602
3773
|
* @param directory
|
|
3603
3774
|
*/
|
|
3604
|
-
versionQuery: versionQuery((0,
|
|
3775
|
+
versionQuery: versionQuery((0, import_node_path26.join)(path9)),
|
|
3605
3776
|
/**
|
|
3606
3777
|
* Adds a file to the given query
|
|
3607
3778
|
* @param id - The id of the query to add the file to
|
|
@@ -3609,7 +3780,7 @@ var src_default = (path9) => {
|
|
|
3609
3780
|
* @param version - Optional version of the query to add the file to
|
|
3610
3781
|
* @returns
|
|
3611
3782
|
*/
|
|
3612
|
-
addFileToQuery: addFileToQuery((0,
|
|
3783
|
+
addFileToQuery: addFileToQuery((0, import_node_path26.join)(path9)),
|
|
3613
3784
|
/**
|
|
3614
3785
|
* Adds a schema to the given query
|
|
3615
3786
|
* @param id - The id of the query to add the schema to
|
|
@@ -3617,17 +3788,17 @@ var src_default = (path9) => {
|
|
|
3617
3788
|
* @param version - Optional version of the query to add the schema to
|
|
3618
3789
|
* @returns
|
|
3619
3790
|
*/
|
|
3620
|
-
addSchemaToQuery: addSchemaToQuery((0,
|
|
3791
|
+
addSchemaToQuery: addSchemaToQuery((0, import_node_path26.join)(path9)),
|
|
3621
3792
|
/**
|
|
3622
3793
|
* Check to see if an query version exists
|
|
3623
3794
|
* @param id - The id of the query
|
|
3624
3795
|
* @param version - The version of the query (supports semver)
|
|
3625
3796
|
* @returns
|
|
3626
3797
|
*/
|
|
3627
|
-
queryHasVersion: queryHasVersion((0,
|
|
3628
|
-
addExampleToQuery: addExampleToQuery((0,
|
|
3629
|
-
getExamplesFromQuery: getExamplesFromQuery((0,
|
|
3630
|
-
removeExampleFromQuery: removeExampleFromQuery((0,
|
|
3798
|
+
queryHasVersion: queryHasVersion((0, import_node_path26.join)(path9)),
|
|
3799
|
+
addExampleToQuery: addExampleToQuery((0, import_node_path26.join)(path9)),
|
|
3800
|
+
getExamplesFromQuery: getExamplesFromQuery((0, import_node_path26.join)(path9)),
|
|
3801
|
+
removeExampleFromQuery: removeExampleFromQuery((0, import_node_path26.join)(path9)),
|
|
3631
3802
|
/**
|
|
3632
3803
|
* ================================
|
|
3633
3804
|
* Channels
|
|
@@ -3639,13 +3810,13 @@ var src_default = (path9) => {
|
|
|
3639
3810
|
* @param version - Optional id of the version to get (supports semver)
|
|
3640
3811
|
* @returns Channel|Undefined
|
|
3641
3812
|
*/
|
|
3642
|
-
getChannel: getChannel((0,
|
|
3813
|
+
getChannel: getChannel((0, import_node_path26.join)(path9)),
|
|
3643
3814
|
/**
|
|
3644
3815
|
* Returns all channels from EventCatalog
|
|
3645
3816
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3646
3817
|
* @returns Channel[]|Undefined
|
|
3647
3818
|
*/
|
|
3648
|
-
getChannels: getChannels((0,
|
|
3819
|
+
getChannels: getChannels((0, import_node_path26.join)(path9)),
|
|
3649
3820
|
/**
|
|
3650
3821
|
* Adds an channel to EventCatalog
|
|
3651
3822
|
*
|
|
@@ -3653,33 +3824,33 @@ var src_default = (path9) => {
|
|
|
3653
3824
|
* @param options - Optional options to write the channel
|
|
3654
3825
|
*
|
|
3655
3826
|
*/
|
|
3656
|
-
writeChannel: writeChannel((0,
|
|
3827
|
+
writeChannel: writeChannel((0, import_node_path26.join)(path9, "channels")),
|
|
3657
3828
|
/**
|
|
3658
3829
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
3659
3830
|
*
|
|
3660
3831
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
3661
3832
|
*
|
|
3662
3833
|
*/
|
|
3663
|
-
rmChannel: rmChannel((0,
|
|
3834
|
+
rmChannel: rmChannel((0, import_node_path26.join)(path9, "channels")),
|
|
3664
3835
|
/**
|
|
3665
3836
|
* Remove an channel by an Event id
|
|
3666
3837
|
*
|
|
3667
3838
|
* @param id - The id of the channel you want to remove
|
|
3668
3839
|
*
|
|
3669
3840
|
*/
|
|
3670
|
-
rmChannelById: rmChannelById((0,
|
|
3841
|
+
rmChannelById: rmChannelById((0, import_node_path26.join)(path9)),
|
|
3671
3842
|
/**
|
|
3672
3843
|
* Moves a given channel id to the version directory
|
|
3673
3844
|
* @param directory
|
|
3674
3845
|
*/
|
|
3675
|
-
versionChannel: versionChannel((0,
|
|
3846
|
+
versionChannel: versionChannel((0, import_node_path26.join)(path9)),
|
|
3676
3847
|
/**
|
|
3677
3848
|
* Check to see if a channel version exists
|
|
3678
3849
|
* @param id - The id of the channel
|
|
3679
3850
|
* @param version - The version of the channel (supports semver)
|
|
3680
3851
|
* @returns
|
|
3681
3852
|
*/
|
|
3682
|
-
channelHasVersion: channelHasVersion((0,
|
|
3853
|
+
channelHasVersion: channelHasVersion((0, import_node_path26.join)(path9)),
|
|
3683
3854
|
/**
|
|
3684
3855
|
* Add a channel to an event
|
|
3685
3856
|
*
|
|
@@ -3696,7 +3867,7 @@ var src_default = (path9) => {
|
|
|
3696
3867
|
*
|
|
3697
3868
|
* ```
|
|
3698
3869
|
*/
|
|
3699
|
-
addEventToChannel: addMessageToChannel((0,
|
|
3870
|
+
addEventToChannel: addMessageToChannel((0, import_node_path26.join)(path9), "events"),
|
|
3700
3871
|
/**
|
|
3701
3872
|
* Add a channel to an command
|
|
3702
3873
|
*
|
|
@@ -3713,7 +3884,7 @@ var src_default = (path9) => {
|
|
|
3713
3884
|
*
|
|
3714
3885
|
* ```
|
|
3715
3886
|
*/
|
|
3716
|
-
addCommandToChannel: addMessageToChannel((0,
|
|
3887
|
+
addCommandToChannel: addMessageToChannel((0, import_node_path26.join)(path9), "commands"),
|
|
3717
3888
|
/**
|
|
3718
3889
|
* Add a channel to an query
|
|
3719
3890
|
*
|
|
@@ -3730,7 +3901,7 @@ var src_default = (path9) => {
|
|
|
3730
3901
|
*
|
|
3731
3902
|
* ```
|
|
3732
3903
|
*/
|
|
3733
|
-
addQueryToChannel: addMessageToChannel((0,
|
|
3904
|
+
addQueryToChannel: addMessageToChannel((0, import_node_path26.join)(path9), "queries"),
|
|
3734
3905
|
/**
|
|
3735
3906
|
* ================================
|
|
3736
3907
|
* SERVICES
|
|
@@ -3743,14 +3914,14 @@ var src_default = (path9) => {
|
|
|
3743
3914
|
* @param options - Optional options to write the event
|
|
3744
3915
|
*
|
|
3745
3916
|
*/
|
|
3746
|
-
writeService: writeService((0,
|
|
3917
|
+
writeService: writeService((0, import_node_path26.join)(path9, "services")),
|
|
3747
3918
|
/**
|
|
3748
3919
|
* Adds a versioned service to EventCatalog
|
|
3749
3920
|
*
|
|
3750
3921
|
* @param service - The service to write
|
|
3751
3922
|
*
|
|
3752
3923
|
*/
|
|
3753
|
-
writeVersionedService: writeVersionedService((0,
|
|
3924
|
+
writeVersionedService: writeVersionedService((0, import_node_path26.join)(path9, "services")),
|
|
3754
3925
|
/**
|
|
3755
3926
|
* Adds a service to a domain in EventCatalog
|
|
3756
3927
|
*
|
|
@@ -3759,45 +3930,54 @@ var src_default = (path9) => {
|
|
|
3759
3930
|
* @param options - Optional options to write the event
|
|
3760
3931
|
*
|
|
3761
3932
|
*/
|
|
3762
|
-
writeServiceToDomain: writeServiceToDomain((0,
|
|
3933
|
+
writeServiceToDomain: writeServiceToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
3934
|
+
/**
|
|
3935
|
+
* Adds a service to a system in EventCatalog
|
|
3936
|
+
*
|
|
3937
|
+
* @param service - The service to write
|
|
3938
|
+
* @param system - The system to add the service to
|
|
3939
|
+
* @param options - Optional options to write the service
|
|
3940
|
+
*
|
|
3941
|
+
*/
|
|
3942
|
+
writeServiceToSystem: writeServiceToSystem((0, import_node_path26.join)(path9)),
|
|
3763
3943
|
/**
|
|
3764
3944
|
* Returns a service from EventCatalog
|
|
3765
3945
|
* @param id - The id of the service to retrieve
|
|
3766
3946
|
* @param version - Optional id of the version to get (supports semver)
|
|
3767
3947
|
* @returns Service|Undefined
|
|
3768
3948
|
*/
|
|
3769
|
-
getService: getService((0,
|
|
3949
|
+
getService: getService((0, import_node_path26.join)(path9)),
|
|
3770
3950
|
/**
|
|
3771
3951
|
* Returns a service from EventCatalog by it's path.
|
|
3772
3952
|
* @param path - The path to the service to retrieve
|
|
3773
3953
|
* @returns Service|Undefined
|
|
3774
3954
|
*/
|
|
3775
|
-
getServiceByPath: getServiceByPath((0,
|
|
3955
|
+
getServiceByPath: getServiceByPath((0, import_node_path26.join)(path9)),
|
|
3776
3956
|
/**
|
|
3777
3957
|
* Returns all services from EventCatalog
|
|
3778
3958
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3779
3959
|
* @returns Service[]|Undefined
|
|
3780
3960
|
*/
|
|
3781
|
-
getServices: getServices((0,
|
|
3961
|
+
getServices: getServices((0, import_node_path26.join)(path9)),
|
|
3782
3962
|
/**
|
|
3783
3963
|
* Moves a given service id to the version directory
|
|
3784
3964
|
* @param directory
|
|
3785
3965
|
*/
|
|
3786
|
-
versionService: versionService((0,
|
|
3966
|
+
versionService: versionService((0, import_node_path26.join)(path9)),
|
|
3787
3967
|
/**
|
|
3788
3968
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3789
3969
|
*
|
|
3790
3970
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
3791
3971
|
*
|
|
3792
3972
|
*/
|
|
3793
|
-
rmService: rmService((0,
|
|
3973
|
+
rmService: rmService((0, import_node_path26.join)(path9, "services")),
|
|
3794
3974
|
/**
|
|
3795
3975
|
* Remove an service by an service id
|
|
3796
3976
|
*
|
|
3797
3977
|
* @param id - The id of the service you want to remove
|
|
3798
3978
|
*
|
|
3799
3979
|
*/
|
|
3800
|
-
rmServiceById: rmServiceById((0,
|
|
3980
|
+
rmServiceById: rmServiceById((0, import_node_path26.join)(path9)),
|
|
3801
3981
|
/**
|
|
3802
3982
|
* Adds a file to the given service
|
|
3803
3983
|
* @param id - The id of the service to add the file to
|
|
@@ -3805,21 +3985,21 @@ var src_default = (path9) => {
|
|
|
3805
3985
|
* @param version - Optional version of the service to add the file to
|
|
3806
3986
|
* @returns
|
|
3807
3987
|
*/
|
|
3808
|
-
addFileToService: addFileToService((0,
|
|
3988
|
+
addFileToService: addFileToService((0, import_node_path26.join)(path9)),
|
|
3809
3989
|
/**
|
|
3810
3990
|
* Returns the specifications for a given service
|
|
3811
3991
|
* @param id - The id of the service to retrieve the specifications for
|
|
3812
3992
|
* @param version - Optional version of the service
|
|
3813
3993
|
* @returns
|
|
3814
3994
|
*/
|
|
3815
|
-
getSpecificationFilesForService: getSpecificationFilesForService((0,
|
|
3995
|
+
getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path26.join)(path9)),
|
|
3816
3996
|
/**
|
|
3817
3997
|
* Check to see if a service version exists
|
|
3818
3998
|
* @param id - The id of the service
|
|
3819
3999
|
* @param version - The version of the service (supports semver)
|
|
3820
4000
|
* @returns
|
|
3821
4001
|
*/
|
|
3822
|
-
serviceHasVersion: serviceHasVersion((0,
|
|
4002
|
+
serviceHasVersion: serviceHasVersion((0, import_node_path26.join)(path9)),
|
|
3823
4003
|
/**
|
|
3824
4004
|
* Add an event to a service by it's id.
|
|
3825
4005
|
*
|
|
@@ -3839,7 +4019,7 @@ var src_default = (path9) => {
|
|
|
3839
4019
|
*
|
|
3840
4020
|
* ```
|
|
3841
4021
|
*/
|
|
3842
|
-
addEventToService: addMessageToService((0,
|
|
4022
|
+
addEventToService: addMessageToService((0, import_node_path26.join)(path9)),
|
|
3843
4023
|
/**
|
|
3844
4024
|
* Add a data store to a service by it's id.
|
|
3845
4025
|
*
|
|
@@ -3856,7 +4036,7 @@ var src_default = (path9) => {
|
|
|
3856
4036
|
*
|
|
3857
4037
|
* ```
|
|
3858
4038
|
*/
|
|
3859
|
-
addDataStoreToService: addDataStoreToService((0,
|
|
4039
|
+
addDataStoreToService: addDataStoreToService((0, import_node_path26.join)(path9)),
|
|
3860
4040
|
/**
|
|
3861
4041
|
* Add a command to a service by it's id.
|
|
3862
4042
|
*
|
|
@@ -3876,7 +4056,7 @@ var src_default = (path9) => {
|
|
|
3876
4056
|
*
|
|
3877
4057
|
* ```
|
|
3878
4058
|
*/
|
|
3879
|
-
addCommandToService: addMessageToService((0,
|
|
4059
|
+
addCommandToService: addMessageToService((0, import_node_path26.join)(path9)),
|
|
3880
4060
|
/**
|
|
3881
4061
|
* Add a query to a service by it's id.
|
|
3882
4062
|
*
|
|
@@ -3896,7 +4076,7 @@ var src_default = (path9) => {
|
|
|
3896
4076
|
*
|
|
3897
4077
|
* ```
|
|
3898
4078
|
*/
|
|
3899
|
-
addQueryToService: addMessageToService((0,
|
|
4079
|
+
addQueryToService: addMessageToService((0, import_node_path26.join)(path9)),
|
|
3900
4080
|
/**
|
|
3901
4081
|
* Add an entity to a service by its id.
|
|
3902
4082
|
*
|
|
@@ -3914,7 +4094,7 @@ var src_default = (path9) => {
|
|
|
3914
4094
|
*
|
|
3915
4095
|
* ```
|
|
3916
4096
|
*/
|
|
3917
|
-
addEntityToService: addEntityToService((0,
|
|
4097
|
+
addEntityToService: addEntityToService((0, import_node_path26.join)(path9)),
|
|
3918
4098
|
/**
|
|
3919
4099
|
* Check to see if a service exists by it's path.
|
|
3920
4100
|
*
|
|
@@ -3931,36 +4111,57 @@ var src_default = (path9) => {
|
|
|
3931
4111
|
* @param path - The path to the service to check
|
|
3932
4112
|
* @returns boolean
|
|
3933
4113
|
*/
|
|
3934
|
-
isService: isService((0,
|
|
4114
|
+
isService: isService((0, import_node_path26.join)(path9)),
|
|
3935
4115
|
/**
|
|
3936
4116
|
* Converts a file to a service.
|
|
3937
4117
|
* @param file - The file to convert to a service.
|
|
3938
4118
|
* @returns The service.
|
|
3939
4119
|
*/
|
|
3940
|
-
toService: toService((0,
|
|
4120
|
+
toService: toService((0, import_node_path26.join)(path9)),
|
|
4121
|
+
/**
|
|
4122
|
+
* ================================
|
|
4123
|
+
* Systems
|
|
4124
|
+
* ================================
|
|
4125
|
+
*/
|
|
4126
|
+
writeSystem: writeSystem((0, import_node_path26.join)(path9, "systems")),
|
|
4127
|
+
writeSystemToDomain: writeSystemToDomain((0, import_node_path26.join)(path9)),
|
|
4128
|
+
getSystem: getSystem((0, import_node_path26.join)(path9)),
|
|
4129
|
+
getSystemByPath: getSystemByPath((0, import_node_path26.join)(path9)),
|
|
4130
|
+
getSystems: getSystems((0, import_node_path26.join)(path9)),
|
|
4131
|
+
versionSystem: versionSystem((0, import_node_path26.join)(path9)),
|
|
4132
|
+
rmSystem: rmSystem((0, import_node_path26.join)(path9, "systems")),
|
|
4133
|
+
rmSystemById: rmSystemById((0, import_node_path26.join)(path9)),
|
|
4134
|
+
addFileToSystem: addFileToSystem((0, import_node_path26.join)(path9)),
|
|
4135
|
+
addServiceToSystem: addServiceToSystem((0, import_node_path26.join)(path9)),
|
|
4136
|
+
addFlowToSystem: addFlowToSystem((0, import_node_path26.join)(path9)),
|
|
4137
|
+
addEntityToSystem: addEntityToSystem((0, import_node_path26.join)(path9)),
|
|
4138
|
+
addContainerToSystem: addContainerToSystem((0, import_node_path26.join)(path9)),
|
|
4139
|
+
systemHasVersion: systemHasVersion((0, import_node_path26.join)(path9)),
|
|
4140
|
+
isSystem: isSystem((0, import_node_path26.join)(path9)),
|
|
4141
|
+
toSystem: toSystem((0, import_node_path26.join)(path9)),
|
|
3941
4142
|
/**
|
|
3942
4143
|
* ================================
|
|
3943
4144
|
* Agents
|
|
3944
4145
|
* ================================
|
|
3945
4146
|
*/
|
|
3946
|
-
writeAgent: writeAgent((0,
|
|
3947
|
-
writeVersionedAgent: writeVersionedAgent((0,
|
|
3948
|
-
writeAgentToDomain: writeAgentToDomain((0,
|
|
3949
|
-
getAgent: getAgent((0,
|
|
3950
|
-
getAgentByPath: getAgentByPath((0,
|
|
3951
|
-
getAgents: getAgents((0,
|
|
3952
|
-
versionAgent: versionAgent((0,
|
|
3953
|
-
rmAgent: rmAgent((0,
|
|
3954
|
-
rmAgentById: rmAgentById((0,
|
|
3955
|
-
addFileToAgent: addFileToAgent((0,
|
|
3956
|
-
addEventToAgent: addMessageToAgent((0,
|
|
3957
|
-
addCommandToAgent: addMessageToAgent((0,
|
|
3958
|
-
addQueryToAgent: addMessageToAgent((0,
|
|
3959
|
-
addDataStoreToAgent: addDataStoreToAgent((0,
|
|
3960
|
-
addFlowToAgent: addFlowToAgent((0,
|
|
3961
|
-
agentHasVersion: agentHasVersion((0,
|
|
3962
|
-
isAgent: isAgent((0,
|
|
3963
|
-
toAgent: toAgent((0,
|
|
4147
|
+
writeAgent: writeAgent((0, import_node_path26.join)(path9, "agents")),
|
|
4148
|
+
writeVersionedAgent: writeVersionedAgent((0, import_node_path26.join)(path9, "agents")),
|
|
4149
|
+
writeAgentToDomain: writeAgentToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4150
|
+
getAgent: getAgent((0, import_node_path26.join)(path9)),
|
|
4151
|
+
getAgentByPath: getAgentByPath((0, import_node_path26.join)(path9)),
|
|
4152
|
+
getAgents: getAgents((0, import_node_path26.join)(path9)),
|
|
4153
|
+
versionAgent: versionAgent((0, import_node_path26.join)(path9)),
|
|
4154
|
+
rmAgent: rmAgent((0, import_node_path26.join)(path9, "agents")),
|
|
4155
|
+
rmAgentById: rmAgentById((0, import_node_path26.join)(path9)),
|
|
4156
|
+
addFileToAgent: addFileToAgent((0, import_node_path26.join)(path9)),
|
|
4157
|
+
addEventToAgent: addMessageToAgent((0, import_node_path26.join)(path9)),
|
|
4158
|
+
addCommandToAgent: addMessageToAgent((0, import_node_path26.join)(path9)),
|
|
4159
|
+
addQueryToAgent: addMessageToAgent((0, import_node_path26.join)(path9)),
|
|
4160
|
+
addDataStoreToAgent: addDataStoreToAgent((0, import_node_path26.join)(path9)),
|
|
4161
|
+
addFlowToAgent: addFlowToAgent((0, import_node_path26.join)(path9)),
|
|
4162
|
+
agentHasVersion: agentHasVersion((0, import_node_path26.join)(path9)),
|
|
4163
|
+
isAgent: isAgent((0, import_node_path26.join)(path9)),
|
|
4164
|
+
toAgent: toAgent((0, import_node_path26.join)(path9)),
|
|
3964
4165
|
/**
|
|
3965
4166
|
* ================================
|
|
3966
4167
|
* Domains
|
|
@@ -3973,39 +4174,39 @@ var src_default = (path9) => {
|
|
|
3973
4174
|
* @param options - Optional options to write the event
|
|
3974
4175
|
*
|
|
3975
4176
|
*/
|
|
3976
|
-
writeDomain: writeDomain((0,
|
|
4177
|
+
writeDomain: writeDomain((0, import_node_path26.join)(path9, "domains")),
|
|
3977
4178
|
/**
|
|
3978
4179
|
* Returns a domain from EventCatalog
|
|
3979
4180
|
* @param id - The id of the domain to retrieve
|
|
3980
4181
|
* @param version - Optional id of the version to get (supports semver)
|
|
3981
4182
|
* @returns Domain|Undefined
|
|
3982
4183
|
*/
|
|
3983
|
-
getDomain: getDomain((0,
|
|
4184
|
+
getDomain: getDomain((0, import_node_path26.join)(path9, "domains")),
|
|
3984
4185
|
/**
|
|
3985
4186
|
* Returns all domains from EventCatalog
|
|
3986
4187
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3987
4188
|
* @returns Domain[]|Undefined
|
|
3988
4189
|
*/
|
|
3989
|
-
getDomains: getDomains((0,
|
|
4190
|
+
getDomains: getDomains((0, import_node_path26.join)(path9)),
|
|
3990
4191
|
/**
|
|
3991
4192
|
* Moves a given domain id to the version directory
|
|
3992
4193
|
* @param directory
|
|
3993
4194
|
*/
|
|
3994
|
-
versionDomain: versionDomain((0,
|
|
4195
|
+
versionDomain: versionDomain((0, import_node_path26.join)(path9, "domains")),
|
|
3995
4196
|
/**
|
|
3996
4197
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3997
4198
|
*
|
|
3998
4199
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
3999
4200
|
*
|
|
4000
4201
|
*/
|
|
4001
|
-
rmDomain: rmDomain((0,
|
|
4202
|
+
rmDomain: rmDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4002
4203
|
/**
|
|
4003
4204
|
* Remove an service by an domain id
|
|
4004
4205
|
*
|
|
4005
4206
|
* @param id - The id of the domain you want to remove
|
|
4006
4207
|
*
|
|
4007
4208
|
*/
|
|
4008
|
-
rmDomainById: rmDomainById((0,
|
|
4209
|
+
rmDomainById: rmDomainById((0, import_node_path26.join)(path9, "domains")),
|
|
4009
4210
|
/**
|
|
4010
4211
|
* Adds a file to the given domain
|
|
4011
4212
|
* @param id - The id of the domain to add the file to
|
|
@@ -4013,28 +4214,28 @@ var src_default = (path9) => {
|
|
|
4013
4214
|
* @param version - Optional version of the domain to add the file to
|
|
4014
4215
|
* @returns
|
|
4015
4216
|
*/
|
|
4016
|
-
addFileToDomain: addFileToDomain((0,
|
|
4217
|
+
addFileToDomain: addFileToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4017
4218
|
/**
|
|
4018
4219
|
* Adds an ubiquitous language dictionary to a domain
|
|
4019
4220
|
* @param id - The id of the domain to add the ubiquitous language to
|
|
4020
4221
|
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
4021
4222
|
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
4022
4223
|
*/
|
|
4023
|
-
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0,
|
|
4224
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4024
4225
|
/**
|
|
4025
4226
|
* Get the ubiquitous language dictionary from a domain
|
|
4026
4227
|
* @param id - The id of the domain to get the ubiquitous language from
|
|
4027
4228
|
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
4028
4229
|
* @returns
|
|
4029
4230
|
*/
|
|
4030
|
-
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0,
|
|
4231
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4031
4232
|
/**
|
|
4032
4233
|
* Check to see if a domain version exists
|
|
4033
4234
|
* @param id - The id of the domain
|
|
4034
4235
|
* @param version - The version of the domain (supports semver)
|
|
4035
4236
|
* @returns
|
|
4036
4237
|
*/
|
|
4037
|
-
domainHasVersion: domainHasVersion((0,
|
|
4238
|
+
domainHasVersion: domainHasVersion((0, import_node_path26.join)(path9)),
|
|
4038
4239
|
/**
|
|
4039
4240
|
* Adds a given service to a domain
|
|
4040
4241
|
* @param id - The id of the domain
|
|
@@ -4042,7 +4243,7 @@ var src_default = (path9) => {
|
|
|
4042
4243
|
* @param version - (Optional) The version of the domain to add the service to
|
|
4043
4244
|
* @returns
|
|
4044
4245
|
*/
|
|
4045
|
-
addServiceToDomain: addServiceToDomain((0,
|
|
4246
|
+
addServiceToDomain: addServiceToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4046
4247
|
/**
|
|
4047
4248
|
* Adds a given agent to a domain
|
|
4048
4249
|
* @param id - The id of the domain
|
|
@@ -4050,7 +4251,7 @@ var src_default = (path9) => {
|
|
|
4050
4251
|
* @param version - (Optional) The version of the domain to add the agent to
|
|
4051
4252
|
* @returns
|
|
4052
4253
|
*/
|
|
4053
|
-
addAgentToDomain: addAgentToDomain((0,
|
|
4254
|
+
addAgentToDomain: addAgentToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4054
4255
|
/**
|
|
4055
4256
|
* Adds a given subdomain to a domain
|
|
4056
4257
|
* @param id - The id of the domain
|
|
@@ -4058,7 +4259,15 @@ var src_default = (path9) => {
|
|
|
4058
4259
|
* @param version - (Optional) The version of the domain to add the subdomain to
|
|
4059
4260
|
* @returns
|
|
4060
4261
|
*/
|
|
4061
|
-
addSubDomainToDomain: addSubDomainToDomain((0,
|
|
4262
|
+
addSubDomainToDomain: addSubDomainToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4263
|
+
/**
|
|
4264
|
+
* Adds a given system to a domain
|
|
4265
|
+
* @param id - The id of the domain
|
|
4266
|
+
* @param system - The id and version of the system to add
|
|
4267
|
+
* @param version - (Optional) The version of the domain to add the system to
|
|
4268
|
+
* @returns
|
|
4269
|
+
*/
|
|
4270
|
+
addSystemToDomain: addSystemToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4062
4271
|
/**
|
|
4063
4272
|
* Adds an entity to a domain
|
|
4064
4273
|
* @param id - The id of the domain
|
|
@@ -4066,7 +4275,7 @@ var src_default = (path9) => {
|
|
|
4066
4275
|
* @param version - (Optional) The version of the domain to add the entity to
|
|
4067
4276
|
* @returns
|
|
4068
4277
|
*/
|
|
4069
|
-
addEntityToDomain: addEntityToDomain((0,
|
|
4278
|
+
addEntityToDomain: addEntityToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4070
4279
|
/**
|
|
4071
4280
|
* Add an event to a domain by its id.
|
|
4072
4281
|
*
|
|
@@ -4084,7 +4293,7 @@ var src_default = (path9) => {
|
|
|
4084
4293
|
*
|
|
4085
4294
|
* ```
|
|
4086
4295
|
*/
|
|
4087
|
-
addEventToDomain: addMessageToDomain((0,
|
|
4296
|
+
addEventToDomain: addMessageToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4088
4297
|
/**
|
|
4089
4298
|
* Add a command to a domain by its id.
|
|
4090
4299
|
*
|
|
@@ -4102,7 +4311,7 @@ var src_default = (path9) => {
|
|
|
4102
4311
|
*
|
|
4103
4312
|
* ```
|
|
4104
4313
|
*/
|
|
4105
|
-
addCommandToDomain: addMessageToDomain((0,
|
|
4314
|
+
addCommandToDomain: addMessageToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4106
4315
|
/**
|
|
4107
4316
|
* Add a query to a domain by its id.
|
|
4108
4317
|
*
|
|
@@ -4120,7 +4329,7 @@ var src_default = (path9) => {
|
|
|
4120
4329
|
*
|
|
4121
4330
|
* ```
|
|
4122
4331
|
*/
|
|
4123
|
-
addQueryToDomain: addMessageToDomain((0,
|
|
4332
|
+
addQueryToDomain: addMessageToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4124
4333
|
/**
|
|
4125
4334
|
* ================================
|
|
4126
4335
|
* Teams
|
|
@@ -4133,25 +4342,25 @@ var src_default = (path9) => {
|
|
|
4133
4342
|
* @param options - Optional options to write the team
|
|
4134
4343
|
*
|
|
4135
4344
|
*/
|
|
4136
|
-
writeTeam: writeTeam((0,
|
|
4345
|
+
writeTeam: writeTeam((0, import_node_path26.join)(path9, "teams")),
|
|
4137
4346
|
/**
|
|
4138
4347
|
* Returns a team from EventCatalog
|
|
4139
4348
|
* @param id - The id of the team to retrieve
|
|
4140
4349
|
* @returns Team|Undefined
|
|
4141
4350
|
*/
|
|
4142
|
-
getTeam: getTeam((0,
|
|
4351
|
+
getTeam: getTeam((0, import_node_path26.join)(path9, "teams")),
|
|
4143
4352
|
/**
|
|
4144
4353
|
* Returns all teams from EventCatalog
|
|
4145
4354
|
* @returns Team[]|Undefined
|
|
4146
4355
|
*/
|
|
4147
|
-
getTeams: getTeams((0,
|
|
4356
|
+
getTeams: getTeams((0, import_node_path26.join)(path9, "teams")),
|
|
4148
4357
|
/**
|
|
4149
4358
|
* Remove a team by the team id
|
|
4150
4359
|
*
|
|
4151
4360
|
* @param id - The id of the team you want to remove
|
|
4152
4361
|
*
|
|
4153
4362
|
*/
|
|
4154
|
-
rmTeamById: rmTeamById((0,
|
|
4363
|
+
rmTeamById: rmTeamById((0, import_node_path26.join)(path9, "teams")),
|
|
4155
4364
|
/**
|
|
4156
4365
|
* ================================
|
|
4157
4366
|
* Users
|
|
@@ -4164,25 +4373,25 @@ var src_default = (path9) => {
|
|
|
4164
4373
|
* @param options - Optional options to write the user
|
|
4165
4374
|
*
|
|
4166
4375
|
*/
|
|
4167
|
-
writeUser: writeUser((0,
|
|
4376
|
+
writeUser: writeUser((0, import_node_path26.join)(path9, "users")),
|
|
4168
4377
|
/**
|
|
4169
4378
|
* Returns a user from EventCatalog
|
|
4170
4379
|
* @param id - The id of the user to retrieve
|
|
4171
4380
|
* @returns User|Undefined
|
|
4172
4381
|
*/
|
|
4173
|
-
getUser: getUser((0,
|
|
4382
|
+
getUser: getUser((0, import_node_path26.join)(path9, "users")),
|
|
4174
4383
|
/**
|
|
4175
4384
|
* Returns all user from EventCatalog
|
|
4176
4385
|
* @returns User[]|Undefined
|
|
4177
4386
|
*/
|
|
4178
|
-
getUsers: getUsers((0,
|
|
4387
|
+
getUsers: getUsers((0, import_node_path26.join)(path9)),
|
|
4179
4388
|
/**
|
|
4180
4389
|
* Remove a user by the user id
|
|
4181
4390
|
*
|
|
4182
4391
|
* @param id - The id of the user you want to remove
|
|
4183
4392
|
*
|
|
4184
4393
|
*/
|
|
4185
|
-
rmUserById: rmUserById((0,
|
|
4394
|
+
rmUserById: rmUserById((0, import_node_path26.join)(path9, "users")),
|
|
4186
4395
|
/**
|
|
4187
4396
|
* ================================
|
|
4188
4397
|
* Custom Docs
|
|
@@ -4193,32 +4402,32 @@ var src_default = (path9) => {
|
|
|
4193
4402
|
* @param path - The path to the custom doc to retrieve
|
|
4194
4403
|
* @returns CustomDoc|Undefined
|
|
4195
4404
|
*/
|
|
4196
|
-
getCustomDoc: getCustomDoc((0,
|
|
4405
|
+
getCustomDoc: getCustomDoc((0, import_node_path26.join)(path9, "docs")),
|
|
4197
4406
|
/**
|
|
4198
4407
|
* Returns all custom docs from EventCatalog
|
|
4199
4408
|
* @param options - Optional options to get custom docs from a specific path
|
|
4200
4409
|
* @returns CustomDoc[]|Undefined
|
|
4201
4410
|
*/
|
|
4202
|
-
getCustomDocs: getCustomDocs((0,
|
|
4411
|
+
getCustomDocs: getCustomDocs((0, import_node_path26.join)(path9, "docs")),
|
|
4203
4412
|
/**
|
|
4204
4413
|
* Writes a custom doc to EventCatalog
|
|
4205
4414
|
* @param customDoc - The custom doc to write
|
|
4206
4415
|
* @param options - Optional options to write the custom doc
|
|
4207
4416
|
*
|
|
4208
4417
|
*/
|
|
4209
|
-
writeCustomDoc: writeCustomDoc((0,
|
|
4418
|
+
writeCustomDoc: writeCustomDoc((0, import_node_path26.join)(path9, "docs")),
|
|
4210
4419
|
/**
|
|
4211
4420
|
* Removes a custom doc from EventCatalog
|
|
4212
4421
|
* @param path - The path to the custom doc to remove
|
|
4213
4422
|
*
|
|
4214
4423
|
*/
|
|
4215
|
-
rmCustomDoc: rmCustomDoc((0,
|
|
4424
|
+
rmCustomDoc: rmCustomDoc((0, import_node_path26.join)(path9, "docs")),
|
|
4216
4425
|
/**
|
|
4217
4426
|
* Dumps the catalog to a JSON file.
|
|
4218
4427
|
* @param directory - The directory to dump the catalog to
|
|
4219
4428
|
* @returns A JSON file with the catalog
|
|
4220
4429
|
*/
|
|
4221
|
-
dumpCatalog: dumpCatalog((0,
|
|
4430
|
+
dumpCatalog: dumpCatalog((0, import_node_path26.join)(path9)),
|
|
4222
4431
|
/**
|
|
4223
4432
|
* Returns the event catalog configuration file.
|
|
4224
4433
|
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
@@ -4226,7 +4435,7 @@ var src_default = (path9) => {
|
|
|
4226
4435
|
* @param directory - The directory of the catalog.
|
|
4227
4436
|
* @returns A JSON object with the configuration for the event catalog.
|
|
4228
4437
|
*/
|
|
4229
|
-
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0,
|
|
4438
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0, import_node_path26.join)(path9)),
|
|
4230
4439
|
/**
|
|
4231
4440
|
* ================================
|
|
4232
4441
|
* Changelogs
|
|
@@ -4240,7 +4449,7 @@ var src_default = (path9) => {
|
|
|
4240
4449
|
* @param options - Optional options (version, format)
|
|
4241
4450
|
*
|
|
4242
4451
|
*/
|
|
4243
|
-
writeChangelog: writeChangelog((0,
|
|
4452
|
+
writeChangelog: writeChangelog((0, import_node_path26.join)(path9)),
|
|
4244
4453
|
/**
|
|
4245
4454
|
* Appends a changelog entry to an existing changelog for a resource.
|
|
4246
4455
|
* If no changelog exists, one is created.
|
|
@@ -4250,7 +4459,7 @@ var src_default = (path9) => {
|
|
|
4250
4459
|
* @param options - Optional options (version, format)
|
|
4251
4460
|
*
|
|
4252
4461
|
*/
|
|
4253
|
-
appendChangelog: appendChangelog((0,
|
|
4462
|
+
appendChangelog: appendChangelog((0, import_node_path26.join)(path9)),
|
|
4254
4463
|
/**
|
|
4255
4464
|
* Returns the changelog for a resource in EventCatalog
|
|
4256
4465
|
*
|
|
@@ -4258,7 +4467,7 @@ var src_default = (path9) => {
|
|
|
4258
4467
|
* @param options - Optional options (version)
|
|
4259
4468
|
* @returns Changelog|Undefined
|
|
4260
4469
|
*/
|
|
4261
|
-
getChangelog: getChangelog((0,
|
|
4470
|
+
getChangelog: getChangelog((0, import_node_path26.join)(path9)),
|
|
4262
4471
|
/**
|
|
4263
4472
|
* Removes the changelog for a resource in EventCatalog
|
|
4264
4473
|
*
|
|
@@ -4266,7 +4475,7 @@ var src_default = (path9) => {
|
|
|
4266
4475
|
* @param options - Optional options (version)
|
|
4267
4476
|
*
|
|
4268
4477
|
*/
|
|
4269
|
-
rmChangelog: rmChangelog((0,
|
|
4478
|
+
rmChangelog: rmChangelog((0, import_node_path26.join)(path9)),
|
|
4270
4479
|
/**
|
|
4271
4480
|
* ================================
|
|
4272
4481
|
* Resources Utils
|
|
@@ -4280,6 +4489,10 @@ var src_default = (path9) => {
|
|
|
4280
4489
|
* Returns the folder name of a given resource
|
|
4281
4490
|
*/
|
|
4282
4491
|
getResourceFolderName,
|
|
4492
|
+
/**
|
|
4493
|
+
* Returns resources from the catalog for a given type
|
|
4494
|
+
*/
|
|
4495
|
+
getResources,
|
|
4283
4496
|
/**
|
|
4284
4497
|
* ================================
|
|
4285
4498
|
* General Message Utils
|
|
@@ -4291,26 +4504,26 @@ var src_default = (path9) => {
|
|
|
4291
4504
|
* @param path - The path to the message to retrieve
|
|
4292
4505
|
* @returns Message|Undefined
|
|
4293
4506
|
*/
|
|
4294
|
-
getMessageBySchemaPath: getMessageBySchemaPath((0,
|
|
4507
|
+
getMessageBySchemaPath: getMessageBySchemaPath((0, import_node_path26.join)(path9)),
|
|
4295
4508
|
/**
|
|
4296
4509
|
* Returns the producers and consumers (services and agents) for a given message
|
|
4297
4510
|
* @param id - The id of the message to get the producers and consumers for
|
|
4298
4511
|
* @param version - Optional version of the message
|
|
4299
4512
|
* @returns { producers: (Service|Agent)[], consumers: (Service|Agent)[] }
|
|
4300
4513
|
*/
|
|
4301
|
-
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage((0,
|
|
4514
|
+
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage((0, import_node_path26.join)(path9)),
|
|
4302
4515
|
/**
|
|
4303
4516
|
* Returns the consumers of a given schema path
|
|
4304
4517
|
* @param path - The path to the schema to get the consumers for
|
|
4305
4518
|
* @returns (Service|Agent)[]
|
|
4306
4519
|
*/
|
|
4307
|
-
getConsumersOfSchema: getConsumersOfSchema((0,
|
|
4520
|
+
getConsumersOfSchema: getConsumersOfSchema((0, import_node_path26.join)(path9)),
|
|
4308
4521
|
/**
|
|
4309
4522
|
* Returns the producers of a given schema path
|
|
4310
4523
|
* @param path - The path to the schema to get the producers for
|
|
4311
4524
|
* @returns (Service|Agent)[]
|
|
4312
4525
|
*/
|
|
4313
|
-
getProducersOfSchema: getProducersOfSchema((0,
|
|
4526
|
+
getProducersOfSchema: getProducersOfSchema((0, import_node_path26.join)(path9)),
|
|
4314
4527
|
/**
|
|
4315
4528
|
* Returns the schema for a given message (event, command or query) by its id and version.
|
|
4316
4529
|
* If no version is given, the latest version is used.
|
|
@@ -4318,14 +4531,14 @@ var src_default = (path9) => {
|
|
|
4318
4531
|
* @param version - Optional version of the message
|
|
4319
4532
|
* @returns { schema: string, fileName: string } | undefined
|
|
4320
4533
|
*/
|
|
4321
|
-
getSchemaForMessage: getSchemaForMessage((0,
|
|
4534
|
+
getSchemaForMessage: getSchemaForMessage((0, import_node_path26.join)(path9)),
|
|
4322
4535
|
/**
|
|
4323
4536
|
* Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
|
|
4324
4537
|
* @param id - The id of the resource to get the owners for
|
|
4325
4538
|
* @param version - Optional version of the resource
|
|
4326
4539
|
* @returns { owners: User[] }
|
|
4327
4540
|
*/
|
|
4328
|
-
getOwnersForResource: getOwnersForResource((0,
|
|
4541
|
+
getOwnersForResource: getOwnersForResource((0, import_node_path26.join)(path9)),
|
|
4329
4542
|
/**
|
|
4330
4543
|
* ================================
|
|
4331
4544
|
* Entities
|
|
@@ -4337,13 +4550,13 @@ var src_default = (path9) => {
|
|
|
4337
4550
|
* @param version - Optional id of the version to get (supports semver)
|
|
4338
4551
|
* @returns Entity|Undefined
|
|
4339
4552
|
*/
|
|
4340
|
-
getEntity: getEntity((0,
|
|
4553
|
+
getEntity: getEntity((0, import_node_path26.join)(path9)),
|
|
4341
4554
|
/**
|
|
4342
4555
|
* Returns all entities from EventCatalog
|
|
4343
4556
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4344
4557
|
* @returns Entity[]|Undefined
|
|
4345
4558
|
*/
|
|
4346
|
-
getEntities: getEntities((0,
|
|
4559
|
+
getEntities: getEntities((0, import_node_path26.join)(path9)),
|
|
4347
4560
|
/**
|
|
4348
4561
|
* Adds an entity to EventCatalog
|
|
4349
4562
|
*
|
|
@@ -4351,33 +4564,42 @@ var src_default = (path9) => {
|
|
|
4351
4564
|
* @param options - Optional options to write the entity
|
|
4352
4565
|
*
|
|
4353
4566
|
*/
|
|
4354
|
-
writeEntity: writeEntity((0,
|
|
4567
|
+
writeEntity: writeEntity((0, import_node_path26.join)(path9, "entities")),
|
|
4568
|
+
/**
|
|
4569
|
+
* Adds an entity to a system in EventCatalog
|
|
4570
|
+
*
|
|
4571
|
+
* @param entity - The entity to write to the system
|
|
4572
|
+
* @param system - The system and its id to write the entity to
|
|
4573
|
+
* @param options - Optional options to write the entity
|
|
4574
|
+
*
|
|
4575
|
+
*/
|
|
4576
|
+
writeEntityToSystem: writeEntityToSystem((0, import_node_path26.join)(path9)),
|
|
4355
4577
|
/**
|
|
4356
4578
|
* Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4357
4579
|
*
|
|
4358
4580
|
* @param path - The path to your entity, e.g. `/User`
|
|
4359
4581
|
*
|
|
4360
4582
|
*/
|
|
4361
|
-
rmEntity: rmEntity((0,
|
|
4583
|
+
rmEntity: rmEntity((0, import_node_path26.join)(path9, "entities")),
|
|
4362
4584
|
/**
|
|
4363
4585
|
* Remove an entity by an entity id
|
|
4364
4586
|
*
|
|
4365
4587
|
* @param id - The id of the entity you want to remove
|
|
4366
4588
|
*
|
|
4367
4589
|
*/
|
|
4368
|
-
rmEntityById: rmEntityById((0,
|
|
4590
|
+
rmEntityById: rmEntityById((0, import_node_path26.join)(path9)),
|
|
4369
4591
|
/**
|
|
4370
4592
|
* Moves a given entity id to the version directory
|
|
4371
4593
|
* @param id - The id of the entity to version
|
|
4372
4594
|
*/
|
|
4373
|
-
versionEntity: versionEntity((0,
|
|
4595
|
+
versionEntity: versionEntity((0, import_node_path26.join)(path9)),
|
|
4374
4596
|
/**
|
|
4375
4597
|
* Check to see if an entity version exists
|
|
4376
4598
|
* @param id - The id of the entity
|
|
4377
4599
|
* @param version - The version of the entity (supports semver)
|
|
4378
4600
|
* @returns
|
|
4379
4601
|
*/
|
|
4380
|
-
entityHasVersion: entityHasVersion((0,
|
|
4602
|
+
entityHasVersion: entityHasVersion((0, import_node_path26.join)(path9)),
|
|
4381
4603
|
/**
|
|
4382
4604
|
* ================================
|
|
4383
4605
|
* Flows
|
|
@@ -4390,7 +4612,7 @@ var src_default = (path9) => {
|
|
|
4390
4612
|
* @param version - Optional version of the flow
|
|
4391
4613
|
* @returns Flow
|
|
4392
4614
|
*/
|
|
4393
|
-
getFlow: getFlow((0,
|
|
4615
|
+
getFlow: getFlow((0, import_node_path26.join)(path9)),
|
|
4394
4616
|
/**
|
|
4395
4617
|
* Returns all flows from EventCatalog
|
|
4396
4618
|
*
|
|
@@ -4398,7 +4620,7 @@ var src_default = (path9) => {
|
|
|
4398
4620
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4399
4621
|
* @returns Flow[]|Undefined
|
|
4400
4622
|
*/
|
|
4401
|
-
getFlows: getFlows((0,
|
|
4623
|
+
getFlows: getFlows((0, import_node_path26.join)(path9)),
|
|
4402
4624
|
/**
|
|
4403
4625
|
* Adds a flow to EventCatalog
|
|
4404
4626
|
*
|
|
@@ -4406,14 +4628,14 @@ var src_default = (path9) => {
|
|
|
4406
4628
|
* @param options - Optional options to write the flow
|
|
4407
4629
|
*
|
|
4408
4630
|
*/
|
|
4409
|
-
writeFlow: writeFlow((0,
|
|
4631
|
+
writeFlow: writeFlow((0, import_node_path26.join)(path9, "flows")),
|
|
4410
4632
|
/**
|
|
4411
4633
|
* Adds a versioned flow to EventCatalog
|
|
4412
4634
|
*
|
|
4413
4635
|
* @param flow - The flow to write
|
|
4414
4636
|
*
|
|
4415
4637
|
*/
|
|
4416
|
-
writeVersionedFlow: writeVersionedFlow((0,
|
|
4638
|
+
writeVersionedFlow: writeVersionedFlow((0, import_node_path26.join)(path9, "flows")),
|
|
4417
4639
|
/**
|
|
4418
4640
|
* Adds a flow to a domain in EventCatalog
|
|
4419
4641
|
*
|
|
@@ -4422,7 +4644,7 @@ var src_default = (path9) => {
|
|
|
4422
4644
|
* @param options - Optional options to write the flow
|
|
4423
4645
|
*
|
|
4424
4646
|
*/
|
|
4425
|
-
writeFlowToDomain: writeFlowToDomain((0,
|
|
4647
|
+
writeFlowToDomain: writeFlowToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4426
4648
|
/**
|
|
4427
4649
|
* Adds a flow to a service in EventCatalog
|
|
4428
4650
|
*
|
|
@@ -4431,7 +4653,16 @@ var src_default = (path9) => {
|
|
|
4431
4653
|
* @param options - Optional options to write the flow
|
|
4432
4654
|
*
|
|
4433
4655
|
*/
|
|
4434
|
-
writeFlowToService: writeFlowToService((0,
|
|
4656
|
+
writeFlowToService: writeFlowToService((0, import_node_path26.join)(path9, "services")),
|
|
4657
|
+
/**
|
|
4658
|
+
* Adds a flow to a system in EventCatalog
|
|
4659
|
+
*
|
|
4660
|
+
* @param flow - The flow to write to the system
|
|
4661
|
+
* @param system - The system and its id to write the flow to
|
|
4662
|
+
* @param options - Optional options to write the flow
|
|
4663
|
+
*
|
|
4664
|
+
*/
|
|
4665
|
+
writeFlowToSystem: writeFlowToSystem((0, import_node_path26.join)(path9)),
|
|
4435
4666
|
/**
|
|
4436
4667
|
* Adds a flow to an agent in EventCatalog
|
|
4437
4668
|
*
|
|
@@ -4440,33 +4671,33 @@ var src_default = (path9) => {
|
|
|
4440
4671
|
* @param options - Optional options to write the flow
|
|
4441
4672
|
*
|
|
4442
4673
|
*/
|
|
4443
|
-
writeFlowToAgent: writeFlowToAgent((0,
|
|
4674
|
+
writeFlowToAgent: writeFlowToAgent((0, import_node_path26.join)(path9, "agents")),
|
|
4444
4675
|
/**
|
|
4445
4676
|
* Remove a flow from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4446
4677
|
*
|
|
4447
4678
|
* @param path - The path to your flow, e.g. `/PaymentFlow`
|
|
4448
4679
|
*
|
|
4449
4680
|
*/
|
|
4450
|
-
rmFlow: rmFlow((0,
|
|
4681
|
+
rmFlow: rmFlow((0, import_node_path26.join)(path9, "flows")),
|
|
4451
4682
|
/**
|
|
4452
4683
|
* Remove a flow by a flow id
|
|
4453
4684
|
*
|
|
4454
4685
|
* @param id - The id of the flow you want to remove
|
|
4455
4686
|
*
|
|
4456
4687
|
*/
|
|
4457
|
-
rmFlowById: rmFlowById((0,
|
|
4688
|
+
rmFlowById: rmFlowById((0, import_node_path26.join)(path9)),
|
|
4458
4689
|
/**
|
|
4459
4690
|
* Moves a given flow id to the version directory
|
|
4460
4691
|
* @param id - The id of the flow to version
|
|
4461
4692
|
*/
|
|
4462
|
-
versionFlow: versionFlow((0,
|
|
4693
|
+
versionFlow: versionFlow((0, import_node_path26.join)(path9)),
|
|
4463
4694
|
/**
|
|
4464
4695
|
* Check to see if a flow version exists
|
|
4465
4696
|
* @param id - The id of the flow
|
|
4466
4697
|
* @param version - The version of the flow (supports semver)
|
|
4467
4698
|
* @returns
|
|
4468
4699
|
*/
|
|
4469
|
-
flowHasVersion: flowHasVersion((0,
|
|
4700
|
+
flowHasVersion: flowHasVersion((0, import_node_path26.join)(path9)),
|
|
4470
4701
|
/**
|
|
4471
4702
|
* Adds a file to the given flow
|
|
4472
4703
|
* @param id - The id of the flow to add the file to
|
|
@@ -4474,7 +4705,7 @@ var src_default = (path9) => {
|
|
|
4474
4705
|
* @param version - Optional version of the flow to add the file to
|
|
4475
4706
|
* @returns
|
|
4476
4707
|
*/
|
|
4477
|
-
addFileToFlow: addFileToFlow((0,
|
|
4708
|
+
addFileToFlow: addFileToFlow((0, import_node_path26.join)(path9)),
|
|
4478
4709
|
/**
|
|
4479
4710
|
* ================================
|
|
4480
4711
|
* Data Stores
|
|
@@ -4486,42 +4717,42 @@ var src_default = (path9) => {
|
|
|
4486
4717
|
* @param options - Optional options to write the data store
|
|
4487
4718
|
*
|
|
4488
4719
|
*/
|
|
4489
|
-
writeDataStore: writeDataStore((0,
|
|
4720
|
+
writeDataStore: writeDataStore((0, import_node_path26.join)(path9, "containers")),
|
|
4490
4721
|
/**
|
|
4491
4722
|
* Returns a data store from EventCatalog
|
|
4492
4723
|
* @param id - The id of the data store to retrieve
|
|
4493
4724
|
* @param version - Optional id of the version to get (supports semver)
|
|
4494
4725
|
* @returns Container|Undefined
|
|
4495
4726
|
*/
|
|
4496
|
-
getDataStore: getDataStore((0,
|
|
4727
|
+
getDataStore: getDataStore((0, import_node_path26.join)(path9)),
|
|
4497
4728
|
/**
|
|
4498
4729
|
* Returns all data stores from EventCatalog
|
|
4499
4730
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4500
4731
|
* @returns Container[]|Undefined
|
|
4501
4732
|
*/
|
|
4502
|
-
getDataStores: getDataStores((0,
|
|
4733
|
+
getDataStores: getDataStores((0, import_node_path26.join)(path9)),
|
|
4503
4734
|
/**
|
|
4504
4735
|
* Version a data store by its id
|
|
4505
4736
|
* @param id - The id of the data store to version
|
|
4506
4737
|
*/
|
|
4507
|
-
versionDataStore: versionDataStore((0,
|
|
4738
|
+
versionDataStore: versionDataStore((0, import_node_path26.join)(path9, "containers")),
|
|
4508
4739
|
/**
|
|
4509
4740
|
* Remove a data store by its path
|
|
4510
4741
|
* @param path - The path to the data store to remove
|
|
4511
4742
|
*/
|
|
4512
|
-
rmDataStore: rmDataStore((0,
|
|
4743
|
+
rmDataStore: rmDataStore((0, import_node_path26.join)(path9, "containers")),
|
|
4513
4744
|
/**
|
|
4514
4745
|
* Remove a data store by its id
|
|
4515
4746
|
* @param id - The id of the data store to remove
|
|
4516
4747
|
*/
|
|
4517
|
-
rmDataStoreById: rmDataStoreById((0,
|
|
4748
|
+
rmDataStoreById: rmDataStoreById((0, import_node_path26.join)(path9)),
|
|
4518
4749
|
/**
|
|
4519
4750
|
* Check to see if a data store version exists
|
|
4520
4751
|
* @param id - The id of the data store
|
|
4521
4752
|
* @param version - The version of the data store (supports semver)
|
|
4522
4753
|
* @returns
|
|
4523
4754
|
*/
|
|
4524
|
-
dataStoreHasVersion: dataStoreHasVersion((0,
|
|
4755
|
+
dataStoreHasVersion: dataStoreHasVersion((0, import_node_path26.join)(path9)),
|
|
4525
4756
|
/**
|
|
4526
4757
|
* Adds a file to a data store by its id
|
|
4527
4758
|
* @param id - The id of the data store to add the file to
|
|
@@ -4529,14 +4760,21 @@ var src_default = (path9) => {
|
|
|
4529
4760
|
* @param version - Optional version of the data store to add the file to
|
|
4530
4761
|
* @returns
|
|
4531
4762
|
*/
|
|
4532
|
-
addFileToDataStore: addFileToDataStore((0,
|
|
4763
|
+
addFileToDataStore: addFileToDataStore((0, import_node_path26.join)(path9)),
|
|
4533
4764
|
/**
|
|
4534
4765
|
* Writes a data store to a service by its id
|
|
4535
4766
|
* @param dataStore - The data store to write
|
|
4536
4767
|
* @param service - The service to write the data store to
|
|
4537
4768
|
* @returns
|
|
4538
4769
|
*/
|
|
4539
|
-
writeDataStoreToService: writeDataStoreToService((0,
|
|
4770
|
+
writeDataStoreToService: writeDataStoreToService((0, import_node_path26.join)(path9)),
|
|
4771
|
+
/**
|
|
4772
|
+
* Writes a data store to a system by its id
|
|
4773
|
+
* @param dataStore - The data store to write
|
|
4774
|
+
* @param system - The system to write the data store to
|
|
4775
|
+
* @returns
|
|
4776
|
+
*/
|
|
4777
|
+
writeDataStoreToSystem: writeDataStoreToSystem((0, import_node_path26.join)(path9)),
|
|
4540
4778
|
/**
|
|
4541
4779
|
* ================================
|
|
4542
4780
|
* Data Products
|
|
@@ -4548,7 +4786,7 @@ var src_default = (path9) => {
|
|
|
4548
4786
|
* @param options - Optional options to write the data product
|
|
4549
4787
|
*
|
|
4550
4788
|
*/
|
|
4551
|
-
writeDataProduct: writeDataProduct((0,
|
|
4789
|
+
writeDataProduct: writeDataProduct((0, import_node_path26.join)(path9, "data-products")),
|
|
4552
4790
|
/**
|
|
4553
4791
|
* Writes a data product to a domain in EventCatalog
|
|
4554
4792
|
* @param dataProduct - The data product to write
|
|
@@ -4556,43 +4794,43 @@ var src_default = (path9) => {
|
|
|
4556
4794
|
* @param options - Optional options to write the data product
|
|
4557
4795
|
*
|
|
4558
4796
|
*/
|
|
4559
|
-
writeDataProductToDomain: writeDataProductToDomain((0,
|
|
4797
|
+
writeDataProductToDomain: writeDataProductToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4560
4798
|
/**
|
|
4561
4799
|
* Returns a data product from EventCatalog
|
|
4562
4800
|
* @param id - The id of the data product to retrieve
|
|
4563
4801
|
* @param version - Optional id of the version to get (supports semver)
|
|
4564
4802
|
* @returns DataProduct|Undefined
|
|
4565
4803
|
*/
|
|
4566
|
-
getDataProduct: getDataProduct((0,
|
|
4804
|
+
getDataProduct: getDataProduct((0, import_node_path26.join)(path9)),
|
|
4567
4805
|
/**
|
|
4568
4806
|
* Returns all data products from EventCatalog
|
|
4569
4807
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4570
4808
|
* @returns DataProduct[]|Undefined
|
|
4571
4809
|
*/
|
|
4572
|
-
getDataProducts: getDataProducts((0,
|
|
4810
|
+
getDataProducts: getDataProducts((0, import_node_path26.join)(path9)),
|
|
4573
4811
|
/**
|
|
4574
4812
|
* Version a data product by its id
|
|
4575
4813
|
* @param id - The id of the data product to version
|
|
4576
4814
|
*/
|
|
4577
|
-
versionDataProduct: versionDataProduct((0,
|
|
4815
|
+
versionDataProduct: versionDataProduct((0, import_node_path26.join)(path9)),
|
|
4578
4816
|
/**
|
|
4579
4817
|
* Remove a data product by its path
|
|
4580
4818
|
* @param path - The path to the data product to remove
|
|
4581
4819
|
*/
|
|
4582
|
-
rmDataProduct: rmDataProduct((0,
|
|
4820
|
+
rmDataProduct: rmDataProduct((0, import_node_path26.join)(path9, "data-products")),
|
|
4583
4821
|
/**
|
|
4584
4822
|
* Remove a data product by its id
|
|
4585
4823
|
* @param id - The id of the data product to remove
|
|
4586
4824
|
* @param version - Optional version of the data product to remove
|
|
4587
4825
|
*/
|
|
4588
|
-
rmDataProductById: rmDataProductById((0,
|
|
4826
|
+
rmDataProductById: rmDataProductById((0, import_node_path26.join)(path9)),
|
|
4589
4827
|
/**
|
|
4590
4828
|
* Check to see if a data product version exists
|
|
4591
4829
|
* @param id - The id of the data product
|
|
4592
4830
|
* @param version - The version of the data product (supports semver)
|
|
4593
4831
|
* @returns
|
|
4594
4832
|
*/
|
|
4595
|
-
dataProductHasVersion: dataProductHasVersion((0,
|
|
4833
|
+
dataProductHasVersion: dataProductHasVersion((0, import_node_path26.join)(path9)),
|
|
4596
4834
|
/**
|
|
4597
4835
|
* Adds a file to a data product by its id
|
|
4598
4836
|
* @param id - The id of the data product to add the file to
|
|
@@ -4600,7 +4838,7 @@ var src_default = (path9) => {
|
|
|
4600
4838
|
* @param version - Optional version of the data product to add the file to
|
|
4601
4839
|
* @returns
|
|
4602
4840
|
*/
|
|
4603
|
-
addFileToDataProduct: addFileToDataProduct((0,
|
|
4841
|
+
addFileToDataProduct: addFileToDataProduct((0, import_node_path26.join)(path9)),
|
|
4604
4842
|
/**
|
|
4605
4843
|
* Adds a data product to a domain
|
|
4606
4844
|
* @param id - The id of the domain
|
|
@@ -4608,7 +4846,7 @@ var src_default = (path9) => {
|
|
|
4608
4846
|
* @param version - (Optional) The version of the domain to add the data product to
|
|
4609
4847
|
* @returns
|
|
4610
4848
|
*/
|
|
4611
|
-
addDataProductToDomain: addDataProductToDomain((0,
|
|
4849
|
+
addDataProductToDomain: addDataProductToDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4612
4850
|
/**
|
|
4613
4851
|
* ================================
|
|
4614
4852
|
* Diagrams
|
|
@@ -4620,13 +4858,13 @@ var src_default = (path9) => {
|
|
|
4620
4858
|
* @param version - Optional id of the version to get (supports semver)
|
|
4621
4859
|
* @returns Diagram|Undefined
|
|
4622
4860
|
*/
|
|
4623
|
-
getDiagram: getDiagram((0,
|
|
4861
|
+
getDiagram: getDiagram((0, import_node_path26.join)(path9)),
|
|
4624
4862
|
/**
|
|
4625
4863
|
* Returns all diagrams from EventCatalog
|
|
4626
4864
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
4627
4865
|
* @returns Diagram[]|Undefined
|
|
4628
4866
|
*/
|
|
4629
|
-
getDiagrams: getDiagrams((0,
|
|
4867
|
+
getDiagrams: getDiagrams((0, import_node_path26.join)(path9)),
|
|
4630
4868
|
/**
|
|
4631
4869
|
* Adds a diagram to EventCatalog
|
|
4632
4870
|
*
|
|
@@ -4634,33 +4872,33 @@ var src_default = (path9) => {
|
|
|
4634
4872
|
* @param options - Optional options to write the diagram
|
|
4635
4873
|
*
|
|
4636
4874
|
*/
|
|
4637
|
-
writeDiagram: writeDiagram((0,
|
|
4875
|
+
writeDiagram: writeDiagram((0, import_node_path26.join)(path9, "diagrams")),
|
|
4638
4876
|
/**
|
|
4639
4877
|
* Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4640
4878
|
*
|
|
4641
4879
|
* @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
|
|
4642
4880
|
*
|
|
4643
4881
|
*/
|
|
4644
|
-
rmDiagram: rmDiagram((0,
|
|
4882
|
+
rmDiagram: rmDiagram((0, import_node_path26.join)(path9, "diagrams")),
|
|
4645
4883
|
/**
|
|
4646
4884
|
* Remove a diagram by a diagram id
|
|
4647
4885
|
*
|
|
4648
4886
|
* @param id - The id of the diagram you want to remove
|
|
4649
4887
|
*
|
|
4650
4888
|
*/
|
|
4651
|
-
rmDiagramById: rmDiagramById((0,
|
|
4889
|
+
rmDiagramById: rmDiagramById((0, import_node_path26.join)(path9)),
|
|
4652
4890
|
/**
|
|
4653
4891
|
* Moves a given diagram id to the version directory
|
|
4654
4892
|
* @param id - The id of the diagram to version
|
|
4655
4893
|
*/
|
|
4656
|
-
versionDiagram: versionDiagram((0,
|
|
4894
|
+
versionDiagram: versionDiagram((0, import_node_path26.join)(path9)),
|
|
4657
4895
|
/**
|
|
4658
4896
|
* Check to see if a diagram version exists
|
|
4659
4897
|
* @param id - The id of the diagram
|
|
4660
4898
|
* @param version - The version of the diagram (supports semver)
|
|
4661
4899
|
* @returns
|
|
4662
4900
|
*/
|
|
4663
|
-
diagramHasVersion: diagramHasVersion((0,
|
|
4901
|
+
diagramHasVersion: diagramHasVersion((0, import_node_path26.join)(path9)),
|
|
4664
4902
|
/**
|
|
4665
4903
|
* Adds a file to the given diagram
|
|
4666
4904
|
* @param id - The id of the diagram to add the file to
|
|
@@ -4668,7 +4906,7 @@ var src_default = (path9) => {
|
|
|
4668
4906
|
* @param version - Optional version of the diagram to add the file to
|
|
4669
4907
|
* @returns
|
|
4670
4908
|
*/
|
|
4671
|
-
addFileToDiagram: addFileToDiagram((0,
|
|
4909
|
+
addFileToDiagram: addFileToDiagram((0, import_node_path26.join)(path9)),
|
|
4672
4910
|
/**
|
|
4673
4911
|
* ================================
|
|
4674
4912
|
* DSL
|
|
@@ -4687,21 +4925,21 @@ var src_default = (path9) => {
|
|
|
4687
4925
|
* const dsl = await sdk.toDSL(services, { type: 'service', hydrate: true });
|
|
4688
4926
|
* ```
|
|
4689
4927
|
*/
|
|
4690
|
-
createSnapshot: createSnapshot((0,
|
|
4691
|
-
diffSnapshots: diffSnapshots((0,
|
|
4692
|
-
listSnapshots: listSnapshots((0,
|
|
4693
|
-
toDSL: toDSL((0,
|
|
4694
|
-
getEvent: getEvent((0,
|
|
4695
|
-
getCommand: getCommand((0,
|
|
4696
|
-
getQuery: getQuery((0,
|
|
4697
|
-
getService: getService((0,
|
|
4698
|
-
getServices: getServices((0,
|
|
4699
|
-
getDomain: getDomain((0,
|
|
4700
|
-
getChannel: getChannel((0,
|
|
4701
|
-
getChannels: getChannels((0,
|
|
4702
|
-
getContainer: getDataStore((0,
|
|
4703
|
-
getTeam: getTeam((0,
|
|
4704
|
-
getUser: getUser((0,
|
|
4928
|
+
createSnapshot: createSnapshot((0, import_node_path26.join)(path9)),
|
|
4929
|
+
diffSnapshots: diffSnapshots((0, import_node_path26.join)(path9)),
|
|
4930
|
+
listSnapshots: listSnapshots((0, import_node_path26.join)(path9)),
|
|
4931
|
+
toDSL: toDSL((0, import_node_path26.join)(path9), {
|
|
4932
|
+
getEvent: getEvent((0, import_node_path26.join)(path9)),
|
|
4933
|
+
getCommand: getCommand((0, import_node_path26.join)(path9)),
|
|
4934
|
+
getQuery: getQuery((0, import_node_path26.join)(path9)),
|
|
4935
|
+
getService: getService((0, import_node_path26.join)(path9)),
|
|
4936
|
+
getServices: getServices((0, import_node_path26.join)(path9)),
|
|
4937
|
+
getDomain: getDomain((0, import_node_path26.join)(path9, "domains")),
|
|
4938
|
+
getChannel: getChannel((0, import_node_path26.join)(path9)),
|
|
4939
|
+
getChannels: getChannels((0, import_node_path26.join)(path9)),
|
|
4940
|
+
getContainer: getDataStore((0, import_node_path26.join)(path9)),
|
|
4941
|
+
getTeam: getTeam((0, import_node_path26.join)(path9, "teams")),
|
|
4942
|
+
getUser: getUser((0, import_node_path26.join)(path9, "users"))
|
|
4705
4943
|
})
|
|
4706
4944
|
};
|
|
4707
4945
|
};
|