@eventcatalog/core 3.2.0 → 3.2.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.
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "3.2.0";
40
+ var version = "3.2.2";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-AA47DJ43.js";
4
- import "../chunk-RWYEP5SD.js";
3
+ } from "../chunk-AETVSFIG.js";
4
+ import "../chunk-34AD2NAO.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "3.2.0";
109
+ var version = "3.2.2";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-VPQCMMRM.js";
4
- import "../chunk-AA47DJ43.js";
5
- import "../chunk-RWYEP5SD.js";
3
+ } from "../chunk-JPKOTGEV.js";
4
+ import "../chunk-AETVSFIG.js";
5
+ import "../chunk-34AD2NAO.js";
6
6
  import "../chunk-UPONRQSN.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "3.2.0";
2
+ var version = "3.2.2";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-L3QRQT7U.js";
3
+ } from "./chunk-7YZYT44Y.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-RWYEP5SD.js";
3
+ } from "./chunk-34AD2NAO.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-RWYEP5SD.js";
3
+ } from "./chunk-34AD2NAO.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-AA47DJ43.js";
3
+ } from "./chunk-AETVSFIG.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "3.2.0";
28
+ var version = "3.2.2";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-RWYEP5SD.js";
3
+ } from "./chunk-34AD2NAO.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -109,7 +109,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
109
109
  var import_picocolors = __toESM(require("picocolors"), 1);
110
110
 
111
111
  // package.json
112
- var version = "3.2.0";
112
+ var version = "3.2.2";
113
113
 
114
114
  // src/constants.ts
115
115
  var VERSION = version;
@@ -6,8 +6,8 @@ import {
6
6
  } from "./chunk-PLNJC7NZ.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-VPQCMMRM.js";
10
- import "./chunk-AA47DJ43.js";
9
+ } from "./chunk-JPKOTGEV.js";
10
+ import "./chunk-AETVSFIG.js";
11
11
  import {
12
12
  runMigrations
13
13
  } from "./chunk-BH3JMNAV.js";
@@ -21,13 +21,13 @@ import {
21
21
  } from "./chunk-5VBIXL6C.js";
22
22
  import {
23
23
  generate
24
- } from "./chunk-GGRXP5WM.js";
24
+ } from "./chunk-6OFLYNWB.js";
25
25
  import {
26
26
  logger
27
- } from "./chunk-L3QRQT7U.js";
27
+ } from "./chunk-7YZYT44Y.js";
28
28
  import {
29
29
  VERSION
30
- } from "./chunk-RWYEP5SD.js";
30
+ } from "./chunk-34AD2NAO.js";
31
31
  import "./chunk-UPONRQSN.js";
32
32
 
33
33
  // src/eventcatalog.ts
package/dist/generate.cjs CHANGED
@@ -73,7 +73,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
73
73
  var import_picocolors = __toESM(require("picocolors"), 1);
74
74
 
75
75
  // package.json
76
- var version = "3.2.0";
76
+ var version = "3.2.2";
77
77
 
78
78
  // src/constants.ts
79
79
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-GGRXP5WM.js";
4
- import "./chunk-L3QRQT7U.js";
5
- import "./chunk-RWYEP5SD.js";
3
+ } from "./chunk-6OFLYNWB.js";
4
+ import "./chunk-7YZYT44Y.js";
5
+ import "./chunk-34AD2NAO.js";
6
6
  import "./chunk-UPONRQSN.js";
