@eventcatalog/core 5.0.0-beta.31 → 5.0.0-beta.33

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.
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "5.0.0-beta.31";
39
+ var version = "5.0.0-beta.33";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-BNSLGNQI.js";
3
+ } from "../chunk-Y5YVOT3I.js";
4
4
  import "../chunk-CPW6G62V.js";
5
- import "../chunk-WADZVNCA.js";
5
+ import "../chunk-7RCPGRLA.js";
6
6
  export {
7
7
  raiseEvent
8
8
  };
@@ -169,7 +169,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
169
169
  var import_os = __toESM(require("os"), 1);
170
170
 
171
171
  // package.json
172
- var version = "5.0.0-beta.31";
172
+ var version = "5.0.0-beta.33";
173
173
 
174
174
  // src/constants.ts
175
175
  var VERSION = version;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-XRFL642Z.js";
3
+ } from "../chunk-YFFESNO5.js";
4
4
  import "../chunk-AD7CL772.js";
5
5
  import "../chunk-ZAZHAVKB.js";
6
6
  import "../chunk-CA6WCQ2T.js";
7
- import "../chunk-BNSLGNQI.js";
7
+ import "../chunk-Y5YVOT3I.js";
8
8
  import "../chunk-CPW6G62V.js";
9
- import "../chunk-WADZVNCA.js";
9
+ import "../chunk-7RCPGRLA.js";
10
10
  import "../chunk-4G7FSRPN.js";
11
11
  export {
12
12
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-2UCCTEIH.js";
3
+ } from "./chunk-NBFJVJE7.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "5.0.0-beta.31";
2
+ var version = "5.0.0-beta.33";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-WADZVNCA.js";
3
+ } from "./chunk-7RCPGRLA.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-5EPNFDT5.js";
7
7
  import {
8
8
  createFederationSourceProvider
9
- } from "./chunk-6K7XZAYI.js";
9
+ } from "./chunk-A2RZR3U4.js";
10
10
  import {
11
11
  createFederationContentCache
12
12
  } from "./chunk-R7Z5ALYI.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-CPW6G62V.js";
5
5
  import {
6
6
  VERSION
7
- } from "./chunk-WADZVNCA.js";
7
+ } from "./chunk-7RCPGRLA.js";
8
8
 
9
9
  // src/analytics/analytics.js
10
10
  import os from "os";
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-CA6WCQ2T.js";
14
14
  import {
15
15
  raiseEvent
16
- } from "./chunk-BNSLGNQI.js";
16
+ } from "./chunk-Y5YVOT3I.js";
17
17
  import {
18
18
  TELEMETRY_REQUEST_TIMEOUT_MS,
19
19
  isTelemetryDisabled
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "5.0.0-beta.31";
28
+ var version = "5.0.0-beta.33";
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-WADZVNCA.js";
3
+ } from "./chunk-7RCPGRLA.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -174,7 +174,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
174
174
  var import_picocolors = __toESM(require("picocolors"), 1);
175
175
 
176
176
  // package.json
177
- var version = "5.0.0-beta.31";
177
+ var version = "5.0.0-beta.33";
178
178
 
179
179
  // src/constants.ts
180
180
  var VERSION = version;
@@ -1,13 +1,19 @@
1
1
  import {
2
- runMigrations
3
- } from "./chunk-XUAF2H54.js";
4
- import "./chunk-CA4U2JP7.js";
2
+ FederationConflictError,
3
+ FederationDiagnosticError,
4
+ federateCatalog
5
+ } from "./chunk-QJ7KKN2D.js";
6
+ import "./chunk-WRNH5C3U.js";
7
+ import "./chunk-5EPNFDT5.js";
8
+ import "./chunk-A2RZR3U4.js";
9
+ import "./chunk-SDZQJTJW.js";
10
+ import "./chunk-352FGP6W.js";
5
11
  import {
6
12
  stopChildWithParent
7
13
  } from "./chunk-S5GWAUG5.js";
