@eventcatalog/sdk 2.7.4 → 2.7.6
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/eventcatalog.js +12 -5
- package/dist/eventcatalog.js.map +1 -1
- package/dist/eventcatalog.mjs +12 -5
- package/dist/eventcatalog.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -5
- package/dist/index.mjs.map +1 -1
- package/dist/messages.js.map +1 -1
- package/dist/messages.mjs.map +1 -1
- package/dist/services.js +12 -5
- package/dist/services.js.map +1 -1
- package/dist/services.mjs +12 -5
- package/dist/services.mjs.map +1 -1
- package/dist/types.d.d.mts +18 -2
- package/dist/types.d.d.ts +18 -2
- package/dist/types.d.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Event, Command, Query, Channel, Service, Domain, UbiquitousLanguageDictionary, Team, User, CustomDoc, EventCatalog, Message, Entity } from './types.d.mjs';
|
|
2
|
-
export { Badge, BaseSchema, ChannelPointer, ResourceGroup, ResourcePointer, Specifications, UbiquitousLanguage } from './types.d.mjs';
|
|
2
|
+
export { Badge, BaseSchema, ChannelPointer, ResourceGroup, ResourcePointer, Specification, Specifications, UbiquitousLanguage } from './types.d.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Init the SDK for EventCatalog
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Event, Command, Query, Channel, Service, Domain, UbiquitousLanguageDictionary, Team, User, CustomDoc, EventCatalog, Message, Entity } from './types.d.js';
|
|
2
|
-
export { Badge, BaseSchema, ChannelPointer, ResourceGroup, ResourcePointer, Specifications, UbiquitousLanguage } from './types.d.js';
|
|
2
|
+
export { Badge, BaseSchema, ChannelPointer, ResourceGroup, ResourcePointer, Specification, Specifications, UbiquitousLanguage } from './types.d.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Init the SDK for EventCatalog
|
package/dist/index.js
CHANGED
|
@@ -507,14 +507,21 @@ var getSpecificationFilesForService = (directory) => async (id, version) => {
|
|
|
507
507
|
let specs = [];
|
|
508
508
|
if (service.specifications) {
|
|
509
509
|
const serviceSpecifications = service.specifications;
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
510
|
+
let specificationFiles;
|
|
511
|
+
if (Array.isArray(serviceSpecifications)) {
|
|
512
|
+
specificationFiles = serviceSpecifications.map((spec) => ({ key: spec.type, path: spec.path }));
|
|
513
|
+
} else {
|
|
514
|
+
specificationFiles = Object.keys(serviceSpecifications).map((spec) => ({
|
|
515
|
+
key: spec,
|
|
516
|
+
path: serviceSpecifications[spec]
|
|
517
|
+
}));
|
|
518
|
+
}
|
|
519
|
+
const getSpecs = specificationFiles.map(async ({ key, path: fileName }) => {
|
|
513
520
|
if (!fileName) {
|
|
514
|
-
throw new Error(`Specification file name for ${
|
|
521
|
+
throw new Error(`Specification file name for ${fileName} is undefined`);
|
|
515
522
|
}
|
|
516
523
|
const rawFile = await getFileFromResource(directory, id, { fileName }, version);
|
|
517
|
-
return { key
|
|
524
|
+
return { key, content: rawFile, fileName, path: (0, import_node_path5.join)((0, import_node_path5.dirname)(filePathToService), fileName) };
|
|
518
525
|
});
|
|
519
526
|
specs = await Promise.all(getSpecs);
|
|
520
527
|
}
|