@eventcatalog/core 0.0.1 → 0.0.2
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/CHANGELOG.md +7 -0
- package/lib/__tests__/services.spec.ts +0 -3
- package/lib/events.ts +2 -2
- package/lib/services.ts +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
1
|
# @eventcatalog/core
|
|
2
|
+
|
|
3
|
+
## 0.0.2
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [`53b27cb`](https://github.com/boyney123/eventcatalog/commit/53b27cb5bb5ab7fa8d526309c6dd50e1f17f3db1) [#39](https://github.com/boyney123/eventcatalog/pull/39) Thanks [@boyney123](https://github.com/boyney123)! - feat: removed ids from services
|
|
@@ -19,7 +19,6 @@ describe('services', () => {
|
|
|
19
19
|
|
|
20
20
|
expect(services).toEqual([
|
|
21
21
|
{
|
|
22
|
-
id: 'Email Platform',
|
|
23
22
|
name: 'Email Platform',
|
|
24
23
|
summary:
|
|
25
24
|
'Internal Email system. Used to send emails to 1000s of customers. Hosted in AWS\n',
|
|
@@ -65,7 +64,6 @@ describe('services', () => {
|
|
|
65
64
|
|
|
66
65
|
expect(services).toEqual([
|
|
67
66
|
{
|
|
68
|
-
id: 'Email Platform',
|
|
69
67
|
name: 'Email Platform',
|
|
70
68
|
summary:
|
|
71
69
|
'Internal Email system. Used to send emails to 1000s of customers. Hosted in AWS\n',
|
|
@@ -105,7 +103,6 @@ describe('services', () => {
|
|
|
105
103
|
const { service, markdown } = await getServiceByName('Email Platform');
|
|
106
104
|
|
|
107
105
|
expect(service).toEqual({
|
|
108
|
-
id: 'Email Platform',
|
|
109
106
|
name: 'Email Platform',
|
|
110
107
|
summary:
|
|
111
108
|
'Internal Email system. Used to send emails to 1000s of customers. Hosted in AWS\n',
|
package/lib/events.ts
CHANGED
|
@@ -206,8 +206,8 @@ export const getAllEventsThatHaveRelationshipWithService = (
|
|
|
206
206
|
): { publishes: Event[]; subscribes: Event[] } => {
|
|
207
207
|
const relationshipsBetweenEvents = events.reduce(
|
|
208
208
|
(data, event) => {
|
|
209
|
-
const serviceSubscribesToEvent = event.consumers.some((id) => id === service.
|
|
210
|
-
const servicePublishesEvent = event.producers.some((id) => id === service.
|
|
209
|
+
const serviceSubscribesToEvent = event.consumers.some((id) => id === service.name);
|
|
210
|
+
const servicePublishesEvent = event.producers.some((id) => id === service.name);
|
|
211
211
|
|
|
212
212
|
return {
|
|
213
213
|
publishes: servicePublishesEvent ? data.publishes.concat(event) : data.publishes,
|
package/lib/services.ts
CHANGED
|
@@ -8,8 +8,8 @@ import { MarkdownFile } from '../types/index';
|
|
|
8
8
|
import { getAllEvents, getAllEventsThatHaveRelationshipWithService } from '@/lib/events';
|
|
9
9
|
|
|
10
10
|
const buildService = (eventFrontMatter: any): Service => {
|
|
11
|
-
const {
|
|
12
|
-
return {
|
|
11
|
+
const { name, summary, owners = [], repository = {}, tags = [] } = eventFrontMatter;
|
|
12
|
+
return { name, summary, owners, repository, tags };
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export const getAllServices = (): Service[] => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eventcatalog/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react-syntax-highlighter": "^15.4.5"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@eventcatalog/types": "0.0.
|
|
40
|
+
"@eventcatalog/types": "0.0.1",
|
|
41
41
|
"@types/react": "^17.0.36",
|
|
42
42
|
"autoprefixer": "^10.4.0",
|
|
43
43
|
"commander": "^8.3.0",
|