7
7
  export {
8
8
  generate
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "3.2.0";
39
+ var version = "3.2.2";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-L3QRQT7U.js";
4
- import "../chunk-RWYEP5SD.js";
3
+ } from "../chunk-7YZYT44Y.js";
4
+ import "../chunk-34AD2NAO.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -0,0 +1,77 @@
1
+ ---
2
+ import Admonition from '@components/MDX/Admonition';
3
+ import { buildUrl, buildUrlWithParams } from '@utils/url-builder';
4
+ import type { CollectionEntry } from 'astro:content';
5
+ import { ExpandIcon } from 'lucide-react';
6
+
7
+ interface Props {
8
+ title?: string;
9
+ description?: string;
10
+ height?: string;
11
+ width?: string;
12
+ url: string;
13
+ }
14
+
15
+ const { title, description, height = '600', width = '100%', url, ...eventCatalogResource } = Astro.props;
16
+
17
+ const resource = eventCatalogResource as CollectionEntry<'services'>;
18
+
19
+ // Validate that the URL is from IcePanel
20
+ const isValidIcePanelUrl = url?.startsWith('https://s.icepanel.io/') || url?.startsWith('https://icepanel.io/');
21
+
22
+ const backUrl = resource.collection
23
+ ? buildUrl(`/docs/${resource.collection}/${resource.data.id}/${resource.data.version}#${title}-icepanel-title`)
24
+ : undefined;
25
+
26
+ const fullScreenParams = {
27
+ url: url,
28
+ title: title,
29
+ back: backUrl,
30
+ };
31
+
32
+ const openFullScreenUrl = buildUrlWithParams(`/icepanel`, fullScreenParams);
33
+ ---
34
+
35
+ {
36
+ !url && (
37
+ <Admonition type="warning">
38
+ <div>
39
+ <span class="block font-bold">{`<IcePanel/>`} failed to load</span>
40
+ <span class="block">Please provide a url to use the IcePanel component.</span>
41
+ </div>
42
+ </Admonition>
43
+ )
44
+ }
45
+
46
+ {
47
+ url && !isValidIcePanelUrl && (
48
+ <Admonition type="warning">
49
+ <div>
50
+ <span class="block font-bold">{`<IcePanel/>`} invalid URL</span>
51
+ <span class="block">Please provide a valid IcePanel URL (e.g., https://s.icepanel.io/...).</span>
52
+ </div>
53
+ </Admonition>
54
+ )
55
+ }
56
+
57
+ {
58
+ url && isValidIcePanelUrl && (
59
+ <div>
60
+ {title && (
61
+ <h3 id={`${title}-icepanel-title`} class="text-3xl font-bold">
62
+ {title}
63
+ </h3>
64
+ )}
65
+ {description && <p class="text-[rgb(var(--ec-page-text-muted))] mb-3">{description}</p>}
66
+ <div class="relative">
67
+ <iframe class="rounded-2xl border-none" src={url} width={width} height={height} title={title || 'IcePanel Diagram'} />
68
+ <a
69
+ href={openFullScreenUrl}
70
+ class="absolute bottom-[15px] right-5 bg-[rgb(var(--ec-card-bg))] border border-[rgb(var(--ec-page-border))] text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-accent-subtle))] px-4 py-2 rounded-md transition-colors"
71
+ >
72
+ <ExpandIcon className="w-5 h-5" />
73
+ </a>
74
+ </div>
75
+ </div>
76
+ )
77
+ }
@@ -25,6 +25,7 @@ import Miro from '@components/MDX/Miro/Miro.astro';
25
25
  import Lucid from '@components/MDX/Lucid/Lucid.astro';
26
26
  import DrawIO from '@components/MDX/DrawIO/DrawIO.astro';
27
27
  import FigJam from '@components/MDX/FigJam/FigJam.astro';
28
+ import IcePanel from '@components/MDX/IcePanel/IcePanel.astro';
28
29
  import Design from '@components/MDX/Design/Design.astro';
29
30
  import MermaidFileLoader from '@components/MDX/MermaidFileLoader/MermaidFileLoader.astro';
30
31
  // Portals: required for server/client components
@@ -65,6 +66,7 @@ const components = (props: any) => {
65
66
  Lucid: (mdxProp: any) => jsx(Lucid, { ...props, ...mdxProp }),
66
67
  DrawIO: (mdxProp: any) => jsx(DrawIO, { ...props, ...mdxProp }),
67
68
  FigJam: (mdxProp: any) => jsx(FigJam, { ...props, ...mdxProp }),
69
+ IcePanel: (mdxProp: any) => jsx(IcePanel, { ...props, ...mdxProp }),
68
70
  MermaidFileLoader: (mdxProp: any) => jsx(MermaidFileLoader, { ...props, ...mdxProp }),
69
71
  };
70
72
  };
