eventmodeler 0.4.3 → 0.4.4

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.
@@ -7,6 +7,13 @@ export interface SearchResult {
7
7
  type: string;
8
8
  id: string;
9
9
  name: string;
10
+ chapterId?: string;
11
+ chapterName?: string;
12
+ sliceId?: string;
13
+ sliceName?: string;
14
+ sliceStatus?: string;
15
+ parentChapterId?: string;
16
+ parentChapterName?: string;
10
17
  }
11
18
  export interface SearchResponse {
12
19
  query: string;
package/dist/index.js CHANGED
@@ -1510,10 +1510,21 @@ EXAMPLES:
1510
1510
  }
1511
1511
  else {
1512
1512
  const esc = (s) => s.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
1513
+ const attr = (name, value) => value ? ` ${name}="${esc(value)}"` : '';
1513
1514
  console.log(`<search-results query="${esc(subcommand)}" count="${response.results.length}">`);
1514
1515
  for (const r of response.results) {
1515
1516
  const tag = r.type === 'readmodel' ? 'read-model' : r.type;
1516
- console.log(` <${tag} name="${esc(r.name)}"/>`);
1517
+ console.log(` <${tag}` +
1518
+ `${attr('id', r.id)}` +
1519
+ `${attr('name', r.name)}` +
1520
+ `${attr('chapter-id', r.chapterId)}` +
1521
+ `${attr('chapter-name', r.chapterName)}` +
1522
+ `${attr('slice-id', r.sliceId)}` +
1523
+ `${attr('slice-name', r.sliceName)}` +
1524
+ `${attr('slice-status', r.sliceStatus)}` +
1525
+ `${attr('parent-chapter-id', r.parentChapterId)}` +
1526
+ `${attr('parent-chapter-name', r.parentChapterName)}` +
1527
+ '/>');
1517
1528
  }
1518
1529
  console.log('</search-results>');
1519
1530
  }
@@ -78,16 +78,6 @@ function applyEvent(model, event) {
78
78
  }
79
79
  break;
80
80
  }
81
- case 'CommandStickyDuplicated':
82
- model.commands.set(d.commandStickyId, {
83
- id: d.commandStickyId,
84
- name: d.name,
85
- fields: d.fields,
86
- position: d.position,
87
- width: d.width,
88
- height: d.height,
89
- });
90
- break;
91
81
  // Event sticky events
92
82
  case 'EventStickyPlaced':
93
83
  model.events.set(d.eventStickyId, {
@@ -449,16 +439,6 @@ function applyEvent(model, event) {
449
439
  }
450
440
  break;
451
441
  }
452
- case 'ProcessorDuplicated':
453
- model.processors.set(d.processorId, {
454
- id: d.processorId,
455
- name: d.name,
456
- fields: d.fields,
457
- position: d.position,
458
- width: d.width,
459
- height: d.height,
460
- });
461
- break;
462
442
  // Slice events
463
443
  case 'SlicePlaced':
464
444
  model.slices.set(d.sliceId, {
@@ -548,16 +528,6 @@ function applyEvent(model, event) {
548
528
  }
549
529
  break;
550
530
  }
551
- case 'SliceDuplicated':
552
- model.slices.set(d.sliceId, {
553
- id: d.sliceId,
554
- name: d.name,
555
- status: d.status,
556
- position: d.position,
557
- size: d.size,
558
- nodeIds: [],
559
- });
560
- break;
561
531
  // Aggregate events
562
532
  case 'AggregatePlaced':
563
533
  model.aggregates.set(d.aggregateId, {
@@ -756,92 +726,6 @@ function applyEvent(model, event) {
756
726
  flow.fieldMappings = [];
757
727
  break;
758
728
  }
759
- // Quick place events - create node and flow atomically
760
- case 'CommandQuickPlacedFromScreen':
761
- model.commands.set(d.commandStickyId, {
762
- id: d.commandStickyId,
763
- name: d.name,
764
- fields: [],
765
- position: d.position,
766
- width: d.width,
767
- height: d.height,
768
- });
769
- model.flows.set(d.flowId, {
770
- id: d.flowId,
771
- flowType: 'ScreenToCommand',
772
- sourceId: d.screenId,
773
- targetId: d.commandStickyId,
774
- fieldMappings: [],
775
- });
776
- break;
777
- case 'EventQuickPlacedFromCommand':
778
- model.events.set(d.eventStickyId, {
779
- id: d.eventStickyId,
780
- name: d.name,
781
- fields: [],
782
- position: d.position,
783
- width: d.width,
784
- height: d.height,
785
- });
786
- model.flows.set(d.flowId, {
787
- id: d.flowId,
788
- flowType: 'CommandToEvent',
789
- sourceId: d.commandStickyId,
790
- targetId: d.eventStickyId,
791
- fieldMappings: [],
792
- });
793
- break;
794
- case 'ReadModelQuickPlacedFromEvent':
795
- model.readModels.set(d.readModelStickyId, {
796
- id: d.readModelStickyId,
797
- name: d.name,
798
- fields: [],
799
- position: d.position,
800
- width: d.width,
801
- height: d.height,
802
- });
803
- model.flows.set(d.flowId, {
804
- id: d.flowId,
805
- flowType: 'EventToReadModel',
806
- sourceId: d.eventStickyId,
807
- targetId: d.readModelStickyId,
808
- fieldMappings: [],
809
- });
810
- break;
811
- case 'ScreenQuickPlacedFromReadModel':
812
- model.screens.set(d.screenId, {
813
- id: d.screenId,
814
- name: d.name,
815
- fields: [],
816
- position: d.position,
817
- width: d.width,
818
- height: d.height,
819
- });
820
- model.flows.set(d.flowId, {
821
- id: d.flowId,
822
- flowType: 'ReadModelToScreen',
823
- sourceId: d.readModelStickyId,
824
- targetId: d.screenId,
825
- fieldMappings: [],
826
- });
827
- break;
828
- case 'CommandQuickPlacedFromProcessor':
829
- model.commands.set(d.commandStickyId, {
830
- id: d.commandStickyId,
831
- name: d.name,
832
- fields: [],
833
- position: d.position,
834
- width: d.width,
835
- height: d.height,
836
- });
837
- model.flows.set(d.flowId, {
838
- id: d.flowId,
839
- flowType: 'ProcessorToCommand',
840
- sourceId: d.processorId,
841
- targetId: d.commandStickyId,
842
- fieldMappings: [],
843
- });
844
- break;
845
729
  // Field propagation events
846
730
  case 'FieldsPropagatedFromCommandToEvent':
847
731
  case 'FieldsPropagatedFromEventToCommand':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eventmodeler",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "CLI tool for interacting with Event Model files - query, update, and export event models from the terminal",
5
5
  "type": "module",
6
6
  "bin": {