@eventcatalog/sdk 2.7.6 → 2.8.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/channels.js +18 -9
- package/dist/channels.js.map +1 -1
- package/dist/channels.mjs +11 -2
- package/dist/channels.mjs.map +1 -1
- package/dist/commands.js +14 -5
- package/dist/commands.js.map +1 -1
- package/dist/commands.mjs +11 -2
- package/dist/commands.mjs.map +1 -1
- package/dist/custom-docs.js +6 -5
- package/dist/custom-docs.js.map +1 -1
- package/dist/custom-docs.mjs +1 -0
- package/dist/custom-docs.mjs.map +1 -1
- package/dist/domains.js +17 -8
- package/dist/domains.js.map +1 -1
- package/dist/domains.mjs +11 -2
- package/dist/domains.mjs.map +1 -1
- package/dist/entities.js +13 -4
- package/dist/entities.js.map +1 -1
- package/dist/entities.mjs +11 -2
- package/dist/entities.mjs.map +1 -1
- package/dist/eventcatalog.js +161 -152
- package/dist/eventcatalog.js.map +1 -1
- package/dist/eventcatalog.mjs +11 -2
- package/dist/eventcatalog.mjs.map +1 -1
- package/dist/events.js +14 -5
- package/dist/events.js.map +1 -1
- package/dist/events.mjs +11 -2
- package/dist/events.mjs.map +1 -1
- package/dist/index.js +161 -152
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/dist/messages.js +4 -3
- package/dist/messages.js.map +1 -1
- package/dist/messages.mjs +1 -0
- package/dist/messages.mjs.map +1 -1
- package/dist/queries.js +14 -5
- package/dist/queries.js.map +1 -1
- package/dist/queries.mjs +11 -2
- package/dist/queries.mjs.map +1 -1
- package/dist/services.js +20 -11
- package/dist/services.js.map +1 -1
- package/dist/services.mjs +11 -2
- package/dist/services.mjs.map +1 -1
- package/dist/teams.js +9 -8
- package/dist/teams.js.map +1 -1
- package/dist/teams.mjs +1 -0
- package/dist/teams.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,11 +33,11 @@ __export(index_exports, {
|
|
|
33
33
|
default: () => index_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
|
-
var
|
|
36
|
+
var import_node_path16 = require("path");
|
|
37
37
|
|
|
38
38
|
// src/events.ts
|
|
39
39
|
var import_promises2 = __toESM(require("fs/promises"));
|
|
40
|
-
var
|
|
40
|
+
var import_node_path3 = require("path");
|
|
41
41
|
|
|
42
42
|
// src/internal/utils.ts
|
|
43
43
|
var import_glob = require("glob");
|
|
@@ -154,6 +154,7 @@ var import_promises = __toESM(require("fs/promises"));
|
|
|
154
154
|
var import_node_fs2 = __toESM(require("fs"));
|
|
155
155
|
var import_semver2 = require("semver");
|
|
156
156
|
var import_proper_lockfile = require("proper-lockfile");
|
|
157
|
+
var import_node_path2 = require("path");
|
|
157
158
|
var versionResource = async (catalogDir, id) => {
|
|
158
159
|
const files = await getFiles(`${catalogDir}/**/index.{md,mdx}`);
|
|
159
160
|
const matchedFiles = await searchFilesForId(files, id);
|
|
@@ -161,16 +162,24 @@ var versionResource = async (catalogDir, id) => {
|
|
|
161
162
|
throw new Error(`No resource found with id: ${id}`);
|
|
162
163
|
}
|
|
163
164
|
const file = matchedFiles[0];
|
|
164
|
-
const sourceDirectory = (0, import_path.dirname)(file);
|
|
165
|
+
const sourceDirectory = (0, import_path.dirname)(file).replace(/\/versioned?\/[^/]+\//, "/");
|
|
165
166
|
const { data: { version = "0.0.1" } = {} } = import_gray_matter2.default.read(file);
|
|
166
167
|
const targetDirectory = getVersionedDirectory(sourceDirectory, version);
|
|
167
168
|
import_node_fs2.default.mkdirSync(targetDirectory, { recursive: true });
|
|
169
|
+
const ignoreListToCopy = ["events", "commands", "queries", "versioned"];
|
|
168
170
|
await copyDir(catalogDir, sourceDirectory, targetDirectory, (src) => {
|
|
169
|
-
|
|
171
|
+
const folderName = (0, import_node_path2.basename)(src);
|
|
172
|
+
if (ignoreListToCopy.includes(folderName)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
return true;
|
|
170
176
|
});
|
|
171
177
|
await import_promises.default.readdir(sourceDirectory).then(async (resourceFiles) => {
|
|
172
178
|
await Promise.all(
|
|
173
179
|
resourceFiles.map(async (file2) => {
|
|
180
|
+
if (ignoreListToCopy.includes(file2)) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
174
183
|
if (file2 !== "versioned") {
|
|
175
184
|
import_node_fs2.default.rmSync((0, import_path.join)(sourceDirectory, file2), { recursive: true });
|
|
176
185
|
}
|
|
@@ -366,11 +375,11 @@ var writeEventToService = (directory) => async (event, service, options = { path
|
|
|
366
375
|
throw new Error("Service not found");
|
|
367
376
|
}
|
|
368
377
|
let pathForEvent = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/events` : `${resourcePath.directory}/events`;
|
|
369
|
-
pathForEvent = (0,
|
|
378
|
+
pathForEvent = (0, import_node_path3.join)(pathForEvent, event.id);
|
|
370
379
|
await writeResource(directory, { ...event }, { ...options, path: pathForEvent, type: "event" });
|
|
371
380
|
};
|
|
372
381
|
var rmEvent = (directory) => async (path5) => {
|
|
373
|
-
await import_promises2.default.rm((0,
|
|
382
|
+
await import_promises2.default.rm((0, import_node_path3.join)(directory, path5), { recursive: true });
|
|
374
383
|
};
|
|
375
384
|
var rmEventById = (directory) => async (id, version, persistFiles) => {
|
|
376
385
|
await rmResourceById(directory, id, version, { type: "event", persistFiles });
|
|
@@ -387,7 +396,7 @@ var eventHasVersion = (directory) => async (id, version) => {
|
|
|
387
396
|
|
|
388
397
|
// src/commands.ts
|
|
389
398
|
var import_promises3 = __toESM(require("fs/promises"));
|
|
390
|
-
var
|
|
399
|
+
var import_node_path4 = require("path");
|
|
391
400
|
var getCommand = (directory) => async (id, version, options) => getResource(directory, id, version, { type: "command", ...options });
|
|
392
401
|
var getCommands = (directory) => async (options) => getResources(directory, { type: "commands", ...options });
|
|
393
402
|
var writeCommand = (directory) => async (command, options = {
|
|
@@ -402,11 +411,11 @@ var writeCommandToService = (directory) => async (command, service, options = {
|
|
|
402
411
|
throw new Error("Service not found");
|
|
403
412
|
}
|
|
404
413
|
let pathForCommand = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/commands` : `${resourcePath.directory}/commands`;
|
|
405
|
-
pathForCommand = (0,
|
|
414
|
+
pathForCommand = (0, import_node_path4.join)(pathForCommand, command.id);
|
|
406
415
|
await writeResource(directory, { ...command }, { ...options, path: pathForCommand, type: "command" });
|
|
407
416
|
};
|
|
408
417
|
var rmCommand = (directory) => async (path5) => {
|
|
409
|
-
await import_promises3.default.rm((0,
|
|
418
|
+
await import_promises3.default.rm((0, import_node_path4.join)(directory, path5), { recursive: true });
|
|
410
419
|
};
|
|
411
420
|
var rmCommandById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "command", persistFiles });
|
|
412
421
|
var versionCommand = (directory) => async (id) => versionResource(directory, id);
|
|
@@ -421,7 +430,7 @@ var commandHasVersion = (directory) => async (id, version) => {
|
|
|
421
430
|
|
|
422
431
|
// src/queries.ts
|
|
423
432
|
var import_promises4 = __toESM(require("fs/promises"));
|
|
424
|
-
var
|
|
433
|
+
var import_node_path5 = require("path");
|
|
425
434
|
var getQuery = (directory) => async (id, version, options) => getResource(directory, id, version, { type: "query", ...options });
|
|
426
435
|
var writeQuery = (directory) => async (query, options = {
|
|
427
436
|
path: "",
|
|
@@ -436,11 +445,11 @@ var writeQueryToService = (directory) => async (query, service, options = { path
|
|
|
436
445
|
throw new Error("Service not found");
|
|
437
446
|
}
|
|
438
447
|
let pathForQuery = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/queries` : `${resourcePath.directory}/queries`;
|
|
439
|
-
pathForQuery = (0,
|
|
448
|
+
pathForQuery = (0, import_node_path5.join)(pathForQuery, query.id);
|
|
440
449
|
await writeResource(directory, { ...query }, { ...options, path: pathForQuery, type: "query" });
|
|
441
450
|
};
|
|
442
451
|
var rmQuery = (directory) => async (path5) => {
|
|
443
|
-
await import_promises4.default.rm((0,
|
|
452
|
+
await import_promises4.default.rm((0, import_node_path5.join)(directory, path5), { recursive: true });
|
|
444
453
|
};
|
|
445
454
|
var rmQueryById = (directory) => async (id, version, persistFiles) => {
|
|
446
455
|
await rmResourceById(directory, id, version, { type: "query", persistFiles });
|
|
@@ -457,7 +466,7 @@ var queryHasVersion = (directory) => async (id, version) => {
|
|
|
457
466
|
|
|
458
467
|
// src/services.ts
|
|
459
468
|
var import_promises5 = __toESM(require("fs/promises"));
|
|
460
|
-
var
|
|
469
|
+
var import_node_path6 = require("path");
|
|
461
470
|
var getService = (directory) => async (id, version) => getResource(directory, id, version, { type: "service" });
|
|
462
471
|
var getServiceByPath = (directory) => async (path5) => {
|
|
463
472
|
const service = await getResource(directory, void 0, void 0, { type: "service" }, path5);
|
|
@@ -489,12 +498,12 @@ var writeVersionedService = (directory) => async (service) => {
|
|
|
489
498
|
};
|
|
490
499
|
var writeServiceToDomain = (directory) => async (service, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
491
500
|
let pathForService = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/services` : `/${domain.id}/services`;
|
|
492
|
-
pathForService = (0,
|
|
501
|
+
pathForService = (0, import_node_path6.join)(pathForService, service.id);
|
|
493
502
|
await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
|
|
494
503
|
};
|
|
495
504
|
var versionService = (directory) => async (id) => versionResource(directory, id);
|
|
496
505
|
var rmService = (directory) => async (path5) => {
|
|
497
|
-
await import_promises5.default.rm((0,
|
|
506
|
+
await import_promises5.default.rm((0, import_node_path6.join)(directory, path5), { recursive: true });
|
|
498
507
|
};
|
|
499
508
|
var rmServiceById = (directory) => async (id, version, persistFiles) => {
|
|
500
509
|
await rmResourceById(directory, id, version, { type: "service", persistFiles });
|
|
@@ -521,7 +530,7 @@ var getSpecificationFilesForService = (directory) => async (id, version) => {
|
|
|
521
530
|
throw new Error(`Specification file name for ${fileName} is undefined`);
|
|
522
531
|
}
|
|
523
532
|
const rawFile = await getFileFromResource(directory, id, { fileName }, version);
|
|
524
|
-
return { key, content: rawFile, fileName, path: (0,
|
|
533
|
+
return { key, content: rawFile, fileName, path: (0, import_node_path6.join)((0, import_node_path6.dirname)(filePathToService), fileName) };
|
|
525
534
|
});
|
|
526
535
|
specs = await Promise.all(getSpecs);
|
|
527
536
|
}
|
|
@@ -530,7 +539,7 @@ var getSpecificationFilesForService = (directory) => async (id, version) => {
|
|
|
530
539
|
var addMessageToService = (directory) => async (id, direction, event, version) => {
|
|
531
540
|
let service = await getService(directory)(id, version);
|
|
532
541
|
const servicePath = await getResourcePath(directory, id, version);
|
|
533
|
-
const extension = (0,
|
|
542
|
+
const extension = (0, import_node_path6.extname)(servicePath?.fullPath || "");
|
|
534
543
|
if (direction === "sends") {
|
|
535
544
|
if (service.sends === void 0) {
|
|
536
545
|
service.sends = [];
|
|
@@ -559,7 +568,7 @@ var addMessageToService = (directory) => async (id, direction, event, version) =
|
|
|
559
568
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
560
569
|
}
|
|
561
570
|
const path5 = existingResource.split(/[\\/]+services/)[0];
|
|
562
|
-
const pathToResource = (0,
|
|
571
|
+
const pathToResource = (0, import_node_path6.join)(path5, "services");
|
|
563
572
|
await rmServiceById(directory)(id, version);
|
|
564
573
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
565
574
|
};
|
|
@@ -569,7 +578,7 @@ var serviceHasVersion = (directory) => async (id, version) => {
|
|
|
569
578
|
};
|
|
570
579
|
var isService = (directory) => async (path5) => {
|
|
571
580
|
const service = await getServiceByPath(directory)(path5);
|
|
572
|
-
const relativePath = (0,
|
|
581
|
+
const relativePath = (0, import_node_path6.relative)(directory, path5);
|
|
573
582
|
const segments = relativePath.split(/[/\\]+/);
|
|
574
583
|
return !!service && segments.includes("services");
|
|
575
584
|
};
|
|
@@ -577,7 +586,7 @@ var toService = (directory) => async (file) => toResource(directory, file);
|
|
|
577
586
|
var addEntityToService = (directory) => async (id, entity, version) => {
|
|
578
587
|
let service = await getService(directory)(id, version);
|
|
579
588
|
const servicePath = await getResourcePath(directory, id, version);
|
|
580
|
-
const extension = (0,
|
|
589
|
+
const extension = (0, import_node_path6.extname)(servicePath?.fullPath || "");
|
|
581
590
|
if (service.entities === void 0) {
|
|
582
591
|
service.entities = [];
|
|
583
592
|
}
|
|
@@ -592,14 +601,14 @@ var addEntityToService = (directory) => async (id, entity, version) => {
|
|
|
592
601
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
593
602
|
}
|
|
594
603
|
const path5 = existingResource.split(/[\\/]+services/)[0];
|
|
595
|
-
const pathToResource = (0,
|
|
604
|
+
const pathToResource = (0, import_node_path6.join)(path5, "services");
|
|
596
605
|
await rmServiceById(directory)(id, version);
|
|
597
606
|
await writeService(pathToResource)(service, { format: extension === ".md" ? "md" : "mdx" });
|
|
598
607
|
};
|
|
599
608
|
|
|
600
609
|
// src/domains.ts
|
|
601
610
|
var import_promises6 = __toESM(require("fs/promises"));
|
|
602
|
-
var
|
|
611
|
+
var import_node_path7 = __toESM(require("path"));
|
|
603
612
|
var import_node_fs3 = __toESM(require("fs"));
|
|
604
613
|
var import_gray_matter3 = __toESM(require("gray-matter"));
|
|
605
614
|
var getDomain = (directory) => async (id, version) => getResource(directory, id, version, { type: "domain" });
|
|
@@ -625,7 +634,7 @@ var writeDomain = (directory) => async (domain, options = {
|
|
|
625
634
|
};
|
|
626
635
|
var versionDomain = (directory) => async (id) => versionResource(directory, id);
|
|
627
636
|
var rmDomain = (directory) => async (path5) => {
|
|
628
|
-
await import_promises6.default.rm((0,
|
|
637
|
+
await import_promises6.default.rm((0, import_node_path7.join)(directory, path5), { recursive: true });
|
|
629
638
|
};
|
|
630
639
|
var rmDomainById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "domain", persistFiles });
|
|
631
640
|
var addFileToDomain = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
@@ -637,7 +646,7 @@ var addUbiquitousLanguageToDomain = (directory) => async (id, ubiquitousLanguage
|
|
|
637
646
|
};
|
|
638
647
|
var getUbiquitousLanguageFromDomain = (directory) => async (id, version) => {
|
|
639
648
|
const pathToDomain = await findFileById(directory, id, version) || "";
|
|
640
|
-
const pathToUbiquitousLanguage =
|
|
649
|
+
const pathToUbiquitousLanguage = import_node_path7.default.join(import_node_path7.default.dirname(pathToDomain), "ubiquitous-language.mdx");
|
|
641
650
|
const fileExists = import_node_fs3.default.existsSync(pathToUbiquitousLanguage);
|
|
642
651
|
if (!fileExists) {
|
|
643
652
|
return void 0;
|
|
@@ -652,7 +661,7 @@ var domainHasVersion = (directory) => async (id, version) => {
|
|
|
652
661
|
var addServiceToDomain = (directory) => async (id, service, version) => {
|
|
653
662
|
let domain = await getDomain(directory)(id, version);
|
|
654
663
|
const domainPath = await getResourcePath(directory, id, version);
|
|
655
|
-
const extension =
|
|
664
|
+
const extension = import_node_path7.default.extname(domainPath?.fullPath || "");
|
|
656
665
|
if (domain.services === void 0) {
|
|
657
666
|
domain.services = [];
|
|
658
667
|
}
|
|
@@ -667,7 +676,7 @@ var addServiceToDomain = (directory) => async (id, service, version) => {
|
|
|
667
676
|
var addSubDomainToDomain = (directory) => async (id, subDomain, version) => {
|
|
668
677
|
let domain = await getDomain(directory)(id, version);
|
|
669
678
|
const domainPath = await getResourcePath(directory, id, version);
|
|
670
|
-
const extension =
|
|
679
|
+
const extension = import_node_path7.default.extname(domainPath?.fullPath || "");
|
|
671
680
|
if (domain.domains === void 0) {
|
|
672
681
|
domain.domains = [];
|
|
673
682
|
}
|
|
@@ -682,7 +691,7 @@ var addSubDomainToDomain = (directory) => async (id, subDomain, version) => {
|
|
|
682
691
|
var addEntityToDomain = (directory) => async (id, entity, version) => {
|
|
683
692
|
let domain = await getDomain(directory)(id, version);
|
|
684
693
|
const domainPath = await getResourcePath(directory, id, version);
|
|
685
|
-
const extension =
|
|
694
|
+
const extension = import_node_path7.default.extname(domainPath?.fullPath || "");
|
|
686
695
|
if (domain.entities === void 0) {
|
|
687
696
|
domain.entities = [];
|
|
688
697
|
}
|
|
@@ -697,12 +706,12 @@ var addEntityToDomain = (directory) => async (id, entity, version) => {
|
|
|
697
706
|
|
|
698
707
|
// src/channels.ts
|
|
699
708
|
var import_promises7 = __toESM(require("fs/promises"));
|
|
700
|
-
var
|
|
709
|
+
var import_node_path8 = require("path");
|
|
701
710
|
var getChannel = (directory) => async (id, version) => getResource(directory, id, version, { type: "channel" });
|
|
702
711
|
var getChannels = (directory) => async (options) => getResources(directory, { type: "channels", ...options });
|
|
703
712
|
var writeChannel = (directory) => async (channel, options = { path: "" }) => writeResource(directory, { ...channel }, { ...options, type: "channel" });
|
|
704
713
|
var rmChannel = (directory) => async (path5) => {
|
|
705
|
-
await import_promises7.default.rm((0,
|
|
714
|
+
await import_promises7.default.rm((0, import_node_path8.join)(directory, path5), { recursive: true });
|
|
706
715
|
};
|
|
707
716
|
var rmChannelById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "channel", persistFiles });
|
|
708
717
|
var versionChannel = (directory) => async (id) => versionResource(directory, id);
|
|
@@ -732,7 +741,7 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
732
741
|
const { getMessage, rmMessageById, writeMessage } = functions[collection];
|
|
733
742
|
const message = await getMessage(directory)(_message.id, _message.version);
|
|
734
743
|
const messagePath = await getResourcePath(directory, _message.id, _message.version);
|
|
735
|
-
const extension = (0,
|
|
744
|
+
const extension = (0, import_node_path8.extname)(messagePath?.fullPath || "");
|
|
736
745
|
if (!message) throw new Error(`Message ${_message.id} with version ${_message.version} not found`);
|
|
737
746
|
if (message.channels === void 0) {
|
|
738
747
|
message.channels = [];
|
|
@@ -744,17 +753,17 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
744
753
|
throw new Error(`Cannot find message ${id} in the catalog`);
|
|
745
754
|
}
|
|
746
755
|
const path5 = existingResource.split(`/[\\/]+${collection}`)[0];
|
|
747
|
-
const pathToResource = (0,
|
|
756
|
+
const pathToResource = (0, import_node_path8.join)(path5, collection);
|
|
748
757
|
await rmMessageById(directory)(_message.id, _message.version, true);
|
|
749
758
|
await writeMessage(pathToResource)(message, { format: extension === ".md" ? "md" : "mdx" });
|
|
750
759
|
};
|
|
751
760
|
|
|
752
761
|
// src/messages.ts
|
|
753
|
-
var
|
|
762
|
+
var import_node_path9 = require("path");
|
|
754
763
|
var import_gray_matter4 = __toESM(require("gray-matter"));
|
|
755
764
|
var import_semver3 = require("semver");
|
|
756
765
|
var getMessageBySchemaPath = (directory) => async (path5, options) => {
|
|
757
|
-
const pathToMessage = (0,
|
|
766
|
+
const pathToMessage = (0, import_node_path9.dirname)(path5);
|
|
758
767
|
try {
|
|
759
768
|
const files = await getFiles(`${directory}/${pathToMessage}/index.{md,mdx}`);
|
|
760
769
|
if (!files || files.length === 0) {
|
|
@@ -846,13 +855,13 @@ var getProducersOfSchema = (directory) => async (path5) => {
|
|
|
846
855
|
};
|
|
847
856
|
|
|
848
857
|
// src/custom-docs.ts
|
|
849
|
-
var
|
|
858
|
+
var import_node_path10 = __toESM(require("path"));
|
|
850
859
|
var import_node_fs4 = __toESM(require("fs"));
|
|
851
860
|
var import_promises8 = __toESM(require("fs/promises"));
|
|
852
861
|
var import_gray_matter5 = __toESM(require("gray-matter"));
|
|
853
862
|
var import_slugify = __toESM(require("slugify"));
|
|
854
863
|
var getCustomDoc = (directory) => async (filePath) => {
|
|
855
|
-
const fullPath =
|
|
864
|
+
const fullPath = import_node_path10.default.join(directory, filePath);
|
|
856
865
|
const fullPathWithExtension = fullPath.endsWith(".mdx") ? fullPath : `${fullPath}.mdx`;
|
|
857
866
|
const fileExists = import_node_fs4.default.existsSync(fullPathWithExtension);
|
|
858
867
|
if (!fileExists) {
|
|
@@ -871,26 +880,26 @@ var writeCustomDoc = (directory) => async (customDoc, options = { path: "" }) =>
|
|
|
871
880
|
const { fileName, ...rest } = customDoc;
|
|
872
881
|
const name = fileName || (0, import_slugify.default)(customDoc.title, { lower: true });
|
|
873
882
|
const withExtension = name.endsWith(".mdx") ? name : `${name}.mdx`;
|
|
874
|
-
const fullPath =
|
|
875
|
-
import_node_fs4.default.mkdirSync(
|
|
883
|
+
const fullPath = import_node_path10.default.join(directory, options.path || "", withExtension);
|
|
884
|
+
import_node_fs4.default.mkdirSync(import_node_path10.default.dirname(fullPath), { recursive: true });
|
|
876
885
|
const document = import_gray_matter5.default.stringify(customDoc.markdown.trim(), rest);
|
|
877
886
|
import_node_fs4.default.writeFileSync(fullPath, document);
|
|
878
887
|
};
|
|
879
888
|
var rmCustomDoc = (directory) => async (filePath) => {
|
|
880
889
|
const withExtension = filePath.endsWith(".mdx") ? filePath : `${filePath}.mdx`;
|
|
881
|
-
await import_promises8.default.rm((0,
|
|
890
|
+
await import_promises8.default.rm((0, import_node_path10.join)(directory, withExtension), { recursive: true });
|
|
882
891
|
};
|
|
883
892
|
|
|
884
893
|
// src/teams.ts
|
|
885
894
|
var import_promises9 = __toESM(require("fs/promises"));
|
|
886
895
|
var import_node_fs6 = __toESM(require("fs"));
|
|
887
|
-
var
|
|
896
|
+
var import_node_path12 = require("path");
|
|
888
897
|
var import_gray_matter7 = __toESM(require("gray-matter"));
|
|
889
|
-
var
|
|
898
|
+
var import_node_path13 = __toESM(require("path"));
|
|
890
899
|
|
|
891
900
|
// src/users.ts
|
|
892
901
|
var import_node_fs5 = __toESM(require("fs"));
|
|
893
|
-
var
|
|
902
|
+
var import_node_path11 = require("path");
|
|
894
903
|
var import_gray_matter6 = __toESM(require("gray-matter"));
|
|
895
904
|
var getUser = (catalogDir) => async (id) => {
|
|
896
905
|
const files = await getFiles(`${catalogDir}/${id}.{md,mdx}`);
|
|
@@ -928,11 +937,11 @@ var writeUser = (catalogDir) => async (user, options = {}) => {
|
|
|
928
937
|
}
|
|
929
938
|
const { markdown, ...frontmatter } = resource;
|
|
930
939
|
const document = import_gray_matter6.default.stringify(markdown, frontmatter);
|
|
931
|
-
import_node_fs5.default.mkdirSync((0,
|
|
932
|
-
import_node_fs5.default.writeFileSync((0,
|
|
940
|
+
import_node_fs5.default.mkdirSync((0, import_node_path11.join)(catalogDir, ""), { recursive: true });
|
|
941
|
+
import_node_fs5.default.writeFileSync((0, import_node_path11.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
933
942
|
};
|
|
934
943
|
var rmUserById = (catalogDir) => async (id) => {
|
|
935
|
-
import_node_fs5.default.rmSync((0,
|
|
944
|
+
import_node_fs5.default.rmSync((0, import_node_path11.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
936
945
|
};
|
|
937
946
|
|
|
938
947
|
// src/teams.ts
|
|
@@ -970,11 +979,11 @@ var writeTeam = (catalogDir) => async (team, options = {}) => {
|
|
|
970
979
|
}
|
|
971
980
|
const { markdown, ...frontmatter } = resource;
|
|
972
981
|
const document = import_gray_matter7.default.stringify(markdown, frontmatter);
|
|
973
|
-
import_node_fs6.default.mkdirSync((0,
|
|
974
|
-
import_node_fs6.default.writeFileSync((0,
|
|
982
|
+
import_node_fs6.default.mkdirSync((0, import_node_path12.join)(catalogDir, ""), { recursive: true });
|
|
983
|
+
import_node_fs6.default.writeFileSync((0, import_node_path12.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
975
984
|
};
|
|
976
985
|
var rmTeamById = (catalogDir) => async (id) => {
|
|
977
|
-
await import_promises9.default.rm((0,
|
|
986
|
+
await import_promises9.default.rm((0, import_node_path12.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
978
987
|
};
|
|
979
988
|
var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
980
989
|
const resource = await getResource(catalogDir, id, version);
|
|
@@ -982,11 +991,11 @@ var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
|
982
991
|
if (!resource) return [];
|
|
983
992
|
if (!resource.owners) return [];
|
|
984
993
|
for (const owner of resource.owners) {
|
|
985
|
-
const team = await getTeam(
|
|
994
|
+
const team = await getTeam(import_node_path13.default.join(catalogDir, "teams"))(owner);
|
|
986
995
|
if (team) {
|
|
987
996
|
owners.push(team);
|
|
988
997
|
} else {
|
|
989
|
-
const user = await getUser(
|
|
998
|
+
const user = await getUser(import_node_path13.default.join(catalogDir, "users"))(owner);
|
|
990
999
|
if (user) {
|
|
991
1000
|
owners.push(user);
|
|
992
1001
|
}
|
|
@@ -997,11 +1006,11 @@ var getOwnersForResource = (catalogDir) => async (id, version) => {
|
|
|
997
1006
|
|
|
998
1007
|
// src/eventcatalog.ts
|
|
999
1008
|
var import_fs = __toESM(require("fs"));
|
|
1000
|
-
var
|
|
1009
|
+
var import_node_path14 = __toESM(require("path"));
|
|
1001
1010
|
var DUMP_VERSION = "0.0.1";
|
|
1002
1011
|
var getEventCatalogVersion = async (catalogDir) => {
|
|
1003
1012
|
try {
|
|
1004
|
-
const packageJson = import_fs.default.readFileSync((0,
|
|
1013
|
+
const packageJson = import_fs.default.readFileSync((0, import_node_path14.join)(catalogDir, "package.json"), "utf8");
|
|
1005
1014
|
const packageJsonObject = JSON.parse(packageJson);
|
|
1006
1015
|
return packageJsonObject["dependencies"]["@eventcatalog/core"];
|
|
1007
1016
|
} catch (error) {
|
|
@@ -1014,7 +1023,7 @@ var hydrateResource = async (catalogDir, resources = [], { attachSchema = false
|
|
|
1014
1023
|
const resourcePath = await getResourcePath(catalogDir, resource.id, resource.version);
|
|
1015
1024
|
let schema = "";
|
|
1016
1025
|
if (resource.schemaPath && resourcePath?.fullPath) {
|
|
1017
|
-
const pathToSchema =
|
|
1026
|
+
const pathToSchema = import_node_path14.default.join(import_node_path14.default.dirname(resourcePath?.fullPath), resource.schemaPath);
|
|
1018
1027
|
if (import_fs.default.existsSync(pathToSchema)) {
|
|
1019
1028
|
schema = import_fs.default.readFileSync(pathToSchema, "utf8");
|
|
1020
1029
|
}
|
|
@@ -1035,7 +1044,7 @@ var filterCollection = (collection, options) => {
|
|
|
1035
1044
|
};
|
|
1036
1045
|
var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
1037
1046
|
try {
|
|
1038
|
-
const path5 = (0,
|
|
1047
|
+
const path5 = (0, import_node_path14.join)(directory, "eventcatalog.config.js");
|
|
1039
1048
|
const configModule = await import(path5);
|
|
1040
1049
|
return configModule.default;
|
|
1041
1050
|
} catch (error) {
|
|
@@ -1094,7 +1103,7 @@ var dumpCatalog = (directory) => async (options) => {
|
|
|
1094
1103
|
|
|
1095
1104
|
// src/entities.ts
|
|
1096
1105
|
var import_promises10 = __toESM(require("fs/promises"));
|
|
1097
|
-
var
|
|
1106
|
+
var import_node_path15 = require("path");
|
|
1098
1107
|
var getEntity = (directory) => async (id, version) => getResource(directory, id, version, { type: "entity" });
|
|
1099
1108
|
var getEntities = (directory) => async (options) => getResources(directory, { type: "entities", latestOnly: options?.latestOnly });
|
|
1100
1109
|
var writeEntity = (directory) => async (entity, options = {
|
|
@@ -1103,7 +1112,7 @@ var writeEntity = (directory) => async (entity, options = {
|
|
|
1103
1112
|
format: "mdx"
|
|
1104
1113
|
}) => writeResource(directory, { ...entity }, { ...options, type: "entity" });
|
|
1105
1114
|
var rmEntity = (directory) => async (path5) => {
|
|
1106
|
-
await import_promises10.default.rm((0,
|
|
1115
|
+
await import_promises10.default.rm((0, import_node_path15.join)(directory, path5), { recursive: true });
|
|
1107
1116
|
};
|
|
1108
1117
|
var rmEntityById = (directory) => async (id, version, persistFiles) => {
|
|
1109
1118
|
await rmResourceById(directory, id, version, { type: "entity", persistFiles });
|
|
@@ -1123,13 +1132,13 @@ var index_default = (path5) => {
|
|
|
1123
1132
|
* @param version - Optional id of the version to get (supports semver)
|
|
1124
1133
|
* @returns Event|Undefined
|
|
1125
1134
|
*/
|
|
1126
|
-
getEvent: getEvent((0,
|
|
1135
|
+
getEvent: getEvent((0, import_node_path16.join)(path5)),
|
|
1127
1136
|
/**
|
|
1128
1137
|
* Returns all events from EventCatalog
|
|
1129
1138
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1130
1139
|
* @returns Event[]|Undefined
|
|
1131
1140
|
*/
|
|
1132
|
-
getEvents: getEvents((0,
|
|
1141
|
+
getEvents: getEvents((0, import_node_path16.join)(path5)),
|
|
1133
1142
|
/**
|
|
1134
1143
|
* Adds an event to EventCatalog
|
|
1135
1144
|
*
|
|
@@ -1137,7 +1146,7 @@ var index_default = (path5) => {
|
|
|
1137
1146
|
* @param options - Optional options to write the event
|
|
1138
1147
|
*
|
|
1139
1148
|
*/
|
|
1140
|
-
writeEvent: writeEvent((0,
|
|
1149
|
+
writeEvent: writeEvent((0, import_node_path16.join)(path5, "events")),
|
|
1141
1150
|
/**
|
|
1142
1151
|
* Adds an event to a service in EventCatalog
|
|
1143
1152
|
*
|
|
@@ -1146,26 +1155,26 @@ var index_default = (path5) => {
|
|
|
1146
1155
|
* @param options - Optional options to write the event
|
|
1147
1156
|
*
|
|
1148
1157
|
*/
|
|
1149
|
-
writeEventToService: writeEventToService((0,
|
|
1158
|
+
writeEventToService: writeEventToService((0, import_node_path16.join)(path5)),
|
|
1150
1159
|
/**
|
|
1151
1160
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1152
1161
|
*
|
|
1153
1162
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
1154
1163
|
*
|
|
1155
1164
|
*/
|
|
1156
|
-
rmEvent: rmEvent((0,
|
|
1165
|
+
rmEvent: rmEvent((0, import_node_path16.join)(path5, "events")),
|
|
1157
1166
|
/**
|
|
1158
1167
|
* Remove an event by an Event id
|
|
1159
1168
|
*
|
|
1160
1169
|
* @param id - The id of the event you want to remove
|
|
1161
1170
|
*
|
|
1162
1171
|
*/
|
|
1163
|
-
rmEventById: rmEventById((0,
|
|
1172
|
+
rmEventById: rmEventById((0, import_node_path16.join)(path5)),
|
|
1164
1173
|
/**
|
|
1165
1174
|
* Moves a given event id to the version directory
|
|
1166
1175
|
* @param directory
|
|
1167
1176
|
*/
|
|
1168
|
-
versionEvent: versionEvent((0,
|
|
1177
|
+
versionEvent: versionEvent((0, import_node_path16.join)(path5)),
|
|
1169
1178
|
/**
|
|
1170
1179
|
* Adds a file to the given event
|
|
1171
1180
|
* @param id - The id of the event to add the file to
|
|
@@ -1173,7 +1182,7 @@ var index_default = (path5) => {
|
|
|
1173
1182
|
* @param version - Optional version of the event to add the file to
|
|
1174
1183
|
* @returns
|
|
1175
1184
|
*/
|
|
1176
|
-
addFileToEvent: addFileToEvent((0,
|
|
1185
|
+
addFileToEvent: addFileToEvent((0, import_node_path16.join)(path5)),
|
|
1177
1186
|
/**
|
|
1178
1187
|
* Adds a schema to the given event
|
|
1179
1188
|
* @param id - The id of the event to add the schema to
|
|
@@ -1181,14 +1190,14 @@ var index_default = (path5) => {
|
|
|
1181
1190
|
* @param version - Optional version of the event to add the schema to
|
|
1182
1191
|
* @returns
|
|
1183
1192
|
*/
|
|
1184
|
-
addSchemaToEvent: addSchemaToEvent((0,
|
|
1193
|
+
addSchemaToEvent: addSchemaToEvent((0, import_node_path16.join)(path5)),
|
|
1185
1194
|
/**
|
|
1186
1195
|
* Check to see if an event version exists
|
|
1187
1196
|
* @param id - The id of the event
|
|
1188
1197
|
* @param version - The version of the event (supports semver)
|
|
1189
1198
|
* @returns
|
|
1190
1199
|
*/
|
|
1191
|
-
eventHasVersion: eventHasVersion((0,
|
|
1200
|
+
eventHasVersion: eventHasVersion((0, import_node_path16.join)(path5)),
|
|
1192
1201
|
/**
|
|
1193
1202
|
* ================================
|
|
1194
1203
|
* Commands
|
|
@@ -1200,13 +1209,13 @@ var index_default = (path5) => {
|
|
|
1200
1209
|
* @param version - Optional id of the version to get (supports semver)
|
|
1201
1210
|
* @returns Command|Undefined
|
|
1202
1211
|
*/
|
|
1203
|
-
getCommand: getCommand((0,
|
|
1212
|
+
getCommand: getCommand((0, import_node_path16.join)(path5)),
|
|
1204
1213
|
/**
|
|
1205
1214
|
* Returns all commands from EventCatalog
|
|
1206
1215
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1207
1216
|
* @returns Command[]|Undefined
|
|
1208
1217
|
*/
|
|
1209
|
-
getCommands: getCommands((0,
|
|
1218
|
+
getCommands: getCommands((0, import_node_path16.join)(path5)),
|
|
1210
1219
|
/**
|
|
1211
1220
|
* Adds an command to EventCatalog
|
|
1212
1221
|
*
|
|
@@ -1214,7 +1223,7 @@ var index_default = (path5) => {
|
|
|
1214
1223
|
* @param options - Optional options to write the command
|
|
1215
1224
|
*
|
|
1216
1225
|
*/
|
|
1217
|
-
writeCommand: writeCommand((0,
|
|
1226
|
+
writeCommand: writeCommand((0, import_node_path16.join)(path5, "commands")),
|
|
1218
1227
|
/**
|
|
1219
1228
|
* Adds a command to a service in EventCatalog
|
|
1220
1229
|
*
|
|
@@ -1223,26 +1232,26 @@ var index_default = (path5) => {
|
|
|
1223
1232
|
* @param options - Optional options to write the command
|
|
1224
1233
|
*
|
|
1225
1234
|
*/
|
|
1226
|
-
writeCommandToService: writeCommandToService((0,
|
|
1235
|
+
writeCommandToService: writeCommandToService((0, import_node_path16.join)(path5)),
|
|
1227
1236
|
/**
|
|
1228
1237
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1229
1238
|
*
|
|
1230
1239
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
1231
1240
|
*
|
|
1232
1241
|
*/
|
|
1233
|
-
rmCommand: rmCommand((0,
|
|
1242
|
+
rmCommand: rmCommand((0, import_node_path16.join)(path5, "commands")),
|
|
1234
1243
|
/**
|
|
1235
1244
|
* Remove an command by an Event id
|
|
1236
1245
|
*
|
|
1237
1246
|
* @param id - The id of the command you want to remove
|
|
1238
1247
|
*
|
|
1239
1248
|
*/
|
|
1240
|
-
rmCommandById: rmCommandById((0,
|
|
1249
|
+
rmCommandById: rmCommandById((0, import_node_path16.join)(path5)),
|
|
1241
1250
|
/**
|
|
1242
1251
|
* Moves a given command id to the version directory
|
|
1243
1252
|
* @param directory
|
|
1244
1253
|
*/
|
|
1245
|
-
versionCommand: versionCommand((0,
|
|
1254
|
+
versionCommand: versionCommand((0, import_node_path16.join)(path5)),
|
|
1246
1255
|
/**
|
|
1247
1256
|
* Adds a file to the given command
|
|
1248
1257
|
* @param id - The id of the command to add the file to
|
|
@@ -1250,7 +1259,7 @@ var index_default = (path5) => {
|
|
|
1250
1259
|
* @param version - Optional version of the command to add the file to
|
|
1251
1260
|
* @returns
|
|
1252
1261
|
*/
|
|
1253
|
-
addFileToCommand: addFileToCommand((0,
|
|
1262
|
+
addFileToCommand: addFileToCommand((0, import_node_path16.join)(path5)),
|
|
1254
1263
|
/**
|
|
1255
1264
|
* Adds a schema to the given command
|
|
1256
1265
|
* @param id - The id of the command to add the schema to
|
|
@@ -1258,14 +1267,14 @@ var index_default = (path5) => {
|
|
|
1258
1267
|
* @param version - Optional version of the command to add the schema to
|
|
1259
1268
|
* @returns
|
|
1260
1269
|
*/
|
|
1261
|
-
addSchemaToCommand: addSchemaToCommand((0,
|
|
1270
|
+
addSchemaToCommand: addSchemaToCommand((0, import_node_path16.join)(path5)),
|
|
1262
1271
|
/**
|
|
1263
1272
|
* Check to see if a command version exists
|
|
1264
1273
|
* @param id - The id of the command
|
|
1265
1274
|
* @param version - The version of the command (supports semver)
|
|
1266
1275
|
* @returns
|
|
1267
1276
|
*/
|
|
1268
|
-
commandHasVersion: commandHasVersion((0,
|
|
1277
|
+
commandHasVersion: commandHasVersion((0, import_node_path16.join)(path5)),
|
|
1269
1278
|
/**
|
|
1270
1279
|
* ================================
|
|
1271
1280
|
* Queries
|
|
@@ -1277,13 +1286,13 @@ var index_default = (path5) => {
|
|
|
1277
1286
|
* @param version - Optional id of the version to get (supports semver)
|
|
1278
1287
|
* @returns Query|Undefined
|
|
1279
1288
|
*/
|
|
1280
|
-
getQuery: getQuery((0,
|
|
1289
|
+
getQuery: getQuery((0, import_node_path16.join)(path5)),
|
|
1281
1290
|
/**
|
|
1282
1291
|
* Returns all queries from EventCatalog
|
|
1283
1292
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1284
1293
|
* @returns Query[]|Undefined
|
|
1285
1294
|
*/
|
|
1286
|
-
getQueries: getQueries((0,
|
|
1295
|
+
getQueries: getQueries((0, import_node_path16.join)(path5)),
|
|
1287
1296
|
/**
|
|
1288
1297
|
* Adds a query to EventCatalog
|
|
1289
1298
|
*
|
|
@@ -1291,7 +1300,7 @@ var index_default = (path5) => {
|
|
|
1291
1300
|
* @param options - Optional options to write the event
|
|
1292
1301
|
*
|
|
1293
1302
|
*/
|
|
1294
|
-
writeQuery: writeQuery((0,
|
|
1303
|
+
writeQuery: writeQuery((0, import_node_path16.join)(path5, "queries")),
|
|
1295
1304
|
/**
|
|
1296
1305
|
* Adds a query to a service in EventCatalog
|
|
1297
1306
|
*
|
|
@@ -1300,26 +1309,26 @@ var index_default = (path5) => {
|
|
|
1300
1309
|
* @param options - Optional options to write the query
|
|
1301
1310
|
*
|
|
1302
1311
|
*/
|
|
1303
|
-
writeQueryToService: writeQueryToService((0,
|
|
1312
|
+
writeQueryToService: writeQueryToService((0, import_node_path16.join)(path5)),
|
|
1304
1313
|
/**
|
|
1305
1314
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1306
1315
|
*
|
|
1307
1316
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
1308
1317
|
*
|
|
1309
1318
|
*/
|
|
1310
|
-
rmQuery: rmQuery((0,
|
|
1319
|
+
rmQuery: rmQuery((0, import_node_path16.join)(path5, "queries")),
|
|
1311
1320
|
/**
|
|
1312
1321
|
* Remove a query by a Query id
|
|
1313
1322
|
*
|
|
1314
1323
|
* @param id - The id of the query you want to remove
|
|
1315
1324
|
*
|
|
1316
1325
|
*/
|
|
1317
|
-
rmQueryById: rmQueryById((0,
|
|
1326
|
+
rmQueryById: rmQueryById((0, import_node_path16.join)(path5)),
|
|
1318
1327
|
/**
|
|
1319
1328
|
* Moves a given query id to the version directory
|
|
1320
1329
|
* @param directory
|
|
1321
1330
|
*/
|
|
1322
|
-
versionQuery: versionQuery((0,
|
|
1331
|
+
versionQuery: versionQuery((0, import_node_path16.join)(path5)),
|
|
1323
1332
|
/**
|
|
1324
1333
|
* Adds a file to the given query
|
|
1325
1334
|
* @param id - The id of the query to add the file to
|
|
@@ -1327,7 +1336,7 @@ var index_default = (path5) => {
|
|
|
1327
1336
|
* @param version - Optional version of the query to add the file to
|
|
1328
1337
|
* @returns
|
|
1329
1338
|
*/
|
|
1330
|
-
addFileToQuery: addFileToQuery((0,
|
|
1339
|
+
addFileToQuery: addFileToQuery((0, import_node_path16.join)(path5)),
|
|
1331
1340
|
/**
|
|
1332
1341
|
* Adds a schema to the given query
|
|
1333
1342
|
* @param id - The id of the query to add the schema to
|
|
@@ -1335,14 +1344,14 @@ var index_default = (path5) => {
|
|
|
1335
1344
|
* @param version - Optional version of the query to add the schema to
|
|
1336
1345
|
* @returns
|
|
1337
1346
|
*/
|
|
1338
|
-
addSchemaToQuery: addSchemaToQuery((0,
|
|
1347
|
+
addSchemaToQuery: addSchemaToQuery((0, import_node_path16.join)(path5)),
|
|
1339
1348
|
/**
|
|
1340
1349
|
* Check to see if an query version exists
|
|
1341
1350
|
* @param id - The id of the query
|
|
1342
1351
|
* @param version - The version of the query (supports semver)
|
|
1343
1352
|
* @returns
|
|
1344
1353
|
*/
|
|
1345
|
-
queryHasVersion: queryHasVersion((0,
|
|
1354
|
+
queryHasVersion: queryHasVersion((0, import_node_path16.join)(path5)),
|
|
1346
1355
|
/**
|
|
1347
1356
|
* ================================
|
|
1348
1357
|
* Channels
|
|
@@ -1354,13 +1363,13 @@ var index_default = (path5) => {
|
|
|
1354
1363
|
* @param version - Optional id of the version to get (supports semver)
|
|
1355
1364
|
* @returns Channel|Undefined
|
|
1356
1365
|
*/
|
|
1357
|
-
getChannel: getChannel((0,
|
|
1366
|
+
getChannel: getChannel((0, import_node_path16.join)(path5)),
|
|
1358
1367
|
/**
|
|
1359
1368
|
* Returns all channels from EventCatalog
|
|
1360
1369
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1361
1370
|
* @returns Channel[]|Undefined
|
|
1362
1371
|
*/
|
|
1363
|
-
getChannels: getChannels((0,
|
|
1372
|
+
getChannels: getChannels((0, import_node_path16.join)(path5)),
|
|
1364
1373
|
/**
|
|
1365
1374
|
* Adds an channel to EventCatalog
|
|
1366
1375
|
*
|
|
@@ -1368,33 +1377,33 @@ var index_default = (path5) => {
|
|
|
1368
1377
|
* @param options - Optional options to write the channel
|
|
1369
1378
|
*
|
|
1370
1379
|
*/
|
|
1371
|
-
writeChannel: writeChannel((0,
|
|
1380
|
+
writeChannel: writeChannel((0, import_node_path16.join)(path5, "channels")),
|
|
1372
1381
|
/**
|
|
1373
1382
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1374
1383
|
*
|
|
1375
1384
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
1376
1385
|
*
|
|
1377
1386
|
*/
|
|
1378
|
-
rmChannel: rmChannel((0,
|
|
1387
|
+
rmChannel: rmChannel((0, import_node_path16.join)(path5, "channels")),
|
|
1379
1388
|
/**
|
|
1380
1389
|
* Remove an channel by an Event id
|
|
1381
1390
|
*
|
|
1382
1391
|
* @param id - The id of the channel you want to remove
|
|
1383
1392
|
*
|
|
1384
1393
|
*/
|
|
1385
|
-
rmChannelById: rmChannelById((0,
|
|
1394
|
+
rmChannelById: rmChannelById((0, import_node_path16.join)(path5)),
|
|
1386
1395
|
/**
|
|
1387
1396
|
* Moves a given channel id to the version directory
|
|
1388
1397
|
* @param directory
|
|
1389
1398
|
*/
|
|
1390
|
-
versionChannel: versionChannel((0,
|
|
1399
|
+
versionChannel: versionChannel((0, import_node_path16.join)(path5)),
|
|
1391
1400
|
/**
|
|
1392
1401
|
* Check to see if a channel version exists
|
|
1393
1402
|
* @param id - The id of the channel
|
|
1394
1403
|
* @param version - The version of the channel (supports semver)
|
|
1395
1404
|
* @returns
|
|
1396
1405
|
*/
|
|
1397
|
-
channelHasVersion: channelHasVersion((0,
|
|
1406
|
+
channelHasVersion: channelHasVersion((0, import_node_path16.join)(path5)),
|
|
1398
1407
|
/**
|
|
1399
1408
|
* Add a channel to an event
|
|
1400
1409
|
*
|
|
@@ -1411,7 +1420,7 @@ var index_default = (path5) => {
|
|
|
1411
1420
|
*
|
|
1412
1421
|
* ```
|
|
1413
1422
|
*/
|
|
1414
|
-
addEventToChannel: addMessageToChannel((0,
|
|
1423
|
+
addEventToChannel: addMessageToChannel((0, import_node_path16.join)(path5), "events"),
|
|
1415
1424
|
/**
|
|
1416
1425
|
* Add a channel to an command
|
|
1417
1426
|
*
|
|
@@ -1428,7 +1437,7 @@ var index_default = (path5) => {
|
|
|
1428
1437
|
*
|
|
1429
1438
|
* ```
|
|
1430
1439
|
*/
|
|
1431
|
-
addCommandToChannel: addMessageToChannel((0,
|
|
1440
|
+
addCommandToChannel: addMessageToChannel((0, import_node_path16.join)(path5), "commands"),
|
|
1432
1441
|
/**
|
|
1433
1442
|
* Add a channel to an query
|
|
1434
1443
|
*
|
|
@@ -1445,7 +1454,7 @@ var index_default = (path5) => {
|
|
|
1445
1454
|
*
|
|
1446
1455
|
* ```
|
|
1447
1456
|
*/
|
|
1448
|
-
addQueryToChannel: addMessageToChannel((0,
|
|
1457
|
+
addQueryToChannel: addMessageToChannel((0, import_node_path16.join)(path5), "queries"),
|
|
1449
1458
|
/**
|
|
1450
1459
|
* ================================
|
|
1451
1460
|
* SERVICES
|
|
@@ -1458,14 +1467,14 @@ var index_default = (path5) => {
|
|
|
1458
1467
|
* @param options - Optional options to write the event
|
|
1459
1468
|
*
|
|
1460
1469
|
*/
|
|
1461
|
-
writeService: writeService((0,
|
|
1470
|
+
writeService: writeService((0, import_node_path16.join)(path5, "services")),
|
|
1462
1471
|
/**
|
|
1463
1472
|
* Adds a versioned service to EventCatalog
|
|
1464
1473
|
*
|
|
1465
1474
|
* @param service - The service to write
|
|
1466
1475
|
*
|
|
1467
1476
|
*/
|
|
1468
|
-
writeVersionedService: writeVersionedService((0,
|
|
1477
|
+
writeVersionedService: writeVersionedService((0, import_node_path16.join)(path5, "services")),
|
|
1469
1478
|
/**
|
|
1470
1479
|
* Adds a service to a domain in EventCatalog
|
|
1471
1480
|
*
|
|
@@ -1474,45 +1483,45 @@ var index_default = (path5) => {
|
|
|
1474
1483
|
* @param options - Optional options to write the event
|
|
1475
1484
|
*
|
|
1476
1485
|
*/
|
|
1477
|
-
writeServiceToDomain: writeServiceToDomain((0,
|
|
1486
|
+
writeServiceToDomain: writeServiceToDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1478
1487
|
/**
|
|
1479
1488
|
* Returns a service from EventCatalog
|
|
1480
1489
|
* @param id - The id of the service to retrieve
|
|
1481
1490
|
* @param version - Optional id of the version to get (supports semver)
|
|
1482
1491
|
* @returns Service|Undefined
|
|
1483
1492
|
*/
|
|
1484
|
-
getService: getService((0,
|
|
1493
|
+
getService: getService((0, import_node_path16.join)(path5)),
|
|
1485
1494
|
/**
|
|
1486
1495
|
* Returns a service from EventCatalog by it's path.
|
|
1487
1496
|
* @param path - The path to the service to retrieve
|
|
1488
1497
|
* @returns Service|Undefined
|
|
1489
1498
|
*/
|
|
1490
|
-
getServiceByPath: getServiceByPath((0,
|
|
1499
|
+
getServiceByPath: getServiceByPath((0, import_node_path16.join)(path5)),
|
|
1491
1500
|
/**
|
|
1492
1501
|
* Returns all services from EventCatalog
|
|
1493
1502
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1494
1503
|
* @returns Service[]|Undefined
|
|
1495
1504
|
*/
|
|
1496
|
-
getServices: getServices((0,
|
|
1505
|
+
getServices: getServices((0, import_node_path16.join)(path5)),
|
|
1497
1506
|
/**
|
|
1498
1507
|
* Moves a given service id to the version directory
|
|
1499
1508
|
* @param directory
|
|
1500
1509
|
*/
|
|
1501
|
-
versionService: versionService((0,
|
|
1510
|
+
versionService: versionService((0, import_node_path16.join)(path5)),
|
|
1502
1511
|
/**
|
|
1503
1512
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1504
1513
|
*
|
|
1505
1514
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
1506
1515
|
*
|
|
1507
1516
|
*/
|
|
1508
|
-
rmService: rmService((0,
|
|
1517
|
+
rmService: rmService((0, import_node_path16.join)(path5, "services")),
|
|
1509
1518
|
/**
|
|
1510
1519
|
* Remove an service by an service id
|
|
1511
1520
|
*
|
|
1512
1521
|
* @param id - The id of the service you want to remove
|
|
1513
1522
|
*
|
|
1514
1523
|
*/
|
|
1515
|
-
rmServiceById: rmServiceById((0,
|
|
1524
|
+
rmServiceById: rmServiceById((0, import_node_path16.join)(path5)),
|
|
1516
1525
|
/**
|
|
1517
1526
|
* Adds a file to the given service
|
|
1518
1527
|
* @param id - The id of the service to add the file to
|
|
@@ -1520,21 +1529,21 @@ var index_default = (path5) => {
|
|
|
1520
1529
|
* @param version - Optional version of the service to add the file to
|
|
1521
1530
|
* @returns
|
|
1522
1531
|
*/
|
|
1523
|
-
addFileToService: addFileToService((0,
|
|
1532
|
+
addFileToService: addFileToService((0, import_node_path16.join)(path5)),
|
|
1524
1533
|
/**
|
|
1525
1534
|
* Returns the specifications for a given service
|
|
1526
1535
|
* @param id - The id of the service to retrieve the specifications for
|
|
1527
1536
|
* @param version - Optional version of the service
|
|
1528
1537
|
* @returns
|
|
1529
1538
|
*/
|
|
1530
|
-
getSpecificationFilesForService: getSpecificationFilesForService((0,
|
|
1539
|
+
getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path16.join)(path5)),
|
|
1531
1540
|
/**
|
|
1532
1541
|
* Check to see if a service version exists
|
|
1533
1542
|
* @param id - The id of the service
|
|
1534
1543
|
* @param version - The version of the service (supports semver)
|
|
1535
1544
|
* @returns
|
|
1536
1545
|
*/
|
|
1537
|
-
serviceHasVersion: serviceHasVersion((0,
|
|
1546
|
+
serviceHasVersion: serviceHasVersion((0, import_node_path16.join)(path5)),
|
|
1538
1547
|
/**
|
|
1539
1548
|
* Add an event to a service by it's id.
|
|
1540
1549
|
*
|
|
@@ -1554,7 +1563,7 @@ var index_default = (path5) => {
|
|
|
1554
1563
|
*
|
|
1555
1564
|
* ```
|
|
1556
1565
|
*/
|
|
1557
|
-
addEventToService: addMessageToService((0,
|
|
1566
|
+
addEventToService: addMessageToService((0, import_node_path16.join)(path5)),
|
|
1558
1567
|
/**
|
|
1559
1568
|
* Add a command to a service by it's id.
|
|
1560
1569
|
*
|
|
@@ -1574,7 +1583,7 @@ var index_default = (path5) => {
|
|
|
1574
1583
|
*
|
|
1575
1584
|
* ```
|
|
1576
1585
|
*/
|
|
1577
|
-
addCommandToService: addMessageToService((0,
|
|
1586
|
+
addCommandToService: addMessageToService((0, import_node_path16.join)(path5)),
|
|
1578
1587
|
/**
|
|
1579
1588
|
* Add a query to a service by it's id.
|
|
1580
1589
|
*
|
|
@@ -1594,7 +1603,7 @@ var index_default = (path5) => {
|
|
|
1594
1603
|
*
|
|
1595
1604
|
* ```
|
|
1596
1605
|
*/
|
|
1597
|
-
addQueryToService: addMessageToService((0,
|
|
1606
|
+
addQueryToService: addMessageToService((0, import_node_path16.join)(path5)),
|
|
1598
1607
|
/**
|
|
1599
1608
|
* Add an entity to a service by its id.
|
|
1600
1609
|
*
|
|
@@ -1612,7 +1621,7 @@ var index_default = (path5) => {
|
|
|
1612
1621
|
*
|
|
1613
1622
|
* ```
|
|
1614
1623
|
*/
|
|
1615
|
-
addEntityToService: addEntityToService((0,
|
|
1624
|
+
addEntityToService: addEntityToService((0, import_node_path16.join)(path5)),
|
|
1616
1625
|
/**
|
|
1617
1626
|
* Check to see if a service exists by it's path.
|
|
1618
1627
|
*
|
|
@@ -1629,13 +1638,13 @@ var index_default = (path5) => {
|
|
|
1629
1638
|
* @param path - The path to the service to check
|
|
1630
1639
|
* @returns boolean
|
|
1631
1640
|
*/
|
|
1632
|
-
isService: isService((0,
|
|
1641
|
+
isService: isService((0, import_node_path16.join)(path5)),
|
|
1633
1642
|
/**
|
|
1634
1643
|
* Converts a file to a service.
|
|
1635
1644
|
* @param file - The file to convert to a service.
|
|
1636
1645
|
* @returns The service.
|
|
1637
1646
|
*/
|
|
1638
|
-
toService: toService((0,
|
|
1647
|
+
toService: toService((0, import_node_path16.join)(path5)),
|
|
1639
1648
|
/**
|
|
1640
1649
|
* ================================
|
|
1641
1650
|
* Domains
|
|
@@ -1648,39 +1657,39 @@ var index_default = (path5) => {
|
|
|
1648
1657
|
* @param options - Optional options to write the event
|
|
1649
1658
|
*
|
|
1650
1659
|
*/
|
|
1651
|
-
writeDomain: writeDomain((0,
|
|
1660
|
+
writeDomain: writeDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1652
1661
|
/**
|
|
1653
1662
|
* Returns a domain from EventCatalog
|
|
1654
1663
|
* @param id - The id of the domain to retrieve
|
|
1655
1664
|
* @param version - Optional id of the version to get (supports semver)
|
|
1656
1665
|
* @returns Domain|Undefined
|
|
1657
1666
|
*/
|
|
1658
|
-
getDomain: getDomain((0,
|
|
1667
|
+
getDomain: getDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1659
1668
|
/**
|
|
1660
1669
|
* Returns all domains from EventCatalog
|
|
1661
1670
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1662
1671
|
* @returns Domain[]|Undefined
|
|
1663
1672
|
*/
|
|
1664
|
-
getDomains: getDomains((0,
|
|
1673
|
+
getDomains: getDomains((0, import_node_path16.join)(path5)),
|
|
1665
1674
|
/**
|
|
1666
1675
|
* Moves a given domain id to the version directory
|
|
1667
1676
|
* @param directory
|
|
1668
1677
|
*/
|
|
1669
|
-
versionDomain: versionDomain((0,
|
|
1678
|
+
versionDomain: versionDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1670
1679
|
/**
|
|
1671
1680
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1672
1681
|
*
|
|
1673
1682
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
1674
1683
|
*
|
|
1675
1684
|
*/
|
|
1676
|
-
rmDomain: rmDomain((0,
|
|
1685
|
+
rmDomain: rmDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1677
1686
|
/**
|
|
1678
1687
|
* Remove an service by an domain id
|
|
1679
1688
|
*
|
|
1680
1689
|
* @param id - The id of the domain you want to remove
|
|
1681
1690
|
*
|
|
1682
1691
|
*/
|
|
1683
|
-
rmDomainById: rmDomainById((0,
|
|
1692
|
+
rmDomainById: rmDomainById((0, import_node_path16.join)(path5, "domains")),
|
|
1684
1693
|
/**
|
|
1685
1694
|
* Adds a file to the given domain
|
|
1686
1695
|
* @param id - The id of the domain to add the file to
|
|
@@ -1688,28 +1697,28 @@ var index_default = (path5) => {
|
|
|
1688
1697
|
* @param version - Optional version of the domain to add the file to
|
|
1689
1698
|
* @returns
|
|
1690
1699
|
*/
|
|
1691
|
-
addFileToDomain: addFileToDomain((0,
|
|
1700
|
+
addFileToDomain: addFileToDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1692
1701
|
/**
|
|
1693
1702
|
* Adds an ubiquitous language dictionary to a domain
|
|
1694
1703
|
* @param id - The id of the domain to add the ubiquitous language to
|
|
1695
1704
|
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
1696
1705
|
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
1697
1706
|
*/
|
|
1698
|
-
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0,
|
|
1707
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1699
1708
|
/**
|
|
1700
1709
|
* Get the ubiquitous language dictionary from a domain
|
|
1701
1710
|
* @param id - The id of the domain to get the ubiquitous language from
|
|
1702
1711
|
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
1703
1712
|
* @returns
|
|
1704
1713
|
*/
|
|
1705
|
-
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0,
|
|
1714
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1706
1715
|
/**
|
|
1707
1716
|
* Check to see if a domain version exists
|
|
1708
1717
|
* @param id - The id of the domain
|
|
1709
1718
|
* @param version - The version of the domain (supports semver)
|
|
1710
1719
|
* @returns
|
|
1711
1720
|
*/
|
|
1712
|
-
domainHasVersion: domainHasVersion((0,
|
|
1721
|
+
domainHasVersion: domainHasVersion((0, import_node_path16.join)(path5)),
|
|
1713
1722
|
/**
|
|
1714
1723
|
* Adds a given service to a domain
|
|
1715
1724
|
* @param id - The id of the domain
|
|
@@ -1717,7 +1726,7 @@ var index_default = (path5) => {
|
|
|
1717
1726
|
* @param version - (Optional) The version of the domain to add the service to
|
|
1718
1727
|
* @returns
|
|
1719
1728
|
*/
|
|
1720
|
-
addServiceToDomain: addServiceToDomain((0,
|
|
1729
|
+
addServiceToDomain: addServiceToDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1721
1730
|
/**
|
|
1722
1731
|
* Adds a given subdomain to a domain
|
|
1723
1732
|
* @param id - The id of the domain
|
|
@@ -1725,7 +1734,7 @@ var index_default = (path5) => {
|
|
|
1725
1734
|
* @param version - (Optional) The version of the domain to add the subdomain to
|
|
1726
1735
|
* @returns
|
|
1727
1736
|
*/
|
|
1728
|
-
addSubDomainToDomain: addSubDomainToDomain((0,
|
|
1737
|
+
addSubDomainToDomain: addSubDomainToDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1729
1738
|
/**
|
|
1730
1739
|
* Adds an entity to a domain
|
|
1731
1740
|
* @param id - The id of the domain
|
|
@@ -1733,7 +1742,7 @@ var index_default = (path5) => {
|
|
|
1733
1742
|
* @param version - (Optional) The version of the domain to add the entity to
|
|
1734
1743
|
* @returns
|
|
1735
1744
|
*/
|
|
1736
|
-
addEntityToDomain: addEntityToDomain((0,
|
|
1745
|
+
addEntityToDomain: addEntityToDomain((0, import_node_path16.join)(path5, "domains")),
|
|
1737
1746
|
/**
|
|
1738
1747
|
* ================================
|
|
1739
1748
|
* Teams
|
|
@@ -1746,25 +1755,25 @@ var index_default = (path5) => {
|
|
|
1746
1755
|
* @param options - Optional options to write the team
|
|
1747
1756
|
*
|
|
1748
1757
|
*/
|
|
1749
|
-
writeTeam: writeTeam((0,
|
|
1758
|
+
writeTeam: writeTeam((0, import_node_path16.join)(path5, "teams")),
|
|
1750
1759
|
/**
|
|
1751
1760
|
* Returns a team from EventCatalog
|
|
1752
1761
|
* @param id - The id of the team to retrieve
|
|
1753
1762
|
* @returns Team|Undefined
|
|
1754
1763
|
*/
|
|
1755
|
-
getTeam: getTeam((0,
|
|
1764
|
+
getTeam: getTeam((0, import_node_path16.join)(path5, "teams")),
|
|
1756
1765
|
/**
|
|
1757
1766
|
* Returns all teams from EventCatalog
|
|
1758
1767
|
* @returns Team[]|Undefined
|
|
1759
1768
|
*/
|
|
1760
|
-
getTeams: getTeams((0,
|
|
1769
|
+
getTeams: getTeams((0, import_node_path16.join)(path5, "teams")),
|
|
1761
1770
|
/**
|
|
1762
1771
|
* Remove a team by the team id
|
|
1763
1772
|
*
|
|
1764
1773
|
* @param id - The id of the team you want to remove
|
|
1765
1774
|
*
|
|
1766
1775
|
*/
|
|
1767
|
-
rmTeamById: rmTeamById((0,
|
|
1776
|
+
rmTeamById: rmTeamById((0, import_node_path16.join)(path5, "teams")),
|
|
1768
1777
|
/**
|
|
1769
1778
|
* ================================
|
|
1770
1779
|
* Users
|
|
@@ -1777,25 +1786,25 @@ var index_default = (path5) => {
|
|
|
1777
1786
|
* @param options - Optional options to write the user
|
|
1778
1787
|
*
|
|
1779
1788
|
*/
|
|
1780
|
-
writeUser: writeUser((0,
|
|
1789
|
+
writeUser: writeUser((0, import_node_path16.join)(path5, "users")),
|
|
1781
1790
|
/**
|
|
1782
1791
|
* Returns a user from EventCatalog
|
|
1783
1792
|
* @param id - The id of the user to retrieve
|
|
1784
1793
|
* @returns User|Undefined
|
|
1785
1794
|
*/
|
|
1786
|
-
getUser: getUser((0,
|
|
1795
|
+
getUser: getUser((0, import_node_path16.join)(path5, "users")),
|
|
1787
1796
|
/**
|
|
1788
1797
|
* Returns all user from EventCatalog
|
|
1789
1798
|
* @returns User[]|Undefined
|
|
1790
1799
|
*/
|
|
1791
|
-
getUsers: getUsers((0,
|
|
1800
|
+
getUsers: getUsers((0, import_node_path16.join)(path5)),
|
|
1792
1801
|
/**
|
|
1793
1802
|
* Remove a user by the user id
|
|
1794
1803
|
*
|
|
1795
1804
|
* @param id - The id of the user you want to remove
|
|
1796
1805
|
*
|
|
1797
1806
|
*/
|
|
1798
|
-
rmUserById: rmUserById((0,
|
|
1807
|
+
rmUserById: rmUserById((0, import_node_path16.join)(path5, "users")),
|
|
1799
1808
|
/**
|
|
1800
1809
|
* ================================
|
|
1801
1810
|
* Custom Docs
|
|
@@ -1806,32 +1815,32 @@ var index_default = (path5) => {
|
|
|
1806
1815
|
* @param path - The path to the custom doc to retrieve
|
|
1807
1816
|
* @returns CustomDoc|Undefined
|
|
1808
1817
|
*/
|
|
1809
|
-
getCustomDoc: getCustomDoc((0,
|
|
1818
|
+
getCustomDoc: getCustomDoc((0, import_node_path16.join)(path5, "docs")),
|
|
1810
1819
|
/**
|
|
1811
1820
|
* Returns all custom docs from EventCatalog
|
|
1812
1821
|
* @param options - Optional options to get custom docs from a specific path
|
|
1813
1822
|
* @returns CustomDoc[]|Undefined
|
|
1814
1823
|
*/
|
|
1815
|
-
getCustomDocs: getCustomDocs((0,
|
|
1824
|
+
getCustomDocs: getCustomDocs((0, import_node_path16.join)(path5, "docs")),
|
|
1816
1825
|
/**
|
|
1817
1826
|
* Writes a custom doc to EventCatalog
|
|
1818
1827
|
* @param customDoc - The custom doc to write
|
|
1819
1828
|
* @param options - Optional options to write the custom doc
|
|
1820
1829
|
*
|
|
1821
1830
|
*/
|
|
1822
|
-
writeCustomDoc: writeCustomDoc((0,
|
|
1831
|
+
writeCustomDoc: writeCustomDoc((0, import_node_path16.join)(path5, "docs")),
|
|
1823
1832
|
/**
|
|
1824
1833
|
* Removes a custom doc from EventCatalog
|
|
1825
1834
|
* @param path - The path to the custom doc to remove
|
|
1826
1835
|
*
|
|
1827
1836
|
*/
|
|
1828
|
-
rmCustomDoc: rmCustomDoc((0,
|
|
1837
|
+
rmCustomDoc: rmCustomDoc((0, import_node_path16.join)(path5, "docs")),
|
|
1829
1838
|
/**
|
|
1830
1839
|
* Dumps the catalog to a JSON file.
|
|
1831
1840
|
* @param directory - The directory to dump the catalog to
|
|
1832
1841
|
* @returns A JSON file with the catalog
|
|
1833
1842
|
*/
|
|
1834
|
-
dumpCatalog: dumpCatalog((0,
|
|
1843
|
+
dumpCatalog: dumpCatalog((0, import_node_path16.join)(path5)),
|
|
1835
1844
|
/**
|
|
1836
1845
|
* Returns the event catalog configuration file.
|
|
1837
1846
|
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
@@ -1839,7 +1848,7 @@ var index_default = (path5) => {
|
|
|
1839
1848
|
* @param directory - The directory of the catalog.
|
|
1840
1849
|
* @returns A JSON object with the configuration for the event catalog.
|
|
1841
1850
|
*/
|
|
1842
|
-
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0,
|
|
1851
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0, import_node_path16.join)(path5)),
|
|
1843
1852
|
/**
|
|
1844
1853
|
* ================================
|
|
1845
1854
|
* Resources Utils
|
|
@@ -1860,33 +1869,33 @@ var index_default = (path5) => {
|
|
|
1860
1869
|
* @param path - The path to the message to retrieve
|
|
1861
1870
|
* @returns Message|Undefined
|
|
1862
1871
|
*/
|
|
1863
|
-
getMessageBySchemaPath: getMessageBySchemaPath((0,
|
|
1872
|
+
getMessageBySchemaPath: getMessageBySchemaPath((0, import_node_path16.join)(path5)),
|
|
1864
1873
|
/**
|
|
1865
1874
|
* Returns the producers and consumers (services) for a given message
|
|
1866
1875
|
* @param id - The id of the message to get the producers and consumers for
|
|
1867
1876
|
* @param version - Optional version of the message
|
|
1868
1877
|
* @returns { producers: Service[], consumers: Service[] }
|
|
1869
1878
|
*/
|
|
1870
|
-
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage((0,
|
|
1879
|
+
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage((0, import_node_path16.join)(path5)),
|
|
1871
1880
|
/**
|
|
1872
1881
|
* Returns the consumers of a given schema path
|
|
1873
1882
|
* @param path - The path to the schema to get the consumers for
|
|
1874
1883
|
* @returns Service[]
|
|
1875
1884
|
*/
|
|
1876
|
-
getConsumersOfSchema: getConsumersOfSchema((0,
|
|
1885
|
+
getConsumersOfSchema: getConsumersOfSchema((0, import_node_path16.join)(path5)),
|
|
1877
1886
|
/**
|
|
1878
1887
|
* Returns the producers of a given schema path
|
|
1879
1888
|
* @param path - The path to the schema to get the producers for
|
|
1880
1889
|
* @returns Service[]
|
|
1881
1890
|
*/
|
|
1882
|
-
getProducersOfSchema: getProducersOfSchema((0,
|
|
1891
|
+
getProducersOfSchema: getProducersOfSchema((0, import_node_path16.join)(path5)),
|
|
1883
1892
|
/**
|
|
1884
1893
|
* Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
|
|
1885
1894
|
* @param id - The id of the resource to get the owners for
|
|
1886
1895
|
* @param version - Optional version of the resource
|
|
1887
1896
|
* @returns { owners: User[] }
|
|
1888
1897
|
*/
|
|
1889
|
-
getOwnersForResource: getOwnersForResource((0,
|
|
1898
|
+
getOwnersForResource: getOwnersForResource((0, import_node_path16.join)(path5)),
|
|
1890
1899
|
/**
|
|
1891
1900
|
* ================================
|
|
1892
1901
|
* Entities
|
|
@@ -1898,13 +1907,13 @@ var index_default = (path5) => {
|
|
|
1898
1907
|
* @param version - Optional id of the version to get (supports semver)
|
|
1899
1908
|
* @returns Entity|Undefined
|
|
1900
1909
|
*/
|
|
1901
|
-
getEntity: getEntity((0,
|
|
1910
|
+
getEntity: getEntity((0, import_node_path16.join)(path5)),
|
|
1902
1911
|
/**
|
|
1903
1912
|
* Returns all entities from EventCatalog
|
|
1904
1913
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1905
1914
|
* @returns Entity[]|Undefined
|
|
1906
1915
|
*/
|
|
1907
|
-
getEntities: getEntities((0,
|
|
1916
|
+
getEntities: getEntities((0, import_node_path16.join)(path5)),
|
|
1908
1917
|
/**
|
|
1909
1918
|
* Adds an entity to EventCatalog
|
|
1910
1919
|
*
|
|
@@ -1912,33 +1921,33 @@ var index_default = (path5) => {
|
|
|
1912
1921
|
* @param options - Optional options to write the entity
|
|
1913
1922
|
*
|
|
1914
1923
|
*/
|
|
1915
|
-
writeEntity: writeEntity((0,
|
|
1924
|
+
writeEntity: writeEntity((0, import_node_path16.join)(path5, "entities")),
|
|
1916
1925
|
/**
|
|
1917
1926
|
* Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1918
1927
|
*
|
|
1919
1928
|
* @param path - The path to your entity, e.g. `/User`
|
|
1920
1929
|
*
|
|
1921
1930
|
*/
|
|
1922
|
-
rmEntity: rmEntity((0,
|
|
1931
|
+
rmEntity: rmEntity((0, import_node_path16.join)(path5, "entities")),
|
|
1923
1932
|
/**
|
|
1924
1933
|
* Remove an entity by an entity id
|
|
1925
1934
|
*
|
|
1926
1935
|
* @param id - The id of the entity you want to remove
|
|
1927
1936
|
*
|
|
1928
1937
|
*/
|
|
1929
|
-
rmEntityById: rmEntityById((0,
|
|
1938
|
+
rmEntityById: rmEntityById((0, import_node_path16.join)(path5)),
|
|
1930
1939
|
/**
|
|
1931
1940
|
* Moves a given entity id to the version directory
|
|
1932
1941
|
* @param id - The id of the entity to version
|
|
1933
1942
|
*/
|
|
1934
|
-
versionEntity: versionEntity((0,
|
|
1943
|
+
versionEntity: versionEntity((0, import_node_path16.join)(path5)),
|
|
1935
1944
|
/**
|
|
1936
1945
|
* Check to see if an entity version exists
|
|
1937
1946
|
* @param id - The id of the entity
|
|
1938
1947
|
* @param version - The version of the entity (supports semver)
|
|
1939
1948
|
* @returns
|
|
1940
1949
|
*/
|
|
1941
|
-
entityHasVersion: entityHasVersion((0,
|
|
1950
|
+
entityHasVersion: entityHasVersion((0, import_node_path16.join)(path5))
|
|
1942
1951
|
};
|
|
1943
1952
|
};
|
|
1944
1953
|
//# sourceMappingURL=index.js.map
|