@@ -73,31 +73,25 @@ const logList = await Promise.all(logListPromise);
73
73
 
74
74
  const getBadge = () => {
75
75
  if (props.collection === 'services') {
76
- return { backgroundColor: 'pink', textColor: 'pink', content: 'Service', icon: ServerIcon, class: 'text-pink-600' };
76
+ return { badgeType: 'service', content: 'Service', icon: ServerIcon };
77
77
  }
78
78
  if (props.collection === 'events') {
79
- return { backgroundColor: 'orange', textColor: 'orange', content: 'Event', icon: BoltIcon, class: 'text-orange-600' };
79
+ return { badgeType: 'event', content: 'Event', icon: BoltIcon };
80
80
  }
81
81
  if (props.collection === 'commands') {
82
- return { backgroundColor: 'blue', textColor: 'blue', content: 'Command', icon: ChatBubbleLeftIcon, class: 'text-blue-600' };
82
+ return { badgeType: 'command', content: 'Command', icon: ChatBubbleLeftIcon };
83
83
  }
84
84
  if (props.collection === 'queries') {
85
- return { backgroundColor: 'green', textColor: 'green', content: 'Query', icon: MagnifyingGlassIcon, class: 'text-green-600' };
85
+ return { badgeType: 'query', content: 'Query', icon: MagnifyingGlassIcon };
86
86
  }
87
87
  if (props.collection === 'domains') {
88
- return {
89
- backgroundColor: 'yellow',
90
- textColor: 'yellow',
91
- content: 'Domain',
92
- icon: RectangleGroupIcon,
93
- class: 'text-yellow-600',
94
- };
88
+ return { badgeType: 'domain', content: 'Domain', icon: RectangleGroupIcon };
95
89
  }
96
90
  if (props.collection === 'containers') {
97
- return { backgroundColor: 'blue', textColor: 'blue', content: 'Container', icon: DatabaseIcon, class: 'text-blue-600' };
91
+ return { badgeType: 'default', content: 'Container', icon: DatabaseIcon };
98
92
  }
99
93
  if (props.collection === 'flows') {
100
- return { backgroundColor: 'teal', textColor: 'teal', content: 'Flow', icon: QueueListIcon, class: 'text-teal-600' };
94
+ return { badgeType: 'design', content: 'Flow', icon: QueueListIcon };
101
95
  }
102
96
  };
103
97
 
@@ -112,7 +106,7 @@ const badges = [getBadge()];
112
106
  <div>
113
107
  <a
114
108
  href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}`)}
115
- class="text-sm font-medium text-gray-500 hover:text-gray-700"
109
+ class="text-sm font-medium text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))]"
116
110
  >
117
111
  {props.data.name}
118
112
  </a>
@@ -120,12 +114,17 @@ const badges = [getBadge()];
120
114
  </li>
121
115
  <li>
122
116
  <div class="flex items-center">
123
- <svg fill="currentColor" viewBox="0 0 20 20" aria-hidden="true" class="h-5 w-5 flex-shrink-0 text-gray-300">
117
+ <svg
118
+ fill="currentColor"
119
+ viewBox="0 0 20 20"
120
+ aria-hidden="true"
121
+ class="h-5 w-5 flex-shrink-0 text-[rgb(var(--ec-page-border))]"
122
+ >
124
123
  <path d="M5.555 17.776l8-16 .894.448-8 16-.894-.448z"></path>
125
124
  </svg>
126
125
  <a
127
126
  href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}`)}
128
- class="text-sm font-medium text-gray-500 hover:text-gray-700"
127
+ class="text-sm font-medium text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))]"
129
128
  >
130
129
  Changelog
131
130
  </a>
@@ -133,18 +132,19 @@ const badges = [getBadge()];
133
132
  </li>
134
133
  </ol>
135
134
  </nav>
136
- <div class="border-b border-gray-200 flex justify-between items-start py-4 w-full">
135
+ <div class="border-b border-[rgb(var(--ec-page-border))] flex justify-between items-start py-4 w-full">
137
136
  <div>
