@eventcatalog/sdk 2.2.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/channels.js.map +1 -1
- package/dist/channels.mjs.map +1 -1
- package/dist/commands.d.mts +1 -1
- package/dist/commands.d.ts +1 -1
- package/dist/commands.js.map +1 -1
- package/dist/commands.mjs.map +1 -1
- package/dist/eventcatalog.d.mts +34 -0
- package/dist/eventcatalog.d.ts +34 -0
- package/dist/eventcatalog.js +1449 -0
- package/dist/eventcatalog.js.map +1 -0
- package/dist/eventcatalog.mjs +1414 -0
- package/dist/eventcatalog.mjs.map +1 -0
- package/dist/index.d.mts +31 -4
- package/dist/index.d.ts +31 -4
- package/dist/index.js +211 -118
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +213 -120
- package/dist/index.mjs.map +1 -1
- package/dist/queries.d.mts +1 -1
- package/dist/queries.d.ts +1 -1
- package/dist/queries.js.map +1 -1
- package/dist/queries.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ __export(index_exports, {
|
|
|
33
33
|
default: () => index_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
|
-
var
|
|
36
|
+
var import_node_path12 = require("path");
|
|
37
37
|
|
|
38
38
|
// src/events.ts
|
|
39
39
|
var import_promises2 = __toESM(require("fs/promises"));
|
|
@@ -54,13 +54,13 @@ var versionExists = async (catalogDir, id, version) => {
|
|
|
54
54
|
var findFileById = async (catalogDir, id, version) => {
|
|
55
55
|
const files = await getFiles(`${catalogDir}/**/index.{md,mdx}`);
|
|
56
56
|
const matchedFiles = await searchFilesForId(files, id) || [];
|
|
57
|
-
const latestVersion = matchedFiles.find((
|
|
57
|
+
const latestVersion = matchedFiles.find((path4) => !path4.includes("versioned"));
|
|
58
58
|
if (!version) {
|
|
59
59
|
return latestVersion;
|
|
60
60
|
}
|
|
61
|
-
const parsedFiles = matchedFiles.map((
|
|
62
|
-
const { data } = import_gray_matter.default.read(
|
|
63
|
-
return { ...data, path:
|
|
61
|
+
const parsedFiles = matchedFiles.map((path4) => {
|
|
62
|
+
const { data } = import_gray_matter.default.read(path4);
|
|
63
|
+
return { ...data, path: path4 };
|
|
64
64
|
});
|
|
65
65
|
const semverRange = (0, import_semver.validRange)(version);
|
|
66
66
|
if (semverRange && (0, import_semver.valid)(version)) {
|
|
@@ -84,8 +84,8 @@ var getFiles = async (pattern, ignore = "") => {
|
|
|
84
84
|
throw new Error(`Error finding files: ${error}`);
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
-
var readMdxFile = async (
|
|
88
|
-
const { data } = import_gray_matter.default.read(
|
|
87
|
+
var readMdxFile = async (path4) => {
|
|
88
|
+
const { data } = import_gray_matter.default.read(path4);
|
|
89
89
|
const { markdown, ...frontmatter } = data;
|
|
90
90
|
return { ...frontmatter, markdown };
|
|
91
91
|
};
|
|
@@ -166,8 +166,8 @@ var writeResource = async (catalogDir, resource, options = {
|
|
|
166
166
|
override: false,
|
|
167
167
|
versionExistingContent: false
|
|
168
168
|
}) => {
|
|
169
|
-
const
|
|
170
|
-
const fullPath = (0, import_path.join)(catalogDir,
|
|
169
|
+
const path4 = options.path || `/${resource.id}`;
|
|
170
|
+
const fullPath = (0, import_path.join)(catalogDir, path4);
|
|
171
171
|
import_node_fs2.default.mkdirSync(fullPath, { recursive: true });
|
|
172
172
|
const lockPath = (0, import_path.join)(fullPath, "index.mdx");
|
|
173
173
|
if (!import_node_fs2.default.existsSync(lockPath)) {
|
|
@@ -287,8 +287,8 @@ var writeEventToService = (directory) => async (event, service, options = { path
|
|
|
287
287
|
pathForEvent = (0, import_node_path2.join)(pathForEvent, event.id);
|
|
288
288
|
await writeResource(directory, { ...event }, { ...options, path: pathForEvent, type: "event" });
|
|
289
289
|
};
|
|
290
|
-
var rmEvent = (directory) => async (
|
|
291
|
-
await import_promises2.default.rm((0, import_node_path2.join)(directory,
|
|
290
|
+
var rmEvent = (directory) => async (path4) => {
|
|
291
|
+
await import_promises2.default.rm((0, import_node_path2.join)(directory, path4), { recursive: true });
|
|
292
292
|
};
|
|
293
293
|
var rmEventById = (directory) => async (id, version, persistFiles) => {
|
|
294
294
|
await rmResourceById(directory, id, version, { type: "event", persistFiles });
|
|
@@ -318,8 +318,8 @@ var writeCommandToService = (directory) => async (command, service, options = {
|
|
|
318
318
|
pathForCommand = (0, import_node_path3.join)(pathForCommand, command.id);
|
|
319
319
|
await writeResource(directory, { ...command }, { ...options, path: pathForCommand, type: "command" });
|
|
320
320
|
};
|
|
321
|
-
var rmCommand = (directory) => async (
|
|
322
|
-
await import_promises3.default.rm((0, import_node_path3.join)(directory,
|
|
321
|
+
var rmCommand = (directory) => async (path4) => {
|
|
322
|
+
await import_promises3.default.rm((0, import_node_path3.join)(directory, path4), { recursive: true });
|
|
323
323
|
};
|
|
324
324
|
var rmCommandById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "command", persistFiles });
|
|
325
325
|
var versionCommand = (directory) => async (id) => versionResource(directory, id);
|
|
@@ -347,8 +347,8 @@ var writeQueryToService = (directory) => async (query, service, options = { path
|
|
|
347
347
|
pathForQuery = (0, import_node_path4.join)(pathForQuery, query.id);
|
|
348
348
|
await writeResource(directory, { ...query }, { ...options, path: pathForQuery, type: "query" });
|
|
349
349
|
};
|
|
350
|
-
var rmQuery = (directory) => async (
|
|
351
|
-
await import_promises4.default.rm((0, import_node_path4.join)(directory,
|
|
350
|
+
var rmQuery = (directory) => async (path4) => {
|
|
351
|
+
await import_promises4.default.rm((0, import_node_path4.join)(directory, path4), { recursive: true });
|
|
352
352
|
};
|
|
353
353
|
var rmQueryById = (directory) => async (id, version, persistFiles) => {
|
|
354
354
|
await rmResourceById(directory, id, version, { type: "query", persistFiles });
|
|
@@ -384,8 +384,8 @@ var writeService = (directory) => async (service, options = { path: "" }) => {
|
|
|
384
384
|
};
|
|
385
385
|
var writeVersionedService = (directory) => async (service) => {
|
|
386
386
|
const resource = { ...service };
|
|
387
|
-
const
|
|
388
|
-
return await writeService(directory)(resource, { path:
|
|
387
|
+
const path4 = getVersionedDirectory(service.id, service.version);
|
|
388
|
+
return await writeService(directory)(resource, { path: path4 });
|
|
389
389
|
};
|
|
390
390
|
var writeServiceToDomain = (directory) => async (service, domain, options = { path: "" }) => {
|
|
391
391
|
let pathForService = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/services` : `/${domain.id}/services`;
|
|
@@ -393,8 +393,8 @@ var writeServiceToDomain = (directory) => async (service, domain, options = { pa
|
|
|
393
393
|
await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
|
|
394
394
|
};
|
|
395
395
|
var versionService = (directory) => async (id) => versionResource(directory, id);
|
|
396
|
-
var rmService = (directory) => async (
|
|
397
|
-
await import_promises5.default.rm((0, import_node_path5.join)(directory,
|
|
396
|
+
var rmService = (directory) => async (path4) => {
|
|
397
|
+
await import_promises5.default.rm((0, import_node_path5.join)(directory, path4), { recursive: true });
|
|
398
398
|
};
|
|
399
399
|
var rmServiceById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "service", persistFiles });
|
|
400
400
|
var addFileToService = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
@@ -447,8 +447,8 @@ var addMessageToService = (directory) => async (id, direction, event, version) =
|
|
|
447
447
|
if (!existingResource) {
|
|
448
448
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
449
449
|
}
|
|
450
|
-
const
|
|
451
|
-
const pathToResource = (0, import_node_path5.join)(
|
|
450
|
+
const path4 = existingResource.split("/services")[0];
|
|
451
|
+
const pathToResource = (0, import_node_path5.join)(path4, "services");
|
|
452
452
|
await rmServiceById(directory)(id, version);
|
|
453
453
|
await writeService(pathToResource)(service);
|
|
454
454
|
};
|
|
@@ -476,8 +476,8 @@ var writeDomain = (directory) => async (domain, options = { path: "" }) => {
|
|
|
476
476
|
return await writeResource(directory, resource, { ...options, type: "domain" });
|
|
477
477
|
};
|
|
478
478
|
var versionDomain = (directory) => async (id) => versionResource(directory, id);
|
|
479
|
-
var rmDomain = (directory) => async (
|
|
480
|
-
await import_promises6.default.rm((0, import_node_path6.join)(directory,
|
|
479
|
+
var rmDomain = (directory) => async (path4) => {
|
|
480
|
+
await import_promises6.default.rm((0, import_node_path6.join)(directory, path4), { recursive: true });
|
|
481
481
|
};
|
|
482
482
|
var rmDomainById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "domain", persistFiles });
|
|
483
483
|
var addFileToDomain = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
@@ -521,8 +521,8 @@ var import_node_path7 = require("path");
|
|
|
521
521
|
var getChannel = (directory) => async (id, version) => getResource(directory, id, version, { type: "channel" });
|
|
522
522
|
var getChannels = (directory) => async (options) => getResources(directory, { type: "channels", ...options });
|
|
523
523
|
var writeChannel = (directory) => async (channel, options = { path: "" }) => writeResource(directory, { ...channel }, { ...options, type: "channel" });
|
|
524
|
-
var rmChannel = (directory) => async (
|
|
525
|
-
await import_promises7.default.rm((0, import_node_path7.join)(directory,
|
|
524
|
+
var rmChannel = (directory) => async (path4) => {
|
|
525
|
+
await import_promises7.default.rm((0, import_node_path7.join)(directory, path4), { recursive: true });
|
|
526
526
|
};
|
|
527
527
|
var rmChannelById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "channel", persistFiles });
|
|
528
528
|
var versionChannel = (directory) => async (id) => versionResource(directory, id);
|
|
@@ -561,20 +561,107 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
561
561
|
if (!existingResource) {
|
|
562
562
|
throw new Error(`Cannot find message ${id} in the catalog`);
|
|
563
563
|
}
|
|
564
|
-
const
|
|
565
|
-
const pathToResource = (0, import_node_path7.join)(
|
|
564
|
+
const path4 = existingResource.split(`/${collection}`)[0];
|
|
565
|
+
const pathToResource = (0, import_node_path7.join)(path4, collection);
|
|
566
566
|
await rmMessageById(directory)(_message.id, _message.version, true);
|
|
567
567
|
await writeMessage(pathToResource)(message);
|
|
568
568
|
};
|
|
569
569
|
|
|
570
|
-
// src/
|
|
570
|
+
// src/eventcatalog.ts
|
|
571
|
+
var import_fs = __toESM(require("fs"));
|
|
571
572
|
var import_node_path8 = __toESM(require("path"));
|
|
573
|
+
var DUMP_VERSION = "0.0.1";
|
|
574
|
+
var getEventCatalogVersion = async (catalogDir) => {
|
|
575
|
+
try {
|
|
576
|
+
const packageJson = import_fs.default.readFileSync((0, import_node_path8.join)(catalogDir, "package.json"), "utf8");
|
|
577
|
+
const packageJsonObject = JSON.parse(packageJson);
|
|
578
|
+
return packageJsonObject["dependencies"]["@eventcatalog/core"];
|
|
579
|
+
} catch (error) {
|
|
580
|
+
return "unknown";
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
var hydrateResource = async (catalogDir, resources, { attachSchema = false } = {}) => {
|
|
584
|
+
return await Promise.all(
|
|
585
|
+
resources.map(async (resource) => {
|
|
586
|
+
const resourcePath = await getResourcePath(catalogDir, resource.id, resource.version);
|
|
587
|
+
let schema = "";
|
|
588
|
+
if (resource.schemaPath && resourcePath?.fullPath) {
|
|
589
|
+
const pathToSchema = import_node_path8.default.join(import_node_path8.default.dirname(resourcePath?.fullPath), resource.schemaPath);
|
|
590
|
+
if (import_fs.default.existsSync(pathToSchema)) {
|
|
591
|
+
schema = import_fs.default.readFileSync(pathToSchema, "utf8");
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
const eventcatalog = schema ? { directory: resourcePath?.directory, schema } : { directory: resourcePath?.directory };
|
|
595
|
+
return {
|
|
596
|
+
...resource,
|
|
597
|
+
_eventcatalog: eventcatalog
|
|
598
|
+
};
|
|
599
|
+
})
|
|
600
|
+
);
|
|
601
|
+
};
|
|
602
|
+
var filterCollection = (collection, options) => {
|
|
603
|
+
return collection.map((item) => ({
|
|
604
|
+
...item,
|
|
605
|
+
markdown: options?.includeMarkdown ? item.markdown : void 0
|
|
606
|
+
}));
|
|
607
|
+
};
|
|
608
|
+
var dumpCatalog = (directory) => async (options) => {
|
|
609
|
+
const { getDomains: getDomains2, getServices: getServices2, getEvents: getEvents2, getQueries: getQueries2, getCommands: getCommands2, getChannels: getChannels2, getTeams: getTeams2, getUsers: getUsers2 } = index_default(directory);
|
|
610
|
+
const { includeMarkdown = true } = options || {};
|
|
611
|
+
const domains = await getDomains2();
|
|
612
|
+
const services = await getServices2();
|
|
613
|
+
const events = await getEvents2();
|
|
614
|
+
const commands = await getCommands2();
|
|
615
|
+
const queries = await getQueries2();
|
|
616
|
+
const teams = await getTeams2();
|
|
617
|
+
const users = await getUsers2();
|
|
618
|
+
const channels = await getChannels2();
|
|
619
|
+
const [
|
|
620
|
+
hydratedDomains,
|
|
621
|
+
hydratedServices,
|
|
622
|
+
hydratedEvents,
|
|
623
|
+
hydratedQueries,
|
|
624
|
+
hydratedCommands,
|
|
625
|
+
hydratedTeams,
|
|
626
|
+
hydratedUsers,
|
|
627
|
+
hydratedChannels
|
|
628
|
+
] = await Promise.all([
|
|
629
|
+
hydrateResource(directory, domains),
|
|
630
|
+
hydrateResource(directory, services),
|
|
631
|
+
hydrateResource(directory, events),
|
|
632
|
+
hydrateResource(directory, queries),
|
|
633
|
+
hydrateResource(directory, commands),
|
|
634
|
+
hydrateResource(directory, teams),
|
|
635
|
+
hydrateResource(directory, users),
|
|
636
|
+
hydrateResource(directory, channels)
|
|
637
|
+
]);
|
|
638
|
+
return {
|
|
639
|
+
version: DUMP_VERSION,
|
|
640
|
+
catalogVersion: await getEventCatalogVersion(directory),
|
|
641
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
642
|
+
resources: {
|
|
643
|
+
domains: filterCollection(hydratedDomains, { includeMarkdown }),
|
|
644
|
+
services: filterCollection(hydratedServices, { includeMarkdown }),
|
|
645
|
+
messages: {
|
|
646
|
+
events: filterCollection(hydratedEvents, { includeMarkdown }),
|
|
647
|
+
queries: filterCollection(hydratedQueries, { includeMarkdown }),
|
|
648
|
+
commands: filterCollection(hydratedCommands, { includeMarkdown })
|
|
649
|
+
},
|
|
650
|
+
teams: filterCollection(hydratedTeams, { includeMarkdown }),
|
|
651
|
+
users: filterCollection(hydratedUsers, { includeMarkdown }),
|
|
652
|
+
channels: filterCollection(hydratedChannels, { includeMarkdown })
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
// src/custom-docs.ts
|
|
658
|
+
var import_node_path9 = __toESM(require("path"));
|
|
572
659
|
var import_node_fs4 = __toESM(require("fs"));
|
|
573
660
|
var import_promises8 = __toESM(require("fs/promises"));
|
|
574
661
|
var import_gray_matter4 = __toESM(require("gray-matter"));
|
|
575
662
|
var import_slugify = __toESM(require("slugify"));
|
|
576
663
|
var getCustomDoc = (directory) => async (filePath) => {
|
|
577
|
-
const fullPath =
|
|
664
|
+
const fullPath = import_node_path9.default.join(directory, filePath);
|
|
578
665
|
const fullPathWithExtension = fullPath.endsWith(".mdx") ? fullPath : `${fullPath}.mdx`;
|
|
579
666
|
const fileExists = import_node_fs4.default.existsSync(fullPathWithExtension);
|
|
580
667
|
if (!fileExists) {
|
|
@@ -593,20 +680,20 @@ var writeCustomDoc = (directory) => async (customDoc, options = { path: "" }) =>
|
|
|
593
680
|
const { fileName, ...rest } = customDoc;
|
|
594
681
|
const name = fileName || (0, import_slugify.default)(customDoc.title, { lower: true });
|
|
595
682
|
const withExtension = name.endsWith(".mdx") ? name : `${name}.mdx`;
|
|
596
|
-
const fullPath =
|
|
597
|
-
import_node_fs4.default.mkdirSync(
|
|
683
|
+
const fullPath = import_node_path9.default.join(directory, options.path || "", withExtension);
|
|
684
|
+
import_node_fs4.default.mkdirSync(import_node_path9.default.dirname(fullPath), { recursive: true });
|
|
598
685
|
const document = import_gray_matter4.default.stringify(customDoc.markdown.trim(), rest);
|
|
599
686
|
import_node_fs4.default.writeFileSync(fullPath, document);
|
|
600
687
|
};
|
|
601
688
|
var rmCustomDoc = (directory) => async (filePath) => {
|
|
602
689
|
const withExtension = filePath.endsWith(".mdx") ? filePath : `${filePath}.mdx`;
|
|
603
|
-
await import_promises8.default.rm((0,
|
|
690
|
+
await import_promises8.default.rm((0, import_node_path9.join)(directory, withExtension), { recursive: true });
|
|
604
691
|
};
|
|
605
692
|
|
|
606
693
|
// src/teams.ts
|
|
607
694
|
var import_promises9 = __toESM(require("fs/promises"));
|
|
608
695
|
var import_node_fs5 = __toESM(require("fs"));
|
|
609
|
-
var
|
|
696
|
+
var import_node_path10 = require("path");
|
|
610
697
|
var import_gray_matter5 = __toESM(require("gray-matter"));
|
|
611
698
|
var getTeam = (catalogDir) => async (id) => {
|
|
612
699
|
const files = await getFiles(`${catalogDir}/${id}.{md,mdx}`);
|
|
@@ -642,16 +729,16 @@ var writeTeam = (catalogDir) => async (team, options = {}) => {
|
|
|
642
729
|
}
|
|
643
730
|
const { markdown, ...frontmatter } = resource;
|
|
644
731
|
const document = import_gray_matter5.default.stringify(markdown, frontmatter);
|
|
645
|
-
import_node_fs5.default.mkdirSync((0,
|
|
646
|
-
import_node_fs5.default.writeFileSync((0,
|
|
732
|
+
import_node_fs5.default.mkdirSync((0, import_node_path10.join)(catalogDir, ""), { recursive: true });
|
|
733
|
+
import_node_fs5.default.writeFileSync((0, import_node_path10.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
647
734
|
};
|
|
648
735
|
var rmTeamById = (catalogDir) => async (id) => {
|
|
649
|
-
await import_promises9.default.rm((0,
|
|
736
|
+
await import_promises9.default.rm((0, import_node_path10.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
650
737
|
};
|
|
651
738
|
|
|
652
739
|
// src/users.ts
|
|
653
740
|
var import_node_fs6 = __toESM(require("fs"));
|
|
654
|
-
var
|
|
741
|
+
var import_node_path11 = require("path");
|
|
655
742
|
var import_gray_matter6 = __toESM(require("gray-matter"));
|
|
656
743
|
var getUser = (catalogDir) => async (id) => {
|
|
657
744
|
const files = await getFiles(`${catalogDir}/${id}.{md,mdx}`);
|
|
@@ -689,15 +776,15 @@ var writeUser = (catalogDir) => async (user, options = {}) => {
|
|
|
689
776
|
}
|
|
690
777
|
const { markdown, ...frontmatter } = resource;
|
|
691
778
|
const document = import_gray_matter6.default.stringify(markdown, frontmatter);
|
|
692
|
-
import_node_fs6.default.mkdirSync((0,
|
|
693
|
-
import_node_fs6.default.writeFileSync((0,
|
|
779
|
+
import_node_fs6.default.mkdirSync((0, import_node_path11.join)(catalogDir, ""), { recursive: true });
|
|
780
|
+
import_node_fs6.default.writeFileSync((0, import_node_path11.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
694
781
|
};
|
|
695
782
|
var rmUserById = (catalogDir) => async (id) => {
|
|
696
|
-
import_node_fs6.default.rmSync((0,
|
|
783
|
+
import_node_fs6.default.rmSync((0, import_node_path11.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
697
784
|
};
|
|
698
785
|
|
|
699
786
|
// src/index.ts
|
|
700
|
-
var index_default = (
|
|
787
|
+
var index_default = (path4) => {
|
|
701
788
|
return {
|
|
702
789
|
/**
|
|
703
790
|
* Returns an events from EventCatalog
|
|
@@ -705,13 +792,13 @@ var index_default = (path3) => {
|
|
|
705
792
|
* @param version - Optional id of the version to get (supports semver)
|
|
706
793
|
* @returns Event|Undefined
|
|
707
794
|
*/
|
|
708
|
-
getEvent: getEvent((0,
|
|
795
|
+
getEvent: getEvent((0, import_node_path12.join)(path4)),
|
|
709
796
|
/**
|
|
710
797
|
* Returns all events from EventCatalog
|
|
711
798
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
712
799
|
* @returns Event[]|Undefined
|
|
713
800
|
*/
|
|
714
|
-
getEvents: getEvents((0,
|
|
801
|
+
getEvents: getEvents((0, import_node_path12.join)(path4)),
|
|
715
802
|
/**
|
|
716
803
|
* Adds an event to EventCatalog
|
|
717
804
|
*
|
|
@@ -719,7 +806,7 @@ var index_default = (path3) => {
|
|
|
719
806
|
* @param options - Optional options to write the event
|
|
720
807
|
*
|
|
721
808
|
*/
|
|
722
|
-
writeEvent: writeEvent((0,
|
|
809
|
+
writeEvent: writeEvent((0, import_node_path12.join)(path4, "events")),
|
|
723
810
|
/**
|
|
724
811
|
* Adds an event to a service in EventCatalog
|
|
725
812
|
*
|
|
@@ -728,26 +815,26 @@ var index_default = (path3) => {
|
|
|
728
815
|
* @param options - Optional options to write the event
|
|
729
816
|
*
|
|
730
817
|
*/
|
|
731
|
-
writeEventToService: writeEventToService((0,
|
|
818
|
+
writeEventToService: writeEventToService((0, import_node_path12.join)(path4)),
|
|
732
819
|
/**
|
|
733
820
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
734
821
|
*
|
|
735
822
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
736
823
|
*
|
|
737
824
|
*/
|
|
738
|
-
rmEvent: rmEvent((0,
|
|
825
|
+
rmEvent: rmEvent((0, import_node_path12.join)(path4, "events")),
|
|
739
826
|
/**
|
|
740
827
|
* Remove an event by an Event id
|
|
741
828
|
*
|
|
742
829
|
* @param id - The id of the event you want to remove
|
|
743
830
|
*
|
|
744
831
|
*/
|
|
745
|
-
rmEventById: rmEventById((0,
|
|
832
|
+
rmEventById: rmEventById((0, import_node_path12.join)(path4)),
|
|
746
833
|
/**
|
|
747
834
|
* Moves a given event id to the version directory
|
|
748
835
|
* @param directory
|
|
749
836
|
*/
|
|
750
|
-
versionEvent: versionEvent((0,
|
|
837
|
+
versionEvent: versionEvent((0, import_node_path12.join)(path4)),
|
|
751
838
|
/**
|
|
752
839
|
* Adds a file to the given event
|
|
753
840
|
* @param id - The id of the event to add the file to
|
|
@@ -755,7 +842,7 @@ var index_default = (path3) => {
|
|
|
755
842
|
* @param version - Optional version of the event to add the file to
|
|
756
843
|
* @returns
|
|
757
844
|
*/
|
|
758
|
-
addFileToEvent: addFileToEvent((0,
|
|
845
|
+
addFileToEvent: addFileToEvent((0, import_node_path12.join)(path4)),
|
|
759
846
|
/**
|
|
760
847
|
* Adds a schema to the given event
|
|
761
848
|
* @param id - The id of the event to add the schema to
|
|
@@ -763,14 +850,14 @@ var index_default = (path3) => {
|
|
|
763
850
|
* @param version - Optional version of the event to add the schema to
|
|
764
851
|
* @returns
|
|
765
852
|
*/
|
|
766
|
-
addSchemaToEvent: addSchemaToEvent((0,
|
|
853
|
+
addSchemaToEvent: addSchemaToEvent((0, import_node_path12.join)(path4)),
|
|
767
854
|
/**
|
|
768
855
|
* Check to see if an event version exists
|
|
769
856
|
* @param id - The id of the event
|
|
770
857
|
* @param version - The version of the event (supports semver)
|
|
771
858
|
* @returns
|
|
772
859
|
*/
|
|
773
|
-
eventHasVersion: eventHasVersion((0,
|
|
860
|
+
eventHasVersion: eventHasVersion((0, import_node_path12.join)(path4)),
|
|
774
861
|
/**
|
|
775
862
|
* ================================
|
|
776
863
|
* Commands
|
|
@@ -782,13 +869,13 @@ var index_default = (path3) => {
|
|
|
782
869
|
* @param version - Optional id of the version to get (supports semver)
|
|
783
870
|
* @returns Command|Undefined
|
|
784
871
|
*/
|
|
785
|
-
getCommand: getCommand((0,
|
|
872
|
+
getCommand: getCommand((0, import_node_path12.join)(path4)),
|
|
786
873
|
/**
|
|
787
874
|
* Returns all commands from EventCatalog
|
|
788
875
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
789
876
|
* @returns Command[]|Undefined
|
|
790
877
|
*/
|
|
791
|
-
getCommands: getCommands((0,
|
|
878
|
+
getCommands: getCommands((0, import_node_path12.join)(path4)),
|
|
792
879
|
/**
|
|
793
880
|
* Adds an command to EventCatalog
|
|
794
881
|
*
|
|
@@ -796,7 +883,7 @@ var index_default = (path3) => {
|
|
|
796
883
|
* @param options - Optional options to write the command
|
|
797
884
|
*
|
|
798
885
|
*/
|
|
799
|
-
writeCommand: writeCommand((0,
|
|
886
|
+
writeCommand: writeCommand((0, import_node_path12.join)(path4, "commands")),
|
|
800
887
|
/**
|
|
801
888
|
* Adds a command to a service in EventCatalog
|
|
802
889
|
*
|
|
@@ -805,26 +892,26 @@ var index_default = (path3) => {
|
|
|
805
892
|
* @param options - Optional options to write the command
|
|
806
893
|
*
|
|
807
894
|
*/
|
|
808
|
-
writeCommandToService: writeCommandToService((0,
|
|
895
|
+
writeCommandToService: writeCommandToService((0, import_node_path12.join)(path4)),
|
|
809
896
|
/**
|
|
810
897
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
811
898
|
*
|
|
812
899
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
813
900
|
*
|
|
814
901
|
*/
|
|
815
|
-
rmCommand: rmCommand((0,
|
|
902
|
+
rmCommand: rmCommand((0, import_node_path12.join)(path4, "commands")),
|
|
816
903
|
/**
|
|
817
904
|
* Remove an command by an Event id
|
|
818
905
|
*
|
|
819
906
|
* @param id - The id of the command you want to remove
|
|
820
907
|
*
|
|
821
908
|
*/
|
|
822
|
-
rmCommandById: rmCommandById((0,
|
|
909
|
+
rmCommandById: rmCommandById((0, import_node_path12.join)(path4)),
|
|
823
910
|
/**
|
|
824
911
|
* Moves a given command id to the version directory
|
|
825
912
|
* @param directory
|
|
826
913
|
*/
|
|
827
|
-
versionCommand: versionCommand((0,
|
|
914
|
+
versionCommand: versionCommand((0, import_node_path12.join)(path4)),
|
|
828
915
|
/**
|
|
829
916
|
* Adds a file to the given command
|
|
830
917
|
* @param id - The id of the command to add the file to
|
|
@@ -832,7 +919,7 @@ var index_default = (path3) => {
|
|
|
832
919
|
* @param version - Optional version of the command to add the file to
|
|
833
920
|
* @returns
|
|
834
921
|
*/
|
|
835
|
-
addFileToCommand: addFileToCommand((0,
|
|
922
|
+
addFileToCommand: addFileToCommand((0, import_node_path12.join)(path4)),
|
|
836
923
|
/**
|
|
837
924
|
* Adds a schema to the given command
|
|
838
925
|
* @param id - The id of the command to add the schema to
|
|
@@ -840,14 +927,14 @@ var index_default = (path3) => {
|
|
|
840
927
|
* @param version - Optional version of the command to add the schema to
|
|
841
928
|
* @returns
|
|
842
929
|
*/
|
|
843
|
-
addSchemaToCommand: addSchemaToCommand((0,
|
|
930
|
+
addSchemaToCommand: addSchemaToCommand((0, import_node_path12.join)(path4)),
|
|
844
931
|
/**
|
|
845
932
|
* Check to see if a command version exists
|
|
846
933
|
* @param id - The id of the command
|
|
847
934
|
* @param version - The version of the command (supports semver)
|
|
848
935
|
* @returns
|
|
849
936
|
*/
|
|
850
|
-
commandHasVersion: commandHasVersion((0,
|
|
937
|
+
commandHasVersion: commandHasVersion((0, import_node_path12.join)(path4)),
|
|
851
938
|
/**
|
|
852
939
|
* ================================
|
|
853
940
|
* Queries
|
|
@@ -859,13 +946,13 @@ var index_default = (path3) => {
|
|
|
859
946
|
* @param version - Optional id of the version to get (supports semver)
|
|
860
947
|
* @returns Query|Undefined
|
|
861
948
|
*/
|
|
862
|
-
getQuery: getQuery((0,
|
|
949
|
+
getQuery: getQuery((0, import_node_path12.join)(path4)),
|
|
863
950
|
/**
|
|
864
951
|
* Returns all queries from EventCatalog
|
|
865
952
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
866
953
|
* @returns Query[]|Undefined
|
|
867
954
|
*/
|
|
868
|
-
getQueries: getQueries((0,
|
|
955
|
+
getQueries: getQueries((0, import_node_path12.join)(path4)),
|
|
869
956
|
/**
|
|
870
957
|
* Adds a query to EventCatalog
|
|
871
958
|
*
|
|
@@ -873,7 +960,7 @@ var index_default = (path3) => {
|
|
|
873
960
|
* @param options - Optional options to write the event
|
|
874
961
|
*
|
|
875
962
|
*/
|
|
876
|
-
writeQuery: writeQuery((0,
|
|
963
|
+
writeQuery: writeQuery((0, import_node_path12.join)(path4, "queries")),
|
|
877
964
|
/**
|
|
878
965
|
* Adds a query to a service in EventCatalog
|
|
879
966
|
*
|
|
@@ -882,26 +969,26 @@ var index_default = (path3) => {
|
|
|
882
969
|
* @param options - Optional options to write the query
|
|
883
970
|
*
|
|
884
971
|
*/
|
|
885
|
-
writeQueryToService: writeQueryToService((0,
|
|
972
|
+
writeQueryToService: writeQueryToService((0, import_node_path12.join)(path4)),
|
|
886
973
|
/**
|
|
887
974
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
888
975
|
*
|
|
889
976
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
890
977
|
*
|
|
891
978
|
*/
|
|
892
|
-
rmQuery: rmQuery((0,
|
|
979
|
+
rmQuery: rmQuery((0, import_node_path12.join)(path4, "queries")),
|
|
893
980
|
/**
|
|
894
981
|
* Remove a query by a Query id
|
|
895
982
|
*
|
|
896
983
|
* @param id - The id of the query you want to remove
|
|
897
984
|
*
|
|
898
985
|
*/
|
|
899
|
-
rmQueryById: rmQueryById((0,
|
|
986
|
+
rmQueryById: rmQueryById((0, import_node_path12.join)(path4)),
|
|
900
987
|
/**
|
|
901
988
|
* Moves a given query id to the version directory
|
|
902
989
|
* @param directory
|
|
903
990
|
*/
|
|
904
|
-
versionQuery: versionQuery((0,
|
|
991
|
+
versionQuery: versionQuery((0, import_node_path12.join)(path4)),
|
|
905
992
|
/**
|
|
906
993
|
* Adds a file to the given query
|
|
907
994
|
* @param id - The id of the query to add the file to
|
|
@@ -909,7 +996,7 @@ var index_default = (path3) => {
|
|
|
909
996
|
* @param version - Optional version of the query to add the file to
|
|
910
997
|
* @returns
|
|
911
998
|
*/
|
|
912
|
-
addFileToQuery: addFileToQuery((0,
|
|
999
|
+
addFileToQuery: addFileToQuery((0, import_node_path12.join)(path4)),
|
|
913
1000
|
/**
|
|
914
1001
|
* Adds a schema to the given query
|
|
915
1002
|
* @param id - The id of the query to add the schema to
|
|
@@ -917,14 +1004,14 @@ var index_default = (path3) => {
|
|
|
917
1004
|
* @param version - Optional version of the query to add the schema to
|
|
918
1005
|
* @returns
|
|
919
1006
|
*/
|
|
920
|
-
addSchemaToQuery: addSchemaToQuery((0,
|
|
1007
|
+
addSchemaToQuery: addSchemaToQuery((0, import_node_path12.join)(path4)),
|
|
921
1008
|
/**
|
|
922
1009
|
* Check to see if an query version exists
|
|
923
1010
|
* @param id - The id of the query
|
|
924
1011
|
* @param version - The version of the query (supports semver)
|
|
925
1012
|
* @returns
|
|
926
1013
|
*/
|
|
927
|
-
queryHasVersion: queryHasVersion((0,
|
|
1014
|
+
queryHasVersion: queryHasVersion((0, import_node_path12.join)(path4)),
|
|
928
1015
|
/**
|
|
929
1016
|
* ================================
|
|
930
1017
|
* Channels
|
|
@@ -936,13 +1023,13 @@ var index_default = (path3) => {
|
|
|
936
1023
|
* @param version - Optional id of the version to get (supports semver)
|
|
937
1024
|
* @returns Channel|Undefined
|
|
938
1025
|
*/
|
|
939
|
-
getChannel: getChannel((0,
|
|
1026
|
+
getChannel: getChannel((0, import_node_path12.join)(path4)),
|
|
940
1027
|
/**
|
|
941
1028
|
* Returns all channels from EventCatalog
|
|
942
1029
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
943
1030
|
* @returns Channel[]|Undefined
|
|
944
1031
|
*/
|
|
945
|
-
getChannels: getChannels((0,
|
|
1032
|
+
getChannels: getChannels((0, import_node_path12.join)(path4)),
|
|
946
1033
|
/**
|
|
947
1034
|
* Adds an channel to EventCatalog
|
|
948
1035
|
*
|
|
@@ -950,33 +1037,33 @@ var index_default = (path3) => {
|
|
|
950
1037
|
* @param options - Optional options to write the channel
|
|
951
1038
|
*
|
|
952
1039
|
*/
|
|
953
|
-
writeChannel: writeChannel((0,
|
|
1040
|
+
writeChannel: writeChannel((0, import_node_path12.join)(path4, "channels")),
|
|
954
1041
|
/**
|
|
955
1042
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
956
1043
|
*
|
|
957
1044
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
958
1045
|
*
|
|
959
1046
|
*/
|
|
960
|
-
rmChannel: rmChannel((0,
|
|
1047
|
+
rmChannel: rmChannel((0, import_node_path12.join)(path4, "channels")),
|
|
961
1048
|
/**
|
|
962
1049
|
* Remove an channel by an Event id
|
|
963
1050
|
*
|
|
964
1051
|
* @param id - The id of the channel you want to remove
|
|
965
1052
|
*
|
|
966
1053
|
*/
|
|
967
|
-
rmChannelById: rmChannelById((0,
|
|
1054
|
+
rmChannelById: rmChannelById((0, import_node_path12.join)(path4)),
|
|
968
1055
|
/**
|
|
969
1056
|
* Moves a given channel id to the version directory
|
|
970
1057
|
* @param directory
|
|
971
1058
|
*/
|
|
972
|
-
versionChannel: versionChannel((0,
|
|
1059
|
+
versionChannel: versionChannel((0, import_node_path12.join)(path4)),
|
|
973
1060
|
/**
|
|
974
1061
|
* Check to see if a channel version exists
|
|
975
1062
|
* @param id - The id of the channel
|
|
976
1063
|
* @param version - The version of the channel (supports semver)
|
|
977
1064
|
* @returns
|
|
978
1065
|
*/
|
|
979
|
-
channelHasVersion: channelHasVersion((0,
|
|
1066
|
+
channelHasVersion: channelHasVersion((0, import_node_path12.join)(path4)),
|
|
980
1067
|
/**
|
|
981
1068
|
* Add a channel to an event
|
|
982
1069
|
*
|
|
@@ -993,7 +1080,7 @@ var index_default = (path3) => {
|
|
|
993
1080
|
*
|
|
994
1081
|
* ```
|
|
995
1082
|
*/
|
|
996
|
-
addEventToChannel: addMessageToChannel((0,
|
|
1083
|
+
addEventToChannel: addMessageToChannel((0, import_node_path12.join)(path4), "events"),
|
|
997
1084
|
/**
|
|
998
1085
|
* Add a channel to an command
|
|
999
1086
|
*
|
|
@@ -1010,7 +1097,7 @@ var index_default = (path3) => {
|
|
|
1010
1097
|
*
|
|
1011
1098
|
* ```
|
|
1012
1099
|
*/
|
|
1013
|
-
addCommandToChannel: addMessageToChannel((0,
|
|
1100
|
+
addCommandToChannel: addMessageToChannel((0, import_node_path12.join)(path4), "commands"),
|
|
1014
1101
|
/**
|
|
1015
1102
|
* Add a channel to an query
|
|
1016
1103
|
*
|
|
@@ -1027,7 +1114,7 @@ var index_default = (path3) => {
|
|
|
1027
1114
|
*
|
|
1028
1115
|
* ```
|
|
1029
1116
|
*/
|
|
1030
|
-
addQueryToChannel: addMessageToChannel((0,
|
|
1117
|
+
addQueryToChannel: addMessageToChannel((0, import_node_path12.join)(path4), "queries"),
|
|
1031
1118
|
/**
|
|
1032
1119
|
* ================================
|
|
1033
1120
|
* SERVICES
|
|
@@ -1040,14 +1127,14 @@ var index_default = (path3) => {
|
|
|
1040
1127
|
* @param options - Optional options to write the event
|
|
1041
1128
|
*
|
|
1042
1129
|
*/
|
|
1043
|
-
writeService: writeService((0,
|
|
1130
|
+
writeService: writeService((0, import_node_path12.join)(path4, "services")),
|
|
1044
1131
|
/**
|
|
1045
1132
|
* Adds a versioned service to EventCatalog
|
|
1046
1133
|
*
|
|
1047
1134
|
* @param service - The service to write
|
|
1048
1135
|
*
|
|
1049
1136
|
*/
|
|
1050
|
-
writeVersionedService: writeVersionedService((0,
|
|
1137
|
+
writeVersionedService: writeVersionedService((0, import_node_path12.join)(path4, "services")),
|
|
1051
1138
|
/**
|
|
1052
1139
|
* Adds a service to a domain in EventCatalog
|
|
1053
1140
|
*
|
|
@@ -1056,39 +1143,39 @@ var index_default = (path3) => {
|
|
|
1056
1143
|
* @param options - Optional options to write the event
|
|
1057
1144
|
*
|
|
1058
1145
|
*/
|
|
1059
|
-
writeServiceToDomain: writeServiceToDomain((0,
|
|
1146
|
+
writeServiceToDomain: writeServiceToDomain((0, import_node_path12.join)(path4, "domains")),
|
|
1060
1147
|
/**
|
|
1061
1148
|
* Returns a service from EventCatalog
|
|
1062
1149
|
* @param id - The id of the service to retrieve
|
|
1063
1150
|
* @param version - Optional id of the version to get (supports semver)
|
|
1064
1151
|
* @returns Service|Undefined
|
|
1065
1152
|
*/
|
|
1066
|
-
getService: getService((0,
|
|
1153
|
+
getService: getService((0, import_node_path12.join)(path4)),
|
|
1067
1154
|
/**
|
|
1068
1155
|
* Returns all services from EventCatalog
|
|
1069
1156
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1070
1157
|
* @returns Service[]|Undefined
|
|
1071
1158
|
*/
|
|
1072
|
-
getServices: getServices((0,
|
|
1159
|
+
getServices: getServices((0, import_node_path12.join)(path4)),
|
|
1073
1160
|
/**
|
|
1074
1161
|
* Moves a given service id to the version directory
|
|
1075
1162
|
* @param directory
|
|
1076
1163
|
*/
|
|
1077
|
-
versionService: versionService((0,
|
|
1164
|
+
versionService: versionService((0, import_node_path12.join)(path4)),
|
|
1078
1165
|
/**
|
|
1079
1166
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1080
1167
|
*
|
|
1081
1168
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
1082
1169
|
*
|
|
1083
1170
|
*/
|
|
1084
|
-
rmService: rmService((0,
|
|
1171
|
+
rmService: rmService((0, import_node_path12.join)(path4, "services")),
|
|
1085
1172
|
/**
|
|
1086
1173
|
* Remove an service by an service id
|
|
1087
1174
|
*
|
|
1088
1175
|
* @param id - The id of the service you want to remove
|
|
1089
1176
|
*
|
|
1090
1177
|
*/
|
|
1091
|
-
rmServiceById: rmServiceById((0,
|
|
1178
|
+
rmServiceById: rmServiceById((0, import_node_path12.join)(path4)),
|
|
1092
1179
|
/**
|
|
1093
1180
|
* Adds a file to the given service
|
|
1094
1181
|
* @param id - The id of the service to add the file to
|
|
@@ -1096,21 +1183,21 @@ var index_default = (path3) => {
|
|
|
1096
1183
|
* @param version - Optional version of the service to add the file to
|
|
1097
1184
|
* @returns
|
|
1098
1185
|
*/
|
|
1099
|
-
addFileToService: addFileToService((0,
|
|
1186
|
+
addFileToService: addFileToService((0, import_node_path12.join)(path4)),
|
|
1100
1187
|
/**
|
|
1101
1188
|
* Returns the specifications for a given service
|
|
1102
1189
|
* @param id - The id of the service to retrieve the specifications for
|
|
1103
1190
|
* @param version - Optional version of the service
|
|
1104
1191
|
* @returns
|
|
1105
1192
|
*/
|
|
1106
|
-
getSpecificationFilesForService: getSpecificationFilesForService((0,
|
|
1193
|
+
getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path12.join)(path4)),
|
|
1107
1194
|
/**
|
|
1108
1195
|
* Check to see if a service version exists
|
|
1109
1196
|
* @param id - The id of the service
|
|
1110
1197
|
* @param version - The version of the service (supports semver)
|
|
1111
1198
|
* @returns
|
|
1112
1199
|
*/
|
|
1113
|
-
serviceHasVersion: serviceHasVersion((0,
|
|
1200
|
+
serviceHasVersion: serviceHasVersion((0, import_node_path12.join)(path4)),
|
|
1114
1201
|
/**
|
|
1115
1202
|
* Add an event to a service by it's id.
|
|
1116
1203
|
*
|
|
@@ -1130,7 +1217,7 @@ var index_default = (path3) => {
|
|
|
1130
1217
|
*
|
|
1131
1218
|
* ```
|
|
1132
1219
|
*/
|
|
1133
|
-
addEventToService: addMessageToService((0,
|
|
1220
|
+
addEventToService: addMessageToService((0, import_node_path12.join)(path4)),
|
|
1134
1221
|
/**
|
|
1135
1222
|
* Add a command to a service by it's id.
|
|
1136
1223
|
*
|
|
@@ -1150,7 +1237,7 @@ var index_default = (path3) => {
|
|
|
1150
1237
|
*
|
|
1151
1238
|
* ```
|
|
1152
1239
|
*/
|
|
1153
|
-
addCommandToService: addMessageToService((0,
|
|
1240
|
+
addCommandToService: addMessageToService((0, import_node_path12.join)(path4)),
|
|
1154
1241
|
/**
|
|
1155
1242
|
* Add a query to a service by it's id.
|
|
1156
1243
|
*
|
|
@@ -1170,7 +1257,7 @@ var index_default = (path3) => {
|
|
|
1170
1257
|
*
|
|
1171
1258
|
* ```
|
|
1172
1259
|
*/
|
|
1173
|
-
addQueryToService: addMessageToService((0,
|
|
1260
|
+
addQueryToService: addMessageToService((0, import_node_path12.join)(path4)),
|
|
1174
1261
|
/**
|
|
1175
1262
|
* ================================
|
|
1176
1263
|
* Domains
|
|
@@ -1183,39 +1270,39 @@ var index_default = (path3) => {
|
|
|
1183
1270
|
* @param options - Optional options to write the event
|
|
1184
1271
|
*
|
|
1185
1272
|
*/
|
|
1186
|
-
writeDomain: writeDomain((0,
|
|
1273
|
+
writeDomain: writeDomain((0, import_node_path12.join)(path4, "domains")),
|
|
1187
1274
|
/**
|
|
1188
1275
|
* Returns a domain from EventCatalog
|
|
1189
1276
|
* @param id - The id of the domain to retrieve
|
|
1190
1277
|
* @param version - Optional id of the version to get (supports semver)
|
|
1191
1278
|
* @returns Domain|Undefined
|
|
1192
1279
|
*/
|
|
1193
|
-
getDomain: getDomain((0,
|
|
1280
|
+
getDomain: getDomain((0, import_node_path12.join)(path4, "domains")),
|
|
1194
1281
|
/**
|
|
1195
1282
|
* Returns all domains from EventCatalog
|
|
1196
1283
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1197
1284
|
* @returns Domain[]|Undefined
|
|
1198
1285
|
*/
|
|
1199
|
-
getDomains: getDomains((0,
|
|
1286
|
+
getDomains: getDomains((0, import_node_path12.join)(path4)),
|
|
1200
1287
|
/**
|
|
1201
1288
|
* Moves a given domain id to the version directory
|
|
1202
1289
|
* @param directory
|
|
1203
1290
|
*/
|
|
1204
|
-
versionDomain: versionDomain((0,
|
|
1291
|
+
versionDomain: versionDomain((0, import_node_path12.join)(path4, "domains")),
|
|
1205
1292
|
/**
|
|
1206
1293
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1207
1294
|
*
|
|
1208
1295
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
1209
1296
|
*
|
|
1210
1297
|
*/
|
|
1211
|
-
rmDomain: rmDomain((0,
|
|
1298
|
+
rmDomain: rmDomain((0, import_node_path12.join)(path4, "domains")),
|
|
1212
1299
|
/**
|
|
1213
1300
|
* Remove an service by an domain id
|
|
1214
1301
|
*
|
|
1215
1302
|
* @param id - The id of the domain you want to remove
|
|
1216
1303
|
*
|
|
1217
1304
|
*/
|
|
1218
|
-
rmDomainById: rmDomainById((0,
|
|
1305
|
+
rmDomainById: rmDomainById((0, import_node_path12.join)(path4, "domains")),
|
|
1219
1306
|
/**
|
|
1220
1307
|
* Adds a file to the given domain
|
|
1221
1308
|
* @param id - The id of the domain to add the file to
|
|
@@ -1223,28 +1310,28 @@ var index_default = (path3) => {
|
|
|
1223
1310
|
* @param version - Optional version of the domain to add the file to
|
|
1224
1311
|
* @returns
|
|
1225
1312
|
*/
|
|
1226
|
-
addFileToDomain: addFileToDomain((0,
|
|
1313
|
+
addFileToDomain: addFileToDomain((0, import_node_path12.join)(path4, "domains")),
|
|
1227
1314
|
/**
|
|
1228
1315
|
* Adds an ubiquitous language dictionary to a domain
|
|
1229
1316
|
* @param id - The id of the domain to add the ubiquitous language to
|
|
1230
1317
|
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
1231
1318
|
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
1232
1319
|
*/
|
|
1233
|
-
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0,
|
|
1320
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0, import_node_path12.join)(path4, "domains")),
|
|
1234
1321
|
/**
|
|
1235
1322
|
* Get the ubiquitous language dictionary from a domain
|
|
1236
1323
|
* @param id - The id of the domain to get the ubiquitous language from
|
|
1237
1324
|
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
1238
1325
|
* @returns
|
|
1239
1326
|
*/
|
|
1240
|
-
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0,
|
|
1327
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0, import_node_path12.join)(path4, "domains")),
|
|
1241
1328
|
/**
|
|
1242
1329
|
* Check to see if a domain version exists
|
|
1243
1330
|
* @param id - The id of the domain
|
|
1244
1331
|
* @param version - The version of the domain (supports semver)
|
|
1245
1332
|
* @returns
|
|
1246
1333
|
*/
|
|
1247
|
-
domainHasVersion: domainHasVersion((0,
|
|
1334
|
+
domainHasVersion: domainHasVersion((0, import_node_path12.join)(path4)),
|
|
1248
1335
|
/**
|
|
1249
1336
|
* Adds a given service to a domain
|
|
1250
1337
|
* @param id - The id of the domain
|
|
@@ -1252,7 +1339,7 @@ var index_default = (path3) => {
|
|
|
1252
1339
|
* @param version - (Optional) The version of the domain to add the service to
|
|
1253
1340
|
* @returns
|
|
1254
1341
|
*/
|
|
1255
|
-
addServiceToDomain: addServiceToDomain((0,
|
|
1342
|
+
addServiceToDomain: addServiceToDomain((0, import_node_path12.join)(path4, "domains")),
|
|
1256
1343
|
/**
|
|
1257
1344
|
* ================================
|
|
1258
1345
|
* Teams
|
|
@@ -1265,25 +1352,25 @@ var index_default = (path3) => {
|
|
|
1265
1352
|
* @param options - Optional options to write the team
|
|
1266
1353
|
*
|
|
1267
1354
|
*/
|
|
1268
|
-
writeTeam: writeTeam((0,
|
|
1355
|
+
writeTeam: writeTeam((0, import_node_path12.join)(path4, "teams")),
|
|
1269
1356
|
/**
|
|
1270
1357
|
* Returns a team from EventCatalog
|
|
1271
1358
|
* @param id - The id of the team to retrieve
|
|
1272
1359
|
* @returns Team|Undefined
|
|
1273
1360
|
*/
|
|
1274
|
-
getTeam: getTeam((0,
|
|
1361
|
+
getTeam: getTeam((0, import_node_path12.join)(path4, "teams")),
|
|
1275
1362
|
/**
|
|
1276
1363
|
* Returns all teams from EventCatalog
|
|
1277
1364
|
* @returns Team[]|Undefined
|
|
1278
1365
|
*/
|
|
1279
|
-
getTeams: getTeams((0,
|
|
1366
|
+
getTeams: getTeams((0, import_node_path12.join)(path4)),
|
|
1280
1367
|
/**
|
|
1281
1368
|
* Remove a team by the team id
|
|
1282
1369
|
*
|
|
1283
1370
|
* @param id - The id of the team you want to remove
|
|
1284
1371
|
*
|
|
1285
1372
|
*/
|
|
1286
|
-
rmTeamById: rmTeamById((0,
|
|
1373
|
+
rmTeamById: rmTeamById((0, import_node_path12.join)(path4, "teams")),
|
|
1287
1374
|
/**
|
|
1288
1375
|
* ================================
|
|
1289
1376
|
* Users
|
|
@@ -1296,25 +1383,25 @@ var index_default = (path3) => {
|
|
|
1296
1383
|
* @param options - Optional options to write the user
|
|
1297
1384
|
*
|
|
1298
1385
|
*/
|
|
1299
|
-
writeUser: writeUser((0,
|
|
1386
|
+
writeUser: writeUser((0, import_node_path12.join)(path4, "users")),
|
|
1300
1387
|
/**
|
|
1301
1388
|
* Returns a user from EventCatalog
|
|
1302
1389
|
* @param id - The id of the user to retrieve
|
|
1303
1390
|
* @returns User|Undefined
|
|
1304
1391
|
*/
|
|
1305
|
-
getUser: getUser((0,
|
|
1392
|
+
getUser: getUser((0, import_node_path12.join)(path4, "users")),
|
|
1306
1393
|
/**
|
|
1307
1394
|
* Returns all user from EventCatalog
|
|
1308
1395
|
* @returns User[]|Undefined
|
|
1309
1396
|
*/
|
|
1310
|
-
getUsers: getUsers((0,
|
|
1397
|
+
getUsers: getUsers((0, import_node_path12.join)(path4)),
|
|
1311
1398
|
/**
|
|
1312
1399
|
* Remove a user by the user id
|
|
1313
1400
|
*
|
|
1314
1401
|
* @param id - The id of the user you want to remove
|
|
1315
1402
|
*
|
|
1316
1403
|
*/
|
|
1317
|
-
rmUserById: rmUserById((0,
|
|
1404
|
+
rmUserById: rmUserById((0, import_node_path12.join)(path4, "users")),
|
|
1318
1405
|
/**
|
|
1319
1406
|
* ================================
|
|
1320
1407
|
* Custom Docs
|
|
@@ -1325,26 +1412,32 @@ var index_default = (path3) => {
|
|
|
1325
1412
|
* @param path - The path to the custom doc to retrieve
|
|
1326
1413
|
* @returns CustomDoc|Undefined
|
|
1327
1414
|
*/
|
|
1328
|
-
getCustomDoc: getCustomDoc((0,
|
|
1415
|
+
getCustomDoc: getCustomDoc((0, import_node_path12.join)(path4, "docs")),
|
|
1329
1416
|
/**
|
|
1330
1417
|
* Returns all custom docs from EventCatalog
|
|
1331
1418
|
* @param options - Optional options to get custom docs from a specific path
|
|
1332
1419
|
* @returns CustomDoc[]|Undefined
|
|
1333
1420
|
*/
|
|
1334
|
-
getCustomDocs: getCustomDocs((0,
|
|
1421
|
+
getCustomDocs: getCustomDocs((0, import_node_path12.join)(path4, "docs")),
|
|
1335
1422
|
/**
|
|
1336
1423
|
* Writes a custom doc to EventCatalog
|
|
1337
1424
|
* @param customDoc - The custom doc to write
|
|
1338
1425
|
* @param options - Optional options to write the custom doc
|
|
1339
1426
|
*
|
|
1340
1427
|
*/
|
|
1341
|
-
writeCustomDoc: writeCustomDoc((0,
|
|
1428
|
+
writeCustomDoc: writeCustomDoc((0, import_node_path12.join)(path4, "docs")),
|
|
1342
1429
|
/**
|
|
1343
1430
|
* Removes a custom doc from EventCatalog
|
|
1344
1431
|
* @param path - The path to the custom doc to remove
|
|
1345
1432
|
*
|
|
1346
1433
|
*/
|
|
1347
|
-
rmCustomDoc: rmCustomDoc((0,
|
|
1434
|
+
rmCustomDoc: rmCustomDoc((0, import_node_path12.join)(path4, "docs")),
|
|
1435
|
+
/**
|
|
1436
|
+
* Dumps the catalog to a JSON file.
|
|
1437
|
+
* @param directory - The directory to dump the catalog to
|
|
1438
|
+
* @returns A JSON file with the catalog
|
|
1439
|
+
*/
|
|
1440
|
+
dumpCatalog: dumpCatalog((0, import_node_path12.join)(path4))
|
|
1348
1441
|
};
|
|
1349
1442
|
};
|
|
1350
1443
|
//# sourceMappingURL=index.js.map
|