8
14
  import {
9
15
  log_build_default
10
- } from "./chunk-XRFL642Z.js";
16
+ } from "./chunk-YFFESNO5.js";
11
17
  import {
12
18
  getLicenseStatus,
13
19
  printLicenseStatus
@@ -15,20 +21,14 @@ import {
15
21
  import "./chunk-ZAZHAVKB.js";
16
22
  import "./chunk-CA6WCQ2T.js";
17
23
  import {
18
- FederationConflictError,
19
- FederationDiagnosticError,
20
- federateCatalog
21
- } from "./chunk-OX6TSVHY.js";
22
- import "./chunk-WRNH5C3U.js";
23
- import "./chunk-5EPNFDT5.js";
24
- import "./chunk-6K7XZAYI.js";
25
- import "./chunk-352FGP6W.js";
24
+ runMigrations
25
+ } from "./chunk-XUAF2H54.js";
26
+ import "./chunk-CA4U2JP7.js";
26
27
  import "./chunk-R7Z5ALYI.js";
27
28
  import {
28
29
  getFederationDiagnosticCounts,
29
30
  getVisibleFederationDiagnostics
30
31
  } from "./chunk-JJPB6EOZ.js";
31
- import "./chunk-SDZQJTJW.js";
32
32
  import {
33
33
  getProjectOutDir,
34
34
  isAuthEnabled,
@@ -37,10 +37,10 @@ import {
37
37
  } from "./chunk-NKNOXQ62.js";
38
38
  import {
39
39
  generate
40
- } from "./chunk-OUEGYMBA.js";
40
+ } from "./chunk-46MTR3KO.js";
41
41
  import {
42
42
  logger
43
- } from "./chunk-2UCCTEIH.js";
43
+ } from "./chunk-NBFJVJE7.js";
44
44
  import {
45
45
  resolve_catalog_dependencies_default
46
46
  } from "./chunk-PD7KTSYN.js";
@@ -54,7 +54,7 @@ import {
54
54
  import {
55
55
  watch
56
56
  } from "./chunk-U63GDPPY.js";
57
- import "./chunk-BNSLGNQI.js";
57
+ import "./chunk-Y5YVOT3I.js";
58
58
  import "./chunk-CPW6G62V.js";
59
59
  import {
60
60
  getAstroConfigPath
@@ -71,7 +71,7 @@ import {
71
71
  } from "./chunk-LFQJXLHG.js";
72
72
  import {
73
73
  VERSION
74
- } from "./chunk-WADZVNCA.js";
74
+ } from "./chunk-7RCPGRLA.js";
75
75
  import {
76
76
  getEventCatalogConfigFile,
77
77
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -2,14 +2,14 @@ import {
2
2
  FederationConflictError,
3
3
  FederationDiagnosticError,
4
4
  federateCatalog
5
- } from "../chunk-OX6TSVHY.js";
5
+ } from "../chunk-QJ7KKN2D.js";
6
6
  import "../chunk-WRNH5C3U.js";
7
7
  import "../chunk-5EPNFDT5.js";
8
- import "../chunk-6K7XZAYI.js";
8
+ import "../chunk-A2RZR3U4.js";
9
+ import "../chunk-SDZQJTJW.js";
9
10
  import "../chunk-352FGP6W.js";
10
11
  import "../chunk-R7Z5ALYI.js";
11
12
  import "../chunk-JJPB6EOZ.js";
12
- import "../chunk-SDZQJTJW.js";
13
13
  import "../chunk-4G7FSRPN.js";
14
14
  export {
15
15
  FederationConflictError,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createFederationSourceProvider
3
- } from "../chunk-6K7XZAYI.js";
4
- import "../chunk-352FGP6W.js";
3
+ } from "../chunk-A2RZR3U4.js";
5
4
  import "../chunk-SDZQJTJW.js";
5
+ import "../chunk-352FGP6W.js";
6
6
  export {
7
7
  createFederationSourceProvider
8
8
  };
package/dist/generate.cjs CHANGED
@@ -105,7 +105,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
105
105
  var import_picocolors = __toESM(require("picocolors"), 1);
106
106
 
107
107
  // package.json
108
- var version = "5.0.0-beta.31";
108
+ var version = "5.0.0-beta.33";
109
109
 
110
110
  // src/constants.ts
111
111
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-OUEGYMBA.js";
4
- import "./chunk-2UCCTEIH.js";
5
- import "./chunk-WADZVNCA.js";
3
+ } from "./chunk-46MTR3KO.js";
4
+ import "./chunk-NBFJVJE7.js";
5
+ import "./chunk-7RCPGRLA.js";
6
6
  import "./chunk-4G7FSRPN.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 = "5.0.0-beta.31";
39
+ var version = "5.0.0-beta.33";
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-2UCCTEIH.js";
4
- import "../chunk-WADZVNCA.js";
3
+ } from "../chunk-NBFJVJE7.js";
4
+ import "../chunk-7RCPGRLA.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -190,6 +190,13 @@ if (isDataProduct && contractPath) {
190
190
  // Render the requested tab on the server so the page does not flash the default tab before hydration.
191
191
  // Static builds cannot see the query string, so the panel also restores the tab on the client.
192
192
  const initialTab = Astro.url.searchParams.get('tab') ?? undefined;
193
+
194
+ // The versions to switch between and compare. The one being viewed is also `message`, with its usage and flow graphs;
195
+ // switching and comparing only need the schemas, so the list leaves the graphs out (each page carried them twice)
196
+ const versionChoices = sortedVersions.map(({ graph: _graph, ...version }) => {
197
+ const { flows: _flows, ...data } = version.data;
198
+ return { ...version, data };
199
+ });
193
200
  ---
194
201
 
195
202
  <VerticalSideBarLayout title={pageTitle}>
@@ -214,7 +221,7 @@ const initialTab = Astro.url.searchParams.get('tab') ?? undefined;
214
221
  <SchemaPageViewer
215
222
  client:load
216
223
  message={currentMessage}
217
- availableVersions={sortedVersions}
224
+ availableVersions={versionChoices}
218
225
  showOwners={true}
219
226
  showProducersConsumers={true}
220
227
  initialTab={initialTab}
@@ -166,30 +166,43 @@ export const getFlowsWithServiceStep = (
166
166
  );
167
167
  };
168
168
 
169
- /** A catalog entry a flow step points at (a service, message, agent, data store, data product or flow). */
169
+ /** A catalog entry a flow step points at (a service, system, channel, message, agent, data store, data product or flow). */
170
170
  type FlowStepResource = { collection: string; data: { id: string; version: string; [key: string]: any } };
171
171
 
172
172
  /**
173
173
  * The catalog resources a flow's steps point at, each listed once in step order: messages,
174
- * services, agents, data stores, data products and sub-flows (the same steps the flow's
175
- * sidebar lists). Expects steps as getFlows returns them, where messages, agents, data stores
176
- * and data products are already resolved; services and sub-flows are resolved here, with a
177
- * pointer without a version meaning the latest.
174
+ * services, systems, channels, agents, data stores, data products and sub-flows (the same steps
175
+ * the flow's sidebar lists). Expects steps as getFlows returns them, where messages, agents, data
176
+ * stores and data products are already resolved; services, systems, channels and sub-flows are
177
+ * resolved here, with a pointer without a version meaning the latest.
178
178
  */
179
179
  export const getFlowStepResources = (
180
180
  flow: Flow,
181
- catalog: { services: CollectionEntry<'services'>[]; flows: Flow[] }
181
+ catalog: {
182
+ services: CollectionEntry<'services'>[];
183
+ flows: Flow[];
184
+ systems?: CollectionEntry<'systems'>[];
185
+ channels?: CollectionEntry<'channels'>[];
186
+ }
182
187
  ): FlowStepResource[] => {
183
188
  const serviceMap = getVersionedMap(catalog.services);
184
189
  const flowMap = getVersionedMap(catalog.flows);
190
+ const systemMap = getVersionedMap(catalog.systems ?? []);
191
+ const channelMap = getVersionedMap(catalog.channels ?? []);
185
192
  const resources: FlowStepResource[] = [];
186
193
 
187
194
  for (const step of (flow.data.steps || []) as any[]) {
195
+ // `systems` is another name for a step's `system`
196
+ const system = step.system ?? step.systems;
188
197
  const resource = step.service
189
198
  ? findInMap(serviceMap, step.service.id, step.service.version)
190
199
  : step.flow
191
200
  ? findInMap(flowMap, step.flow.id, step.flow.version)
192
- : [step.message, step.agent, step.container, step.dataProduct].find(Array.isArray)?.[0];
201
+ : system
202
+ ? findInMap(systemMap, system.id, system.version)
203
+ : step.channel
204
+ ? findInMap(channelMap, step.channel.id, step.channel.version)
205
+ : [step.message, step.agent, step.container, step.dataProduct].find(Array.isArray)?.[0];
193
206
  if (resource?.data) resources.push(resource);
194
207
  }
195
208
 
@@ -70,6 +70,7 @@ export const createResourcesCatalog = () => {
70
70
  allFlows: once(() => getFlows()),
71
71
  currentFlows: once(() => getFlows({ getAllVersions: false })),
72
72
  rawChannels: once(() => getCollection('channels')),
73
+ rawSystems: once(() => getCollection('systems')),
73
74
  rawMessages: once(async () => [
74
75
  ...(await getCollection('events')),
75
76
  ...(await getCollection('commands')),
@@ -108,10 +109,15 @@ const relatedResourcesFor = async (type: ResourceOwnerCollection, catalog: Resou
108
109
  });
109
110
  }
110
111
  case 'flows': {
111
- const [services, flows] = await Promise.all([catalog.services(), catalog.allFlows()]);
112
+ const [services, flows, systems, channels] = await Promise.all([
113
+ catalog.services(),
114
+ catalog.allFlows(),
115
+ catalog.rawSystems(),
116
+ catalog.rawChannels(),
117
+ ]);
112
118
  return (owner) => ({
113
119
  adrs: adrsFor(owner),
114
- stepResources: getFlowStepResources(asEntry<'flows'>(owner), { services, flows }),
120
+ stepResources: getFlowStepResources(asEntry<'flows'>(owner), { services, flows, systems, channels }),
115
121
  });
116
122
  }
117
123
  case 'channels': {
@@ -94,6 +94,7 @@ const messageGroups = (messages: any[]): ResourceGroup[] => [
94
94
 
95
95
  // The collections a flow step can point at, in the order the page groups them.
96
96
  const FLOW_STEP_COLLECTIONS: ResourceCollection[] = [
97
+ 'systems',
97
98
  'services',
98
99
  'agents',
99
100
  'flows',
@@ -102,6 +103,7 @@ const FLOW_STEP_COLLECTIONS: ResourceCollection[] = [
102
103
  'events',
103
104
  'commands',
104
105
  'queries',
106
+ 'channels',
105
107
  ];
106
108
 
107
109
  export const getResourceGroups = (
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "BUSL-1.1",
9
9
  "type": "module",
10
- "version": "5.0.0-beta.31",
10
+ "version": "5.0.0-beta.33",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -142,8 +142,8 @@
142
142
  "yjs": "^13.6.33",
143
143
  "zod": "^4.3.6",
144
144
  "@eventcatalog/linter": "1.2.0-beta.4",
145
- "@eventcatalog/visualiser": "^5.0.0-beta.7",
146
- "@eventcatalog/sdk": "2.30.0-beta.1"
145
+ "@eventcatalog/sdk": "2.30.0-beta.1",
146
+ "@eventcatalog/visualiser": "^5.0.0-beta.7"
147
147
  },
148
148
  "devDependencies": {
149
149
  "@astrojs/check": "^0.9.10",
@@ -1,9 +1,9 @@
1
- import {
2
- createGitHubSourceProvider
3
- } from "./chunk-352FGP6W.js";
4
1
  import {
5
2
  createFileSystemSourceProvider
6
3
  } from "./chunk-SDZQJTJW.js";
4
+ import {
5
+ createGitHubSourceProvider
6
+ } from "./chunk-352FGP6W.js";
7
7
 
8
8
  // src/federation/source-provider.ts
9
9
  var createFederationSourceProvider = (projectDirectory, providers = {}) => {