138
- <h2 class="text-2xl md:text-4xl font-bold">{props.data.name} (Changelog)</h2>
139
- <h2 class="text-lg pt-2 text-gray-500 font-light">{props.data.summary}</h2>
137
+ <h2 class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">{props.data.name} (Changelog)</h2>
138
+ <h2 class="text-lg pt-2 text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</h2>
140
139
  {
141
140
  badges && (
142
141
  <div class="flex flex-wrap py-2 pt-4">
143
142
  {badges.map((badge: any) => (
144
143
  <span
145
- class={`text-sm font-light text-gray-500 px-2 py-1 rounded-md mr-2 bg-${badge.backgroundColor}-100 space-x-1 border border-${badge.backgroundColor}-200 text-${badge.textColor}-800 flex items-center ${badge.class ? badge.class : ''} `}
144
+ class="text-sm font-medium px-2 py-1 rounded-md mr-2 space-x-1 flex items-center"
145
+ style={`background-color: rgb(var(--ec-badge-${badge.badgeType}-bg)); color: rgb(var(--ec-badge-${badge.badgeType}-text));`}
146
146
  >
147
- {badge.icon && <badge.icon className="w-4 h-4 inline-block mr-1 " />}
147
+ {badge.icon && <badge.icon className="w-4 h-4 inline-block mr-1" />}
148
148
  <span>{badge.content}</span>
149
149
  </span>
150
150
  ))}
@@ -155,7 +155,7 @@ const badges = [getBadge()];
155
155
  </div>
156
156
  {
157
157
  logList.length === 0 && (
158
- <div class="py-4 text-gray-400 prose prose-md">
158
+ <div class="py-4 text-[rgb(var(--ec-page-text-muted))] prose prose-md">
159
159
  <p>No changelogs found.</p>
160
160
  </div>
161
161
  )
@@ -167,25 +167,22 @@ const badges = [getBadge()];
167
167
  <li>
168
168
  <div class="relative pb-8">
169
169
  {index !== logList.length - 1 ? (
170
- <span aria-hidden="true" class="absolute left-6 top-4 -ml-px h-full w-0.5 bg-gray-200" />
170
+ <span aria-hidden="true" class="absolute left-6 top-4 -ml-px h-full w-0.5 bg-[rgb(var(--ec-page-border))]" />
171
171
  ) : null}
172
172
  <div class="relative flex space-x-3">
173
173
  <div>
174
174
  <a
175
175
  href={buildUrl(`${log.url}/${log.version}`)}
176
- class={
177
- 'bg-primary hover:bg-primary/80 text-white flex h-8 w-14 items-center justify-center rounded-full ring-8 ring-white'
178
- }
176
+ class="bg-primary hover:bg-primary/80 text-white flex h-8 w-14 items-center justify-center rounded-full ring-8 ring-[rgb(var(--ec-page-bg))]"
179
177
  >
180
178
  {log.version}
181
- {/* <DocumentTextIcon aria-hidden="true" className="h-5 w-5 text-white" /> */}
182
179
  </a>
183
180
  </div>
184
181
  </div>
185
182
  <div class="pl-[70px] py-2 -mt-10">
186
183
  {log.createdAt && (
187
184
  <div class="pb-2">
188
- <h3 class="text-2xl text-gray-800 font-bold">
185
+ <h3 class="text-2xl text-[rgb(var(--ec-page-text))] font-bold">
189
186
  <span>
190
187
  {log.createdAt.toISOString().split('T')[0]} {`${log.isLatest ? '(latest)' : ''}`}
191
188
  </span>
@@ -195,10 +192,8 @@ const badges = [getBadge()];
195
192
  {log.badges && (
196
193
  <div class="flex flex-wrap">
197
194
  {log.badges.map((badge: any) => (
198
- <span
199
- class={`text-sm font-light text-gray-500 px-2 py-1 rounded-md mr-2 bg-${badge.backgroundColor}-100 space-x-1 border border-${badge.backgroundColor}-200 text-${badge.textColor}-800 flex items-center ${badge.class ? badge.class : ''} `}
200
- >
201
- {badge.icon && <badge.icon className="w-4 h-4 inline-block mr-1 " />}
195
+ <span class="text-sm font-medium px-2 py-1 rounded-md mr-2 space-x-1 flex items-center bg-[rgb(var(--ec-badge-default-bg))] text-[rgb(var(--ec-badge-default-text))]">
196
+ {badge.icon && <badge.icon className="w-4 h-4 inline-block mr-1" />}
202
197
  <span>{badge.content}</span>
203
198
  </span>
204
199
  ))}
@@ -207,7 +202,7 @@ const badges = [getBadge()];
207
202
  <div class="prose prose-md !max-w-none py-2">
208
203
  <log.Content components={mdxComponents(props)} />
209
204
  </div>
210
- {log.diffs && log.diffs.map((diff) => <div id="diff-container" set:html={diff} />)}
205
+ {log.diffs && log.diffs.map((diff) => <div class="bg-white rounded-lg p-2 my-2" set:html={diff} />)}
211
206
  </div>
212
207
  </div>
213
208
  </li>
@@ -0,0 +1,67 @@
1
+ ---
2
+ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
3
+ import { ClientRouter } from 'astro:transitions';
4
+ ---
5
+
6
+ <VerticalSideBarLayout title="IcePanel">
7
+ <div class="h-[calc(100vh-80px)] bg-[rgb(var(--ec-page-bg))] p-3">
8
+ <div class="flex items-center justify-between mb-4">
9
+ <h1 id="diagramTitle" class="text-2xl font-bold text-[rgb(var(--ec-page-text))]">IcePanel Diagram</h1>
10
+ <div class="flex items-center gap-3">
11
+ <button
12
+ id="backButton"
13
+ class="hidden items-center gap-2 bg-[rgb(var(--ec-card-bg))] border border-[rgb(var(--ec-page-border))] text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-accent-subtle))] px-4 py-2 rounded-md transition-colors"
14
+ >
15
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
16
+ <path
17
+ fill-rule="evenodd"
18
+ d="M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L4.414 9H17a1 1 0 110 2H4.414l5.293 5.293a1 1 0 010 1.414z"
19
+ clip-rule="evenodd"></path>
20
+ </svg>
21
+ <span>Back</span>
22
+ </button>
23
+ </div>
24
+ </div>
25
+ <div class="w-full bg-[rgb(var(--ec-card-bg))] h-[calc(100%-4rem)] rounded-2xl">
26
+ <iframe class="w-full h-full rounded-2xl border-none"></iframe>
27
+ </div>
28
+ </div>
29
+ </VerticalSideBarLayout>
30
+
31
+ <ClientRouter />
32
+ <script>
33
+ function configureIcePanel() {
34
+ // Get url from query params and then embed into the iframe
35
+ const pageUrl = new URL(window.location.href);
36
+ const icePanelUrl = pageUrl.searchParams.get('url');
37
+ const title = pageUrl.searchParams.get('title') || 'IcePanel Diagram';
38
+ const backUrl = pageUrl.searchParams.get('back');
39
+
40
+ // Configure back button if back URL is provided
41
+ const backButton = document.querySelector('#backButton');
42
+ if (backButton && backUrl) {
43
+ backButton.classList.remove('hidden');
44
+ backButton.classList.add('flex');
45
+ backButton.addEventListener('click', () => {
46
+ window.location.href = `${decodeURIComponent(backUrl)}#${title}-icepanel-title`;
47
+ });
48
+ }
49
+
50
+ // Update the diagram title
51
+ const diagramTitleElement = document.querySelector('#diagramTitle');
52
+ if (diagramTitleElement) {
53
+ diagramTitleElement.textContent = title;
54
+ }
55
+
56
+ const iframe = document.querySelector('iframe');
57
+ if (iframe && icePanelUrl) {
58
+ iframe.src = icePanelUrl;
59
+ iframe.width = '100%';
60
+ iframe.height = '100%';
61
+ }
62
+ }
63
+
64
+ configureIcePanel();
65
+
66
+ document.addEventListener('astro:page-load', configureIcePanel);
67
+ </script>
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "3.2.0",
9
+ "version": "3.2.2",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },