@eventcatalog/core 3.6.1 → 3.6.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.6.1";
40
+ var version = "3.6.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-N2VBSHPU.js";
4
- import "../chunk-SI6IEUYS.js";
3
+ } from "../chunk-NI3M6IVT.js";
4
+ import "../chunk-LFXU3MEP.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.6.1";
109
+ var version = "3.6.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-XRLZZXIS.js";
4
- import "../chunk-N2VBSHPU.js";
5
- import "../chunk-SI6IEUYS.js";
3
+ } from "../chunk-S3764NRV.js";
4
+ import "../chunk-NI3M6IVT.js";
5
+ import "../chunk-LFXU3MEP.js";
6
6
  import "../chunk-UPONRQSN.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-SI6IEUYS.js";
3
+ } from "./chunk-LFXU3MEP.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
  logger
3
- } from "./chunk-OFHFRJ42.js";
3
+ } from "./chunk-BWIAPGUD.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "3.6.1";
2
+ var version = "3.6.2";
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-SI6IEUYS.js";
3
+ } from "./chunk-LFXU3MEP.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-N2VBSHPU.js";
3
+ } from "./chunk-NI3M6IVT.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.6.1";
28
+ var version = "3.6.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-SI6IEUYS.js";
3
+ } from "./chunk-LFXU3MEP.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.6.1";
112
+ var version = "3.6.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-XRLZZXIS.js";
10
- import "./chunk-N2VBSHPU.js";
9
+ } from "./chunk-S3764NRV.js";
10
+ import "./chunk-NI3M6IVT.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-FCIJEGOL.js";
24
+ } from "./chunk-KOD6UMZD.js";
25
25
  import {
26
26
  logger
27
- } from "./chunk-OFHFRJ42.js";
27
+ } from "./chunk-BWIAPGUD.js";
28
28
  import {
29
29
  VERSION
30
- } from "./chunk-SI6IEUYS.js";
30
+ } from "./chunk-LFXU3MEP.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.6.1";
76
+ var version = "3.6.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-FCIJEGOL.js";
4
- import "./chunk-OFHFRJ42.js";
5
- import "./chunk-SI6IEUYS.js";
3
+ } from "./chunk-KOD6UMZD.js";
4
+ import "./chunk-BWIAPGUD.js";
5
+ import "./chunk-LFXU3MEP.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.6.1";
39
+ var version = "3.6.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-OFHFRJ42.js";
4
- import "../chunk-SI6IEUYS.js";
3
+ } from "../chunk-BWIAPGUD.js";
4
+ import "../chunk-LFXU3MEP.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -96,7 +96,7 @@ try {
96
96
  throw new Error(`Unknown resource type: ${type}`);
97
97
  }
98
98
 
99
- const resourcesCollection = await getCollection(collection as any);
99
+ const resourcesCollection = (await getCollection(collection as any)) as { data: { id: string; version: string } }[];
100
100
  const resources = getItemsFromCollectionByIdAndSemverOrLatest(resourcesCollection, resourceId, version);
101
101
 
102
102
  if (resources.length === 0) {
@@ -153,7 +153,7 @@ const resolveMessage = async (msg: any): Promise<{ version: string | null; colle
153
153
  const collections = ['events', 'commands', 'queries'];
154
154
  for (const col of collections) {
155
155
  try {
156
- const items = await getCollection(col as any);
156
+ const items = (await getCollection(col as any)) as { data: { id: string; version: string } }[];
157
157
  const found = getItemsFromCollectionByIdAndSemverOrLatest(items, msg.id);
158
158
  if (found.length > 0 && found[0].data.version && found[0].data.version !== 'latest') {
159
159
  return { version: found[0].data.version, collection: col };
@@ -25,6 +25,7 @@ import {
25
25
  import { StarIcon as StarIconSolid, CircleStackIcon } from '@heroicons/react/24/solid';
26
26
  import { useStore } from '@nanostores/react';
27
27
  import { sidebarStore } from '../../stores/sidebar-store';
28
+ import type { NavNode } from '../../stores/sidebar-store/state';
28
29
  import { favoritesStore, toggleFavorite as toggleFavoriteAction } from '../../stores/favorites-store';
29
30
  import { buildUrl } from '@utils/url-builder';
30
31
 
@@ -52,10 +52,17 @@ import { getQueries } from '@utils/collections/queries';
52
52
  import { hasLandingPageForDocs } from '@utils/pages';
53
53
 
54
54
  import { isEventCatalogUpgradeEnabled, isEmbedEnabled, isCustomStylesEnabled } from '@utils/feature';
55
+ import { getUsers } from '@utils/collections/users';
56
+ import { getTeams } from '@utils/collections/teams';
55
57
 
56
58
  const catalogHasDefaultLandingPageForDocs = await hasLandingPageForDocs();
57
59
  const customDocs = await getCollection('customPages');
58
60
 
61
+ // Get users and teams for directory navigation
62
+ const users = await getUsers();
63
+ const teams = await getTeams();
64
+ const directoryDefaultUrl = users.length > 0 ? '/directory/users' : teams.length > 0 ? '/directory/teams' : '/directory/users';
65
+
59
66
  let events: any[] = [];
60
67
  let commands: any[] = [];
61
68
  let queries: any[] = [];
@@ -145,7 +152,7 @@ const navigationItems = [
145
152
  id: '/directory',
146
153
  label: 'Users & Teams',
147
154
  icon: Users,
148
- href: buildUrl('/directory/users'),
155
+ href: buildUrl(directoryDefaultUrl),
149
156
  current: currentPath.includes('/directory'),
150
157
  },
151
158
  ].filter((item) => {
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.6.1",
9
+ "version": "3.6.2",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -158,6 +158,7 @@
158
158
  "release": "changeset publish",
159
159
  "format": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx,json,astro}\"",
160
160
  "format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,json,astro}\"",
161
- "lint:catalog": "pnpm dlx @eventcatalog/linter examples/default"
161
+ "lint:catalog": "pnpm dlx @eventcatalog/linter examples/default",
162
+ "check": "node scripts/check-types.js"
162
163
  }
163
164
  }